Method and system for dynamic workload prediction and resource allocation in cloud computing environment
By employing frequency domain transformation and multi-scale decomposition methods, combined with correlation and volatility metrics, resource allocation in a cloud computing environment is optimized. This addresses the issues of insufficient workload prediction accuracy and uneven resource allocation, achieving efficient resource scheduling and improved service quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NINGBO ZIQIAN INFORMATION TECH CO LTD
- Filing Date
- 2026-03-16
- Publication Date
- 2026-06-19
AI Technical Summary
In existing cloud computing technologies, workload prediction methods struggle to handle multi-scale features, resulting in insufficient prediction accuracy, uneven resource allocation, and impacting system performance and service quality.
By performing frequency domain transformation and multi-scale decomposition on historical workload data, calculating correlation metrics and weighting them together, workload prediction values are generated. Based on the volatility metrics, resource mapping relationships are adjusted, and a resource scheduling graph is constructed to optimize resource allocation.
It improves the accuracy of workload prediction and the flexibility of resource allocation, reduces system load imbalance, and enhances resource utilization efficiency and service quality.
Smart Images

Figure CN122240305A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cloud computing technology, specifically to a method and system for dynamic workload prediction and resource allocation in a cloud computing environment. Background Technology
[0002] With the rapid development of cloud computing technology, data centers are expanding in scale and the number of computing nodes is increasing dramatically. Accurately predicting workloads and achieving efficient resource allocation has become a pressing issue. Current technologies typically employ time-series forecasting methods based on historical data to predict workloads; however, these methods struggle to effectively handle the multi-scale characteristics of workloads, resulting in insufficient prediction accuracy.
[0003] Currently used workload forecasting methods include moving averages, exponential smoothing, and autoregressive models. These methods primarily focus on the overall trend of workload changes, ignoring the differences in load characteristics across different time scales and failing to accurately characterize periodic fluctuations and sudden changes in workload. Existing methods often employ fixed mapping rules to convert forecasted load into resource demand when allocating resources, neglecting the impact of load fluctuations on resource allocation, which can easily lead to resource waste or shortages.
[0004] In terms of resource scheduling, existing technologies mostly adopt threshold-based triggering scheduling strategies. This approach is slow to react and struggles to respond promptly to load changes, easily leading to uneven resource allocation and impacting overall system performance. Furthermore, during workload migration, the lack of sufficient consideration of resource dependencies between loads can trigger a chain reaction, affecting service quality. Summary of the Invention
[0005] The purpose of this invention is to provide a method and system for dynamic workload prediction and resource allocation in a cloud computing environment, aiming to solve at least one of the technical problems existing in the prior art.
[0006] The technical solution of this invention is: a method for dynamic workload prediction and resource allocation in a cloud computing environment, comprising the following steps: Historical workload data from multiple computing nodes in a cloud computing environment is obtained. Frequency domain transformation is performed on the historical workload data. The number of decomposition layers is determined based on the energy proportion of frequency components in the frequency domain transformation result. Multi-scale decomposition of the historical workload data is performed to obtain multi-level decomposition features. Perform temporal prediction on the multi-layer decomposition features, calculate the correlation metric between the temporal prediction results of each layer and the historical workload data, and weight and combine the temporal prediction results of each layer according to the correlation metric to generate the workload prediction value. Calculate the fluctuation measure of the workload forecast, adjust the mapping relationship between the load and resources based on the fluctuation measure, and convert the workload forecast into a range of resource requirements. Obtain the current resource status data of multiple computing nodes, compare the resource demand range with the current resource status data, and calculate the resource deviation of multiple computing nodes; A resource scheduling graph between nodes is constructed based on the resource load deviation. The optimal resource migration strategy is solved with the goal of minimizing the global load variance, and resource allocation instructions are generated. Based on resource allocation instructions, the computing resource quotas of computing nodes are adjusted and the corresponding workloads are migrated to achieve dynamic optimization of resource allocation.
[0007] Historical workload data from multiple computing nodes in a cloud computing environment is acquired. Frequency domain transformation is performed on the historical workload data. The number of decomposition levels is determined based on the energy proportion of frequency components in the frequency domain transformation result. Multi-scale decomposition of the historical workload data yields multi-level decomposition features, including: Acquire historical workload data of multiple computing nodes in a cloud computing environment within a specified time interval, and divide the historical workload data into training workload data and validation workload data. Perform frequency domain transformation on the training workload data to generate frequency component data, calculate the energy contribution of each frequency component in the frequency component data, and generate the energy proportion of the frequency component based on the energy contribution. A density distribution curve is constructed based on the energy proportion of the frequency components. The position of the peak point is detected on the density distribution curve. The energy proportion interval is divided according to the position of the peak point. The number of the energy proportion intervals is used as the number of decomposition layers. The frequency component data is divided into multiple frequency bands according to the number of decomposition layers. The frequency with the largest amplitude in each frequency band is extracted as the dominant frequency, and a decomposition basis vector is generated based on the dominant frequency. The historical workload data is recursively decomposed using the decomposition basis vectors to obtain recursive decomposition coefficients. Based on the recursive decomposition coefficients, a feature representation of the historical workload data at each decomposition level is constructed. The feature representations are then combined according to the decomposition level to generate multi-level decomposition features.
[0008] Perform time-domain prediction on the multi-level decomposition features, calculate the correlation metric between the time-domain prediction results of each level and historical workload data, and weight and combine the time-domain prediction results of each level based on the correlation metric to generate workload prediction values, including: The multi-level decomposition features are reconstructed into a predicted feature sequence according to the time series. The workload change at adjacent time points in the predicted feature sequence is calculated, and a state transition matrix is constructed based on the workload change. The workload change trend is calculated based on the state transition matrix. The workload change trend is used as a prediction constraint. State prediction is performed on each feature in the multi-layer decomposition feature to obtain multiple sets of prediction sequences. The multiple sets of prediction sequences are combined to generate a time-domain prediction result. Calculate the mutual information value between the time-domain prediction result and the historical workload data, and normalize the mutual information value to obtain the correlation metric value. The correlation metric is used to construct a combined weight. The combined weight is iteratively optimized to minimize the deviation between the time-domain prediction result and the historical workload data. The optimized combined weight is then weighted and combined with the time-domain prediction result to generate the workload prediction value.
[0009] Calculate the volatility metric of the workload forecast, adjust the mapping between workload and resources based on the volatility metric, and convert the workload forecast into a resource demand range including: Calculate the magnitude of change in the predicted workload value within a time window, identify fluctuation points based on the magnitude of change, and classify the fluctuation points to generate a fluctuation point sequence. Calculate the volatility intensity of each volatility point in the volatility point sequence, and convert the volatility intensity into a volatility metric. A resource allocation boundary is constructed based on the fluctuation metric. The resource allocation boundary is then divided into multiple sub-intervals. A corresponding resource allocation ratio is set for each sub-interval, and a resource allocation strategy table is generated. The predicted workload value is mapped to the corresponding sub-interval according to the fluctuation metric. The resource allocation ratio of the sub-interval is obtained from the resource allocation strategy table. The initial resource requirement is calculated based on the resource allocation ratio. Calculate the resource utilization level of the initial resource demand, adjust the initial resource demand according to the resource utilization level, and when the difference between the resource utilization levels after two adjacent adjustments is less than a preset level threshold, determine the resource demand range after the last adjustment.
[0010] Obtain current resource status data for multiple compute nodes, compare the resource demand range with the current resource status data, and calculate the resource deviation of multiple compute nodes, including: Collect resource usage information from multiple computing nodes, calculate the allocable and occupied resources based on the resource usage information, and generate current resource status data; The current resource status data is standardized according to the total resources of the computing nodes to generate a resource distribution matrix; Map the resource demand range to the resource distribution matrix, and calculate the resource difference between each computing node in the resource distribution matrix and the resource demand range; The resource difference is weighted to obtain the resource allocation weight. A resource distribution vector is generated based on the resource allocation weight. The weight difference of each calculation node in the resource distribution vector is used as the resource deviation.
[0011] A resource scheduling graph between nodes is constructed based on resource load deviation. The optimal resource migration strategy is solved with minimizing the global load variance as the objective function, and resource allocation instructions are generated, including: The load distribution difference between computing nodes is obtained based on the resource load deviation, and resource output nodes and resource input nodes are identified based on the load distribution difference. Calculate the load drop between the resource output node and the resource input node, and construct a resource scheduling graph between nodes based on the load drop; Calculate the resource supply of the resource output node and the resource demand of the resource input node based on the resource scheduling diagram. Based on the resource supply and resource demand, a resource scheduling weight is generated between nodes, and a resource allocation sequence is constructed based on the resource scheduling weight. The resource allocation sequence represents the resource migration order between nodes. The resource migration path is determined based on the resource allocation sequence, the resource migration quantity is calculated by combining the resource supply and resource demand, and the resource migration path and the resource migration quantity are combined to generate a resource migration scheme. Calculate the global load variance of the resource migration scheme, and iteratively optimize the resource migration scheme based on the global load variance until the global load variance is minimized to obtain the optimal resource migration strategy. Resource allocation instructions are generated based on the optimal resource migration strategy, and these instructions are used to execute resource migration operations between computing nodes.
[0012] Adjusting computing resource quotas for computing nodes and migrating corresponding workloads based on resource allocation instructions to achieve dynamic optimization of resource allocation includes: Parse resource allocation instructions and extract resource quota adjustment data and workload migration data; The resource quota adjustment data is decomposed into resource increment values and resource decrement values. A resource quota adjustment sequence is generated based on the resource increment values and resource decrement values. The resource quota adjustment sequence represents the resource quota adjustment process of the computing node. Based on the workload migration data, identify the workloads to be migrated, obtain the resource usage data of the workloads to be migrated, and construct a workload resource dependency graph based on the resource usage data; The workload migration priority is calculated based on the workload resource dependency graph, and a workload migration sequence is generated according to the workload migration priority. The workload migration sequence represents the migration order of the workload. Calculate the resource release time series based on the workload migration sequence, and combine the resource release time series with the resource quota adjustment sequence to generate a dynamic resource optimization scheme. The dynamic resource optimization scheme includes the adjustment time point and adjustment value of the computing node resource quota. The resource quota of the computing node is adjusted according to the resource dynamic optimization scheme, the workload migration is performed according to the workload migration sequence, the resource change data during the resource quota adjustment process and the migration completion status during the workload migration process are recorded, and the resource dynamic optimization allocation result is generated.
[0013] This invention provides a dynamic workload prediction and resource allocation system in a cloud computing environment, the system comprising: The workload decomposition module is used to acquire historical workload data from multiple computing nodes in a cloud computing environment, perform frequency domain transformation on the historical workload data, determine the number of decomposition layers based on the energy proportion of frequency components in the frequency domain transformation result, and perform multi-scale decomposition on the historical workload data to obtain multi-layer decomposition features. The prediction combination module is used to perform temporal prediction on multi-layer decomposition features, calculate the correlation metric between the temporal prediction results of each layer and historical workload data, and perform weighted combination of the temporal prediction results of each layer based on the correlation metric to generate workload prediction values. The resource mapping module is used to calculate the fluctuation measure of the workload forecast, adjust the mapping relationship between the workload and resources based on the fluctuation measure, and convert the workload forecast into the range of resource requirements. The status comparison module is used to obtain the current resource status data of multiple computing nodes, compare the resource demand range with the current resource status data, and calculate the resource deviation of multiple computing nodes. The migration strategy module is used to construct a resource scheduling graph between nodes based on resource load deviation, solve for the optimal resource migration strategy with the objective function of minimizing global load variance, and generate resource allocation instructions. The resource adjustment module is used to adjust the computing resource quotas of computing nodes and migrate the corresponding workloads based on resource allocation instructions, so as to realize dynamic optimization of resource allocation.
[0014] One technical solution provided in this embodiment of the invention is an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in any of the aforementioned methods.
[0015] One technical solution provided in this embodiment of the invention is a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the steps in any of the aforementioned methods.
[0016] This invention effectively captures the changing characteristics of workloads at different time scales by performing multi-scale decomposition and frequency domain analysis on historical workload data, thereby improving the accuracy of load prediction. A weighted combination strategy based on correlation metrics enables adaptive fusion of prediction results from each layer, enhancing the robustness of the prediction model. A volatility metric mechanism is introduced to evaluate the predicted values, dynamically adjusting the mapping relationship between load and resources, improving the flexibility and adaptability of resource allocation. By calculating resource deviation and constructing a resource scheduling graph, global optimization of the resource distribution of computing nodes is achieved, effectively reducing the degree of system load imbalance. The optimization objective of minimizing global load variance, combined with migration planning based on the resource dependencies of workloads, ensures both resource utilization efficiency and avoids service quality degradation during migration. This achieves closed-loop optimization from load prediction to resource allocation, improving the intelligence level and operational efficiency of resource scheduling in a cloud computing environment. Attached Figure Description
[0017] Figure 1 A flowchart of a dynamic workload prediction and resource allocation method in a cloud computing environment provided in an embodiment of the present invention; Figure 2 This is a flowchart illustrating the dynamic resource allocation and demand determination based on workload fluctuation metrics, as described in an embodiment of the present invention. Detailed Implementation
[0018] like Figure 1 As shown, Figure 1 This is a flowchart of a dynamic workload prediction and resource allocation method in a cloud computing environment provided by an embodiment of the present invention. The method includes the following steps: Historical workload data from multiple computing nodes in a cloud computing environment is obtained. Frequency domain transformation is performed on the historical workload data. The number of decomposition layers is determined based on the energy proportion of frequency components in the frequency domain transformation result. Multi-scale decomposition of the historical workload data is performed to obtain multi-level decomposition features. Perform temporal prediction on the multi-layer decomposition features, calculate the correlation metric between the temporal prediction results of each layer and the historical workload data, and weight and combine the temporal prediction results of each layer according to the correlation metric to generate the workload prediction value. Calculate the fluctuation measure of the workload forecast, adjust the mapping relationship between the load and resources based on the fluctuation measure, and convert the workload forecast into a range of resource requirements. Obtain the current resource status data of multiple computing nodes, compare the resource demand range with the current resource status data, and calculate the resource deviation of multiple computing nodes; A resource scheduling graph between nodes is constructed based on the resource load deviation. The optimal resource migration strategy is solved with the goal of minimizing the global load variance, and resource allocation instructions are generated. Based on resource allocation instructions, the computing resource quotas of computing nodes are adjusted and the corresponding workloads are migrated to achieve dynamic optimization of resource allocation.
[0019] Historical workload data from multiple computing nodes in a cloud computing environment is acquired. Frequency domain transformation is performed on the historical workload data. The number of decomposition levels is determined based on the energy proportion of frequency components in the frequency domain transformation result. Multi-scale decomposition of the historical workload data yields multi-level decomposition features, including: Acquire historical workload data of multiple computing nodes in a cloud computing environment within a specified time interval, and divide the historical workload data into training workload data and validation workload data. Perform frequency domain transformation on the training workload data to generate frequency component data, calculate the energy contribution of each frequency component in the frequency component data, and generate the energy proportion of the frequency component based on the energy contribution. A density distribution curve is constructed based on the energy proportion of the frequency components. The position of the peak point is detected on the density distribution curve. The energy proportion interval is divided according to the position of the peak point. The number of the energy proportion intervals is used as the number of decomposition layers. The frequency component data is divided into multiple frequency bands according to the number of decomposition layers. The frequency with the largest amplitude in each frequency band is extracted as the dominant frequency, and a decomposition basis vector is generated based on the dominant frequency. The historical workload data is recursively decomposed using the decomposition basis vectors to obtain recursive decomposition coefficients. Based on the recursive decomposition coefficients, a feature representation of the historical workload data at each decomposition level is constructed. The feature representations are then combined according to the decomposition level to generate multi-level decomposition features.
[0020] First, a historical workload dataset was constructed by collecting performance metrics such as CPU utilization, memory usage, and network traffic of each computing node in the cloud computing environment within a specified time interval. The collection time granularity was set to 5 minutes, and data was collected continuously for 30 days, totaling 8640 data points. The collected data was arranged in chronological order, and the first 80%, or 6912 data points, were used as training workload data, while the last 20%, or 1728 data points, were used as validation workload data.
[0021] A Fast Fourier Transform (FFT) is performed on the training workload data to convert the time-domain data into a frequency-domain representation, yielding frequency component data containing amplitude and phase information. To determine the dominant frequency characteristics in the workload data, the energy contribution of each frequency component is calculated. The energy contribution of a frequency component is obtained by calculating the ratio of the square of its amplitude to the sum of the squares of the amplitudes of all frequency components. After calculation, a sequence of energy proportions of the frequency components is generated, reflecting the degree to which different frequency components contribute to workload fluctuations.
[0022] A density distribution curve is constructed based on the energy proportion sequence, and a smooth curve is generated using the kernel density estimation method. A Gaussian kernel function is chosen, with a bandwidth parameter set to 0.05. On the generated density distribution curve, a local extremum detection algorithm is used to identify the peak locations. Specifically, the points on the density curve are iterated; if the density value of a point is greater than the density values of the three points before and after it, that point is marked as a peak. Based on the detected peak locations, the energy proportion interval is divided into multiple sub-intervals. The regions between peaks constitute a sub-interval, and the number of sub-intervals is the decomposition level. In this embodiment, four distinct peaks were detected, and the decomposition level is determined to be 4.
[0023] Based on the determined number of decomposition levels, the frequency component data is divided into four frequency bands. The low-frequency band covers the normalized frequency range of 0 to 0.1, corresponding to long-term trends; the mid-low-frequency band covers the normalized frequency range of 0.1 to 0.3, corresponding to periodic fluctuations; the mid-high-frequency band covers the normalized frequency range of 0.3 to 0.6, corresponding to short-term fluctuations; and the high-frequency band covers the normalized frequency range of 0.6 to 1.0, corresponding to noise components. Within each frequency band, the frequency with the largest amplitude is extracted as the dominant frequency of that band. The dominant frequency of the low-frequency band is 0.05, the dominant frequency of the mid-low-frequency band is 0.2, the dominant frequency of the mid-high-frequency band is 0.45, and the dominant frequency of the high-frequency band is 0.75. Based on these four dominant frequencies, decomposition basis vectors are generated. Each basis vector contains trigonometric function components to capture different frequency features.
[0024] The generated decomposition basis vectors are used to perform recursive decomposition operations on historical workload data. The decomposition process starts from the lowest frequency band, extracting long-term trend components to obtain the first-level decomposition coefficients and residuals. The residuals are then further decomposed using the second-level basis vectors to obtain the second-level decomposition coefficients and new residuals. This process is repeated until all levels of decomposition are completed, resulting in four levels of decomposition coefficients. Based on the decomposition coefficients at each level, feature representations of historical workload data at different decomposition levels are constructed. The first-level feature representation captures the long-term trend of workload changes, showing that the overall load exhibits a slow upward trend, with peaks occurring during midday on weekdays. The second-level feature representation captures the periodic fluctuations of workload, reflecting clear daytime and weekday patterns, with weekday loads higher than weekend loads. The third-level feature representation captures the short-term fluctuations of workload, reflecting load changes caused by sudden business requests. The fourth-level feature representation captures the noise component of the workload, mainly from random requests and internal system fluctuations. These four levels of feature representations are combined to generate multi-level decomposition features, with each level corresponding to a workload change pattern at a specific time scale.
[0025] Validation analysis of historical workloads revealed the following: In the first level of decomposition, CPU utilization data showed a clear difference between working and non-working hours, with peak utilization reaching 85% and troughs at 30%. The second level of decomposition showed weekday load differences, with average load on Mondays and Fridays approximately 15% lower than Tuesdays through Thursdays. The third level of decomposition captured short-term fluctuations, showing two load peaks daily between 10:00 AM and 11:00 AM and between 3:00 PM and 4:00 PM. The fourth level of decomposition showed noise component amplitudes fluctuating around 5%. Memory utilization data decomposition showed a more stable pattern, with the first level trend being relatively flat and fluctuations within 10%. The second level's periodicity was less pronounced than CPU utilization, but weekday and weekend differences were still observable.
[0026] This invention achieves accurate extraction and characterization of load features at different time scales through multi-scale decomposition analysis of workload data in cloud computing environments, improving the accuracy and stability of workload prediction. The method of adaptively determining the number of decomposition layers based on frequency domain analysis avoids the subjectivity introduced by manually setting parameters, making the decomposition results more objectively reflect the characteristics of the data itself. The recursive decomposition strategy effectively separates different frequency components, ensuring the independence and integrity of features at each layer, providing comprehensive and reliable feature support for subsequent load prediction and resource allocation.
[0027] Perform time-domain prediction on the multi-level decomposition features, calculate the correlation metric between the time-domain prediction results of each level and historical workload data, and weight and combine the time-domain prediction results of each level based on the correlation metric to generate workload prediction values, including: The multi-level decomposition features are reconstructed into a predicted feature sequence according to the time series. The workload change at adjacent time points in the predicted feature sequence is calculated, and a state transition matrix is constructed based on the workload change. The workload change trend is calculated based on the state transition matrix. The workload change trend is used as a prediction constraint. State prediction is performed on each feature in the multi-layer decomposition feature to obtain multiple sets of prediction sequences. The multiple sets of prediction sequences are combined to generate a time-domain prediction result. Calculate the mutual information value between the time-domain prediction result and the historical workload data, and normalize the mutual information value to obtain the correlation metric value. The correlation metric is used to construct a combined weight. The combined weight is iteratively optimized to minimize the deviation between the time-domain prediction result and the historical workload data. The optimized combined weight is then weighted and combined with the time-domain prediction result to generate the workload prediction value.
[0028] The multi-layer decomposition features are reconstructed into a predictive feature sequence in chronological order. Specifically, feature vectors are formed by combining the feature values of each layer at the same time point and arranged in chronological order to form a feature sequence. In the predictive feature sequence, the workload change between adjacent time points is calculated. Taking CPU utilization as an example, if the utilization rate at time t is 65% and at time t+1 it is 68%, the change is 3%. All changes between adjacent time points are collected to construct a state transition matrix. The rows and columns of the state transition matrix represent the current state and the next state, respectively, and the matrix element values represent the probability of transitioning from one state to another. Uniform binning is used for state partitioning, dividing the workload change range into 20 intervals, each interval corresponding to a state in the matrix.
[0029] The workload variation trend is calculated based on the constructed state transition matrix, and the trend is determined by analyzing the main transition paths in the matrix. State transition paths with a probability value greater than 0.1 are extracted from the matrix; these paths represent high-frequency workload variation patterns. For example, during weekdays, workload shows a trend of slow increase in the morning, peak at noon, and slow decrease in the afternoon; while during weekends, workload fluctuates at a lower level. These workload variation trends are used as prediction constraints to perform state prediction for each layer of features in the multi-level decomposition. The prediction process uses the Markov chain prediction method to predict the state at the next moment based on the current state and the state transition matrix. For the long-term trend layer, the prediction window is set to 48 time points (4 hours); for the periodic variation layer, the prediction window is set to 24 time points (2 hours); for the short-term fluctuation layer, the prediction window is set to 12 time points (1 hour); and for the random noise layer, the prediction window is set to 6 time points (30 minutes). Four prediction sequences are obtained, corresponding to the feature prediction results of the four layers. These four prediction sequences are combined to generate a time-domain prediction result by directly superimposing the prediction values of each layer.
[0030] The mutual information value between the time-domain prediction results and historical workload data is calculated to assess the correlation between the prediction results and the actual data. The mutual information calculation employs the kernel density estimation method, estimating the probability distributions for both the prediction results and historical data, and then calculating the log ratio of the joint distribution to the marginal distribution. The calculated mutual information value reflects the statistical dependence between the prediction results and historical data; a higher mutual information value indicates a stronger correlation. The mutual information values are normalized to obtain a correlation metric. The results show that the correlation metric is 0.45 for the long-term trend layer, 0.35 for the periodic variation layer, 0.15 for the short-term fluctuation layer, and 0.05 for the random noise layer. This indicates that long-term trends and periodic variations contribute significantly to workload prediction, while the impact of random noise is relatively small.
[0031] A combined weighting system is constructed using correlation metrics, with the initial weights set to the correlation metrics. The combined weighting is iteratively optimized to minimize the deviation between the time-domain prediction and historical workload data. The optimization algorithm employs gradient descent, with mean squared error as the objective function, a learning rate of 0.01, a maximum of 100 iterations, and a convergence threshold of 0.001. After iterative optimization, the optimal combined weighting is: 0.48 for the long-term trend layer, 0.38 for the periodic variation layer, 0.12 for the short-term fluctuation layer, and 0.02 for the random noise layer. The optimized combined weighting is then weighted and combined with the time-domain prediction results to generate the final workload prediction. For each future time point, the predicted values of the four layers are multiplied by their corresponding weight coefficients and then summed to obtain the workload prediction for that time point.
[0032] To verify the prediction performance, a validation workload dataset was used for testing. The validation dataset contains 1728 data points, corresponding to six consecutive days of workload data. The same multi-level decomposition and time-domain prediction process was performed on the validation dataset, and the error between the predicted and actual values was calculated. During normal working hours on weekdays, the average prediction error was 3.2%, with a maximum error of 7.5%; during non-working hours on weekdays, the average prediction error was 2.1%, with a maximum error of 5.2%; and during weekends, the average prediction error was 2.8%, with a maximum error of 6.3%. Overall, the prediction results can reflect the changing trends of workload well, especially in capturing periodic fluctuations and sudden increases in workload.
[0033] By analyzing resource demand based on comprehensive predictions of multiple indicators such as CPU utilization, memory usage, and network traffic, a basis for resource allocation decisions in cloud computing environments can be provided. Based on the prediction results, computing resources are pre-allocated 30 minutes before the load peak and excess resources are released 15 minutes after the load decreases, achieving dynamic optimization of resource utilization.
[0034] This invention achieves high-precision prediction of workloads in cloud computing environments through time-domain prediction and weighted combination of multi-layer decomposition features. Based on capturing workload variation patterns using a state transition matrix, and combining mutual information to evaluate the correlation between prediction results and actual data, an adaptive weight optimization combination strategy is used to comprehensively consider the workload variation characteristics at different time scales. It can effectively identify long-term trends, cyclical fluctuations, and short-term mutations, exhibiting strong adaptability and high prediction accuracy. This reduces the blindness and lag in resource allocation, improves resource utilization and service quality in cloud computing environments, reduces energy consumption and operating costs, and provides effective technical support for intelligent resource management in cloud computing environments.
[0035] like Figure 2 As shown, the fluctuation metric of the workload forecast is calculated, and the mapping relationship between workload and resources is adjusted based on the fluctuation metric to convert the workload forecast into a resource demand range, including: Calculate the magnitude of change in the predicted workload value within a time window, identify fluctuation points based on the magnitude of change, and classify the fluctuation points to generate a fluctuation point sequence. Calculate the volatility intensity of each volatility point in the volatility point sequence, and convert the volatility intensity into a volatility metric. A resource allocation boundary is constructed based on the fluctuation metric. The resource allocation boundary is then divided into multiple sub-intervals. A corresponding resource allocation ratio is set for each sub-interval, and a resource allocation strategy table is generated. The predicted workload value is mapped to the corresponding sub-interval according to the fluctuation metric. The resource allocation ratio of the sub-interval is obtained from the resource allocation strategy table. The initial resource requirement is calculated based on the resource allocation ratio. Calculate the resource utilization level of the initial resource demand, adjust the initial resource demand according to the resource utilization level, and when the difference between the resource utilization levels after two adjacent adjustments is less than a preset level threshold, determine the resource demand range after the last adjustment.
[0036] The magnitude of change in workload forecasts within a time window is a crucial indicator of workload stability. A 30-minute time window is used, with data points collected every 5 minutes, totaling 6 data points per window. The difference between adjacent data points within the time window is calculated to obtain a change sequence. If the change value at any point in the change sequence exceeds a preset threshold, it is marked as a fluctuation point. The preset threshold is determined based on the standard deviation of historical workloads and is set to 1.5 times the standard deviation. For CPU utilization, if the standard deviation is 5%, the preset threshold is 7.5%. Fluctuations are categorized into rising and falling fluctuation points based on their direction of change. A positive change value is marked as a rising fluctuation point; a negative change value is marked as a falling fluctuation point. The identified fluctuation points are arranged chronologically to generate a fluctuation point sequence. In this embodiment, analysis of CPU utilization forecasts over a continuous 6-hour period identified 23 fluctuation points, including 12 rising fluctuation points and 11 falling fluctuation points.
[0037] The volatility intensity of each volatility point in the volatility point sequence is calculated as the ratio of the change value of the volatility point to a preset threshold. If the change value of a volatility point is 9% and the preset threshold is 7.5%, then the volatility intensity of that volatility point is 1.2. Volatility intensity reflects the severity of workload changes. The volatility intensity is converted into a volatility metric, which comprehensively considers the number and intensity of volatility points within a time window. For each time window, the average volatility intensity of all volatility points within the window is calculated, and this average is multiplied by the ratio of the number of volatility points to the total number of data points in the window to obtain the volatility metric. A higher volatility metric value indicates more severe workload fluctuations and a greater demand for elastic resource allocation. For example, if two volatility points are identified within a time window, with volatility intensities of 1.2 and 1.3 respectively, then the volatility metric for that window is 0.42.
[0038] Resource allocation boundaries are constructed based on volatility metrics, defining the upper and lower limits of how workload forecasts are mapped to resource demands. The boundary interval for volatility metrics is set to [0, 2], which is then divided into four sub-intervals: [0, 0.5], [0.5, 1.0], [1.0, 1.5], and [1.5, 2.0]. A corresponding resource allocation ratio is assigned to each sub-interval, forming a resource allocation strategy table. The resource allocation ratio corresponding to the sub-interval [0, 0.5] is 100%~110% of the predicted value, indicating that the workload is relatively stable and the resource demand fluctuates little; the resource allocation ratio corresponding to the sub-interval [0.5, 1.0] is 110%~125% of the predicted value, indicating that the workload fluctuates moderately and some buffer resources need to be reserved; the resource allocation ratio corresponding to the sub-interval [1.0, 1.5] is 125%~150% of the predicted value, indicating that the workload fluctuates greatly and sufficient buffer resources need to be reserved; the resource allocation ratio corresponding to the sub-interval [1.5, 2.0] is 150%~200% of the predicted value, indicating that the workload fluctuates drastically and a large amount of buffer resources need to be reserved to cope with sudden load.
[0039] If the predicted CPU utilization at a certain point in time is 60%, with a fluctuation metric of 0.8, corresponding to the sub-interval [0.5, 1.0], the resource allocation ratio is 110%~125%. Using linear interpolation, the specific resource allocation ratio is determined, resulting in a calculated resource allocation ratio of 120%. Predicted value × resource allocation ratio = initial resource requirement. For CPU resources, the initial requirement is 72%, meaning 72% of CPU computing power needs to be allocated. For memory resources, if the predicted value is 4GB, the fluctuation metric is 0.6, and the resource allocation ratio is 115%, then the initial requirement is 4.6GB.
[0040] The resource utilization level is calculated based on the initial resource demand. Resource utilization level is defined as the ratio of actual workload to allocated resources. Historical data analysis shows that a resource utilization level between 65% and 85% ensures both service quality and high resource utilization. If the resource utilization level corresponding to the initial resource demand is outside this range, adjustments are necessary. When the resource utilization level is below 65%, resource allocation is reduced; when it is above 85%, resource allocation is increased. Each adjustment increment is 5%. After adjustment, the resource utilization level is recalculated. Adjustment stops when the difference between two consecutive adjustments is less than a preset threshold. The preset threshold is set to 2%. The resource demand after the last adjustment is determined as the final resource demand range. For example, at a certain point in time, the initial CPU demand is 72%, corresponding to a resource utilization level of 83%, which is within the target range and requires no adjustment. At the same time, the initial memory demand is 4.6GB, corresponding to a resource utilization level of 92%, exceeding the target range and requiring additional resource allocation. The adjusted demand is 4.83GB, corresponding to a resource utilization level of 87%, still exceeding the target range. The further adjusted demand is 5.07GB, corresponding to a resource utilization level of 83%, within the target range, and the difference from the previous adjustment is 4%, greater than a preset threshold. The final adjusted demand is 5.32GB, corresponding to a resource utilization level of 79%, within the target range, and the difference from the previous adjustment is 4%, greater than a preset threshold. The threshold was adjusted, and the demand was 5.59GB, corresponding to a resource utilization level of 75%, which is within the target range and the difference from the previous adjustment is 4%, which is greater than the preset threshold. The final adjusted demand was 5.87GB, corresponding to a resource utilization level of 72%, which is within the target range and the difference from the previous adjustment is 3%, which is greater than the preset threshold. The final adjusted demand was 6.16GB, corresponding to a resource utilization level of 68%, which is within the target range and the difference from the previous adjustment is 4%, which is greater than the preset threshold. The final adjusted demand was 6.16GB, corresponding to a resource utilization level of 68%, and the difference from the previous adjustment is 0%, which is less than the preset threshold. Therefore, the final resource demand was determined to be 6.16GB.
[0041] This invention achieves a precise mapping from predicted workload to resource demand range through a resource demand transformation mechanism driven by fluctuation metrics. Based on the fluctuation characteristics of predicted workload, it adaptively adjusts resource allocation strategies, fully considering the impact of load fluctuations on resource demand in the cloud computing environment. Through fluctuation point identification and fluctuation metric calculation, it accurately captures workload change trends; through multi-level resource allocation ratio settings, it flexibly responds to resource demands under different fluctuation levels; and through iterative optimization of resource utilization levels, it balances resource utilization and service quality. It can dynamically adjust resource configuration according to real-time changes in load fluctuations, avoiding resource waste or service quality degradation caused by static resource allocation, and improving resource utilization efficiency and service reliability in the cloud computing environment.
[0042] Obtain current resource status data for multiple compute nodes, compare the resource demand range with the current resource status data, and calculate the resource deviation of multiple compute nodes, including: Collect resource usage information from multiple computing nodes, calculate the allocable and occupied resources based on the resource usage information, and generate current resource status data; The current resource status data is standardized according to the total resources of the computing nodes to generate a resource distribution matrix; Map the resource demand range to the resource distribution matrix, and calculate the resource difference between each computing node in the resource distribution matrix and the resource demand range; The resource difference is weighted to obtain the resource allocation weight. A resource distribution vector is generated based on the resource allocation weight. The weight difference of each calculation node in the resource distribution vector is used as the resource deviation.
[0043] In a cloud computing environment, it is necessary to periodically collect resource usage data from multiple computing nodes to obtain current resource status data. The collection cycle is set to 5 minutes, with each collection session lasting no more than 10 seconds to ensure the real-time nature and accuracy of the data. The collected resource metrics include key performance indicators such as CPU utilization, memory usage, disk I / O speed, and network bandwidth usage. The collection method employs an agent program, deploying a lightweight monitoring agent on each computing node to read the hardware resource usage of the computing nodes. For example, in a cluster environment with 8 computing nodes, each node is configured with a 32-core CPU, 128GB of memory, 2TB of storage space, and 10Gbps network bandwidth. The raw data collected shows that node 1 has a CPU utilization of 68%, 87GB of memory usage, 120MB / s disk I / O speed, and 3.2Gbps network bandwidth usage; node 2 has a CPU utilization of 45%, 62GB of memory usage, 80MB / s disk I / O speed, and 1.8Gbps network bandwidth usage. Based on the collected resource usage data, the allocable and occupied resources for each node are calculated. Allocable resources equal the total resources minus the occupied resources. For node 1, the allocable CPU resources are 10.24 cores, allocable memory is 41GB, allocable disk I / O is 880MB / s, and allocable network bandwidth is 6.8Gbps. By integrating the resource usage data from all computing nodes, current resource status data is generated.
[0044] The current resource status data is standardized according to the total resources of the computing nodes to generate a resource distribution matrix. The purpose of standardization is to eliminate the dimensional differences between different resource types, allowing all types of resources to be compared on the same scale. The standardization method is to divide the occupied and allocable amounts of each type of resource by the total amount of the corresponding resource to obtain the resource utilization rate and resource allocability rate, with values ranging from 0 to 1. Taking node 1 as an example, the CPU utilization rate is 68%, and the CPU allocability rate is 32%; the memory utilization rate is 68%, and the memory allocability rate is 32%; the disk I / O utilization rate is 12%, and the disk I / O allocability rate is 88%; the network bandwidth utilization rate is 32%, and the network bandwidth allocability rate is 68%. The same standardization is performed on all computing nodes to form a resource distribution matrix. The rows of this matrix represent different computing nodes, and the columns represent the utilization rate and allocability rate of different resource types. The value of each element in the matrix is between 0 and 1, reflecting the resource usage status of the corresponding node.
[0045] The resource requirement range is the upper and lower limits of resource requirements determined based on workload forecasts and volatility metrics. Assuming resources need to be allocated for a new workload, the resource requirement range is: CPU 4-6 cores, memory 16-20GB, disk I / O 200-300MB / s, and network bandwidth 1-2Gbps. Converting the resource requirement range to a standardized form involves dividing the requirement value by the total resources of a single node. For the above node specifications, the standardized resource requirement range is: CPU 0.125-0.188, memory 0.125-0.156, disk I / O 0.2-0.3, and network bandwidth 0.1-0.2. Calculate the difference between the resource allocability rate of each node and the standardized resource requirement; the smaller the difference, the closer the allocable resources of that node are to the requirement. For node 1, the CPU resource difference is 0.32-0.125=0.195 or 0.32-0.188=0.132, taking the smaller value of 0.132; the memory resource difference is 0.32-0.125=0.195 or 0.32-0.156=0.164, taking the smaller value of 0.164; the disk I / O difference and network bandwidth difference are calculated in the same way.
[0046] The resource allocation weights are calculated by weighting the resource differences, taking into account both the resource difference and the importance of the resource type. The importance of resource type is set according to workload characteristics: for compute-intensive workloads, CPU weight is set to 0.5, memory weight to 0.3, disk I / O weight to 0.1, and network bandwidth weight to 0.1; for memory-intensive workloads, the weights are 0.3, 0.5, 0.1, and 0.1 respectively; for I / O-intensive workloads, the weights are 0.2, 0.2, 0.4, and 0.2 respectively; and for network-intensive workloads, the weights are 0.2, 0.2, 0.1, and 0.5 respectively. Assuming the current workload is compute-intensive, the weighted resource difference for node 1 is 0.132×0.5 + 0.164×0.3 + 0.58×0.1 + 0.48×0.1 = 0.234. Similarly, the weighted resource differences for other nodes are calculated, resulting in a weighted resource difference of 0.182 for node 2, 0.285 for node 3, 0.215 for node 4, 0.193 for node 5, 0.267 for node 6, 0.176 for node 7, and 0.305 for node 8. These weighted resource differences are then converted into resource allocation weights by taking the reciprocal of the difference and normalizing it. The calculated resource allocation weights are: 0.123 for node 1, 0.159 for node 2, 0.101 for node 3, 0.134 for node 4, 0.149 for node 5, 0.108 for node 6, 0.164 for node 7, and 0.095 for node 8.
[0047] A resource distribution vector is generated based on resource allocation weights, representing the workload distribution ratio across nodes. The weight difference between each computing node in the resource distribution vector is used as the resource deviation; a larger difference indicates a more uneven resource distribution. The weight difference is calculated as the ratio of the difference between the maximum and minimum weight values to the average weight value. In this embodiment, the maximum weight is 0.164, the minimum weight is 0.095, and the average weight is 0.125, resulting in a weight difference of 0.552, or a resource deviation of 0.552. The resource deviation is used to assess the degree of unevenness in cluster resource distribution, providing a basis for resource scheduling decisions. When the resource deviation exceeds a preset threshold (usually set to 0.4), a resource rebalancing mechanism is triggered to redistribute workloads to balance resource usage across nodes. The resource deviation is periodically calculated to monitor resource distribution. When the resource deviation is high, workloads are migrated from high-load nodes to low-load nodes to alleviate resource bottlenecks; when the resource deviation is low, workload consolidation can be attempted to reduce the number of active nodes and save energy.
[0048] This invention comprehensively reflects the uneven distribution of resources in a cloud computing environment, providing a reliable basis for dynamic resource scheduling decisions. Through the quantitative indicator of resource deviation, it can intuitively assess cluster resource utilization efficiency, promptly identify uneven resource allocation, and guide resource rebalancing operations. This invention is highly adaptable, dynamically adjusting the weight configuration of resource types according to the resource requirements of different workloads, thus improving the accuracy of resource allocation. In a cloud computing environment, it effectively improves resource utilization, reduces energy consumption, minimizes performance fluctuations caused by resource competition, enhances service quality stability, and provides technical support for the efficient operation of cloud computing platforms.
[0049] A resource scheduling graph between nodes is constructed based on resource load deviation. The optimal resource migration strategy is solved with minimizing the global load variance as the objective function, and resource allocation instructions are generated, including: The load distribution difference between computing nodes is obtained based on the resource load deviation, and resource output nodes and resource input nodes are identified based on the load distribution difference. Calculate the load drop between the resource output node and the resource input node, and construct a resource scheduling graph between nodes based on the load drop; Calculate the resource supply of the resource output node and the resource demand of the resource input node based on the resource scheduling diagram. Based on the resource supply and resource demand, a resource scheduling weight is generated between nodes, and a resource allocation sequence is constructed based on the resource scheduling weight. The resource allocation sequence represents the resource migration order between nodes. The resource migration path is determined based on the resource allocation sequence, the resource migration quantity is calculated by combining the resource supply and resource demand, and the resource migration path and the resource migration quantity are combined to generate a resource migration scheme. Calculate the global load variance of the resource migration scheme, and iteratively optimize the resource migration scheme based on the global load variance until the global load variance is minimized to obtain the optimal resource migration strategy. Resource allocation instructions are generated based on the optimal resource migration strategy, and these instructions are used to execute resource migration operations between computing nodes.
[0050] In obtaining the load distribution difference between compute nodes based on their resource load deviation, the current resource utilization of all compute nodes in the cluster is first obtained. Resource types include CPU, memory, storage, and network bandwidth. Resource utilization is calculated as the ratio of used resources to total resources, ranging from 0 to 1. For example, in a cluster environment with 10 compute nodes, each node is configured with 64 CPU cores, 256GB of memory, 4TB of storage, and 20Gbps network bandwidth. Resource utilization data shows: Node 1 has a CPU utilization of 0.85, memory utilization of 0.72, storage utilization of 0.45, and network bandwidth utilization of 0.38; Node 2 has a CPU utilization of 0.42, memory utilization of 0.35, storage utilization of 0.28, and network bandwidth utilization of 0.22. Weighting coefficients are assigned to each resource type to reflect the degree of influence of different resources on node load. Typically, CPU weight is 0.4, memory weight is 0.3, storage weight is 0.2, and network bandwidth weight is 0.1. The overall load value of each node is calculated using a weighted average. The overall load value of node 1 is 0.68, and the overall load value of node 2 is 0.36. The load distribution difference between all node pairs is calculated using the formula: the absolute value of the difference between the overall load values of the two nodes. The load distribution difference between node 1 and node 2 is 0.32. Resource output nodes and resource input nodes are identified based on a preset load difference threshold of 0.25. In this embodiment, the cluster average load is 0.53, so node 1 is identified as a resource output node, and node 2 is identified as a resource input node.
[0051] The load drop between resource output nodes and resource input nodes is calculated. The load drop represents the possible resource migration amount between the two types of nodes, calculated by subtracting the comprehensive load value of the resource input node from the comprehensive load value of the resource output node. When calculating the load drop, the physical distance or network latency between nodes is considered, and a distance attenuation factor is introduced to adjust the original load drop. Network latency can be obtained through periodic measurement; for example, the network latency between node 1 and node 2 is 5ms. The distance attenuation factor is calculated based on the network latency using the formula 1 / (1+0.02×latency value), resulting in a distance attenuation factor of 0.9. The adjusted load drop is 0.32×0.9=0.288. A resource scheduling graph between nodes is constructed based on the load drop matrix. This graph is a directed weighted graph, where nodes represent computing nodes, and directed edges represent possible resource migration paths. The weight of each edge is the corresponding load drop value. Directed edges are only established between node pairs with a load drop greater than zero, and the direction of the edges is from the resource output node to the resource input node.
[0052] The resource supply for resource output nodes and the resource demand for resource input nodes are calculated based on the resource scheduling graph. Resource supply represents the amount of resources that a resource output node can release, calculated as (current load value of the node - target load threshold) × total resources of the node. Resource demand represents the amount of resources that a resource input node can receive, calculated as (target load threshold - current load value of the node) × total resources of the node. The target load threshold is typically set as the cluster average load value, which is 0.53 in this embodiment. For node 1, the resource supply is (0.68 - 0.53) × 64 = 9.6 CPU cores, (0.68 - 0.53) × 256 = 38.4 GB memory, (0.68 - 0.53) × 4 = 0.6 TB storage, and (0.68 - 0.53) × 20 = 3 Gbps network bandwidth. For node 2, the resource requirements are (0.53-0.36)×64=10.88 CPU cores, (0.53-0.36)×256=43.52GB memory, (0.53-0.36)×4=0.68TB storage, and (0.53-0.36)×20=3.4Gbps network bandwidth. The sum of the resource supply of all resource output nodes should be greater than or equal to the sum of the resource requirements of all resource input nodes to ensure the feasibility of resource scheduling.
[0053] Resource scheduling weights are generated between nodes based on resource supply and demand. These weights reflect the priority of resource migration between different node pairs and are calculated as load drop value ÷ distance attenuation factor between the two nodes. For node 1 and node 2, the resource scheduling weight is 0.288 ÷ 0.9 = 0.32. Resource scheduling weights are calculated for all feasible resource migration paths and sorted in descending order of weight to form a resource allocation sequence. The resource allocation sequence represents the order of resource migration between nodes; node pairs with higher weights are migrated more preferentially. Specific resource migration paths are determined based on the sorted resource allocation sequence. Each migration path includes two endpoints: a source node and a target node, and a directed connection between them. Combining the previously calculated resource supply and demand, the number of resource migrations on each path is calculated. The number of migrations does not exceed the smaller of the resource supply of the source node and the resource demand of the target node to ensure the rationality of resource migration. The resource migration paths and the number of resource migrations are combined to generate an initial resource migration plan.
[0054] The global load variance of the resource migration scheme is calculated. The global load variance is the average of the squared differences between the load values of all nodes and the average load of the cluster. A smaller load variance indicates a more balanced distribution of cluster resources. After the initial resource migration scheme is implemented, new node load values and the global load variance are calculated. If the global load variance does not reach the minimum target, iterative optimization is performed by adjusting the resource migration path or the number of migrations. During the iteration process, a new resource migration scheme is generated each time, and the corresponding global load variance is calculated until the variance no longer decreases significantly or the preset maximum number of iterations is reached. The final resource migration scheme obtained is the optimal resource migration strategy with the minimum global load variance. Detailed resource allocation instructions are generated based on the optimal resource migration strategy, including source node identifier, target node identifier, type and quantity of migrated resources, migration execution time, etc. The resource allocation instructions are sent to the relevant computing nodes through the management interface to execute the actual resource migration operation. During the resource migration process, the migration progress and node status are monitored to ensure the safety and reliability of the migration operation. After the migration is completed, the resource usage and load status of each node are updated to provide data support for the next round of resource scheduling decisions.
[0055] This invention achieves dynamic optimization of computing resource allocation in a cloud computing environment by constructing a resource scheduling graph between nodes and minimizing the global load variance as the objective function. By accurately calculating the load difference between nodes to determine the resource migration path and quantity, it effectively solves the problem of uneven resource allocation. Considering the physical distance between nodes and network latency factors, it reduces the performance overhead of resource migration. Through iterative optimization of the resource migration strategy, it ensures that global resource utilization reaches its optimal state, reduces resource contention and performance bottlenecks, improves application response speed and service quality, and simultaneously reduces energy consumption and operational costs.
[0056] Adjusting computing resource quotas for computing nodes and migrating corresponding workloads based on resource allocation instructions to achieve dynamic optimization of resource allocation includes: Parse resource allocation instructions and extract resource quota adjustment data and workload migration data; The resource quota adjustment data is decomposed into resource increment values and resource decrement values. A resource quota adjustment sequence is generated based on the resource increment values and resource decrement values. The resource quota adjustment sequence represents the resource quota adjustment process of the computing node. Based on the workload migration data, identify the workloads to be migrated, obtain the resource usage data of the workloads to be migrated, and construct a workload resource dependency graph based on the resource usage data; The workload migration priority is calculated based on the workload resource dependency graph, and a workload migration sequence is generated according to the workload migration priority. The workload migration sequence represents the migration order of the workload. Calculate the resource release time series based on the workload migration sequence, and combine the resource release time series with the resource quota adjustment sequence to generate a dynamic resource optimization scheme. The dynamic resource optimization scheme includes the adjustment time point and adjustment value of the computing node resource quota. The resource quota of the computing node is adjusted according to the resource dynamic optimization scheme, the workload migration is performed according to the workload migration sequence, the resource change data during the resource quota adjustment process and the migration completion status during the workload migration process are recorded, and the resource dynamic optimization allocation result is generated.
[0057] The resource allocation instruction contains key information such as source node identifier, target node identifier, resource type, amount of resources to be migrated, and execution time. The resource allocation instruction is in JSON format, where the source node is "node-001", the target node is "node-002", the resource types to be migrated include CPU, memory, storage, and network bandwidth, the amount of resources to be migrated is 8-core CPU, 32GB memory, 500GB storage, and 2Gbps network bandwidth, and the execution time is "2025-01-10 14:30:00". When parsing the resource allocation instruction, a JSON parser is used to extract the values of each field, forming resource quota adjustment data and workload migration data. The resource quota adjustment data contains specific resource addition and reduction information, and the workload migration data contains the identifier of the workload to be migrated and its target location.
[0058] For the source node "node-001", the resource reduction is 8 CPU cores, 32GB memory, 500GB storage, and 2Gbps network bandwidth; for the target node "node-002", the resource increment is the same as the resource reduction of the source node. A resource quota adjustment sequence is generated based on the resource increment and decrement values. This sequence records the execution time and specific adjustment value of each resource adjustment operation in a timeline format. The resource quota adjustment sequence contains multiple adjustment items, each including a node identifier, resource type, adjustment value, and execution time. On the source node "node-001", CPU resources will be reduced by 8 cores, execution time "2025-01-10 14:35:00"; memory resources will be reduced by 32GB, execution time "2025-01-10 14:38:00"; storage resources will be reduced by 500GB, execution time "2025-01-10 14:40:00"; network bandwidth will be reduced by 2Gbps, execution time "2025-01-10 14:42:00". On the target node "node-002", the resource increase time is slightly later than the resource reduction time of the source node to ensure the safety of resource adjustment.
[0059] The workload to be migrated is identified as "workload-123" and resides on the source node "node-001". Resource usage data for this workload is obtained, including 6 CPU cores, 24GB memory, 400GB storage, and 1.5Gbps network bandwidth. A workload resource dependency graph is constructed based on this data, showing the resource dependencies between the components within the workload. "workload-123" consists of three components: a compute component "comp-1", a storage component "comp-2", and a communication component "comp-3". The compute component depends on the data provided by the storage component, and the storage component depends on the network connection provided by the communication component. The workload resource dependency graph is represented as a directed graph, where nodes represent components and edges represent dependencies between components. The direction of the edges points from the dependent component to the dependent component, and the weight indicates the degree of dependency.
[0060] The method for calculating workload migration priority considers component dependency depth, resource consumption, and migration complexity. Components with deeper dependencies have higher migration priority; components with higher resource consumption have lower migration priority; and components with higher migration complexity have lower migration priority. The calculated component migration priorities are as follows: communication component "comp-3" has a migration priority of 0.85, storage component "comp-2" has a migration priority of 0.62, and computing component "comp-1" has a migration priority of 0.43. A workload migration sequence is generated based on the migration priority from highest to lowest: "comp-3" → "comp-2" → "comp-1". This workload migration sequence represents the migration order of workload components, ensuring that dependencies are not broken and reducing the risk of service interruption during the migration process.
[0061] After each component migration is complete, its occupied resources will be released. The communication component "comp-3" was migrated at "2025-01-10 14:33:00", releasing 1.5Gbps of network bandwidth resources; the storage component "comp-2" was migrated at "2025-01-10 14:36:00", releasing 400GB of storage resources; and the computing component "comp-1" was migrated at "2025-01-10 14:39:00", releasing 6 CPU cores and 24GB of memory resources. The resource release time series is combined with the resource quota adjustment series to generate a dynamic resource optimization scheme. This scheme records all resource adjustment operations, including resource release and resource quota adjustment, in chronological order. The dynamic resource optimization scheme ensures that resource quota adjustment operations are executed after the corresponding resources are released, avoiding resource conflicts and service interruptions.
[0062] When adjusting resource quotas for compute nodes, sufficient resource space is first reserved on the target node "node-002". Then, workload components are migrated sequentially according to the workload migration sequence. The specific migration process is as follows: The communication component "comp-3" is paused on the source node "node-001", its status data is saved and transmitted to the target node "node-002", and service is resumed on the target node. Next, the storage component "comp-2" and the compute component "comp-1" are migrated in the same manner. After the migration is complete, the resource quotas of the source and target nodes are adjusted. The resource quota of the source node "node-001" is reduced by the corresponding amount, and the resource quota of the target node "node-002" is increased by the corresponding amount. Resource changes during the resource quota adjustment process and the migration completion status during the workload migration process are recorded to generate dynamic resource allocation optimization results. The results show that the workload "workload-123" was successfully migrated to the target node "node-002". The resource load of the source node "node-001" decreased from 0.68 to 0.53, while the resource load of the target node "node-002" increased from 0.36 to 0.51, resulting in a more balanced distribution of resources across the cluster.
[0063] This invention employs a dynamic resource optimization allocation technology, achieving precise coordination between computing resource allocation and workload migration in a cloud computing environment. By deeply analyzing the dependencies between components within the workload and determining the optimal migration sequence, it significantly reduces service interruption risks and migration costs. The time-coordinated mechanism between resource quota adjustment and workload migration ensures a smooth transition in the resource allocation process. This invention effectively improves resource utilization in cloud computing environments, enhances load distribution balance, reduces resource contention and performance bottlenecks, and improves application response speed and service quality.
[0064] The present invention provides a dynamic workload prediction and resource allocation system for a cloud computing environment, the system comprising: The workload decomposition module is used to acquire historical workload data from multiple computing nodes in a cloud computing environment, perform frequency domain transformation on the historical workload data, determine the number of decomposition layers based on the energy proportion of frequency components in the frequency domain transformation result, and perform multi-scale decomposition on the historical workload data to obtain multi-layer decomposition features. The prediction combination module is used to perform temporal prediction on multi-layer decomposition features, calculate the correlation metric between the temporal prediction results of each layer and historical workload data, and perform weighted combination of the temporal prediction results of each layer based on the correlation metric to generate workload prediction values. The resource mapping module is used to calculate the fluctuation measure of the workload forecast, adjust the mapping relationship between the workload and resources based on the fluctuation measure, and convert the workload forecast into the range of resource requirements. The status comparison module is used to obtain the current resource status data of multiple computing nodes, compare the resource demand range with the current resource status data, and calculate the resource deviation of multiple computing nodes. The migration strategy module is used to construct a resource scheduling graph between nodes based on resource load deviation, solve for the optimal resource migration strategy with the objective function of minimizing global load variance, and generate resource allocation instructions. The resource adjustment module is used to adjust the computing resource quotas of computing nodes and migrate the corresponding workloads based on resource allocation instructions, so as to realize dynamic optimization of resource allocation.
[0065] One technical solution provided in this embodiment of the invention is an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in any of the aforementioned methods.
[0066] One technical solution provided in this embodiment of the invention is a computer-readable storage medium storing a computer program, wherein the processor executes the computer program to implement the steps in any of the aforementioned methods.
[0067] The specific embodiments described above are preferred embodiments of the present invention and are not intended to limit the specific scope of the present invention. The scope of the present invention includes, but is not limited to, these specific embodiments. All equivalent changes made in accordance with the shape and structure of the present invention are within the protection scope of the present invention.
Claims
1. A method for dynamic workload prediction and resource allocation in a cloud computing environment, characterized in that, Includes the following steps: Historical workload data from multiple computing nodes in a cloud computing environment is obtained. Frequency domain transformation is performed on the historical workload data. The number of decomposition layers is determined based on the energy proportion of frequency components in the frequency domain transformation result. Multi-scale decomposition of the historical workload data is performed to obtain multi-level decomposition features. Perform temporal prediction on the multi-layer decomposition features, calculate the correlation metric between the temporal prediction results of each layer and the historical workload data, and weight and combine the temporal prediction results of each layer according to the correlation metric to generate the workload prediction value. Calculate the fluctuation measure of the workload forecast, adjust the mapping relationship between the load and resources based on the fluctuation measure, and convert the workload forecast into a range of resource requirements. Obtain the current resource status data of multiple computing nodes, compare the resource demand range with the current resource status data, and calculate the resource deviation of multiple computing nodes; A resource scheduling graph between nodes is constructed based on the resource load deviation. The optimal resource migration strategy is solved with the goal of minimizing the global load variance, and resource allocation instructions are generated. Based on resource allocation instructions, the computing resource quotas of computing nodes are adjusted and the corresponding workloads are migrated to achieve dynamic optimization of resource allocation.
2. The method according to claim 1, characterized in that, Historical workload data from multiple computing nodes in a cloud computing environment is acquired. Frequency domain transformation is performed on the historical workload data. The number of decomposition levels is determined based on the energy proportion of frequency components in the frequency domain transformation result. Multi-scale decomposition of the historical workload data yields multi-level decomposition features, including: Acquire historical workload data of multiple computing nodes in a cloud computing environment within a specified time interval, and divide the historical workload data into training workload data and validation workload data. Perform frequency domain transformation on the training workload data to generate frequency component data, calculate the energy contribution of each frequency component in the frequency component data, and generate the energy proportion of the frequency component based on the energy contribution. A density distribution curve is constructed based on the energy proportion of the frequency components. The position of the peak point is detected on the density distribution curve. The energy proportion interval is divided according to the position of the peak point. The number of the energy proportion intervals is used as the number of decomposition layers. The frequency component data is divided into multiple frequency bands according to the number of decomposition layers. The frequency with the largest amplitude in each frequency band is extracted as the dominant frequency, and a decomposition basis vector is generated based on the dominant frequency. The historical workload data is recursively decomposed using the decomposition basis vectors to obtain recursive decomposition coefficients. Based on the recursive decomposition coefficients, a feature representation of the historical workload data at each decomposition level is constructed. The feature representations are then combined according to the decomposition level to generate multi-level decomposition features.
3. The method according to claim 1, characterized in that, Perform time-domain prediction on the multi-level decomposition features, calculate the correlation metric between the time-domain prediction results of each level and historical workload data, and weight and combine the time-domain prediction results of each level based on the correlation metric to generate workload prediction values, including: The multi-level decomposition features are reconstructed into a predicted feature sequence according to the time series. The workload change at adjacent time points in the predicted feature sequence is calculated, and a state transition matrix is constructed based on the workload change. The workload change trend is calculated based on the state transition matrix. The workload change trend is used as a prediction constraint. State prediction is performed on each feature in the multi-layer decomposition feature to obtain multiple sets of prediction sequences. The multiple sets of prediction sequences are combined to generate a time-domain prediction result. Calculate the mutual information value between the time-domain prediction result and the historical workload data, and normalize the mutual information value to obtain the correlation metric value. The correlation metric is used to construct a combined weight. The combined weight is iteratively optimized to minimize the deviation between the time-domain prediction result and the historical workload data. The optimized combined weight is then weighted and combined with the time-domain prediction result to generate the workload prediction value.
4. The method according to claim 1, characterized in that, Calculate the volatility metric of the workload forecast, adjust the mapping between workload and resources based on the volatility metric, and convert the workload forecast into a resource demand range including: Calculate the magnitude of change in the predicted workload value within a time window, identify fluctuation points based on the magnitude of change, and classify the fluctuation points to generate a fluctuation point sequence. Calculate the volatility intensity of each volatility point in the volatility point sequence, and convert the volatility intensity into a volatility metric. A resource allocation boundary is constructed based on the fluctuation metric. The resource allocation boundary is then divided into multiple sub-intervals. A corresponding resource allocation ratio is set for each sub-interval, and a resource allocation strategy table is generated. The predicted workload value is mapped to the corresponding sub-interval according to the fluctuation metric. The resource allocation ratio of the sub-interval is obtained from the resource allocation strategy table. The initial resource requirement is calculated based on the resource allocation ratio. Calculate the resource utilization level of the initial resource demand, adjust the initial resource demand according to the resource utilization level, and when the difference between the resource utilization levels after two adjacent adjustments is less than a preset level threshold, determine the resource demand range after the last adjustment.
5. The method according to claim 1, characterized in that, Obtain current resource status data for multiple compute nodes, compare the resource demand range with the current resource status data, and calculate the resource deviation of multiple compute nodes, including: Collect resource usage information from multiple computing nodes, calculate the allocable and occupied resources based on the resource usage information, and generate current resource status data; The current resource status data is standardized according to the total resources of the computing nodes to generate a resource distribution matrix; Map the resource demand range to the resource distribution matrix, and calculate the resource difference between each computing node in the resource distribution matrix and the resource demand range; The resource difference is weighted to obtain the resource allocation weight. A resource distribution vector is generated based on the resource allocation weight. The weight difference of each calculation node in the resource distribution vector is used as the resource deviation.
6. The method according to claim 1, characterized in that, A resource scheduling graph between nodes is constructed based on resource load deviation. The optimal resource migration strategy is solved with minimizing the global load variance as the objective function, and resource allocation instructions are generated, including: The load distribution difference between computing nodes is obtained based on the resource load deviation, and resource output nodes and resource input nodes are identified based on the load distribution difference. Calculate the load drop between the resource output node and the resource input node, and construct a resource scheduling graph between nodes based on the load drop; Calculate the resource supply of the resource output node and the resource demand of the resource input node based on the resource scheduling diagram. Based on the resource supply and resource demand, a resource scheduling weight is generated between nodes, and a resource allocation sequence is constructed based on the resource scheduling weight. The resource allocation sequence represents the resource migration order between nodes. The resource migration path is determined based on the resource allocation sequence, the resource migration quantity is calculated by combining the resource supply and resource demand, and the resource migration path and the resource migration quantity are combined to generate a resource migration scheme. Calculate the global load variance of the resource migration scheme, and iteratively optimize the resource migration scheme based on the global load variance until the global load variance is minimized to obtain the optimal resource migration strategy. Resource allocation instructions are generated based on the optimal resource migration strategy, and these instructions are used to execute resource migration operations between computing nodes.
7. The method according to claim 1, characterized in that, Adjusting computing resource quotas for computing nodes and migrating corresponding workloads based on resource allocation instructions to achieve dynamic optimization of resource allocation includes: Parse resource allocation instructions and extract resource quota adjustment data and workload migration data; The resource quota adjustment data is decomposed into resource increment values and resource decrement values. A resource quota adjustment sequence is generated based on the resource increment values and resource decrement values. The resource quota adjustment sequence represents the resource quota adjustment process of the computing node. Based on the workload migration data, identify the workloads to be migrated, obtain the resource usage data of the workloads to be migrated, and construct a workload resource dependency graph based on the resource usage data; The workload migration priority is calculated based on the workload resource dependency graph, and a workload migration sequence is generated according to the workload migration priority. The workload migration sequence represents the migration order of the workload. Calculate the resource release time series based on the workload migration sequence, and combine the resource release time series with the resource quota adjustment sequence to generate a dynamic resource optimization scheme. The dynamic resource optimization scheme includes the adjustment time point and adjustment value of the computing node resource quota. The resource quota of the computing node is adjusted according to the resource dynamic optimization scheme, the workload migration is performed according to the workload migration sequence, the resource change data during the resource quota adjustment process and the migration completion status during the workload migration process are recorded, and the resource dynamic optimization allocation result is generated.
8. A dynamic workload prediction and resource allocation system in a cloud computing environment, used to implement the method described in any one of claims 1-7, characterized in that, The system includes: The workload decomposition module is used to acquire historical workload data from multiple computing nodes in a cloud computing environment, perform frequency domain transformation on the historical workload data, determine the number of decomposition layers based on the energy proportion of frequency components in the frequency domain transformation result, and perform multi-scale decomposition on the historical workload data to obtain multi-layer decomposition features. The prediction combination module is used to perform temporal prediction on multi-layer decomposition features, calculate the correlation metric between the temporal prediction results of each layer and historical workload data, and perform weighted combination of the temporal prediction results of each layer based on the correlation metric to generate workload prediction values. The resource mapping module is used to calculate the fluctuation measure of the workload forecast, adjust the mapping relationship between the workload and resources based on the fluctuation measure, and convert the workload forecast into the range of resource requirements. The status comparison module is used to obtain the current resource status data of multiple computing nodes, compare the resource demand range with the current resource status data, and calculate the resource deviation of multiple computing nodes. The migration strategy module is used to construct a resource scheduling graph between nodes based on resource load deviation, solve for the optimal resource migration strategy with the objective function of minimizing global load variance, and generate resource allocation instructions. The resource adjustment module is used to adjust the computing resource quotas of computing nodes and migrate the corresponding workloads based on resource allocation instructions, so as to realize dynamic optimization of resource allocation.
9. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1 to 7.