Load prediction method for cloud work

By using TS2VEC models based on TS2VEC models in cloud computing for load predictions, the traditional method is difficult to adapt to the problem of changes and ignore variable correlations, and achieve higher prediction accuracy and resource management efficiency.

CN119376934AActive Publication Date: 2025-01-28ZHEJIANG UNIV
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411417066.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-01-28
Estimated Expiration
2044-10-11

AI Technical Summary

Technical Problem

Traditional cloud workload prediction methods are difficult to quickly adapt to uncertain changes driven by user needs, ignore the correlation between variables, and have problems with long-term pattern forgetting and gradient disappearance, which is difficult to adapt to short-term changes, resulting in underestimation or overestimation of resource allocation, which increases Risk and cost.

Method used

Using TS2VEC models based on TS2VEC models, by obtaining and pre -processing historical load data, training variable independent predictors and variable dependent predictors, combined with the output of these predictors for weighted summary Dynamically adjust the weight of the predictor and the use of real -time monitoring resources, and optimize the allocation of resources.

Benefits of technology

It improves the accuracy and adaptability of work load prediction, optimizes cloud resource management, improves the reliability and response ability of the system, and reduces the underestimation and overestimation of resource allocation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119376934A_ABST
    Figure CN119376934A_ABST
Patent Text Reader

Abstract

The invention discloses a load prediction method for cloud work, and the method comprises the steps: obtaining the historical load data of cloud work, carrying out the preprocessing, and independently marking the data of the last time step of each sequence; and respectively training a time convolution encoder based on a TS2Vec model by using the preprocessed historical load data and the data of the last time step of each sequence to respectively obtain a variable independent predictor and a variable dependent predictor, and carrying out weighted summation on the outputs of the two predictors to obtain load prediction of cloud work. According to the method, the dependence on historical data is reduced as much as possible, so that the training cost is reduced, meanwhile, low prediction errors are kept in a long time, and the prediction accuracy is further improved by utilizing two predictors of variable independence and variable dependency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cloud computing, and in particular to a method for predicting cloud workloads. Background Art

[0002] The rapid popularity of cloud computing is mainly attributed to its efficient hardware and software services. Its appeal lies in the ability to provide a shared, virtualized, configurable computing resource pool through the Internet, dynamically allocating and expanding resources based on demand, which is called on-demand computing or billing by usage. This approach improves operational efficiency and reduces the need for capital-intensive IT investment.

[0003] In order to optimize resource allocation and comply with the Quality of Service (QoS) standards specified in the Service Level Agreement (SLA), cloud providers need to adopt more accurate forecasting methods to predict the occurrence of peak workloads within a specific time frame. This helps to efficiently handle new service requests and provide the necessary server resources to meet user needs. Basically, the workload forecasting task in the cloud can be conceptualized as a time series forecasting problem, which uses timestamped historical workload records to predict future workload patterns.

[0004] However, traditional forecasting methods often have difficulty adapting quickly to uncertain changes driven by user demand, leading to underestimation or overestimation of resource allocation. In this case, risks and costs are increased due to service interruptions or resource waste. Therefore, more advanced and adaptive forecasting techniques are essential to effectively manage the complexity of cloud workload fluctuations.

[0005] Given the limitations of traditional forecasting methods, time series forecasting methods based on deep learning have made significant progress in recent years, such as recurrent neural networks that are good at capturing sequential dependencies and temporal convolutional networks (TCNs) that provide parallelism and better handle long-term dependencies, as well as the recent Transformer-based models that provide excellent scalability and performance by focusing on the relevant parts of the input sequence.

[0006] However, there are still other limitations if the above prediction models are used in cloud systems. First, these models mainly focus on univariate prediction or make independent predictions for each variable, and rarely consider the correlation between variables, such as CPU and memory usage. Second, these models show a tendency to forget long-term workload patterns and suffer from the vanishing gradient problem, which makes them less reliable over longer time periods.

