Data prediction method, resource data prediction method and computing device

By acquiring the historical data sequence and its timing attribute characteristics, determining multiple target time scales and performing feature extraction, the problem of inability to accurately predict target time data in the prior art is solved, and high accuracy and high efficiency data prediction are achieved.

CN119848753APending Publication Date: 2025-04-18HANGZHOU ALICLOUD FEITIAN INFORMATION TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311340433.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-16
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

The prior art is difficult to accurately predict target data for target time because historical data sequences present different depth characteristics on different time scales, resulting in the inability to determine the appropriate time scale.

Method used

By obtaining the historical data sequence and its timing attribute characteristics, multiple target time scales are determined, and feature extraction of historical data according to these scales to obtain multiple feature sequences. The prediction is then made based on these feature sequences to obtain the target data for the target time.

Benefits of technology

By adaptively determining multiple target time scales, accurate multi-time scale feature sequences are extracted, improving the accuracy and efficiency of data prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119848753A_ABST
    Figure CN119848753A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data prediction method, a resource data prediction method and computing equipment. The data prediction method comprises the steps that a historical data sequence and time sequence attribute characteristics of the historical data sequence are acquired; determining a plurality of target time scales corresponding to the historical data sequence based on the time sequence attribute features; according to a plurality of target time scales, performing feature extraction on historical data in the historical data sequence to obtain a plurality of feature sequences; and predicting target data of the target time based on the plurality of feature sequences. The method comprises the following steps: performing time sequence attribute analysis on a historical data sequence, analyzing a time scale of the historical data sequence, adaptively determining a plurality of target time scales, performing depth feature extraction on historical data in the historical data sequence according to the plurality of target time scales, and extracting a plurality of accurate feature sequences. Therefore, the target data of the high-accuracy target time is obtained through prediction, and the accuracy and efficiency of data prediction are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present specification relate to the field of data processing technology, and in particular to a data prediction method. Background Art

[0002] With the development of computer technology, the ability to efficiently and accurately predict target data at target times has greatly changed production and life.

[0003] At present, historical data are arranged in time sequence to obtain a historical data sequence. By deeply analyzing the historical data sequence, that is, extracting the deep features of the historical data in the historical data sequence, the target data at the target time can be predicted.

[0004] However, historical data series present different depth features at different time scales. For example, historical data may change dramatically at a weekly time scale, but may change slowly at a yearly time scale. Therefore, how to determine the target time scale and ensure that the extracted depth features can more accurately predict the target data at the target time is an urgent problem to be solved. Summary of the invention

[0005] In view of this, an embodiment of this specification provides a data prediction method. One or more embodiments of this specification also relate to a resource data prediction method, a data prediction device, a resource data prediction device, a computing device, a computer-readable storage medium and a computer program to solve the technical defects existing in the prior art.

[0006] According to a first aspect of an embodiment of this specification, a data prediction method is provided, including:

[0007] Obtain historical data sequences and time series attribute characteristics of historical data sequences;

[0008] Based on the time series attribute characteristics, multiple target time scales corresponding to the historical data series are determined;

[0009] According to multiple target time scales, feature extraction is performed on the historical data in the historical data sequence to obtain multiple feature sequences, wherein the multiple feature sequences are feature sequences of multiple time scales;

[0010] Based on multiple feature sequences, target data at a target time is predicted.

[0011] According to a second aspect of an embodiment of this specification, a resource data prediction method is provided, which is applied to a cloud-side device, including:

[0012] Obtaining historical resource data sequences and time series attribute characteristics of historical resource data sequences;

[0013] Using the scale determination layer of the forecasting model, multiple target time scales corresponding to the historical resource data series are determined based on the time series attribute characteristics;

[0014] Using the feature extraction layer of the prediction model, the historical resource data in the historical resource data sequence is subjected to feature extraction according to multiple target time scales to obtain multiple feature sequences, wherein the multiple feature sequences are feature sequences of multiple time scales;

[0015] Utilize the prediction layer of the prediction model to predict the target resource data at the target time based on multiple feature sequences;

[0016] Feedback the target resource data to the end-side device.

[0017] According to a third aspect of an embodiment of this specification, a data prediction device is provided, including:

[0018] A first acquisition module is configured to acquire a historical data sequence and a time series attribute feature of the historical data sequence;

[0019] A first determination module is configured to determine a plurality of target time scales corresponding to the historical data sequence based on the time series attribute characteristics;

[0020] A first extraction module is configured to perform feature extraction on the historical data in the historical data sequence according to multiple target time scales to obtain multiple feature sequences, wherein the multiple feature sequences are feature sequences of multiple time scales;

[0021] The first prediction module is configured to predict target data at a target time based on multiple feature sequences.

[0022] According to a fourth aspect of an embodiment of this specification, a resource data prediction device is provided, which is applied to a cloud-side device, including:

[0023] A second acquisition module is configured to acquire a historical resource data sequence and a time series attribute feature of the historical resource data sequence;

[0024] A second determination module is configured to determine a plurality of target time scales corresponding to the historical resource data sequence based on the time series attribute characteristics using the scale determination layer of the prediction model;

[0025] The second extraction module is configured to use the feature extraction layer of the prediction model to extract features from the historical resource data in the historical resource data sequence according to multiple target time scales to obtain multiple feature sequences, wherein the multiple feature sequences are feature sequences of multiple time scales;

[0026] The second prediction module is configured to use the prediction layer of the prediction model to predict target resource data at a target time based on multiple feature sequences;

[0027] The feedback module is configured to feed back the target resource data to the terminal device.

[0028] According to a fifth aspect of an embodiment of this specification, a computing device is provided, including:

[0029] Memory and processor;

[0030] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the above method are implemented.

[0031] According to a sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and the instructions implement the steps of the above method when executed by a processor.

[0032] According to a seventh aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above method.

[0033] In one embodiment of the present specification, a historical data sequence and a time series attribute feature of the historical data sequence are obtained; based on the time series attribute feature, multiple target time scales corresponding to the historical data sequence are determined; according to the multiple target time scales, feature extraction is performed on the historical data in the historical data sequence to obtain multiple feature sequences, wherein the multiple feature sequences are feature sequences of multiple time scales; based on the multiple feature sequences, target data of the target time is predicted. By performing time series attribute analysis on the historical data sequence, the time scale of the historical data sequence itself is analyzed, multiple target time scales are adaptively determined, and according to the multiple target time scales, deep feature extraction is performed on the historical data in the historical data sequence, and multiple accurate feature sequences are extracted, and then the target data of the target time with high accuracy is predicted, thereby improving the accuracy and efficiency of data prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 is a flow chart of a data prediction method provided by an embodiment of this specification;

[0035] Figure 2 It is a schematic diagram of the architecture of a prediction model in a data prediction method provided by an embodiment of this specification;

[0036] Figure 3 is a structural diagram of attention calculation in a data prediction method provided by an embodiment of this specification;

[0037] Figure 4 is a flow chart of a resource data prediction method provided by an embodiment of this specification;

[0038] Figure 5 It is a front-end schematic diagram of a resource data prediction method provided by an embodiment of this specification;

[0039] Figure 6 It is a processing flow chart of a method for predicting resource data in a network cloud operation and maintenance scenario provided by an embodiment of this specification;

[0040] Figure 7 is a structural schematic diagram of a data prediction device provided by an embodiment of this specification;

[0041] Figure 8 It is a structural diagram of a resource data prediction device provided by an embodiment of this specification;

[0042] Fig. 9 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION

[0043] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.

[0044] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0045] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0046] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0047] In one or more embodiments of this specification, a large model refers to a deep learning model with large-scale model parameters, which usually contains hundreds of millions, tens of billions, hundreds of billions, trillions, or even more than 10 trillion model parameters. A large model can also be called a foundation model / foundation model. The large model is pre-trained with large-scale unlabeled corpus to produce a pre-trained model with more than 100 million parameters. This model can adapt to a wide range of downstream tasks, and the model has good generalization ability, such as a large-scale language model (LLM), a multi-modal pre-training model, etc.

[0048] When the big model is used in practice, only a small number of samples are needed to fine-tune the pre-trained model and it can be applied to different tasks. The big model can be widely used in natural language processing (NLP), computer vision and other fields. Specifically, it can be applied to computer vision tasks such as visual question answering (VQA), image caption (IC), image generation, as well as natural language processing tasks such as text-based sentiment classification, text summary generation, and machine translation. The main application scenarios of the big model include digital assistants, intelligent robots, search, online education, office software, e-commerce, intelligent design, etc.

[0049] First, the terms involved in one or more embodiments of this specification are explained.

[0050] Time series: A time series is an ordered collection of data points collected at certain time intervals (such as continuous time points or fixed time intervals) over a period of time. Each data point is associated with a specific time point or time period, which allows the time series to show trends, periodic fluctuations, and other time-related deep features over time.

[0051] Time series forecasting: Time series forecasting refers to using the information in the time series of historical data to predict the target data at the target time. This analysis method aims to capture the characteristics of trends, periodicity, seasonality and other patterns in the time series in order to predict the target data at the target time. Time series forecasting mainly includes statistical methods and deep learning methods.

