Cloud computing resource cost prediction method and system
By constructing a CV-BP neural network model to process and predict cloud computing resource costs, the problem of cloud computing cost uncertainty is solved, enabling enterprises to optimize and control costs.
Patent Information
- Application Number
- CN202410650532.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-24
- Publication Date
- 2024-09-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The complex pricing and elastic resources offered by cloud service providers lead to uncertainty in cloud computing costs, making it difficult for enterprises to effectively control costs without impacting business operations.
By collecting cloud computing resource cost data, a prediction model based on CV-BP neural network is constructed. Minkowski distance is used to handle missing features, data is cleaned and normalized, and K-fold cross-validation is combined to optimize model parameters, thereby achieving accurate prediction of cloud computing resource costs.
It enables cost budgeting and control in advance without affecting normal business operations, thereby optimizing enterprise cloud computing costs, improving resource utilization, and reducing operating costs.
Smart Images

Figure CN118628140A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cloud computing cost optimization, and in particular to a cloud computing resource cost prediction method and system. Background Art
[0002] According to the data of the Cloud Computing White Paper (2023) released by the China Academy of Information and Communications Technology, the global cloud computing market size will be US$491 million in 2022. It is expected that the global cloud computing market will continue to maintain steady growth under the stimulation of large models, computing power and other demands, and the global cloud computing market will exceed US$1 trillion by 2026. In 2022, the scale of my country's cloud computing market will reach 455 million yuan, an increase of 40.91% over 2021. It is expected that the overall market size of my country's cloud computing will exceed 1 trillion yuan in 2025. Compared with the IT cost of self-built computer rooms, cloud computing can reduce the IT investment cost of enterprises. By putting their own applications on the cloud, enterprises can hand over the optimization, maintenance and repair of IT equipment to cloud vendors, avoiding the investment of enterprises in IT service management expenses, thereby optimizing and reducing IT costs. In addition, cloud computing can help enterprises improve IT efficiency and flexibility. Through cloud computing, enterprises can better manage their IT resources and implement scalable and customizable IT solutions. Cloud computing also supports enterprises to quickly deploy and manage new IT applications and services, and quickly build or reduce their IT infrastructure according to actual needs. The rapid development of the cloud computing industry has promoted the continuous deepening of the process of enterprises moving to the cloud and using the cloud. More and more enterprises have begun to adopt cloud computing to support their businesses and solve the problems of information technology infrastructure and resource management. According to Gartner data, more than 80% of enterprises use cloud service-based technologies or infrastructure. The demand for enterprises to move to the cloud and use the cloud has gradually increased. Efficiency, performance, security, etc. have become important concerns of users. Cost optimization has become an important challenge faced by enterprises in deploying and operating businesses on the cloud. Cost optimization can maximize resource utilization and reduce operating costs through effective management of cloud computing resources.
[0003] However, cloud service providers usually provide a variety of service options such as virtual machine instances, storage options, and network configurations, each of which has a different pricing method and rate structure. In addition, cloud service providers have flexible resource expansion and contraction and resource elasticity. It is of great significance to optimize cloud costs based on the complex pricing and usage patterns of cloud service providers and elastic cloud computing resources, and better help enterprises control costs without affecting the normal operation and development of their businesses. Summary of the invention
[0004] The purpose of the present invention is to provide a cloud computing resource cost prediction method and system.
[0005] In order to solve the above problems, the present invention provides a cloud computing resource cost prediction method and system, including: collecting cloud computing resource cost data; processing the cloud computing resource cost data; using the processed data to build a prediction model; and predicting cloud computing costs based on the prediction model.
[0006] Methods for collecting cloud computing resource cost data include:
[0007] A cloud computing resource cost dataset D is collected. Each data record in the dataset is an N-dimensional feature vector, including N feature parameters, such as but not limited to the use date of cloud computing resources, service type, service model, payment type, usage duration, host location, usage period historical data and real-time data. The basic data and real-time data required in each database are packaged into a data view, and connected with all databases to store all the required basic data and real-time data in the corresponding target data table.
[0008] The data in the cloud computing resource cost dataset D is processed by the following method:
[0009] Determine the validity of data records in the cloud computing resource dataset D to determine the data processing method, that is,
[0010] The cloud computing resource cost data is the cost data generated by users using cloud resources and cloud services on the public cloud platform, which is an N-dimensional feature vector X; the i-th sample is X i ={x i1 ,x i2 ,…,x ik ,…,x iN}. The validity of the data is verified to obtain the data set D', that is, when X i If there are missing features in and the proportion of missing features is higher than the threshold Th, it is invalid data and the data record is deleted from the data set D; otherwise, it is valid data and the data record is retained.
[0011] All feature vectors in the data set D' are processed with zero mean and normalization to eliminate the differences in the values of each feature and obtain the data set D".
[0012] When the data record X in D i If there are missing elements, we can obtain M nearest neighbors based on the Minkowski distance, weight the feature vectors in the M nearest neighbors, and calculate the value of the missing feature to obtain the processed data set D. P The specific method is to assume that the K cloud computing resource cost data feature vectors in the data set D” are X1~X K , where the i-th eigenvector X i The vth eigenvalue x iv If missing, then Xi With complete data X j The Minkowski distance of is: Calculate the feature vector X with missing features i With each complete data X j The Minkowski distance between them is calculated, and M complete data are selected from small to large according to the Minkowski distance to form the feature vector X i The M nearest neighbors of , the elements in the M nearest neighbors are The vth feature corresponding to the complete data in the M nearest neighbor is weighted averaged as X i The corrected value xiv of the vth feature of the vector is Using D P The data in the training is used to obtain the cloud computing resource cost prediction model. The specific method is as follows:
[0013] The K-fold cross validation algorithm is used to optimize the parameters of the S-layer BP neural network with N input neurons and 1 output neuron, thereby obtaining a cloud computing resource prediction model based on the CV-BP algorithm. K-fold cross validation is to process the processed data set D P Divide it into K parts, take K-1 parts as training sets, and take the remaining 1 part as test set until K cycles are completed. The average of the results of K verifications is taken as the model parameters of the BP neural network, that is, Where E k is the test error of the K-th fold. P As training data, the CV-BP neural network model for cloud computing resource cost prediction is obtained after training:
[0014]
[0015] Where x is the input feature vector, is the estimated output corresponding to the input feature vector, w is the weight between the neural network layers, and θ is the bias. The training model optimizes the parameters w and θ so that the output prediction value The error between the actual value y and the target error accuracy δ. w←w+Δw, η is the learning rate, E is the predicted value The error between θ and the actual value y. The update process of θ is θ←θ+Δθ. When E≤δ, the prediction model training is completed.
[0016] Use the prediction model to predict the cost of cloud computing resources. Input the neural network, and the model returns the predicted cloud computing resource cost y F .
[0017] On the other hand, the present invention also provides a cloud computing resource cost prediction system, comprising:
[0018] Collection module, collects historical data of cloud computing resource costs;
[0019] A processing module processes the historical data of cloud computing resource costs;
[0020] a data modeling module to establish a prediction model based on the processed cloud computing resource cost data; and
[0021] The prediction module takes the feature vector to be predicted as the input of the prediction model, and the output obtained after the prediction module's calculation and processing is the predicted cloud computing resource cost.
[0022] The beneficial effect of the present invention is that the proposed prediction method and system can make cost predictions in advance through a prediction module based on historical cloud computing resource cost data, combined with usage date, service type, service model, payment type, usage duration, usage period, and the region where the cloud resources are located, thereby effectively solving the cost uncertainty problem caused by the complex pricing, diverse usage patterns, and elastic cloud computing resources of cloud service providers. On the basis of not affecting the normal operation and development of the business, it helps enterprises to carry out cost budgeting and cost control in advance, which is of great significance to the cost optimization of enterprise cloud use. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0024] Figure 1 It is a flow chart of cloud computing resource cost prediction of the present invention.
[0025] Figure 2 It is a module diagram of the cloud computing resource cost prediction system of the present invention. DETAILED DESCRIPTION
[0026] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0027] like Figure 1 As shown, the present invention provides a cloud computing resource cost prediction method, comprising the following steps:
[0028] Step S1, establishing a neural network prediction model;
[0029] Step S2, performing cost prediction using a prediction model.
[0030] Preferably, the method of establishing a neural network prediction model in step S1 includes:
[0031] Step S11, collecting cloud computing resource cost data;
[0032] The required sample data include: cloud computing resource usage date, service type, service model, payment type, usage duration, host location, and usage period.
[0033] S12. Process the cloud computing resource cost data; and use the processed data to build a CV-BP neural network prediction model.
[0034] The method for processing the cloud computing resource cost data in step S12 includes:
[0035] S12-1: Determine the validity of the data records in the cloud computing resource data set D. If there are missing features in the data record in the data set and the proportion of missing features is higher than the threshold Th, it is invalid data and the data record is deleted from the data set D; otherwise, it is valid data and the data record is retained to obtain the data set D'.
[0036] S12-2: Perform zero mean and normalization processing on the data set D' after deleting invalid data to eliminate the differences in the values of each feature quantity, thereby obtaining the data set D".
[0037] S12-3: For data records with missing elements, obtain M nearest neighbors according to the Minkowski distance, weight the feature vectors in the M nearest neighbors, and calculate the value of the missing feature to obtain the processed data set D p .
[0038] The method for obtaining M nearest neighbors according to the Minkowski distance is:
[0039] The K cloud computing resource cost data feature vectors in the dataset D” are X1~X K , where the i-th eigenvector X i The vth eigenvalue x iv If missing, then X i With complete data X j The Minkowski distance of is: Calculate the feature vector X with missing features i With each complete data X j The Minkowski distance between them is calculated, and M complete data are selected from small to large according to the Minkowski distance to form the feature vector X i The M nearest neighbors of are used as the correction value of the missing features after weighted average of the elements in the M nearest neighbors.
[0040] In step S12, the method of constructing a CV-BP neural network prediction model using the processed data is:
[0041] The K-fold cross validation algorithm is used to optimize the S-layer BP neural network with N input neurons and 1 output neuron to obtain the CV-BP neural network model. P Divide it into K parts, take K-1 parts as training sets, and take the remaining 1 part as test set until K cycles are completed. The average of the results of K verifications is taken as the model parameters of the BP neural network, that is, Where E k is the test error of the K-th fold.
[0042] The method of weighted averaging of elements in the M nearest neighbors is:
[0043] The elements in the M nearest neighbors are Take the weighted average of the vth feature corresponding to the complete data in the M nearest neighbors, that is x iv As X i Corrected value of the vth feature of the vector.
[0044] The processed data set D P As training data, the CV-BP neural network model for cloud computing resource cost prediction is obtained after training:
[0045]
[0046] Where x is the input feature vector, is the estimated output corresponding to the input feature vector, w is the weight between the neural network layers, and θ is the bias. The training model optimizes the parameters w and θ so that the output prediction value The error between the actual value y and the target error accuracy δ. w←w+Δw, η is the learning rate, E is the predicted value The error between θ and the actual value y. The update process of θ is θ←θ+Δθ. When E≤δ, the prediction model training is completed.
[0047] Specifically, each cloud computing resource cost data of the cloud computing service platform is collected by the data collection module and stored in the database as samples for predictive model training. With the accumulation of collected data and stored data, the number of model training samples continues to increase. The cost of cloud computing resources is predicted based on the mathematical model, so that enterprises can understand the cost of cloud computing in advance when using the cloud, thereby helping enterprises to optimize and control costs.
[0048] Example 2
[0049] Based on Example 1, the present invention also provides a cloud computing resource cost prediction system.
[0050] like Figure 2 As shown, the prediction system includes:
[0051] Data collection unit, which is used to build sample data required for neural network prediction model;
[0052] A data processing unit connected to the data acquisition unit processes the collected historical data so that the data meets the requirements of the subsequent neural network modeling unit;
[0053] The neural network modeling and prediction unit is suitable for establishing a neural network prediction model based on the processed sample data, and predicting the cloud computing resource costs through the neural network prediction model.
[0054] Each input port of the data acquisition unit is connected to the SDK interface opened by the public cloud to obtain the historical data of the use date, service type, service model, payment type, use time, host location, use period, and cloud computing resource fee of the cloud computing resources and the real-time data of the use date, service type, service model, payment type, use time, host location, and use period of the cloud computing resources;
[0055] The neural network modeling and prediction unit is suitable for training the neural network prediction model by using the cloud computing resource usage date, service type, service model, payment type, usage duration, host location, usage period, and cloud resource cost history data as sample data;
[0056] The neural network modeling and prediction unit is suitable for taking the usage date, service type, service model, payment type, usage duration, host location, and usage period of cloud computing resources as input data, using a neural network prediction model to make predictions, and obtaining cloud resource costs as output.
[0057] Preferably, the system further comprises: a data storage unit, which is connected to the data acquisition unit to store the data collected by the data acquisition module to form data samples for the neural network modeling unit to perform modeling.
[0058] With the above and the ideal embodiments of the present invention as inspiration, through the above description, relevant personnel can make various changes and modifications without departing from the technical concept of the present invention. The technical scope of the present invention is not limited to the contents of the specification, and its technical scope must be determined according to the scope of the claims.
Claims
1. A cloud computing resource cost prediction method, characterized in that: The steps include: S1. Establish a neural network prediction model; S2. Cost forecasting through prediction model.
2. A cloud computing resource cost prediction method according to claim 1, characterized in that: The establishment of the neural network prediction model comprises the following steps: S11. Collect cloud computing resource cost data; The required sample data includes: the date of use of cloud computing resources, service type, service model, payment type, usage duration, usage period, and the region where the cloud resources are located; S12. Process the cloud computing resource cost data; and use the processed data to build a CV-BP neural network prediction model.
3. A cloud computing resource cost prediction method according to claim 2, characterized in that: The method for processing cloud computing resource cost data comprises the following steps: S12-1, judging the validity of the data records in the cloud computing resource data set D, that is, when the data records in the data set have missing features and the proportion of the missing features is higher than the threshold Th, it is invalid data and the data record is deleted from the data set D; otherwise, it is valid data and the data record is retained to obtain the data set D'; S12-2, performing zero mean processing and normalization processing on the data set D' after deleting invalid data, eliminating the difference in the value of each feature, and obtaining the data set D"; S12-3. For data records with missing elements in the data set D', the M nearest neighbors are obtained according to the Minkowski distance, the feature vectors in the M nearest neighbors are weighted, and the value of the missing feature is calculated to obtain the processed data set D P ; The method of constructing the CV-BP neural network prediction model using the processed data is: The K-fold cross validation algorithm is used to optimize the parameters of the S-layer BP neural network with N input neurons and 1 output neuron. p Divide it into K parts, take K-1 parts as training sets in a loop, and use the remaining 1 part as test set, until K cycles are completed, and take the average of K verification results as the model parameters of BP neural network.
4. A cloud computing resource cost prediction method according to claim 3, characterized in that: The method for obtaining M nearest neighbors according to the Minkowski distance is: The feature vectors corresponding to the K data records in the data set D” are X1~X K , where the i-th eigenvector X i The vth eigenvalue x iv Missing, calculate the feature vector X with missing features i With each complete data feature vector X j The Minkowski distance between them is calculated, and M complete data are selected from small to large according to the Minkowski distance to form the feature vector X i The M nearest neighbors of are used as the correction value of the missing features after weighted average of the elements in the M nearest neighbors.
5. A cloud computing resource cost prediction method according to any one of claims 2 or 3, characterized in that: The CV-BP neural network prediction model is: Where x is the input feature vector, is the estimated output corresponding to the input feature vector, w is the weight between the neural network layers, θ is the bias, and the training model optimizes the parameters w and θ so that the output prediction value The error between the actual value y reaches the target error accuracy δ, w←w+Δw, η is the learning rate, E is the predicted value The error between the actual value y and the update process of θ is θ←θ+Δθ. When E≤δ, the prediction model training is completed.
6. A cloud computing resource cost prediction system, which uses any one of the cloud computing resource cost prediction methods as claimed in claims 1 to 5 to predict the cloud computing resource cost, characterized in that: include Data collection unit, which is used to build sample data required for neural network prediction model; The data processing unit connected to the data acquisition unit processes the collected data so that the data meets the requirements of the input and output data of the subsequent prediction unit; The neural network modeling and prediction unit is suitable for establishing a neural network prediction model based on the processed sample data, and predicting the cloud computing resource costs through the neural network prediction model.
7. A cloud computing resource cost prediction system according to claim 6, characterized in that: Each input port of the data acquisition unit is connected to the SDK interface opened by the public cloud to obtain the usage date, service type, service model, payment type, usage time, host location, usage period historical data and real-time data of cloud computing resources.
8. A cloud computing resource cost prediction system according to claim 6, characterized in that: The neural network modeling and prediction unit is suitable for training the neural network prediction model by using the cloud computing resource usage date, service type, service model, payment type, usage time, host location, usage period, and cloud resource fee as sample data.
9. A cloud computing resource cost prediction system according to claim 6, characterized in that: The neural network modeling and prediction unit is suitable for taking the usage date, service type, service model, payment type, usage duration, host location, and usage period of cloud computing resources as input data, using a neural network prediction model to make predictions, and obtaining cloud resource costs as output.
