Virtual machine resource dynamic allocation method based on load prediction

By combining ARIMA and GLS algorithms, accurate prediction of virtual machine load changes and dynamic allocation of resources are solved, and the problems of insufficient timing feature capture and inaccurate load prediction in the existing technology are solved, improving resource utilization efficiency and task stability.

CN119938221APending Publication Date: 2025-05-06SHANGHAI KANRONG INFORMATION TECH DEV CO LTD

Patent Information

Application Number
CN202411986160.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

The existing load balancing algorithms lack sufficient capture of timing features and lack accurate prediction of task load, resulting in inability to respond to load fluctuations in real time, which can easily lead to waste of resources or task delays.

Method used

The virtual machine load prediction and dynamic resource allocation method based on ARIMA and GLS algorithm is adopted. Through the steps of load data acquisition and feature extraction, time series modeling and prediction, dynamic scheduling and model update, accurate prediction of virtual machine load changes and dynamic allocation optimization of resources are achieved.

Benefits of technology

It realizes accurate prediction of virtual machine load changes, optimizes resource allocation, improves the efficiency and stability of geographic data processing and three-dimensional reconstruction tasks, and avoids resource waste and task delays.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938221A_ABST
    Figure CN119938221A_ABST
Patent Text Reader

Abstract

The invention discloses a virtual machine resource dynamic allocation method based on load prediction, and belongs to the technical field of data processing virtual machine resources. The method comprises the following steps: load data acquisition and feature extraction; modeling and predicting a time sequence; dynamic scheduling: adjusting resource allocation based on a prediction result; model updating: periodically updating ARIMA and GLS parameters; and outputting a virtual machine resource dynamic allocation scheme. According to the method, the ARIMA algorithm and the GLS algorithm are combined, the virtual machine load prediction and resource dynamic allocation method combining the ARIMA algorithm and the GLS algorithm can meet the requirement, time sequence characteristics are captured, and the task load can be accurately predicted. The ARIMA model is suitable for time sequence prediction, and the GLS can optimize heterovariance and autocorrelation problems. The method can be used for accurately predicting changes of loads (such as a CPU, a memory and an I / O utilization rate) of the virtual machine, dynamic allocation optimization of resources is achieved, and efficiency and stability of geographic data processing and three-dimensional reconstruction tasks are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data processing virtual machine resources, and in particular relates to a virtual machine load prediction and resource dynamic allocation method based on the combination of ARIMA and GLS algorithms. Background Art

[0002] In the processing of geographic information and real-scene 3D reconstruction data, the computing tasks have the following characteristics:

[0003] 1. Load dynamics: The load of data processing tasks fluctuates greatly, and the resource requirements (CPU, memory, video memory, network, disk I / O) of different virtual machines (Windows or other platforms) are time-dependent. Traditional static resource allocation methods cannot respond to load fluctuations in real time, which can easily cause resource waste or task delays. Although existing load balancing algorithms (such as AutoScaler) can dynamically adjust resources, they do not capture timing characteristics well and lack accurate prediction of task loads.

[0004] 2. Computational intensive: Such as point cloud processing for 3D reconstruction and distributed stitching of large-scale remote sensing images, which involve a large number of parallel computing tasks. If computing resources cannot be allocated dynamically, processing a large number of computing tasks will lead to performance bottlenecks and waste of resources.

[0005] 3. Distributed architecture: Distributed data processing requires coordination of multiple node (virtual machine) resources, and uneven load may lead to performance bottlenecks or resource waste.

[0006] However, traditional static resource allocation methods cannot respond to load fluctuations in real time, which can easily lead to resource waste or task delays. Although existing load balancing algorithms (such as AutoScaler) can dynamically adjust resources, they do not capture timing characteristics well and lack accurate prediction of task loads. Summary of the invention

[0007] In view of the problems existing in the above background technology that the existing load balancing algorithm is insufficient in capturing time series characteristics and lacks accurate prediction of task load, the present invention proposes a virtual machine load prediction and resource dynamic allocation method based on the combination of ARIMA and GLS algorithms. The present invention can accurately predict the load changes of virtual machines and realize dynamic allocation optimization of resources.

[0008] To this end, the present invention adopts the following technical solution: a method for dynamically allocating virtual machine resources based on load prediction, comprising the following steps:

[0009] Step 1: Load data collection and feature extraction;

[0010] Step 2: Time series modeling and forecasting;

[0011] Step 3: Dynamic scheduling: adjust resource allocation based on prediction results;

[0012] Step 4: Model update: Regularly update ARIMA and GLS parameters;

[0013] Step 5: Output the dynamic allocation plan for virtual machine resources.

[0014] As a supplement and improvement to the above technical solution, the present invention also includes the following technical features.

[0015] The specific steps of the load prediction method for dynamically allocating virtual machine resources are as follows:

[0016] Step 1: Load data collection and feature extraction

[0017] 1.1 Data Collection

[0018] Collect virtual machine load data in real time through Windows Exporter and send it to the prometheus server application container of the virtualization platform

[0019] 1.2 Time Series Construction

[0020] Prometheus server builds time series based on the collected key indicators and the time of collection: organizes the load data into time series according to time segments; defines the resource requirement weights of different tasks based on the resource characteristics of the tasks;

[0021] Step 2: Time Series Modeling and Forecasting

[0022] 2.1 Data Preprocessing

[0023] Stationarity test

[0024] Check the stationarity of time series data and determine whether the data contains unit roots; the test formula is as follows:

[0025]

[0026] Among them, the lag period p is selected by the information criterion; the stationarity of the sequence is judged by the p value of the ADF test. If the p value is less than the set significance level, the null hypothesis is rejected and the sequence is confirmed to be stationary;

[0027] Differential processing

[0028] By differentiating the time series, the trend or seasonal component is removed; the differenced series is expressed as:

[0029] Δy t =y t -y t-1

[0030] Feature Standardization

[0031] The feature standardization of time series data is performed, and the standardization formula is:

[0032]

[0033] Missing Value Handling

[0034] If there are missing values ​​in the monitoring data, linear interpolation or mean filling is used to fill the missing values;

[0035] 2.2 ARIMA model: load trend prediction

[0036] The ARIMA model is used for time series forecasting. The core is to fit a model composed of autoregression (AR), difference (I) and moving average (MA) based on time series data; determine the three parameters of the ARIMA model: autoregression term p, difference order d and moving average term q;

[0037]

[0038] 3) Model training:

[0039] Determine the autoregressive term p and autoregressive coefficient φ through autocorrelation function (ACF) analysis i ;

[0040] The difference order d is determined by performing a stationary test on the data. If the data is non-stationary, the difference processing is performed until the data is stationary.

[0041] The moving average term q and the moving average term coefficient θ are determined by partial autocorrelation function (PACF) analysis i ;

[0042] 4) Basic formula of ARIMA model:

[0043]

[0044] in:

[0045] Y t is the value of the time series; μ is a constant term; φ i is the coefficient of the autoregressive term; θ i is the coefficient of the moving average term; ∈ t is white noise or error term;

[0046] 3) Model fitting: The model fits the data by minimizing the sum of squared errors and determining the optimal φ and θ coefficients;

[0047] 4) Load trend forecast: Use the fitted ARIMA model to forecast the next n time steps. The formula is:

[0048]

[0049] in:

