Dual-module cloud resource prediction method based on deep learning

Through a dual-module cloud resource prediction method based on deep learning, combined with the capture and fusion of global and local features, the shortcomings of existing models in capturing short-term fluctuations and long-term trends are solved, higher-precision and efficient resource prediction is achieved, and cloud resource management and scheduling are optimized.

CN120705008APending Publication Date: 2025-09-26INFORMATION & TELECOMM COMPANY SICHUAN ELECTRIC POWER
View PDF 0 Cites 6 Cited by

Patent Information

Application Number
CN202510860469.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-25
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

Existing cloud resource prediction models are unable to effectively capture both short-term fluctuations and long-term trends, resulting in low resource prediction accuracy and affecting scheduling efficiency and flexibility.

Method used

A dual-module cloud resource prediction method based on deep learning is adopted, including an embedding module, a global module and a local module. The global and local features of resource requirements are captured through multi-scale convolution and dual attention mechanisms, and feature fusion is performed through a gating mechanism to generate the final prediction results.

Benefits of technology

It significantly improves the accuracy and efficiency of cloud resource prediction, can better cope with the dynamically changing cloud computing environment, and improves the optimization capabilities of resource management and scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120705008A_ABST
    Figure CN120705008A_ABST
Patent Text Reader

Abstract

The invention discloses a dual-module cloud resource prediction method based on deep learning, and belongs to the field of cloud resource prediction. The method aims at solving the problem that in a complex cloud computing environment, an existing cloud resource prediction model is difficult to effectively capture short-term fluctuation and long-term trend at the same time, and consequently resource prediction precision is low. The method comprises the following steps of S1, reading a data set, performing preprocessing, eliminating abnormal values and filling missing values; s2, designing an embedding module to map the preprocessed original data to a high-dimensional vector space; and S3, designing a global module to extract global features in the historical data. And S4, designing a local module to extract local features in the historical data. And S5, designing a fusion module, fusing the outputs of the global module and the local module, and generating a final prediction result. According to the method, a global and local dual-module structure is adopted, and the accuracy and real-time performance of cloud resource prediction are improved through joint learning of global and local module information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology and provides a dual-module cloud resource prediction method based on deep learning. Background Art

[0002] With the rapid development of cloud computing and big data technologies, the demand for data in cloud resource management is increasing. As a core task, cloud resource prediction is gradually evolving towards multimodal information processing and intelligent decision-making. Cloud resource prediction models improve the ability to identify and predict resource demand fluctuations by combining different data sources (such as historical resource usage and real-time traffic information). However, existing prediction models fail to accurately capture the global trends and local dynamic characteristics of resource demand, making it difficult to achieve accurate demand forecasts in complex cloud computing environments, thereby affecting the efficiency and flexibility of resource scheduling.

[0003] In summary, existing cloud resource prediction methods have the following shortcomings:

[0004] 1) When faced with short-term fluctuations in resource demand, the system lacks a flexible adjustment mechanism, making it difficult to promptly respond to changes in instantaneous load in actual business operations. This results in delayed prediction responses and affects scheduling efficiency.

[0005] 2) The ability to model long-term resource usage patterns is limited, and trend characteristics are easily overlooked, affecting the effectiveness of long-term scheduling strategies;

[0006] 3) It fails to fully integrate global and local features and relies only on a single perspective to extract information, which cannot fully describe the complex dynamic characteristics of resource usage, resulting in insufficient overall prediction accuracy and difficulty in coping with the changeable and complex resource demand scenarios in actual cloud environments.

[0007] The aforementioned shortcomings of existing technologies limit the application of cloud resource prediction models in complex and dynamic cloud computing environments, resulting in an inability to accurately predict resource demand and posing significant challenges to cloud resource management and scheduling. Therefore, this paper proposes a dual-module cloud resource prediction method based on deep learning to improve prediction accuracy and address the shortcomings of existing technologies. Summary of the Invention

[0008] The purpose of this invention is to solve the problem that in complex cloud computing environments, existing cloud resource prediction models are difficult to effectively capture both short-term fluctuations and long-term trends, resulting in low resource prediction accuracy.

[0009] To achieve the above-mentioned purpose, the present invention adopts the following technical solutions:

[0010] The present invention proposes a dual-module cloud resource prediction method based on deep learning, comprising:

[0011] The present invention provides a dual-module cloud resource prediction method based on deep learning, comprising the following steps:

[0012] S1: Read the historical resource data of the cloud computing platform as a data set, remove outliers, fill missing values, resample and standardize the data set;

[0013] S2: Design an embedding module to map the pre-processed historical resource data and related auxiliary information into a high-dimensional vector space, so that subsequent global and local modules can more effectively extract temporal features and contextual information;

[0014] S3: Design a global module to extract global features from historical data and capture long-term trends and cyclical changes in resource demand through a dual attention mechanism;

