Methods, devices, equipment and media for predicting cloud platform resource capacity
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-11
- Publication Date
- 2026-08-14
AI Technical Summary
[0003]本发明的主要目的在于提供一种云平台资源容量的预测方法、装置、设备和介质,旨在解决无法准确确定云平台业务系统的容量变化趋势的问题
[0041]本发明提供的一种云平台资源容量的预测方法、装置、设备和介质,获取云平台业务系统在第一时间段内的第一资源利用率;将第一时间段内第一资源利用率输入预设的容量预测模型,预测得到未来第二时间段内的第二资源利用率;根据第一资源利用率和第二资源利用率确定目标资源利用率,根据预设的健康分类确定目标资源利用率对应的目标健康分类;根据目标资源利用率和目标健康分类,确定业务系统的容量变化趋势。通过第一资源利用率和预测得到的第二资源利用率确定目标资源利用率,根据目标资源利用率和目标健康分类确定业务系统的容量变化趋势,提高了确定的容量变化趋势的准确性和全面性,确定的容量变化趋势利于对业务系统的资源容量进行合理配置。
Smart Images

Figure CN116938745B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, device, and medium for predicting the resource capacity of a cloud platform. Background Technology
[0002] As cloud computing technology matures, enterprises are increasingly deploying their applications to cloud platforms. With the continuous expansion of cloud platform scale and the growing complexity of business needs, effective resource capacity and cost control for business systems is crucial. Typically, the resource application and allocation process begins with tenants submitting cloud resource requests, which are then reviewed and allocated by cloud platform administrators. However, tenants often lack a precise understanding and calculation of business growth and required resource capacity. Furthermore, without sufficient data support, management personnel can only allocate resources based on experience, failing to accurately predict future capacity trends on the cloud platform. This results in uneven resource capacity allocation across business systems on the cloud platform, frequently leading to situations where resource utilization is either too low or too high after system deployment. Summary of the Invention
[0003] The main objective of this invention is to provide a method, apparatus, device, and medium for predicting the resource capacity of a cloud platform, aiming to solve the problem of being unable to accurately determine the capacity change trend of a cloud platform business system.
[0004] To achieve the above objectives, the present invention provides a method for predicting the resource capacity of a cloud platform, the method comprising the following steps:
[0005] Obtain the first resource utilization rate of the cloud platform business system within the first time period;
[0006] The first resource utilization rate during the first time period is input into a preset capacity prediction model to predict the second resource utilization rate during the second time period in the future.
[0007] A target resource utilization rate is determined based on the first resource utilization rate and the second resource utilization rate, and a target health category corresponding to the target resource utilization rate is determined based on a preset health category.
[0008] Based on the target resource utilization rate and the target health classification, the capacity change trend of the business system is determined.
[0009] In one embodiment, the target resource utilization rate includes CPU utilization rate and memory utilization rate, and the step of determining the target health category corresponding to the target resource utilization rate according to the preset health category includes:
[0010] Based on a preset health classification, a first health classification corresponding to the CPU utilization and a second health classification corresponding to the memory utilization are determined in the target resource utilization. The target health classification includes the first health classification and the second health classification.
[0011] The capacity change trend of the business system is determined based on the CPU utilization, the first health category, the memory utilization, and the second health category.
[0012] In one embodiment, after determining the first health category corresponding to the CPU utilization and the second health category corresponding to the memory utilization in the target resource utilization based on preset health categories, the method further includes:
[0013] The health status of the target resource utilization rate is determined based on the first health classification and the second health classification.
[0014] Wherein, when both the first health category and the second health category are abnormal categories, the health status of the target resource utilization rate is determined to be an abnormal state;
[0015] When the second health category or the second health category is an abnormal category, the health status of the target resource utilization rate is determined to be a sub-healthy state;
[0016] When both the second health category and the second health category are normal categories, the target resource utilization rate is determined to be in a normal health state. The preset health categories include abnormal categories and normal categories.
[0017] In one embodiment, the step of obtaining the first resource utilization rate of the cloud platform business system within a first time period includes:
[0018] Determine the first resource utilization rate of multiple hosts corresponding to the business system at each sampling time. The first time period includes multiple time intervals, and each time interval corresponds to multiple sampling times.
[0019] The first resource utilization rate at each sampling time is determined based on the average of the first resource utilization rates of the plurality of said hosts;
[0020] The first resource utilization rate of the time interval is determined based on the maximum value of the first resource utilization rate at each sampling time in the time interval, wherein the first resource utilization rate within the first time interval includes the first resource utilization rates of multiple time intervals.
[0021] In one embodiment, before the step of inputting the first resource utilization rate within the first time period into a preset capacity prediction model, the method further includes:
[0022] Obtain a training set to be determined, which includes a long sequence training set and a short sequence training set. The long sequence training set includes the historical resource utilization rate of a first time series, and the short sequence training set includes the historical resource utilization rate of a second time series. The first time series is greater than the second time series.
[0023] A reference sequence training set for the third time series is determined based on the long sequence training set, wherein the third time series is half of the first time series;
[0024] The stationarity of the reference sequence training set is determined according to a preset algorithm, wherein the stationarity is determined by the test statistic and p-value in the preset algorithm;
[0025] If the stationarity of the reference sequence training set meets the preset conditions, then the short-time training set is determined as the training set; if the stationarity of the reference sequence training set does not meet the preset conditions, then the long-time training set is determined as the training set.
[0026] The capacity prediction model is obtained by training a preset neural network model based on the training set.
[0027] In one embodiment, after the step of inputting the first resource utilization rate within the first time period into a preset capacity prediction model to predict the second resource utilization rate within a future second time period, the method further includes:
[0028] Determine the abnormal predicted value in the predicted second resource utilization rate, wherein the abnormal predicted value is greater than a first threshold or less than a second threshold, and the first threshold is greater than the second threshold;
[0029] If the predicted abnormal value is greater than the first threshold, then the predicted abnormal value is updated according to the first threshold.
[0030] If the predicted abnormal value is less than the second threshold, the predicted abnormal value is updated according to the second threshold.
[0031] In one embodiment, after the step of determining the capacity change trend of the business system based on the target resource utilization rate and the target health classification, the method further includes:
[0032] Receive query requests;
[0033] The capacity change trend of the business system is displayed on a preset terminal according to the query request.
[0034] To achieve the above objectives, the present invention also provides a cloud platform resource capacity prediction device, the cloud platform resource capacity prediction device comprising:
[0035] The acquisition module is used to acquire the first resource utilization rate of the cloud platform business system within the first time period.
[0036] The prediction module is used to input the first resource utilization rate in the first time period into a preset capacity prediction model to predict the second resource utilization rate in the future second time period.
[0037] The determination module is used to determine a target resource utilization rate based on the first resource utilization rate and the second resource utilization rate, and to determine a target health category corresponding to the target resource utilization rate based on a preset health category;
[0038] The generation module is used to determine the capacity change trend of the business system based on the target resource utilization rate and the target health classification.
[0039] To achieve the above objectives, the present invention also provides a cloud platform resource capacity prediction device, the cloud platform resource capacity prediction device including a memory, a processor, and a cloud platform resource capacity prediction program stored in the memory and executable on the processor, wherein when the cloud platform resource capacity prediction program is executed by the processor, it implements the various steps of the cloud platform resource capacity prediction method as described above.
[0040] To achieve the above objectives, the present invention also provides a computer-readable storage medium storing a cloud platform resource capacity prediction program, which, when executed by a processor, implements the various steps of the cloud platform resource capacity prediction method as described above.
[0041] This invention provides a method, apparatus, device, and medium for predicting cloud platform resource capacity. The method involves obtaining a first resource utilization rate of a cloud platform business system within a first time period; inputting the first resource utilization rate into a preset capacity prediction model to predict a second resource utilization rate for a future second time period; determining a target resource utilization rate based on the first and second resource utilization rates; determining a target health category corresponding to the target resource utilization rate based on a preset health category; and determining the capacity change trend of the business system based on the target resource utilization rate and the target health category. By determining the target resource utilization rate using the first resource utilization rate and the predicted second resource utilization rate, and by determining the capacity change trend of the business system based on the target resource utilization rate and the target health category, the accuracy and comprehensiveness of the determined capacity change trend are improved. This determined capacity change trend facilitates the rational allocation of resource capacity for the business system. Attached Figure Description
[0042] Figure 1 This is a schematic diagram of the hardware structure of the cloud platform resource capacity prediction device according to an embodiment of the present invention;
[0043] Figure 2 This is a flowchart illustrating the first embodiment of the cloud platform resource capacity prediction method of the present invention.
[0044] Figure 3 This is a detailed flowchart of step S30 of the second embodiment of the cloud platform resource capacity prediction method of the present invention.
[0045] Figure 4 This is a schematic diagram of the nine-square grid classification model for cloud platform resource capacity of the present invention;
[0046] Figure 5 This is a schematic diagram illustrating the capacity change trend of the cloud platform resources of this invention;
[0047] Figure 6 This is a detailed flowchart of step S10 in the third embodiment of the cloud platform resource capacity prediction method of the present invention.
[0048] Figure 7 This is a schematic diagram of the logical structure of the cloud platform resource capacity prediction device of the present invention.
[0049] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0050] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0051] The main solution of this invention is as follows: obtain the first resource utilization rate of the cloud platform business system in a first time period; input the first resource utilization rate in the first time period into a preset capacity prediction model to predict the second resource utilization rate in a future second time period; determine the target resource utilization rate based on the first resource utilization rate and the second resource utilization rate, and determine the target health classification corresponding to the target resource utilization rate based on a preset health classification; determine the capacity change trend of the business system based on the target resource utilization rate and the target health classification.
[0052] The target resource utilization rate is determined by using the first resource utilization rate and the predicted second resource utilization rate. Based on the target resource utilization rate and the target health classification, the capacity change trend of the business system is determined, which improves the accuracy and comprehensiveness of the determined capacity change trend. The determined capacity change trend is conducive to the rational allocation of the resource capacity of the business system.
[0053] As one implementation solution, cloud platform resource capacity prediction devices can be used as follows: Figure 1 As shown.
[0054] The present invention relates to a cloud platform resource capacity prediction device, which includes: a processor 101, such as a CPU, a memory 102, and a communication bus 103. The communication bus 103 is used to enable communication between these components.
[0055] Memory 102 can be high-speed RAM or stable memory (non-volatile memory), such as disk storage. Figure 1 As shown, the memory 102, which serves as a computer-readable storage medium, may include a program for predicting the resource capacity of a cloud platform; and the processor 101 may be used to call the program for predicting the resource capacity of the cloud platform stored in the memory 102 and perform the following operations:
[0056] Obtain the first resource utilization rate of the cloud platform business system within the first time period;
[0057] The first resource utilization rate during the first time period is input into a preset capacity prediction model to predict the second resource utilization rate during the second time period in the future.
[0058] A target resource utilization rate is determined based on the first resource utilization rate and the second resource utilization rate, and a target health category corresponding to the target resource utilization rate is determined based on a preset health category.
[0059] Based on the target resource utilization rate and the target health classification, the capacity change trend of the business system is determined.
[0060] In one embodiment, the processor 101 can be used to invoke a cloud platform resource capacity prediction program stored in the memory 102 and perform the following operations:
[0061] Based on a preset health classification, a first health classification corresponding to the CPU utilization and a second health classification corresponding to the memory utilization are determined in the target resource utilization. The target health classification includes the first health classification and the second health classification.
[0062] The capacity change trend of the business system is determined based on the CPU utilization, the first health category, the memory utilization, and the second health category.
[0063] In one embodiment, the processor 101 can be used to invoke a cloud platform resource capacity prediction program stored in the memory 102 and perform the following operations:
[0064] The health status of the target resource utilization rate is determined based on the first health classification and the second health classification.
[0065] Wherein, when both the first health category and the second health category are abnormal categories, the health status of the target resource utilization rate is determined to be an abnormal state;
[0066] When the second health category or the second health category is an abnormal category, the health status of the target resource utilization rate is determined to be a sub-healthy state;
[0067] When both the second health category and the second health category are normal categories, the target resource utilization rate is determined to be in a normal health state. The preset health categories include abnormal categories and normal categories.
[0068] In one embodiment, the processor 101 can be used to invoke a cloud platform resource capacity prediction program stored in the memory 102 and perform the following operations:
[0069] Determine the first resource utilization rate of multiple hosts corresponding to the business system at each sampling time. The first time period includes multiple time intervals, and each time interval corresponds to multiple sampling times.
[0070] The first resource utilization rate at each sampling time is determined based on the average of the first resource utilization rates of the plurality of said hosts;
[0071] The first resource utilization rate of the time interval is determined based on the maximum value of the first resource utilization rate at each sampling time in the time interval, wherein the first resource utilization rate within the first time interval includes the first resource utilization rates of multiple time intervals.
[0072] In one embodiment, the processor 101 can be used to invoke a cloud platform resource capacity prediction program stored in the memory 102 and perform the following operations:
[0073] Obtain a training set to be determined, which includes a long sequence training set and a short sequence training set. The long sequence training set includes the historical resource utilization rate of a first time series, and the short sequence training set includes the historical resource utilization rate of a second time series. The first time series is greater than the second time series.
[0074] A reference sequence training set for the third time series is determined based on the long sequence training set, wherein the third time series is half of the first time series;
[0075] The stationarity of the reference sequence training set is determined according to a preset algorithm, wherein the stationarity is determined by the test statistic and p-value in the preset algorithm;
[0076] If the stationarity of the reference sequence training set meets the preset conditions, then the short-time training set is determined as the training set; if the stationarity of the reference sequence training set does not meet the preset conditions, then the long-time training set is determined as the training set.
[0077] The capacity prediction model is obtained by training a preset neural network model based on the training set.
[0078] In one embodiment, the processor 101 can be used to invoke a cloud platform resource capacity prediction program stored in the memory 102 and perform the following operations:
[0079] Determine the abnormal predicted value in the predicted second resource utilization rate, wherein the abnormal predicted value is greater than a first threshold or less than a second threshold, and the first threshold is greater than the second threshold;
[0080] If the predicted abnormal value is greater than the first threshold, then the predicted abnormal value is updated according to the first threshold.
[0081] If the predicted abnormal value is less than the second threshold, the predicted abnormal value is updated according to the second threshold.
[0082] In one embodiment, the processor 101 can be used to invoke a cloud platform resource capacity prediction program stored in the memory 102 and perform the following operations:
[0083] Receive query requests;
[0084] The capacity change trend of the business system is displayed on a preset terminal according to the query request.
[0085] Based on the hardware architecture of the cloud platform resource capacity prediction device described above, an embodiment of the cloud platform resource capacity prediction method of the present invention is proposed.
[0086] Reference Figure 2 , Figure 2 This is a first embodiment of the cloud platform resource capacity prediction method of the present invention, which includes the following steps:
[0087] Step S10: Obtain the first resource utilization rate of the cloud platform business system within the first time period.
[0088] Specifically, the system obtains the first resource utilization rate of the cloud platform's business system within a first time period. The first resource utilization rate includes CPU utilization and / or memory utilization, and each first resource utilization rate carries timestamp information. Optionally, the first time period can be 180 days or 60 days.
[0089] Step S20: Input the first resource utilization rate during the first time period into a preset capacity prediction model to predict the second resource utilization rate during the next second time period.
[0090] Specifically, the first resource utilization rate within the first time period is input into a preset capacity prediction model to predict the second resource utilization rate for the next second time period. The second resource utilization rate includes CPU utilization and / or memory utilization, and each second resource utilization rate carries a prediction timestamp. Optionally, the second time period can be 30 days.
[0091] Before inputting the first resource utilization rate within the first time period into the preset capacity prediction model, it is necessary to train a preset neural network model to obtain the capacity prediction model.
[0092] To obtain an initial training set, for example, 255 important business systems that have been online for more than 6 months are retrieved from the cloud platform's database. Two feature metrics are used: CPU utilization and memory utilization. Each feature metric corresponds to a time series, resulting in a total of 255 * 2 * 2 = 1020 training sets. Long-sequence and short-sequence training sets are then obtained from the initial training set to obtain the final training set.
[0093] Optionally, a training set to be determined is obtained. This training set includes a long-sequence training set and a short-sequence training set. The long-sequence training set includes the historical resource utilization rate of a first time series, where the historical resource utilization rate includes CPU utilization and memory utilization. For example, the sequence window of the long-sequence training set is set to 180, meaning the first time series is 180 days. The short-sequence training set includes the historical resource utilization rate of a second time series, where the historical resource utilization rate includes CPU utilization and memory utilization. For example, the sequence window of the short-sequence training set is set to 60, meaning the second time series is 60 days.
[0094] The reference sequence training set for the third time series is determined based on the long sequence training set. The third time series is half the length of the first time series. For example, the sequence window of the reference sequence training set is 90, that is, the third time series is 90 days.
[0095] The stationarity of the reference sequence training set is determined according to a pre-defined algorithm. Stationarity is determined by the test statistic and p-value in the algorithm. The pre-defined algorithm is the ADF (Augmented Dickey-Fuller test, an augmented form of the DF test), which is used to detect the stationarity of time series. The stationarity of the reference sequence training set is determined by whether the significance test statistic of the ADF test is less than 1% confidence and whether the p-value is very close to 0. The null hypothesis of the ADF test is the existence of a unit root. If the test statistic is less than 1% confidence and the p-value is very close to 0, the stationarity of the reference sequence training set meets the pre-defined conditions, and a short sequence training set is selected as the training set, saving training data and improving algorithm efficiency and prediction accuracy. If the test statistic is greater than 1%, the stationarity of the reference sequence training set does not meet the pre-defined conditions, and a long sequence training set is selected as the training set.
[0096] Due to significant differences in CPU and memory utilization across different business systems, especially CPU utilization which exhibits linear, non-linear, and seasonal characteristics, the ARIMA (Autoregressive Integrated Moving Average) time-series model was chosen to ensure applicability and versatility. The capacity prediction model is obtained by training a pre-defined neural network model using the training set; that is, the capacity prediction model is obtained by training ARIMA using the training set. Specifically, if a short-series training set is used, ARIMA is trained directly. If a long-series training set is used, it is first stabilized by performing several period-by-period differencing operations on non-stationary sequences exhibiting trends and seasonality to eliminate sequence regularity. Model training then proceeds once the long-series training set meets the modeling conditions.
[0097] Optionally, after step S20, the method further includes anomaly handling for the predicted second resource utilization rate. This involves identifying abnormal predicted values within the predicted second resource utilization rate. An abnormal predicted value may be greater than a first threshold or less than a second threshold. The first threshold can be 1, and the second threshold can be 0. When the abnormal predicted value is greater than the first threshold, it is updated according to the first threshold, for example, using 1 as the second resource utilization rate. When the abnormal predicted value is less than the second threshold, it is updated according to the second threshold, for example, using 0 as the second resource utilization rate. For example, since the resource utilization rate of the host in the business system is a value between [0,1], the prediction result of the capacity prediction model may have values less than 0 or greater than 1. For such abnormal predicted values, all values less than 0 are set to 0, and all values greater than 1 are set to 1, outputting the processed second resource utilization rate for the second time period.
[0098] Step S30: Determine the target resource utilization rate based on the first resource utilization rate and the second resource utilization rate, and determine the target health category corresponding to the target resource utilization rate based on the preset health category.
[0099] Specifically, the target resource utilization rate is determined based on the first resource utilization rate and the second resource utilization rate. Optionally, the target resource utilization rate is the set of the first resource utilization rate in the first time period and the second resource utilization rate in the second time period.
[0100] The target health category corresponding to the target resource utilization rate is determined based on a preset health category, where the preset health category can be either an abnormal category or a normal category. The target health category corresponding to the target resource utilization rate is determined by a nine-square grid model. For example, the nine-square grid model is as follows: Figure 4 As shown, the horizontal axis represents CPU utilization, with the dividing points being m and n; the vertical axis represents memory utilization, with the dividing points being p and q. The dividing points m and n divide CPU utilization into three categories, L... i Class, M i and H i Classification; the dividing points p and q divide memory utilization into 3 categories, L j Class, M j and H j The CPU utilization and memory utilization are categorized into L, M, and H classes, from lowest to highest. L and H classes are considered abnormal, while M class is considered normal. L class indicates low resource utilization, meaning there are too many inefficient and idle resources. H class indicates excessively high resource utilization, meaning there is insufficient resource capacity. M class indicates normal resource utilization.
[0101] Based on the health classification of CPU utilization and memory utilization, nine zones can be constructed, namely L... i L j L i M j L i H j M i L j M i M j M i H j H i L j H i M j and H i H j The nine zones are divided into three main areas: a healthy zone, a sub-healthy zone, and an abnormal zone. i L j L i H j H i L jand H i H j This is an abnormal region, L i M j M i L j M i H j and H i M j M is a sub-healthy area. i M j The health zone can be used to assess the health status of business systems by measuring the distribution of resource utilization across the nine-square grid.
[0102] Step S40: Determine the capacity change trend of the business system based on the target resource utilization rate and the target health classification.
[0103] Specifically, the capacity change trend of the business system is determined based on the target resource utilization rate, the timestamp corresponding to the target resource utilization rate, and the target health classification. For example... Figure 5 As shown, curve a represents the trend of CPU utilization within the target resource utilization, and curve b represents the trend of memory utilization within the target resource utilization. Optionally, after receiving a user's query request, the capacity change trend of the business system can be displayed on a preset terminal based on the query request.
[0104] In this embodiment, the technical solution involves obtaining the first resource utilization rate of the cloud platform business system within a first time period; inputting the first resource utilization rate within the first time period into a preset capacity prediction model to predict the second resource utilization rate within a future second time period; determining the target resource utilization rate based on the first and second resource utilization rates, and determining the target health classification corresponding to the target resource utilization rate based on a preset health classification; and determining the capacity change trend of the business system based on the target resource utilization rate and the target health classification. By determining the target resource utilization rate using the first resource utilization rate and the predicted second resource utilization rate, and by determining the capacity change trend of the business system based on the target resource utilization rate and the target health classification, the accuracy and comprehensiveness of the determined capacity change trend are improved, facilitating the rational allocation of the business system's resource capacity.
[0105] Reference Figure 3 , Figure 3 This is a second embodiment of the cloud platform resource capacity prediction method of the present invention. Based on the first embodiment, step S30 includes:
[0106] Step S31: Determine the first health category corresponding to the CPU utilization rate and the second health category corresponding to the memory utilization rate in the target resource utilization rate according to the preset health category. The target health category includes the first health category and the second health category.
[0107] Step S32: Determine the capacity change trend of the business system based on the CPU utilization, the first health classification, the memory utilization, and the second health classification.
[0108] Specifically, the preset health categories are determined by a nine-square grid classification model, such as... Figure 4 The nine-square grid classification model shown has CPU utilization on the horizontal axis, with dividing points m and n, and memory utilization on the vertical axis, with dividing points p and q. Dividing CPU utilization into three categories based on dividing points m and n: L... i Class, M i Class and H i Classification; the dividing points p and q divide memory utilization into 3 categories, L j Class, M j Class and H j The CPU utilization and memory utilization are categorized into L, M, and H classes, from lowest to highest. L and H classes are considered abnormal, while M class is considered normal. L class indicates low resource utilization, meaning there are too many inefficient and idle resources. H class indicates excessively high resource utilization, meaning there is insufficient resource capacity. M class indicates normal resource utilization.
[0109] Based on preset health classifications, a first health category is determined for CPU utilization, and a second health category is determined for memory utilization within the target resource utilization. The target health category includes both the first and second health categories. For example, when CPU utilization is greater than m and less than n, CPU utilization corresponds to M. i Class, i.e., normal classification; when CPU utilization is less than m, CPU utilization corresponds to L. i Class, i.e., exception classification; when CPU utilization is greater than n, CPU utilization corresponds to H i Class, i.e., exception classification. When memory utilization is greater than p and less than q, memory utilization corresponds to M. j Class, i.e., normal classification; when memory utilization is less than p, memory utilization corresponds to L. j Class, i.e., exception classification; when memory utilization is greater than q, memory utilization corresponds to H. j Class, or exception classification.
[0110] The capacity change trend of the business system is determined based on CPU utilization, first health category, memory utilization, and second health category. For example, ... Figure 5 As shown, curve a represents the trend of CPU utilization in the target resource utilization rate, and curve b represents the trend of memory utilization in the target resource utilization rate.
[0111] Optional, such as Figure 4As shown, based on the health classification corresponding to CPU utilization and memory utilization, nine zones can be constructed, namely L i L j L i M j L i H j M i L j M i M j M i H j H i L j H i M j and H i H j The nine zones are divided into three main areas: a healthy zone, a sub-healthy zone, and an abnormal zone. i L j L i H j H i L j and H i H j This is an abnormal region, L i M j M i L j M i H j and H i M j M is a sub-healthy area. i M j The health zone can be used to assess the health status of business systems by measuring the distribution of resource utilization across the nine-square grid.
[0112] Optionally, after step S31, the method further includes: determining the health status of the target resource utilization rate based on the first health category and the second health category; wherein, when both the first health category and the second health category are abnormal categories, that is, the target resource utilization rate belongs to the abnormal category. Figure 4 abnormal region L i L j L i H j H i L j and H i H j The target resource utilization rate is determined to be in an abnormal state; when the second health category or the second health category is an abnormal category, that is, the target resource utilization rate belongs to an abnormal state. Figure 4 Sub-health zone L i M j M i L j Mi H j and H i M j The target resource utilization rate is determined to be in a sub-healthy state; when both the second health category and the second health category are normal, the target resource utilization rate belongs to the sub-healthy state. Figure 4 M in the health zone i M j The target resource utilization rate is determined to be in a healthy state or a normal state. The preset health categories include abnormal categories and normal categories.
[0113] Optionally, based on the nine-square grid classification model, a business resource capacity classification analysis table is compiled for the daily CPU and memory resource utilization of each service. Considering host stability and high availability, m and p are set to 30%, and n and q are set to 80%, resulting in the resource capacity classification analysis table as shown in the table below:
[0114]
[0115] In the technical solution of this embodiment, a first health category corresponding to CPU utilization and a second health category corresponding to memory utilization are determined based on preset health categories. The target health categories include the first health category and the second health category. The capacity change trend of the business system is determined based on CPU utilization, the first health category, memory utilization, and the second health category. By using the target resource utilization and the corresponding health categories, the capacity change trend of the business system is accurately determined, improving the comprehensiveness of the determined capacity change trend.
[0116] Reference Figure 6 , Figure 6 This is a third embodiment of the cloud platform resource capacity prediction method of the present invention. Based on the first or second embodiment, step S10 includes:
[0117] Step S11: Determine the first resource utilization rate of multiple hosts corresponding to the business system at each sampling time. The first time period includes multiple time intervals, and each time interval corresponds to multiple sampling times.
[0118] Step S12: Determine the first resource utilization rate at each sampling time based on the average value of the first resource utilization rates of the plurality of hosts;
[0119] Step S13: Determine the first resource utilization rate of the time interval based on the maximum value of the first resource utilization rate at each sampling time in the time interval. The first resource utilization rate within the first time interval includes the first resource utilization rates of multiple time intervals.
[0120] Specifically, the first time period includes multiple time intervals, such as one day as one time interval, and each time interval corresponds to multiple sampling times. The sampling frequency can be once every minute. The first resource utilization rate within the first time period includes the first resource utilization rate of multiple time intervals.
[0121] The first resource utilization rate of multiple hosts corresponding to the business system is determined at each sampling time, and the first resource utilization rate at each sampling time is determined based on the average of the first resource utilization rates of the multiple hosts. For example, the average of the first resource utilization rates of the multiple hosts is shown in the following formula:
[0122]
[0123] Where, x t,i This represents the sampled value of the i-th host at time t, i.e., the resource utilization rate, where t is the sampling time corresponding to 00:00 to 23:59 on that day, and n is the number of hosts carrying this business system.
[0124] The first resource utilization rate of the time interval is determined based on the maximum value of the first resource utilization rate at each sampling moment within the time interval. The time interval can be one day. For example, the maximum value of the first resource utilization rate at each sampling moment within the time interval is shown in the following formula:
[0125] x j =Max(Avg(t=00:00),Avg(t=00:01),...,Avg(t=23:59);
[0126] Where, x j Let be the first resource utilization rate in the j-th time interval.
[0127] In the technical solution of this embodiment, the first resource utilization rate of multiple hosts corresponding to the business system at each sampling time is determined. The first resource utilization rate at each sampling time is determined based on the average of the first resource utilization rates of the multiple hosts. The first resource utilization rate of the time interval is determined based on the maximum value of the first resource utilization rate at each sampling time within the time interval. The first resource utilization rate within the first time interval is accurately determined, so as to predict the second resource utilization rate in the second time interval, thereby determining the capacity change trend of the business system.
[0128] Reference Figure 7 The present invention also provides a cloud platform resource capacity prediction device, the cloud platform resource capacity prediction device comprising:
[0129] Module 100 is used to obtain the first resource utilization rate of the cloud platform business system within the first time period.
[0130] Prediction module 200 is used to input the first resource utilization rate in the first time period into a preset capacity prediction model to predict the second resource utilization rate in the future second time period.
[0131] The determining module 300 is used to determine a target resource utilization rate based on the first resource utilization rate and the second resource utilization rate, and to determine a target health category corresponding to the target resource utilization rate based on a preset health category;
[0132] The generation module 400 is used to determine the capacity change trend of the business system based on the target resource utilization rate and the target health classification.
[0133] In one embodiment, in determining the target health category corresponding to the target resource utilization rate based on a preset health category, the determining module 300 is specifically used for:
[0134] Based on a preset health classification, a first health classification corresponding to the CPU utilization and a second health classification corresponding to the memory utilization are determined in the target resource utilization. The target health classification includes the first health classification and the second health classification.
[0135] The capacity change trend of the business system is determined based on the CPU utilization, the first health category, the memory utilization, and the second health category.
[0136] In one embodiment, after determining the first health category corresponding to the CPU utilization and the second health category corresponding to the memory utilization in the target resource utilization based on preset health categories, the determining module 300 is specifically used for:
[0137] The health status of the target resource utilization rate is determined based on the first health classification and the second health classification.
[0138] Wherein, when both the first health category and the second health category are abnormal categories, the health status of the target resource utilization rate is determined to be an abnormal state;
[0139] When the second health category or the second health category is an abnormal category, the health status of the target resource utilization rate is determined to be a sub-healthy state;
[0140] When both the second health category and the second health category are normal categories, the target resource utilization rate is determined to be in a normal health state. The preset health categories include abnormal categories and normal categories.
[0141] In one embodiment, regarding obtaining the first resource utilization rate of the cloud platform business system within a first time period, the obtaining module 100 is specifically used for:
[0142] Determine the first resource utilization rate of multiple hosts corresponding to the business system at each sampling time. The first time period includes multiple time intervals, and each time interval corresponds to multiple sampling times.
[0143] The first resource utilization rate at each sampling time is determined based on the average of the first resource utilization rates of the plurality of said hosts;
[0144] The first resource utilization rate of the time interval is determined based on the maximum value of the first resource utilization rate at each sampling time in the time interval, wherein the first resource utilization rate within the first time interval includes the first resource utilization rates of multiple time intervals.
[0145] In one embodiment, before inputting the first resource utilization rate within the first time period into a preset capacity prediction model, the prediction module 200 is specifically used for:
[0146] Obtain a training set to be determined, which includes a long sequence training set and a short sequence training set. The long sequence training set includes the historical resource utilization rate of a first time series, and the short sequence training set includes the historical resource utilization rate of a second time series. The first time series is greater than the second time series.
[0147] A reference sequence training set for the third time series is determined based on the long sequence training set, wherein the third time series is half of the first time series;
[0148] The stationarity of the reference sequence training set is determined according to a preset algorithm, wherein the stationarity is determined by the test statistic and p-value in the preset algorithm;
[0149] If the stationarity of the reference sequence training set meets the preset conditions, then the short-time training set is determined as the training set; if the stationarity of the reference sequence training set does not meet the preset conditions, then the long-time training set is determined as the training set.
[0150] The capacity prediction model is obtained by training a preset neural network model based on the training set.
[0151] In one embodiment, after inputting the first resource utilization rate within the first time period into a preset capacity prediction model to predict the second resource utilization rate within a future second time period, the prediction module 200 is specifically used for:
[0152] Determine the abnormal predicted value in the predicted second resource utilization rate, wherein the abnormal predicted value is greater than a first threshold or less than a second threshold, and the first threshold is greater than the second threshold;
[0153] If the predicted abnormal value is greater than the first threshold, then the predicted abnormal value is updated according to the first threshold.
[0154] If the predicted abnormal value is less than the second threshold, the predicted abnormal value is updated according to the second threshold.
[0155] In one embodiment, after determining the capacity change trend of the business system based on the target resource utilization rate and the target health classification, the generation module 400 is specifically used for:
[0156] Receive query requests;
[0157] The capacity change trend of the business system is displayed on a preset terminal according to the query request.
[0158] The present invention also provides a cloud platform resource capacity prediction device, the cloud platform resource capacity prediction device including a memory, a processor, and a cloud platform resource capacity prediction program stored in the memory and executable on the processor. When the cloud platform resource capacity prediction program is executed by the processor, it implements the various steps of the cloud platform resource capacity prediction method as described in the above embodiments.
[0159] The present invention also provides a computer-readable storage medium storing a cloud platform resource capacity prediction program, which, when executed by a processor, implements the various steps of the cloud platform resource capacity prediction method as described in the above embodiments.
[0160] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0161] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, system, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, system, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, system, article, or apparatus that includes that element.
[0162] Through the above description of the embodiments, those skilled in the art can clearly understand that the systems described in the embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a computer-readable storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, parking management device, air conditioner, or network device, etc.) to execute the systems described in the various embodiments of the present invention.
[0163] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A method for predicting the resource capacity of a cloud platform, characterized in that, The method for predicting the resource capacity of the cloud platform includes: Obtain the first resource utilization rate of the cloud platform business system within the first time period; The first resource utilization rate during the first time period is input into a preset capacity prediction model to predict the second resource utilization rate during the second time period in the future. The target resource utilization rate is determined based on the first resource utilization rate and the second resource utilization rate; The target health category corresponding to the target resource utilization rate is determined based on the preset health category. Based on the target resource utilization rate and the target health classification, the capacity change trend of the business system is determined, and the capacity change trend includes the change trend of CPU utilization rate and the change trend of memory utilization rate in the target resource utilization rate. The target resource utilization rate includes CPU utilization rate and memory utilization rate. The step of determining the target health category corresponding to the target resource utilization rate based on the preset health category includes: Based on the preset health classification, the first health classification corresponding to the CPU utilization and the second health classification corresponding to the memory utilization are determined in the target resource utilization. The target health classification includes the first health classification and the second health classification. The preset health classification includes normal classification and abnormal classification. The preset health classification is determined by a nine-square grid classification model. The nine-square grid classification model includes nine zones constructed based on the health classification of CPU utilization and memory utilization. The position of resource utilization in the nine-square grid is used to assess the health status of the business system. The capacity change trend of the business system is determined based on the CPU utilization, the first health category, the memory utilization, and the second health category. Prior to the step of inputting the first resource utilization rate within the first time period into a preset capacity prediction model, the method further includes: Obtain a training set to be determined, the training set to be determined includes a long sequence training set and a short sequence training set, the long sequence training set includes the historical resource utilization rate of a first time series, the short sequence training set includes the historical resource utilization rate of a second time series, and the first time series is greater than the second time series; A reference sequence training set for the third time series is determined based on the long sequence training set, wherein the third time series is half of the first time series; The stationarity of the reference sequence training set is determined according to a preset algorithm, wherein the stationarity is determined by the test statistic and p-value in the preset algorithm; If the stationarity of the reference sequence training set meets the preset conditions, then the short sequence training set is determined as the training set; if the stationarity of the reference sequence training set does not meet the preset conditions, then the long sequence training set is determined as the training set. The capacity prediction model is obtained by training a preset neural network model based on the training set.
2. The cloud platform resource capacity prediction method as described in claim 1, characterized in that, After determining the first health category corresponding to the CPU utilization and the second health category corresponding to the memory utilization in the target resource utilization based on the preset health category, the method further includes: The health status of the target resource utilization rate is determined based on the first health classification and the second health classification. Wherein, when both the first health category and the second health category are abnormal categories, the health status of the target resource utilization rate is determined to be an abnormal state; When the second health category or the second health category is an abnormal category, the health status of the target resource utilization rate is determined to be a sub-healthy state; When both the second health category and the second health category are normal categories, the target resource utilization rate is determined to be in a normal health state. The preset health categories include abnormal categories and normal categories.
3. The cloud platform resource capacity prediction method as described in claim 1, characterized in that, The steps for obtaining the first resource utilization rate of the cloud platform business system within the first time period include: Determine the first resource utilization rate of multiple hosts corresponding to the business system at each sampling time. The first time period includes multiple time intervals, and each time interval corresponds to multiple sampling times. The first resource utilization rate at each sampling time is determined based on the average of the first resource utilization rates of the plurality of said hosts; The first resource utilization rate of the time interval is determined based on the maximum value of the first resource utilization rate at each sampling time in the time interval, wherein the first resource utilization rate within the first time interval includes the first resource utilization rates of multiple time intervals.
4. The cloud platform resource capacity prediction method as described in claim 1, characterized in that, After the step of inputting the first resource utilization rate within the first time period into a preset capacity prediction model to predict the second resource utilization rate within a future second time period, the method further includes: Determine the abnormal predicted value in the predicted second resource utilization rate, wherein the abnormal predicted value is greater than a first threshold or less than a second threshold, and the first threshold is greater than the second threshold; If the predicted abnormal value is greater than the first threshold, then the predicted abnormal value is updated according to the first threshold. If the predicted abnormal value is less than the second threshold, the predicted abnormal value is updated according to the second threshold.
5. The method for predicting cloud platform resource capacity as described in claim 1, characterized in that, After the step of determining the capacity change trend of the business system based on the target resource utilization rate and the target health classification, the method further includes: Receive query requests; The capacity change trend of the business system is displayed on a preset terminal according to the query request.
6. A device for predicting the resource capacity of a cloud platform, characterized in that, The cloud platform resource capacity prediction device performs each step of the cloud platform resource capacity prediction method as described in any one of claims 1-5; The cloud platform resource capacity prediction device includes: The acquisition module is used to acquire the first resource utilization rate of the cloud platform business system within the first time period. The prediction module is used to input the first resource utilization rate in the first time period into a preset capacity prediction model to predict the second resource utilization rate in the future second time period. The determination module is used to determine a target resource utilization rate based on the first resource utilization rate and the second resource utilization rate, and to determine a target health category corresponding to the target resource utilization rate based on a preset health category; The generation module is used to determine the capacity change trend of the business system based on the target resource utilization rate and the target health classification.
7. A cloud platform resource capacity prediction device, characterized in that, The cloud platform resource capacity prediction device includes a memory, a processor, and a cloud platform resource capacity prediction program stored in the memory and executable on the processor. When the cloud platform resource capacity prediction program is executed by the processor, it implements the various steps of the cloud platform resource capacity prediction method as described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a cloud platform resource capacity prediction program, which, when executed by a processor, implements the steps of the cloud platform resource capacity prediction method as described in any one of claims 1-5.
Citation Information
Patent Citations
Container deployment method and device
CN113064700A
Cloud resource adaptive configuration method and system based on depth deterministic strategy
CN113641445A