[0050] c) is the predicted value for the next h time steps;

[0051] d) The meanings of other symbols are the same as above;

[0052] 2.3GLS correction: optimizing prediction accuracy

[0053] Based on the ARIMA model, the generalized least squares (GLS) method is used to calibrate the model and optimize the prediction accuracy;

[0054] Residual analysis:

[0055] 3) Heteroskedasticity test: Check whether the variance of the residuals changes over time through the Breusch-Pagan test; if heteroskedasticity exists, GLS will use weighted residuals for optimization;

[0056] 4) Autocorrelation test: Use the Durbin-Watson test to check whether the residuals have autocorrelation; if there is autocorrelation, the error term needs to be adjusted so that it no longer has autocorrelation;

[0057] GLS model optimization:

[0058] The optimization goal of the GLS model is to minimize the weighted residual sum of squares; the objective function is:

[0059]

[0060]

[0061] in:

[0062] ∈ t is the residual of the ARIMA model, i.e., the prediction error; W t is the weighting matrix, obtained by the inverse matrix of the covariance matrix ∑ of the error term;

[0063] Weighting matrix W t is constructed as follows:

[0064] If heteroskedasticity exists, W t =∑ -1 , which is the inverse of the covariance matrix of the error term; if there is autocorrelation, W t It will be adjusted according to the autocovariance structure of the error term;

[0065] Finally, the GLS correction can make the prediction of the ARIMA model more accurate by adjusting the weight of the residual;

[0066] 2.4 Comprehensively optimized prediction model

[0067] Through the fitting of ARIMA model and GLS correction, a more accurate load forecast is obtained; the optimized forecast formula is:

[0068]

[0069] in is the load forecast value after GLS correction; W is the weighting matrix used to adjust the impact of errors; through the combination of ARIMA and GLS, the system can effectively handle the non-stationarity, heteroscedasticity and autocorrelation in time series data and improve the accuracy of load forecasting;

[0070] Step 3: Dynamic Scheduling: Adjusting Resource Allocation Based on Prediction Results

[0071] 3.1 Dynamic resource scheduling based on virtual machine load (regular fine scheduling without priority)

[0072] Using the predicted load data of the virtual machine itself, dynamically adjust the computing resources allocated to it; the specific method is as follows:

[0073] 1. Load status classification:

[0074] Based on the current load prediction value of the virtual machine, the virtual machine is divided into the following three states:

[0075] Low load state: If the VM load is lower than the threshold T low , then reduce its allocated resources;

[0076] High load state: If the VM load is higher than the threshold T high , then increase its allocated resources;

[0077] Normal load state: If the virtual machine load is [T low , T high ], the current resource allocation is maintained;

[0078] 2. Resource dynamic adjustment algorithm:

[0079] Assume that the current resource amount of virtual machine i is R i , the predicted load is L i , resource adjustment is based on the following formula:

[0080]

[0081] in:

[0082] 7) The amount of resources after dynamic adjustment of virtual machine i;

[0083] 8) k: resource adjustment coefficient, used to control the increase or decrease of resources;

[0084] 9)L i : The current load prediction value of virtual machine i;

[0085] 10)T target : Target value of ideal load of virtual machine;

[0086] 11) When L i <T low ,

[0087] 12) When L i >T high , Resource constraints:

[0088] During the dynamic adjustment process, the following constraints must be met:

[0089] 4) The total amount of allocated resources cannot exceed the physical resource limit of the virtualization platform;

[0090] 5) The resource allocation of a single virtual machine cannot be lower than its minimum demand threshold R min ;

[0091] 6) Resource allocation for high-priority virtual machines is prioritized;

[0092] 3. Dynamically scale computing resource pool:

[0093] When the overall resource demand exceeds the existing resources in the physical resource pool, the computing resource pool is dynamically scaled. Specific measures include:

[0094] Add resource nodes: add computing nodes to the platform to expand the physical resource pool;

[0095] Release idle resources: Reclaim excess resources released by low-load virtual machines for use by high-load virtual machines

[0096] 3.2 Resource Priority Scheduling Strategy, Incremental Scheduling with Priority

[0097] Priority scheduling formula:

[0098] The resource scheduling priority of the virtual machine is directly determined by the priority of the task;

[0099] High-priority virtual machines are allocated resources first, and low-priority virtual machines are allocated based on the remaining resources;

[0100] Local optimum:

[0101] Optimize the performance of some virtual machines based on predicted load and specific thresholds;

[0102] Suitable for virtual machines with strong mission-criticality and high performance requirements;

[0103] Global Optimum:

[0104] For the entire cluster, by predicting load and resource thresholds, ensure that all virtual machines achieve the most cost-effective performance with limited resources;

[0105] Step 4: Model update: Regularly update ARIMA and GLS parameters

[0106] 1. Sliding Window Update

[0107] Retrain ARIMA and GLS models using sliding windows (e.g., the last hour’s data) to adapt to long-term changes in load;

[0108] Sliding window size w selection strategy:

[0109] w=k*T

[0110] Where T is the forecast period and k is the adjustment coefficient;

[0111] 2. Model adaptability

[0112] Regularly compare the predicted results with the actual load and calculate the mean square error (MSE):

[0113]

[0114] If the error exceeds the threshold, update the model parameters;

[0115] Step 5: Output the dynamic allocation plan for virtual machine resources

[0116] The final output includes:

[0117] 4. Resource allocation plan:

[0118] a) The CPU, memory, video memory, network bandwidth, and disk I / O allocations for each virtual machine;

[0119] 5. Scheduling results:

[0120] a) Whether resource scheduling meets task requirements;

[0121] 6. Prediction and feedback:

[0122] a) Load forecast value for the next n time steps;

[0123] Analysis of resource utilization improvement after dynamic scheduling.

[0124] The key indicators of the load data described in step 1 include CPU usage, memory usage, video memory, disk I / O, network bandwidth, and geographic information and real-life 3D application identification.

[0125] In step 3, the resource priority scheduling strategy includes the following steps:

[0126] Priority Scheduling Formula

[0127] Resource allocation priority can be expressed by the following formula:

[0128] P i =ω·U i +(1-ω)·T i

[0129] in:

[0130] ●P i : Resource scheduling priority of virtual machine i;

[0131] ●U i : The current predicted load of virtual machine i (such as CPU usage, memory usage);

[0132] ●T i : The priority of the task of virtual machine i (such as high priority tasks corresponding to higher T i );

[0133] ω: adjustment factor, weighing the impact of load and task priority on resource allocation;

[0134] explain:

[0135] ●When ω→0, priority scheduling depends more on the current load of the virtual machine;

[0136] ●When ω→1, priority scheduling depends entirely on task priority;

[0137] Local optimal scheduling strategy

[0138] Target:

[0139] Make some virtual machines reach their optimal performance state under the results of load prediction to meet the resource requirements of specific tasks

[0140] Conditions and thresholds:

[0141] The local optimal virtual machine resource allocation formula is defined as follows:

[0142]

[0143] Parameter definition and description:

[0144] R i: The amount of resources finally allocated to virtual machine i;

[0145] R i,current : The amount of resources currently owned by virtual machine i;

[0146] ΔR add : The step size (amount) of resource increase can be dynamically calculated based on the current remaining system resources and virtual machine requirements:

[0147] ΔR add =k add ·R free

