Prediction method and device for starting number of virtual machines, equipment and storage medium

By preprocessing and weighting the historical resource data of multiple time scales of the virtual machine, predicting the number of startups of the virtual machine, solving the problem of inaccurate prediction in the prior art, and improving resource utilization and system performance.

CN119668780APending Publication Date: 2025-03-21CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411778996.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

In the prior art, the prediction of the number of virtual machines startups is inaccurate, resulting in low resource utilization and poor system performance.

Method used

By preprocessing the virtual machine historical resource data collected on multiple time scales, weighting is given to each time scale, and weighting is performed, and finally predicting the target data of multiple time scales to predict the number of startups of the virtual machine.

Benefits of technology

Improve the accuracy of predicting the number of virtual machine boots, enhance resource utilization and system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119668780A_ABST
    Figure CN119668780A_ABST
Patent Text Reader

Abstract

The invention relates to a prediction method and device for the starting number of virtual machines, equipment and a storage medium. The method comprises the following steps: preprocessing historical resource data of a virtual machine acquired by adopting a plurality of time scales to obtain original resource data of the plurality of time scales; according to the original resource data of each time scale, distributing a weight to each time scale; according to the weight of each time scale, weighting the original resource data of each time scale to obtain target data of each time scale; and performing prediction analysis on the target data of the plurality of time scales, and predicting the starting number of the virtual machines. By adopting the method, the accuracy of predicting the starting number of the virtual machines can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a method, device, equipment and storage medium for predicting the number of virtual machine startups. Background Art

[0002] In recent years, cloud computing has been applied in more and more fields. Cloud computing is based on virtualization technology, which gave birth to the concept of virtual machines. Virtual machines run on physical nodes of cloud computing platforms. Virtual machines can simulate a complete computer system with complete hardware system functions and run in a completely isolated environment through software, so they can provide the functions of physical computers, and virtual machines in physical nodes can process business.

[0003] In the related art, the resource data required by the virtual machine in the next time period can be predicted based on the historical resource data of the virtual machine, and the number of virtual machines to be started can be predicted based on the resource data required for the next time period to perform startup scheduling of the virtual machines in the physical node.

[0004] However, the related art has the problem of inaccurate prediction of the number of virtual machines to be started. Summary of the invention

[0005] Based on this, the present application provides a method, apparatus, device and storage medium for predicting the number of virtual machine startups, which can improve the accuracy of predicting the number of virtual machine startups.

[0006] In a first aspect, the present application provides a method for predicting the number of virtual machine startups, the method comprising:

[0007] Preprocessing the historical resource data of the virtual machine collected at multiple time scales to obtain the original resource data at multiple time scales;

[0008] Assign weights to each time scale based on the original resource data of each time scale;

[0009] According to the weight of each time scale, the original resource data of each time scale is weighted to obtain the target data of each time scale;

[0010] Perform predictive analysis on target data at multiple time scales to predict the number of virtual machine startups.

[0011] In some embodiments, historical resource data of virtual machines collected at multiple time scales are preprocessed to obtain original resource data at multiple time scales, including:

[0012] The historical resource data is divided into first-category resource data and second-category resource data; the virtual machine resource occupancy rate in the first-category resource data is greater than the virtual machine resource occupancy rate in the second-category resource data;

[0013] The ratios of the sampling times of the first type of resource data and the sampling times of the second type of resource data to the sampling times of the historical resource data are determined as the first proportion and the second proportion;

[0014] The first type of resource data is weighted using the first proportion, and the second type of resource data is weighted using the second proportion, to obtain original resource data of multiple time scales.

[0015] In some embodiments, the first type of resource data is weighted using a first weight, and the second type of resource data is weighted using a second weight, to obtain original resource data of multiple time scales, including:

[0016] The first resource data of the first category is weighted by using the first proportion, and the second resource data of the second category is weighted by using the second proportion, so as to obtain weighted data of multiple time scales;

[0017] The weighted data of multiple time scales are dimensionally aligned to the original resource data of multiple time scales.

[0018] In some embodiments, according to the original resource data of each time scale, a weight is assigned to each time scale, including:

[0019] Perform global pooling processing on the original resource data of each time scale to obtain the first eigenvalue of each time scale;

[0020] Excitation processing is performed on the first eigenvalue of each time scale to obtain the second eigenvalue of each time scale;

[0021] The target activation function is used to process the second eigenvalue of each time scale to obtain the weight of each time scale.

[0022] In some embodiments, predictive analysis is performed on target data at multiple time scales to predict the number of virtual machine startups, including:

[0023] Conduct forecast analysis on target data at multiple time scales to obtain forecast resource data;

[0024] According to the predicted resource data and the specifications of the virtual machines that can be run in the physical node, the number of virtual machines to be started of at least one specification is predicted.

[0025] In some embodiments, predictive analysis is performed on target data at multiple time scales to obtain predicted resource data, including:

[0026] determining cell state data and output gate data that match target data at multiple time scales;

[0027] The softsign activation function is used to process the unit state data to obtain intermediate data;

[0028] The intermediate data and the output gate data are fused to obtain the predicted resource data.

[0029] In some embodiments, the method further comprises:

[0030] Determine resource availability values ​​of multiple physical nodes where the virtual machine is located;

[0031] Sort resource availability values ​​of multiple physical nodes;

[0032] According to the sorted resource availability values ​​and the number of virtual machines to be started, the startup scheduling of virtual machines is performed on multiple physical nodes.

[0033] In a second aspect, the present application provides a device for predicting the number of virtual machine startups, the device comprising:

[0034] A preprocessing module, used to preprocess the historical resource data of the virtual machine collected at multiple time scales to obtain the original resource data at multiple time scales;

[0035] A weight allocation module is used to allocate weights to each time scale according to the original resource data of each time scale;

[0036] The weighting module is used to perform weighted processing on the original resource data of each time scale according to the weight of each time scale to obtain the target data of each time scale;

[0037] The prediction module is used to perform prediction analysis on target data at multiple time scales and predict the number of virtual machine startups.

[0038] In a third aspect, the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the methods in the first aspect when executing the computer program.

[0039] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any one of the methods in the first aspect when the computer program is executed by a processor.