[0052] Transformer model: A deep learning model framework that has achieved great success in natural language processing, computer vision, time series and other fields. It uses the attention mechanism to capture the relationship between each position in the time series. The translation model is an encoder-decoder architecture, where the encoder is used to encode the input time series, and the decoder generates the output time series through the deep features extracted by the encoder.

[0053] Multi-scale features: Multi-scale features refer to analyzing a time series while considering multiple different time scales to obtain the trends, periodicity, seasonality and other patterns of the data in the time series at different time scales. Multi-scale feature fusion can improve the details and contextual relationships in the time series, thereby providing the accuracy of the prediction model.

[0054] Fourier Transform (FT): A signal processing algorithm that converts a data time function (sequence) into a data frequency function (sequence).

[0055] Discrete Fourier Transform (DFT): A signal processing algorithm that converts discrete data time functions (sequences) into data frequency functions (sequences). It is a discrete form of Fourier transform that decomposes a finite-length discrete data time function (sequence) into a series of complex numbers, each of which represents a frequency component of the function (sequence).

[0056] Top-K strategy: A method for ranking a large amount of data. It can find the top K largest or smallest elements from a large amount of data.

[0057] In this specification, a data prediction method is provided. This specification also involves a resource data prediction method, a data prediction device, a resource data prediction device, a computing device, a computer-readable storage medium and a computer program, which are described in detail one by one in the following embodiments.

[0058] See also Figure 1 , Figure 1A flowchart of a data prediction method provided by an embodiment of the present specification is shown, including the following specific steps:

[0059] Step 102: Obtain historical data sequences and time series attribute characteristics of the historical data sequences.

[0060] The embodiments of this specification are applied to the client and server of applications, websites and mini-programs with data prediction functions. Data prediction is applied to multiple fields such as resource data prediction, behavior data prediction, commodity value prediction and sports event prediction. The embodiments of this specification can use statistical methods for prediction or deep learning methods for prediction, which is not limited here.