[0015] S4: Design a local module to extract local features from historical data and capture short-term fluctuations in resource demand through multi-scale convolution;

[0016] S5: Design a fusion module to fuse the outputs of the global and local modules, use a gating mechanism to dynamically adjust the weights of global and local features, and generate the final prediction results.

[0017] In the above solution, step S1 includes the following steps:

[0018] The above method is in S1, and the detailed steps of data processing are described as follows:

[0019] S12: Check the validity of historical data for indicators such as CPU utilization, memory utilization, disk I / O time, and disk space. If any of these indicators are negative, or if CPU utilization and memory utilization exceed 100%, these data will be considered abnormal and removed.

[0020] S13: The missing values ​​are processed using the N nearest neighbor mean method, where N is the preset number of neighbors;

[0021] S14: Downsampling the dataset. The sampling interval of the original dataset is randomly sampled every 1 to 60 seconds. The dataset is processed into 30-second sampling data with equal time intervals using the average aggregation method.

[0022] S15: Perform minimum-maximum normalization on the data set. The formula is as follows:

[0023]

[0024] Among them, X is the normalized value, X is the original data value, and X min and X max are the minimum and maximum values ​​of the feature, respectively.

[0025] The detailed steps of embedding the module in S2 are as follows:

[0026] To address the technical issue of how to effectively process multiple resource data and map them into a unified high-dimensional space so that subsequent modules can accurately extract temporal features and contextual information, the following S21 step is adopted to improve the accuracy and real-time performance of cloud resource prediction and enhance the effect of multi-source data fusion.

[0027] S21: Input data includes CPU utilization, memory utilization, network utilization, and disk IO resource data. For each input data, a fully connected layer is used to map it to a high-dimensional embedding space to obtain the embedded CPU utilization X cpu , memory utilization X mem , network utilization X net , Disk IO utilization X disk_io , the dimension of the embedded data is T×N×d, where T is the number of time steps, N is the number of nodes, and d is the embedding dimension;

[0028] S22: Process the time periodic data within a day and a week, and use the fully connected layer to map these periodic features to the same embedding space as the resource data. The embedded X day and X week The data also has dimensions T×N×d;

[0029] S23: Use standard Transformer position encoding to encode the time step so that the position encoding vector X p ∈R T×N×d It can be calculated by the following formula:

[0030]

[0031] Where t represents the time step, i represents the dimension of the position encoding, and d is the dimension of the embedding space;

[0032] S24: Integrate all embedded data through the sum operation to generate the final embedding vector X e ∈R T×N×d :

[0033]

[0034] In S3, the detailed steps of feature capture of the global module are described as follows:

[0035] S31: Model the global change trend of cloud resources based on the sparse attention mechanism. The specific strategy is as follows:

[0036] S311: Map the input data X through the fully connected layer to obtain the query matrix Q n , key matrix K n Sum matrix V n , the specific mapping relationship is as follows:

[0037]

[0038] where X :n: represents the input feature of the nth node, is the learned parameter matrix, which represents the mapping of query, key and value respectively;

[0039] S312: Calculate the dot product score matrix between the query and the key The formula is as follows:

[0040]

[0041] in Denotes the bond matrix K n The transpose of

[0042] S313: Select the most important U query-key pairs, and select the keys corresponding to the U queries with the highest scores by calculating the difference M between the maximum value and the mean value of the score matrix. The formula is as follows:

[0043]

[0044] in Represents the score matrix The maximum value in Represents the score matrix The mean of

[0045] S314: The selected query and key are weighted by the softmax function to obtain the attention output S1, which is as follows:

[0046]

[0047] Where Q represents the query matrix, K represents the key matrix, and V represents the value matrix. represents the scaling factor, and softmax represents the normalization function;

[0048] S315: Unselected keys will be replaced with a fixed average value S0, the formula is as follows:

[0049] S0=mean(V)

[0050] S316: The weighted combination of S1 and S0 is used to obtain the output S of sparse attention p , the formula is as follows:

[0051] S p =λS1+(1-λ)S0

[0052] Among them, λ is the weighting coefficient used to balance the influence of the two;

[0053] S32: Model the global change trend of cloud resources based on the multi-head self-attention mechanism. The specific strategy is as follows:

[0054] S321: Input data X e Mapped into multiple query matrices Q through the fully connected layer k , key matrix K k Sum matrix V k , the formula is as follows:

[0055]

[0056] in, is the parameter matrix of each attention head, k represents the index of the attention head;

[0057] S322: For each attention head, calculate the attention score matrix A k , the formula is as follows:

[0058]

[0059] S323: After calculating the weights through the softmax function, the output of each attention head is compared with the value matrix V k Multiply them together to get the output S of each head k , the formula is as follows:

[0060] S k =softmax(A k )·V k

