Cloud resource data planning method and system based on time sequence prediction

By building the ScaleMixer and Quartz scheduling framework of timing prediction neural network models, multi-dimensional accurate prediction and adaptive allocation of cloud resource requirements are achieved, solving the problems of resource redundancy and low utilization rate in cloud resource management, and improving resource utilization efficiency.

CN120528816APending Publication Date: 2025-08-22ZHEJIANG UNIV +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510688843.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2025-08-22

AI Technical Summary

Technical Problem

When facing complex dynamic loads, existing cloud resource management systems have problems of resource redundancy and low utilization. The existing prediction technology is insufficient in accuracy and it is difficult to achieve refined scheduling.

Method used

ScaleMixer, a timing prediction neural network model, is built, combined with the Quartz scheduling framework, and through the fusion of fast Fourier transform and multi-scale feature, it can conduct multi-dimensional accurate prediction of cloud resource requirements and generate an adaptive allocation strategy.

Benefits of technology

It significantly improves the prediction accuracy and generalization capabilities of cloud resources, reduces resource waste, and improves resource utilization efficiency and business response capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120528816A_ABST
    Figure CN120528816A_ABST
Patent Text Reader

Abstract

The invention discloses a cloud resource planning method based on time sequence prediction. The method comprises the following steps of collecting cloud resource data and performing storage processing to form time sequence data; preprocessing the time sequence data according to a target to obtain processed data; constructing a training sample set based on the processing data; constructing a time sequence prediction neural network model ScaleMixer, and training the time sequence prediction neural network model ScaleMixer based on the training sample set to obtain a trend prediction model; performing analysis based on a prediction result output by the trend prediction model in combination with actual cloud resource data to obtain an analysis result; and generating a cloud resource planning report based on the analysis result and the historical cloud resource data, and planning the cloud resources. Multi-dimensional accurate prediction of future cloud resource demands is realized, and a self-adaptive cloud resource allocation strategy is generated in combination with demand scene features, so that resource supply and demand fluctuation are effectively balanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a cloud resource data planning method and system based on time series prediction. Background Art

[0002] With the rapid advancement of information technology, cloud computing has become a key force driving enterprise digital transformation. Cloud computing, with its elastic computing, storage, and network services, has significantly reduced the burden on enterprises to invest in hardware infrastructure and significantly improved resource utilization, allowing them to focus more on core business development. However, with the widespread adoption and in-depth application of cloud services, the management and optimization of cloud resources have become increasingly prominent. Accurately predicting and analyzing cloud resource usage, in particular, has become a core challenge in cloud computing resource management, which is crucial for reducing resource waste and avoiding redundant configurations.

[0003] Currently, mainstream cloud service platforms generally adopt an on-demand resource allocation model, leveraging virtualization technology to flexibly divide physical resources into multiple virtual instances to meet users' diverse computing power, storage space, and network bandwidth needs. Cloud resource usage is characterized by high dynamics and uncertainty, influenced by multiple factors such as user access patterns, data processing intensity, and system load fluctuations.

[0004] Faced with diverse application scenarios and complex and volatile workloads, despite cloud platforms having established relatively comprehensive resource scheduling systems, resource redundancy is particularly prominent in actual operations. On the one hand, to mitigate the risk of resource shortages during peak business periods, users generally adopt over-reservation strategies, resulting in a large amount of idle resources during off-peak hours. On the other hand, the actual utilization of allocated resources is often low, and computing and storage potential is not fully realized. While existing forecasting technologies have introduced algorithms such as linear regression and support vector machines, they still suffer from insufficient accuracy and real-time performance when faced with complex workloads, making it difficult to support the demands of refined resource scheduling. This lag in forecasting and scheduling capabilities further amplifies the risk of supply-demand mismatch in resource allocation.

[0005] In view of this, the present invention is proposed. Summary of the Invention