[0040] In an embodiment of the present application, by predicting the number of virtual machine startups based on historical resource data at multiple time scales, the number of historical operation data obtained can be increased, and the accuracy of the predicted number of virtual machine startups can be improved; in addition, according to the original resource data at each time scale, a weight is assigned to each time scale, and the original resource data at each time scale is weighted according to each weight to obtain the target data of each time scale, and the target data of multiple time scales are predicted and analyzed to predict the number of virtual machine startups, so that the weights allocated according to the inherent characteristics of the original resource data at each time scale can be fully utilized to fully utilize the deep-level characteristics of the original resource data at each time scale to predict the number of virtual machine startups, thereby further improving the accuracy of the predicted number of virtual machine startups. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0042] Figure 1 A schematic diagram of a flow chart of a method for predicting the number of virtual machine startups provided in the first embodiment;

[0043] Figure 2 A schematic diagram of a flow chart of a method for predicting the number of virtual machine startups provided in the second embodiment;

[0044] Figure 3 A schematic diagram of a flow chart of a method for predicting the number of virtual machine startups provided in the third embodiment;

[0045] Figure 4 A schematic diagram of a flow chart of a method for predicting the number of virtual machine startups provided in a fourth embodiment;

[0046] Figure 5 A schematic diagram of a network architecture for target data prediction provided in some embodiments;

[0047] Figure 6 A flowchart of a method for predicting the number of virtual machine startups provided in the fifth embodiment;

[0048] Figure 7 A flowchart of a method for starting and scheduling a virtual machine provided in some embodiments;

[0049] Figure 8 A schematic diagram of a network structure of a weight distribution network provided in some embodiments;

[0050] Fig. 9A logical schematic diagram of a virtual machine startup scheduling prediction scheme on a hybrid cloud platform provided by some embodiments;

[0051] Fig.10 A schematic diagram of the structure of a device for predicting the number of virtual machine startups provided in some embodiments;

[0052] Fig.11 A schematic diagram of the structure of a computer device is provided for some embodiments. DETAILED DESCRIPTION

[0053] The following embodiments of the technical solution of the present application are described in detail in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.

[0054] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.

[0055] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.

[0056] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0057] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0058] The virtual machines in the physical nodes can handle the business. A physical node (also called a host machine) can run one or more virtual machines. If the number of virtual machines in a physical node is provided, the hardware resource utilization of the physical node can be improved. When more tasks need to be run, virtual machines need to be added to the host machine. The adding method can be to directly migrate the existing idle virtual machines or to obtain resources from various resource pools to create virtual machines. These methods are included in the scheduling process of the virtual machines. In some embodiments, the physical node may include a computing node.

[0059] In order to reduce the impact on running tasks and the waste of resources such as inconsistent power consumption of physical node load distribution, there are many effective methods to quickly complete the scheduling needs of virtual machines. However, no matter how the optimization method is used, scheduling virtual machines during peak business hours still consumes a lot of time and computing resources, and reserving enough peak resources for the host in advance is bound to cause a lot of resource waste. Therefore, a reasonable and effective method is needed to predict the demand for future virtual machine startup, so as to schedule virtual machines in advance to prepare for the response and improve system performance and resource utilization.

[0060] The general practice is to obtain the historical operation data of the virtual machine, and predict the resource data required by the virtual machine in the next time period based on the historical resource data of the virtual machine, so as to predict the number of virtual machine startups based on the resource data required in the next time period, so as to perform startup scheduling of the virtual machines in the physical node. However, in this way, the amount of historical operation data obtained is limited, resulting in inaccurate prediction of the number of virtual machine startups.

[0061] Based on the above considerations, the present application provides a method for predicting the number of virtual machine startups, which can improve the accuracy of the predicted number of virtual machine startups.

[0062] Figure 1 A flowchart of a method for predicting the number of virtual machine startups provided in the first embodiment is shown in FIG. Figure 1 As shown, the method is applied to a computer device, and the method includes:

[0063] S101 , preprocessing historical resource data of a virtual machine collected at multiple time scales to obtain original resource data at multiple time scales.

[0064] The time scale refers to the average measure of the time taken to complete a certain physical process. In some scenarios, the time scale may be a time period or a time interval. Exemplarily, the multiple time scales may include at least two of the following: T, 2T, 3T, 4T, 5T, 6T, 8T, 10T, 20T, etc., where T represents a unit duration. For example, T is 30 seconds, 1 minute, 10 minutes, 30 minutes, or 1 hour, etc. For example, the multiple time scales include T and 5T, and the historical resource data of the multiple time scales include historical resource data collected every T and historical resource data collected every 5T.

[0065] In some embodiments, the historical resource data may be resource data within a preset time period. Exemplarily, the preset time period may be a preset fixed time period. For example, the preset time period may be 1 day, 2 days, 3 days, 5 days, 7 days, or a month.

[0066] The virtual machine may be a virtual machine in a physical node in a cloud computing platform. Exemplarily, the virtual machine may be a virtual machine in a physical node in a target distributed system or a target cluster system. Exemplarily, the virtual machine may be a virtual machine in a physical node for processing a computing task of a certain user. Exemplarily, the virtual machine may be a virtual machine in a physical node for processing a computing task of a target type.

[0067] The historical resource data of the virtual machine may include historical resource data of at least one specification of a virtual machine deployed or running in the physical node.

[0068] The historical resource data may be the resource data that has been collected. The historical resource data may include at least one type of resource data. For example, the historical resource data may include at least one of the following: the number of user requests, the number of uses, the CPU usage rate, the memory usage rate, the storage size, the network bandwidth, the GPU usage rate, the NPU usage rate, the power consumption information, the login time, the number of user connections, the number of processes, etc.

[0069] Table 1 provides some examples. , +T, +2T, +3T time corresponding resource data diagram:

[0070] Table 1

[0071]

[0072] In some embodiments, historical resource data at multiple time scales may be determined as raw resource data at multiple time scales.

[0073] In other embodiments, missing value supplementation and / or abnormal value correction processing may be performed on historical resource data at multiple time scales to obtain original resource data at multiple time scales.

[0074] In some embodiments, historical resource data at multiple time scales may be weighted to obtain original resource data at multiple time scales.

[0075] In some embodiments, the historical resource data of multiple time scales may be dimensionally aligned to the original resource data of multiple time scales. The implementation method of dimensionally aligning the historical resource data of multiple time scales may be similar to the implementation method of dimensionally aligning the weighted data of multiple time scales described below, which will not be described in detail here.