[0007] Furthermore, due to the dynamic nature of cloud workloads, they also have difficulty adapting to short-term changes, resulting in prediction delays. Existing state-of-the-art time series forecasting models produce forecasts with significant lags in both corresponding decreases and increases. This is because these approaches rely primarily on historical data and static models, lacking the real-time adaptability and optimization suitable for online learning required in modern cloud environments. As a result, this lag leads to inefficient resource allocation, which can cause service slowdowns during high demand periods and unnecessary costs during low demand periods. Summary of the invention

[0008] The purpose of the present invention is to provide a cloud workload prediction method in view of the deficiencies in the prior art.

[0009] The object of the present invention is achieved through the following technical solution: A cloud workload prediction method comprising:

[0010] Obtain historical load data of cloud jobs and preprocess them, marking the data of the last time step of each sequence separately;

[0011] The preprocessed historical load data and the data of the last time step of each sequence are used to train the temporal convolution encoder based on the TS2Vec model, respectively, to obtain the variable-independent predictor and the variable-dependent predictor, and the outputs of the two predictors are weighted summed to obtain the load prediction of the cloud job.

[0012] Furthermore, the preprocessing includes resampling, standardization, denoising and partitioning data using a sliding window.

[0013] Furthermore, the temporal convolutional encoder based on the TS2Vec model includes a first linear mapping layer, a timestamp masking module, a dilated convolutional neural network module and a second linear mapping layer;

[0014] The first linear mapping layer is used to map the signal of each timestamp into a high-dimensional vector;

[0015] The timestamp masking module is used to generate a context view and enhance the understanding of the context by randomly selecting timestamps and masking the corresponding high-dimensional vectors;

[0016] The dilated convolutional neural network module is used to extract the contextual representation of each timestamp;

[0017] The second linear mapping layer is used to map the context representation of each timestamp into a representation vector of the time series

[0018] Furthermore, each layer in the temporal convolutional encoder based on the TS2Vec model uses adapters to balance historical patterns with future trends by independently adjusting each layer of adapters, while using exponential moving average to smooth the data.

[0019] Furthermore, a strategy of dynamically adjusting the predictor weight is also included, and the weight update rule is as follows:

[0020]

[0021] Among them, w t,i is the weight of the i-th predictor at timestamp t, η t is the learning rate, N is the number of predictors, in this patent N = 2, L t,i Represents the loss function size of the i-th predictor at time t.

[0022] Furthermore, the actual usage of cloud resources is monitored in real time and compared with the predicted results to evaluate the accuracy of the prediction; and the variable-independent predictor and variable-dependent predictor are updated with the latest load data and monitoring results.

[0023] Further, it also includes: optimizing resource utilization according to the predicted workload;

[0024] Optimizing resource utilization according to the predicted workload includes:

[0025] By the adaptive factor α t Dynamically adjust resource allocation, making corrections based on overestimation or underestimation of current resource utilization;

[0026] When overestimation occurs, that is, resource utilization exceeds the upper limit Uu, the allocated resources are reduced, then:

[0027]

[0028] When it is underestimated, that is, the resource utilization is less than the lower limit Ul, the allocated resources are increased, then:

[0029]

[0030] Δ is the monitoring interval, λ is a parameter in the range (0,1), Ua is the actual amount of resources allocated, and Umax is the maximum utilization rate.

[0031] The present invention also provides a cloud work load prediction device, including one or more processors, for implementing the above-mentioned cloud work load prediction method.

[0032] The present invention also provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, it is used to implement the above-mentioned cloud work load prediction method.

[0033] The present invention also provides a computer program product, including a computer program, which implements the above-mentioned cloud workload prediction method when executed by a processor.

[0034] Compared with the prior art, the present invention has the following beneficial effects: improving workload prediction accuracy, enhancing workload adaptability and flexibility, optimizing cloud resource management, and improving system reliability and responsiveness. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0036] Figure 1 This is a flow chart of a cloud workload prediction method provided by an embodiment of the present invention.