[0061] S324: Concatenate the outputs of all attention heads and obtain the multi-head self-attention output S through linear transformation m , the formula is as follows:

[0062] S m =concat(S k1 ,..., S h )W0

[0063] Where W0∈R hd×d is the linear transformation matrix, h is the number of attention heads;

[0064] To address the technical challenges of efficiently modeling the global trends of cloud resources and fully exploiting long-term trends and periodic change data, the following S33 step was adopted. This achieved a significant improvement in the ability to capture the global trends of cloud resources by combining a sparse attention mechanism with a multi-head self-attention mechanism.

[0065] S33: The output of sparse attention S p And the output S of multi-head self-attention m Through the feedforward neural network processing, the global module output X is obtained G ∈R T×N×d , the formula is as follows:

[0066] X G =FFN(S p +S m ).

[0067] In S4 of the above method, the detailed steps of feature capture of the local module are described as follows:

[0068] S41: Use multi-scale convolution to capture short-term fluctuations in resource demand. The specific strategy is as follows:

[0069] S411: The input data is convolved through multiple convolution kernels with different receptive fields, and the size of each convolution kernel is W. k ∈R k×d , where k represents the size of the convolution kernel, d is the feature dimension, and multiple convolution scales k1, k2, ..., k h Next, the convolution output is Y1, Y2, ..., Y h , the formula is as follows:

[0070]

[0071] Among them, X t-i represents the input data at time step ti, W k,i is the convolution kernel weight corresponding to scale k;

[0072] S412: After concatenating the convolution outputs of different scales in S411, adjust the number of channels through a 1×1 convolution layer to obtain the final output Y of the multi-scale convolution m , the formula is as follows:

[0073] Y m =Conv2D(concat(Y1,Y2,...,Y h ))

[0074] Among them, Conv2D represents a two-dimensional convolution operation, and concat represents a concatenation operation;

[0075] In order to solve the problem of how to effectively capture the short-term fluctuation characteristics in resource demand, the following S42 step is adopted to dynamically adjust the feature weights of the multi-scale convolution output through the weighted fusion mechanism, thereby further improving the model's ability to capture short-term fluctuations and the accuracy of resource prediction.

[0076] S42: A weighted fusion mechanism is used to perform weighted processing on the output of the multi-scale convolution in S41. The formula is as follows:

[0077] X L =FFN(μ(r m )⊙σ(Y m ))

[0078] Where FFN represents the feedforward neural network, μ is the hyperbolic tangent function used to generate the aggregate information of the feature, σ is the Sigmoid function used to calculate the gate control, which dynamically controls the weight of the feature in the range of [0, 1]. Finally, the mean information and the gate value are weighted fused by element-by-element multiplication ⊙, and then passed through the feedforward neural network to obtain the weighted feature representation X L .

[0079] In order to solve the technical problem of how to effectively fuse the output information of the global module and the local module and dynamically adjust their weights to improve prediction performance, the following steps S51-52 are adopted to dynamically control the weighted ratio of global and local information, thereby optimizing the accuracy and stability of the cloud resource prediction model.

[0080] In S5 of the above method, the detailed steps of global and local module feature fusion are described as follows:

[0081] S51: Using a learned gating function g(X G , X L ) to generate the fusion weights of the global module and the local module output, and the gating function converts the output X of the global module G and the output X of the local module L After splicing, a linear transformation is performed through a fully connected layer, and then the fusion weight is calculated through the Sigmoid activation function. The specific formula is:

[0082] g(X G , X L )=σ(W g ·[X G , X L ]+b g )

[0083] Among them, W g ∈R d×d and b g ∈R dis the learned parameter, σ is the Sigmoid activation function, and the output of the gating function is a value between 0 and 1, which controls the weighted fusion ratio of the global module and the local module output;

[0084] S52: Perform weighted fusion according to the fusion weight of S51 to obtain the final fusion feature representation. The formula is as follows:

[0085] X fusion =g(X G , X L )·X L +(1-g(X G , X L ))·X G

[0086] Among them, X fusion ∈R T×N×d It is the fused output, combining global and local information.

[0087] Because the present invention adopts the above technical means, it has the following beneficial effects:

[0088] 1. Multidimensional Data Joint Embedding: The embedding module maps multiple resource data, time information, and location information into a high-dimensional space, effectively capturing the complex temporal relationships of resource demand. This module provides rich input features for subsequent global and local modules, enhancing the model's ability to process multidimensional data and improving the accuracy and timeliness of predictions.

[0089] 2. Global Feature Capture: Through the global encoder module, a dual attention mechanism is employed to effectively capture long-term trends and cyclical changes in cloud resource demand. This approach accurately identifies long-term fluctuations in resource demand, supports long-term resource scheduling strategies, and improves the accuracy of long-term predictions.