[0076] S102: Allocate a weight to each time scale according to the original resource data of each time scale.

[0077] In some embodiments, weights may be assigned to each time scale according to the characteristic values ​​of the original resource data of each time scale. Exemplarily, the characteristic values ​​may include the maximum value, minimum value, difference between the maximum value and the minimum value, average value, median or mode, etc. of at least one type of resource data. For example, weights may be assigned to each time scale according to the difference between the maximum value and the minimum value in the CPU usage of each time scale. For example, the greater the difference, the greater the weight assigned, and the smaller the difference, the smaller the weight assigned.

[0078] In other embodiments, the original resource data of each time scale may be squeezed and stimulated to obtain the allocation weight of each time scale.

[0079] In some embodiments, the sum of the weights of multiple time scales is 1.

[0080] S103 . Perform weighted processing on the original resource data of each time scale according to the weight of each time scale to obtain target data of each time scale.

[0081] Exemplarily, the weight of each time scale may be multiplied by the original resource data of each time scale to obtain the target data of each time scale.

[0082] S104: Perform prediction analysis on target data at multiple time scales to predict the number of virtual machines to be started.

[0083] In some embodiments, target data at multiple time scales may be predicted and analyzed to obtain predicted resource data, and the number of virtual machines to be started may be predicted based on the predicted resource data.

[0084] In some embodiments, target data at multiple time scales may be predicted and analyzed to obtain analysis data at multiple time scales; predicted resource data may be determined based on the analysis data at multiple time scales. For example, the maximum value, minimum value, or average value of the analysis data at multiple time scales may be used to determine the predicted resource data.

[0085] In some embodiments, the startup scheduling of virtual machines in a physical node can be performed according to the predicted startup number of virtual machines. In some embodiments, the computer device can control the increase of the number of virtual machines in the physical node when the predicted startup number is greater than the startup number of the current virtual machine. In some other embodiments, the historical resource data of multiple time scales acquired by the computing device is sent by the computer device, and the computer device sends the predicted startup number to the computer device after obtaining the predicted startup number. When the predicted startup number is greater than the startup number of the current virtual machine, the computer device controls the increase of the number of virtual machines in the physical node. In other embodiments, when the predicted startup number is less than the startup number of the current virtual machine, the number of virtual machines in the physical node can be controlled to be reduced, or the virtual machines in the physical node can be not scheduled.

[0086] In an embodiment of the present application, by predicting the number of virtual machine startups based on historical resource data at multiple time scales, the number of historical operation data obtained can be increased, and the accuracy of the predicted number of virtual machine startups can be improved; in addition, according to the original resource data at each time scale, a weight is assigned to each time scale, and the original resource data at each time scale is weighted according to each weight to obtain the target data of each time scale, and the target data of multiple time scales are predicted and analyzed to predict the number of virtual machine startups, so that the weights allocated according to the inherent characteristics of the original resource data at each time scale can be fully utilized to fully utilize the deep-level characteristics of the original resource data at each time scale to predict the number of virtual machine startups, thereby further improving the accuracy of the predicted number of virtual machine startups.

[0087] Figure 2 A flow chart of a method for predicting the number of virtual machine startups provided in the second embodiment is shown in FIG. Figure 2 As shown, the method is applied to a computer device, Figure 2 Example compared to Figure 1 The difference between the embodiments is that S101 includes S1011 to S1013:

[0088] S1011. Divide historical resource data into first-category resource data and second-category resource data; the virtual machine resource occupancy rate in the first-category resource data is greater than the virtual machine resource occupancy rate in the second-category resource data.

[0089] In some embodiments, the historical resource data of all scales can be used as a dimension to divide the historical resource data of all scales into the first category of resource data and the second category of resource data. In other embodiments, the historical resource data of each time scale can be used as a dimension to divide the historical resource data of each time scale into the first category of resource data and the second category of resource data.

[0090] In some embodiments, the historical resource data can be divided into the first category of resource data and the second category of resource data according to the historical resource data and the CPU usage threshold. Exemplarily, the resource data in the historical resource data whose CPU usage is greater than or equal to the CPU usage threshold is determined as the first category of resource data, and the resource data in the historical resource data whose CPU usage is less than the CPU usage threshold is determined as the second category of resource data.

[0091] In other embodiments, the historical resource data may be divided into the first category of resource data and the second category of resource data according to the historical resource data, the CPU usage threshold, and the memory usage threshold. Exemplarily, the resource data in the historical resource data whose CPU usage is greater than or equal to the CPU usage threshold and whose memory usage is greater than or equal to the memory usage threshold is determined as the first category of resource data, and the resource data other than the first category of resource data in the historical resource data is determined as the second category of resource data.

[0092] S1012. Determine the first proportion and the second proportion as the ratios of the sampling times of the first-category resource data and the sampling times of the second-category resource data to the sampling times of the historical resource data.

[0093] Exemplarily, the ratio of the sampling times of the first type of resource data to the sampling times of the historical resource data is determined as the first proportion, and the ratio of the sampling times of the second type of resource data to the sampling times of the historical resource data is determined as the second proportion.

[0094] S1013. Use a first weight to weight the first type of resource data, and use a second weight to weight the second type of resource data, to obtain original resource data at multiple time scales.

[0095] Exemplarily, a result of multiplying the first proportion by the first type of resource data, and a result of multiplying the second proportion by the second type of resource data, are determined as original resource data of multiple time scales.

[0096] In some embodiments, a first weight is used to weight the first category of resource data, and a second weight is used to weight the second category of resource data to obtain original resource data at multiple time scales, including: weighting the first category of resource data with the first weight, and weighting the second category of resource data with the second weight to obtain weighted data at multiple time scales; and dimensionally aligning the weighted data at multiple time scales to obtain original resource data at multiple time scales.

[0097] In some embodiments, the dimension alignment processing of weighted data of multiple time scales can be implemented in multiple ways. For example, the dimension of the weighted data of multiple time scales whose dimension is greater than the minimum dimension can be reduced, or the dimension of the weighted data of multiple time scales whose dimension is less than the maximum dimension can be increased.