[0006] The first purpose of this application is to provide a cloud resource planning method based on time series prediction. It is necessary to collect time series data of cloud resource data, build a time series prediction neural network model ScaleMixer, realize multi-dimensional and accurate prediction of future cloud resource demand, and generate an adaptive cloud resource allocation strategy based on demand scenario characteristics to effectively balance resource supply and demand fluctuations.

[0007] The second object of the present invention is to provide a cloud resource planning system based on time series prediction, which is used to implement the above method.

[0008] In order to achieve the above technical objectives, this application is proposed: A cloud resource planning method based on time series prediction, characterized by comprising the following steps: Collect cloud resource data and store and process it to form time series data; pre-process the time series data according to the target to obtain processed data; Constructing a training sample set based on the processed data; constructing a time series prediction neural network model ScaleMixer, and training the time series prediction neural network model ScaleMixer based on the training sample set to obtain a trend prediction model; Analyzing the forecast results output by the trend forecast model in combination with actual cloud resource data to obtain an analysis result; A cloud resource planning report is generated based on the analysis results and historical cloud resource data to plan cloud resources.

[0009] Furthermore, the trend prediction model is adaptively optimized, and based on the comparative detection between the prediction results and the actual cloud resource data, the deviation between the prediction results of the current trend prediction model and the actual cloud resource data is periodically calculated; when the deviation exceeds a preset threshold, the optimization of the trend prediction model is triggered, and the cloud resource planning report is updated and the cloud resources are newly planned.

[0010] Furthermore, the construction of the time series prediction neural network model ScaleMixer includes: Normalizing the processed data by a reversible instance normalization layer to obtain normalized data; Performing frequency domain feature analysis and multi-scale spatiotemporal feature extraction on the standardized data to generate joint spatiotemporal features; The frequency domain weights are fused with the joint spatiotemporal features and combined with residual connections to output the stable prediction results.

[0011] Preferably, the steps of performing frequency domain feature analysis and multi-scale spatiotemporal feature extraction on the standardized data include: The standardized data is converted from time series data to frequency domain through fast Fourier transform, the top K main frequency components with the largest amplitude are screened, and the standardized data is calculated and segmented to form multiple patches, and the patches are converted into corresponding patch blocks based on patch embedding; The calculation formula is:

[0012]

[0013] Where X represents time series data, Indicates the fast Fourier transform of time series data. represents the frequency set of the filter, Represents the amplitude set corresponding to the frequency, Amp(·) represents the calculation function of the frequency domain amplitude, and A represents the main frequency components corresponding to the first K largest amplitudes selected from the amplitude set. Indicates sorting A. Indicates the size of the segmentation, L indicates the length to be predicted, Indicates the i-th main frequency; Extracting features within and between the patch blocks to generate joint spatiotemporal features; Performing Softmax on the amplitude extracted by the fast Fourier transform to generate the frequency domain weight; multiplying the frequency domain weight by the joint spatiotemporal features respectively to obtain the prediction result.

[0014] Furthermore, before preprocessing the time series data according to the target to obtain processed data, the following operations are performed: It is also necessary to perform targeted screening and aggregation on the target's time series data and the target-related time series data based on target requirements to form a multivariate time series data set.

[0015] Furthermore, the cloud resource planning includes: Comparing the predicted results with the actual cloud resource data to determine whether there is redundancy or shortage of cloud resources; If the predicted result is lower than the actual cloud resource data, it is recommended to reduce cloud resources; if the predicted result determines that the cloud resources are insufficient during peak hours, it is recommended to increase cloud resources.

[0016] Furthermore, the pre-processing step includes: Use the KNN algorithm to perform outlier detection on the time series data, and remove the screened outliers from the time series data, where the outlier determination condition is that the average Euclidean distance of the data points exceeds a preset threshold; Then, for all missing timestamps or data points in the time series data after removing the abnormal points, interpolation is used to fill in the missing timestamps or data points in the time series data to ensure the continuity of the time series data; Then, the time series data is normalized. The normalization process is to scale the characteristic value of each data point in the time series data to a specific range to obtain processed data. The formula of the KNN method is:

[0017]

[0018] in, Represents a data point and The Euclidean distance between and are two data points in the demand dataset, and Represents data points and The kth eigenvalue of ; Indicates a point to its The average distance between neighboring data points, K represents the number of neighboring data points.

[0019] Furthermore, the cloud resource data is collected through the Quartz scheduling framework. Before starting the cloud resource usage data collection, the following operations need to be completed: Obtain legal authorization credentials from the platform to which the cloud resources belong to establish a data access channel, and formulate targeted collection strategies based on the authorization credentials and the type, structure and format characteristics of the cloud vendor platform data.

[0020] The present application also provides a system for implementing a cloud resource data analysis method based on a time series prediction model, comprising: Collection module: responsible for collecting cloud resource data through the Quartz scheduling framework and converting it into time series data storage; Processing module: preprocessing the time series data set to prepare for the training of the trend prediction model; Prediction module: performs trend prediction on future cloud resource data based on the processed data; Display module: displays the prediction results and analysis results in an intuitive and easy-to-understand manner; Analysis module: Generates a targeted cloud resource planning report based on comparative analysis of the analysis results and historical cloud resource data; Scheduling module: plans and schedules cloud resources based on the cloud resource planning report.

[0021] Compared with the prior art, the present invention has the following advantages: Traditional methods rely on models such as linear regression and support vector machines, which are insufficiently adaptable to complex dynamic loads. This application builds a time series prediction neural network model called ScaleMixer. It extracts frequency domain features through fast Fourier transforms, combines adaptive patch partitioning with multi-scale feature fusion, and effectively captures the periodicity and dynamic correlations of time series, significantly improving prediction accuracy and generalization. Furthermore, the entire model training and prediction process is scripted in Python and executed regularly to ensure that the model fits the latest data.

[0022] Using the KNN algorithm for outlier detection is more scientific than traditional threshold setting methods. Combined with the task persistence, cluster scheduling, and retry mechanisms of the Quartz scheduling framework, it ensures the continuity and reliability of cloud resource data collection and solves the problem of time series data gaps caused by the interruption of traditional collection methods.

[0023] While existing systems often provide recommendations based on historical static data, this application integrates historical trends and forecasts, supports custom thresholds and seasonality analysis, and generates dynamic scaling recommendations. Preemptive cloud resource allocation and scheduling ensures timely availability of required cloud resources during peak load periods, while reducing resource allocation during off-peak periods to minimize redundancy and waste. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The above and other purposes, features, and advantages of the present application will become more apparent through a more detailed description of the embodiments of the present application in conjunction with the accompanying drawings. The accompanying drawings are intended to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the drawings, the same reference numerals generally represent the same components or steps. Figure 1 A schematic diagram of a cloud resource data planning method based on time series prediction provided in an embodiment of the present application; Figure 2 An architectural diagram of a cloud resource data planning system based on time series prediction provided in an embodiment of the present application; Figure 3 A schematic diagram showing the visualization provided for this embodiment; Figure 4 This is a schematic diagram of cloud resource planning provided in this embodiment.

[0025] Specific implementation methods In order to make the purpose, technical solutions and advantages of the present application more apparent, the following is a detailed description of example embodiments of the present application with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the example embodiments described herein. Based on the embodiments of the present application described in this application, all other embodiments obtained by those skilled in the art without creative work should fall within the scope of protection of this application.

[0026] This application provides a cloud resource data planning method based on time series prediction, referring to Figure 1 , which shows a flow chart of a cloud resource data planning method based on time series prediction according to an embodiment of the present application. The method includes the following steps S110-S140: Step S110: Collect cloud resource data and perform storage processing to form time series data; pre-process the time series data according to the target to obtain processed data.