[0090] 3. Local Feature Capture: Through the local convolution module, multi-scale convolution is used to model short-term fluctuations and sudden changes in resource demand. This method can effectively capture instantaneous changes in resource load, thereby improving the ability to respond to sudden events and ensuring that the prediction results maintain high accuracy in the short term.

[0091] 4. Gating mechanism fusion: By gating and fusing the features of the global module and the local module, the model can simultaneously consider the influence of global and local features. The combination of the two effectively improves the overall prediction accuracy of the model.

[0092] 5. Parallel Architecture Accelerates Training and Prediction: A parallel architecture accelerates model training and prediction by processing both global and local features simultaneously. Compared to traditional serial processing, this design improves computational efficiency and shortens model training and prediction time, demonstrating greater responsiveness and computational efficiency, especially on large datasets.

[0093] In summary, the present invention significantly improves the accuracy and efficiency of cloud resource prediction through innovative embedded modules, combination of global and local modules, parallel structure design and feature fusion strategy, can better cope with the dynamically changing cloud computing environment, and is of great significance to the optimization of cloud resource management and scheduling. BRIEF DESCRIPTION OF THE DRAWINGS

[0094] Figure 1 A schematic diagram of the steps of a dual-module cloud resource prediction method based on deep learning provided for the implementation of the present invention;

[0095] Figure 2 A flowchart of establishing a prediction model in an example of the present invention;

[0096] Figure 3 A structural diagram of a prediction model established in an example of the present invention; DETAILED DESCRIPTION

[0097] The following is a detailed description of the embodiments of the present invention. Although the present invention will be described and illustrated in conjunction with certain specific embodiments, it should be noted that the present invention is not limited to these embodiments. On the contrary, modifications or equivalent substitutions of the present invention are intended to fall within the scope of the claims of the present invention.

[0098] In addition, in order to better illustrate the present invention, numerous specific details are given in the following detailed description. It will be understood by those skilled in the art that the present invention can also be implemented without these specific details.

[0099] The present invention proposes a dual-module cloud resource prediction method based on deep learning, comprising:

[0100] The present invention provides a dual-module cloud resource prediction method based on deep learning, comprising the following steps:

[0101] S1: Read the historical resource data of the cloud computing platform as a data set, remove outliers, fill missing values, resample and standardize the data set;

[0102] S2: Design an embedding module to map the pre-processed historical resource data and related auxiliary information into a high-dimensional vector space, so that subsequent global and local modules can more effectively extract temporal features and contextual information;

[0103] S3: Design a global module to extract global features from historical data and capture long-term trends and cyclical changes in resource demand through a dual attention mechanism;

[0104] S4: Design a local module to extract local features from historical data and capture short-term fluctuations in resource demand through multi-scale convolution;

[0105] S5: Design a fusion module to fuse the outputs of the global and local modules, use a gating mechanism to dynamically adjust the weights of global and local features, and generate the final prediction results.

[0106] The above method is in S1, and the detailed steps of data processing are described as follows:

[0107] S11: Collects historical time series data on resource usage of each host in the cloud computing platform cluster. This data includes CPU utilization, memory utilization, disk I / O time, and disk space metrics.

[0108] S12: Check the validity of historical time series data and remove abnormal data with negative values ​​or exceeding the threshold;

[0109] S13: The missing values ​​are processed using the N nearest neighbor mean method, where N is the preset number of neighbors. For example, if N is 2, the missing value at time t is filled with the average value of time t-2, t-1, t+1, and t+2.

[0110] S14: Downsampling the dataset. The sampling interval of the original dataset is randomly sampled every 1 to 60 seconds. The dataset is processed into 30-second sampling data with equal time intervals using the average aggregation method.

[0111] S15: Perform minimum-maximum normalization on the data set. The formula is as follows:

[0112]

[0113] Among them, X is the normalized value, X is the original data value, and X min and X max are the minimum and maximum values ​​of the feature, respectively.

[0114] The detailed steps of embedding the module in S2 are as follows:

[0115] S21: Input data includes CPU utilization, memory utilization, network utilization, and disk IO resource data. For each input data, a fully connected layer is used to map it to a high-dimensional embedding space to obtain the embedded CPU utilization X cpu , memory utilization X mem , network utilization X net , Disk IO utilization Xdisk_io , the dimension of the embedded data is T×N×d, where T is the number of time steps, N is the number of nodes, and d is the embedding dimension;

[0116] S22: In addition to the above resource utilization data, cloud resource load has significant time periodicity characteristics. Taking this characteristic into consideration, we further process the time periodicity data within a day and a week, and use a fully connected layer to map these periodic features into the same embedding space as the resource data. The embedded X day and X week The data also has dimensions T×N×d;