[0061] The historical data sequence is the data time sequence of historical data, and the historical data sequence includes multiple historical data arranged in time sequence. Historical data is data generated at historical time, and each historical data is an element in the historical data sequence. The historical time includes the historical time point and the historical time period. For example, for the number of vehicles passing through a certain intersection in the past 24 hours, according to the 24-hour historical time period, the number of vehicles passing through each hour is recorded, and the historical data sequence obtained is: (0-1 o'clock: 39 vehicles; 1-2 o'clock: 20 vehicles... 23-0 o'clock: 127 vehicles). For another example, with respect to the resource usage of a certain network cloud in the past three hours, the resource usage parameters of each second are recorded according to the historical time point of each second, and the historical data sequence is: (00:00:00, CPU (Central Processing Unit) utilization rate: 34%, GPU (GraphiclProcessing Unit) frequency: 2,2GHz...); (00:00:01, CPU utilization rate: 32%, GPU frequency: 2,2GHz...)... (02:59:59, CPU utilization rate: 17%, GPU frequency: 1.3GHz...).

[0062] Time series attributes are characteristic attributes of the changes in historical data in time sequence, including but not limited to: time series cycle, time series trend and time series stability. For example, for the historical data sequence of the number of vehicles passing through a certain intersection in the past 24 hours, the time series trend of the number of vehicles passing through is: there are peaks at 7-10 and 17-20, and troughs at 0-6 and 22-0.

[0063] Time series attribute features are deep features of the changes in historical data in time sequence, including but not limited to: period features, trend features, and stability features. In deep learning method prediction, time series attribute features are in the form of feature vectors. For example, a time series attribute analysis is performed on the historical data sequence of resource usage of a network cloud in the past 3 hours, and the periodic feature of resource usage is obtained as: 10 minutes.

[0064] The historical data sequence can be obtained by storing the historical data in advance according to time, and integrating the historical data sequence according to historical time when data prediction is required. It can also be obtained directly by integrating the historical data into a historical data sequence in advance according to time and storing it. The historical data sequence can be obtained in response to a data prediction request sent by the front end, or it can be triggered when a certain preset condition (for example, a preset frequency, a preset data threshold, and a preset data volume threshold, etc.) is met, which is not limited here.

[0065] To obtain the time series attribute characteristics of the historical data sequence, the time series attribute characteristics of the historical data sequence can be analyzed in advance to obtain the time attribute characteristics of the historical data sequence, or the time series attribute characteristics of the historical data sequence can be directly analyzed after obtaining the historical data sequence to obtain the time attribute characteristics of the historical data sequence, and there is no limitation here.

[0066] In an optional embodiment of the present specification, step 102 includes the following specific steps:

[0067] Acquire a historical data sequence, wherein the historical data sequence includes a plurality of historical data arranged in time sequence;

[0068] Perform time series attribute analysis on historical data series to obtain the time series attribute characteristics of historical data series.

[0069] Perform time series attribute analysis on the historical data sequence to obtain the time series attribute characteristics of the historical data sequence. The specific method is: perform time series attribute analysis on the historical data sequence in at least one time series attribute dimension to obtain the time series attribute characteristics of the historical data sequence.

[0070] Exemplarily, a prediction request for resource data of a network cloud sent by the front end is received, wherein the prediction request carries resource objects: CPU, GPU and memory, resource data types: CPU usage; CPU frequency; CPU frequency; CPU thread number...delay, historical time: 2023.9.3014:00:00 to 2023.9.3022:00:00, and target time: 2023.10.119:00:00. In response to the prediction request, the historical resource database of the network cloud is accessed to obtain the historical resource data of the CPU, GPU and memory of the network cloud, and three historical resource data sequences are integrated in chronological order: CPU data sequence, GPU data sequence and memory data sequence. In terms of two time series attribute dimensions, namely time series period and time series trend, time series attribute analysis is performed on the three historical resource data sequences (CPU data sequence, GPU data sequence and memory data sequence), and the period feature Feature_Season and trend feature Feature_Trend of the three historical resource data sequences are obtained.

[0071] Obtain historical data series and their time series attribute characteristics, laying the foundation for data series and time series attributes for the subsequent determination of multiple target time scales.

[0072] Step 104: Based on the time series attribute characteristics, determine multiple target time scales corresponding to the historical data sequence.

[0073] The time scale is the time value of a specific time unit, which is the time granularity for dividing the data series. The data characteristics of the data series are analyzed within the time granularity. The time scale determines the level of detail and contextual attention for analyzing the data series, including but not limited to: seconds, minutes, hours, days, weeks, months, and years. For example, the time series trend of the number of vehicles passing through is: there are peaks at 7-10 and 17-20, and troughs at 0-6 and 22-0, so every 3 hours and every 6 hours are determined as the time scale, and the data characteristics of the number of vehicles passing through every 3 hours are further analyzed.

[0074] The target time scale is the time value of a specific time unit corresponding to the historical data sequence, which is the time granularity for dividing the historical data sequence. By analyzing the data features of the historical data sequence within the target time scale, the detail level and reasonable contextual attention of the historical data sequence can be accurately extracted. Multiple target time scales can be understood as a combination of time scales for dividing the historical data sequence, which is an adaptive optimization combination.

[0075] Based on the time series attribute characteristics, multiple target time scales corresponding to the historical data sequence are determined. The multiple target time scales corresponding to the time series attribute characteristics can be directly determined, for example, multiple period characteristics are directly determined as corresponding multiple target time scales. Routing selection can also be performed based on the time series attribute characteristics to select multiple target time scales corresponding to the historical data sequence. For example, for multiple preset time scales, multiple target time scales corresponding to the historical data sequence are selected based on the time series attribute characteristics.

[0076] Exemplarily, for multiple preset time scales (5 minutes, 15 minutes, 30 minutes, 1 hour, 2 hours, 4 hours), based on the periodic feature Feature_Season and the trend feature Feature_Trend, two target time scales corresponding to three historical resource data sequences are selected: 30 minutes and 2 hours.

[0077] Based on the time series attribute characteristics, multiple target time scales corresponding to the historical data sequence are determined. Adaptively determining multiple target time scales corresponding to the historical data sequence lays the foundation for the subsequent reasonable and accurate feature extraction of the historical data sequence.

[0078] Step 106: extracting features from the historical data in the historical data sequence according to multiple target time scales to obtain multiple feature sequences, wherein the multiple feature sequences are feature sequences at multiple time scales.

[0079] Feature sequences are deep features of historical data. In deep learning prediction, feature sequences are in the form of feature vectors. Feature sequences represent the deep features of historical data at a specific level of detail and contextual attention. Multiple feature sequences are feature sequences at multiple time scales.

[0080] According to multiple target time scales, feature extraction is performed on historical data in the historical data sequence to obtain multiple feature sequences. The specific method is: according to multiple target time scales, the historical data sequence is divided to obtain historical data subsequences, and feature extraction is performed on the historical data in the historical data subsequences to obtain multiple feature sequences.

[0081] It should be noted that steps 104 to 106 can be iteratively executed to implement more accurate deep feature extraction. In the deep learning method prediction, it can be implemented through multiple multi-scale feature modules of residual connection, or through multi-scale feature modules of cyclic architecture, which is not limited here.

[0082] Exemplarily, three historical resource data sequences are divided according to two target time scales: 30 minutes and 2 hours to obtain historical resource data subsequences, and feature extraction is performed on the historical resource data of CPU, GPU and memory in the historical resource data subsequences to obtain six feature sequences: Feature_CPU_30min, Feature_CPU_1hr, Feature_GPU_30min, Feature_GPU_1hr, Feature_Memory_30min and Feature_Memory_1hr.

[0083] According to multiple target time scales, feature extraction is performed on the historical data in the historical data sequence to obtain multiple feature sequences. Based on the target time scale corresponding to the historical data sequence, accurate multiple feature sequences are extracted, laying a feature foundation for subsequent prediction of target data.

[0084] Step 108: Based on the multiple feature sequences, predict and obtain target data at the target time.

[0085] The target time is the future time that needs to be predicted. The target time includes the target time point and the target time period. The target data of the target time is the data generated at the target time. For example, the number of vehicles passing through a certain intersection in the next 24 hours. Another example is the resource usage of a network cloud in the next 3 hours.

[0086] Based on multiple feature sequences, target data at a target time is predicted. Specifically, multiple feature sequences are aggregated to obtain multi-scale features, and based on the multi-scale feature functions, target data at a target time is predicted.

[0087] Exemplarily, feature aggregation is performed on 6 feature sequences (Feature_CPU_30min, Feature_CPU_1hr, Feature_GPU_30min, Feature_GPU_1hr, Feature_Memory_30min, and Feature_Memory_1hr) to obtain 3 multi-scale features: Feature_CPU, Feature_GPU, and Feature_Memory. Based on the 3 multi-scale feature functions, the target resource data at the target time (2023.10.119:00:00) are predicted: CPU usage; CPU frequency; CPU frequency; number of CPU threads... delay.

[0088] In the embodiments of the present specification, a historical data sequence and the time series attribute characteristics of the historical data sequence are obtained; based on the time series attribute characteristics, multiple target time scales corresponding to the historical data sequence are determined; according to the multiple target time scales, the historical data in the historical data sequence is feature extracted to obtain multiple feature sequences, wherein the multiple feature sequences are feature sequences of multiple time scales; based on the multiple feature sequences, the target data of the target time is predicted. By performing time series attribute analysis on the historical data sequence, the time scale of the historical data sequence itself is analyzed, and multiple target time scales are adaptively determined. According to the multiple target time scales, deep feature extraction is performed on the historical data in the historical data sequence, and multiple accurate feature sequences are extracted, and then the target data of the target time with high accuracy is predicted, thereby improving the accuracy and efficiency of data prediction.

[0089] In an optional embodiment of the present specification, the time series attribute features include period features and trend features;

[0090] Correspondingly, step 104 includes the following specific steps:

[0091] Perform time series period analysis on the historical data sequence to obtain the period characteristics of the historical data sequence, and perform time series trend analysis on the historical data sequence to obtain the trend characteristics of the historical data sequence.

[0092] The choice of target time scale is highly correlated with the time period and time series trend in the time sequence of historical data series. Therefore, it is necessary to decompose and analyze from the two time series attribute dimensions of time period and time series trend to obtain two deep features: period feature and trend feature.

[0093] The periodic feature is the deep feature of the time period of historical data in the time sequence. In the prediction of deep learning methods, the periodic feature is in the form of a feature vector. For example, the annual output of a certain resource in a certain area will have a certain degree of repetition every year, and the monthly output of a certain resource in a certain area will have a certain degree of repetition every month.

[0094] Trend features are deep features of the temporal trend of historical data in chronological order. In deep learning prediction, trend features are in the form of feature vectors. For example, the annual output of a certain resource in a certain area has a trend of peak in summer and low in winter.

[0095] The historical data sequence is subjected to time series periodic analysis to obtain the periodic characteristics of the historical data sequence. The specific method is as follows: based on the frequency characteristics of the historical data sequence, the historical data sequence is subjected to time series periodic analysis to obtain the periodic characteristics of the historical data sequence.

[0096] Perform time series trend analysis on the historical data series to obtain the trend characteristics of the historical data series. The specific method is: perform average pooling processing on the historical data series to obtain the trend characteristics of the historical data series.

[0097] Exemplarily, based on the frequency characteristics of three historical resource data sequences (CPU data sequence, GPU data sequence and memory data sequence), the three historical resource data sequences are subjected to time series period analysis to obtain the period feature Feature_Season of the three historical resource data sequences. The three historical resource data sequences are subjected to average pooling processing to obtain the trend feature Feature_Trend of the three historical resource data sequences.

[0098] Perform time series cycle analysis on historical data series to obtain the periodic characteristics of historical data series, and perform time series trend analysis on historical data series to obtain the trend characteristics of historical data series. Perform time series attribute analysis on the two time series attribute dimensions of time cycle and time series trend, decompose and mine the periodic characteristics and trend characteristics of the historical data series itself, and lay a characteristic foundation for more accurate determination of the corresponding target time scale in the future.

[0099] In an optional embodiment of the present specification, performing time series period analysis on a historical data sequence to obtain period characteristics of the historical data sequence includes the following specific steps:

[0100] Perform frequency domain transformation on the historical data sequence to obtain the frequency distribution of the historical data sequence;

[0101] Based on the frequency distribution of historical data series, the periodic characteristics of the historical data series are determined.

[0102] The frequency distribution of the historical data series is the numerical distribution of the frequency of the periodic transformation of the historical data within the time unit, which is the frequency distribution of the historical data series in the frequency domain. For example, the frequency spectrum of the historical data series includes 3 frequencies. The frequency is inversely proportional to the time series period.

[0103] Frequency domain transform is a signal processing algorithm that converts data time series from time domain to frequency domain, including a series of signal processing algorithms such as Fourier transform, for example, Fourier transform, short-time Fourier transform, fast Fourier transform (FFT), discrete Fourier transform, Laplace transform and Z transform.

[0104] The frequency domain transformation of the historical data sequence is performed to obtain the frequency distribution of the historical data sequence. Specifically, the historical data sequence is transformed into the frequency domain to obtain the frequency distribution of the historical data sequence. Furthermore, the historical data sequence is transformed into the discrete Fourier transform to obtain the frequency distribution of the historical data sequence. The discrete Fourier transform has the advantages of flexibly controlling the resolution of the frequency domain transformation, retaining the time domain information and reducing the interference between frequencies.

[0105] Specifically, the calculation formula of discrete Fourier transform is shown in Formula 1:

[0106]

[0107]

[0108] Among them, Φ and A represent phase and amplitude respectively, Pha and Amp represent calculated phase and amplitude functions respectively, DFT and IDFT represent discrete Fourier transform and inverse discrete Fourier transform respectively. Indicates the first K f The frequency corresponding to the amplitude. sea , X rem Respectively represent the extracted period part and the remaining part after subtracting the period.

[0109] Exemplarily, discrete Fourier transform is performed on three historical resource data sequences (CPU data sequence, GPU data sequence and memory data sequence) to obtain the frequency distribution of the three historical resource data sequences, and based on the frequency distribution of the three historical resource data sequences, the periodic feature Feature_Season of the three historical resource data sequences is determined.

[0110] Perform frequency domain transformation on the historical data sequence to obtain the frequency distribution of the historical data sequence; based on the frequency distribution of the historical data sequence, determine the periodic characteristics of the historical data sequence. Perform time series attribute analysis on the time period dimension to deeply mine the periodic characteristics of the historical data sequence itself, laying a foundation for more accurate determination of the corresponding target time scale in the future.

[0111] In an optional embodiment of the present specification, performing time series trend analysis on a historical data sequence to obtain trend characteristics of the historical data sequence includes the following specific steps:

[0112] Convolution kernels of different sizes are used to perform average pooling processing on the historical data series to obtain the trend characteristics of the historical data series.

[0113] The convolution kernel is a specific matrix used for convolution operations. It defines the operation mode of the convolution operation, that is, the operator (Kernel). The convolution kernel has a corresponding size. Convolution kernels of different sizes can be understood as different weights for pooling the historical data sequence.

[0114] The average pooling process is to reduce the dimension of the features to obtain K features. After normalization, the probabilities (or confidence) of K categories are obtained. Based on the probabilities, weighted processing is performed to obtain the characteristics of the time series trend.

[0115] Convolution kernels of different sizes are used to perform average pooling processing on the historical data series to obtain the trend characteristics of the historical data series. The specific method is: convolution kernels of different sizes are used to perform average pooling processing on the historical data series, and the trend characteristics of the historical data series are obtained by sliding average.

[0116] Specifically, convolution kernels of different sizes are used to perform average pooling on the historical data series, and the trend characteristics of the historical data series are obtained by sliding average. The calculation formula is shown in Formula 2:

[0117] X trend =Softmax(L(X rem ))·(Avgpool(Padding(X rem )) kernel1 ,…,Avgpool(Padding(X rem )) kernelN ) Formula 2

[0118] Among them, Padding() keeps the sequence length unchanged by adding 0, Avgpool() kerneli represents the average pooling operation with the i-th convolution kernel, N represents the number of convolution kernels, and Softmax(L()) represents the weight of the result obtained by average pooling of convolution kernels of different sizes.

[0119] Exemplarily, convolution kernels of different sizes are used to perform average pooling processing on three historical resource data sequences (CPU data sequence, GPU data sequence, and memory data sequence), and the trend feature Feature_Trend of the three historical resource data sequences (CPU data sequence, GPU data sequence, and memory data sequence) is obtained by sliding average.

[0120] Convolution kernels of different sizes are used to perform average pooling on the historical data series to obtain the trend characteristics of the historical data series. Time series attribute analysis is performed on the time series attribute dimension of time series trend to deeply mine the trend characteristics of the historical data series itself, laying a characteristic foundation for more accurate determination of the corresponding target time scale in the future.

[0121] In an optional embodiment of the present specification, step 104 includes the following specific steps:

[0122] Adding preset noise to the time series attribute feature to obtain the noisy time series attribute feature;

[0123] Based on the noisy time series attribute characteristics, a preset number of target time scales are determined from a plurality of preset time scales.

[0124] Since there may be one or two fixed time scales that have been determined as the target time scale, feature extraction is performed according to a specific time scale, while other potentially more effective time scales are ignored. It is necessary to perform noise processing on the time series attribute features to balance the selection on multiple preset time scales and select a more effective target time scale.

[0125] The preset noise is a preset balanced noise, including but not limited to: Gaussian noise and white noise.

[0126] The noisy time series attribute feature is a deep feature that adds preset noise to the changes in the time sequence of historical data.

[0127] The preset time scale is a time value of a preset specific time unit, which is a preset time granularity for dividing the data sequence.

[0128] For multiple preset time scales, based on the characteristics of the noisy time series attributes, the weights of each preset time scale are calculated. The specific method is as follows: for multiple preset time scales, based on the characteristics of the noisy time series attributes, the weights of each preset time scale are calculated, and based on the weights of each preset time scale, a preset number of target time scales are selected. Among them, the weight of each preset time scale is the adaptability weight of each preset time scale corresponding to the historical data sequence. The higher the weight, the higher the adaptability between the preset time scale and the historical data sequence, and the higher the accuracy of subsequent feature extraction. Furthermore, for multiple preset time scales, based on the characteristics of the noisy time series attributes, the weights of each preset time scale are calculated through the routing function.

[0129] Based on the weights of the preset time scales, a preset number of target time scales are selected, specifically, based on the weights of the preset time scales, a Top-K strategy is adopted to select K target time scales.

[0130] Specifically, the calculation formula of the routing function and the Top-K strategy are shown in Formula 3:

[0131] R(X trans )=Softmax(X trans W r +∈ Softmax(X trans W noise )),∈~N(0,1)

[0132]

[0133] Among them, R() represents the entire routing function, and its input X trans It combines the periodic characteristics and trend characteristics, and outputs the weight vector of each preset time scale. ∈ represents Gaussian noise that obeys the standard normal distribution, W r , W noise Represented as a learnable parameter. In order to achieve a highly adaptable target time scale, the Top-K strategy is used to select the preset time scales with the top K weights as the target time scale.

[0134] Exemplarily, Gaussian noise Noise is added to the periodic feature Feature_Season and the trend feature Feature_Trend to obtain the periodic feature Feature_Season' and the trend feature Feature_Trend'. For multiple preset time scales (5 minutes, 15 minutes, 30 minutes, 1 hour, 2 hours, and 4 hours), based on the noise-added time series attribute characteristics, the weight of each preset time scale is calculated through the routing function. Based on the weight of each preset time scale, the Top-K strategy is adopted to select two target time scales corresponding to the three historical resource data sequences: 30 minutes and 2 hours.

[0135] Add preset noise to the time series attribute features to obtain the noisy time series attribute features; for multiple preset time scales, based on the noisy time series attribute features, calculate the weight of each preset time scale; based on the weight of each preset time scale, select a preset number of target time scales. This further improves the adaptability and effectiveness of the selected multiple target time scales, laying the foundation for more reasonable and accurate feature extraction of historical data sequences in the future.

[0136] In an optional embodiment of the present specification, step 106 includes the following specific steps:

[0137] Divide the historical data sequence according to multiple target time scales to obtain historical data subsequences at each target time scale;

[0138] Based on each historical data subsequence, attention calculation is performed to obtain the feature sequence corresponding to each target time scale.

[0139] The historical data subsequence is the data time series of the historical data within the target time scale, and the historical data subsequence includes multiple historical data arranged in time sequence. For example, the historical data sequence is: (0-1 hours: 39 vehicles; 1-2 hours: 20 vehicles... 23-0 hours: 127 vehicles), the target time scale is 2 hours, and the historical data sequence is divided into 3 hours, then the number of vehicles passing from 0-2 hours: (0-1 hours: 39 vehicles; 1-2 hours: 20 vehicles), is a historical data subsequence. The historical data subsequences under each target time scale are the division results of the historical data sequences under multiple target time scales.

[0140] Attention calculation is a feature calculation algorithm used to focus on some features in a sequence. By learning an attention weight to indicate the importance of each element in the sequence, local details and global context associations in the sequence can be obtained.

[0141] The feature sequence corresponding to each target time scale is a feature sequence obtained by extracting data features at each target time scale, which is in the form of a coded feature vector of a data feature.

[0142] Specifically, the calculation formula for attention calculation is shown in Formula 4:

[0143]

[0144] Among them, Q is the query feature, K is the key feature, V is the value feature, and dk is a diffusion factor. When Q, K, and V are the same, it is a self-attention calculation, and when Q, K, and V are different, it is a cross-attention calculation.

[0145] Based on the historical data subsequence, attention calculation is performed to obtain multiple feature sequences. The specific method is: based on the historical data subsequence, local attention calculation and global attention calculation are performed to obtain local attention features and global attention features, and based on the local attention features and the global attention features, multiple feature sequences are obtained.

[0146] Exemplarily, three historical resource data sequences (CPU data sequence, GPU data sequence and memory data sequence) are divided according to two target time scales: 30 minutes and 2 hours to obtain historical resource data subsequences. Local attention calculation and global attention calculation are performed based on the historical resource data subsequences to obtain local attention features Intra-patchAttetion and global attention features Inter-patchAttetion. Based on the local attention features and the global attention features, six feature sequences are obtained: Feature_CPU_30min, Feature_CPU_1hr, Feature_GPU_30min, Feature_GPU_1hr, Feature_Memory_30min and Feature_Memory_1hr.

[0147] According to multiple target time scales, the historical data sequence is divided to obtain the historical data subsequences at each target time scale; based on each historical data subsequence, attention calculation is performed to obtain the feature sequence corresponding to each target time scale. Based on the target time scale corresponding to the historical data sequence, the sequence is divided, and attention calculation is performed based on the historical data subsequences at each target time scale obtained by the division, and the data features under specific details and contextual attention are deeply mined to obtain more accurate multiple feature sequences, which lays a feature foundation for the subsequent prediction of target data.

[0148] In an optional embodiment of the present specification, attention calculation is performed based on each historical data subsequence to obtain a feature sequence corresponding to each target time scale, including the following specific steps:

[0149] Performing attention calculation based on the association between each historical data in the first historical data subsequence to obtain a local attention feature corresponding to a first target time scale, wherein the first target time scale is any one of a plurality of target time scales, and the first historical data subsequence is a historical data subsequence under the first target time scale;

[0150] Based on the correlation between each historical data subsequence, attention calculation is performed to obtain the global attention feature;

[0151] The global attention features are fused with the local attention features corresponding to each target time scale to obtain the feature sequence corresponding to each target time scale.

[0152] Since extracting deep data features from historical data subsequences divided at a single time scale is closely related to extracting global attention and local attention, it is necessary to deeply mine local details and global associations through local attention calculations and achieve more accurate feature extraction.

[0153] The local attention feature is the correlation feature between each historical data in a single historical data subsequence, which represents the features of a specific level of detail in the sequence. The global attention feature is the correlation feature between each historical data subsequence, which represents the features between contexts in the sequence.

[0154] Based on the association between each historical data in the first historical data subsequence, attention calculation is performed to obtain local attention features corresponding to the first target time scale. The specific method is: based on the association between each historical data in the first historical data subsequence, cross attention calculation is performed to obtain local attention features.

[0155] Based on the association between each historical data subsequence, attention calculation is performed to obtain the global attention feature. The specific method is: based on the association between each historical data subsequence, self-attention calculation is performed to obtain the global attention feature.

[0156] Exemplarily, based on the correlation between each historical resource data in the historical resource data subsequence (CPU data subsequence, GPU data subsequence and memory data subsequence), cross-attention calculation is performed to obtain the local attention feature Intra-patch Attetion. Based on the correlation between each historical resource data subsequence, self-attention calculation is performed to obtain the global attention feature Inter-patch Attetion. The local attention feature and the global attention feature are feature fused to obtain 6 feature sequences: Feature_CPU_30min, Feature_CPU_1hr, Feature_GPU_30min, Feature_GPU_1hr, Feature_Memory_30min and Feature_Memory_1hr.

[0157] Based on the association between each historical data in the first historical data subsequence, attention calculation is performed to obtain the local attention features corresponding to the first target time scale, wherein the first target time scale is any one of multiple target time scales, and the first historical data subsequence is the historical data subsequence under the first target time scale; based on the association between each historical data subsequence, attention calculation is performed to obtain the global attention features; the global attention features are fused with the local attention features corresponding to each target time scale to obtain the feature sequences corresponding to each target time scale. By further deeply mining the data features under specific levels of detail and contextual attention, more accurate multiple feature sequences are obtained, laying a feature foundation for subsequent more predictive target data.

[0158] In an optional embodiment of the present specification, step 104 includes the following specific steps:

[0159] Perform feature fusion on historical data series and time series attribute features to obtain fusion features;

[0160] The weights of the fused features are calculated at multiple preset time scales to obtain the weights of each preset time scale;

[0161] Based on the weights of the preset time scales, multiple target time scales corresponding to the historical data series are determined.

[0162] The fusion feature is a fusion feature that retains the data sequence features of the historical data sequence and the time series attribute features. The fusion methods include but are not limited to: addition, multiplication, residual connection (Add) and Concat processing. The fusion feature is a feature encoding vector. The fusion feature can retain the data sequence features of the historical data sequence, and does not lose the inherent characteristics of the historical data sequence due to the time series attribute analysis.

[0163] The weight of the preset time scale is the adaptability weight of the preset time scale corresponding to the historical data sequence. The higher the weight, the higher the adaptability between the preset time scale and the historical data sequence, and the higher the accuracy of subsequent feature extraction.

[0164] Based on the weights of each preset time scale, multiple target time scales corresponding to the historical data sequence are determined. Specifically, the weights of each preset time scale are sorted, and the multiple target time scales corresponding to the historical data sequence are determined according to the sorting results. For example, the Top-K strategy is used to sort and the first K preset time scales with the highest weight are determined as the target time scales.

[0165] Exemplarily, three historical resource data sequences, the periodic feature Feature_Season and the trend feature Feature_Trend are fused to obtain three fused features Feature_Mix; weight calculations are performed on the fused features at multiple preset time scales (5 minutes, 15 minutes, 30 minutes, 1 hour, 2 hours, and 4 hours) to obtain the weight W of each preset time scale; the weights of each preset time scale are sorted according to the Top-K strategy, and based on the sorting results, two target time scales corresponding to the three historical resource data sequences are selected: 30 minutes and 2 hours.

[0166] The historical data series and time series attribute features are fused to obtain fused features; weight calculations are performed on the fused features at multiple preset time scales to obtain the weights of each preset time scale; based on the weights of each preset time scale, multiple target time scales corresponding to the historical data series are determined. The fused features are weighted at each preset time scale to select the target time scale from multiple preset time scales, and multiple target time scales corresponding to the historical data series are more accurately and adaptively determined, laying the foundation for the subsequent reasonable and accurate feature extraction of the historical data series.

[0167] In an optional embodiment of the present specification, before step 108, the following specific steps are also included:

[0168] Perform feature aggregation on multiple feature sequences.

[0169] Feature aggregation refers to a feature processing algorithm that combines multiple features into one feature, including but not limited to: multiplication, weighted average, residual connection (Add) and Concat processing.

[0170] Exemplarily, six feature sequences: Feature_CPU_30min, Feature_CPU_1hr, Feature_GPU_30min, Feature_GPU_1hr, Feature_Memory_30min, and Feature_Memory_1hr are concat-processed to obtain three multi-scale features: Feature_CPU, Feature_GPU, and Feature_Memory.

[0171] Perform feature aggregation on multiple feature sequences, laying a feature foundation for subsequent prediction of target data at the target time.

[0172] In an optional embodiment of the present specification, performing time series attribute analysis on a historical data sequence to obtain time series attribute characteristics of the historical data sequence includes the following specific steps:

[0173] Input the historical data sequence into the prediction model, use the routing network of the multi-scale feature module to perform time series attribute analysis on the historical data sequence, and obtain the time series attribute characteristics of the historical data sequence, wherein the prediction model includes the multi-scale feature module and the predictor, and the multi-scale feature module includes the routing network, the selector and the feature extraction network;

[0174] Correspondingly, step 104 includes the following specific steps:

[0175] Using the selector, based on the time series attribute characteristics, multiple target time scales corresponding to the historical data series are determined;

[0176] Correspondingly, step 106 includes the following specific steps:

[0177] Using a feature extraction network, extract features from historical data in a historical data sequence according to multiple target time scales to obtain multiple feature sequences;

[0178] Correspondingly, step 108 includes the following specific steps:

[0179] The predictor is used to predict target data at a target time based on multiple feature sequences.

[0180] The prediction model is a deep learning model with data prediction function, which is deployed on the client and server of applications, websites and mini-programs with data prediction function. The prediction model is an adaptive deep learning model for data prediction under multiple time scales. The prediction model includes a multi-scale feature module and a predictor, and may also include an instance normalization module to normalize the data in the historical data sequence to solve the distribution offset problem between training data and test data. The multi-scale module is a module with feature extraction function under multiple time scales, including a routing network, a selector and a feature extraction network. The routing network is a network unit with a routing selection target time scale, including: a time series cycle analysis unit, a time series trend analysis unit and a routing processing unit. The selector is a functional unit for selecting a target time scale. The feature extraction network is a network unit with a deep data feature extraction function, including: a time scale division unit and an attention calculation unit (for example, a translation model). The predictor is a fully connected structure, which realizes long sequence prediction based on a multi-layer perceptron structure.

[0181] In the embodiments of this specification, the specific methods of each step refer to the above-mentioned embodiments of the specification, which will not be repeated here.

[0182] In addition, in an optional embodiment of the present specification, the multi-scale feature module further includes an aggregation network;

[0183] Correspondingly, before step 108, the following specific steps are also included:

[0184] Using the aggregation network, multiple feature sequences are aggregated.

[0185] Figure 2 FIG. 1 shows a schematic diagram of the architecture of a prediction model in a data prediction method provided by an embodiment of the present specification, such as Figure 2 As shown:

[0186] The prediction model includes an instance normalization module, three multi-scale feature modules and a predictor. The three multi-scale feature modules are connected by residual connection to adaptively extract multi-scale features. The multi-scale feature module includes a routing network, a selector, a feature extraction network and an aggregation network. The routing network includes a time series cycle analysis unit, a time series trend analysis unit and a routing processing unit. The time series cycle analysis unit includes a discrete Fourier processing layer, a Top-K frequency layer and an inverse Fourier processing layer. The time series trend analysis unit includes a multi-convolution kernel average pooling processing layer and a feature aggregation layer. The routing processing unit includes a linear mapping and routing balancing layer and a feature activation & Top-K layer. The historical data sequence is input into the time series cycle analysis unit, and the weights of the historical data sequence at each preset time scale are obtained after the series processing of the time series cycle analysis unit, the time series trend analysis unit and the routing processing unit. The selector selects a preset number of target time scales from multiple preset time scales (time scale 1, time scale 2, time scale 3...time scale N). The feature extraction network includes a time scale division unit and an attention calculation unit. In the time scale division unit, the historical data sequence is divided according to the target time scale to obtain multiple historical data subsequences (historical data subsequence 1...historical data subsequence i), which are then input into the attention calculation unit. The local attention and global attention mechanisms are used to calculate the local attention and global attention. Based on the local attention and global attention, multiple feature sequences are extracted, and the multiple feature sequences are input into the aggregation network for feature aggregation to obtain multi-scale features. Finally, the multi-scale features are input into the predictor to predict the target data at the target time.

[0187] Figure 3 A schematic diagram of the structure of attention calculation in a data prediction method provided in one embodiment of this specification is shown. Figure 3 As shown:

[0188] The attention calculation unit includes a local attention embedding layer, a local attention processing layer, a global attention embedding layer, a global attention processing layer, a fusion layer, a residual connection and normalization processing layer, a feedforward layer, and a residual connection and normalization processing layer. In the local attention processing layer, the historical data subsequences obtained by division are input into the linear processing layer as key features and value features respectively, and the preset initialization features (learnable features) are input into the linear processing layer as query features. Through the cross attention mechanism, after the Concat processing layer, the local attention is output. In the global attention processing layer, the historical data subsequences obtained by division are input into the linear processing layer as query features, key features, and value features respectively. Through the self-attention mechanism, after compression processing, the global attention features are output.

[0189] The historical data sequence is input into the prediction model, and the routing network of the multi-scale feature module is used to analyze the time series attributes of the historical data sequence to obtain the time series attribute characteristics of the historical data sequence. The prediction model includes a multi-scale feature module and a predictor, and the multi-scale feature module includes a routing network, a selector, and a feature extraction network; the selector is used to determine multiple target time scales corresponding to the historical data sequence based on the time series attribute characteristics; the feature extraction network is used to extract the features of the historical data in the historical data sequence according to the multiple target time scales to obtain multiple feature sequences; the predictor is used to predict the target data of the target time based on the multiple feature sequences. Through the routing network, the time series attribute analysis of the historical data sequence is realized, and the time scale of the historical data sequence itself is analyzed. Through the selector, multiple target time scales are adaptively determined. Through the feature extraction network, the historical data in the historical data sequence is deeply extracted according to the multiple target time scales, and multiple accurate feature sequences are extracted. Through the predictor, the target data of the target time with high accuracy is predicted, which improves the accuracy and efficiency of data prediction.

[0190] In an optional embodiment of the present specification, before using the routing layer of the prediction model to perform time series attribute analysis on the historical data sequence to obtain the time series attribute characteristics of the historical data sequence, the following specific steps are also included:

[0191] Acquire a sample set, wherein the sample set includes a sample data sequence and label data;

[0192] The sample data sequence is input into the prediction model, and the routing network of the multi-scale feature module is used to perform time series attribute analysis on the sample data sequence to obtain the time series attribute characteristics of the sample data sequence, wherein the prediction model includes the multi-scale feature module and the predictor, and the multi-scale feature module includes the routing network, the selector and the feature extraction network;

[0193] Using the selector, based on the time series attribute characteristics, multiple target time scales corresponding to the sample data sequence are determined;

[0194] Using a feature extraction network, extracting features from sample data in a sample data sequence according to multiple target time scales, and obtaining multiple feature sequences;

[0195] Using the predictor, based on multiple feature sequences, predicting data is obtained;

[0196] Based on the label data and predicted data, the loss value is calculated;

[0197] Based on the loss value, the model parameters of the prediction model are adjusted until the preset training end conditions are met to obtain a trained prediction model.

[0198] The sample set is a set of sample data used to train the prediction model, including sample data sequence and label data. The sample data sequence is the data time series of the sample data, and the sample data sequence includes multiple sample data arranged in time sequence. The sample data is the data generated at the sample time. The label data is the data generated at the label time, and the label time is later than the sample time. The prediction data is the data generated at the label time output by the prediction model.

[0199] The loss value measures the difference between the predicted data and the labeled data and is used to evaluate the model performance of the prediction model, including but not limited to: cross entropy loss, mean square error loss, average error loss, and logarithmic loss.

[0200] The training end condition is a pre-set judgment condition for the end of training, including but not limited to: a preset number of iterations, a preset loss value threshold, a preset training time and a preset model convergence condition.

[0201] Based on the loss value, the model parameters of the prediction model are adjusted. Specifically, based on the loss value, the model parameters of the prediction model are adjusted using the gradient descent method.

[0202] Exemplarily, a large amount of historical resource data is obtained from a historical resource database, a sample resource data sequence and a label resource data are constructed, and a sample set is determined. The sample resource data sequence is input into a prediction model, and a routing network of a multi-scale feature module is used to perform time series attribute analysis on the sample resource data sequence to obtain the time series attribute characteristics of the sample resource data sequence. A selector is used to determine multiple target time scales corresponding to the sample resource data sequence based on the time series attribute characteristics. A feature extraction network is used to extract features of the sample resource data in the sample resource data sequence according to multiple target time scales to obtain multiple feature sequences. A predictor is used to predict the predicted resource data based on the multiple feature sequences. A loss value is calculated based on the label resource data and the predicted resource data. Based on the loss value Loss, the model parameters of the prediction model are adjusted using the gradient descent method until the preset loss value threshold is reached to obtain a trained prediction model.

[0203] In the embodiments of this specification, a prediction model with high model performance is obtained through supervised training, which provides a high-accuracy deep learning model for subsequent data prediction, improves the adaptability of data prediction, reduces costs, and improves efficiency.

[0204] See also Figure 4 , Figure 4 A flowchart of a resource data prediction method provided by an embodiment of this specification is shown. The method is applied to a cloud-side device and includes the following specific steps:

[0205] Step 402: Acquire the historical resource data sequence and the time series attribute characteristics of the historical resource data sequence.

[0206] Step 404: Utilize the scale determination layer of the prediction model to determine multiple target time scales corresponding to the historical resource data sequence based on the time series attribute characteristics.

[0207] Step 406: Using the feature extraction layer of the prediction model, extract features from the historical resource data in the historical resource data sequence according to multiple target time scales to obtain multiple feature sequences, wherein the multiple feature sequences are feature sequences at multiple time scales.

[0208] Step 408: Utilize the prediction layer of the prediction model to predict target resource data at the target time based on multiple feature sequences.

[0209] Step 410: Feedback the target resource data to the terminal device.

[0210] The embodiments of this specification are applied to the network cloud device where the server of the web page, application or applet with resource data prediction function is located, which is a virtual device. The end-side device is the terminal where the client of the web page, application or applet with resource data prediction function logged in by the user is located, which is a physical device. The cloud-side device and the end-side device are connected through a network transmission channel for data transmission. The computing power performance and storage performance of the cloud-side device are higher than those of the end-side device.

[0211] The embodiments of this specification are similar to the above Figure 1 The embodiments of the specification are based on the same inventive concept. For the specific methods of steps 402 to 408, please refer to Figure 1 The contents of step 102 to step 108 in the embodiment of the specification.

[0212] In the embodiments of the present specification, a historical resource data sequence and the time series attribute characteristics of the historical resource data sequence are obtained; the scale determination layer of the prediction model is used to determine multiple target time scales corresponding to the historical resource data sequence based on the time series attribute characteristics; the feature extraction layer of the prediction model is used to extract the historical resource data in the historical resource data sequence according to the multiple target time scales to obtain multiple feature sequences, wherein the multiple feature sequences are feature sequences of multiple time scales; the prediction layer of the prediction model is used to predict the target resource data of the target time based on the multiple feature sequences; and the target resource data is fed back to the end-side device. By performing time series attribute analysis on the historical resource data sequence, the time scale of the historical resource data sequence itself is analyzed, and multiple target time scales are adaptively determined. According to the multiple target time scales, the historical resource data in the historical resource data sequence is deeply feature extracted to extract accurate multiple feature sequences, and then the target resource data of the target time with high accuracy is predicted, thereby improving the accuracy and efficiency of resource data prediction, and predicting resource data on the cloud-side device, using the high computing performance and storage performance of the cloud-side device, improving the prediction efficiency of resource data.

[0213] Figure 5 A front-end schematic diagram of a resource data prediction method provided by an embodiment of this specification is shown. Figure 5 As shown:

[0214] On the network cloud operation and maintenance platform, it includes a display area for historical resource data, a display area for target resource data, a visualization display area, an input box for data prediction conditions (resource object, resource data type, historical time, target time), an "Get historical resource data" control, and a "Predict target resource data" control.

[0215] The operation and maintenance personnel enter the corresponding conditions in the input box of the data prediction condition: (please enter the resource object: CPU; GPU; memory), (please enter the resource data type: CPU usage; CPU frequency; CPU number; CPU thread number; GPU usage; GPU frequency; GPU number; GPU thread number; memory capacity; memory bandwidth; memory number and latency), (please enter the historical time: 2023.9.3014:00:00; 2023.9.3018:00:00; 2023.9.3020:00:00 and 2023.9.3022:00:00) and (please enter the target time: 2023.10.119:00:00). Click the "Get Historical Resource Data" control to obtain 3 historical resource data sequences, and display them in the display area of ​​the historical resource data in a table format. Click the "Forecast target resource data" control, execute the above steps 402 to 408, obtain the target resource data at the target time, and display it in the target resource data display area in a table format.

[0216] The following combination Figure 6 , taking the application of the resource data prediction method provided in this specification in the network cloud operation and maintenance scenario as an example, the resource data prediction method is further explained. Figure 6 A flowchart of a processing process of a method for predicting resource data in a network cloud operation and maintenance scenario provided by an embodiment of the present specification is shown. The method is applied to a cloud-side device and includes the following specific steps:

[0217] Step 602: Receive a prediction request sent by the network cloud operation and maintenance front end, wherein the prediction request includes a resource object, a resource data type, a historical time, and a target time.

[0218] Step 604: Based on the resource object, resource data type and historical time, obtain the resource data pre-stored according to time in the historical resource database of the network cloud, integrate to obtain the historical resource data sequence, and feed it back to the front end for rendering.

[0219] Step 606: Input the historical resource data sequence into the prediction model, use the timing period analysis unit in the routing network of the multi-scale feature module to perform frequency domain transformation on the historical resource data sequence to obtain the frequency distribution of the historical resource data sequence, determine the periodic characteristics of the historical resource data sequence based on the frequency distribution of the historical resource data sequence, use the timing trend analysis unit in the routing network of the multi-scale feature module to use convolution kernels of different sizes to perform average pooling processing on the historical resource data sequence to obtain the trend characteristics of the historical resource data sequence, use the routing processing unit in the routing network of the multi-scale feature module to add preset noise to the periodic characteristics and trend characteristics to obtain the noisy periodic characteristics and the noisy trend characteristics, and for multiple preset time scales, calculate the weight of each preset time scale based on the noisy periodic characteristics and the noisy trend characteristics.

[0220] Step 608: Using the selector of the multi-scale feature module, based on the weights of each preset time scale, select a preset number of target time scales.

[0221] Step 610: Utilize the time scale division unit in the feature extraction network of the multi-scale feature module to divide the historical resource data sequence according to multiple target time scales to obtain historical resource data subsequences; utilize the attention calculation unit in the feature extraction network of the multi-scale feature module to perform attention calculation based on the association between each historical resource data in the historical resource data subsequence to obtain a local attention feature; perform attention calculation based on the association between each historical resource data subsequence to obtain a global attention feature; perform feature fusion on the local attention feature and the global attention feature to obtain multiple feature sequences.

[0222] Step 612: using the aggregation network in the feature extraction network of the multi-scale feature module, perform feature aggregation on multiple feature sequences to obtain multi-scale features.

[0223] Step 614: Utilize the predictor to predict the target resource data at the target time based on the multi-scale features, and feed it back to the front end for rendering.

[0224] In the embodiments of this specification, it is avoided to manually set multiple target time scales based on expert knowledge, and multiple target time scales are adaptively determined, and the highly adaptable division of the historical resource data sequence is completed, thereby accurately extracting multi-scale features, saving costs, and improving the accuracy of predictions. At the same time, based on local attention and global attention, the global associations and local details in the historical resource data sequence are extracted respectively to improve the prediction accuracy. Resource data based on high accuracy and efficient prediction will enable the operation and maintenance of the network cloud to better save costs and improve resource utilization and service performance.

[0225] Corresponding to the above method embodiment, this specification also provides a data prediction device embodiment, Figure 7 FIG. 2 shows a schematic diagram of the structure of a data prediction device provided by an embodiment of the present specification. Figure 7 As shown, the device comprises:

[0226] A first acquisition module 702 is configured to acquire a historical data sequence and a time series attribute feature of the historical data sequence;

[0227] A first determination module 704 is configured to determine a plurality of target time scales corresponding to the historical data sequence based on the time series attribute characteristics;

[0228] The first extraction module 706 is configured to perform feature extraction on the historical data in the historical data sequence according to multiple target time scales to obtain multiple feature sequences, wherein the multiple feature sequences are feature sequences of multiple time scales;

[0229] The first prediction module 708 is configured to predict target data at a target time based on multiple feature sequences.

[0230] Optionally, the first acquisition module 702 is further configured to:

[0231] Acquire a historical data sequence, wherein the historical data sequence includes a plurality of historical data arranged in time series; perform time series attribute analysis on the historical data sequence to obtain time series attribute characteristics of the historical data sequence.

[0232] Optionally, the time series attribute features include period features and trend features;

[0233] Correspondingly, the first acquisition module 702 is further configured to:

[0234] Perform time series period analysis on the historical data sequence to obtain the period characteristics of the historical data sequence, and perform time series trend analysis on the historical data sequence to obtain the trend characteristics of the historical data sequence.

[0235] Optionally, the first acquisition module 702 is further configured to:

[0236] Perform frequency domain transformation on the historical data sequence to obtain the frequency distribution of the historical data sequence; based on the frequency distribution of the historical data sequence, determine the periodic characteristics of the historical data sequence.

[0237] Optionally, the first acquisition module 702 is further configured to:

[0238] Convolution kernels of different sizes are used to perform average pooling processing on the historical data series to obtain the trend characteristics of the historical data series.

[0239] Optionally, the first determining module 704 is further configured to:

[0240] Adding preset noise to the time series attribute feature to obtain the noisy time series attribute feature; and determining a preset number of target time scales from a plurality of preset time scales based on the noisy time series attribute feature.

[0241] Optionally, the first extraction module 706 is further configured to:

[0242] The historical data sequence is divided according to multiple target time scales to obtain historical data subsequences at each target time scale; attention calculation is performed based on each historical data subsequence to obtain the feature sequence corresponding to each target time scale.

[0243] Optionally, the first extraction module 706 is further configured to:

[0244] Based on the association between each historical data in the first historical data subsequence, attention calculation is performed to obtain a local attention feature corresponding to a first target time scale, wherein the first target time scale is any one of multiple target time scales, and the first historical data subsequence is a historical data subsequence under the first target time scale; based on the association between each historical data subsequence, attention calculation is performed to obtain a global attention feature; the global attention feature is respectively fused with the local attention feature corresponding to each target time scale to obtain a feature sequence corresponding to each target time scale.

[0245] Optionally, the first determining module 704 is further configured to:

[0246] Perform feature fusion on the historical data series and time series attribute features to obtain fused features; perform weight calculation on the fused features at multiple preset time scales to obtain the weight of each preset time scale; and determine multiple target time scales corresponding to the historical data series based on the weight of each preset time scale.

[0247] Optionally, the first acquisition module 702 is further configured to:

[0248] Input the historical data sequence into the prediction model, use the routing network of the multi-scale feature module to perform time series attribute analysis on the historical data sequence, and obtain the time series attribute characteristics of the historical data sequence, wherein the prediction model includes the multi-scale feature module and the predictor, and the multi-scale feature module includes the routing network, the selector and the feature extraction network;

[0249] Correspondingly, the first determining module 704 is further configured to:

[0250] Using the selector, based on the time series attribute characteristics, multiple target time scales corresponding to the historical data series are determined;

[0251] Correspondingly, the first extraction module 706 is further configured to:

[0252] Using a feature extraction network, extract features from historical data in a historical data sequence according to multiple target time scales to obtain multiple feature sequences;

[0253] Correspondingly, the first prediction module 708 is further configured as follows:

[0254] The predictor is used to predict target data at a target time based on multiple feature sequences.

[0255] Optionally, the device further comprises:

[0256] The training module is configured to obtain a sample set, wherein the sample set includes a sample data sequence and label data; input the sample data sequence into a prediction model, and use the routing network of the multi-scale feature module to perform time series attribute analysis on the sample data sequence to obtain the time series attribute characteristics of the sample data sequence, wherein the prediction model includes a multi-scale feature module and a predictor, and the multi-scale feature module includes a routing network, a selector, and a feature extraction network; using the selector, based on the time series attribute characteristics, determine multiple target time scales corresponding to the sample data sequence; using the feature extraction network, according to the multiple target time scales, extract features of the sample data in the sample data sequence to obtain multiple feature sequences; using the predictor, based on the multiple feature sequences, predict and obtain prediction data; based on the label data and the prediction data, calculate and obtain a loss value; based on the loss value, adjust the model parameters of the prediction model until the preset training end conditions are met to obtain a trained prediction model.

[0257] In the embodiments of the present specification, a historical data sequence and the time series attribute characteristics of the historical data sequence are obtained; based on the time series attribute characteristics, multiple target time scales corresponding to the historical data sequence are determined; according to the multiple target time scales, the historical data in the historical data sequence is feature extracted to obtain multiple feature sequences, wherein the multiple feature sequences are feature sequences of multiple time scales; based on the multiple feature sequences, the target data of the target time is predicted. By performing time series attribute analysis on the historical data sequence, the time scale of the historical data sequence itself is analyzed, and multiple target time scales are adaptively determined. According to the multiple target time scales, deep feature extraction is performed on the historical data in the historical data sequence, and multiple accurate feature sequences are extracted, and then the target data of the target time with high accuracy is predicted, thereby improving the accuracy and efficiency of data prediction.

[0258] The above is a schematic scheme of a data prediction device of this embodiment. It should be noted that the technical scheme of the data prediction device and the technical scheme of the above data prediction method belong to the same concept, and the details not described in detail in the technical scheme of the data prediction device can be referred to the description of the technical scheme of the above data prediction method.

[0259] Corresponding to the above method embodiment, this specification also provides a resource data prediction device embodiment. Figure 8 FIG. 1 is a schematic diagram showing a structure of a resource data prediction device provided by an embodiment of the present specification. Figure 8 As shown, the device is applied to a cloud-side device, including:

[0260] The second acquisition module 802 is configured to acquire a historical resource data sequence and a time series attribute feature of the historical resource data sequence;

[0261] The second determination module 804 is configured to determine a plurality of target time scales corresponding to the historical resource data sequence based on the time series attribute characteristics using the scale determination layer of the prediction model;

[0262] The second extraction module 806 is configured to use the feature extraction layer of the prediction model to extract features from the historical resource data in the historical resource data sequence according to multiple target time scales to obtain multiple feature sequences, wherein the multiple feature sequences are feature sequences of multiple time scales;

[0263] The second prediction module 808 is configured to use the prediction layer of the prediction model to predict the target resource data at the target time based on multiple feature sequences;

[0264] The feedback module 810 is configured to feed back the target resource data to the terminal device.

[0265] In the embodiments of the present specification, a historical resource data sequence and the time series attribute characteristics of the historical resource data sequence are obtained; the scale determination layer of the prediction model is used to determine multiple target time scales corresponding to the historical resource data sequence based on the time series attribute characteristics; the feature extraction layer of the prediction model is used to extract the historical resource data in the historical resource data sequence according to the multiple target time scales to obtain multiple feature sequences, wherein the multiple feature sequences are feature sequences of multiple time scales; the prediction layer of the prediction model is used to predict the target resource data of the target time based on the multiple feature sequences; and the target resource data is fed back to the end-side device. By performing time series attribute analysis on the historical resource data sequence, the time scale of the historical resource data sequence itself is analyzed, and multiple target time scales are adaptively determined. According to the multiple target time scales, the historical resource data in the historical resource data sequence is deeply feature extracted to extract accurate multiple feature sequences, and then the target resource data of the target time with high accuracy is predicted, thereby improving the accuracy and efficiency of resource data prediction, and predicting resource data on the cloud-side device, using the high computing performance and storage performance of the cloud-side device, improving the prediction efficiency of resource data.

[0266] The above is a schematic scheme of a prediction device for resource data of this embodiment. It should be noted that the technical scheme of the prediction device for resource data and the technical scheme of the prediction method for resource data described above belong to the same concept, and the details of the technical scheme of the prediction device for resource data that are not described in detail can all be referred to the description of the technical scheme of the prediction method for resource data described above.

[0267] Fig. 9 The structure block diagram of a computing device provided by an embodiment of the present specification is shown. The components of the computing device 900 include but are not limited to a memory 910 and a processor 920. The processor 920 is connected to the memory 910 via a bus 930, and the database 950 is used to store data.

[0268] The computing device 900 also includes an access device 940, which enables the computing device 900 to communicate via one or more networks 960. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 940 may include one or more of any type of network interface (e.g., a network interface card (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, and a near field communication (NFC).

[0269] In one embodiment of the present specification, the above components of the computing device 900 and Fig. 9 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Fig. 9 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0270] The computing device 900 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 900 may also be a mobile or stationary server.

[0271] The processor 920 is used to execute the following computer executable instructions, which, when executed by the processor, implement the steps of the above-mentioned data prediction method or resource data prediction method.

[0272] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned data prediction method and resource data prediction method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above-mentioned data prediction method or resource data prediction method.

[0273] An embodiment of the present specification further provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the above-mentioned data prediction method or resource data prediction method.

[0274] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the data prediction method and the resource data prediction method described above belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the data prediction method or the resource data prediction method described above.

[0275] An embodiment of the present specification further provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned data prediction method or resource data prediction method.

[0276] The above is a schematic scheme of a computer program of this embodiment. It should be noted that the technical scheme of the computer program and the technical scheme of the data prediction method and the resource data prediction method described above are of the same concept, and the details not described in detail in the technical scheme of the computer program can be found in the description of the technical scheme of the data prediction method or the resource data prediction method described above.

[0277] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0278] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0279] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.