[0037] Figure 2 It is a schematic diagram of sliding window processing data provided by an embodiment of the present invention.

[0038] Figure 3 It is a schematic diagram of a time convolution encoder provided by an embodiment of the present invention.

[0039] Figure 4 It is a schematic diagram of a hardware structure provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0040] The present invention is described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the features of the following embodiments and implementations can be combined with each other.

[0041] Traditional load forecasting is difficult to adapt to uncertain demand changes, ignores the correlation between variables, has problems such as long-term pattern forgetting and gradient vanishing, is difficult to adapt to short-term changes, and relies on historical data and static models. The present invention provides a cloud workload forecasting method that can be seamlessly integrated into a commercial cloud resource management system and is designed for resource allocation and management in a complex and dynamic environment of a cloud system. Figure 1 As shown, the following steps are included:

[0042] (1) Obtain and preprocess the historical load data of cloud jobs, and mark the data of the last time step of each sequence separately;

[0043] Specifically, step (1) includes the following sub-steps:

[0044] (1.1) First, the necessary time series data are collected in the dataset, including variables such as CPU utilization, memory utilization, normalized memory bandwidth, cache miss rate per thousand instructions, normalized in / out network traffic, and disk I / O percentage. To ensure the reliability of the data, machines with high utilization and fewer missing values ​​are preferred.

[0045] (1.2) For data sets with irregular original data collection intervals, it is necessary to resample the time series data to uniform time intervals, such as 1-minute intervals, to ensure the regularity of the data, which will help stabilize the subsequent model training.

[0046] (1.3) Next, the collected data is standardized to ensure consistent scales between different features. In addition, denoising techniques are applied to reduce noise in the time series.

[0047] (1.4) Figure 2 As shown, a sliding window is used to divide the data into several time series of the same length, and the data of the last time step of each series is marked separately.

[0048] (2) Use the preprocessed historical load data and the data of the last time step of each sequence to train the temporal convolutional encoder based on the TS2Vec model, respectively, to obtain the variable-independent predictor and the variable-dependent predictor, and take the weighted sum of the outputs of these two predictors to obtain the load prediction of the cloud task.

[0049] Specifically, several time series of the same length and the data of the last time step of each sequence are used to train the temporal convolutional encoder based on the TS2Vec model, and variable-independent predictors and variable-dependent predictors are obtained respectively, one predicts variables independently and the other considers the dependency between variables.

[0050] In one embodiment, if Figure 3 As shown, where L is the time span, D is the hidden layer dimension of the model, and H represents the predicted time span; the temporal convolutional encoder based on the TS2Vec model includes a first linear mapping layer, a timestamp masking module, an expanded convolutional neural network module and a second linear mapping layer; specifically:

[0051] The first linear mapping layer maps the signal of each timestamp into a high-dimensional vector; then, the timestamp masking module generates a context view and enhances the context understanding of the model by randomly selecting timestamps and masking the corresponding high-dimensional vectors, that is, introducing a timestamp masking strategy to improve robustness; then, the dilated convolutional neural network module extracts the context representation of each timestamp, and the convolution layer introduces a dilation parameter to introduce a fixed interval ("gap") between the convolution kernel elements in the convolution operation, thereby expanding the receptive field. This dilation design can capture a wider range of context without increasing the convolution kernel size or reducing the resolution. Finally, the context representation of each timestamp is mapped to a representation vector of the time series through the second linear mapping layer.

[0052] In one embodiment, each layer in the temporal convolution encoder based on the TS2Vec model uses an adapter, and each layer of the adapter is adjusted independently to balance historical patterns and future trends. At the same time, an exponential moving average is used to smooth the data and reduce fluctuation interference.

[0053] In one embodiment, the AdamW optimizer is used in the training process to prevent overfitting by decoupling weight decay and to ensure stability by using an adaptive learning rate mechanism. During the training process, larger and larger weights are assigned to predictors with good performance, while smaller and smaller weights are assigned to predictors with poor performance. The weight update rule is as follows:

[0054]

[0055] where w t,i The weight is the weight of the i-th predictor at the timestamp, η is the learning rate, N is the number of predictors, in this embodiment N = 2, L t,i represents the loss function size of the i-th predictor at time t. It is easy to prove that in this algorithm i specifically refers to the predictor that needs to calculate the weight, and j is used to represent accumulation, so that the predictor with better performance obtains a larger weight to optimize performance.

[0056] In one embodiment, prediction and resource management are key links in cloud system resource management. Through workload prediction and dynamic resource allocation, resource utilization can be effectively optimized to ensure stable system operation. Specifically:

[0057] The above-mentioned cloud workload prediction method is used to predict the real-time workload. The historical load data and the current load data are combined to predict the future CPU utilization, memory utilization, normalized memory bandwidth, cache miss rate per thousand instructions, normalized in / out network traffic and disk I / O percentage and other variables. By integrating the results of the two predictors, the changes in short-term and long-term patterns can be better captured, thereby improving the accuracy of the prediction.

[0058] In one embodiment, the actual usage of cloud resources is monitored in real time (i.e., the peak utilization of each variable is recorded) and compared with the prediction results to evaluate the accuracy of the prediction. If the accuracy is lower than the preset threshold, the variable independent predictor and the variable dependent predictor are updated with the latest load data and monitoring results, or updated regularly to ensure their effectiveness in long-term workload prediction.

[0059] In one embodiment, resource utilization is optimized according to the predicted workload to ensure that resource allocation is performed within a specified range, thereby optimizing resource utilization efficiency and ensuring service quality. t Dynamically adjust resource allocation and make corrections based on the overestimation or underestimation of current resource utilization: when it is overestimated (i.e. resource utilization exceeds the upper limit Uu), reduce the allocated resources, then:

[0060]

[0061] Δ is the monitoring interval, and λ is a parameter in the range of (0,1), which indicates the impact of the previous timestamp record on the next adjustment; if λ is set to 0.5, it is not limited. Those skilled in the art should understand that the λ value can be adjusted according to actual conditions. The adjustment formula reduces the adaptive factor α according to the actual allocated resource amount Ua and the maximum recorded usage rate Umax t This reduces future resource allocation. If an underestimation occurs at time tu (i.e., resource utilization is less than the lower limit Ul), then:

[0062]

[0063] Through this dynamic adjustment mechanism, resource utilization can be maintained within the predetermined range [Ul, Uu], effectively reducing the overestimation and underestimation problems in resource allocation. This method not only optimizes resource efficiency, but also ensures that the system can meet the requirements of the service level agreement (SLA), achieving a balance between resource utilization and service assurance.

[0064] Corresponding to the aforementioned embodiment of a load prediction method for cloud work, the present invention also provides an embodiment of a load prediction device for cloud work.

[0065] See also Figure 4 A cloud work load prediction device provided in an embodiment of the present invention includes one or more processors for implementing a cloud work load prediction method in the above embodiment.

[0066] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0067] An embodiment of a load prediction device for cloud work of the present invention can be applied to any device with data processing capabilities, and the device with data processing capabilities can be a device or apparatus such as a computer. The device embodiment can be implemented through software, or through hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of any device with data processing capabilities in which it is located reading the corresponding computer program instructions in the non-volatile memory into the memory for execution. From the hardware level, if Figure 4 As shown, it is a hardware structure diagram of any device with data processing capability where a cloud load prediction device of the present invention is located, except Figure 4 In addition to the processor, memory, network interface, and non-volatile memory shown, any device with data processing capabilities in which the apparatus in the embodiments is located may also include other hardware, generally based on the actual functions of the device with data processing capabilities, which will not be described in detail.

[0068] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0069] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of the present invention. Ordinary technicians in this field can understand and implement it without paying creative work.

