Time series data prediction method, computer and storage medium

By combining multiple seasonal trend decompositions with neural network models, time series data is preprocessed and predicted, which solves the problem of ignoring periodic information in existing technologies and improves the accuracy of time series data prediction and the precision of anomaly detection.

CN120688666APending Publication Date: 2025-09-23MASHANG CONSUMER FINANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510083079.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

When the time series data has fixed and stable periodic changes, the existing neural network-based time series data prediction model may ignore the information of fixed and stable periodic changes in the time series, resulting in inaccurate prediction results.

Method used

The multiple seasonal trend decomposition method is used to preprocess the time series data and decompose it into periodic components and trend components at different levels. The time series data is predicted in combination with the neural network model, and the prediction results of the multiple seasonal trend decomposition and the model are integrated to improve the accuracy.

Benefits of technology

By fully considering the periodic change information in time series data, the accuracy of prediction results and the precision of anomaly detection are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120688666A_ABST
    Figure CN120688666A_ABST
Patent Text Reader

Abstract

The invention discloses a time series data prediction method, a computer and a storage medium, and the method comprises the steps: carrying out the preprocessing of time series data, and obtaining first time series data; obtaining a first time sequence data prediction result through a multi-seasonal trend decomposition method according to different layers of periodic components in the first time sequence data and the first time sequence data; obtaining a second time series data prediction result according to a model and the first time series data; obtaining a time sequence data prediction result according to the first time sequence data prediction result and the second time sequence data prediction result; and obtaining an anomaly detection result according to the predicted time sequence data of the target moment and the real time sequence data of the target moment in the time sequence data prediction result. Information provided by periodic change in the first time series data is fully considered through a multi-seasonal trend decomposition method, the time series data prediction result is obtained, and the accuracy of the prediction result can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a time series data prediction method, a computer, and a storage medium. Background Art

[0002] Many aspects of the internet require monitoring large amounts of time series data. Accurately forecasting and identifying anomalies in this data is crucial for capturing market opportunities and enabling proactive resource planning. Existing solutions use neural network-based time series data forecasting models (Neural Prophet models) for time series data forecasting. While these models can automatically process various characteristics of time series data and capture and model nonlinear relationships within the data, when time series data exhibits fixed and stable periodic variations, they may overlook the information provided by these fixed and stable periodic variations, resulting in inaccurate forecast results. Summary of the Invention

[0003] The embodiments of the present application provide a time series data prediction method, a computer, and a storage medium. A first time series data prediction result is obtained based on the periodic components at different levels in the first time series data and the first time series data through a multiple seasonal trend decomposition method, fully considering the information provided by the periodic changes in the first time series data. At the same time, a second time series data prediction result is obtained using a model and the first time series data. Finally, the first time series data prediction result and the second time series data prediction result are combined to obtain a target time series data prediction result, which can improve the accuracy of the prediction result.

[0004] In a first aspect, an embodiment of the present application provides a time series data prediction method, the method comprising:

[0005] Preprocess the time series data to obtain first time series data; obtain the first time series data prediction result based on the periodic components at different levels in the first time series data and the first time series data through a multiple seasonal trend decomposition method; obtain the second time series data prediction result based on the model and the first time series data; obtain the time series data prediction result based on the first time series data prediction result and the second time series data prediction result; obtain the anomaly detection result based on the predicted time series data at the target moment in the time series data prediction result and the actual time series data at the target moment.

[0006] In a second aspect, an embodiment of the present application provides a time series data prediction device, comprising:

[0007] A processing module, configured to preprocess the time series data to obtain first time series data;

[0008] A prediction module is used to obtain a first time series data prediction result based on the periodic components at different levels in the first time series data and the first time series data through a multiple seasonal trend decomposition method; and to obtain a second time series data prediction result based on the model and the first time series data; and to obtain a time series data prediction result based on the first time series data prediction result and the second time series data prediction result; and to obtain anomaly detection results based on the predicted time series data at the target moment in the time series data prediction result and the actual time series data at the target moment.

[0009] In a third aspect, an embodiment of the present application provides a computer, including:

[0010] A memory, a processor, and a time series data prediction program stored in the memory and executable on the processor, wherein the time series data prediction program is configured to implement part or all of the steps described in any method in the first aspect.

[0011] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a time series data prediction program is stored. When the time series data prediction program is executed by a processor, some or all of the steps described in any method in the first aspect are implemented.

[0012] In a fifth aspect, embodiments of the present application provide a computer program product, wherein the computer program product includes a computer program operable to cause a computer to perform some or all of the steps described in any method of the first aspect of the embodiments of the present application. The computer program product may be a software installation package.

[0013] By implementing the embodiment of the present application, firstly, the time series data is preprocessed to obtain the first time series data; then, the prediction result of the first time series data is obtained according to the periodic components at different levels in the first time series data and the first time series data through the multiple seasonal trend decomposition method; the prediction result of the second time series data is obtained according to the model and the first time series data; the time series data prediction result is obtained according to the prediction result of the first time series data and the prediction result of the second time series data; finally, the anomaly detection result is obtained according to the predicted time series data at the target moment in the time series data prediction result and the real time series data at the target moment. After preprocessing the time series data to obtain the first time series data, the prediction result of the first time series data is obtained according to the periodic components at different levels in the first time series data and the first time series data through the multiple seasonal trend decomposition method. The information provided by the periodic changes in the first time series data is fully considered through the periodic components at different levels. At the same time, the prediction result of the second time series data is obtained using the model and the first time series data. Finally, the prediction result of the target time series data is obtained by combining the prediction result of the first time series data and the prediction result of the second time series data, which can improve the accuracy of the prediction result. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.

[0015] Figure 1 This is a schematic diagram of the architecture of a time series data prediction system provided by an embodiment of the present application;

[0016] Figure 2 This is a flowchart of a time series data prediction method provided by an embodiment of the present application;

[0017] Figure 3 This is a schematic diagram of the architecture of a model provided in an embodiment of the present application;

[0018] Figure 4 This is a schematic diagram of an alarm message provided by an embodiment of the present application;

[0019] Figure 5 This is a flowchart of another time series data prediction method provided by an embodiment of the present application;

