Resource configuration prediction method and device
View Patent ↗This application provides a resource configuration prediction method and device applied to resource configuration prediction of a cloud service system, to improve resource allocation efficiency and reduce costs of the cloud service system. The method in embodiments of this application includes: obtaining original data of a cloud service system, where the original data includes running data of the cloud service system in a production environment or a production-like environment; obtaining training data based on the original data, and performing deep learning based on the training data to construct and obtain a resource configuration prediction model; when resource demand data input by a user is obtained, generating input data of the resource configuration prediction model based on the resource demand data; and performing prediction based on the input data and the resource configuration prediction model, to obtain resource configuration data of the cloud service system.
1 . A resource allocation prediction method, comprising:
extracting, by a processor, training data from original data of a cloud service system, wherein the original data comprises running data of the cloud service system in a production environment including various operations, a monitoring log file or a database file, the extracted training data comprises data items including a data metric item and a label metric item, the data metric item comprises a resource request item and a resource utilization item, and the label metric item comprises a resource supply item;
processing the extracted training data to convert the data items included in the extracted training data into formatted training data having a data type usable for deep learning training;
performing the deep learning training based on the formatted training data to construct a resource configuration prediction model, wherein the resource configuration prediction model learns a relationship between the resource request item and the resource utilization item corresponding to the resource supply item;
in response to resource demand data input by a user, performing processing based on the resource demand data input by the user to obtain resource request data and resource utilization data, wherein the resource demand data comprises one or more of an account scale, a user scale, a virtual machine provisioning and management scale, concurrency, a type of a deployed service, and overall resource utilization of the cloud service system;
generating input data of the resource configuration prediction model based on the resource request data and the resource utilization data, wherein the input data of the resource configuration prediction model comprises a value of the resource request item and a value of the resource utilization item;
performing a prediction process to obtain resource configuration data of the cloud service system based on the input data of the resource configuration prediction model and the resource configuration prediction model,
wherein the prediction process comprises:
substituting the value of the resource request item and the value of the resource utilization item into the resource configuration prediction model, to obtain a value of the resource supply item through calculation; and
obtaining the resource configuration data of the cloud service system based on the value of the resource supply item; and
outputting the resource configuration data.
2 . The method according to claim 1 , wherein the method further comprises:
storing the original data, the training data, and a model parameter of the resource configuration prediction model by using an object storage service.
3 . The method according to claim 2 , wherein before the performing of the prediction process based on the input data and the resource configuration prediction model, the method further comprises:
obtaining the model parameter of the resource configuration prediction model by using the object storage service; and
obtaining the resource configuration prediction model by loading the model parameter.
4 . A chip system, applied to a resource configuration prediction device, wherein the chip system comprises at least one processor and an interface circuit, the interface circuit and the at least one processor are interconnected by using a cable, and the at least one processor performs the resource allocation prediction method according to claim 1 .
5 . A server, comprising:
a processor, configured to execute instructions that cause the processor to:
extract training data from original data of a cloud service system, wherein the original data comprises running data of the cloud service system in a production environment including various operations, a monitoring log file or a database file, the extracted training data comprises data items including a data metric item and a label metric item, the data metric item comprises a resource request item and a resource utilization item, and the label metric item comprises a resource supply item;
process the extracted training data to convert the data items included in the extracted training data into formatted training data having a data type usable for deep learning training;
perform the deep learning training based on the formatted training data to construct a resource configuration prediction model, wherein the resource configuration prediction model learns a relationship between the resource request item and the resource utilization item corresponding to the resource supply item;
in response to resource demand data input by a user, performing processing based on the resource demand data input by the user to obtain resource request data and resource utilization data, wherein the resource demand data comprises one or more of an account scale, a user scale, a virtual machine provisioning and management scale, concurrency, a type of a deployed service, and overall resource utilization of the cloud service system;
generate input data of the resource configuration prediction model based on the resource request data and the resource utilization data, wherein the input data of the resource configuration prediction model comprises a value of the resource request item and a value of the resource utilization item;
perform a prediction process to obtain resource configuration data of the cloud service system based on the input data of the resource configuration prediction model and the resource configuration prediction model,
wherein the prediction process comprises:
substituting the value of the resource request item and the value of the resource utilization item into the resource configuration prediction model, to obtain a value of the resource supply item through calculation; and
obtaining the resource configuration data of the cloud service system based on the value of the resource supply item; and
output the resource configuration data.
6 . The server according to claim 5 , wherein the processor is further caused to store the original data, the training data, and a model parameter of the resource configuration prediction model by using an object storage service.
7 . The server according to claim 6 , wherein before the performing of the prediction process based on the input data and the resource configuration prediction model, the processor is further caused to:
obtain the model parameter of the resource configuration prediction model by using the object storage service; and
obtain the resource configuration prediction model by loading the model parameter.
8 . A non-transitory computer readable storage medium having instructions stored thereon that, when executed by a processor, cause an apparatus to:
extract training data from original data of a cloud service system, wherein the original data comprises running data of the cloud service system in a production environment including various operations, a monitoring log file or a database file, the extracted training data comprises data items including a data metric item and a label metric item, the data metric item comprises a resource request item and a resource utilization item, and the label metric item comprises a resource supply item;
process the extracted training data to convert the data items included in the extracted training data into formatted training data having a data type usable for deep learning training;
perform the deep learning training based on the formatted training data to construct a resource configuration prediction model, wherein the resource configuration prediction model learns a relationship between the resource request item and the resource utilization item corresponding to the resource supply item;
in response to resource demand data input by a user, performing processing based on the resource demand data input by the user to obtain resource request data and resource utilization data, wherein the resource demand data comprises one or more of an account scale, a user scale, a virtual machine provisioning and management scale, concurrency, a type of a deployed service, and overall resource utilization of the cloud service system;
generate input data of the resource configuration prediction model based on the resource request data and the resource utilization data, wherein the input data of the resource configuration prediction model comprises a value of the resource request item and a value of the resource utilization item;
perform a prediction process to obtain resource configuration data of the cloud service system based on the input data of the resource configuration prediction model and the resource configuration prediction model,
wherein the prediction process comprises:
substituting the value of the resource request item and the value of the resource utilization item into the resource configuration prediction model, to obtain a value of the resource supply item through calculation; and
obtaining the resource configuration data of the cloud service system based on the value of the resource supply item; and
output the resource configuration data.
9 . The non-transitory computer readable storage medium according to claim 8 , wherein the apparatus is further caused to:
store the original data, the training data, and a model parameter of the resource configuration prediction model by using an object storage service in a memory.
10 . The non-transitory computer readable storage medium according to claim 9 , wherein before the apparatus is caused to perform the prediction process based on the input data and the resource configuration prediction model, the apparatus is further caused to:
obtain the model parameter of the resource configuration prediction model by using the object storage service; and
obtain the resource configuration prediction model by loading the model parameter.