[0280] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0281] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.

Claims

1. A data prediction method, comprising: Acquire a historical data sequence and a time series attribute feature of the historical data sequence; Based on the time series attribute characteristics, determining multiple target time scales corresponding to the historical data sequence; According to the multiple target time scales, feature extraction is performed on the historical data in the historical data sequence to obtain multiple feature sequences, wherein the multiple feature sequences are feature sequences of multiple time scales; Based on the multiple feature sequences, target data at a target time is predicted.

2. According to the method of claim 1, the obtaining of the historical data sequence and the time series attribute characteristics of the historical data sequence comprises: Acquire a historical data sequence, wherein the historical data sequence includes a plurality of historical data arranged in time sequence; Perform time series attribute analysis on the historical data sequence to obtain time series attribute characteristics of the historical data sequence.

3. According to the method of claim 2, the time series attribute characteristics include period characteristics and trend characteristics; The performing time series attribute analysis on the historical data sequence to obtain the time series attribute characteristics of the historical data sequence includes: Performing a time series period analysis on the historical data sequence to obtain the period characteristics of the historical data sequence, and performing a time series trend analysis on the historical data sequence to obtain the trend characteristics of the historical data sequence.

4. According to the method of claim 3, the performing of time series period analysis on the historical data sequence to obtain the periodic characteristics of the historical data sequence comprises: Performing frequency domain transformation on the historical data sequence to obtain a frequency distribution of the historical data sequence; Based on the frequency distribution of the historical data sequence, the periodic characteristics of the historical data sequence are determined.