[0020] Figure 6 This is a schematic diagram of an interface of a client of a time series data prediction system provided in an embodiment of the present application;

[0021] Figure 7 This is a schematic diagram of the structure of a time series data prediction device provided in an embodiment of the present application;

[0022] Figure 8 This is a schematic diagram of the structure of another time series data prediction device provided in an embodiment of the present application;

[0023] Figure 9 It is a structural diagram of a computer provided in an embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative work should fall within the scope of protection of the present invention.

[0025] The terms "first," "second," and "third," etc. in the specification, claims, and drawings of this application are used to distinguish between different objects, not to describe a particular order. In addition, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements, but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.

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

[0027] Many aspects of the internet require monitoring large amounts of time series data. Accurately forecasting and identifying anomalies in this data is crucial for capturing market opportunities and planning resources in advance. Existing methods for determining whether time series data is anomaly include the following three approaches:

[0028] Method 1: Threshold-based method: A threshold is set to determine whether the time series data is abnormal. When the observed value of the time series data exceeds the pre-set threshold, the observed value is considered abnormal.

[0029] Method 2: Machine learning method: Use machine learning algorithms to learn normal patterns from historical data and use the trained model to detect whether new samples are abnormal.

[0030] Method 3: Time series decomposition and residual detection: Decompose the time series data into trend terms, seasonal terms, and residual terms, and then perform anomaly detection on the residual terms to determine whether there is any abnormal behavior in the entire time series data.

[0031] It can be seen that the above-mentioned common time series data prediction methods can all determine whether the time series data is abnormal. However, when making outlier determinations, they only refer to a part of the information in the time series data and fail to take other relevant factors in the time series information into account, resulting in inaccurate predictions of the time series data and insufficient accuracy in anomaly determination.

[0032] In response to the above problems, the embodiments of the present application provide a time series data prediction method, a computer, and a storage medium. First, the time series data is preprocessed to obtain first time series data; then, a prediction result of the first time series data is obtained based on the periodic components at different levels in the first time series data and the first time series data using a multiple seasonal trend decomposition method; a prediction result of the second time series data is obtained based on the model and the first time series data; a time series data prediction result is obtained based on the prediction result of the first time series data and the prediction result of the second time series data; and finally, an anomaly detection result is obtained based on the predicted time series data at the target moment in the time series data prediction result and the actual time series data at the target moment. After preprocessing the time series data to obtain the first time series data, a prediction result of the first time series data is obtained based on the periodic components at different levels in the first time series data and the first time series data using a multiple seasonal trend decomposition method. The information provided by the periodic changes in the first time series data is fully considered through the periodic components at different levels. At the same time, a prediction result of the second time series data is obtained using the model and the first time series data. Finally, the prediction result of the target time series data is obtained by combining the prediction result of the first time series data and the prediction result of the second time series data, which can improve the accuracy of the prediction result.

[0033] The time series data prediction method, computer and storage medium provided in the embodiments of the present application can be applied to Figure 1 In the time series data prediction system shown in Figure 1 , Figure 1 This is a schematic diagram of the architecture of a time series data prediction system 100 provided in an embodiment of the present application. The time series data prediction system 100 includes a client 101 and a server 102. The client 101 can communicate with the server 102 through a network. The client 101 refers to a device used by a user, such as a smartphone, a computer, etc. The user can interact with the server 102 through the client 101. In this solution, the client 101 is mainly responsible for sending the time series data to be detected to the server 102 and sending anomaly detection requests to the server 102. At the same time, the user can also set and change the threshold used in the anomaly detection process on the client 101. The client 101 is also used to receive and display the anomaly detection results sent by the server.

[0034] Server 102 is a remote computer used to process large amounts of computing tasks and store data. It is responsible for importing, preprocessing, and predicting time series data in the time series data prediction system 100. In this solution, server 102 receives time series data to be tested from a client and preprocesses it. It then uses multiple seasonal trend decomposition methods and models to obtain time series data prediction results. Anomaly detection results are obtained based on the predicted time series data at the target time in the time series data prediction results and the actual time series data at the target time.

[0035] Based on this, the present application provides a time series data prediction method, a computer, and a storage medium. The present application is described in detail below with reference to the accompanying drawings.

[0036] See also Figure 2 , Figure 2 This is a flowchart of a time series data prediction method provided by an embodiment of the present application. Figure 2 As shown, the method includes the following steps:

[0037] S201: Preprocess the time series data to obtain first time series data.

[0038] The execution subject of this method may be a server in a time series data prediction system, and the time series data is the data to be detected sent by the client to the server.

[0039] Time series data refers to the time series data for which anomaly detection is required. Time series data can be any continuous data arranged in chronological order, which can be in days, hours, or minutes. Preferably, the time series data is evenly spaced time series data. For example, the time series data is the daily sales of product A (in yuan, in days). The time series data is specifically: Monday: 1000; Tuesday: 1200; Wednesday: 1100; Thursday: 900; Friday: 950; Saturday: 1050; Sunday: 1000. By performing anomaly detection on time series data, it can be determined whether the sales of product A on each day are abnormal.

[0040] Preprocessing is used to clean and convert the format of time series data to facilitate subsequent modeling and analysis. Specifically, preprocessing operations can include data cleaning, smoothing, data conversion, standardization / normalization, downsampling / upsampling, and seasonal adjustment.

[0041] Among them, data cleaning is used to detect and process incomplete or erroneous data such as missing values, outliers or noise; smoothing uses techniques such as averaging and median filters to reduce random fluctuations; data conversion is used to transform the original data, such as using logarithmic transformation and difference operations to convert non-stationary time series into stationary time series; downsampling / upsampling is used to adjust the time granularity as needed, reducing high-frequency data to a lower frequency (such as reducing the time granularity from minutes to hours), or increasing low-frequency data to a higher frequency (such as increasing the time granularity from days to hours); seasonal adjustment is used to perform seasonal adjustments using methods such as X-12-ARIMA to eliminate obvious seasonal components in time series.

[0042] In one possible embodiment, preprocessing the time series data to obtain the first time series data includes:

[0043] By filling in the index of the first data in the time series data and setting the value of the first data to empty, the first preprocessed time series data is obtained; by filling in the value of the second data in the first preprocessed time series data, the second preprocessed time series data is obtained; and the trend component in the second preprocessed time series data is filtered out to obtain the first time series data.