[0027] In this embodiment, before officially initiating the collection of cloud resource data, a series of preliminary preparations must be completed. These preparations include obtaining legal authorization credentials from the cloud resource platform. This is a prerequisite for establishing access channels and ensuring the legal collection and use of cloud resource data. Based on these authorization credentials, an in-depth analysis of the data type, structure, and format characteristics of the cloud resource platform is conducted to develop a targeted collection strategy, ensuring that the collected cloud resource data is accurate, complete, and meets analysis requirements.

[0028] After completing the aforementioned preliminary preparations, we implemented the Quartz scheduling framework to periodically collect cloud resource data, including CPU usage, memory usage, disk usage, network bandwidth, number of virtual machine instances, and service request times. This collected cloud resource data was stored as time series data and efficiently managed and queried using a database such as InfluxDB. This ensured the continuity, integrity, and traceability of the time series data, laying the foundation for subsequent analysis and forecasting.

[0029] The database used in this example is InfluxDB. Compared to the traditional MySQL database, it faces performance bottlenecks when processing large amounts of time series data and cannot meet the requirements of efficient storage, querying, and aggregation. InfluxDB, on the other hand, can efficiently store and retrieve data associated with timestamps and provides unique features for time series data, such as time series aggregation and interpolation. This enables InfluxDB to demonstrate superior performance compared to MySQL when processing large amounts of time series data.

[0030] According to the target, the time series data related to the target in the time series database is screened out and constructed into a multi-variable time series data set in CSV format. In order to perform effective time series prediction, the previously constructed time series data set in CSV format needs to be preprocessed; the preprocessing is to use the KNN method to detect outliers in the time series data set, identify and remove outliers in the data, and ensure the accuracy of the time series data set; at the same time, the interpolation method is used to fill in the missing data in the time series data set to ensure the integrity of the time series data; in addition, normalization processing is performed to convert time series data of different ranges to the same scale to eliminate the impact of different time series data ranges on the prediction results. After these preprocessing steps, the processed data obtained will be more accurate, complete and consistent, and suitable for the subsequent training of the time series prediction neural network model ScaleMixer.

[0031] Specifically, the KNN method is as follows: using the Euclidean distance metric, the average distance between a single data point in the required data set and its neighboring data points is calculated, and based on a set threshold, the data point is judged as an outlier, and the screened outlier is removed from the required data set;

[0032]

[0033] in, Represents a data point and The Euclidean distance between and are two data points in the demand dataset, and Represents data points and The kth eigenvalue of ; Indicates a point to its The average distance between neighboring data points, K represents the number of neighboring data points.

[0034] Step S120: constructing a training sample set based on the processed data; constructing a time series prediction neural network model ScaleMixer, and training the time series prediction neural network model ScaleMixer based on the training sample set to obtain a trend prediction model; In this embodiment, after a series of data preprocessing processes, an accurate, complete, and uniformly formatted time series dataset in CSV format is obtained. This CSV format time series dataset is used as the cornerstone of model learning to form a training sample set.

[0035] The construction of the time series prediction neural network model ScaleMixer is to standardize the processed data through a reversible instance normalization layer to obtain standardized data; perform frequency domain feature analysis and multi-scale spatiotemporal feature extraction on the standardized data to generate joint spatiotemporal features; use frequency domain weights to fuse the joint spatiotemporal features, and combine residual connections to output stable prediction results.

[0036] Specifically, the time series data in the training sample set is subjected to reversible instance normalization (RevIN) to obtain standardized data, which can not only eliminate the influence of distribution offset, but also retain the original information of the time series data, thereby improving the stability and performance of the model. The time series data of the standardized data is input into ScaleMixerBlock for further processing. In ScaleMixerBlock, the fast Fourier transform (FFT) is used to transform the standardized data from the time series to the frequency domain, and the top K frequencies with the largest amplitude in the frequency domain are selected. , and the patch size is determined based on the predicted length and the selected frequency. Based on this, the standardized data is divided into multiple patches containing information within a specific time period, and the patches are converted into feature representations suitable for model processing through patch embedding, that is, into two-dimensional patch blocks.