5. According to the method of claim 3, the step of performing time series trend analysis on the historical data sequence to obtain trend characteristics of the historical data sequence comprises: Convolution kernels of different sizes are used to perform average pooling processing on the historical data sequence to obtain trend characteristics of the historical data sequence.

6. The method according to claim 1, wherein determining a plurality of target time scales corresponding to the historical data sequence based on the time series attribute characteristics comprises: Adding preset noise to the time series attribute feature to obtain a noisy time series attribute feature; Based on the noise-added time series attribute characteristics, a preset number of target time scales are determined from a plurality of preset time scales.

7. The method according to any one of claims 1 to 6, wherein the extracting features of the historical data in the historical data sequence according to the multiple target time scales to obtain multiple feature sequences comprises: Dividing the historical data sequence according to the multiple target time scales to obtain historical data subsequences at each target time scale; Attention calculation is performed based on each historical data subsequence to obtain the feature sequences corresponding to each target time scale.

8. The method according to claim 7, wherein the attention calculation is performed based on each historical data subsequence to obtain the feature sequence corresponding to each target time scale, including: Performing attention calculation based on the association between each historical data in the first historical data subsequence to obtain a local attention feature corresponding to a first target time scale, wherein the first target time scale is any one of the multiple target time scales, and the first historical data subsequence is a historical data subsequence under the first target time scale; Based on the correlation between each historical data subsequence, attention calculation is performed to obtain the global attention feature; The global attention feature and the local attention feature corresponding to each target time scale are respectively fused to obtain a feature sequence corresponding to each target time scale.