[0044] In time series data, an index can refer to a timestamp or time point, used to identify the time corresponding to each data point. An index can be a combination of date and time, or time expressed in other forms. For example, the time series data is: 2024-10-10, 100; 2024-10-11, 110; 2024-10-13, 130; 2024-10-14, 140. The index of time series data is the date. Since time series data is evenly spaced in time granularity, it can be determined that there is a missing index (2024-10-12) at the third data point. Filling in the index of the first data point in the time series data means that the index of the first data point in the time series data is correct. Therefore, the index needs to be filled in at the corresponding position, that is, the missing index position needs to be added to the time series data. After filling the indexes and setting the corresponding index values ​​to null, the resulting time series data is: 2024-10-10, 100; 2024-10-11, 110; 2024-10-12, null; 2024-10-13, 130; 2024-10-14, 140.

[0045] Among them, for empty or missing values ​​in time series data, interpolation methods can be used to fill in the values. Specifically, the interpolation methods can be linear interpolation, exponentially weighted moving average (EWMA) interpolation, mean interpolation, or nearest neighbor interpolation. Preferably, the interpolation method is linear interpolation or EWMA interpolation. Linear interpolation estimates the values ​​at vacant or missing positions through linear interpolation based on the linear relationship between known data points; EWMA interpolation uses exponential weighting coefficients to calculate the estimated value at each missing position. Newer data points have higher weights, while older data points have lower weights. Specifically, the calculation formula for EWMA interpolation is as follows:

[0046] Y t =λxY t-1 +(1-λ)xY t-2 ;

[0047] Among them, Y t Represents the estimated value of the position to be filled, Y t-1 and Y t-2They represent the actual observations at the first two known positions respectively, and λ is a smoothing parameter that controls the weight ratio of each observation in calculating the estimated value.

[0048] For example, the time series data to be interpolated is: 2024-10-10, 100; 2024-10-11, 110; 2024-10-12, null; 2024-10-13, 130; 2024-10-14, 140. Using the linear interpolation method, the value corresponding to the index 2024-10-12 is determined to be 120. After linear interpolation, the time series data is: 2024-10-10, 100; 2024-10-11, 110; 2024-10-12, 120; 2024-10-13, 130; 2024-10-14, 140.

[0049] Among them, the Hodrick-Prescott (HP) filter can be used to filter out the trend component in the second preprocessed time series data. The HP filter is a method for removing the trend component of a time series. The HP filter can decompose the original data into a trend term and a residual term, and control the balance between trend and noise by adjusting the smoothing parameter. Specifically, the HP filter determines the optimal trend term by minimizing the loss function. The loss function consists of two parts. The first part is the goodness of fit term, that is, keeping the error between the predicted value and the actual observed value as small as possible; the second part is the smoothness penalty term, which ensures that the trend is as smooth as possible by controlling the difference between adjacent points. Among them, other filters that can remove the trend component of a time series can also be used to filter out the trend component in the second preprocessed time series data, and there is no limitation here.

[0050] It can be seen that in this example, by filling missing indexes, interpolating missing values, and filtering out trend components, the integrity of the time series data is restored, values ​​are filled, and long-term trends are removed, thereby obtaining more accurate first time series data with periodic characteristics, which facilitates subsequent prediction of time series data based on the first time series data.

[0051] S202: Obtain a first time series data prediction result based on the periodic components at different levels in the first time series data and the first time series data using a multiple seasonal trend decomposition method.

[0052] Among them, the Multiple Seasonal-Trend Decomposition Loess (MSTL) method is a statistical method for processing time series data with multiple levels of seasonality and trend. The MSTL method decomposes time series data into trend components, seasonal components, and residual terms at different levels. Specifically, the trend component captures the long-term trend of changes in the time series and represents the overall upward or downward trend of the data over a long period of time. The seasonal component reflects recurring patterns in the time series with a certain period length. For example, for annual sales data, the seasonal component will show similar patterns between the same months each year. The residual term contains the remaining part that cannot be explained by the trend and seasonality. The residual term represents other factors or random fluctuations that are not fully captured by the given trend and seasonality.

[0053] Specifically, the formula of the MSTL method is as follows:

[0054] X t =S t 1 +S t 2 +...+S t n +T t +R t ;

[0055] Among them, X t represents the observation value at time point t, S t 1 , S t 2 ,…,S t n represent the first, second, ..., and nth seasonal components of the observation value, respectively, T t represents the trend component, and R represents the residual term.

[0056] In a possible implementation, obtaining a first time series data prediction result based on the periodic components at different levels in the first time series data and the first time series data by using a multiple seasonal trend decomposition method includes:

[0057] Different levels of periodic components are separated from the first time series data through maximum repetition discrete wavelet transformation; a target number of periodic components are selected from the periodic components of different levels to obtain a periodic component sequence; the period length of each periodic component in the periodic component sequence is determined through an autocorrelation function; and first time series prediction data is obtained based on the period length of each periodic component in the periodic component sequence and the first time series data through a multiple seasonal trend decomposition method.

[0058] Among them, Maximum Overlap Discrete Wavelet Transform (MODWT) is a method used to perform frequency domain analysis on time series. MODWT is based on discrete wavelet transform. It decomposes the signal using multiple overlapping subbands at each scale and calculates the detail coefficients and approximation coefficients of each subband.

[0059] Specifically, the steps of MODWT are as follows: Decomposition step: MODWT obtains frequency domain information by decomposing the original time series signal into sub-bands of different scales. At each scale, MODWT uses a specific type of wavelet filter group to filter and downsample the signal to obtain low-frequency approximation coefficients and high-frequency detail coefficients. Among them, MODWT maintains partial overlap between different scales. Scale selection step: MODWT selects different scales according to needs to obtain information within the frequency range of interest. Higher scales can obtain detailed information within the lower frequency range, while lower scales are more suitable for detecting high-frequency components. In this method, MODWT is used to separate periodic components at different levels in the first time series data.