[0037] The calculation formula is:

[0038]

[0039] Where X represents time series data, Indicates the fast Fourier transform of time series data. represents the frequency set of the filter, Represents the amplitude set corresponding to the frequency, Amp(·) represents the calculation function of the frequency domain amplitude, and A represents the main frequency components corresponding to the first K largest amplitudes selected from the amplitude set. Indicates sorting A. Indicates the size of the segmentation, L indicates the length to be predicted, Indicates the i-th main frequency.

[0040] First, through Convert the time series data X to the frequency domain and extract the amplitude spectrum of all frequency components in the frequency domain. Calculate the preset frequency set by the Amp(·) function. The corresponding amplitude is obtained by filtering out the top K main frequency components with the largest amplitude through argTopk (A). Based on the filtered main frequency components, the period parameters of the segmented normalized data into multiple patches are calculated and the main frequency components are obtained. Calculated with the predicted length L , used to determine how to divide the normalized data into patches of different scales.

[0041] After obtaining the two-dimensional patch, feature extraction is performed on it. This process involves two steps: intra-patch feature extraction and inter-patch feature extraction. Using a multi-layer perceptron, patch features are extracted at multiple scales and dimensions, generating joint spatiotemporal features. These features reflect the patterns and trends of data changes over different time periods, as well as the mutual influence and dependencies between data in different time periods.

[0042] To obtain the final prediction, the softmax results of all amplitudes at each frequency obtained by the fast Fourier transform are multiplied by the predicted length of each corresponding patch, and these products are summed. This approach more accurately captures key information in the data and produces more precise predictions. Secondly, to alleviate the problems of vanishing and exploding gradients in neural networks, ScaleMixerBlock employs residual connections. Residual connections establish a direct connection between the input and output, allowing gradients to propagate more smoothly. This not only ensures a stable training process for the model but also improves model performance and the accuracy of predictions.

[0043] Step S130: Analyze the prediction results output by the trend prediction model in combination with actual cloud resource data to obtain analysis results.

[0044] In this embodiment, the trained trend prediction model is used to predict the pre-processed processing data to obtain the cloud resource usage trend prediction results for a period of time in the future. These prediction results are then compared and analyzed with the actual cloud resource data. The actual cloud resource data is regularly collected from the cloud vendor platform through the Quartz scheduling framework, including real-time CPU usage, memory usage, disk usage, network bandwidth, etc. On the basis of the comparison, the prediction results are further analyzed in depth to obtain the analysis results. This includes analyzing the differences between the prediction results and the actual data, the degree of fit, and the possible reasons for the deviation. Through such a comparison process, more accurate and reliable analysis results can be obtained, providing strong data support for subsequent resource planning. Step S140: Generate a cloud resource planning report based on the analysis results and historical cloud resource data to plan cloud resources.

[0045] In this example, the analysis results obtained in step S130 are integrated with the historical cloud resource data. The historical cloud resource data records important information such as the usage pattern, change trend, resource demand peaks and troughs of cloud resources in the past period of time. By integrating the above content, a comprehensive and in-depth understanding of the usage and demand trends of cloud resources can be obtained. A cloud resource planning report is generated using the integrated content. This report should include multiple aspects such as the current status assessment of cloud resources, future demand forecasts, resource allocation recommendations, and optimization strategies. In the process of generating the report, multiple factors such as business needs, resource usage, forecast results, and historical data will be comprehensively considered to formulate a cloud resource planning plan that meets actual needs and is operational.