[0148] where k add is the increase proportionality factor, R free is the remaining available resources in the system;

[0149] ΔR reduce

[0150] The step size (amount) of resource reduction to prevent resource waste:

[0151] ΔR reduce =k reduce ·R i,current

[0152] where k reduce is the reduction coefficient;

[0153] θ high : High load threshold; if the virtual machine load U i Exceeding this threshold indicates the need for additional resources;

[0154] θ low : Load threshold; if the virtual machine load U i Below this threshold, it indicates the need to reduce resources;

[0155] T i : Virtual machine task priority, a value of 1 indicates high priority, and 0 indicates low priority;

[0156] f(U i , T i ): Resource allocation adjustment function; for virtual machines with medium load or that do not meet the high and low thresholds, the resource allocation adjustment function is based on the load U i and task priority T i Dynamically calculate resource adjustment ratio:

[0157]

[0158] in:

[0159] ■ is the average load;

[0160] ■ω1, ω2 are weight coefficients, which respectively control the influence of load and priority on resource adjustment;

[0161] Logical explanation:

[0162] High load (U i ≥θ high And T i =1):

[0163] For high-priority and high-load virtual machines, increase resource allocation to ensure task execution efficiency;

[0164] Low load (U i ≤θ low And T i =0):

[0165] For low-priority and low-load virtual machines, reduce resource allocation to free up resources for other virtual machines;

[0166] Other cases:

[0167] For virtual machines whose loads do not reach the threshold or whose task priorities are low, according to f(U i , T i ) Dynamically adjust resources; this function comprehensively considers the degree to which the current load deviates from the average value and the priority of the task, appropriately allocates resources, and balances the overall performance;

[0168] Global optimal scheduling strategy

[0169] Target:

[0170] Under the premise that all virtual machines in the cluster are working normally, the overall system can achieve the most cost-effective performance through the total resources and virtual machine load prediction results;

[0171] Resource allocation formula:

[0172]

[0173] in:

[0174] R total : The total amount of resources currently available for allocation in the system;

[0175] Prerequisites for global optimality:

[0176] All virtual machines are working properly: ensure that there are no downtime or abnormal virtual machines;

[0177] Optimal allocation under limited resources: total resource R total It is limited, and resources need to be reasonably allocated through weight ratio;

[0178] Features of strategy optimization:

[0179] High-priority virtual machines guarantee performance: high-priority tasks are given priority through priority weight allocation.

[0180] meet resource requirements;

[0181] Balanced optimization of overall performance: Through global scheduling, the resource utilization of all virtual machines is balanced to avoid over-allocation or under-allocation of resources for some virtual machines.

[0182] The present invention can achieve the following beneficial effects: 1. The present invention combines ARIMA with GLS algorithm. The virtual machine load prediction and resource dynamic allocation method combined with ARIMA and GLS algorithm can meet this need, realize the capture of time series characteristics, and accurately predict the task load. The ARIMA model is suitable for time series prediction, and GLS can optimize heteroscedasticity and autocorrelation problems. The present invention can be used to accurately predict the changes in the load of virtual machines (such as CPU, memory, I / O usage), realize dynamic allocation optimization of resources, and improve the efficiency and stability of geographic data processing and three-dimensional reconstruction tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0183] Figure 1 It is a schematic diagram of the steps of the present invention. DETAILED DESCRIPTION

[0184] The specific implementation modes of the present invention are described in detail below in conjunction with the accompanying drawings. The described embodiments are only for illustration and explanation of the present invention and do not constitute the sole limitation of the present invention.

[0185] like Figure 1 As shown, the method for dynamically allocating virtual machine resources according to the embodiment of the present invention includes the following specific steps:

[0186] Step 1: Load data collection and feature extraction

[0187] 1.1 Data Collection

[0188] The load data of the virtual machine is collected in real time through Windows Exporter and sent to the Prometheus server application container of the virtualization platform, including the following key indicators:

[0189] ○ CPU usage

[0190] ○ Memory usage

[0191] ○ Video Memory

[0192] ○Disk I / O

[0193] ○Network bandwidth

[0194] ○Geographic information and real-life 3D application logo

[0195] 1.2 Time Series Construction

[0196] The Prometheus server builds a time series based on the collected key indicators and the time of collection:

[0197] ○ Organize the load data into time series according to time segments;

[0198] ○ Define the resource requirement weights of different tasks according to the resource characteristics of the tasks (for example, 3D reconstruction tasks have a higher weight on video memory occupation);

[0199] Step 2: Time Series Modeling and Forecasting

[0200] 2.1 Data Preprocessing

[0201] Stationarity test

[0202] The Augmented Dickey-Fuller (ADF) test is used to check the stationarity of time series data and determine whether the data contains a unit root; the ADF test formula is as follows:

[0203]

[0204] Among them, the lag period p is selected by the information criterion; the stationarity of the sequence is judged by the p value of the ADF test. If the p value is less than the set significance level (such as 0.05), the null hypothesis is rejected and the sequence is confirmed to be stationary;

[0205] Differential processing

[0206] If the original sequence is non-stationary, it can be made stationary by difference processing; by differentiating the time series, the trend or seasonal component can be removed; the sequence after difference processing

[0207] The columns are represented as:

[0208] Δy t =y t -y t-1

[0209] Feature Standardization

[0210] In order to facilitate model processing, it is necessary to standardize the features of time series data; the standardization formula is:

[0211]

[0212] Missing Value Handling

[0213] If there are missing values ​​in the monitoring data, linear interpolation or mean filling can be used to fill the missing values;

[0214] 2.2 ARIMA model: load trend prediction

[0215] The ARIMA model is used for time series forecasting. The core is to fit a model composed of autoregression (AR), difference (I) and moving average (MA) based on time series data. We need to determine the three parameters of the ARIMA model: autoregression term p, difference order d and moving average term q.

[0216]

[0217] 5) Model training:

[0218] 1) Determine the autoregressive term p and autoregressive coefficient φ through autocorrelation function (ACF) analysis i ;

[0219] 2) Determine the difference order d by performing a stationary test on the data. If the data is non-stationary, perform a difference process until the data becomes stationary; (determined in the previous article)

[0220] 3) Determine the moving average term q and the moving average term coefficient θ through partial autocorrelation function (PACF) analysis i ;

[0221] 6) Basic formula of ARIMA model:

[0222]

[0223] in:

[0224] 1) Y t is the value of the time series;

[0225] 2) μ is a constant term;

[0226] 3)φ i is the coefficient of the autoregressive term;

[0227] 4)θ i is the coefficient of the moving average term;

[0228] ∈ t is white noise or error term;

[0229] 1. Model fitting: The model fits the data by minimizing the sum of squared errors to determine the optimal φ and θ coefficients;

[0230] Load trend forecasting: Use the fitted ARIMA model to forecast the next n time steps. The formula is:

[0231] 7) Model fitting: The model fits the data by minimizing the sum of squared errors to determine the optimal φ and θ coefficients;

[0232] 8) Load trend forecast: Use the fitted ARIMA model to forecast the next n time steps. The formula is:

[0233]

[0234] in:

[0235] e) is the predicted value for the next h time steps;

[0236] f) The meanings of other symbols are the same as above;

[0237] 2.3GLS correction: optimizing prediction accuracy

