Periodic time sequence prediction method fusing time domain and frequency domain analysis
By combining time-domain and frequency-domain analysis methods, combined with graph convolution and bidirectional state space model, the periodicity and temporal characteristics of time series data are extracted, which solves the problem of difficult to effectively combine time-domain and frequency-domain analysis in the prior art, and improves the accuracy of time-sequence prediction and the effectiveness of the model.
Patent Information
- Application Number
- CN202510219561.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-05-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is difficult to effectively combine the advantages of time domain and frequency domain, resulting in the inadequacy of the potential of the frequency domain method for time series prediction, and frequency domain analysis is difficult to distinguish between noise and real signals when processing non-periodic time series, resulting in a decrease in redundant information and prediction accuracy.
A periodic time series prediction method that integrates time domain and frequency domain analysis is adopted. By collecting and preprocessing time series data, the periodic intensity of the data is analyzed, and variables with strong periodicity are converted into frequency domain data. Periodic features are extracted using graph convolutional models, and the time features are extracted in the time domain using a bidirectional state space model, and the two are finally fused for prediction.
The advantages of effectively combining time domain and frequency domain analysis are realized, the accuracy of time series prediction and the effectiveness of model are improved, and the redundant information problem of frequency domain analysis is overcome when dealing with non-periodic time series.
Smart Images