[0046] Based on the generated cloud resource planning report, specific cloud resource planning and adjustments are performed. This includes operations such as increasing or decreasing the number of virtual machines, adjusting storage capacity, and optimizing resource allocation strategies. By implementing these planning measures, cloud resources can be ensured to meet business development needs while avoiding waste and idle cloud resources, achieving efficient and sustainable utilization of cloud resources.

[0047] Finally, in this embodiment, the trend prediction model is also adaptively optimized. Based on the comparative detection between the prediction results and the actual cloud resource data, the deviation between the prediction results of the current trend prediction model and the actual cloud resource data is periodically calculated; when the deviation exceeds a preset threshold, the optimization of the trend prediction model is triggered, and the cloud resource planning report is updated and the cloud resources are newly planned.

[0048] In order to implement the above method, the present application also discloses a cloud resource data analysis system for time series prediction, through which cloud resource data can be efficiently collected and processed, and accurate predictions can be made using trend prediction models, thereby optimizing cloud resource configuration, improving cloud resource utilization efficiency, and reducing operating costs.

[0049] Reference Figure 2 As shown, the system includes: Collection module: responsible for collecting cloud resource data through the Quartz scheduling framework and converting it into time series data storage; Processing module: preprocessing the time series data set to prepare for the training of the trend prediction model; Prediction module: performs trend prediction on future cloud resource data based on the processed data; Display module: displays the prediction results and analysis results in an intuitive and easy-to-understand manner; Analysis module: Generates a targeted cloud resource planning report based on comparative analysis of the analysis results and historical cloud resource data; Scheduling module: plans and schedules cloud resources based on the cloud resource planning report.

[0050] In this embodiment, the acquisition module is the data source for the system. It primarily uses the Quartz scheduling framework to automatically collect cloud resource data from cloud vendor platforms according to preset time intervals and rules. This cloud resource data is stored as time series data to facilitate subsequent analysis and processing. The system then enters the processing module, which filters the target-related time series data from the database to form a CSV-formatted time series dataset. This time series dataset undergoes preprocessing, a crucial step before model training. This CSV-formatted time series dataset can serve as the training sample set for the ScaleMixer time series prediction neural network model. The processing module ensures data quality and consistency through methods such as outlier detection, missing value filling, and data normalization. These preprocessing operations eliminate noise and anomalies in the data, improving the accuracy of model predictions. The preprocessed time series dataset is then fed into the prediction module, which uses the trained trend prediction model to predict future cloud resource usage. The prediction results accurately reflect the changing trends in cloud resource usage, providing a scientific basis for subsequent resource optimization. The prediction results and analysis results obtained in the prediction module are transferred to the display module, and the display module clearly displays the above contents in the form of charts, line graphs, bar graphs, area graphs and other visual means. Figure 3 As shown, this figure is one of the forms displayed by the display module. The horizontal axis is time and the vertical axis is data value. You can also view data in different time ranges.

[0051] While the display module is running, the analysis module generates a targeted cloud resource planning report based on the comparative analysis of the analysis results and historical cloud resource data. The report covers the current status assessment of cloud resources, future demand forecasts, cloud resource allocation recommendations and optimization strategies, etc. Through in-depth analysis of resource usage and forecast results, the system puts forward specific optimization suggestions, such as adjusting the number of virtual machines, optimizing storage capacity, etc., to achieve optimal configuration and efficient utilization of cloud resources. It can also be planned according to user-defined strategies. Figure 4 As shown, this figure is one of the cloud resource planning reports; it is set by the user that the CPU usage rate has been greater than 12% for a long time in the past 7 days, and optimization suggestions for instance upgrades are made.

[0052] Finally, the scheduling module plans and schedules cloud resources based on the cloud resource planning report generated by the analysis module, ensuring that cloud resources can meet business needs while avoiding waste and idle resources. The system achieves efficient utilization and sustainable development of cloud resources and reduces operating costs.