[0238] Based on the ARIMA model, the generalized least squares (GLS) method is used to calibrate the model and optimize the prediction accuracy.

[0239] GLS correction can effectively solve this problem;

[0240] Residual analysis:

[0241] 5) Heteroskedasticity test: Check whether the variance of the residuals changes over time through the Breusch-Pagan test; if heteroskedasticity exists, GLS will use weighted residuals for optimization;

[0242] 6) Autocorrelation test: Use the Durbin-Watson test to check whether the residuals have autocorrelation; if there is autocorrelation, the error term needs to be adjusted so that it no longer has autocorrelation;

[0243] GLS model optimization:

[0244] The optimization goal of the GLS model is to minimize the weighted residual sum of squares; the objective function is:

[0245]

[0246]

[0247] in:

[0248] ●∈ t is the residual of the ARIMA model (i.e., the prediction error);

[0249] W t is a weighting matrix, usually obtained by the inverse matrix of the covariance matrix ∑ of the error term; the weighting matrix W t is constructed as follows:

[0250] ●If heteroskedasticity exists, W t =∑-1 , which is the inverse of the covariance matrix of the error term;

[0251] ●If there is autocorrelation, W t It will be adjusted according to the autocovariance structure of the error term;

[0252] Finally, the GLS correction can make the prediction of the ARIMA model more accurate by adjusting the weight of the residual;

[0254] 2.4 Comprehensively optimized prediction model

[0255] Through the fitting of the ARIMA model and GLS correction, we finally get a more accurate load forecast; the optimized forecast formula is:

[0256]

[0257] ●Among them is the load forecast value after GLS correction;

[0258] ●W is the weighting matrix, which is used to adjust the effect of the error;

[0259] By combining ARIMA with GLS, the system can effectively handle the non-stationarity, heteroscedasticity and autocorrelation in time series data, thereby improving the accuracy of load forecasting;

[0260] Step 3: Dynamic Scheduling: Adjusting Resource Allocation Based on Prediction Results

[0261] 3.1 Dynamic resource scheduling based on virtual machine load (regular fine scheduling without priority)

[0262] Using the predicted load data of the virtual machine itself, dynamically adjust the computing resources allocated to it; the specific method is as follows:

[0263] 1. Load status classification:

[0264] Based on the current load prediction value of the virtual machine, the virtual machine is divided into the following three states:

[0265] ○ Low load state: If the VM load is lower than the threshold T low , then reduce its allocated resources;

[0266] ○ High load state: If the VM load is higher than the threshold T high , then increase its allocated resources;

[0267] ○Normal load state: If the virtual machine load is [T low , T high ], the current resource allocation is maintained;

[0268] 2. Resource dynamic adjustment algorithm:

[0269] Assume that the current resource amount of virtual machine i is R i , the predicted load is L i , resource adjustment is based on the following formula:

[0270]

[0271] in:

[0272] 13) The amount of resources after dynamic adjustment of virtual machine i;

[0273] 14) k: resource adjustment coefficient, used to control the increase or decrease of resources;

[0274] 15)L i : The current load prediction value of virtual machine i;

[0275] 16)T target : The target value of the ideal load of the virtual machine (e.g. 70%);

[0276] 17) When L i <T low , (reduced resources);

[0277] 18) When L i >T high , (increase resources);

[0278] Resource constraints:

[0279] During the dynamic adjustment process, the following constraints must be met:

[0280] 7) The total amount of allocated resources cannot exceed the physical resource limit of the virtualization platform;

[0281] 8) The resource allocation of a single virtual machine cannot be lower than its minimum demand threshold R min

[0282] 9) Resource allocation for high-priority virtual machines is prioritized;

[0283] 3. Dynamically scale computing resource pool:

[0284] When the overall resource demand exceeds the existing resources in the physical resource pool, the computing resource pool is dynamically scaled. Specific measures include:

[0285] Add resource nodes: add computing nodes to the platform to expand the physical resource pool;

[0286] Release idle resources: Reclaim excess resources released by low-load virtual machines for use by high-load virtual machines

[0287] 3.2 Resource Priority Scheduling Strategy (Incremental Scheduling with Priority)

[0288] 1. Priority scheduling formula:

[0289] ○The resource scheduling priority of the virtual machine is directly determined by the priority of the task;

[0291] ○High-priority virtual machines are allocated resources first, and low-priority virtual machines are allocated based on the remaining resources;

[0292] 2. Local Optimum:

[0293] ○ Optimize the performance of some virtual machines based on predicted load and specific thresholds;

[0294] ○ Suitable for virtual machines with strong mission-criticality and high performance requirements;

[0295] 3. Global Optimum:

[0296] ○ For the entire cluster, by predicting load and resource thresholds, ensure that all virtual machines achieve the most cost-effective performance under limited resources;

[0297] ○Prerequisite: All virtual machines must be in normal working condition;

[0298] 1. Priority Scheduling Formula

[0299] Resource allocation priority can be expressed by the following formula:

[0300] P i =ω·U i +(1-ω)·T i

[0301] in:

[0302] ●P i : Resource scheduling priority of virtual machine i;

[0303] ●U i : The current predicted load of virtual machine i (such as CPU usage, memory usage);

[0304] ●T i : The priority of the task of virtual machine i (such as high priority tasks corresponding to higher T i );

[0305] ω: adjustment factor, weighing the impact of load and task priority on resource allocation;

[0306] explain:

[0307] ●When ω→0, priority scheduling depends more on the current load of the virtual machine;

[0308] ●When ω→1, priority scheduling depends entirely on task priority;

[0309] 2. Local Optimal Scheduling Strategy

[0310] Target:

[0311] Make some virtual machines reach their optimal performance state under the results of load prediction to meet the resource requirements of specific tasks

[0312] Conditions and thresholds:

[0313] The local optimal virtual machine resource allocation formula is defined as follows:

[0314]

[0315] Parameter definition and description:

[0316] 2.R i :

[0317] ○The amount of resources finally allocated to virtual machine i;

[0318] 3.R i,current :

[0319] ○The amount of resources currently owned by virtual machine i;

[0320] 4. ΔR add

[0321] ○ The step size (amount) of resource increase can be dynamically calculated based on the current remaining system resources and virtual machine requirements:

[0322] ΔR add =k add ·R free

[0323] where k add is the increase proportionality factor, R free is the remaining available resources in the system;

[0324] 5. ΔR reduce :

[0325] ○The step size (amount) of resource reduction to prevent resource waste:

[0326] ΔR reduce =k reduce ·R i,current

[0327] where k reduce is the reduction coefficient;

[0328] 6. θ high :

[0329] ○ High load threshold; if the virtual machine load U i Exceeding this threshold indicates the need for additional resources;

[0330] 7. θ low :

[0331] ○ Load threshold; if the virtual machine load U i Below this threshold, it indicates the need to reduce resources;

[0332] 8.T i :

[0333] ○ The virtual machine task priority, the value 1 indicates high priority, and 0 indicates low priority;

[0334] 9.f(U i , T i ):

[0335] ○ Resource allocation adjustment function: For virtual machines with medium load or that do not meet the high and low thresholds, the resource allocation adjustment function adjusts the resource allocation based on the load U i and task priority T i Dynamically calculate resource adjustment ratios; for example:

[0336]

[0337] ○ Among them:

[0338] ■ is the average load;