[0060] Among them, the steps of determining the period length of each periodic component in the periodic component sequence by the autocorrelation function (ACF) are as follows: for the periodic component of each level, calculate its corresponding autocorrelation function; draw the ACF spectrum of each level, where the horizontal axis represents the lag order and the vertical axis represents the correlation; observe the ACF spectrum and look for significant peaks or lag orders that exceed the confidence interval; determine the length of the periodic component in each level based on the occurrence of significant peaks or the lag orders that exceed the confidence interval, where the maximum lag order before the first significant peak can be selected as the estimated value of the length of the periodic component in this level.

[0061] It can be seen that in this example, separating the periodic components through the maximum repetition discrete wavelet change, selecting the target number of periodic components, determining the period length of each periodic component, and combining the multiple seasonal trend decomposition method are conducive to making the first time series forecast data more accurate.

[0062] In a possible implementation, selecting a target number of periodic components from the periodic components at different levels to obtain a periodic component sequence includes:

[0063] The periodic components at different levels are sorted from large to small according to the wavelet variance to obtain a sorted sequence; and the periodic components located at the front target number of the sorted sequence are selected from the sorted sequence to obtain a periodic component sequence.

[0064] Among them, the target number can be set or changed by the user on the client, and the target number can also be set directly according to the number of levels of the periodic component in the first time series data. For example, when the number of levels of the periodic component is an even number, the target number is equal to half of the number of levels of the periodic component plus 1. When the number of levels of the periodic component is an odd number, the target number is equal to half of the number of levels of the periodic component plus 1. There is no restriction on the way of taking the value of the target number.

[0065] Among them, after using MODWT to separate the periodic components of different levels in the first time series data, they are further sorted according to the wavelet variance corresponding to the periodic components of different levels to obtain a sorted sequence, and then the most significant target number of periodic components are output to obtain a periodic component sequence.

[0066] For example, the length of the first time series data is 100, and the target number is 3. After MODWT, five different levels of periodic components are separated, namely: level 1, wavelet variance is 10.2; level 2, wavelet variance is 9.2; level 3, wavelet variance is 10.5; level 4, wavelet variance is 8.2; level 5, wavelet variance is 12.2. Sorting the data from large to small according to wavelet variance, the sorted sequence is: level 5, wavelet variance is 12.2; level 3, wavelet variance is 10.5; level 1, wavelet variance is 10.2; level 2, wavelet variance is 9.2; level 4, wavelet variance is 8.2. Since the target number is 3, the periodic components of the first three levels in the sorted sequence are selected and output, resulting in the following periodic component sequence: level 5, wavelet variance is 12.2; level 3, wavelet variance is 10.5; level 1, wavelet variance is 10.2.

[0067] It can be seen that in this example, by sorting the periodic components at different levels according to the wavelet variance and selecting the top target number of periodic components, an ordered and significant periodic component sequence can be obtained, thereby extracting the most important time scale changes in the data, making it easier to predict the time series data based on the periodic component sequence.

[0068] S203: Obtain a prediction result of second time series data according to the model and the first time series data.

[0069] The model is a neural network model. Preferably, the model is a model obtained by modeling complex trends, holiday effects and autocorrelation using the Neural Prophet method. This model can be used to predict time series data. For details, please refer to Figure 3 , Figure 3 This is a schematic diagram of the architecture of a model provided in an embodiment of the present application, such as Figure 3 As shown in the figure, the architecture layers of the time series prediction model obtained by using Neura l Prophet modeling include input layer, seasonal component layer, holiday impact layer, trend component layer, nonlinear activation function layer and output layer.

[0070] The input layer receives time series data as input. Because the time series forecasting model derived from Neural Prophet modeling is sensitive to input, preprocessing of the time series data is generally required. The seasonal component layer captures cyclical seasonal characteristics by fitting seasonal variations using Fourier series and incorporating them into the model. The holiday impact layer encodes important holidays and considers their impact on the time series data. By adding binary vectors associated with specific dates to the model, the holiday impact layer captures the impact of these special events on the forecast results. The trend component layer uses multiple learnable parameters to fit the trend component in the time series. The trend component layer can handle linear and nonlinear trends and automatically selects the optimal trend function based on the dataset. The non-linear activation function layer applies a nonlinear activation function after each time step to increase the model's flexibility and expressiveness. The output layer outputs the final forecast results.

[0071] In a possible implementation, obtaining a prediction result of the second time series data according to the model and the first time series data includes:

[0072] The complex trend of the first time series data is predicted by the model to obtain the first model prediction result; the holiday effect of the first time series data is predicted by the model to obtain the second model prediction result; the autocorrelation of the first time series data is predicted by the model to obtain the third model prediction result; the second time series data prediction result is obtained based on the first model prediction result, the second model prediction result and the third model prediction result.

[0073] Specifically, by using Neural Prophet to model complex trends, holiday effects, and autocorrelations, the resulting time series data prediction model is expressed as follows:

[0074] Y t2 =T(t)+S(t)+E(t)+A(t)+L(t)+F(t);

[0075] Among them, Y t is the predicted value at time t, T(t) is the trend term, S(t) is the seasonal term, E(t) is the holiday term, A(t) is the autoregressive term, L(t) is the lagged regression term, and F(t) is the future regression term.

[0076] According to the above expression, the specific steps to build a time series data prediction model are as follows:

[0077] Step 1: Use segmented trend to construct trend term. The expression of trend term T(t) is as follows:

[0078] T(t)=(δ0+Γ(t)Tδ)t+(ρ0+Γ(t)Tρ);

[0079] Where δ0 is the initial growth, ρ0 is the initial offset, Γ(t) is a binary vector indicating whether time t exceeds a series of change points predefined by the model, T represents the transpose operation, δ contains the adjustment value of the growth rate at each change point, and ρ contains the adjustment value of the offset at each change point.

[0080] Step 2: Construct the seasonal term and use the Fourier series to construct the periodic pattern. The expression of the seasonal term S(t) is as follows:

[0081]

[0082] Among them, P is the length of the sequence period, k represents the number of approximation terms used, and a j 、b j denotes the coefficients of the cosine and sine parts of the j-th Fourier term, and t denotes time.

[0083] Step 3: Construct the holiday term E(t). The expression of E(t) is as follows:

[0084]

[0085] Among them, e indicates that each event is a binary variable, e∈{0, 1}.