[0098] The following describes some possible implementation methods for dimensional alignment of weighted data of multiple time scales to original resource data of multiple time scales: determining the weighted data of the first time scale of the largest dimension among the weighted data of multiple time scales as the original resource data of the first time scale; interpolating the weighted data of each second time scale whose dimension is smaller than the maximum dimension to obtain each interpolation result; determining the original resource data of each second time scale under the maximum dimension based on each interpolation result; and combining the original resource data of the first time scale with the original resource data of each second time scale to determine the original resource data of multiple time scales.

[0099] Figure 3 A flowchart of a method for predicting the number of virtual machine startups provided in the third embodiment is shown in FIG. Figure 3 As shown, the method is applied to a computer device, Figure 3 Example compared to Figure 1 The difference between the embodiments is that S102 includes S1021 to S1023:

[0100] S1021. Perform global pooling processing on the original resource data of each time scale to obtain the first eigenvalue of each time scale.

[0101] Among them, the dimensions of the original resource data at multiple time scales are .in, represents the quantity at multiple time scales, Represents the type of resource information collected. Indicates the length of the sequence.

[0102] In some embodiments, a global pooling layer may be used to perform global pooling processing on the original resource data of each time scale to obtain the first eigenvalue of each time scale.

[0103] In some embodiments, the first characteristic value may be obtained by the following formula: .in, Indicates The first eigenvalue of the time scale, Indicates In the time scale resource type and A sequence of resource data values.

[0104] S1022, performing excitation processing on the first eigenvalue of each time scale to obtain the second eigenvalue of each time scale.

[0105] In some embodiments, a first fully connected (FC) layer can be used to perform dimensionality reduction processing on the first eigenvalues ​​of multiple time scales to obtain target data of the target dimension; a rectified linear unit (ReLU) layer can be used to process the target data of the target dimension to obtain specified data of the target dimension; and a second fully connected layer can be used to perform dimensionality increase processing on the specified data of the target dimension to obtain second eigenvalues ​​of multiple time scales.

[0106] In other embodiments, a rectified linear unit layer may be used to process the first eigenvalue of each time scale to obtain the second eigenvalue of each time scale.

[0107] S1023. Use the target activation function to process the second eigenvalue of each time scale to obtain the weight of each time scale.

[0108] Exemplarily, the target activation function may include a sigmoid activation function. The sigmoid function is an S-shaped function, also known as an S-shaped growth curve. In information science, due to its monotonic and inverse monotonic properties, the sigmoid function is often used as an activation function of a neural network to map variables to the range of [0,1].

[0109] For example, the weight of each time scale can be obtained by using the following formula: ;in, Indicates The first eigenvalue of the time scale, For the The weight of the time scale, and Represents all parameters of the fully connected layer, is an integer greater than or equal to 2, is a linear correction unit (Relu) to ensure that the final output result is a positive value. is the sigmoid function.

[0110] Figure 4 A flowchart of a method for predicting the number of virtual machine startups provided in the fourth embodiment is shown in FIG. Figure 4 As shown, the method is applied to a computer device, Figure 4 Example compared to Figure 1 The difference between the embodiments is that S104 includes S1041 and S1042:

[0111] S1041. Perform forecast analysis on target data at multiple time scales to obtain forecast resource data.

[0112] In some embodiments, target data at multiple time scales may be predicted and analyzed to obtain analysis data at multiple time scales, and predicted resource data may be determined based on the analysis data at multiple time scales. For example, the maximum value, minimum value, or average value of the analysis data at multiple time scales may be used to determine the predicted resource data.

[0113] Table 2 provides some examples of , +T, +2T, After +3T , +5T, +6T, +7T time corresponding resource data diagram:

[0114] Table 2

[0115]

[0116] S1042: Predict the number of virtual machines of at least one specification to be started according to the predicted resource data and the specifications of the virtual machines that can be run in the physical node.

[0117] In some embodiments, the specifications of the virtual machines that can be run in the physical node can be of one specification. In other embodiments, the specifications of the virtual machines that can be run in the physical node can be of multiple specifications.

[0118] In some embodiments, the number of virtual machines of each specification to be started is predicted based on the predicted resource data and the specifications of the virtual machines that can be run in the physical node.

[0119] In some embodiments, the startup quantity of each specification of virtual machines is predicted based on the predicted resource data and the startup ratio of each specification of virtual machines in the physical node.

[0120] In some embodiments, target data at multiple time scales are predictively analyzed to obtain predicted resource data, including: determining unit state data and output gate data that match the target data at multiple time scales; processing the unit state data using a softsign activation function to obtain intermediate data; and fusing the intermediate data with the output gate data to obtain predicted resource data.

[0121] Figure 5 A schematic diagram of a network architecture for target data prediction provided in some embodiments, combined with Figure 5 , the following formulas (1) to (6) can be used to correspond to the preset prediction model and the last target data in each time scale , predict the target data at the next moment , thereby predicting the target data for many subsequent moments, where the predicted target data is the analysis data of multiple time scales:

[0122] Forget Gate Data : (1);

[0123] Input gate data : (2);

[0124] Candidate value data : (3);

[0125] Unit status data: (4);

[0126] Output gate data : (5);

[0127] Update hidden state: (6).

[0128] In formulas (1) to (6), , , , represents the weight, , , , Indicates bias, is the activation function, is the softsign activation function.

[0129] For example, target data of multiple time scales may be used to train the weights and biases in the preset prediction models corresponding to formulas (1) to (6).

[0130] Figure 6A flowchart of a method for predicting the number of virtual machine startups provided in the fifth embodiment is shown in FIG. Figure 6 As shown, the method is applied to a computer device, Figure 6 Example compared to Figure 1 The difference between the embodiments is that after S104, the following steps S105 to S107 may also be performed:

[0131] S105: Determine resource availability values ​​of multiple physical nodes where the virtual machine is located.

[0132] In some embodiments, the resource availability values ​​of the multiple physical nodes may be determined based on at least one of the CPU resources, memory resources, storage resources, etc. of the virtual machines created in the multiple physical nodes. For example, if the CPU resources of the created virtual machines occupy a large amount of the CPU resources of the physical node, the resource availability value of the physical node is low.

[0133] S106: Sort the resource availability values ​​of multiple physical nodes.

[0134] In some embodiments, the resource availability values ​​of the plurality of physical nodes may be sorted in an ascending order or a descending order.

[0135] S107 . Perform startup scheduling of virtual machines on multiple physical nodes according to the sorted resource availability values ​​and the number of virtual machines to be started.