[0053] In summary, this technical solution has built an efficient and flexible cloud resource data collection mechanism by introducing the Quartz scheduling framework, ensuring the reliability and real-time nature of the data. At the predictive analysis level, this application uses the time series prediction neural network model ScaleMixer, and cleverly integrates the Patch method and combines it with the fast Fourier transform technology to deeply mine the characteristic information of the time series in the frequency domain, thereby significantly improving the model's prediction accuracy and generalization ability. In addition, this application also scripts the entire process of model training and prediction in Python. Through regular automated execution, the model can continuously fit the latest data and dynamically adapt to changes in cloud resource usage patterns, providing strong technical support for the optimal configuration and efficient utilization of cloud resources.

[0054] It should be noted that the terms "original", "target" etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or that are inherent to these processes, methods, products or devices.

[0055] The embodiment of the present application also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by an electronic device including multiple application programs, can enable the electronic device to execute Figure 1 Method in the embodiment shown.

[0056] According to another aspect of an embodiment of the present application, an electronic device is provided, comprising: a processor and a memory. The memory stores a computer program, and the processor is configured to execute the computer program to implement the above-mentioned cloud resource planning method based on time series prediction.

[0057] A person skilled in the art will readily understand the implementation structure, working principle, and beneficial effects of the electronic device and the computer-readable storage medium by reading the above method, and will not be described in detail here for the sake of brevity.

[0058] Although example embodiments have been described herein with reference to the accompanying drawings, it should be understood that the above example embodiments are merely illustrative and are not intended to limit the scope of the present application. Various changes and modifications may be made therein by those skilled in the art without departing from the scope and spirit of the present application. All such changes and modifications are intended to be included within the scope of the present application as required by the appended claims.

[0059] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.

[0060] Those skilled in the art will understand that, except where mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstract, and drawings), as well as all processes or units of any method or apparatus disclosed herein, may be combined in any combination. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that provides the same, equivalent, or similar purpose.

[0061] Furthermore, those skilled in the art will appreciate that although some embodiments described herein include certain features included in other embodiments but not other features, combinations of features from different embodiments are intended to be within the scope of this application and to form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.

[0062] It should be noted that the above embodiments are illustrative rather than limiting of the present invention, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claims.

[0063] The above description is merely a specific embodiment or illustration of a specific embodiment of the present application, and the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present application should be included in the scope of protection of the present application. The scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A cloud resource planning method based on time series prediction, characterized in that: The following steps are involved: Collect cloud resource data and store and process it to form time series data; Preprocessing the time series data according to a target to obtain processed data; Constructing a training sample set based on the processed data; constructing a time series prediction neural network model ScaleMixer, and training the time series prediction neural network model ScaleMixer based on the training sample set to obtain a trend prediction model; Analyzing the forecast results output by the trend forecast model in combination with actual cloud resource data to obtain an analysis result; A cloud resource planning report is generated based on the analysis results and historical cloud resource data to plan cloud resources.

2. The cloud resource planning method based on time series prediction according to claim 1, characterized in that: Adaptively optimizing the trend prediction model, and periodically calculating the deviation between the current prediction result of the trend prediction model and the actual cloud resource data based on a comparison test between the prediction result and the actual cloud resource data; When the deviation exceeds a preset threshold, the optimization of the trend prediction model is triggered, and the cloud resource planning report is updated and a new plan is made for the cloud resources.

3. The cloud resource planning method based on time series prediction according to claim 2, characterized in that: The construction of the time series prediction neural network model ScaleMixer includes: Normalizing the processed data by a reversible instance normalization layer to obtain normalized data; Performing frequency domain feature analysis and multi-scale spatiotemporal feature extraction on the standardized data to generate joint spatiotemporal features; The frequency domain weights are fused with the joint spatiotemporal features and combined with residual connections to output the stable prediction results.