9. The method according to claim 1, wherein determining a plurality of target time scales corresponding to the historical data sequence based on the time series attribute characteristics comprises: Perform feature fusion on the historical data sequence and the time series attribute features, Obtain fusion features; Performing weight calculation on the fusion features at multiple preset time scales to obtain the weight of each preset time scale; Based on the weights of the preset time scales, a plurality of target time scales corresponding to the historical data sequence are determined.

10. According to the method of claim 2, the performing time series attribute analysis on the historical data sequence to obtain the time series attribute characteristics of the historical data sequence comprises: Input the historical data sequence into the prediction model, and use the routing network of the multi-scale feature module to perform time series attribute analysis on the historical data sequence to obtain the time series attribute characteristics of the historical data sequence, wherein the prediction model includes the multi-scale feature module and the predictor, and the multi-scale feature module includes the routing network, the selector and the feature extraction network; The determining, based on the time series attribute characteristics, a plurality of target time scales corresponding to the historical data sequence comprises: Using the selector, based on the time series attribute characteristics, determining a plurality of target time scales corresponding to the historical data sequence; The extracting features of the historical data in the historical data sequence according to the multiple target time scales to obtain multiple feature sequences includes: Using the feature extraction network, extracting features from the historical data in the historical data sequence according to the multiple target time scales to obtain multiple feature sequences; The step of predicting target data at a target time based on the multiple feature sequences includes: The predictor is used to predict target data at a target time based on the multiple feature sequences.