[0136] In some embodiments, virtual machines may be added to physical nodes with higher resource availability values ​​on a priority basis. In some embodiments, virtual machines in physical nodes with lower resource availability values ​​may be deleted on a priority basis.

[0137] In some embodiments, a method for predicting virtual machine startup scheduling using time multi-scale feature weight allocation is proposed. When collecting original resource usage data, different time scales are selected, and the Lagrange interpolation method is used to make the length of the multi-scale time series consistent. Then, the longitudinal features of each scale time series are extracted, and the longitudinal weights are assigned, which increases the correlation between the time series of each scale. Finally, the multi-scale time series with longitudinal weights is input into the improved Long Short-Term Memory (LSTM) network (i.e., the preset prediction model mentioned above), the data is input cyclically, and the time domain correlation characteristics of each scale sequence are analyzed to obtain the predicted virtual machine startup scheduling results at each time point, effectively improving the utilization of resources.

[0138] In some embodiments, a method for predicting virtual machine startup scheduling based on time multi-scale feature weight allocation is provided, which solves the problems of insufficient accuracy, poor adaptability, high limitations, cumbersome prediction process and overly complex models of existing prediction methods. According to time multi-scale data, the impact of invalid data on the prediction results is effectively reduced. By combining the weight allocation network and the improved LSTM network, a comprehensive prediction can be made based on the time correlation characteristics of historical data and the multi-channel characteristics of various resources in each resource pool, effectively ensuring the accuracy of the prediction results, achieving an effective balance between demand and resources, and maximizing the resource utilization of the cloud computing platform, effectively improving system performance. The tanh activation function (hyperbolic tangent activation function) in the LSTM network is optimized to a softsign activation function to reduce the computational complexity and speed up the calculation.

[0139] Figure 7 A flowchart of a method for starting and scheduling a virtual machine provided in some embodiments is shown in FIG. Figure 7 As shown, the method is applied to a computer device, and the method includes:

[0140] S701. Obtain historical resource data at multiple time scales.

[0141] S702: Determine whether the CPU usage rate in the historical resource data is greater than 20%.

[0142] S703: classify historical resource data of whether the CPU usage rate is greater than 20% as strong valid data.

[0143] S704: classify historical resource data of whether the CPU usage rate is less than or equal to 20% as weakly valid data.

[0144] S705. Allocate weight to strong and effective data , assign weight to weakly valid data (1- ), and obtain the original resource data of multiple time scales by weighting.

[0145] Among them, the dimensions of the original resource data at multiple time scales are .

[0146] S706: Allocate weights for each time scale, and weight the original resource data using the weights to obtain target data for each time scale.

[0147] Among them, the dimensions of the target data at multiple time scales are .

[0148] S707. Use the improved LSTM network to predict future target data, that is, predict resource data.

[0149] Among them, the predicted resource data is T× ×1 matrix, T is the number of predictions or the future sampling time, Represents the type of resource information collected.

[0150] S708. The cloud computing platform starts to call various resources in advance, and schedules the startup of virtual machines according to the startup quantity of virtual machines determined by the predicted resource data.

[0151] The virtual machine startup scheduling method of the embodiment of the present application mainly includes the following steps: original prediction data acquisition, multi-channel weight allocation by a weight allocation network module, improved LSTM network prediction, and virtual machine startup scheduling by a resource scheduling module.

[0152] In the acquisition of original prediction data, historical data is collected for scenarios where there is a need to predict future virtual machine startup scheduling. The data may include but is not limited to: the number of virtual machines of each flavor of each physical node, CPU, memory, storage, network, GPU usage and power consumption, etc. Among them, through Flavor, you can define the CPU, memory, disk size and other attributes of the virtual machine instance. From a fixed point in time, multiple groups of data are collected at time intervals of T, 2T, 5T, 10T, etc. to form a time multi-scale sequence. It can be determined whether the CPU usage of the current virtual machine exceeds the threshold of 20%. If it exceeds, the data is classified as a strong valid data class. Otherwise, it means that the probability of the virtual machine being idle is high, and the data is classified as a weak valid data class. Weights are assigned to strong valid data , giving weights of 1- .Will and The union of is determined as the original resource data of multiple time scales. Indicates strong valid data, Indicates weak valid data. It can be determined by the following method: the number of times strong and effective data is collected divided by the total number of times historical resource data is collected.

[0153] Since different time scales are selected to collect historical data, the collected data have inconsistent sequence lengths. Lagrange interpolation (used to construct discrete points into functions) can be used to make the length of each scale sequence consistent with the length of the sequence collected at a time interval of T. Finally, the data input to the (weight distribution network) network is formed, and the dimension of the data is In the embodiments of the present application, represents the quantity at multiple time scales, Represents the type of resource information collected. Indicates the length of the sequence.

[0154] In the weight distribution network module that distributes multi-channel weights, the core idea of ​​the weight distribution network is to introduce the attention mechanism to distribute weights to each channel, which can effectively enhance the correlation between features of different channels and help the network learn additional more important longitudinal feature information. The key operations of the weight distribution network include squeezing and excitation.

[0155] Figure 8 A schematic diagram of a network structure of a weight distribution network provided in some embodiments, such as Figure 8 As shown, multi-channel data (i.e., original resource data at multiple time scales) are input into the weight distribution network, and after squeezing and excitation operations, weights at multiple time scales are obtained. The weights at multiple time scales are combined with the original resource data at multiple time scales to obtain target data at multiple time scales.

[0156] The dimensions of the original resource data at multiple time scales and the target data at multiple time scales are .

[0157] The principle of the squeeze operation is to use the global pooling layer to compress the original resource data of multiple time scales of C×H×W dimensions obtained in the above steps into a real number of C×1×1. The formula is as follows: .