[0086] Step 4: Construct the autoregressive term A(t). The expression of A(t) is as follows:

[0087] A t (t), A t (t+1),…,A t (t+h-1)=AR-Net(y t-1 ,y t-2 ,…,y t-p );

[0088] Among them, AR-Net is an autoregressive feedforward neural network for time series. It inputs p historical covariates and obtains h-step outputs through the AR-Net network. t represents time, h represents the prediction range, and yt-1 represents the observation value at time t-1.

[0089] Step 5: Construct the lagged regression term L(t). The expression of L(t) is as follows:

[0090] L t (t), L t (t+1),…,L t (t+h-1)=AR-Net(x t-1 , x t-2 ,…,x t-p );

[0091] Among them, AR-Net is an autoregressive feedforward neural network for time series. It inputs p historical covariates and obtains h-step outputs through the AR-Net network. t represents time, h represents the prediction range, and xt-1 represents the observation value at time t-1.

[0092] Step 6: Construct the future regression term F(t). The expression of F(t) is as follows:

[0093]

[0094] Where f represents the future regression variable and t represents time.

[0095] It can be seen that in this example, the Neural Prophet method is used to model complex trends, holiday effects, and autocorrelations. The nonlinear modeling capabilities of neural networks can better capture trends and seasonal changes in complex time series data, making the results of time series data prediction more accurate and comprehensive.

[0096] S204: Obtain a time series data prediction result according to the first time series data prediction result and the second time series data prediction result.

[0097] In a possible implementation, obtaining a time series data prediction result according to the first time series data prediction result and the second time series data prediction result includes:

[0098] By obtaining the product of the first time series data prediction result and the first prediction weight, a first weight prediction result is obtained; by obtaining the product of the second time series data prediction result and the second prediction weight, a second weight prediction result is obtained; by obtaining the sum of the first weight prediction result and the second weight prediction result, a time series data prediction result is obtained.

[0099] Among them, the first prediction weight and the second prediction weight can be set or changed by the user on the client. Preferably, the first prediction weight and the second prediction weight are both 1, and the time series data prediction result is the sum of the first time series data prediction result and the second time series data prediction result.

[0100] The calculation formula for time series data prediction results is as follows:

[0101] Y t =Y t1 xα+Y t2 xβ;

[0102] Among them, Y t is the prediction result of time series data, Y t1 is the prediction result of the first time series data, Y t2 is the prediction result of the second time series data, α is the first prediction weight, and β is the second prediction weight.

[0103] Among them, the time series data prediction results not only include the predicted value at each time point, but also include the upper boundary and the lower boundary of the predicted value. The time series data prediction results can be displayed through a curve graph, the horizontal axis of the curve graph corresponds to time, and the vertical axis of the curve graph corresponds to the value. Among them, the periodic components, trend components, and holiday effects of the time series data prediction result curve can be further decomposed and graphically displayed.

[0104] It can be seen that in this example, by adjusting the values ​​of the first prediction weight and the second prediction weight, the weight adjustment of the first time series data prediction result obtained by modeling the periodic data through MSTL and the second time series data prediction result obtained by modeling the complex trends, holiday effects and autocorrelation through Neurol Prophet can be achieved, and the advantages of the two prediction results can be combined to determine the accuracy of the obtained time series prediction result.

[0105] S205 , obtaining an anomaly detection result based on the predicted time series data at the target moment in the time series data prediction result and the actual time series data at the target moment.

[0106] The anomaly detection result is used to indicate whether the real time series data at the target moment is abnormal.

[0107] In a possible implementation, obtaining an anomaly detection result based on the predicted time series data at the target moment in the time series data prediction result and the actual time series data at the target moment includes:

[0108] Obtain a target difference between the predicted time series data at the target moment and the actual time series data at the target moment in the time series data prediction result; obtain a degree of deviation based on the target difference and the actual time series data at the target moment; determine whether the degree of deviation is greater than a deviation degree threshold; if it is detected that the degree of deviation is greater than the deviation degree threshold, determine that the anomaly detection result is that the actual time series data at the target moment is abnormal; if it is detected that the degree of deviation is not greater than the deviation degree threshold, determine that the anomaly detection result is that the actual time series data at the target moment is normal.

[0109] The target time can be set or changed by the user on the client, or the target time can be any time in the time series data prediction results. The server will automatically perform anomaly detection on all time series data in chronological order.

[0110] The method for calculating the degree of deviation based on the target difference and the actual time series data can be to use absolute error, percentage error, root mean square error, etc. Specifically, the absolute error is equal to the absolute value of the target difference, and the percentage error is equal to the ratio of the target difference to the actual time series data, which is then converted into a percentage.

[0111] Among them, since the time series data prediction results include the upper limit of the predicted value and the lower limit of the predicted value, anomaly detection can also be obtained directly by comparing the real time series data at the target moment, the upper limit of the predicted value and the lower limit of the predicted value. If the real time series data is detected to be higher than the upper limit of the predicted value or lower than the lower limit of the predicted value, the anomaly detection result is that the real time series data at the target moment is abnormal; if the real time series data is detected to be between the upper limit of the predicted value and the lower limit of the predicted value, the anomaly detection result is that the real time series data at the target moment is normal.

[0112] For example, the target time is 2024-11-11, the deviation degree threshold is 12%, the predicted time series data at the target time is 100, and the actual time series data at the target time is 90. The target difference is 100-90=10, and the deviation degree is calculated using the percentage error. The deviation degree = (10 / 90)x100=11.11%. Since the deviation degree of 11.11% is less than the deviation degree threshold of 12%, the anomaly detection result is that the actual time series data at the target time is normal.

[0113] When the anomaly detection result is an anomaly in the real time series data at the target moment, an alarm message is sent to the client. The alarm message can be displayed in text and / or pictures. Please refer to Figure 4 , Figure 4 This is a schematic diagram of an alarm information provided by an embodiment of the present application, such as Figure 4 As shown in the figure, when the anomaly detection result indicates an anomaly in the real time series data at the target time, the server sends an alert message to the client. The alert message is a combination of text and an exclamation mark. The text message is: "The real time series data at the target time is anomaly." Furthermore, after receiving the alert message from the server on the client, the user can click the details icon in the alert message to jump to the detailed interface for viewing the anomaly detection result.