[0117] S23: In order to effectively represent the order of input data, the standard Transformer position encoding method is adopted. Specifically, the time step is encoded by sine and cosine functions, so that the position encoding vector X p ∈R T×N×d It can be calculated by the following formula:

[0118]

[0119] Where t represents the time step, i represents the dimension of the position encoding, and d is the dimension of the embedding space;

[0120] S24: Integrate all embedded data through the sum operation to generate the final embedding vector X e ∈R T ×N×d :

[0121]

[0122] In S3, the detailed steps of feature capture of the global module are described as follows:

[0123] S31: Model the global change trend of cloud resources based on the sparse attention mechanism. The specific strategy is as follows:

[0124] S311: Input data X e Mapping is performed through the fully connected layer to obtain the query matrix Q n , key matrix K n Sum matrix V n , the specific mapping relationship is as follows:

[0125]

[0126] where X :n: represents the input feature of the nth node, is the learned parameter matrix, which represents the mapping of query, key and value respectively;

[0127] S312: Calculate the dot product score matrix between the query and the key The formula is as follows:

[0128]

[0129] in Denotes the bond matrix K n The transpose of

[0130] S313: Select the most important U query-key pairs, and select the keys corresponding to the U queries with the highest scores by calculating the difference M between the maximum value and the mean value of the score matrix. The formula is as follows:

[0131]

[0132] in Represents the score matrix The maximum value in Represents the score matrix The mean of

[0133] S314: The selected query and key are weighted by the softmax function to obtain the attention output S1, which is as follows:

[0134]

[0135] Where Q represents the query matrix, K represents the key matrix, and V represents the value matrix. represents the scaling factor, and softmax represents the normalization function;

[0136] S315: Unselected keys will be replaced with a fixed average value S0, the formula is as follows:

[0137] S0=mean(V)

[0138] S316: The weighted combination of S1 and S0 is used to obtain the output S of sparse attention p , the formula is as follows:

[0139] S p =λS1+(1-λ)S0

[0140] Among them, λ is the weighting coefficient used to balance the influence of the two;

[0141] S32: Model the global change trend of cloud resources based on the multi-head self-attention mechanism. The specific strategy is as follows:

[0142] S321: Input data X e Mapped into multiple query matrices Q through the fully connected layer k , key matrix K k Sum matrix Vk , the formula is as follows:

[0143]

[0144] in, is the parameter matrix of each attention head, k represents the index of the attention head;

[0145] S322: For each attention head, calculate the attention score matrix A k , the formula is as follows:

[0146]

[0147] S323: After calculating the weights through the softmax function, the output of each attention head is compared with the value matrix V k Multiply them together to get the output S of each head k , the formula is as follows:

[0148] S k =softmax(A k )·V k

[0149] S324: Concatenate the outputs of all attention heads and obtain the multi-head self-attention output S through linear transformation m , the formula is as follows:

[0150] S m =concat(S k1 ,..., S h )W0

[0151] Where W0∈R hd×d is the linear transformation matrix, h is the number of attention heads;

[0152] S33: The output of sparse attention S p And the output S of multi-head self-attention m Through the feedforward neural network processing, the global module output X is obtained G ∈R T×N×d , the formula is as follows:

[0153] X G =FFN(S p +S m ).

[0154] In S4 of the above method, the detailed steps of feature capture of the local module are described as follows:

[0155] S41: Use multi-scale convolution to capture short-term fluctuations in resource demand. The specific strategy is as follows:

[0156] S411: The input data is convolved through multiple convolution kernels with different receptive fields, and the size of each convolution kernel is W. k ∈R k×d , where k represents the size of the convolution kernel, d is the feature dimension, and multiple convolution scales k1, k2, ..., k h Next, the convolution output is Y1, Y2, ..., Y h , the formula is as follows:

[0157]

[0158] Among them, X t-i represents the input data at time step ti, W k,i is the convolution kernel weight corresponding to scale k;

[0159] S412: After concatenating the convolution outputs of different scales in S411, adjust the number of channels through a 1×1 convolution layer to obtain the final output Y of the multi-scale convolution m , the formula is as follows:

[0160] Y m =Conv2D(concat(Y1,Y2,...,Y h ))

[0161] Among them, Conv2D represents a two-dimensional convolution operation, and concat represents a concatenation operation;

[0162] S42: A weighted fusion mechanism is used to perform weighted processing on the output of the multi-scale convolution in S41. The formula is as follows:

[0163] X L =FFN(μ(Y m )⊙σ(Y m ))

[0164] Where FFN represents the feedforward neural network, μ is the hyperbolic tangent function used to generate the aggregate information of the feature, σ is the Sigmoid function used to calculate the gate control, which dynamically controls the weight of the feature in the range of [0, 1]. Finally, the mean information and the gate value are weighted fused by element-by-element multiplication ⊙, and then passed through the feedforward neural network to obtain the weighted feature representation X L .

