Cloud resource cost optimization method and device, electronic equipment, medium and program product
By determining the allocation objects and collecting cost data in cloud resource management, and adjusting resource configuration using the cost prediction model, the problems of resource waste and inaccurate cost optimization in traditional cloud resource management solutions are solved, and effective optimization of cloud resource costs is achieved.
Patent Information
- Application Number
- CN202510086612.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-05-13
AI Technical Summary
Traditional cloud resource management solutions have problems such as resource waste and inaccurate cost optimization strategies, resulting in excessive and unnecessary waste of cloud resource costs.
By determining the allocation object and share proportion of cloud resource costs based on the cost bill of the target system, the cost data is collected based on the preset cloud resource cost model, input it into the cost prediction model to obtain the predicted cost data, and adjust the node scheduling and container load configuration based on the predicted cost data to optimize cloud resource costs.
It effectively avoids unnecessary resource waste, improves resource utilization, enhances the accuracy of cost optimization strategies, and achieves sustainable optimization of cloud resource costs.
Smart Images

Figure CN119987944A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing technology, and in particular to a cloud resource cost optimization method, device, electronic device, computer-readable storage medium, and computer program product. Background Art
[0002] Currently, more and more organizations and enterprises are migrating their businesses and data to the cloud, indicating an increasing demand for richer, more flexible and scalable services. However, this also brings challenges such as the cost complexity and uncertainty of cloud resources, which can easily lead to unnecessary waste of cloud resources and excessively high costs of cloud resources.
[0003] Traditional cloud resource management solutions are mainly managed from the perspective of cloud resource utilization. Although they can maximize the utilization of cloud resources to a certain extent, they do not take into account the cost of cloud resources. From the perspective of cloud resource cost, traditional solutions usually redundantly use additional cloud resources in pursuit of system stability, resulting in resource waste and high costs. Moreover, from the perspective of the cloud resource cost organizational structure, the teams or organizations to which cloud resources belong cannot clearly understand the specific cost allocation information. The traditional method of cost allocation from the perspective of cloud resources alone lacks an effective and intuitive cloud cost management strategy, which makes the basic data of cloud resource management incomplete, and thus leads to inaccurate cloud resource cost optimization strategies.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of this application is to provide a cloud resource cost optimization method, device, electronic device, computer-readable storage medium and computer program product, aiming to solve the technical problems of resource waste and inaccurate cost optimization strategies in traditional cloud resource management solutions.
[0006] To achieve the above objectives, the present application proposes a cloud resource cost optimization method, which includes:
[0007] Determine, according to the cost bill of the target system, the allocation objects of the cloud resource costs in the target system and the allocation ratios corresponding to the allocation objects;
[0008] Based on a preset cloud resource cost model and the apportionment ratio of each apportionment object, collecting cost data of each apportionment object of the target system;
[0009] Inputting the cost data into a preset cost prediction model to obtain predicted cost data;
[0010] According to the predicted cost data, node scheduling and container load configuration of the target system are adjusted to optimize the cloud resource cost of the target system.
[0011] In one embodiment, the step of determining the allocation objects of the cloud resource costs in the target system and the allocation ratios corresponding to the allocation objects respectively according to the cost bill of the target system includes:
[0012] Splitting the cost bill of the target system into multiple dimensions based on a time period, obtaining allocation objects corresponding to each dimension and resource information of each allocation object, wherein each allocation object includes at least an organization;
[0013] The apportionment ratio of each apportionment object is determined according to the resource information of each apportionment object, wherein the more resources the resource information of the apportionment object corresponds to, the greater the corresponding apportionment ratio.
[0014] In one embodiment, the cost data at least includes actual apportioned costs, and the step of collecting the cost data of each of the apportioned objects of the target system based on a preset cloud resource cost model and an apportionment ratio of each of the apportioned objects includes:
[0015] Collecting indicator information of resource objects in each cluster of the target system, wherein the indicator information at least includes the price of each type of node, the actual usage of resources of each node under the corresponding type, and the node capacity;
[0016] Calculating the actual total cost of the nodes of the target system according to the indicator information of the resource object;
[0017] The actual total cost of the node is matched based on time and the apportionment ratio of each apportionment object to obtain the actual apportionment cost of each apportionment object.
[0018] In one embodiment, the step of collecting indicator information of resource objects in each cluster in the target system includes:
[0019] By using the data collection tools deployed in each cluster, the indicator information of the resource objects in each cluster of the target system is collected based on the preset collection granularity;
[0020] The indicator information of the resource objects in each cluster is aggregated by a data collection tool deployed in the control cluster to obtain the indicator information of the resource objects in each cluster in the target system.
[0021] In one embodiment, before the step of inputting the cost data into a preset cost prediction model to obtain predicted cost data, the method further includes:
[0022] Generate noise amount based on preset variance and noise generation formula;
[0023] Decomposing the cost data into stable data and abrupt change data by using a preset VDM model;
[0024] The noise amount is added to the abrupt change data to obtain updated abrupt change data, and the updated abrupt change data and the stable data are used as cost data to be input into the cost prediction model.
[0025] In one embodiment, the cost prediction model includes at least an LSSVM model, and the step of inputting the cost data into a preset cost prediction model to obtain predicted cost data includes:
[0026] Inputting the updated abrupt change data and the stable data into a preset LSSVM model respectively, to obtain prediction data corresponding to the updated abrupt change data and the stable data respectively;
[0027] The prediction data corresponding to the updated abrupt change data and the stable data are combined to obtain prediction cost data.
[0028] In one embodiment, the step of adjusting the node scheduling and container load configuration of the target system according to the predicted cost data includes:
[0029] Marking the node properties of each cluster node in the target system to obtain a label for each cluster node, wherein the label includes at least one of CPU intensive, memory intensive, storage intensive, and gateway bandwidth intensive;
[0030] Scheduling each of the cluster nodes based on the label of each of the cluster nodes and the corresponding container running tasks;
[0031] According to the predicted cost data of each allocation object, determine the actual usage and requested usage corresponding to each cluster node;
[0032] When the requested usage of the cluster node is greater than the actual usage, scheduling the cluster node;
[0033] When the actual usage of the cluster node is greater than a first preset threshold, rescheduling containers whose actual usage is lower than a second preset threshold to other nodes in the target system, wherein the first preset threshold is greater than the second preset threshold;
[0034] The container load configuration of the target system is expanded or reduced according to the predicted cost data of each allocation object.
[0035] In addition, to achieve the above purpose, the present application also proposes a cloud resource cost optimization device, the cloud resource cost optimization device comprising:
[0036] An allocation determination module is used to determine the allocation objects of the cloud resource costs in the target system and the allocation proportions corresponding to the allocation objects according to the cost bill of the target system;
[0037] A cost collection module, used to collect cost data of each of the apportionment objects of the target system based on a preset cloud resource cost model and the apportionment ratio of each of the apportionment objects;
[0038] A cost prediction module, used for inputting the cost data into a preset cost prediction model to obtain predicted cost data;
[0039] A parameter adjustment module is used to adjust the node scheduling and container load configuration of the target system according to the predicted cost data to optimize the cloud resource cost of the target system.
[0040] In addition, to achieve the above-mentioned purpose, the present application also proposes an electronic device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the cloud resource cost optimization method as described above.
[0041] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the cloud resource cost optimization method described above are implemented.
[0042] In addition, to achieve the above objectives, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the cloud resource cost optimization method described above are implemented.
[0043] The present application proposes a cloud resource cost optimization method, which includes: first, according to the cost bill of the target system, determining the apportionment objects of the cloud resource cost in the target system and the apportionment ratios corresponding to each of the apportionment objects, so that the cloud resource cost is associated with the apportionment object, which is convenient for reference in cloud resource cost optimization, and then based on the preset cloud resource cost model and the apportionment ratios of each of the apportionment objects, collecting the cost data of each of the apportionment objects in the target system, the cost data of each apportionment object in the target system can provide data decision basis for subsequent cost optimization strategies, and then inputting the cost data into the preset cost prediction model to obtain predicted cost data, and performing cost prediction through the currently collected cost data to obtain predicted cost data representing the cost situation in the future period of time, as the data basis for the current cost optimization, providing reliable data guidance for cost optimization, and finally adjusting the node scheduling and container load configuration of the target system according to the predicted cost data to optimize the cloud resource cost of the target system. Compared with the traditional solution that adopts the resource configuration adjustment solution in the resource adjustment strategy, it solves the problem of unreasonable resource allocation to a certain extent, but there is still room for optimization. The technical solution of this application adjusts resource costs through various means such as node scheduling strategy optimization during cloud service container deployment and container load configuration strategy optimization, which can maximize the value of resource utilization. Moreover, the technical solution of this application optimizes parameters from the perspective of cloud resource costs, effectively avoiding unnecessary waste of resources, and allocates costs from the perspective of allocation objects, so that the cloud resource costs can all be determined to the corresponding allocation objects, intuitively and effectively showing the structure of cloud resource costs and improving the accuracy of cost optimization strategies. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0045] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0046] Figure 1 A flowchart of the first embodiment of the cloud resource cost optimization method of the present application is provided;
[0047] Figure 2 This is a schematic diagram of a structure for collecting indicator information of resource objects in each cluster in the target system in an embodiment of the present application;
[0048] Figure 3This is a schematic diagram of the overall principle of a method for implementing cloud resource cost optimization in an embodiment of the present application;
[0049] Figure 4 This is a schematic diagram of the structure of a cloud resource cost optimization device in an embodiment of the present application;
[0050] Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the cloud resource cost optimization method in the embodiment of the present application.
[0051] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0052] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0053] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0054] The execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, a server, etc., or an electronic device or a control device capable of realizing the above functions. The following takes the server as an execution subject as an example to illustrate this embodiment and the following embodiments.
[0055] The purpose of the embodiment of this application is to provide a cloud resource cost optimization method for the target system, which can be tightly integrated with the K8s (Kubernetes, a container orchestration engine) ecosystem. This method can solve the problem of cloud native cost governance difficulties in enterprises going to the cloud, facilitate implementation, understand the cloud cost distribution of each cost sharing object in the system, combine the cost prediction model to perform cost prediction, and adjust and optimize node scheduling and container load configuration through the obtained predicted cost data, thereby avoiding the impact of reduced business stability caused by traditional expansion and contraction resource optimization strategies, and achieving sustainability of cost optimization.
[0056] The present application embodiment provides a cloud resource cost optimization method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the cloud resource cost optimization method of the present application, and the cloud resource cost optimization method includes:
[0057] Step S10, determining the allocation objects of the cloud resource costs in the target system and the allocation ratios corresponding to the allocation objects according to the cost bill of the target system;
[0058] First of all, the cloud resource cost optimization method of the embodiment of the present application can be applied in a cloud-native K8s environment, and the target system is a cross-cluster resource system in a cloud-native K8s environment, wherein cloud-native refers to a distributed cloud with application containerization, microservices, container orchestration, declarative API (Application Programming Interface), and service grid. It is a method of building and running applications, and a set of technical systems and methodologies. It is understandable that an application system that conforms to the cloud-native architecture should have a microservice architecture as the basis, open source stack (kubernetes+docker) containerization as the means, and CI (Continuous Integration) / CD (Continuous Deployment) capabilities are realized with the help of agile methods and DevOps (a combination of Development and Operations), and elastic scaling, dynamic scheduling and other capabilities are realized using the cloud platform.
[0059] It should be noted that the cost bill of the target system is used to characterize the cloud resource cost expenditure corresponding to various resource objects of the above-mentioned system. The apportionment object refers to the specific team or organization determined when performing cloud resource cost optimization management. The apportionment object can be defined according to actual business needs. In the embodiment of the present application, it is necessary to determine the various apportionment objects involved in the target system and the apportionment ratio of each apportionment object (expressed as a percentage) to provide a data basis for the subsequent determination of the cost data of each apportionment object.
[0060] Step S20, based on the preset cloud resource cost model and the apportionment ratio of each apportionment object, determining the cost data of each apportionment object of the target system;
[0061] Among them, cloud resource cost is a pre-established model for calculating the cost data corresponding to the resources in the system. It can calculate the actual usage cost according to the resource situation in the system, and calculate the cost data of each apportionment object based on the apportionment ratio of each apportionment object.
[0062] It should be noted that the cost data of the allocation object determined in step S20 refers to the cost data corresponding to the current time node of the target system.
[0063] Step S30, inputting the cost data into a preset cost prediction model to obtain predicted cost data;
[0064] Further forecasting and analyzing the collected cost data can provide data decision-making basis for cost management optimization strategy. The characteristics of cost data include periodicity, non-periodicity, irregularity, bursting within a period of time, and non-negative data.
[0065] In addition, the cost prediction model is a pre-trained machine learning model based on statistical learning theory, which is mainly used for classification and regression analysis. It predicts the predicted cost data corresponding to each apportionment object in the future based on the current cost data, so as to optimize the cloud resource cost based on the predicted cost data.
[0066] It is understandable that after obtaining the predicted cost data for a period of time in the future, it can be used as a basis to determine in the target system which resource objects of the allocated objects have poor input-output data. Poor data means that the output corresponding to the cost invested in a certain allocated object does not meet expectations, for example, the ratio of input to output is greater than 1, or the input is greater than the output. The resource objects of these further allocated objects can be optimized to improve resource utilization and reduce total cloud resource cost expenditure.
[0067] Step S40: adjusting the node scheduling and container load configuration of the target system according to the predicted cost data to optimize the cloud resource cost of the target system.
[0068] Finally, with the predicted cost data as a reference, we can analyze which shared objects in the target system still have room for optimization in terms of node scheduling and / or container load configuration, so as to adjust the node scheduling and container load configuration of these shared objects in the target system, with the optimization goal of improving resource utilization and reducing cloud resource costs.
[0069] For example, the cloud application container load configuration can be dynamically adjusted based on resource prediction data, through HPA (Horizontal Pod Autoscaler, elastic expansion and contraction based on predicted values), HPC (High Performance Computing, scheduled elastic expansion and contraction based on the periodicity of predicted values), and VPA (Vertical Pod Autoscaler, adjusting the resource application amount of the application container).
[0070] The embodiment of the present application proposes a cloud resource cost optimization method, which includes: first, according to the cost bill of the target system, determining the apportionment objects of the cloud resource cost in the target system and the apportionment ratios corresponding to each of the apportionment objects, so that the cloud resource cost is associated with the apportionment object, which is convenient for reference in cloud resource cost optimization, and then based on the preset cloud resource cost model and the apportionment ratios of each of the apportionment objects, collecting the cost data of each of the apportionment objects in the target system, the cost data of each apportionment object in the target system can provide a data decision basis for the subsequent cost optimization strategy, and then inputting the cost data into the preset cost prediction model to obtain the predicted cost data, and performing cost prediction through the currently collected cost data to obtain the predicted cost data representing the cost situation in the future period of time, as the data basis for the current cost optimization, providing reliable data guidance for cost optimization, and finally adjusting the node scheduling and container load configuration of the target system according to the predicted cost data to optimize the cloud resource cost of the target system. Compared with the traditional solution that adopts the resource configuration adjustment solution in the resource adjustment strategy, it solves the problem of unreasonable resource allocation to a certain extent, but there is still room for optimization. The technical solution of the embodiment of the present application adjusts the resource cost through various means such as node scheduling strategy optimization and container load configuration strategy optimization during cloud service container deployment, which can maximize the value of resource utilization. Moreover, the technical solution of the embodiment of the present application optimizes from the perspective of cloud resource cost, avoiding unnecessary waste of resources, and allocates costs from the perspective of allocation objects, so that the cloud resource cost can determine the corresponding allocation object, intuitively and effectively displaying the structure of cloud resource cost, and improving the accuracy of cost optimization strategy.
[0071] Further, in a feasible embodiment, the step of determining the allocation objects of the cloud resource costs in the target system and the allocation proportions corresponding to the allocation objects according to the cost bill of the target system may include:
[0072] Step S11, splitting the cost bill of the target system into multiple dimensions based on the time period, obtaining the allocation objects corresponding to each dimension and the resource information of each allocation object, wherein each allocation object includes at least an organization;
[0073] In the embodiment of the present application, in order to more intuitively clarify the allocation objects and allocation ratios of cloud resource costs, a management view from the perspective of cost allocation can be constructed. Compared with the management view of resource usage, the management view from the perspective of cost allocation can more accurately calculate the actual total cost of resources associated with Pod (referring to the smallest scheduling unit in the kubernetes project), convert resource expenditures into operating cost expenditures, thereby forming a penetrating management view of "business-application-platform-resources".
[0074] In step S11, each dimension may include organization, department, project, project business, etc., so that the cost bill can be finely divided into organization, department, project business dimensions in the time period, and the resources can be finally attributed to the system, the system to the team, and the team to the organization with management responsibility.
[0075] Each organization has corresponding resource objects in the target system, and resource objects may be reused in the same target system.
[0076] Step S12, determining the apportionment ratio of each apportionment object according to the resource information of each apportionment object, wherein the more resources the resource information of the apportionment object corresponds to, the greater the corresponding apportionment ratio.
[0077] Determine the resource information corresponding to each apportioned object in the target system. The resource information includes indicator information of all measurable system resources such as CPU (Central Processing Unit), memory, storage, GPU (Graphics Processing Unit), network bandwidth, etc. Each resource object has a certain cost. The more resource objects each apportioned object has, the larger the corresponding apportionment ratio is. The apportionment ratio corresponding to the resource information is measured by its corresponding cost, that is, the resource corresponding to the resource information of the apportioned object can refer to the cost of the resource object owned by the apportioned object. The main purpose of cost apportionment in the embodiment of the present application is to convert the relevant data of the resource object into a measurable cost data form.
[0078] Compared with traditional solutions that only analyze costs from the perspective of production resources, in actual application scenarios, the cost of cloud migration for enterprises includes not only resource cost data, but also human cost data. Therefore, the technical solution of the embodiment of this application constructs a penetrating management view of "business-application-platform-resources", refines the cloud cost view, and constructs a cloud cost model from multiple dimensions such as organization, culture, and process to form a continuous cost optimization management solution.
[0079] In a feasible embodiment, before step S20, it is necessary to first build a cloud resource cost model. The cloud resource cost model is a management view of cloud native costs based on time series to solve the problem that the target system is difficult to manage in a refined manner in terms of cost allocation and accounting, as well as resource cost evaluation and pricing.
[0080] Specifically, the process of creating a cloud resource cost model can first create organizations and departments, set identification names, and add corresponding labels according to the K8s dimensions to allocate resources, and then configure cost sharing rules to match them by time, organization, department, etc.
[0081] It should be noted that the organization identifier of cost allocation should be set as early as possible to improve cost visibility, and the organization identifier name should be changed as little as possible to avoid loss of cost information. Cloud resource cost attribution is defined through kubernetes tags. The tag definition follows the following steps and dimensions: 1. Formulate optional core dimension tag information, including fine-grained information such as organizational location, team affiliation, service name, resource type, environment information, system architecture level, etc. The tag naming must be standardized; 2. Build a tag view and define the various components of the cloud native system based on the optional tag list to ensure that the tags of each part can be associated from top to bottom without gaps.
[0082] In addition, the smallest granularity unit of the cloud native system is Pod, which has two resource attributes, namely request and used. Request refers to the resource usage requested for pod deployment, and used refers to the resource usage when the pod is running. In a privately deployed cloud native environment, the total cost is the sum of the project price (including hardware price and software price) and the enterprise labor cost. The drift attribute of pod makes the billing unit of resources and pods not a one-to-one relationship. There are different algorithm logics in different resource objects, and the life cycle and billing cycle of resources and pods are also different. For example, a Kubernetes cluster consists of nodes A and B. When node A is a high-performance node and node B is a normal node, the resource cost of pod on node A and node B is different, so it cannot be simply calculated by the average algorithm and resource weight configuration method. Because if the average algorithm is used, for example, when node A is idle, the cost of pod will exceed the actual usage cost, so it should be split according to the actual resource bill.
[0083] Furthermore, after the cloud resource cost model is constructed, the step of collecting cost data of each allocation object of the target system based on the preset cloud resource cost model and the allocation ratio of each allocation object includes:
[0084] Step S21, collecting indicator information of resource objects in each cluster in the target system, wherein the indicator information at least includes the price of each type of node, the actual usage of resources of each node under the corresponding type, and the node capacity;
[0085] Step S22, calculating the actual total cost of the nodes of the target system according to the indicator information of the resource object;
[0086] Step S23, matching the actual total cost of the node with the apportionment ratio of each apportionment object based on time to obtain the actual apportionment cost of each apportionment object.
[0087] In step S21, it is necessary to collect indicator information of various resource objects in the target system, specifically, collect information such as the prices of nodes corresponding to resource objects including CPU, memory, storage, GPU, network bandwidth, etc., the actual resource usage of each node under the corresponding type, and node capacity. This information is used to calculate the actual total cost of the nodes of the target system.
[0088] For example, when calculating the actual total cost of a node based on the indicator information of a resource object, the following calculation formula can be used:
[0089]
[0090] The value of the above formula is recorded as UPT, which refers to the actual total cost of the pod (node). Among them, node price is the price of the node of the same type, pod request is the resource usage of the pod under the current type of node, pod used is the actual resource usage of the pod under the current type of node, and node capacity is the node capacity.
[0091] Furthermore, after obtaining the actual total cost of the node, we can match it proportionally according to time T and department 0 to obtain the cost sharing rule under the organization, which is expressed as:
[0092]
[0093] Among them, N T is the number of time points within the time period T, and P0 is the cost allocation ratio of the organizational department (i.e., the apportionment ratio determined in the aforementioned step S10).
[0094] Furthermore, in a feasible embodiment, the step of collecting indicator information of resource objects in each cluster in the target system may include:
[0095] Step S211, using the data collection tools deployed in each cluster, respectively collects the indicator information of the resource objects in each cluster of the target system based on the preset collection granularity;
[0096] Step S212, by using a data collection tool deployed in the control cluster, the indicator information of the resource objects in each cluster is aggregated to obtain the indicator information of the resource objects in each cluster in the target system.
[0097] In specific implementation, cost data can be collected through data collection tools deployed in the target system, such as Prometheus (referring to an open source service monitoring system and time series database).
[0098] For example, the collection granularity of cost data can be 1 hour, and the storage period of cost data is 3 months. However, the collection and storage granularity of cost data is quite different from that of monitoring data. The storage configuration of Prometheus can only take effect globally. The architecture does not change the collection and storage granularity of the original monitoring, nor does it add new collection units, thereby ensuring the monitoring and alarm stability of the cloud native infrastructure and reducing the number of request calls to the kubernetes native interface.
[0099] For example, Figure 2 As shown in the figure, corresponding prometheus (cost) and prometheus (monitoring) are deployed in cluster 1 and cluster 2 respectively, which are used to collect cost data and monitor respectively, while federal prometheus (cost) and prometheus (monitoring) are deployed in the control cluster to aggregate cost data and monitor data, so as to obtain indicator information of resource objects in all clusters in the target system for further processing by finops server. finops server refers to the server environment or infrastructure used in the practice of implementing FinOps (Financial Operations, a practical framework for managing cloud resource costs).
[0100] Furthermore, in a feasible embodiment, before the step of inputting the cost data into a preset cost prediction model to obtain predicted cost data, the method may further include:
[0101] Step A10, generating a noise amount based on a preset variance and noise generation formula;
[0102] Step A20, decomposing the cost data into stable data and abrupt change data by using a preset VDM model;
[0103] Step A30, adding the noise amount to the abrupt change data to obtain updated abrupt change data, and the updated abrupt change data and the stable data are used as cost data to be input into the cost prediction model.
[0104] It should be noted that the prediction purpose of resource cost data in the target system needs to ensure the stability of the system, so the data smoothing prediction model cannot be used to eliminate short-term factors as noise, so the noise needs to be fitted into the actual data for prediction analysis. Therefore, before inputting the cost data into the cost model for prediction, the collected cost data needs to be preprocessed.
[0105] Exemplarily, the sample of cost data is X(n), which includes stable data S(n) without abrupt change data and abrupt change data D(n). In the time series, X(n)=S(n)+D(n). Gaussian noise needs to be added to the abrupt change data. The purpose of adding noise is to prevent the abrupt change data in the cost data from being eliminated as noise, thereby affecting the implementation effect of the cost strategy.
[0106] Among them, the formula for generating Gaussian noise is m=N(0,σ 2 ), where m is the amount of noise, which is represented by a mean of 0 and a variance of σ 2 Gaussian distribution, so the expression of the cost data after adding noise (including steeper change data and smooth data) is: X(n)=S(n)+D(n)+m, where D(n)+m is the updated steep change data, and S(n)+D(n)+m can be used to input into the cost prediction model to obtain the corresponding predicted cost data.
[0107] Prior to this, it is understandable that the cost data of cloud resources often has only two states in data form. The data acquisition of S(n) and D(n) mentioned above can be decomposed into two components of different forms: S(n) and D(n) through the VDM (Variational Diffusion Models) model.
[0108] It should be noted that the traditional cloud cost management solution dynamically adjusts resources through forecasting data, but the forecasting method of the embodiment of the present application treats the unstable value of resource data as noise for filtering, but the unstable value is often the normal value caused by business fluctuations and host resource fluctuations. The resource upper limit that determines the stability of the business is often this type of unstable and steeply increasing data, which should not be eliminated. This part is called key data. The cost data forecasting method used in the embodiment of the present application first divides the data into components, and adds Gaussian noise within the box range of the component to strengthen the key data, and then uses the LSSVM algorithm to predict the two components. Finally, the predicted cost data is merged to retain the key data to the maximum extent, and will not have the effect of adding noise to the stable data.
[0109] Furthermore, in a feasible embodiment, the cost prediction model includes at least an LSSVM model, and the step of inputting the cost data into a preset cost prediction model to obtain predicted cost data may include:
[0110] Step S31, inputting the updated abrupt change data and the stable data into a preset LSSVM model respectively, to obtain the prediction data corresponding to the updated abrupt change data and the stable data respectively;
[0111] Step S32, merging and updating the prediction data corresponding to the abrupt change data and the steady data to obtain prediction cost data.
[0112] In an embodiment of the present application, the updated abrupt change data can be recorded as D(n), and the stable data can be recorded as S(n). The two can be respectively input into a pre-trained LSSVM (Least Squares Support Vector Machine) model in sequence to obtain the predicted data D'(n) and S'(n) corresponding to D(n) and S(n), respectively, through the LSSVM model.
[0113] Among them, LSSVM is an improved support vector machine algorithm with an efficient solution method and good generalization performance, and is widely used in fields such as pattern recognition and regression analysis. LSSVM realizes nonlinear classification by mapping data into a high-dimensional feature space. Compared with traditional SVM, LSSVM uses a least squares loss function, which makes it more stable and less affected by outliers. In addition to using the LSSVM model, other support vector machine algorithm models in the prior art can also be used in the embodiments of the present application for regression analysis and prediction of cost data to obtain predicted cost data.
[0114] For example, LSSVM is used to reduce structural risk, and the corresponding prediction abstract model can be expressed as:
[0115]
[0116] Among them, e i is the fitting error, and y is the penalty factor used to control the degree of error. Introducing the Lagrange multiplier L i The optimal solution of the above model is obtained to form the following expression:
[0117]
[0118] The expression of the prediction model is further determined as:
[0119]
[0120] Among them, K is the kernel function. Specifically, the radial basis kernel function can be selected as the kernel function of the prediction model. Finally, the expression of the prediction model is:
[0121]
[0122] Among them, f(x) is the output prediction cost data, σ is the width factor of the kernel function, and b is the deviation.
[0123] In the embodiment of the present application, after D(n) and S(n) are respectively input as x into the above-mentioned prediction model, the corresponding prediction data D'(n) and S'(n) can be obtained, and finally D'(n) and S'(n) are merged to obtain the prediction cost data X'(n).
[0124] Further, in a feasible embodiment, the step of adjusting the node scheduling and container load configuration of the target system according to the predicted cost data may include:
[0125] Step S41, marking each cluster node in the target system according to its node property to obtain a label of each cluster node, wherein the label includes at least one of CPU intensive, memory intensive, storage intensive, and gateway bandwidth intensive;
[0126] Step S42, scheduling each cluster node based on the label of each cluster node and the corresponding container running task;
[0127] Step S43, determining the actual usage and requested usage corresponding to each cluster node according to the predicted cost data of each sharing object;
[0128] Step S44, when the requested usage of the cluster node is greater than the actual usage, the cluster node is scheduled;
[0129] Step S45, when the actual usage of the cluster node is greater than the first preset threshold, rescheduling the container whose actual usage is lower than the second preset threshold to other nodes in the target system, wherein the first preset threshold is greater than the second preset threshold;
[0130] Step S46: Expand or reduce the container load configuration of the target system according to the predicted cost data of each allocation object.
[0131] First, before step S40, the service resource configuration of the target system needs to be obtained. Exemplarily, the service resource configuration can be obtained through the cost-CRD (CustomResourceDefinitions, a resource of kubernetes, used to describe user-defined resources) module to obtain the service resource configuration running in kubernetes, wherein the service resource configuration includes the request parameters and limit parameters of the deployment configuration.
[0132] Furthermore, in step S40, when planning the resource strategy, a variety of strategy management methods can be set. For example, in the initial stage, the scheduling is optimized, including node affinity optimization and service rescheduling optimization, and the HPA / HPC / VPA expansion and contraction plans and resource configuration adjustments are performed when the container executes the corresponding container running task.
[0133] Specifically, we first tag the cloud native infrastructure cluster resources. Specifically, we tag the cluster node composition and tag the cluster nodes according to their nature, including CPU-intensive, memory-intensive, storage-intensive, and network bandwidth-intensive nodes. Correspondingly, the cloud system should also tag the corresponding business container to which of the above intensive applications it belongs. When the container is running, Kubernetes will schedule the cluster nodes according to the labels and find the most suitable running nodes.
[0134] In the process of adjusting the scheduling strategy of cloud native infrastructure, it is necessary to construct a CRD module for actual physical resource analysis, which calculates the actual usage of each node, including the actual usage of node resources, the requested usage, and the remaining usage. It can be understood that the native kubernetes scheduling strategy is to schedule by the remaining usage, and to schedule when the remaining usage> the requested usage applied, and the actual requested usage is much larger than the actual usage, so in the embodiment of the present application, the main function of the CRD is to adjust the native kubernetes scheduling strategy, and to schedule when the requested usage applied> the actual usage. When the actual usage of node resources is high (quantified based on being greater than the first preset threshold), the container with low resource usage (quantified based on being less than the second preset threshold) is rescheduled and scheduled to other nodes to ensure the stability of the business applications for which the cluster base point is located.
[0135] Finally, the cloud application container load configuration is dynamically adjusted based on the predicted cost data obtained in step S30, through HPA (elastic expansion and contraction based on the predicted value), HPC (timing elastic expansion and contraction based on the periodicity of the predicted value), and VPA (adjusting the resource application amount of the application container).
[0136] Traditional cloud cost management solutions use resource configuration adjustment solutions in resource adjustment strategies, which solves the problem of unreasonable resource allocation to a certain extent, but there is still room for optimization. The technical solution of the embodiment of the present application adjusts resource costs through multiple means such as scheduling strategy optimization, expansion and contraction strategy optimization, and resource adjustment strategy optimization during cloud service container deployment, which can maximize the value of resource utilization.
[0137] In a feasible embodiment, the cloud resource cost method disclosed in the above application embodiment can be applied to Figure 3In the system shown, in the system, in the resource monitoring scheme, it can be assumed that the cloud platform consists of a control plane and an operation plane, wherein the control plane is responsible for the operation of the cloud platform, and the operation plane is responsible for the operation of the user business system. Then a cost analysis kubernetes CRD resource is constructed for cloud resource cost control of kubernetes. Among them, the control plane cluster 1 is responsible for resource data collection and cost data generation, and cost analysis is performed through cost data. The cost analysis algorithm can adopt a non-recursive processing strategy to maximize the retention of the steep change data contained in the resource data. Among them, the control plane cluster 1 notifies the analyzed optimization strategy to the operation plane cluster 2 and the operation plane cluster 3 through the control plane cluster 1, and the cost analysis module of the operation plane and the kube-apiserver execute the cost strategy. Specifically, the cost-analysis module is a cost analysis application used to analyze the reasonable situation and trend of cloud costs; the cost-operator module is used to call the prometheus interface to obtain cost data; the cost-CRD is used to call the kubernetes interface to query the indicator information of the cluster nodes, calculate the corresponding cost data, write it to prometheus, and is responsible for generating cost data; prometheus is an open source cloud-native kubernetes monitoring data collection tool; Prometheus Cluster refers to a cluster system composed of multiple Prometheus instances, which is used to achieve high availability and scalability. kube-apiserver refers to the kubernetes apiserver service, which implements kubernetes authentication, authorization, access control and other security verification functions, and also provides cluster state storage operations.
[0138] Therefore, the embodiment of the present application is equivalent to providing a cloud resource cost optimization method in a cloud native kubernetes environment, which is closely integrated with the kubernetes ecosystem. Specifically clarify the scope of system cloud resource cost sharing, including organizational sharing, business sharing, resource sharing, etc., and mark the resource attribution label in the cloud system. Use the resource attribution label to monitor the resource cost situation in real time and build a cloud cost model. Apply a non-recursive processing strategy to the cost data to maximize the retention of mutation data contained in the resource data. Through the kubernetes CRD resources of cost analysis, control the service resources of kubernetes, and finally communicate with the kube-apiserver by the cost analysis module to execute the cost strategy. According to the resource prediction data, dynamically adjust the cloud application container load configuration, and optimize the cloud resource cost through HPA (elastic expansion and contraction according to the predicted value), HPC (timing elastic expansion and contraction according to the periodicity of the predicted value), VPA (adjusting the resource application amount of the application container) and other strategies to achieve maximum resource utilization and effective cost control, avoid resource waste and generate cloud costs that do not play a role.
[0139] The technical solution of the embodiments of the present application can solve the problem of difficult cloud native cost management when enterprises move to the cloud, grasp the distribution of cloud resource costs, avoid the impact of reduced business stability caused by traditional scaling resource optimization strategies, and achieve sustainable cost optimization.
[0140] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the cloud resource cost optimization method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0141] This application also provides a cloud resource cost optimization device, referring to Figure 4 , the cloud resource cost optimization device comprises:
[0142] An allocation determination module 10 is used to determine the allocation objects of the cloud resource costs in the target system and the allocation proportions corresponding to the allocation objects according to the cost bill of the target system;
[0143] The cost collection module 20 is used to collect cost data of each of the apportionment objects of the target system based on a preset cloud resource cost model and the apportionment ratio of each of the apportionment objects;
[0144] The cost prediction module 30 is used to input the cost data into a preset cost prediction model to obtain predicted cost data;
[0145] The parameter adjustment module 40 is used to adjust the node scheduling and container load configuration of the target system according to the predicted cost data to optimize the cloud resource cost of the target system.
[0146] In one embodiment, the allocation determination module 10 is further configured to:
[0147] Splitting the cost bill of the target system into multiple dimensions based on a time period, obtaining allocation objects corresponding to each dimension and resource information of each allocation object, wherein each allocation object includes at least an organization;
[0148] The apportionment ratio of each apportionment object is determined according to the resource information of each apportionment object, wherein the more resources the resource information of the apportionment object corresponds to, the greater the corresponding apportionment ratio.
[0149] In one embodiment, the cost data at least includes actual apportioned costs, and the cost collection module 20 is further used to:
[0150] Collecting indicator information of resource objects in each cluster of the target system, wherein the indicator information at least includes the price of each type of node, the actual usage of resources of each node under the corresponding type, and the node capacity;
[0151] Calculating the actual total cost of the nodes of the target system according to the indicator information of the resource object;
[0152] The actual total cost of the node is matched based on time and the apportionment ratio of each apportionment object to obtain the actual apportionment cost of each apportionment object.
[0153] In one embodiment, the cost collection module 20 is further used for:
[0154] By using the data collection tools deployed in each cluster, the indicator information of the resource objects in each cluster of the target system is collected based on the preset collection granularity;
[0155] The indicator information of the resource objects in each cluster is aggregated by a data collection tool deployed in the control cluster to obtain the indicator information of the resource objects in each cluster in the target system.
[0156] In one embodiment, the cloud resource cost optimization device further includes a preprocessing module, which is used to:
[0157] Generate noise amount based on preset variance and noise generation formula;
[0158] Decomposing the cost data into stable data and abrupt change data by using a preset VDM model;
[0159] The noise amount is added to the abrupt change data to obtain updated abrupt change data, and the updated abrupt change data and the stable data are used as cost data to be input into the cost prediction model.
[0160] In one embodiment, the cost prediction model at least includes an LSSVM model, and the cost prediction module 30 is further used to:
[0161] Inputting the updated abrupt change data and the stable data into a preset LSSVM model respectively, to obtain prediction data corresponding to the updated abrupt change data and the stable data respectively;
[0162] The prediction data corresponding to the updated abrupt change data and the stable data are combined to obtain prediction cost data.
[0163] In one embodiment, the parameter adjustment module 40 is further used for:
[0164] Marking the node properties of each cluster node in the target system to obtain a label for each cluster node, wherein the label includes at least one of CPU intensive, memory intensive, storage intensive, and gateway bandwidth intensive;
[0165] Scheduling each of the cluster nodes based on the label of each of the cluster nodes and the corresponding container running tasks;
[0166] According to the predicted cost data of each allocation object, determine the actual usage and requested usage corresponding to each cluster node;
[0167] When the requested usage of the cluster node is greater than the actual usage, scheduling the cluster node;
[0168] When the actual usage of the cluster node is greater than a first preset threshold, rescheduling containers whose actual usage is lower than a second preset threshold to other nodes in the target system, wherein the first preset threshold is greater than the second preset threshold;
[0169] The container load configuration of the target system is expanded or reduced according to the predicted cost data of each allocation object.
[0170] The cloud resource cost optimization device provided by the present application adopts the cloud resource cost optimization method in the above embodiment, which can solve the technical problems of resource waste and inaccurate cost optimization strategy in traditional cloud resource management solutions. Compared with the prior art, the beneficial effects of the cloud resource cost optimization device provided by the present application are the same as the beneficial effects of the cloud resource cost optimization method provided by the above embodiment, and the other technical features in the cloud resource cost optimization device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0171] The present application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the cloud resource cost optimization method in the above-mentioned embodiment.
[0172] Reference below Figure 5 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present application. The electronic devices in the embodiments of the present application may include but are not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0173] like Figure 5 As shown, the electronic device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0174] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0175] The electronic device provided by the present application adopts the cloud resource cost optimization method in the above embodiment, which can solve the technical problems of resource waste and inaccurate cost optimization strategy in the traditional cloud resource management solution. Compared with the prior art, the beneficial effects of the electronic device provided by the present application are the same as the beneficial effects of the cloud resource cost optimization method provided by the above embodiment, and the other technical features in the electronic device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0176] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0177] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0178] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the cloud resource cost optimization method in the above-mentioned embodiment.
[0179] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0180] The computer-readable storage medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
[0181] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by an electronic device, the electronic device: determines the allocation objects of the cloud resource cost in the target system and the allocation ratios corresponding to each of the allocation objects according to the cost bill of the target system; collects the cost data of each of the allocation objects in the target system based on a preset cloud resource cost model and the allocation ratios of each of the allocation objects; inputs the cost data into a preset cost prediction model to obtain predicted cost data; and adjusts the node scheduling and container load configuration of the target system according to the predicted cost data to optimize the cloud resource cost of the target system.
[0182] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0183] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0184] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0185] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned cloud resource cost optimization method, and can solve the technical problems of resource waste and inaccurate cost optimization strategies in traditional cloud resource management solutions. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the cloud resource cost optimization method provided in the above-mentioned embodiment, and will not be repeated here.
[0186] The present application also provides a computer program product, including a computer program, which implements the steps of the cloud resource cost optimization method as described above when executed by a processor.
[0187] The computer program product provided by this application can solve the technical problems of resource waste and inaccurate cost optimization strategies in traditional cloud resource management solutions. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the cloud resource cost optimization method provided by the above embodiment, which will not be repeated here.
[0188] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A cloud resource cost optimization method, characterized in that: The cloud resource cost optimization method comprises: Determine, according to the cost bill of the target system, the allocation objects of the cloud resource costs in the target system and the allocation ratios corresponding to the allocation objects; Based on a preset cloud resource cost model and the apportionment ratio of each apportionment object, collecting cost data of each apportionment object of the target system; Inputting the cost data into a preset cost prediction model to obtain predicted cost data; According to the predicted cost data, node scheduling and container load configuration of the target system are adjusted to optimize the cloud resource cost of the target system.
2. The cloud resource cost optimization method according to claim 1, characterized in that: The step of determining the allocation objects of the cloud resource costs in the target system and the allocation proportions corresponding to the allocation objects according to the cost bill of the target system includes: Splitting the cost bill of the target system into multiple dimensions based on a time period, obtaining allocation objects corresponding to each dimension and resource information of each allocation object, wherein each allocation object includes at least an organization; The apportionment ratio of each apportionment object is determined according to the resource information of each apportionment object, wherein the more resources the resource information of the apportionment object corresponds to, the greater the corresponding apportionment ratio.
3. The cloud resource cost optimization method according to claim 1, characterized in that: The cost data at least includes actual apportioned costs. The step of collecting the cost data of each apportioned object of the target system based on a preset cloud resource cost model and the apportionment ratio of each apportioned object includes: Collecting indicator information of resource objects in each cluster of the target system, wherein the indicator information at least includes the price of each type of node, the actual usage of resources of each node under the corresponding type, and the node capacity; Calculating the actual total cost of the nodes of the target system according to the indicator information of the resource object; The actual total cost of the node is matched based on time and the apportionment ratio of each apportionment object to obtain the actual apportionment cost of each apportionment object.
4. The cloud resource cost optimization method according to claim 3, characterized in that: The step of collecting indicator information of resource objects in each cluster in the target system includes: By using the data collection tools deployed in each cluster, the indicator information of the resource objects in each cluster of the target system is collected based on the preset collection granularity; The indicator information of the resource objects in each cluster is aggregated by a data collection tool deployed in the control cluster to obtain the indicator information of the resource objects in each cluster in the target system.
5. The cloud resource cost optimization method according to claim 1, characterized in that: Before the step of inputting the cost data into a preset cost prediction model to obtain predicted cost data, the method further includes: Generate noise amount based on preset variance and noise generation formula; Decomposing the cost data into stable data and abrupt change data by using a preset VDM model; The noise amount is added to the abrupt change data to obtain updated abrupt change data, and the updated abrupt change data and the stable data are used as cost data to be input into the cost prediction model.
6. The cloud resource cost optimization method according to claim 5, characterized in that: The cost prediction model at least includes an LSSVM model, and the step of inputting the cost data into a preset cost prediction model to obtain predicted cost data includes: Inputting the updated abrupt change data and the stable data into a preset LSSVM model respectively, to obtain prediction data corresponding to the updated abrupt change data and the stable data respectively; The prediction data corresponding to the updated abrupt change data and the stable data are combined to obtain prediction cost data.
7. The cloud resource cost optimization method according to any one of claims 1 to 6, characterized in that: The step of adjusting the node scheduling and container load configuration of the target system according to the predicted cost data includes: Marking the node properties of each cluster node in the target system to obtain a label for each cluster node, wherein the label includes at least one of CPU intensive, memory intensive, storage intensive, and gateway bandwidth intensive; Scheduling each of the cluster nodes based on the label of each of the cluster nodes and the corresponding container running tasks; According to the predicted cost data of each allocation object, determine the actual usage and requested usage corresponding to each cluster node; When the requested usage of the cluster node is greater than the actual usage, scheduling the cluster node; When the actual usage of the cluster node is greater than a first preset threshold, rescheduling containers whose actual usage is lower than a second preset threshold to other nodes in the target system, wherein the first preset threshold is greater than the second preset threshold; The container load configuration of the target system is expanded or reduced according to the predicted cost data of each allocation object.
8. A cloud resource cost optimization device, characterized in that: The cloud resource cost optimization device comprises: An allocation determination module is used to determine the allocation objects of the cloud resource costs in the target system and the allocation proportions corresponding to the allocation objects according to the cost bill of the target system; A cost collection module, used to collect cost data of each of the apportionment objects of the target system based on a preset cloud resource cost model and the apportionment ratio of each of the apportionment objects; A cost prediction module, used for inputting the cost data into a preset cost prediction model to obtain predicted cost data; A parameter adjustment module is used to adjust the node scheduling and container load configuration of the target system according to the predicted cost data to optimize the cloud resource cost of the target system.
9. An electronic device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the cloud resource cost optimization method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the cloud resource cost optimization method according to any one of claims 1 to 7 are implemented.
11. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the cloud resource cost optimization method according to any one of claims 1 to 7 are implemented.