[0339] ■ω1, ω2 are weight coefficients, which respectively control the influence of load and priority on resource adjustment;

[0340] Logical explanation:

[0341] 1. High load (U i ≥θ high And T i =1):

[0342] ○ For high-priority and high-load virtual machines, increase resource allocation to ensure task execution efficiency;

[0343] 2. Low load (U i ≤θ low And T i =0):

[0344] ○ Reduce resource allocation for low-priority and low-load virtual machines to free up resources for use by other virtual machines;

[0345] 3. Other situations:

[0346] ○ For virtual machines whose loads do not reach the threshold or whose task priorities are low, according to f(U i , T i ) Dynamically adjust resources; this function comprehensively considers the degree to which the current load deviates from the average value and the priority of the task, appropriately allocates resources, and balances the overall performance;

[0347] 3. Global Optimal Scheduling Strategy

[0348] Target:

[0349] Under the premise that all virtual machines in the cluster are working normally, the overall system can achieve the most cost-effective performance through the total resources and virtual machine load prediction results;

[0350] Resource allocation formula:

[0351]

[0352] in:

[0353] ●R total : The total amount of resources currently available for allocation in the system;

[0354] Prerequisites for global optimality:

[0355] ●All virtual machines are working normally: ensure that there are no virtual machines that are down or in abnormal status;

[0356] Optimal allocation under limited resources: total resource R total It is limited, and resources need to be reasonably allocated through weight ratio;

[0357] Features of strategy optimization:

[0358] 1. High-priority virtual machines ensure performance: high-priority tasks are given priority to meet resource requirements through priority weight allocation;

[0359] 2. Balanced optimization of overall performance: through global scheduling, balance the resource utilization of all virtual machines to avoid over-allocation or under-allocation of resources for some virtual machines;

[0360] Step 4: Model update: Regularly update ARIMA and GLS parameters

[0361] 3. Sliding Window Update

[0362] Retrain ARIMA and GLS models using sliding windows (e.g., the last hour’s data) to adapt to long-term changes in load;

[0363] Sliding window size w selection strategy:

[0364] w=k*T

[0365] Where T is the forecast period and k is the adjustment coefficient;

[0366] 4. Model adaptability

[0367] Regularly compare the predicted results with the actual load and calculate the mean square error (MSE):

[0368]

[0369] If the error exceeds the threshold, update the model parameters;

[0370] Step 5: Output the dynamic allocation plan for virtual machine resources

[0371] The final output includes:

[0372] 7. Resource allocation plan:

[0373] a) The CPU, memory, video memory, network bandwidth, and disk I / O allocations for each virtual machine;

[0374] 8. Scheduling results:

[0375] a) Whether resource scheduling meets task requirements;

[0376] 9. Prediction and feedback:

[0377] a) Load forecast value for the next n time steps;

[0378] Analysis of resource utilization improvement after dynamic scheduling

[0379] Step 1: Load data collection and feature extraction

[0380] 1.1 Data Collection

[0381] The load data of the virtual machine is collected in real time through Windows Exporter and sent to the Prometheus server application container of the virtualization platform, including the following key indicators:

[0382] ○ CPU usage

[0383] ○ Memory usage

[0384] ○ Video Memory

[0385] ○Disk I / O

[0386] ○Network bandwidth

[0387] ○Geographic information and real-life 3D application logo

[0388] 1.2 Time Series Construction

[0389] The Prometheus server builds a time series based on the collected key indicators and the time of collection:

[0390] ○ Organize the load data into time series according to time segments;

[0391] ○ Define the resource requirement weights of different tasks according to the resource characteristics of the tasks (for example, 3D reconstruction tasks have a higher weight on video memory occupation);

[0392] Step 2: Time Series Modeling and Forecasting

[0393] 2.1 Data Preprocessing

[0394] Stationarity test

[0395] The Augmented Dickey-Fuller (ADF) test is used to check the stationarity of time series data and determine whether the data contains a unit root; the ADF test formula is as follows:

[0396]

[0397] Among them, the lag period p is selected by the information criterion; the stationarity of the sequence is judged by the p value of the ADF test. If the p value is less than the set significance level (such as 0.05), the null hypothesis is rejected and the sequence is confirmed to be stationary;

[0398] Differential processing

[0399] If the original sequence is non-stationary, it can be made stationary by difference processing; by differentiating the time series, the trend or seasonal component can be removed; the sequence after difference processing is expressed as:

[0400] Δy t =y t -y t-1

[0401] Feature Standardization

[0402] In order to facilitate model processing, it is necessary to standardize the features of time series data; the standardization formula is:

[0403]

[0404] Missing Value Handling

[0405] If there are missing values ​​in the monitoring data, linear interpolation or mean filling can be used to fill the missing values;

[0406] 2.2 ARIMA model: load trend forecasting

[0407] The ARIMA model is used for time series forecasting. The core is to fit a model composed of autoregression (AR), difference (I) and moving average (MA) based on time series data. We need to determine the three parameters of the ARIMA model: autoregression term p, difference order d and moving average term q.

[0408]

[0409] 9) Model training:

[0410] 4) Determine the autoregressive term p and autoregressive coefficient φ through autocorrelation function (ACF) analysis i ;

[0411] 5) Determine the difference order d by performing a stationary test on the data. If the data is non-stationary, perform a difference process until the data becomes stationary; (determined in the previous article)

[0412] 6) Determine the moving average term q and the moving average term coefficient θ through partial autocorrelation function (PACF) analysis i ;

[0413] 10) Basic formula of ARIMA model:

[0414]

[0415] in:

[0416] 5) Y t is the value of the time series;

[0417] 6) μ is a constant term;

[0418] 7)φ i is the coefficient of the autoregressive term;

[0419] 8)θ i is the coefficient of the moving average term;

[0420] ∈ t is white noise or error term;

[0421] 2. Model fitting: The model fits the data by minimizing the sum of squared errors to determine the optimal φ and θ coefficients;

[0422] Load trend forecasting: Use the fitted ARIMA model to forecast the next n time steps. The formula is:

[0423] 11) Model fitting: The model fits the data by minimizing the sum of squared errors to determine the optimal φ and θ coefficients;

[0424] 12) Load trend forecast: Use the fitted ARIMA model to forecast the next n time steps. The formula is:

[0425]

[0426] in:

[0427] g) is the predicted value for the next h time steps;

[0428] h) The meanings of other symbols are the same as above;

[0429] 2.3GLS correction: optimizing prediction accuracy

[0430] Based on the ARIMA model, the generalized least squares (GLS) method is used to calibrate the model and optimize the prediction accuracy. Since the ARIMA model may have heteroskedasticity or autocorrelation, GLS correction can effectively solve this problem.

[0431] Residual analysis:

[0432] 7) Heteroskedasticity test: Check whether the variance of the residuals changes over time through the Breusch-Pagan test; if heteroskedasticity exists, GLS will use weighted residuals for optimization;

[0433] 8) Autocorrelation test: Use the Durbin-Watson test to check whether the residuals have autocorrelation; if there is autocorrelation, the error term needs to be adjusted so that it no longer has autocorrelation;

[0434] GLS model optimization:

[0435] The optimization goal of the GLS model is to minimize the weighted residual sum of squares; the objective function is:

[0436]

[0437] in:

[0438] ●∈ t is the residual of the ARIMA model (i.e., the prediction error);

[0439] W t is a weighting matrix, usually obtained by the inverse matrix of the covariance matrix ∑ of the error term;

[0440] Weighting matrix W t is constructed as follows:

[0441] ●If heteroskedasticity exists, W t =∑ -1 , which is the inverse of the covariance matrix of the error term;

[0442] ●If there is autocorrelation, W tIt will be adjusted according to the autocovariance structure of the error term;

[0443] Finally, the GLS correction can make the prediction of the ARIMA model more accurate by adjusting the weight of the residual;

[0445] 2.4 Comprehensively optimized prediction model

[0446] Through the fitting of the ARIMA model and GLS correction, we finally get a more accurate load forecast; the optimized forecast formula is:

[0447]

[0448] ●Among them is the load forecast value after GLS correction;

[0449] ●W is the weighting matrix, which is used to adjust the effect of the error;

[0450] By combining ARIMA with GLS, the system can effectively handle the non-stationarity, heteroscedasticity and autocorrelation in time series data, thereby improving the accuracy of load forecasting;

[0451] Step 3: Dynamic Scheduling: Adjusting Resource Allocation Based on Prediction Results

[0452] 3.1 Dynamic resource scheduling based on virtual machine load (regular fine scheduling without priority)

[0453] Using the predicted load data of the virtual machine itself, dynamically adjust the computing resources allocated to it; the specific method is as follows:

[0454] 1. Load status classification:

[0455] Based on the current load prediction value of the virtual machine, the virtual machine is divided into the following three states:

[0456] ○ Low load state: If the VM load is lower than the threshold T low , then reduce its allocated resources;

[0457] ○ High load state: If the VM load is higher than the threshold T high , then increase its allocated resources;

[0458] ○Normal load state: If the virtual machine load is [T low , T high ], the current resource allocation is maintained;

[0459] 2. Resource dynamic adjustment algorithm:

[0460] Assume that the current resource amount of virtual machine i is R i , the predicted load is Li , resource adjustment is based on the following formula:

[0461]

[0462] in:

[0463] 19) The amount of resources after dynamic adjustment of virtual machine i;

[0464] 20) k: resource adjustment coefficient, used to control the increase or decrease of resources;

[0465] 21)L i : The current load prediction value of virtual machine i;

[0466] 22)T target : The target value of the ideal load of the virtual machine (e.g. 70%);

[0467] 23) When L i <T low , (reduced resources);

[0468] 24) When L i >T high , (increase resources);

[0469] Resource constraints:

[0470] During the dynamic adjustment process, the following constraints must be met:

[0471] 10) The total amount of allocated resources cannot exceed the physical resource limit of the virtualization platform;

[0472] 11) The resource allocation of a single virtual machine cannot be lower than its minimum demand threshold R min ;

[0473] 12) Resource allocation for high-priority virtual machines is prioritized;

[0474] 3. Dynamically scale computing resource pool:

[0475] When the overall resource demand exceeds the existing resources in the physical resource pool, the computing resource pool is dynamically scaled. Specific measures include:

[0476] Add resource nodes: add computing nodes to the platform to expand the physical resource pool;

[0477] Release idle resources: Reclaim excess resources released by low-load virtual machines for use by high-load virtual machines

[0478] 3.2 Resource Priority Scheduling Strategy (Incremental Scheduling with Priority)

[0479] 4. Priority scheduling formula:

[0480] ○The resource scheduling priority of the virtual machine is directly determined by the priority of the task;

[0482] ○High-priority virtual machines are allocated resources first, and low-priority virtual machines are allocated based on the remaining resources;

[0483] 5. Local Optimum:

[0484] ○ Optimize the performance of some virtual machines based on predicted load and specific thresholds;

[0485] ○ Suitable for virtual machines with strong mission-criticality and high performance requirements;

[0486] 6. Global Optimum:

[0487] ○ For the entire cluster, by predicting load and resource thresholds, ensure that all virtual machines achieve the most cost-effective performance under limited resources;

[0488] ○Prerequisite: All virtual machines must be in normal working condition;

[0489] 1. Priority Scheduling Formula

[0490] Resource allocation priority can be expressed by the following formula:

[0491] P i =ω·U i +(1-ω)·T i

[0492] in:

[0493] ●P i : Resource scheduling priority of virtual machine i;

[0494] ●U i : The current predicted load of virtual machine i (such as CPU usage, memory usage);

[0495] ●T i : The priority of the task of virtual machine i (such as high priority tasks corresponding to higher T i );

[0496] ω: adjustment factor, weighing the impact of load and task priority on resource allocation;

[0497] explain:

[0498] ●When ω→0, priority scheduling depends more on the current load of the virtual machine;

[0499] ●When ω→1, priority scheduling depends entirely on task priority;

[0500] 2. Local Optimal Scheduling Strategy

[0501] Target:

[0502] Make some virtual machines reach their optimal performance state under the results of load prediction to meet the resource requirements of specific tasks

[0503] Conditions and thresholds:

[0504] The local optimal virtual machine resource allocation formula is defined as follows:

[0505]

[0506] Parameter definition and description:

[0507] 10.R i :

[0508] ○The amount of resources finally allocated to virtual machine i;

[0509] 11.R i,current :

[0510] ○The amount of resources currently owned by virtual machine i;

[0511] 12. ΔR add :

[0512] ○ The step size (amount) of resource increase can be dynamically calculated based on the current remaining system resources and virtual machine requirements:

[0513] ΔR add =k add ·R free

[0514] where k add is the increase proportionality factor, R free is the remaining available resources in the system;

[0515] 13. ΔR reduce :

[0516] ○The step size (amount) of resource reduction to prevent resource waste:

[0517] ΔR reduce =k reduce ·R i,current

[0518] where k reduce is the reduction coefficient;

[0519] 14. θ high :

[0520] ○ High load threshold; if the virtual machine load Ui Exceeding this threshold indicates the need for additional resources;

[0521] 15. θ low :

[0522] ○ Load threshold; if the virtual machine load U i Below this threshold, it indicates the need to reduce resources;

[0523] 16.T i :

[0524] ○ The virtual machine task priority, the value 1 indicates high priority, and 0 indicates low priority;

[0525] 17.f(U i , T i ):

[0526] ○ Resource allocation adjustment function: For virtual machines with medium load or that do not meet the high and low thresholds, the resource allocation adjustment function adjusts the resource allocation based on the load U i and task priority T i Dynamically calculate resource adjustment ratios; for example:

[0527]

[0528] ○ Among them:

[0529] ■ is the average load;

[0530] ■ω1, ω2 are weight coefficients, which respectively control the influence of load and priority on resource adjustment;

[0531] Logical explanation:

[0532] 4. High load (U i >θ high And T i =1):

[0533] ○ For high-priority and high-load virtual machines, increase resource allocation to ensure task execution efficiency;

[0534] 5. Low load (U i ≤θ low And T i =0):

[0535] ○ Reduce resource allocation for low-priority and low-load virtual machines to free up resources for use by other virtual machines;

[0536] 6. Other situations:

[0537] ○ For virtual machines whose loads do not reach the threshold or whose task priorities are low, according to f(U i , Ti ) Dynamically adjust resources; this function comprehensively considers the degree to which the current load deviates from the average value and the priority of the task, appropriately allocates resources, and balances the overall performance;