11. The method according to claim 10, before performing time series attribute analysis on the historical data sequence by using the routing layer of the prediction model to obtain the time series attribute characteristics of the historical data sequence, further comprises: Acquire a sample set, wherein the sample set includes a sample data sequence and label data; Input the sample data sequence into the prediction model, and use the routing network of the multi-scale feature module to perform time series attribute analysis on the sample data sequence to obtain the time series attribute features of the sample data sequence, wherein the prediction model includes the multi-scale feature module and the predictor, and the multi-scale feature module includes the routing network, the selector and the feature extraction network; Using the selector, based on the time series attribute characteristics, determining a plurality of target time scales corresponding to the sample data sequence; Using the feature extraction network, extracting features from the sample data in the sample data sequence according to the multiple target time scales to obtain multiple feature sequences; Using the predictor, based on the multiple feature sequences, predicting to obtain prediction data; Based on the label data and the predicted data, a loss value is calculated; Based on the loss value, the model parameters of the prediction model are adjusted until the preset training end conditions are met, thereby obtaining the trained prediction model.

12. A resource data prediction method, applied to a cloud-side device, comprising: Acquire a historical resource data sequence and a time series attribute feature of the historical resource data sequence; Determining a plurality of target time scales corresponding to the historical resource data sequence based on the time series attribute characteristics using the scale determination layer of the prediction model; Using the feature extraction layer of the prediction model, according to the multiple target time scales, feature extraction is performed on the historical resource data in the historical resource data sequence to obtain multiple feature sequences, wherein the multiple feature sequences are feature sequences of multiple time scales; Using the prediction layer of the prediction model, based on the multiple feature sequences, predict the target resource data at the target time; The target resource data is fed back to the terminal side device.

13. A computing device comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method described in any one of claims 1 to 12 are implemented.

14. A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the steps of the method according to any one of claims 1 to 12.

Citation Information

Cited By

  • Computing power resource prediction method and device based on multi-scale transformer model, and storage medium

    CN120523587A