[0070] An embodiment of the present invention further provides a computer-readable storage medium having a program stored thereon. When the program is executed by a processor, a load prediction method for cloud work in the above embodiment is implemented.

[0071] An embodiment of the present invention further provides a computer program product, including a computer program, which implements the above-mentioned cloud workload prediction method when executed by a processor.

[0072] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0073] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0074] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0075] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0076] The above embodiments are only used to illustrate the design ideas and features of the present invention, and their purpose is to enable those skilled in the art to understand the content of the present invention and implement it accordingly. The protection scope of the present invention is not limited to the above embodiments. Therefore, any equivalent changes or modifications made based on the principles and design ideas disclosed by the present invention are within the protection scope of the present invention.

Claims

1. A method for predicting cloud workload, characterized in that: include: Obtain historical load data of cloud jobs and preprocess them, marking the data of the last time step of each sequence separately; The preprocessed historical load data and the data of the last time step of each sequence are used to train the temporal convolution encoder based on the TS2Vec model, respectively, to obtain the variable-independent predictor and the variable-dependent predictor, and the outputs of the two predictors are weighted summed to obtain the load prediction of the cloud job.

2. The method according to claim 1, characterized in that The preprocessing includes resampling, normalization, denoising and partitioning the data using a sliding window.

3. The method according to claim 1, characterized in that The temporal convolutional encoder based on the TS2Vec model includes a first linear mapping layer, a timestamp masking module, a dilated convolutional neural network module and a second linear mapping layer; The first linear mapping layer is used to map the signal of each timestamp into a high-dimensional vector; The timestamp masking module is used to generate a context view and enhance the understanding of the context by randomly selecting timestamps and masking the corresponding high-dimensional vectors; The dilated convolutional neural network module is used to extract the contextual representation of each timestamp; The second linear mapping layer is used to map the context representation of each timestamp into a representation vector of the time series.

4. The method according to claim 1, characterized in that: Each layer in the temporal convolutional encoder based on the TS2Vec model uses adapters. By independently adjusting each layer of adapters, historical patterns are balanced with future trends, and exponential moving average is used to smooth the data.

5. The method according to claim 1, characterized in that It also includes a strategy for dynamically adjusting the predictor weights. The weight update rule is as follows: Among them, w t,i is the weight of the i-th predictor at timestamp t, η t is the learning rate, N is the number of predictors, in this patent N = 2, L t,i Represents the loss function size of the i-th predictor at time t.

6. The method according to claim 1, characterized in that The actual usage of cloud resources is monitored in real time and compared with the predicted results to evaluate the accuracy of the prediction; and the variable-independent predictor and variable-dependent predictor are updated with the latest load data and monitoring results.

7. The method according to claim 1, characterized in that Also includes: Optimize resource utilization based on predicted workload; Optimizing resource utilization according to the predicted workload includes: Through the adaptive factor α t Dynamically adjust resource allocation, making corrections based on overestimation or underestimation of current resource utilization; When overestimation occurs, that is, resource utilization exceeds the upper limit Uu, the allocated resources are reduced, then: When it is underestimated, that is, the resource utilization is less than the lower limit Ul, the allocated resources are increased, then: Δ is the monitoring interval, λ is a parameter in the range (0,1), Ua is the actual amount of resources allocated, and Umax is the maximum utilization rate.

8. A cloud workload prediction device, characterized in that: It includes one or more processors, used to implement a cloud workload prediction method according to any one of claims 1 to 7.

9. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, it is used to implement a cloud work load prediction method according to any one of claims 1 to 7.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for predicting cloud workload as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Cloud resource prediction method based on combination of EMD and TCN

    CN112785051A

  • Cloud service load prediction method and system based on two channels

    CN116302515A

  • Cloud server load prediction method based on signal decomposition and hybrid model

    CN117389824A

  • Registration generation method and system for cloud workload prediction

    CN117931426A

  • Cloud load prediction method based on multi-scale decomposition convolution

    CN118524026A