4. The cloud resource planning method based on time series prediction according to claim 3 is characterized in that: The steps of performing frequency domain feature analysis and multi-scale spatiotemporal feature extraction on standardized data include: The standardized data is converted from time series data to frequency domain through fast Fourier transform, the top K main frequency components with the largest amplitude are screened, and the standardized data is calculated and segmented to form multiple patches, and the patches are converted into corresponding patch blocks based on patch embedding; The calculation formula is: Where X represents time series data, Indicates the fast Fourier transform of time series data. represents the frequency set of the filter, Represents the amplitude set corresponding to the frequency, Amp(·) represents the calculation function of the frequency domain amplitude, and A represents the main frequency components corresponding to the first K largest amplitudes selected from the amplitude set. Indicates sorting A. Indicates the size of the segmentation, L indicates the length to be predicted, Indicates the i-th main frequency; Extracting features within and between the patch blocks to generate joint spatiotemporal features; Performing Softmax on the amplitude extracted by the fast Fourier transform to generate the frequency domain weight; multiplying the frequency domain weight by the joint spatiotemporal features respectively to obtain the prediction result.

5. The cloud resource planning method based on time series prediction according to claim 1, characterized in that: Before preprocessing the time series data according to the target to obtain processed data, the following operations are further performed: It is also necessary to perform targeted screening and aggregation on the target's time series data and the target-related time series data based on target requirements to form a multivariate time series data set.

6. The cloud resource planning method based on time series prediction according to claim 1, characterized in that: The cloud resource planning includes: Comparing the predicted results with the actual cloud resource data to determine whether there is redundancy or shortage of cloud resources; If the predicted result is lower than the actual cloud resource data, it is recommended to reduce cloud resources; if the predicted result determines that the cloud resources are insufficient during peak hours, it is recommended to increase cloud resources.

7. The cloud resource planning method based on time series prediction according to claim 2, characterized in that: The pre-processing steps include: Use the KNN algorithm to perform outlier detection on the time series data, and remove the screened outliers from the time series data, where the outlier determination condition is that the average Euclidean distance of the data points exceeds a preset threshold; Then, for all missing timestamps or data points in the time series data after removing the abnormal points, interpolation is used to fill in the missing timestamps or data points in the time series data to ensure the continuity of the time series data; Then, the time series data is normalized. The normalization process is to scale the characteristic value of each data point in the time series data to a specific range to obtain processed data. The formula of the KNN method is: in, Represents a data point and The Euclidean distance between and are two data points in the demand dataset, and Represents data points and The kth eigenvalue of ; Indicates a point to its The average distance between neighboring data points, K represents the number of neighboring data points.

8. The cloud resource planning method based on time series prediction according to claim 1, characterized in that: Before starting to collect cloud resource usage data, you must complete the following operations: Obtain legal authorization credentials from the platform to which the cloud resources belong to establish a data access channel, and formulate targeted collection strategies based on the authorization credentials and the type, structure and format characteristics of the cloud vendor platform data.

9. A cloud resource data analysis system for time series prediction according to any one of claims 1 to 8, characterized in that: include: Collection module: responsible for collecting cloud resource data through the Quartz scheduling framework and converting it into time series data storage; Processing module: preprocessing the time series data set to prepare for the training of the trend prediction model; Prediction module: performs trend prediction on future cloud resource data based on the processed data; Display module: displays the prediction results and analysis results in an intuitive and easy-to-understand manner; Analysis module: Generates a targeted cloud resource planning report based on comparative analysis of the analysis results and historical cloud resource data; Scheduling module: plans and schedules cloud resources based on the cloud resource planning report.

10. An electronic device comprising a processor and a memory, characterized in that: The memory stores computer program instructions, which are used by the processor to execute the cloud resource planning method based on time series prediction according to any one of claims 1 to 8 when the processor is running the computer program instructions.

Citation Information

Cited By

  • Cloud resource management method and device, electronic equipment and storage medium

    CN120872623A

  • Cloud resource management method and device, electronic equipment and storage medium

    CN120872623B