[0158] The excitation operation includes a fully connected layer, a ReLu layer, and a fully connected layer structure, which can learn the feature relationship between different channels and assign weights. Finally, the sigmoid activation function is used to map the result to the range of [0,1], which facilitates the calculation of weight assignment. The formula for the excitation operation is as follows . Exemplarily, a global pooling layer is used to perform global pooling processing on the original resource data of each time scale to obtain the first eigenvalue of each time scale (with a dimension of 1×1×C). In some embodiments, a first fully connected layer can be used to perform dimensionality reduction processing on the first eigenvalues ​​of multiple time scales to obtain target data of the target dimension (with a dimension of 1×1×C / r); a rectified linear unit layer is used to process the target data of the target dimension to obtain designated data of the target dimension (with a dimension of 1×1×C / r); a second fully connected layer is used to perform dimensionality increase processing on the designated data of the target dimension to obtain second eigenvalues ​​of multiple time scales (with a dimension of 1×1×C), and a target activation function (sigmoid) is used to process the second eigenvalue of each time scale to obtain a weight of each time scale (with a dimension of 1×1×C).

[0159] Finally, the channel weights extracted by the weight allocation network are added to the original resource data through multiplication. The final output of this module is the target data of multiple time scales. The calculation formula is as follows: . Represents raw resource data at multiple time scales.

[0160] It can be seen that the weight allocation network module compresses the size of the input data, extracts the features between each channel and multiplies them with the original data, thereby assigning corresponding weights to each time scale. According to the data features extracted by the fully connected layer, the network can assign greater weights to feature channels with a smaller ratio of request number to resource usage, so that this type of resource data contributes more to the prediction results. A greater weight can be given to feature channels whose usage of a certain type of resource (such as usage quantity, CPU, memory, storage, network, GPU usage and power consumption) far exceeds that of other types of resources. The dimension is The original resource data, after the weight distribution network, has a strong longitudinal correlation between the time scale series in the original resource data. When the resource usage at the same location is high or low, the network can also output a higher prediction value. When the gap between the original resource data of different time scales is large, the network can assign a lower weight value at that moment, weakening the impact of idle resources on the prediction results and reducing the idle waste of resources on the hybrid cloud computing platform.

[0161] In addition, the number of time multi-scale inputs can be increased according to the characteristics of the resource pool, but this will lead to a more complicated calculation process. The types of collected information can add additional information such as the number of processes and user login information. The number of requests for input data can also be adjusted according to the future use plan of the resource pool so that it changes according to the planned proportion, and a customized prediction of the virtual machine startup scheduling result is obtained.

[0162] In the improved LSTM network prediction, the LSTM network is a relatively mature algorithm at present. Its characteristics are that data can be input cyclically, and it has better prediction results for time-related signals, which is very suitable for scenarios where predictions are made based on historical data. The network learns and memorizes various time span information of the data through the forget gate, input gate and output gate. The cell states at multiple moments will be used as the input of the current moment together, so the output cell obtained memorizes various time span information of the data. The tanh activation function used in the LSTM network has strong nonlinear ability, but the exponential calculation method makes the network training speed slower, and for a small amount of data, the gradient disappearance phenomenon is more likely to occur. In the scenario of hybrid cloud platform prediction of virtual machine startup scheduling, the amount of data is relatively small, and the prediction results need to be obtained in real time, and the real-time data is continuously added to the model as historical prediction data, so the training speed of the network is required to be high. In the embodiment of the present application, the LSTM network structure is optimized, and the softsign activation function is used to replace the tanh activation function in the LSTM network.

[0163] Among them, the formula of the softsign activation function is as follows: .

[0164] Compared with the tanh function, the softsign function has a simpler form and its derivative is easier to calculate, which can speed up the network training. The softsign function also makes the output of the activation function more stable and closer to linear, reduces the possibility of gradient disappearance, and can better retain the information of the input data, which helps to better handle related tasks. The multi-scale weight data (i.e., target data at multiple time scales) is input into the improved LSTM network, and the final output result (analysis data at multiple time scales) is a prediction of the usage of various resources at future moments, laying the foundation for scheduling various resources in advance.

[0165] In the resource scheduling module, when starting up the virtual machine, in some embodiments, the number of virtual machines to be started can be determined according to the number of user requests in the prediction results. In other embodiments, the number of virtual machines of each flavor to be opened in the resource pool can be calculated according to the number of requests, the number of CPU, memory, storage, and network resources required. In this way, there is no excessive waste of resources when the required resources are met, which greatly improves the resource utilization of the platform. Subsequently, according to the calculated number of virtual machines of each flavor, the node with the best available resources among all the current physical nodes (for example, the node closest to the user, or the node with a moderate distance but many idle resources) is selected through the filter software to create and schedule the migration of the virtual machine in advance. Among them, when the CPU and memory usage of the virtual machine is less than 5%, it is judged as an idle resource, and the idle virtual machine can be re-enabled. If the number of enabled virtual machines is still less than the predicted number of flavor virtual machines, a new virtual machine can be enabled. For example, virtual machines of different flavors can be created in batches by mature scripts to ensure that the number of virtual machines of the corresponding nodes meets the predicted number at future moments, and to ensure the stability and resource utilization of the system.

[0166] Fig. 9 A logical diagram of a virtual machine startup scheduling prediction scheme on a hybrid cloud platform provided by some embodiments, such as Fig. 9 As shown, the cloud computing resource scheduling platform can obtain historical resource data of multiple time scales, obtain original resource data of multiple time scales, and provide the original resource data of multiple time scales to the model server (for example, it can be the above-mentioned computer device). The model server determines the predicted resource data based on the original resource data of multiple time scales, and provides the predicted resource data to the cloud computing resource scheduling platform. The cloud computing resource scheduling platform determines the number of virtual machines to be started based on the predicted resource data; starts the virtual machine resources on the physical node, thereby pre-scheduling the virtual machine.

[0167] In this way, the cloud computing resource scheduling platform provides the historical resource data of virtual machine startup scheduling. Through the resource data collection module, the historical resource data of multiple time scales is collected, and the data is divided into strong effective and weak effective classes, and the corresponding weights are assigned to form a prediction data set (i.e., original resource data). The data set is input into the weight distribution network to weight the time series of each scale. The network weakens the weight of idle resources and enhances the weight of effective resources in the data by learning the characteristics between the time scale sequences. Subsequently, the longitudinal weight data is input into the LSTM network improved by the softsign activation function to obtain the prediction data. The resource scheduling module calculates the number of virtual machines of each flavor that need to be opened according to the prediction data, and determines whether there are migratable resources in the environment (scheduling migration of virtual machines). Finally, the node with the best available resources in the physical node applies for resources, opens new virtual machines, meets the needs of the prediction data, and uses mature scripts to batch create virtual machines of different flavors. At the same time, the resource usage data at that moment is recorded as the original resource data for the next moment.