[0114] It can be seen that in this example, the target difference and deviation degree are calculated to determine whether the real time series data at the target moment is abnormal, thereby improving the accuracy and reliability of anomaly detection.

[0115] It can be seen that in this example, after preprocessing the time series data sent by the client to obtain the first time series data, the first time series data prediction result is obtained based on the periodic components at different levels in the first time series data and the first time series data through the multiple seasonal trend decomposition method. The information provided by the periodic changes in the first time series data is fully considered through the periodic components at different levels. At the same time, the model and the first time series data are used to obtain the second time series data prediction result. Finally, the first time series data prediction result and the second time series data prediction result are combined to obtain the target time series data prediction result, which can improve the accuracy of the prediction result.

[0116] See also Figure 5 , Figure 5 This is a flowchart of another time series data prediction method provided by an embodiment of the present application. Figure 5 As shown, the method includes the following steps:

[0117] S501: Send an anomaly detection request message to the server.

[0118] The execution subject of this method may be a client of a time series data prediction system.

[0119] The time series data to be detected refers to the time series data for which anomaly detection is required. The time series data to be detected can be any continuous data arranged in chronological order, and the chronological order can be in days, hours, or minutes. Preferably, the time series data to be detected is time series data with equal intervals. For example, the time series data to be detected is the daily sales of commodity A (in yuan, in chronological order of days). The time series data to be detected is: Monday: 1000; Tuesday: 1200; Wednesday: 1100; Thursday: 900; Friday, 950; Saturday: 1050; Sunday: 1000. The time series data to be detected is time series data with equal intervals. By performing anomaly detection on the time series data to be detected, it can be found whether the sales of commodity A on each day are abnormal.

[0120] S502: Receive an anomaly detection response message from the server, where the anomaly detection response message includes an anomaly detection result for the time series data to be detected.

[0121] Among them, the anomaly detection response message is associated with at least one anomaly detection result, and the anomaly detection result is obtained by comparing the predicted time series data at the target moment in the time series data prediction result obtained by predicting the time series data to be detected and the actual time series data at the target moment.

[0122] Among them, the time series data prediction results include: the first time series data prediction results obtained by the multiple seasonal trend decomposition method based on the different levels of periodic components in the preprocessed time series data to be detected and the preprocessed time series data to be detected; and the second time series data prediction results obtained by the model and the preprocessed time series data to be detected.

[0123] S503: Display the abnormality detection result.

[0124] Among them, the time series data prediction results include the predicted time series data corresponding to different moments, and the time series data prediction results are displayed in the form of tables and / or curves; the anomaly detection results are displayed in the form of text and / or curves.

[0125] Specifically, see Figure 6 , Figure 6 This is a schematic diagram of the client interface of a time series data prediction system provided in an embodiment of the present application. Figure 6As shown, the display interface of the client displays the time series data prediction results. The time series data prediction results are displayed in the form of a table in the first area and in the form of a curve graph in the second area. The intersection of the first area and the second area is empty. The real time series data is also displayed in the form of a curve graph in the second area. The curve of the real time series data is displayed as a dotted line, and the curve of the time series data prediction results is displayed as a solid line. When the abnormal detection result at time t1 is detected as an abnormality of the real time series data, the real time series data and the predicted time series data at time t1 will be highlighted in the second area. At the same time, the detection result query mark is displayed in the third area of ​​the display area. When the user triggers the result query mark, a new window is created in the display interface, and the detailed abnormality detection results are displayed in the new window.

[0126] The trigger operation is a click operation or a hover operation on the result query identifier, and the hover operation is detecting that the hovering time of the pointer on the result query identifier is greater than a preset hovering time.

[0127] As can be seen, in this example, the client sends the time series data to be detected to the server, and the server processes and predicts the time series data to be detected. Finally, the anomaly detection results are obtained based on the predicted time series data and the actual time series data, and the anomaly detection results are sent to the client for the user to view. The anomaly detection results are displayed in multiple forms at the same time, which makes it convenient for users to understand the anomaly detection results in a timely manner and improve the user experience.

[0128] See also Figure 7 , Figure 7 This is a schematic diagram of the structure of a time series data prediction device provided by an embodiment of the present application. Figure 7 As shown, the time series data prediction device 700 includes:

[0129] The processing module 701 is used to preprocess the time series data to obtain first time series data;

[0130] Prediction module 702 is used to obtain a first time series data prediction result based on the periodic components at different levels in the first time series data and the first time series data through a multiple seasonal trend decomposition method; and to obtain a second time series data prediction result based on the model and the first time series data; and to obtain a time series data prediction result based on the first time series data prediction result and the second time series data prediction result; and to obtain an anomaly detection result based on the predicted time series data at the target moment in the time series data prediction result and the actual time series data at the target moment.

[0131] In one possible implementation, in terms of preprocessing time series data to obtain first time series data, the processing module 701 is specifically used to: obtain first preprocessed time series data by filling in the index of the first data in the time series data and setting the value of the first data to empty; obtain second preprocessed time series data by filling in the value of the second data in the first preprocessed time series data; and obtain first time series data by filtering out trend components in the second preprocessed time series data.

[0132] In one possible implementation, in terms of obtaining a prediction result of the first time series data based on the periodic components at different levels in the first time series data and the first time series data through a multiple seasonal trend decomposition method, the prediction module 702 is specifically used to: separate the periodic components at different levels from the first time series data through maximum repetition discrete wavelet transformation; select a target number of periodic components from the periodic components at different levels to obtain a periodic component sequence; determine the period length of each periodic component in the periodic component sequence through an autocorrelation function; and obtain first time series prediction data based on the period length of each periodic component in the periodic component sequence and the first time series data through a multiple seasonal trend decomposition method.

[0133] In one possible implementation, in terms of selecting a target number of periodic components from the periodic components at different levels to obtain a periodic component sequence, the prediction module 702 is specifically used to: sort the periodic components at different levels from large to small according to the wavelet variance to obtain a sorted sequence; and select a target number of periodic components located at the front of the sorted sequence from the sorted sequence to obtain a periodic component sequence.