Figure CN119940652A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a periodic time series prediction method integrating time domain and frequency domain analysis, and belongs to the field of periodic time series prediction. Background Art
[0002] Time series forecasting involves using historical information in a retrospective sequence to predict future states. Time series analysis has a wide range of applications in many practical scenarios. For example, industrial time series forecasting can provide a deep understanding of the operating status of industrial processes, thereby supporting intelligent predictive control and optimization decisions. Therefore, time series forecasting has very important practical significance.
[0003] The time domain and frequency domain are two basic representations used to analyze time series data, providing complementary perspectives on time series data. In the time domain, the focus of the analysis is on the change in amplitude over time, which allows the identification of local dependencies and transient behaviors within the signal. In contrast, frequency domain analysis aims to represent the time series in terms of frequency components, parsing the data from a frequency perspective to identify periodic features and denoise. However, frequency domain analysis focuses on frequency components and often ignores time dependencies. Since they each only consider a single aspect of a time series, combining the advantages of the two domains is a viable approach to address the challenges of mixing different periodic attributes in real-world time series.
[0004] Most existing works use the frequency domain as an intermediate module, that is, they convert between the time domain and the frequency domain, and use the features of the frequency domain as the input of the time domain model. However, the final prediction result is still made in the time domain, rather than directly predicting the frequency domain data, which limits the potential of the frequency domain method. In addition, for non-periodic time series, since the frequency domain analysis cannot effectively distinguish between noise and real signal components, it often leads to a large amount of redundant information in the frequency domain representation. This redundant information makes it difficult for the model to extract useful and meaningful patterns from the frequency domain features, thus affecting the accuracy of the prediction and the effectiveness of the model. Therefore, how to effectively combine the advantages of the time domain and the frequency domain remains a challenge. Summary of the invention
[0005] The purpose of the present invention is to provide a periodic time series prediction method that integrates time domain and frequency domain analysis, aiming to solve the technical problem of how to effectively combine the advantages of time domain and frequency domain in time series prediction.
[0006] To achieve the above object, the present invention provides a periodic time series prediction method integrating time domain and frequency domain analysis, the method comprising:
[0007] Step 1: Collect time series data and preprocess the acquired data to construct a time domain analysis data set, represented by X time ={x 1 ,x2 ,…,x N}, where N is the number of time series contained in the dataset, x i represents the i-th time series in the data set;
[0008] Step 2: Analyze the correlation of time series data at different lag time points, and determine its periodicity strength by calculating the correlation of data at different lag periods, and then integrate variables with strong periodicity;
[0009] Step 3: Based on the strongly periodic variables, the time domain data is converted into frequency domain data through fast Fourier transform, and the periodic features are extracted using a graph convolution-based model;
[0010] Step 4: Analyze the data set in the time domain and extract the temporal features using the Mamba model built based on the bidirectional state space model;
[0011] Step 5: Fusion is performed based on the features extracted from time domain analysis and frequency domain analysis to obtain the final prediction output.
[0012] The Step 1 is specifically as follows:
[0013] Step 1.1: Delete variables with more than 30% missing values and interpolate the remaining missing values to ensure data integrity;
[0014] Step 1.2: The box plot method is used to detect outliers to ensure the reliability of the data;
[0015] Step 1.3: Process the timestamp format and unify the time standard to ensure the time sequence of the data;
[0016] Step 1.4: Principal component analysis is used for feature selection and dimensionality reduction, to remove redundant or irrelevant features and optimize the data set.
[0017] The Step 2 is specifically as follows:
[0018] Step 2.1: Calculate the autocorrelation coefficient of each time series variable to determine the correlation of the time series at different lag periods;
[0019] Step 2.2: Based on the correlation of different lag periods, determine whether the variable has periodic characteristics;
[0020] Step 2.3: Integrate the variables with periodic characteristics for the next step of frequency domain analysis.
[0021] The Step 2.2 is specifically as follows:
[0022] For each time series variable, the periodicity strength is determined by calculating whether there is an obvious peak in its autocorrelation coefficient;
[0023] If the autocorrelation coefficient has an obvious peak at lag period k, then the correlation of the variable at this lag period is significant;
[0024] By further calculating the autocorrelation coefficients at lag periods k, 2k, and 3k, the variables with specific obvious peaks are judged to have strong periodicity.
[0025] The integration of variables with periodic characteristics is specifically as follows:
[0026] X periodic ={x 1 ,x 2 ,…,x M},M=|X periodic |,M≤N, where M is the number of variables with periodic characteristics screened from the original time domain dataset.
[0027] The Step 3 is specifically as follows:
[0028] Step 3.1: Use fast Fourier transform to transform the integrated variables from time domain to frequency domain, including real and imaginary parts;
[0029] Step 3.2: Construct a frequency domain analysis data set based on the converted frequency domain data;
[0030] Step 3.3: Take the feature points in the frequency domain as the nodes of the graph, establish the edges of the graph based on the correlation between the feature points, and construct the graph structure;
[0031] Step 3.4: Perform graph convolution on the graph structure data to extract periodic features in the data;
[0032] Step 3.5: Perform inverse Fourier transform on the frequency domain data to convert the data from the frequency domain back to the time domain.
[0033] The construction of the frequency domain analysis data set is specifically as follows:
[0034] X frequency ={x 1 ,x 2 ,…,x M}, each x i is the representation of the ith significant periodic variable in the frequency domain, defined as x i ={x i (f 1 ),x i (f 2 ),…,x i (f K )}, where f Kis the frequency component, x i (f K ) is the corresponding frequency f K The complex coefficients on .
[0035] The Step 3.3 is specifically as follows:
[0036] Calculate the frequency domain amplitude to represent the strength of each frequency component, sort the frequency amplitudes from large to small, select the top n frequency points as the points of the graph, and each frequency point constitutes a node of the graph;
[0037] The edges between corresponding nodes are established based on the correlation of the magnitudes.
[0038] The Step 4 is specifically as follows:
[0039] Step 4.1: Split the time series in the time domain dataset according to the time step length and use them as subsequent input in the form of time series blocks;
[0040] Step 4.2: Use the Mamba model to consider the interdependence between each variable and the previous and next variables at each time point;
[0041] Step 4.3: Map the results processed by the Mamba model to the final representation vector, which contains the time characteristics of the variable in the entire time series and its correlation characteristics with other variables.
[0042] The Step 5 is specifically as follows:
[0043] Output=F θ (X) = F time (X)+F frequency (X)
[0044] The time domain feature F time (X) and frequency domain features F frequency (X) merge to form a unified feature representation F θ (X)
[0045] The beneficial effects of the present invention are as follows: the present invention first collects time series data and constructs a time domain analysis data set after preprocessing the data. Secondly, the periodic intensity of the time series data is analyzed, and variables with periodic characteristics are integrated. Then, in the frequency domain data processing stage, the integrated variables are converted from the time domain to the frequency domain through fast Fourier transform to construct a frequency domain analysis data set. A graph structure is constructed based on the frequency domain analysis data set, and a graph convolution model is used to extract periodic features. In the time domain data processing stage, a modeling method based on a bidirectional state space model is introduced to extract time domain features. Finally, the features extracted from the time domain and frequency domain analysis are fused to form a comprehensive data representation, and the final prediction result is output, thereby effectively combining the advantages of the time domain and frequency domain. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 This is a schematic diagram of the structure of the periodic time series prediction method that integrates time domain and frequency domain analysis in this application;
[0047] Figure 2 This is a flow chart of a periodic time series prediction method that integrates time domain and frequency domain analysis in this application. DETAILED DESCRIPTION
[0048] In order to better understand the above technical solution, the exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0049] Combination Figure 1 This embodiment describes a periodic time series analysis and prediction method based on time domain and frequency domain fusion feature extraction, including the following modules:
[0050] The data preprocessing module collects, cleans and adjusts the original data to obtain time series data.
[0051] The time domain analysis data set construction module selects and reduces the dimensions of time series data features to obtain the time domain analysis data set.
[0052] The frequency domain analysis dataset construction module analyzes the periodicity strength of each variable in the time series data, integrates the variables with strong periodicity, and uses Fourier analysis to convert the integrated variables from the time domain to the frequency to obtain the frequency domain analysis dataset.
[0053] The time domain feature extraction module extracts the time characteristics of each variable in the time domain analysis data set based on the Mamba model of the bidirectional SSM.
[0054] The frequency domain feature extraction module extracts the periodic characteristics of each variable in the frequency domain analysis data set based on the graph convolution model.
[0055] The feature fusion module obtains the final prediction result based on the fusion of the results of the time domain feature extraction module and the frequency domain feature extraction module.
[0056] Combine the following Figure 2 The present invention is described in detail:
[0057] Step 1: Collect time series data and preprocess the acquired data to construct a time domain analysis data set.
[0058] In this embodiment, missing value processing is first performed to delete variables with missing values exceeding 30% to ensure data integrity. For the remaining missing values, interpolation methods are used to fill in the missing values to ensure that the data is complete and without missing values.
[0059] The box plot method detects outliers in the data due to sensor failure. The outliers are identified by calculating the quartiles and interquartile range of the data and replaced with the mean of the upper and lower limits.
[0060] Process timestamp formats and unify the time standards of data by converting all timestamps into a consistent format (such as ISO 8601 standard format) and ensuring time sequence.
[0061] Finally, feature selection and dimensionality reduction are performed. The contribution score of each feature to the predicted target variable is calculated using principal component analysis, and the main variables are selected based on the contribution score.
[0062] Through the above data preprocessing steps, a time domain analysis data set is constructed based on the screened main variables, and the time domain analysis data set is defined as X time ={x 1 ,x 2 ,…,x N}, where N represents the total number of time series (the number of time series contained in the dataset). i Represents the i-th time series in the data set, defined as x i =[x i (1),x i (2),…,x i (T)], T is the length of the time series.
[0063] Step 2: Analyze the correlation of time series data at different lag time points, and determine its periodicity strength by calculating the correlation of data at different lag periods, and then integrate variables with strong periodicity.
[0064] In this embodiment, the autocorrelation coefficient of each variable is first calculated to determine the autocorrelation value of the time series at different lag steps. Where k is the lag order, ranging from 1 to is the mean of the time series.
[0065] At certain lags, the correlation of the data is significantly higher, which indicates that the time series may have a cyclical component. Based on the correlation of different lags, it is possible to determine whether the time series has cyclical characteristics.
[0066] If the correlation is strong and repeats periodically at a specific lag period or multiple lag periods, the variable has periodic characteristics.
[0067] Finally, the variables with significant periodic characteristics are integrated and defined as X periodic ={x 1 ,x 2 ,…,x M},M=|X periodic |, M≤N. Where M is the number of variables with periodic characteristics screened from the original time domain data set.
[0068] Step 3: Based on the strongly periodic variables, the time domain data is converted into frequency domain data through fast Fourier transform, and the periodic features are extracted using a graph convolution-based model.
[0069] In this embodiment, firstly periodic Each time series variable x in i , perform discrete Fourier transform to obtain its frequency domain representation:
[0070]
[0071] Among them, the fast Fourier transform is used to convert the time domain data into a complex form in the frequency domain, including the real part and the imaginary part. The fast Fourier transform can convert the time domain signal into a frequency domain signal and provide a complex representation for each frequency component. The real and imaginary parts of the complex number represent the amplitude and phase information of the signal at the frequency component respectively. Next, the real and imaginary parts of the Fourier transform result are extracted and combined into a complex tensor. The complex tensor contains all the information of the frequency domain signal, including both the amplitude information of different frequency components and the phase information, which is crucial for analyzing periodic characteristics.
[0072] Combine all frequency domain representation variables into a frequency domain analysis data set: X frequency ={x 1 ,x 2 ,…,x M}, each x i is the representation of the ith significant periodic variable in the frequency domain, defined as:i ={x i (f 1 ),x i (f 2 ),…,x i (f K )}. Among them, f K is the frequency component, x i (f K ) is the corresponding frequency f K The complex coefficients on .
[0073] Then, graph convolution operations are performed on these complex tensors. The feature points with significant amplitude in the frequency domain are used as nodes of the graph, and the amplitude correlation is used to establish the edges of the graph, which can be expressed as: G = (V, E), where V is the node of the graph and E is the edge of the graph.
[0074] By considering the relationship between nodes in the data, the graph convolutional network can effectively extract periodic features from complex data structures, expressed as: X' frequency =GConv(V,E). This operation can mine the periodic patterns in time series data and further enhance the recognition ability of periodic features.
[0075] Finally, the frequency domain data is converted back to the time domain through the inverse Fourier transform. The inverse Fourier transform restores the complex information in the frequency domain to time domain data, so that the periodic characteristics can be remapped back to the original time series, providing a clear time domain representation for subsequent analysis and prediction. It is expressed as: After inverse Fourier transform of all frequency domain variables, we get time domain data: X = {x 1 (t),x 2 (t),…,x M (t)}.
[0076] Step 4: Analyze the data set in the time domain and extract temporal features using the Mamba model built based on the bidirectional state space model.
[0077] First, the time series in the time domain data set is segmented according to a certain step size to form patches, and the "time series blocks" formed by segmentation are used as input. The formula is expressed as: X = Linear (Patch (X time )).
[0078] Among them, X time is the original time domain data; Patch(·) is a segmentation function used to divide the time series data into time series blocks; Linear(·) is a linear mapping function used to embed the segmented time series blocks into a high-dimensional feature space.
[0079] Then, the linearly mapped time series blocks are input into the Mamba model. The Mamba model is a bidirectional state space model that effectively captures the dynamic changes and time series dependencies in the time series by simultaneously modeling the forward and backward dependencies between variables. The Mamba model based on the bidirectional state space model is used to consider the mutual dependencies between each variable and the previous and next variables at each time point, expressed as: X' = Mamba (X), where X' is the time series feature representation after being processed by the Mamba model.
[0080] Furthermore, the Mamba model is able to handle complex time series data and reveal both long-term and short-term interactions between different variables.
[0081] Finally, the result processed by the Mamba model is mapped to the final representation vector: is the time domain feature representation vector. This representation vector not only contains the time characteristics of each variable in the entire time series, but also contains the correlation characteristics between variables.
[0082] Step 5: Fusion is performed based on the features extracted from time domain analysis and frequency domain analysis to obtain the final prediction output.
[0083] Time domain feature F time (X) mainly reflects the temporal variation pattern of the data, while the frequency domain feature F frequency (X) reveals the periodic characteristics of the data at different frequency components.
[0084] In order to utilize the complementarity of time domain and frequency domain information, these two types of features are fused to generate a unified comprehensive feature representation:
[0085] Output=F θ (X) = F time (X)+F frequency (X)
[0086] Among them, F θ (X) represents the comprehensive feature representation after fusion.
[0087] The specific implementation modes of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above implementation modes, and various changes can be made within the knowledge scope of ordinary technicians in this field without departing from the purpose of the present invention.
Claims
1. A periodic time series prediction method integrating time domain and frequency domain analysis, characterized in that: Step 1: Collect time series data and preprocess the acquired data to construct a time domain analysis data set, represented by X time ={x1,x2,…,x N }, where N is the number of time series contained in the dataset, x i represents the i-th time series in the data set; Step 2: Analyze the correlation of time series data at different lag time points, and determine its periodicity strength by calculating the correlation of data at different lag periods, and then integrate variables with strong periodicity; Step 3: Based on the strongly periodic variables, the time domain data is converted into frequency domain data through fast Fourier transform, and the periodic features are extracted using a graph convolution-based model; Step 4: Analyze the data set in the time domain and extract the temporal features using the Mamba model built based on the bidirectional state space model; Step 5: Fusion is performed based on the features extracted from time domain analysis and frequency domain analysis to obtain the final prediction output.
2. The periodic time series prediction method integrating time domain and frequency domain analysis according to claim 1 is characterized in that: The Step 2 is specifically as follows: Step 2.1: Calculate the autocorrelation coefficient of each time series variable to determine the correlation of the time series at different lag periods; Step 2.2: Based on the correlation of different lag periods, determine whether the variable has periodic characteristics; Step 2.3: Integrate the variables with periodic characteristics for the next step of frequency domain analysis.
3. The periodic time series prediction method integrating time domain and frequency domain analysis according to claim 2 is characterized in that: The Step 2.2 is specifically as follows: For each time series variable, the periodicity strength is determined by calculating whether there is an obvious peak in its autocorrelation coefficient; If the autocorrelation coefficient has an obvious peak at lag period k, then the correlation of the variable at this lag period is significant; By further calculating the autocorrelation coefficients at lag periods k, 2k, and 3k, the variables with specific obvious peaks are judged to have strong periodicity.
4. The periodic time series prediction method integrating time domain and frequency domain analysis according to claim 2 is characterized in that: The integration of variables with periodic characteristics is specifically as follows: X periodic ={x1,x2,…,x M },M=|X periodic |,M≤N, where M is the number of variables with periodic characteristics screened from the original time domain dataset.
5. The periodic time series prediction method integrating time domain and frequency domain analysis according to claim 1, characterized in that: The Step 3 is specifically as follows: Step 3.1: Use fast Fourier transform to transform the integrated variables from time domain to frequency domain, including real and imaginary parts; Step 3.2: Construct a frequency domain analysis data set based on the converted frequency domain data; Step 3.3: Take the feature points in the frequency domain as the nodes of the graph, establish the edges of the graph based on the correlation between the feature points, and construct the graph structure; Step 3.4: Perform graph convolution on the graph structure data to extract periodic features in the data; Step 3.5: Perform inverse Fourier transform on the frequency domain data to convert the data from the frequency domain back to the time domain.
6. The periodic time series prediction method integrating time domain and frequency domain analysis according to claim 5 is characterized in that: The construction of the frequency domain analysis data set is specifically as follows: X frequency ={x1,x2,…,x M }, each x i is the representation of the ith significant periodic variable in the frequency domain, defined as x i ={x i (f1),x i (f2),…,x i (f K )}, where f K is the frequency component, x i (f K ) is the corresponding frequency f K The complex coefficients on .
7. The periodic time series prediction method integrating time domain and frequency domain analysis according to claim 5, characterized in that: The Step 3.3 is specifically as follows: Calculate the frequency domain amplitude to represent the strength of each frequency component, sort the frequency amplitudes from large to small, select the top n frequency points as the points of the graph, and each frequency point constitutes a node of the graph; The edges between corresponding nodes are established based on the correlation of the magnitudes.
8. The periodic time series prediction method integrating time domain and frequency domain analysis according to claim 1, characterized in that: The Step 5 is specifically as follows: Output=F θ (X)=F time (X)+F frequency (X) The time domain feature F time (X) and frequency domain features F frequency (X) merge to form a unified feature representation F θ (X).
Citation Information
Cited By
Multi-condition time series data cycle analysis method and system based on AI technology
CN121501867A