[0538] 3. Global Optimal Scheduling Strategy

[0539] Target:

[0540] Under the premise that all virtual machines in the cluster are working normally, the overall system can achieve the most cost-effective performance through the total resources and virtual machine load prediction results;

[0541] Resource allocation formula:

[0542]

[0543] in:

[0544] ●R total : The total amount of resources currently available for allocation in the system;

[0545] Prerequisites for global optimality:

[0546] ●All virtual machines are working normally: ensure that there are no virtual machines that are down or in abnormal status;

[0547] Optimal allocation under limited resources: total resource R total It is limited, and resources need to be reasonably allocated through weight ratio;

[0548] Features of strategy optimization:

[0549] 3. High-priority virtual machines ensure performance: by allocating priority weights, high-priority tasks are given priority in meeting resource requirements;

[0550] 4. Balanced optimization of overall performance: through global scheduling, balance the resource utilization of all virtual machines to avoid over-allocation or under-allocation of resources for some virtual machines;

[0551] Step 4: Model update: Regularly update ARIMA and GLS parameters

[0552] 5. Sliding Window Update

[0553] Retrain ARIMA and GLS models using sliding windows (e.g., the last hour’s data) to adapt to long-term changes in load;

[0554] Sliding window size w selection strategy:

[0555] w=k*T

[0556] Where T is the forecast period and k is the adjustment coefficient;

[0557] 6. Model Adaptability

[0558] Regularly compare the predicted results with the actual load and calculate the mean square error (MSE):

[0559]

[0560] If the error exceeds the threshold, update the model parameters;

[0561] Step 5: Output the dynamic allocation plan for virtual machine resources

[0562] The final output includes:

[0563] 10. Resource allocation plan:

[0564] a) The CPU, memory, video memory, network bandwidth, and disk I / O allocations for each virtual machine;

[0565] 11. Scheduling results:

[0566] a) Whether resource scheduling meets task requirements;

[0567] 12. Prediction and feedback:

[0568] a) Load forecast value for the next n time steps;

[0569] Analysis of resource utilization improvement after dynamic scheduling

[0570] Practical application examples of embodiments of the present invention

[0571] Scenario description:

[0572] A virtual machine is deployed on a cloud computing platform

[0573] VM1: Geographic Information Analysis (High CPU Usage)

[0574] Data collection

[0575] The resource usage data (CPU usage, memory usage, etc.) of each virtual machine is collected in a 5-minute time window to form a time series. The sample data is as follows:

[0576]

[0577] Load Forecasting

[0578] Substitute the model fitting parameters to predict the virtual machine load in the next 30 minutes:

[0579]

[0580] Using the local optimal strategy, resource scheduling formula

[0581]

[0582] Assume that the GPU θ is set high is 90%, θ low 30%, CPU θ hig h is 80%, θ low is 50%, ω1=0.8,ω2=0.2

[0583] For VM1-GPU, according to the above, U i =70%, T i =1, R i,current =55%

[0584]

[0585] Finally, we get R i =68.2%

[0586] At this time, the virtualization platform allocates 13.2% of GPU resources to VM1.

[0587] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A method for dynamically allocating virtual machine resources based on load prediction, characterized in that: The method for dynamically allocating virtual machine resources comprises the following steps: Step 1: Load data collection and feature extraction; Step 2: Time series modeling and forecasting; Step 3: Dynamic scheduling: adjust resource allocation based on prediction results; Step 4: Model update: Regularly update ARIMA and GLS parameters; Step 5: Output the dynamic allocation plan for virtual machine resources.

2. The method for dynamic allocation of virtual machine resources based on load prediction according to claim 1, characterized in that: The specific steps of the load prediction method for dynamic allocation of virtual machine resources are as follows: Step 1: Load data collection and feature extraction 1.1 Data Collection Collect virtual machine load data in real time through Windows Exporter and send it to the prometheus server application container of the virtualization platform 1.2 Time Series Construction Prometheus server builds time series based on the collected key indicators and the time of collection: organizes the load data into time series according to time segments; defines the resource requirement weights of different tasks based on the resource characteristics of the tasks; Step 2: Time Series Modeling and Forecasting 2.1 Data Preprocessing Stationarity test Check the stationarity of time series data and determine whether the data contains unit roots; the test formula is as follows: Among them, the lag period p is selected by the information criterion; the stationarity of the sequence is judged by the p value of the ADF test. If the p value is less than the set significance level, the null hypothesis is rejected and the sequence is confirmed to be stationary; Differential processing By differentiating the time series, the trend or seasonal component is removed; the differenced series is expressed as: Δy t =y t -y t-1 Feature Standardization The feature standardization of time series data is performed, and the standardization formula is: Missing Value Handling If there are missing values ​​in the monitoring data, linear interpolation or mean filling is used to fill the missing values; 2.2 ARIMA model: load trend forecasting The ARIMA model is used for time series forecasting. The core is to fit a model composed of autoregression (AR), difference (I) and moving average (MA) based on time series data; determine the three parameters of the ARIMA model: autoregression term p, difference order d and moving average term q; 1) Model training: Determine the autoregressive term p and autoregressive coefficient φ through autocorrelation function (ACF) analysis i ; The difference order d is determined by performing a stationary test on the data. If the data is non-stationary, the difference processing is performed until the data is stationary. The moving average term q and the moving average term coefficient θ are determined by partial autocorrelation function (PACF) analysis i ; 2) Basic formula of ARIMA model: in: Y t is the value of the time series; μ is a constant term; φ i is the coefficient of the autoregressive term; θ i is the coefficient of the moving average term; ∈ t is white noise or error term; 3) Model fitting: The model fits the data by minimizing the sum of squared errors and determining the optimal φ and θ coefficients; 4) Load trend forecast: Use the fitted ARIMA model to forecast the next n time steps. The formula is: in: a) is the predicted value for the next h time steps; b) The meanings of other symbols are the same as above; 2.3GLS correction: optimizing prediction accuracy Based on the ARIMA model, the generalized least squares (GLS) method is used to calibrate the model and optimize the prediction accuracy; Residual analysis: 1) Heteroskedasticity test: Check whether the variance of the residuals changes over time through the Breusch-Pagan test; if heteroskedasticity exists, GLS will use weighted residuals for optimization; 2) Autocorrelation test: Use the Durbin-Watson test to check whether the residuals have autocorrelation; if there is autocorrelation, the error term needs to be adjusted so that it no longer has autocorrelation; GLS model optimization: The optimization goal of the GLS model is to minimize the weighted residual sum of squares; the objective function is: in: ∈ t is the residual of the ARIMA model, i.e., the prediction error; W t is the weighting matrix, obtained by the inverse matrix of the covariance matrix ∑ of the error term; Weight matrix W t is constructed as follows: If heteroskedasticity exists, W t =∑ -1 , which is the inverse of the covariance matrix of the error term; if there is autocorrelation, W t It will be adjusted according to the autocovariance structure of the error term; Finally, the GLS correction can make the prediction of the ARIMA model more accurate by adjusting the weight of the residual; 2.4 Comprehensively optimized prediction model Through the fitting of ARIMA model and GLS correction, a more accurate load forecast is obtained; the optimized forecast formula is: in is the load forecast value after GLS correction; W is the weighting matrix used to adjust the impact of errors; through the combination of ARIMA and GLS, the system can effectively handle the non-stationarity, heteroscedasticity and autocorrelation in time series data and improve the accuracy of load forecasting; Step 3: Dynamic Scheduling: Adjusting Resource Allocation Based on Prediction Results 3.1 Dynamic resource scheduling based on virtual machine load (regular fine scheduling without priority) Using the predicted load data of the virtual machine itself, dynamically adjust the computing resources allocated to it; the specific method is as follows: Load status classification: Based on the current load prediction value of the virtual machine, the virtual machine is divided into the following three states: Low load state: If the VM load is lower than the threshold T low , then reduce its allocated resources; High load state: If the VM load is higher than the threshold T high , then increase its allocated resources; Normal load state: If the virtual machine load is [T low , T high ], the current resource allocation is maintained; Dynamic resource adjustment algorithm: Assume that the current resource amount of virtual machine i is R i , the predicted load is L i , resource adjustment is based on the following formula: in: 1) The amount of resources after dynamic adjustment of virtual machine i; 2) k: resource adjustment coefficient, used to control the increase or decrease of resources; 3) L i : The current load prediction value of virtual machine i; 4) T target : Target value of ideal load of virtual machine; 5) When L i <T low , 6) When L i >T high , Resource constraints: During the dynamic adjustment process, the following constraints must be met: 1) The total amount of allocated resources cannot exceed the physical resource limit of the virtualization platform; 2) The resource allocation of a single virtual machine cannot be lower than its minimum demand threshold R min ; 3) Resource allocation for high-priority virtual machines is prioritized; Dynamically scale the computing resource pool: When the overall resource demand exceeds the existing resources in the physical resource pool, dynamically scale the computing resource pool. Specific measures include: Add resource nodes: add computing nodes to the platform to expand the physical resource pool; Release idle resources: Reclaim excess resources released by low-load virtual machines for use by high-load virtual machines 3.2 Resource Priority Scheduling Strategy, Incremental Scheduling with Priority Priority scheduling formula: The resource scheduling priority of the virtual machine is directly determined by the priority of the task; High-priority virtual machines are allocated resources first, and low-priority virtual machines are allocated based on the remaining resources; Local optimum: For some virtual machines, achieve optimal performance based on predicted load and specific thresholds; suitable for virtual machines with strong mission-criticality and high performance requirements; Global Optimum: For the entire cluster, by predicting load and resource thresholds, ensure that all virtual machines achieve the most cost-effective performance with limited resources; Step 4: Model update: Regularly update ARIMA and GLS parameters Sliding Window Update Retrain ARIMA and GLS models to accommodate long-term changes in load; Sliding window size w selection strategy: w=k*T Where T is the forecast period and k is the adjustment coefficient; Model adaptability Regularly compare the predicted results with the actual load and calculate the mean square error (MSE): If the error exceeds the threshold, update the model parameters; Step 5: Output the dynamic allocation plan for virtual machine resources The final output includes:

1. Resource allocation plan: a) The CPU, memory, video memory, network bandwidth, and disk I / O allocations for each virtual machine; 2. Scheduling results: a) Whether resource scheduling meets task requirements; 3. Prediction and feedback: a) Load forecast value for the next n time steps; Analysis of resource utilization improvement after dynamic scheduling.

3. The method for dynamic allocation of virtual machine resources based on load prediction according to claim 2, characterized in that: The key indicators of the load data described in step 1 include CPU usage, memory usage, video memory, disk I / O, network bandwidth, and geographic information and real-life 3D application identification.

4. The method for dynamic allocation of virtual machine resources based on load prediction according to claim 3, characterized in that: In step 3, the resource priority scheduling strategy includes the following steps: Priority Scheduling Formula Resource allocation priority can be expressed by the following formula: P i =ω·U i +(1-ω)·T i in: ·P i : Resource scheduling priority of virtual machine i; ·U i : The current predicted load of virtual machine i (such as CPU usage, memory usage); ·T i : The priority of the task of virtual machine i (such as high priority tasks corresponding to higher T i ); ω: adjustment factor, weighing the impact of load and task priority on resource allocation; explain: When ω→0, priority scheduling depends more on the current load of the virtual machine; When ω→1, priority scheduling depends entirely on task priority; Local optimal scheduling strategy Target: Make some virtual machines reach their optimal performance state under the results of load prediction to meet the resource requirements of specific tasks Conditions and thresholds: The local optimal virtual machine resource allocation formula is defined as follows: Parameter definition and description: R i : The amount of resources finally allocated to virtual machine i; R i,current : The amount of resources currently owned by virtual machine i; ΔR add : The step size (amount) of resource increase can be dynamically calculated based on the current remaining system resources and virtual machine requirements: ΔR add =k add ·R free where k add is the increase proportionality factor, R free is the remaining available resources in the system; ΔR reduce The step size (amount) of resource reduction to prevent resource waste: ΔR reduce =k reduce ·R i,current where k reduce is the reduction coefficient; θ high : High load threshold; if the virtual machine load U i Exceeding this threshold indicates the need for additional resources; θ low : Load threshold; if the virtual machine load U i Below this threshold, it indicates the need to reduce resources; T i : Virtual machine task priority, the value 1 indicates high priority, and 0 indicates low priority; f(U i , T i ): Resource allocation adjustment function; for virtual machines with medium load or that do not meet the high and low thresholds, the resource allocation adjustment function is based on the load U i and task priority T i Dynamically calculate resource adjustment ratio: in: ■ is the average load; ■ω1, ω2 are weight coefficients, which respectively control the influence of load and priority on resource adjustment; Logical explanation: High load (U i >θ high And T i =1): For high-priority and high-load virtual machines, increase resource allocation to ensure task execution efficiency; Low load (U i ≤θ low And T i =0): For low-priority and low-load virtual machines, reduce resource allocation to free up resources for other virtual machines; Other cases: For virtual machines whose loads do not reach the threshold or whose task priorities are low, according to f(U i , T i ) Dynamically adjust resources; this function comprehensively considers the degree to which the current load deviates from the average value and the priority of the task, appropriately allocates resources, and balances the overall performance; Global optimal scheduling strategy Target: Under the premise that all virtual machines in the cluster are working normally, the overall system can achieve the most cost-effective performance through the total resources and virtual machine load prediction results; Resource allocation formula: in: R total : The total amount of resources currently available for allocation in the system; Prerequisites for global optimality: All virtual machines are working properly: ensure that there are no downtime or abnormal virtual machines; Optimal allocation under limited resources: total resource R total It is limited and resources need to be allocated reasonably through weight ratio.

Citation Information

Patent Citations

  • A server load prediction method and system based on a Markov chain and a time sequence model

    CN109787855A

  • Method and apparatus of dynamically allocating resources across multiple virtual machines

    US20090198766A1

  • Managing virtual machine memory balloon using time series predictive data

    US20200401456A1

Cited By

  • Resource allocation method, electronic equipment, storage medium and program product

    CN120104356A

  • Resource Allocation Method, Electronic Device, Storage Medium, and Program Product

    CN120104356B

  • Resource scheduling method and related equipment

    CN120276830A

  • Virtual machine intelligent deployment method and system based on dynamic resource prediction

    CN120448041A

  • PCIe virtual channel credit line adjustment method, communication device and system

    CN120811925A