[0134] In one possible implementation, in terms of obtaining a prediction result of the second time series data based on the model and the first time series data, the prediction module 702 is specifically used to: predict the complex trend of the first time series data through the model to obtain a first model prediction result; predict the holiday effect of the first time series data through the model to obtain a second model prediction result; predict the autocorrelation of the first time series data through the model to obtain a third model prediction result; and obtain a prediction result of the second time series data based on the first model prediction result, the second model prediction result, and the third model prediction result.

[0135] In one possible implementation, in terms of obtaining a time series data prediction result based on the first time series data prediction result and the second time series data prediction result, the prediction module 702 is specifically used to: obtain a first weight prediction result by obtaining the product of the first time series data prediction result and the first prediction weight; obtain a second weight prediction result by obtaining the product of the second time series data prediction result and the second prediction weight; obtain a time series data prediction result by obtaining the sum of the first weight prediction result and the second weight prediction result.

[0136] In one possible implementation, in terms of obtaining an anomaly detection result based on the predicted time series data at the target moment in the time series data prediction result and the actual time series data at the target moment, the prediction module 702 is specifically used to: obtain a target difference between the predicted time series data at the target moment in the time series data prediction result and the actual time series data at the target moment; obtain a degree of deviation based on the target difference and the actual time series data at the target moment; determine whether the degree of deviation is greater than a degree of deviation threshold; if it is detected that the degree of deviation is greater than the degree of deviation threshold, determine that the anomaly detection result is that the actual time series data at the target moment is abnormal; if it is detected that the degree of deviation is not greater than the degree of deviation threshold, determine that the anomaly detection result is that the actual time series data at the target moment is normal.

[0137] It is worth noting that the specific functional implementation of the time series data prediction device 700 can be found in the above Figure 2 The description of the time series data prediction method shown in the figure, for example, the processing module 701 is used to implement the relevant content of executing S201, and the prediction module 702 is used to implement the relevant content of executing S202-S205. The various units or modules in the time series data prediction device 700 can be individually or completely merged into one or several other units or modules to form a structure, or one (some) of the units or modules can be further divided into multiple functionally smaller units or modules to form a structure, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present invention. The above-mentioned units or modules are divided according to logical functions. In actual applications, the functions of one unit (or module) are implemented by multiple units (or modules), or the functions of multiple units (or modules) are implemented by one unit (or module).

[0138] See also Figure 8 , Figure 8 is a structural diagram of another time series data prediction device provided by an embodiment of the present application, such as Figure 8 As shown, the time series data prediction device 800 includes:

[0139] A sending module 801 is configured to send an anomaly detection request message to the server, wherein the anomaly detection request includes time series data to be detected;

[0140] A receiving module 802 is configured to receive an anomaly detection response message from the server, wherein the anomaly detection response message is associated with at least one anomaly detection result, wherein the anomaly detection result is obtained by comparing the predicted time series data at the target time in the time series data prediction result obtained by predicting the time series data to be detected with the actual time series data at the target time;

[0141] The display module 803 is used to display the abnormality detection result.

[0142] In one possible implementation, the time series data prediction result includes: a first time series data prediction result obtained by a multiple seasonal trend decomposition method based on the different levels of periodic components in the preprocessed time series data to be detected and the preprocessed time series data to be detected; and a second time series data prediction result obtained by the model and the preprocessed time series data to be detected.

[0143] In one possible implementation, the time series data prediction result includes the predicted time series data corresponding to different moments, and the time series data prediction result is displayed in a table and / or a curve; the anomaly detection result is displayed in text and / or a curve.

[0144] It is worth noting that the specific functional implementation of the time series data prediction device 800 is shown in the above Figure 5 The description of the time series data prediction method shown in the figure, for example, the sending module 801 is used to implement the relevant content of executing S501, the receiving module 802 is used to implement the relevant content of executing S503, and the display module 803 is used to implement the relevant content of executing S503. The various units or modules in the time series data prediction device 800 can be individually or completely merged into one or several other units or modules to form a structure, or one (or some) of the units or modules can be further divided into multiple functionally smaller units or modules to form a structure, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present invention. The above-mentioned units or modules are divided according to logical functions. In actual applications, the functions of one unit (or module) are implemented by multiple units (or modules), or the functions of multiple units (or modules) are implemented by one unit (or module).

[0145] According to the description of the above method embodiment and related device embodiment, please refer to Figure 9 , Figure 9 It is a structural diagram of a computer provided in an embodiment of the present application. Figure 9 The computer 900 shown includes a processor 901 , a memory 902 , a communication interface 903 , and a bus 904 . The processor 901 , the memory 902 , and the communication interface 903 are communicatively connected to each other via the bus 904 .

[0146] Optionally, the memory 902 is a ROM, a static storage device, a dynamic storage device or a RAM.

[0147] The memory 902 can store executable program codes. When the executable program codes stored in the memory 902 are executed by the processor 901, the processor 901 and the communication interface 903 are used to execute the program codes. Figure 2 The various steps of the time series data prediction method of the illustrated embodiment.

[0148] The processor 901 adopts a general CPU, a microprocessor, an application-specific integrated circuit ASIC, a GPU or one or more integrated circuits to execute relevant programs to perform the time series data prediction method of the method embodiment of the present application.

[0149] Processor 901 can also be an integrated circuit chip with signal processing capabilities. During implementation, each step of the time series data prediction method of the present application can be completed by hardware integrated logic circuits in processor 901 or software instructions. Optionally, processor 901 is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. The processor can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor is a microprocessor or any conventional processor. The steps of the method disclosed in conjunction with the embodiments of this application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The optional software module is located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in the memory 902, and the processor 901 reads the information in the memory 902, and combines its hardware to complete the functions required to be performed by the modules included in a time series data prediction device 700 or a time series data prediction device 800 of an embodiment of the present application, or executes the time series data prediction method of the method embodiment of the present application.

[0150] The communication interface 903 uses, for example but not limited to, a transceiver and other transceiver-related devices.

[0151] The bus 904 may include a path for transmitting information between various components of the computer 900 (eg, the memory 902 , the processor 901 , and the communication interface 903 ).