[0168] The embodiments of the present application can accurately predict the startup of virtual machines and the demand for various resources, arrange the scheduling process in advance, achieve an effective balance between demand and resources, maximize the resource utilization of the cloud computing platform, and effectively improve system performance.

[0169] In some embodiments, in the scenario of resource allocation of cloud computing platform, residual resources that are not deleted in time in the resource pool are proposed to collect original resource usage data using a multi-time scale method. The multi-time scale method is applied to the cloud computing platform virtual machine startup prediction scenario. Through different time scales, the impact of residual resources that are not deleted in time on the prediction results is reduced, and the overall resource utilization of the system is improved.

[0170] In some embodiments, for long-term idle resources in the system, since they may be forgotten to be deleted or may be peak reserved resources, it is proposed to use a weight coefficient Weaken the impact of long-term idle resources on the prediction results. Propose weight coefficient , the collected data is divided into two categories according to the CPU usage rate: strong effective and weak effective, weakening the impact of long-term idle resources on the prediction results. This makes the prediction results more accurate and closer to the actual situation of the number of resources to be used, reduces the idle resources of the system, and improves the system performance.

[0171] In some embodiments, considering the correlation of the usage of various types of resources, the original resource data is constructed into multi-channels of multiple time scales for prediction. Before predicting the startup data, a weight distribution network module is further introduced, considering the longitudinal combination relationship of multi-channel data, and optimizing the weight distribution of data, so that there is a certain degree of correlation between multi-time scale data. The weight distribution network module extracts the characteristics between each time scale sequence. When the resource usage at the same location is high or low, the network can also output a higher prediction value. When the gap between the original resource data of different time scales is large, the network can assign a lower weight value at this moment. Make the network module more adaptable and more accurate. And the weight distribution network model is lightweight, with a simple and flexible structure. It can be added to various network models without affecting the original main structure of the network to achieve optimization of network results, and basically will not affect the original size of the network, which is suitable for lightweight models. The modularity of the network model is high and the running speed is fast.

[0172] In some embodiments, combined with the characteristics of LSTM network that can handle the temporal correlation of data, an LSTM module is selected to be added after the weight distribution network module to obtain the predicted data results, thereby improving the overall ability of the network model to process data with both temporal correlation and spatial correlation. According to the scenario of virtual machine startup prediction applied in the cloud computing platform, the tanh activation function in the LSTM network is optimized to a softsign activation function. The network training speed can be accelerated, the possibility of gradient disappearance can be reduced, and the information of the input data can be better retained, which is helpful for processing such scenarios that have a strong correlation with the original data. The constructed SE-LSTM network structure can comprehensively extract the combined relationship characteristics of the horizontal and vertical information of multi-channel data, so that the feature information obtained by the network is richer and the accuracy of the prediction is improved.

[0173] Based on the same inventive concept, the embodiment of the present application also provides a prediction device for the number of virtual machine startups used to implement the method for predicting the number of virtual machine startups involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in the embodiments of the prediction device for the number of virtual machine startups provided below can refer to the limitations of the method for predicting the number of virtual machine startups above, and will not be repeated here.

[0174] In an exemplary embodiment, Fig.10 A schematic diagram of a structure of a device for predicting the number of virtual machine startups provided in some embodiments, such as Fig.10 As shown, the prediction device 1000 for the number of virtual machine startups includes:

[0175] A preprocessing module 1001 is used to preprocess the historical resource data of the virtual machine collected at multiple time scales to obtain the original resource data at multiple time scales;

[0176] A weight allocation module 1002 is used to allocate a weight to each time scale according to the original resource data of each time scale;

[0177] The weighting module 1003 is used to perform weighted processing on the original resource data of each time scale according to the weight of each time scale to obtain the target data of each time scale;

[0178] The prediction module 1004 is used to perform prediction analysis on target data of multiple time scales and predict the number of virtual machines to be started.

[0179] In some embodiments, the preprocessing module 1001 includes a division unit, a proportion determination unit, and a weighting unit. The division unit is used to divide the historical resource data into a first category of resource data and a second category of resource data; the virtual machine resource occupancy rate in the first category of resource data is greater than the virtual machine resource occupancy rate in the second category of resource data; the proportion determination unit is used to determine the ratio of the sampling times of the first category of resource data and the sampling times of the second category of resource data to the sampling times of the historical resource data, respectively, as the first proportion and the second proportion; the weighting unit is used to weight the first category of resource data with the first proportion, and to weight the second category of resource data with the second proportion, so as to obtain original resource data of multiple time scales.

[0180] In some embodiments, the weighting unit includes a weighting subunit and an alignment subunit. The weighting subunit is used to weight the first type of resource data with a first weight and to weight the second type of resource data with a second weight to obtain weighted data of multiple time scales; the alignment subunit is used to perform dimension alignment processing on the weighted data of multiple time scales to obtain original resource data of multiple time scales.

[0181] In some embodiments, the weight distribution module 1002 includes a squeeze unit and an excitation unit. The squeeze unit is used to perform global pooling processing on the original resource data of each time scale to obtain the first eigenvalue of each time scale; the excitation unit is used to perform excitation processing on the first eigenvalue of each time scale to obtain the second eigenvalue of each time scale, and is used to process the second eigenvalue of each time scale using a target activation function to obtain the weight of each time scale.

[0182] In some embodiments, the prediction module 1004 includes a resource data prediction unit and a startup quantity prediction unit. The resource data prediction unit is used to perform predictive analysis on target data of multiple time scales to obtain predicted resource data; the startup quantity prediction unit is used to predict the startup quantity of at least one specification of virtual machines based on the predicted resource data and the specifications of the virtual machines that can be run in the physical node.

[0183] In some embodiments, the resource data prediction unit includes a data determination subunit, a data processing subunit and a resource data prediction subunit. The data determination subunit is used to determine the unit state data and output gate data that match the target data of multiple time scales; the data processing subunit is used to process the unit state data using a softsign activation function to obtain intermediate data; the resource data prediction subunit is used to fuse the intermediate data and the output gate data to obtain predicted resource data.