[0165] In S5 of the above method, the detailed steps of global and local module feature fusion are described as follows:

[0166] S51: Using a learned gating function g(X G , X L ) to generate the fusion weights of the global module and the local module output, and the gating function converts the output X of the global moduleG and the output X of the local module L After splicing, a linear transformation is performed through a fully connected layer, and then the fusion weight is calculated through the Sigmoid activation function. The specific formula is:

[0167] g(X G , X L )=σ(W g ·[X G , X L ]+b g )

[0168] Among them, W g ∈R d×d and b g ∈R d is the learned parameter, σ is the Sigmoid activation function, and the output of the gating function is a value between 0 and 1, which controls the weighted fusion ratio of the global module and the local module output;

[0169] S52: Perform weighted fusion according to the fusion weight of S51 to obtain the final fusion feature representation. The formula is as follows:

[0170] X fusion =g(X G , X L )·X L +(1-g(X G , X L ))·X G

[0171] Among them, X fusion ∈R T×N×d It is the fused output, combining global and local information.

[0172] Example

[0173] 1. Description of experimental dataset

[0174] We used seven consecutive days of resource usage data from 2,000 servers in the Alibaba Cloud public cluster dataset (cluster-trace-v2018) for training and testing. The dataset was divided into training, validation, and test sets in a 6:2:2 ratio. Table 1 describes the dataset fields.

[0175] Table 1: Dataset field description

[0176] Field Name Field Description machine_id The machine number that records the current data. time_stamp The timestamp of the recorded data, in seconds. cpu_util_percent The CPU usage of the machine. mem_util_percent The machine's memory usage. net_in The network ingress traffic of the machine. net_out The network egress traffic of the machine. disk_io_percent The machine's disk usage.

[0177] 2. Test environment description

[0178] The test used historical cloud resource data from the previous half hour to predict changes in cloud resource data for the next half hour. The model was trained using the AdamW optimizer with a learning rate of 0.001 and a batch size of 32 for 200 epochs. The model architecture had four layers, with a hidden layer dimension of 64. All experiments were conducted on an NVIDIA RTX 4090 GPU with 64GB of memory.

[0179] 3. Description of evaluation indicators

[0180] In order to comprehensively evaluate the effectiveness of the cloud resource prediction model, the experiment uses root mean square error (RMSE), mean absolute error (MAE), and mean absolute percentage error (MAPE) as evaluation indicators. The calculation formulas of the three indicators are as follows:

[0181]

[0182]

[0183] where y i is the true value, is the predicted value, and n represents the length of the time series. The smaller the values ​​of these three evaluation indicators, the smaller the error between the predicted value and the true value, and the higher the accuracy of the prediction result.

[0184] 3. Test Description

[0185] The present invention discloses a dual-module cloud resource prediction method based on a global encoder and a local convolution module. The core of the present invention is to combine the global and local modules, and improve the accuracy and real-time performance of cloud resource prediction by jointly learning global features and local features. Compared with traditional prediction methods, the present invention introduces a global encoder to extract global dependencies in the data, and captures local feature fluctuations in the data through a local convolution module, further improving the model's sensitivity to changes in cloud resource load. Through the effective fusion of global and local information, the model can provide more accurate and stable prediction results when processing cloud resource prediction tasks at different time scales. This verification test is mainly used to simulate actual application scenarios in cloud resource prediction tasks, evaluate the prediction performance of the present invention under various time spans, and verify that it has higher prediction performance than traditional models.

[0186] 1. Performance testing and result analysis

[0187] The performance of the proposed GE-LCNet model in cloud resource prediction tasks was comprehensively evaluated. Comparisons with traditional prediction models (such as RNN, TCN, LSTM, Transformer, and Informer) verified the superiority of GE-LCNet in prediction accuracy. Table 2 shows a comparison of evaluation metrics for different models after 24 time steps, including MAE, RMSE, and MAPE. Experimental results demonstrate that GE-LCNet outperforms other models across all evaluation metrics.

[0188] Table 2 Comparison of evaluation indicators of different models after 24 steps

[0189]

[0190]

[0191] 2. Module Testing and Result Analysis

[0192] In order to verify the contribution of each module to the performance of the GE-LCNet model, this paper conducted an ablation experiment by comparing the performance of the models after removing different modules with the complete model in terms of MAE, RMSE, and MAPE. The experimental setup includes the following four models:

[0193] GE-LCNet-noGlobal: Model without the global module.

[0194] GE-LCNet-noLocal: Model without local modules.

[0195] GE-LCNet-noEmb: Model without embedding module.

[0196] GE-LCNet: Complete GE-LCNet model.