[0152] It should be noted that although Figure 9The computer 900 shown only shows a memory, a processor, and a communication interface. However, in the specific implementation process, those skilled in the art should understand that the computer 900 also includes other devices necessary for normal operation. At the same time, according to specific needs, those skilled in the art should understand that the computer 900 may also include hardware devices that implement other additional functions. In addition, those skilled in the art should understand that the computer 900 may also include only the devices necessary to implement the embodiments of the present application, and does not necessarily include Figure 9 All devices shown in .

[0153] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program for electronic data exchange. The computer program includes execution instructions, and the execution instructions are used to execute part or all of the steps of any one of the time series data prediction methods described in the above-mentioned time series data prediction method embodiments. The above-mentioned computer includes an electronic client device.

[0154] An embodiment of the present application provides a computer program product, wherein the computer program product includes a computer program, and the computer program is operable to enable a computer to perform part or all of the steps of any time series data prediction method recorded in the above method embodiments. The computer program product can be a software installation package.

[0155] It should be noted that for any of the aforementioned embodiments of the time series data prediction method, for simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should be aware that this application is not limited to the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions involved are not necessarily required by this application.

[0156] The above is a detailed introduction to the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of a time series data prediction method, a computer, and a storage medium of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, based on the idea of ​​a time series data prediction method, a computer, and a storage medium of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

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

[0158] These computer program instructions can also be stored in a computer readable memory that can guide a computer or other programmable time series data prediction device to work in a specific manner, so that the instructions stored in the computer readable memory produce a product including an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The memory may include a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0159] Although the present application has been described herein with reference to various embodiments, those skilled in the art may understand and implement other variations of the disclosed embodiments by examining the drawings, the disclosure, and the appended claims in the course of implementing the claimed application. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality. The fact that certain measures are recited in different dependent claims does not mean that these measures cannot be combined to produce advantageous effects.

[0160] Those skilled in the art will understand that all or part of the steps in the various methods of any of the above-mentioned time series data prediction method embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0161] It can be understood that any product that is controlled or configured to execute the processing method of the flowchart described in an embodiment of a time series data prediction method of the present application, such as the device and computer program product of the above flowchart, falls within the scope of the related products described in the present application.

[0162] Obviously, those skilled in the art may make various modifications and variations to the time series data prediction method, computer, and storage medium provided in this application without departing from the spirit and scope of this application. Thus, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application is intended to include such modifications and variations.

Claims

1. A time series data prediction method, characterized in that: The method comprises: Preprocessing the time series data to obtain first time series data; Obtaining a prediction result of the first time series data based on the periodic components at different levels in the first time series data and the first time series data by using a multiple seasonal trend decomposition method; Obtain a prediction result of the second time series data according to the model and the first time series data; Obtaining a time series data prediction result according to the first time series data prediction result and the second time series data prediction result; An anomaly detection result is obtained based on the predicted time series data at the target moment in the time series data prediction result and the actual time series data at the target moment.

2. The method according to claim 1, wherein The preprocessing of the time series data to obtain the first time series data includes: First preprocessed time series data is obtained by filling in the index of the first data in the time series data and setting the value of the first data to be empty; Obtaining second preprocessed time series data by filling in the value of the second data in the first preprocessed time series data; The trend component in the second preprocessed time series data is filtered out to obtain the first time series data.

3. The method according to claim 1, wherein Obtaining a first time series data prediction result based on the periodic components at different levels in the first time series data and the first time series data by using the multiple seasonal trend decomposition method includes: Separating periodic components at different levels from the first time series data by using maximum repetition discrete wavelet transform; Selecting a target number of periodic components from the periodic components at different levels to obtain a periodic component sequence; Determining the period length of each periodic component in the periodic component sequence by using an autocorrelation function; First time series forecast data is obtained according to the period length of each periodic component in the periodic component sequence and the first time series data through a multiple seasonal trend decomposition method.

4. The method according to claim 3, wherein The step of selecting a target number of periodic components from the periodic components at different levels to obtain a periodic component sequence includes: Sorting the periodic components at different levels from large to small according to the wavelet variance to obtain a sorted sequence; A target number of periodic components located at the front of the sorted sequence are selected from the sorted sequence to obtain a periodic component sequence.

5. The method according to any one of claims 1 to 4, characterized in that Obtaining a prediction result of the second time series data according to the model and the first time series data includes: Predicting the complex trend of the first time series data using a model to obtain a first model prediction result; Predicting the holiday effect of the first time series data using the model to obtain a second model prediction result; Predicting the autocorrelation of the first time series data using a model to obtain a third model prediction result; A second time series data prediction result is obtained based on the first model prediction result, the second model prediction result and the third model prediction result.

6. The method according to any one of claims 1 to 4, characterized in that Obtaining a time series data prediction result according to the first time series data prediction result and the second time series data prediction result includes: Obtaining a first weighted prediction result by obtaining a product of the first time series data prediction result and a first prediction weight; Obtain a second weighted prediction result by obtaining the product of the second time series data prediction result and the second prediction weight; The time series data prediction result is obtained by obtaining the sum of the first weight prediction result and the second weight prediction result.

7. The method according to any one of claims 1 to 4, characterized in that Obtaining an anomaly detection result based on the predicted time series data at the target moment in the time series data prediction result and the actual time series data at the target moment includes: Obtaining a target difference between the predicted time series data at the target moment and the actual time series data at the target moment in the time series data prediction result; Obtaining a degree of deviation according to the target difference and the real time series data of the target moment; Determining whether the degree of deviation is greater than a deviation degree threshold; If it is detected that the degree of deviation is greater than the deviation degree threshold, the abnormality detection result is determined to be that the real time series data at the target moment is abnormal; if it is detected that the degree of deviation is not greater than the deviation degree threshold, the abnormality detection result is determined to be that the real time series data at the target moment is normal.

8. A computer, characterized in that: include: A memory, a processor, and an executable program code stored in the memory and runnable on the processor, wherein the processor executes the steps of the time series data prediction method according to any one of claims 1 to 7 when executing the executable program code.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores executable program code, which includes execution instructions for executing the steps of the time series data prediction method according to any one of claims 1 to 7.

10. A computer program product, characterized in that The computer program product includes a computer program, and the computer program is used to enable a computer to execute the steps of the time series data prediction method according to any one of claims 1 to 7.