[0184] In some embodiments, the device 1000 for predicting the number of virtual machines started also includes: a resource availability value determination module, a sorting module and a scheduling module; the resource availability value determination module is used to determine the resource availability values ​​of multiple physical nodes where the virtual machines are located; the sorting module is used to sort the resource availability values ​​of multiple physical nodes; the scheduling module is used to schedule the startup of virtual machines on multiple physical nodes according to the sorted resource availability values ​​and the number of virtual machines started.

[0185] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.

[0186] Each module in the above-mentioned virtual machine startup number prediction device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.

[0187] In an exemplary embodiment, Fig.11A schematic diagram of the structure of a computer device provided for some embodiments, the computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through wireless fidelity (Wireless Fidelity, WIFI), a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. When the computer program is executed by the processor, a method for predicting the number of virtual machine startups is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0188] Those skilled in the art will understand that Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0189] For example, a computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the method of any of the above embodiments when executing the computer program.

[0190] For example, in an exemplary embodiment, the processor is used to execute a computer program to implement: preprocessing historical resource data of virtual machines collected at multiple time scales to obtain original resource data at multiple time scales; assigning weights to each time scale based on the original resource data at each time scale; performing weighted processing on the original resource data at each time scale based on the weight of each time scale to obtain target data at each time scale; and performing predictive analysis on the target data at multiple time scales to predict the number of virtual machines to be started.

[0191] In one embodiment, a computer-readable storage medium is provided, and when a computer program is executed by a processor, the steps of the method provided in any of the above embodiments are implemented.

[0192] For example, in an exemplary embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: pre-processing historical resource data of virtual machines collected at multiple time scales to obtain original resource data at multiple time scales; assigning weights to each time scale based on the original resource data at each time scale; performing weighted processing on the original resource data at each time scale based on the weight of each time scale to obtain target data at each time scale; and performing predictive analysis on the target data at multiple time scales to predict the number of virtual machines to be started.

[0193] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods.

[0194] The processor, each functional module or each functional unit in any embodiment of the present application may include any one or more of the following integrations: general-purpose processor, application-specific integrated circuit (ASIC), digital signal processor (DSP), digital signal processing device (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), central processing unit, graphics processor, embedded neural network processor, controller, microcontroller, microprocessor, programmable logic device, discrete gate or transistor logic device, discrete hardware component, data processing logic based on quantum computing, artificial intelligence (AI) processor, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0195] The memory or computer-readable storage medium in any embodiment of the present application may include at least one of a non-volatile memory and a volatile memory. Non-volatile memory includes the integration of one or more of the following: Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Ferromagnetic Random Access Memory (FRAM), Flash Memory, Magnetic Surface Storage, Optical Disk, Compact Disc Read-Only Memory (CD-ROM), Tape, Floppy Disk, Flash Memory, Optical Storage, High-density Embedded Non-volatile Memory, Resistive Random Access Memory (ReRAM), Magnetoresistive Random Access Memory (MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (PCM), Graphene Memory, Volatile Memory, etc. Volatile memory includes an integration of one or more of the following: Random Access Memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0196] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0197] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for predicting the number of virtual machine startups, characterized in that: The method comprises: Preprocessing the historical resource data of the virtual machine collected at multiple time scales to obtain the original resource data at the multiple time scales; Allocating weights to each of the time scales according to the original resource data of each of the time scales; According to the weight of each time scale, the original resource data of each time scale is weighted to obtain the target data of each time scale; Predictive analysis is performed on the target data of the multiple time scales to predict the number of startups of the virtual machines.

2. The method according to claim 1, characterized in that The preprocessing of the historical resource data of the virtual machine collected at multiple time scales to obtain the original resource data at the multiple time scales includes: The historical resource data is divided into first-category resource data and second-category resource data; the virtual machine resource occupancy rate in the first-category resource data is greater than the virtual machine resource occupancy rate in the second-category resource data; Determine the ratios of the sampling times of the first-category resource data and the sampling times of the second-category resource data to the sampling times of the historical resource data as the first proportion and the second proportion; The first category resource data is weighted by the first proportion, and the second category resource data is weighted by the second proportion, so as to obtain the original resource data of the multiple time scales.

3. The method according to claim 2, characterized in that The step of weighting the first type of resource data by the first proportion and weighting the second type of resource data by the second proportion to obtain the original resource data of the multiple time scales includes: The first type of resource data is weighted by the first proportion, and the second type of resource data is weighted by the second proportion to obtain weighted data of the multiple time scales; The weighted data of the multiple time scales are dimensionally aligned to obtain the original resource data of the multiple time scales.

4. The method according to any one of claims 1 to 3, characterized in that: The allocating a weight to each of the time scales according to the original resource data of each of the time scales comprises: Performing global pooling processing on the original resource data of each time scale to obtain a first eigenvalue of each time scale; Performing excitation processing on the first eigenvalue of each time scale to obtain the second eigenvalue of each time scale; The second eigenvalue of each time scale is processed by using a target activation function to obtain a weight of each time scale.

5. The method according to any one of claims 1 to 3, characterized in that: The predictive analysis of the target data of the multiple time scales to predict the startup quantity of the virtual machine includes: Performing forecast analysis on the target data of the multiple time scales to obtain forecast resource data; The number of virtual machines to be started of at least one specification is predicted according to the predicted resource data and the specifications of the virtual machines that can be run in the physical node.

6. The method according to claim 5, characterized in that The predictive analysis of the target data at the multiple time scales to obtain the predicted resource data includes: determining cell state data and output gate data matching the target data at the plurality of time scales; The unit state data is processed using a softsign activation function to obtain intermediate data; The intermediate data and the output gate data are merged to obtain the predicted resource data.

7. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Determine resource availability values ​​of multiple physical nodes where the virtual machine is located; Sorting the resource availability values ​​of the multiple physical nodes; The startup scheduling of the virtual machines is performed on the multiple physical nodes according to the sorted resource availability values ​​and the startup quantity of the virtual machines.

8. A device for predicting the number of virtual machine startups, characterized in that: The device comprises: A preprocessing module, used to preprocess the historical resource data of the virtual machine collected at multiple time scales to obtain the original resource data at the multiple time scales; A weight allocation module, used to allocate weights to each of the time scales according to the original resource data of each of the time scales; A weighting module, used for performing weighted processing on the original resource data of each time scale according to the weight of each time scale to obtain the target data of each time scale; The prediction module is used to perform prediction analysis on the target data of the multiple time scales to predict the number of startups of the virtual machines.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.