[0197] Table 3 shows the comparison of evaluation indicators of the model after removing different modules after 24 steps. The results show that after removing the global module, the performance of the model drops significantly, indicating that the global module is crucial for capturing the overall features and trends in the data. After removing the local module, the model's ability to process local features weakens, resulting in performance degradation, which shows that the local module plays an indispensable role in capturing detailed information. After removing the embedding module, although the overall performance of the model is still acceptable, the performance has declined, indicating that the embedding module plays a key role in the feature mapping and conversion process. In summary, the effective combination of each module is the key to the efficient and accurate cloud resource prediction of the GE-LCNet model. Removing any module will significantly affect the performance of the model, verifying the importance of each module in the present invention.

[0198] Table 3 Comparison of evaluation indicators of different modules after 24 steps

[0199] Model MAE RMSE MAPE GE-LCNet-noGlobal 6.049 8.210 15.304 GE-LCNet-noLocal 5.700 7.967 15.152 GE-LCNet-noEmb 5.279 7.368 14.785 GE-LCNet 4.915 7.047 14.565

[0200] 3. Test Summary

[0201] This section conducts performance and module testing on the proposed method. Through a series of experimental comparisons, the effectiveness and advantages of the dual-module cloud resource prediction method based on a global encoder and a local convolutional module are verified. The experimental results show that the proposed method can significantly improve the accuracy of cloud resource load prediction, addressing the limitations of traditional models in capturing global and local features, thereby better meeting the needs of cloud computing resource scheduling and optimization.

Claims

1. A dual-module cloud resource prediction method based on deep learning, characterized in that: The following steps are involved: S1: Read the historical resource data of the cloud computing platform as a data set, remove outliers, fill missing values, resample and standardize the data set; S2: Design an embedding module to map the pre-processed historical resource data and related auxiliary information into a high-dimensional vector space, so that subsequent global and local modules can more effectively extract temporal features and contextual information; S3: Design a global module to extract global features from historical data and capture long-term trends and cyclical changes in resource demand through a dual attention mechanism; S4: Design a local module to extract local features from historical data and capture short-term fluctuations in resource demand through multi-scale convolution; S5: Design a fusion module to fuse the outputs of the global and local modules, use a gating mechanism to dynamically adjust the weights of global and local features, and generate the final prediction results.

2. The deep learning-based dual-module cloud resource prediction method according to claim 1, characterized in that: The step S1 comprises the following steps: S11: Collects historical time series data on resource usage of each host in the cloud computing platform cluster. This data includes CPU utilization, memory utilization, disk I / O time, and disk space metrics. S12: Check the validity of historical time series data and remove abnormal data with negative values ​​or exceeding the threshold; S13: The missing values ​​are processed using the N nearest neighbor mean method, where N is the preset number of neighbors; S14: Downsampling the dataset. The sampling interval of the original dataset is randomly sampled every 1 to 60 seconds. The dataset is processed into 30-second sampling data with equal time intervals using the average aggregation method. S15: Perform minimum-maximum normalization on the data set. The formula is as follows: Among them, X is the normalized value, X is the original data value, and X min and X max are the minimum and maximum values ​​of the feature, respectively.

3. The deep learning-based dual-module cloud resource prediction method according to claim 1, characterized in that: The step S2 comprises the following steps: S21: Input data includes CPU utilization, memory utilization, network utilization, and disk IO resource data. For each input data, a fully connected layer is used to map it to a high-dimensional embedding space to obtain the embedded CPU utilization X cpu , memory utilization X mem , network utilization X net , Disk IO utilization X disk_io , the dimension of the embedded data is T×N×d, where T is the number of time steps, N is the number of nodes, and d is the embedding dimension; S22: Process the time periodic data within a day and a week, and use the fully connected layer to map these periodic features to the same embedding space as the resource data. The embedded X day and X week The data also has dimensions T×N×d; S23: Use standard Transformer position encoding to encode the time step so that the position encoding vector X p ∈R T ×N×d It can be calculated by the following formula: Where t represents the time step, i represents the dimension of the position encoding, and d is the dimension of the embedding space; S24: Integrate all embedded data through the sum operation to generate the final embedding vector X e ∈R T×N×d :

