Cloud workload prediction method, device, equipment and storage medium
By using the structure of multiple deep expansion blocks in cloud workload prediction, combined with a multi-head attention mechanism and a convolutional neural network, to capture global periodicity and local residual signals, the problem of inaccurate prediction in cloud workload environments is solved. Realizes dynamic adjustment and efficient utilization of resource allocation.
Patent Information
- Application Number
- CN202311694035.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-08
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2043-12-08
AI Technical Summary
In a highly variable cloud workload environment, existing techniques have difficulty accurately predicting the next stage of workload information, especially poor performance in capturing long-term dependencies and periodic signals, resulting in resource misconfiguration and waste.
It adopts the structure of multiple depth expansion blocks, in which the periodic module captures the global periodic signal through the multi-head attention mechanism, and the residual module extracts local residual information through the convolutional neural network, and combines the sliding window and gradient descent methods to train the model to add Output the load information of the next stage.
It achieves accurate prediction of highly variable cloud workloads, avoids resource shortage and waste, deeply analyzes complex dependencies, and ensures prediction accuracy in highly volatile environments.
Smart Images

Figure CN117931420B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer systems and network technology, and in particular to a cloud workload prediction method, device, equipment and storage medium. Background Art
[0002] Cloud computing, with the unique characteristics of virtualization technology, meets various service level agreements (SLAs) between cloud service providers (CSPs) and end users in an on-demand supply model. In a cloud environment, the number and arrival time of tasks submitted by users are not fixed, making cloud workloads usually highly variable. At the same time, changes in cloud workloads will cause a decrease in the utilization of cloud platform system resources, resulting in unnecessary resource waste or poor SLAs. Therefore, it is necessary to build an accurate cloud workload prediction model so that CSPs can quickly adjust resource allocation solutions to meet SLAs requirements while improving the utilization of cloud platform system resources.
[0003] However, due to the high variability and mutation of cloud workloads, it is difficult to accurately predict the workload information for the next stage. In order to solve the above problems, the complex dependencies in cloud workload signals should be effectively captured. In the early stage, most prediction methods are based on probability theory or statistical methods to model cloud workloads, including autoregressive models, autoregressive moving average models, exponentially weighted moving average models, etc. These methods can capture the linear dependencies of historical adjacent signals well, but they show certain limitations in predicting fluctuation signals in cloud workloads.
[0004] With the development of artificial neural networks, more and more methods use RNN-based structures to analyze dependencies hidden in cloud workloads; however, such methods decouple historical load information through recursion, but often perform poorly on highly variable workload predictions because they usually cannot capture long-term dependencies and fail to explore the periodicity in historical load information. The attention mechanism in the Transformer network can replace recursion or convolution to discover the correlation between historical sequence data, and the self-attention mechanism of the network structure can capture the long-term dependencies of long time series. Therefore, Transformer-based cloud workload prediction methods can model the periodicity of historical observed load information, thereby decomposing periodic complex dependencies. However, such methods may lead to suboptimal performance because workload scenarios in the real world often exhibit multi-periodicity and high volatility.
[0005] In the related art, a patent application document with publication number CN113033780A proposes a cloud platform resource prediction method based on a double-layer attention mechanism, and integrates the double-layer attention mechanism output part with a traditional autoregressive model to complete multi-model fusion, overcoming the problems of poor prediction performance of a single model and easy dilution when the input is too long; however, this scheme only uses the double-layer attention mechanism once, and uses the feature attention mechanism to capture the correlation between the historical sequence and each local feature, while using the long-term attention mechanism to capture the long-term time-dependent features in the historical sequence, and the attention used is equivalent to calculating a weighted context vector to represent the information of the input sequence. The patent application document with publication number CN114528097A proposes to realize cloud platform service load prediction based on time series convolutional neural network. By extracting periodic attention vectors and peak attention vectors from training samples, the training samples, periodic attention vectors and peak attention vectors are weighted and summed to obtain the final training samples to train the time series convolutional neural network and realize CPU load prediction. However, in this scheme, the repetitive information discovered by the autocorrelation coefficient is used as the periodicity of the time series. This method guided by historical data itself may not fully discover the global periodic information in the sequence. In addition, this scheme uses the first-order difference method, that is, the difference between two adjacent data as volatility. In this way, only considering the correlation between the two data may not be enough to indicate the local volatility of the time series. The patent application document with publication number CN113886454A proposes combining LSTM neural network and RBF neural network, weighting and fusing the final output vectors of LSTM neural network and RBF neural network according to proportional parameters, and using BP neural network to perform hybrid prediction on the weighted results; this scheme uses LSTM and RBF neural networks to construct a prediction model, and the final prediction result is a combination of LSTM and RBF output results. Using LSTM and RBF to fusion-predict load information can well extract the periodicity of the sequence, but as the length of the load sequence continues to grow, the dependency implied by the historical load may be lost. At the same time, this method also ignores local fluctuation signals in the load information. Summary of the invention
[0006] The technical problem to be solved by the present invention is how to achieve accurate prediction in a highly variable cloud workload environment.
[0007] The present invention solves the above technical problems by the following technical means:
[0008] In a first aspect, a cloud workload prediction method is proposed, the method comprising:
[0009] Collect the current load information sequence of the cloud platform;
[0010] Inputting the current load information sequence into a pre-trained load information prediction model, the load information prediction model includes a plurality of depth extension blocks, each of the depth extension blocks includes a parallel periodic module and a residual module, the periodic module is used to extract the first feedback information and the global periodic signal of the load information sequence, and the residual module is used to extract the second feedback information and the local residual information of the load information sequence;
[0011] Using the difference between the input sequence of the periodic module in the previous depth extension block and the first feedback information outputted by it as the input of the periodic module in the next depth extension block, and using the difference between the input sequence of the residual module in the previous depth extension block and the second feedback information outputted by it as the input of the residual module in the next depth extension block;
[0012] The global periodic signal output by each of the periodic modules and the local residual information output by each of the residual modules are added together to obtain a load information sequence for the next stage of the cloud platform.
[0013] Furthermore, the periodic module includes a multi-head attention mechanism layer and a fully connected layer, and the output of the multi-head attention mechanism layer is connected to the fully connected layer.
[0014] Furthermore, the residual module includes several layers of convolutional neural networks connected in sequence.
[0015] Furthermore, before inputting the current load information sequence into the pre-trained load information prediction model, the method further includes:
[0016] The current load information sequence is divided into input sequences according to the window size by a sliding window method, which are used as inputs of the load information prediction model.
[0017] Furthermore, before inputting the current load information sequence into the pre-trained load information prediction model, the method further includes:
[0018] Collect the load information sequence of the cloud platform in the historical period to build a data set, and divide the data set into a training set and a test set;
[0019] The sliding window method is used to divide the training set and the test set into sample sequence and label sequence according to the window size;
[0020] The load information prediction model is trained using the sample sequence and label sequence of the training set to obtain a prediction result;
[0021] Using the root mean square error as the loss function between the prediction result and the label sequence, back-propagating and updating the parameters of the load information prediction model using the gradient descent method, and iterative training until a preset condition is met or the loss function is minimized and converged, thereby obtaining the trained load information prediction model;
[0022] The trained load information prediction model is tested using the sample sequence and label sequence of the test set.
[0023] Furthermore, the size of the input window is larger than the size of the output window.
[0024] Furthermore, the formula of the loss function is expressed as:
[0025]
[0026] in, represents the root mean square error, Indicates the real load information. Indicates the predicted load information, Indicates the number of payload data.
[0027] In a second aspect, the present invention provides a cloud workload prediction device, the device comprising:
[0028] Information collection module, used to collect the current load information sequence of the cloud platform;
[0029] An input module, used to input the current load information sequence into a pre-trained load information prediction model, wherein the load information prediction model includes a plurality of depth extension blocks, each of which includes a parallel periodic module and a residual module, wherein the periodic module is used to extract the first feedback information and the global periodic signal of the load information sequence, and the residual module is used to extract the second feedback information and the local residual information of the load information sequence;
[0030] An information compensation module, used to use the difference between the input sequence of the periodic module in the previous depth extension block and the first feedback information outputted by it as the input of the periodic module in the next depth extension block, and use the difference between the input sequence of the residual module in the previous depth extension block and the second feedback information outputted by it as the input of the residual module in the next depth extension block;
[0031] The prediction module is used to add the global periodic signal output by each periodic module and the local residual information output by each residual module to obtain the load information sequence of the next stage of the cloud platform.
[0032] In a third aspect, the present invention proposes a cloud workload prediction device, which includes a memory and a processor; wherein the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the cloud workload prediction method as described above.
[0033] In a fourth aspect, the present invention proposes a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the cloud workload prediction method as described above is implemented.
[0034] The advantages of the present invention are:
[0035] (1) Aiming at the prediction of highly variable cloud workloads, the present invention uses multiple deep extension blocks to gradually decompose the complex dependencies of highly variable cloud workload sequences to cope with the high variability and high volatility of the cloud workload environment; by introducing periodic states and residual states as hidden variables, the complex dependencies are decomposed into two modules, namely the periodic module and the residual module. The periodic module can capture the global periodicity, and the compensation module can capture the residual signal hidden in the workload to compensate for the local fluctuation signal of the load information, thereby ensuring the accuracy of the prediction of highly volatile cloud workloads; the present invention decomposes the complex relationship of the cloud workload into periodic signals and residual signals layer by layer in a block structure, thereby ensuring the integrity of the decomposed complex relationship of the cloud workload, and exhibits excellent results in processing highly variable cloud workload environments.
[0036] (2) By predicting the load information of the next stage, the cloud resource configuration can be dynamically adjusted in a timely manner, avoiding insufficient computing resources and waste of resources.
[0037] (3) The periodic module uses a multi-head attention mechanism to effectively capture the global periodic information of the cloud workload, while the residual module uses a convolutional neural network to compensate for the local fluctuation signal of the load information and decomposes the cloud workload information layer by layer in a residual learning manner, thereby deeply analyzing the complex dependencies of the highly variable cloud workload information.
[0038] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a flowchart of a cloud workload prediction method proposed in one embodiment of the present invention;
[0040] Figure 2 is a schematic diagram of an architecture for highly variable cloud workload prediction in one embodiment of the present invention;
[0041] Figure 3 It is a schematic diagram of the overall implementation process of a method for predicting highly variable cloud workloads in one embodiment of the present invention;
[0042] Figure 4 is a schematic diagram comparing the effects of the predicted value and the actual load in one embodiment of the present invention;
[0043] Figure 5 A schematic diagram of the structure of a cloud workload prediction device proposed in one embodiment of the present invention. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in combination with the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0045] like Figure 1 to Figure 2 As shown, the first embodiment of the present invention discloses a cloud workload prediction method, the method comprising the following steps:
[0046] S10, collecting the current load information sequence of the cloud platform;
[0047] It should be noted that, in this embodiment, a load sequence collector can be used to collect the current load information sequence of the Alibaba Cloud platform.
[0048] S20, inputting the current load information sequence into a pre-trained load information prediction model, wherein the load information prediction model includes a plurality of depth extension blocks, each of which includes a parallel periodic module and a residual module, wherein the periodic module is used to extract first feedback information and a global periodic signal of the load information sequence, and the residual module is used to extract second feedback information and local residual information of the load information sequence;
[0049] It should be noted that, through a large number of experiments, this embodiment has the best effect when the depth expansion block is usually set to 3. It can be understood that for cloud workloads, it is usually a one-dimensional time series, which is not as complex as image and voice data, so fewer network layers can learn the dependencies in the time series.
[0050] S30, using the difference between the input sequence of the periodic module in the previous depth extension block and the first feedback information outputted by it as the input of the periodic module in the next depth extension block, and using the difference between the input sequence of the residual module in the previous depth extension block and the second feedback information outputted by it as the input of the residual module in the next depth extension block;
[0051] It should be noted that the input of the first depth expansion block is a load information sequence, and the input of each depth expansion block is subtracted from the first feedback information output by its first output end as the input of the periodic module in the next depth expansion block; the input of the residual module in the first depth expansion block is a load information sequence, and the input of the residual module in each depth expansion block is subtracted from the second feedback information output by its first output end as the input of the residual module in the next depth expansion block; the second output end of each periodic module is connected to the second output end of each residual module through a summation operation, and the global periodic signal output by the second output end of each periodic module is summed with the local residual information output by the second output end of each residual module as the load prediction result of the next stage of the cloud platform.
[0052] Furthermore, periodicity can be divided into global periodicity and local periodicity. This embodiment adopts a multi-head attention mechanism to gradually extract the global periodicity of the time series, and adopts a convolutional neural network to mine the local volatility in the historical sequence layer by layer. The global periodicity and local volatility extracted by this embodiment are also different from the periodic attention vector and peak attention vector extracted by using training samples in related technologies. This embodiment extracts global periodicity information and local volatility information step by step and layer by layer.
[0053] S40. Add the global periodic signal output by each periodic module and the local residual information output by each residual module to obtain a load information sequence of the next stage of the cloud platform.
[0054] This embodiment aims at the prediction of highly variable cloud workloads. It uses multiple deep extension blocks to gradually decompose the complex dependencies of highly variable cloud workload sequences. By decomposing the complex relationships of the cloud workloads layer by layer into periodic signals and residual signals in a block structure, the integrity of the decomposed complex relationships of the cloud workloads is ensured to cope with the high variability and high volatility of the cloud workload environment. By introducing periodic states and residual states as hidden variables, the complex dependencies are decomposed into two modules, corresponding to the periodic module and the residual module respectively. The periodic module can capture the global periodicity, and the compensation module can capture the residual signal hidden in the workload to compensate for the local fluctuation signal of the load information, thereby ensuring the accuracy of the prediction of highly volatile cloud workloads.
[0055] In one embodiment, the periodic module includes a multi-head attention mechanism layer and a fully connected layer, and the output of the multi-head attention mechanism layer is connected to the fully connected layer.
[0056] It should be noted that the load information sequence is input into the multi-head attention mechanism layer, and then passes through a fully connected layer to obtain the input feedback information and the decomposed global cycle information, and the difference between the input sequence and the feedback information is used as the input of the cycle module in the next depth expansion block.
[0057] The multi-head attention mechanism used in this embodiment uses multiple sets of attention weights, each set of weights can learn different semantic information, and each set of weights will generate a context vector. Finally, these context vectors will be spliced together and then a linear transformation will be used to obtain the final output. The global periodicity in the sequence is captured by the multi-head attention mechanism layer and the fully connected layer, that is, the correlation between all data in the sequence is considered, and the implicit global periodicity in the sequence is deeply parsed layer by layer using multi-head attention multiple times in the form of deep expansion blocks.
[0058] In one embodiment, the residual module includes several layers of convolutional neural networks connected in sequence.
[0059] Specifically, the residual module used in this embodiment includes four layers of convolutional neural networks connected in sequence.
[0060] Furthermore, the load information prediction model designed in this embodiment is mainly composed of a multi-head attention mechanism and CNN. The prediction result is obtained by gradually accumulating the results of the multi-head attention layer and the convolutional neural network in the form of extended blocks, and deeply analyzing the complex dependencies in the historical load sequence in the form of a block structure. Each block structure uses a multi-head attention mechanism to consider the global periodicity in the load sequence, and uses a convolutional neural network to extract the local fluctuation signal implicit in the sequence.
[0061] In one embodiment, before the step S20: inputting the current load information sequence into the pre-trained load information prediction model, the method further includes the following steps:
[0062] The current load information sequence is divided into input sequences according to the window size by a sliding window method, which are used as inputs of the load information prediction model.
[0063] Specifically, Figure 3As shown, before using the load information prediction model to predict the load information of the next stage of the cloud platform, this embodiment first constructs a load information prediction model, and trains the constructed load information prediction model to obtain a trained model. The load information sequence of the current cloud platform is input into the trained load prediction model to obtain the load information sequence of the next stage. The specific training process includes the following steps:
[0064] (1) Collect the load information sequence of the cloud platform in the historical period to build a data set, and divide the data set into a training set and a test set;
[0065] Specifically, this embodiment uses the load sequence collector to collect the number of tasks arriving every 5 minutes on the Alibaba Cloud platform over the past period of time as the load sequence. Assume that the sequence length is , in The number of tasks arriving at time .
[0066] (2) Using a sliding window method, the training set and the test set are divided into sample sequences and label sequences according to the window size;
[0067] Specifically, this embodiment divides the collected load sequence into training sets in a ratio of 7:3 and test set , and then set the input window of the load sequence separately and Output Window , and use the sliding window method to divide the training set and the test set into sample sequences according to the window size and tag sequence , the size of the input window is larger than the size of the output window.
[0068] (3) Using the sample sequence and label sequence of the training set to train the load information prediction model to obtain a prediction result;
[0069] Specifically, a prediction model for highly variable cloud workload information is established. The model consists of multiple deep extension blocks, each of which contains a periodic module and a residual module. Therefore, cloud workload prediction can be formalized as ,in For the cycle module using the multi-head attention mechanism, To use the residual module of the convolutional neural network, Noise is usually divided into data noise and model noise. Data noise is usually the abnormal value or error value collected when collecting data, and model noise is caused by model parameters or network structure. It can be understood that noise is understood as the difference between the output result of the model and the actual result.
[0070] This embodiment uses the sample sequence and label sequence of the training set to train the model: if the current is the first deep expansion block, firstly convert the training sample, i.e., the sample sequence and the label sequence At the same time, it is input into the multi-head attention mechanism layer, and then passes through a fully connected layer to obtain the input feedback information And the decomposed period information , and the difference between the input sequence and the feedback information As the input of the periodic module in the next depth expansion block, we have Secondly, the sample sequence Input into the convolutional neural network layer to get input feedback information And the decomposed residual information , and similarly the difference between the input sample sequence and the feedback information As the input of the residual module in the next depth expansion block, we have ; Then the obtained period information and residual information are added as the final prediction result of the model, that is, .
[0071] It should be noted that the multi-head attention layer is used to learn global periodicity. The more input data, the more realistic the periodicity can be. Therefore, both sample sequence and label sequence are used. The convolutional neural network is used to learn local fluctuation information, so only sample sequence is needed.
[0072] (4) using the root mean square error as the loss function between the prediction result and the label sequence, and using the gradient descent method to back-propagate and update the parameters of the load information prediction model, and performing iterative training until the preset condition is met or the loss function is minimized and converged, thereby obtaining the trained load information prediction model;
[0073] Specifically, this embodiment calculates the loss function and uses the gradient descent method to back-propagate and update the parameters of the model, and continuously iterates the training until the preset conditions are met or the loss function is minimized and converges. This embodiment uses the root mean square error as the loss function between the prediction result and the label sequence, and the formula of the loss function is expressed as:
[0074]
[0075] in, RMS Error Indicates the real load information. Indicates the predicted load information, Indicates the number of payload data.
[0076] It should be noted that the RMSE is used in this embodiment in order to impose a greater penalty on fluctuating signals, thereby allowing the model to better fit those highly fluctuating loads.
[0077] (5) Using the sample sequence and label sequence of the test set to test the trained load information prediction model.
[0078] This embodiment uses the load information prediction model pre-trained in this embodiment to predict the load information of the cloud platform in the next stage. The comparison result is as follows: Figure 4 As shown in the figure, good results can be achieved in most cases, and even good results can be achieved at most peaks. Cloud workloads include CPU utilization, memory utilization, and the number of tasks arriving. The range of CPU utilization and memory utilization is 0%~100%, while the range of the number of tasks arriving is 0~2*10. 6 , or even a larger range, so the two dimensions are inconsistent, and the high volatility reflected by the number of tasks arriving is more obvious, making prediction more difficult. Most related technologies use CPU utilization and memory utilization as prediction targets, while this embodiment is modeled based on the number of tasks arriving. The prediction target of this embodiment is more difficult to predict. At the same time, in terms of this prediction target, the prediction results obtained by this embodiment exceed the prediction results of most models in related research.
[0079] In addition, if Figure 5 As shown, the second embodiment of the present invention discloses a cloud workload prediction device, the device comprising:
[0080] The information collection module 10 is used to collect the current load information sequence of the cloud platform;
[0081] An input module 20, used to input the current load information sequence into a pre-trained load information prediction model, wherein the load information prediction model includes a plurality of depth extension blocks, each of which includes a parallel periodic module and a residual module, wherein the periodic module is used to extract the first feedback information and the global periodic signal of the load information sequence, and the residual module is used to extract the second feedback information and the local residual information of the load information sequence;
[0082] An information compensation module 30, configured to use the difference between the input sequence of the periodic module in the previous depth extension block and the first feedback information outputted by the periodic module as the input of the periodic module in the next depth extension block, and use the difference between the input sequence of the residual module in the previous depth extension block and the second feedback information outputted by the residual module as the input of the residual module in the next depth extension block;
[0083] The prediction module 40 is used to add the global periodic signal output by each of the periodic modules and the local residual information output by each of the residual modules to obtain a load information sequence of the next stage of the cloud platform.
[0084] This embodiment aims at the prediction of highly variable cloud workloads. It uses multiple deep extension blocks to gradually decompose the complex dependencies of highly variable cloud workload sequences to cope with the high variability and high volatility of the cloud workload environment. By introducing periodic states and residual states as hidden variables, the complex dependencies are decomposed into two modules, corresponding to the periodic module and the residual module respectively. The periodic module can capture the global periodicity, and the compensation module can capture the residual signal hidden in the workload to compensate for the local fluctuation signal of the load information, thereby ensuring the accuracy of the prediction of highly volatile cloud workloads.
[0085] In one embodiment, the periodic module includes a multi-head attention mechanism layer and a fully connected layer, and the output of the multi-head attention mechanism layer is connected to the fully connected layer.
[0086] In one embodiment, the residual module includes several layers of convolutional neural networks connected in sequence.
[0087] In one embodiment, the device further includes: a window module, which is used to divide the current load information sequence into input sequences according to the window size by using a sliding window method, which are used as inputs of the load information prediction model.
[0088] In one embodiment, the device further comprises:
[0089] The sample set construction module is used to collect the load information sequence in the historical period of the cloud platform to construct a data set, and divide the data set into a training set and a test set;
[0090] A sequence partitioning module is used to use a sliding window method to divide the training set and the test set into sample sequences and label sequences according to the window size;
[0091] A training module, used to train the load information prediction model using the sample sequence and label sequence of the training set to obtain a prediction result;
[0092] An iteration module is used to use the root mean square error as the loss function between the prediction result and the label sequence, and to back-propagate and update the parameters of the load information prediction model using the gradient descent method, and to perform iterative training until a preset condition is met or the loss function is minimized and converged to obtain the trained load information prediction model;
[0093] The testing module is used to test the trained load information prediction model using the sample sequence and label sequence of the test set.
[0094] In one embodiment, the loss function is expressed as:
[0095]
[0096] in, represents the root mean square error, Indicates the real load information. Indicates the predicted load information, Indicates the number of payload data.
[0097] It should be noted that other embodiments of the cloud workload prediction device of the present invention or implementation methods can refer to the above-mentioned method embodiments, which will not be repeated here.
[0098] In addition, this embodiment also discloses a cloud workload prediction device, which includes a memory and a processor; wherein the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the cloud workload prediction method described in the first embodiment above.
[0099] In addition, the present invention also discloses a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the cloud workload prediction method described in the first embodiment above is implemented.
[0100] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0101] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0102] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0103] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0104] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A cloud workload prediction method, characterized in that: The method comprises: Collect the current load information sequence of the cloud platform; Inputting the current load information sequence into a pre-trained load information prediction model, the load information prediction model includes a plurality of depth extension blocks, each of the depth extension blocks includes a parallel periodic module and a residual module, the periodic module is used to extract the first feedback information and the global periodic signal of the load information sequence, and the residual module is used to extract the second feedback information and the local residual information of the load information sequence; Using the difference between the input sequence of the periodic module in the previous depth extension block and the first feedback information outputted by it as the input of the periodic module in the next depth extension block, and using the difference between the input sequence of the residual module in the previous depth extension block and the second feedback information outputted by it as the input of the residual module in the next depth extension block; The global periodic signal output by each of the periodic modules and the local residual information output by each of the residual modules are added together to obtain a load information sequence for the next stage of the cloud platform.
2. The cloud workload prediction method according to claim 1, characterized in that: The periodic module includes a multi-head attention mechanism layer and a fully connected layer, and the output of the multi-head attention mechanism layer is connected to the fully connected layer.
3. The cloud workload prediction method according to claim 1, characterized in that: The residual module includes several layers of convolutional neural networks connected in sequence.
4. The cloud workload prediction method according to claim 1, wherein: Before inputting the current load information sequence into the pre-trained load information prediction model, the method further includes: The current load information sequence is divided into input sequences according to the window size by a sliding window method, which are used as inputs of the load information prediction model.
5. The cloud workload prediction method according to claim 1, wherein: Before inputting the current load information sequence into the pre-trained load information prediction model, the method further includes: Collect the load information sequence of the cloud platform in the historical period to build a data set, and divide the data set into a training set and a test set; The sliding window method is used to divide the training set and the test set into sample sequence and label sequence according to the window size; The load information prediction model is trained using the sample sequence and label sequence of the training set to obtain a prediction result; Using the root mean square error as the loss function between the prediction result and the label sequence, back-propagating and updating the parameters of the load information prediction model using the gradient descent method, and iterative training until a preset condition is met or the loss function is minimized and converged, thereby obtaining the trained load information prediction model; The trained load information prediction model is tested using the sample sequence and label sequence of the test set.
6. The cloud workload prediction method according to claim 5, characterized in that: The size of the input window is larger than the size of the output window.
7. The cloud workload prediction method according to claim 5, characterized in that: The formula of the loss function is expressed as: in, represents the root mean square error, Indicates the real load information. Indicates the predicted load information, Indicates the number of payload data.
8. A cloud workload prediction device, characterized in that: The device comprises: Information collection module, used to collect the current load information sequence of the cloud platform; An input module, used to input the current load information sequence into a pre-trained load information prediction model, wherein the load information prediction model includes a plurality of depth extension blocks, each of which includes a parallel periodic module and a residual module, wherein the periodic module is used to extract the first feedback information and the global periodic signal of the load information sequence, and the residual module is used to extract the second feedback information and the local residual information of the load information sequence; An information compensation module, used to use the difference between the input sequence of the periodic module in the previous depth extension block and the first feedback information outputted by it as the input of the periodic module in the next depth extension block, and use the difference between the input sequence of the residual module in the previous depth extension block and the second feedback information outputted by it as the input of the residual module in the next depth extension block; The prediction module is used to add the global periodic signal output by each periodic module and the local residual information output by each residual module to obtain the load information sequence of the next stage of the cloud platform.
9. A cloud workload prediction device, characterized in that: The device includes a memory and a processor; wherein the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the method according to any one of claims 1 to 7.
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 method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Cloud platform resource prediction method based on double-layer attention mechanism
CN113033780A
Cloud resource prediction method based on LSTM-RBF
CN113886454A
Cloud platform service load prediction method based on time sequence convolutional neural network
CN114528097A
Long-term power load prediction method based on hierarchical residual self-attention neural network
CN114529051A
Server load prediction method based on deep learning
CN115378948A