4. The deep learning-based dual-module cloud resource prediction method according to claim 1, characterized in that: The global module models the global change trend of cloud resources based on the sparse attention mechanism and the multi-head self-attention mechanism. Step S3 includes the following steps: S31: Model the global change trend of cloud resources based on the sparse attention mechanism. The specific strategy is as follows: S311: Input data X e Mapping is performed through the fully connected layer to obtain the query matrix Q n , key matrix K n Sum matrix V n , the specific mapping relationship is as follows: Where X:n: represents the input feature of the nth node, is the learned parameter matrix, which represents the mapping of query, key and value respectively; S312: Calculate the dot product score matrix between the query and the key The formula is as follows: in Denotes the bond matrix K n The transpose of S313: Select the most important U query-key pairs, and select the keys corresponding to the U queries with the highest scores by calculating the difference M between the maximum value and the mean value of the score matrix. The formula is as follows: in Represents the score matrix The maximum value in Represents the score matrix The mean of S314: The selected query and key are weighted by the softmax function to obtain the attention output S1, which is as follows: Where Q represents the query matrix, K represents the key matrix, and V represents the value matrix. represents the scaling factor, and softmax represents the normalization function; S315: Unselected keys will be replaced with a fixed average value S0, the formula is as follows: S0=mean(V) S316: The weighted combination of S1 and S0 is used to obtain the output S of the sparse attention p , the formula is as follows: S p =λS1+(1-λ)S0 Among them, λ is the weighting coefficient used to balance the influence of the two; S32: Model the global change trend of cloud resources based on the multi-head self-attention mechanism. The specific strategy is as follows: S321: Input data X e Mapped into multiple query matrices Q through the fully connected layer k , key matrix K k Sum matrix V k , the formula is as follows: in, is the parameter matrix of each attention head, k represents the index of the attention head; S322: For each attention head, calculate the attention score matrix A k , the formula is as follows: S323: After calculating the weights through the softmax function, the output of each attention head is compared with the value matrix V k Multiply them together to get the output S of each head k , the formula is as follows: S k =soffmax(A k )·V k S324: Concatenate the outputs of all attention heads and obtain the multi-head self-attention output S through linear transformation m , the formula is as follows: S m =concat(S k1 ,...,S h )W0 Where W0∈R hd×d is the linear transformation matrix, h is the number of attention heads; S33: The output of sparse attention S p And the output S of multi-head self-attention m Through the feedforward neural network processing, the global module output X is obtained G ∈R T×N×d , the formula is as follows: X G =FFN(S p +S m ) FFN stands for Feed-Forward Neural Network.

5. The deep learning-based dual-module cloud resource prediction method according to claim 1, characterized in that: The step S4 comprises the following steps: S41: Use multi-scale convolution to capture short-term fluctuations in resource demand. The specific strategy is as follows: S411: The input data is convolved through multiple convolution kernels with different receptive fields, and the size of each convolution kernel is W. k ∈R k×d , where k represents the size of the convolution kernel, d is the feature dimension, and multiple convolution scales k1, k2, ..., k h Next, the convolution output is Y1, Y2, ..., Y h , the formula is as follows: Among them, X t-i represents the input data at time step ti, W k,i is the convolution kernel weight corresponding to scale k; S412: After concatenating the convolution outputs of different scales in S411, adjust the number of channels through a 1×1 convolution layer to obtain the final output Y of the multi-scale convolution m , the formula is as follows: AND m =Conv2D(concat(Y1,Y2,...,Y h )) Among them, Conv2D represents a two-dimensional convolution operation, and concat represents a concatenation operation; S42: A weighted fusion mechanism is used to perform weighted processing on the output of the multi-scale convolution in S41. The formula is as follows: X L =FFN(μ(Y m )⊙σ(Y m )) Where FFN represents the feedforward neural network, μ is the hyperbolic tangent function used to generate the aggregate information of the feature, σ is the Sigmoid function used to calculate the gate control, which dynamically controls the weight of the feature in the range of [0, 1]. Finally, the mean information and the gate value are weighted fused by element-by-element multiplication ⊙, and then passed through the feedforward neural network to obtain the weighted feature representation X L .

6. The deep learning-based dual-module cloud resource prediction method according to claim 1, characterized in that: The step S5 comprises the following steps: S51: Using a learned gating function g(X G , X L ) to generate the fusion weights of the global module and the local module output, and the gating function converts the output X of the global module G and the output X of the local module L After splicing, a linear transformation is performed through a fully connected layer, and then the fusion weight is calculated through the Sigmoid activation function. The specific formula is: g(X G ,X L )=σ(W g ·[X G ,X L ]+b g ) Among them, W g ∈R d×d and b g ∈R d is the learned parameter, σ is the Sigmoid activation function, and the output of the gating function is a value between 0 and 1, which controls the weighted fusion ratio of the global module and the local module output; S52: Perform weighted fusion according to the fusion weight of S51 to obtain the final fusion feature representation. The formula is as follows: X fusion =g(X G ,X L )·X L +(1-g(X G ,X L ))·X G Among them, X fusion ∈R T×N×d It is the fused output, combining global and local information.

Citation Information

Cited By

  • Soil physicochemical property downscaling method and device, computer equipment and medium

    CN121072346A

  • Cloud resource usage prediction method and system based on wavelet and attention mechanism

    CN121187896A

  • A Cloud Resource Usage Prediction Method and System Based on Wavelet and Attention Mechanisms

    CN121187896B

  • Method and device for determining yield predicted value and electronic equipment

    CN121503825A

  • Method and apparatus for determining yield prediction value, and electronic device

    CN121503825B