Solar wind speed time sequence prediction method of time-frequency autocorrelation contrast learning fused with frequency domain consistency

Through the time-frequency autocorrelation comparison learning method that integrates frequency domain consistency, the problem of insufficient phase information and context dependence in time series prediction is solved, and the accuracy and effectiveness of solar wind speed prediction are improved.

CN120492948APending Publication Date: 2025-08-15TIANJIN UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510566255.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

The existing time series frequency domain representation learning methods ignore the context dependence of phase information and input and output sequences, resulting in lag in prediction results and poor results.

Method used

Through the time-frequency autocorrelation comparison learning method that integrates frequency domain consistency, the frequency domain context autocorrelation and time domain label cross-correlation comparison loss are used to select positive and negative sample pairs, and combined with deep learning models to optimize the training loss, capturing the global and context dependence of the input and output sequences.

Benefits of technology

Improve the accuracy of time series prediction and the ability to capture the correlation between input and output sequences, especially in solar wind speed prediction tasks, which significantly improve the prediction effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120492948A_ABST
    Figure CN120492948A_ABST
Patent Text Reader

Abstract

The invention discloses a time-frequency autocorrelation comparison solar wind speed time sequence prediction method fused with frequency domain consistency, and the method mainly comprises the steps: carrying out the preprocessing of solar wind speed time sequence data, and dividing a data set; sample features are extracted through a Transform model; frequency domain context autocorrelation contrast loss is obtained through frequency domain context autocorrelation contrast learning in frequency domain analysis; time domain label cross-correlation comparison loss is obtained through time domain label cross-correlation comparison learning in time domain analysis; a linear predictor of the model is used for calculating sample features to obtain a prediction sequence, and the mean square error of the prediction sequence and a real sequence is used as prediction loss; based on the frequency domain context self-correlation comparison loss, the time domain label cross-correlation comparison loss and the prediction loss, obtaining training loss for model optimization through weight summation; and performing solar wind speed time sequence prediction by using the optimized model. According to the method, the extraction capability of the time sequence prediction model on the dependence between input and output is improved, and the solar wind speed time sequence prediction performance is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of time series prediction and relates to a deep learning model training method applied to solar wind speed time series prediction, specifically a solar wind speed time series prediction method that integrates time-frequency autocorrelation comparative learning with frequency domain consistency. Background Art

[0002] Time series forecasting is a key task in many fields, including energy, healthcare, and finance. It has evolved from early statistical methods to machine learning-based approaches and now to the rapidly advancing deep learning methods. As more and more new time series forecasting methods are proposed, the growth curve of time series forecasting performance has flattened, meaning that existing single methods are no longer able to extract new potential information from time series. To further improve time series feature extraction and forecasting performance, researchers have combined some classic time series analysis methods with deep learning, achieving some progress, such as Fourier transform analysis (FFT), cross correlation coefficients, and dynamic time warping (DTW).

[0003] Among many classic methods, Fourier analysis has garnered significant attention for its simplicity, efficiency, and ability to capture global characteristics. Some neural network models incorporate the Fourier transform to transform time series originating in the time domain into multi-periodic discrete signals in the frequency domain. These models then extract frequency-domain features through filtering, fusion, linear prediction, and self-attention mechanisms, enabling prediction. This has led to significant progress in long-term time series prediction. Fourier analysis can also be combined with several deep learning paradigms, such as frequency-domain masking and reconstruction. In particular, in the field of time series representation learning, Fourier analysis is used to help models extract periodic features, for example by aligning time-domain features with frequency-domain features so that the time-domain features also include periodic components. These methods all leverage the Fourier transform's ability to efficiently extract global regularities from sequences.

[0004] Although Fourier transforms are widely used in time series representation learning tasks, these methods still have some limitations. First, the application of the Fourier transform remains limited. The Fourier transform transforms real-valued signals from the time domain into multi-periodic complex frequency domain components. However, current Fourier time series representation learning methods still focus solely on amplitude, neglecting the key element of phase. As a result, while sequence prediction results can capture clear periodic patterns, the overall sequence exhibits a certain degree of lag. Deep learning models that incorporate Fourier analysis may process the real and imaginary components of the frequency domain separately, severely fragmenting the frequency domain components that should be treated as a whole. Even some methods perform a weighted fusion of the real and imaginary components, but still fail to consider the overall amplitude and phase information. Second, while the Fourier transform can capture the overall characteristics of a sequence, in the field of time series prediction, since the label sequence cannot be directly included in the deep learning training phase, it cannot fully capture the output sequence, especially the close contextual dependencies between the input and output sequences. For example, some input sequences may be highly similar in both time and frequency domain characteristics, but their future sequences may have completely different trends. Current time series prediction methods make it difficult to capture in advance the subtle features of these input sequences that lead to future changes. However, if the dependency between future sequences and input sequences can be considered in some indirect way, the prediction results for these difficult examples can be improved. Summary of the Invention

[0005] In response to the problems of insufficient utilization of frequency domain information and irrelevance of context dependence in current time series frequency domain representation learning methods, the present invention provides a solar wind speed time series prediction method that integrates frequency domain consistency with time-frequency autocorrelation contrastive learning. A contrastive learning training method based on frequency domain context correlation is designed. In addition to supervised training, the input and output sequences are converted into overall frequency domain information. The positive and negative sample pairs of the input sequence are selected based on the correlation between the frequency domain information to alleviate the "similar input, different output" phenomenon that is prevalent in time series prediction.

[0006] In order to solve the above technical problems, the present invention proposes a solar wind speed time series prediction method that integrates time-frequency autocorrelation contrast learning with frequency domain consistency, comprising the following steps:

[0007] Step 1) Data preprocessing: Read an existing solar wind speed time series dataset and divide it into a training set, a validation set, and a test set in a certain proportion for training, validation, and testing, respectively. Missing values and outliers are linearly imputed. The mean and variance are calculated on the training set and the entire dataset, including the validation and test sets, is normalized based on these statistics.

[0008] Step 2) Extracting sample features using a feature extractor of a deep learning model: Divide the training set preprocessed in step 1) into multiple input and output sequence pairs of equal length and input them into a deep learning model to extract sample features;

[0009] Step 3) Obtain the frequency domain contextual autocorrelation contrast loss through frequency domain contextual autocorrelation contrast learning;

[0010] Step 4) obtaining the time domain label cross-correlation contrast loss through time domain label cross-correlation contrast learning;

[0011] Step 5) Time-frequency autocorrelation contrastive learning prediction training with frequency domain consistency: The linear predictor of the deep learning model is used to calculate the extracted sample features to obtain a predicted sequence, and the mean square error between the predicted sequence and the true sequence is used as the prediction loss;

[0012] Step 6) Model optimization: Based on the frequency domain context autocorrelation contrast loss of step 3), the time domain label cross-correlation contrast loss of step 4), and the prediction loss of step 5), the three are weighted and summed to obtain the training loss for model optimization. The initial weight value is 0.5.

[0013] Step 7) Use the optimized model to predict the solar wind speed time series.

[0014] In the present invention, the specific content of step 2) is as follows:

[0015] The training set preprocessed in step 1) is divided into multiple input and output sequence pairs of equal length, and each input sequence of length T is taken as X={x1,x2,…,x T+1}, input all sequences into the model Model to extract features and obtain an output feature V i ;

[0016] V i =Model(X i ) (1)

[0017] In formula (1), the deep learning model Model is an arbitrary time series feature encoder, and the Transformer model is used as the feature extractor. Its brief calculation formula is as follows:

[0018] Q=p i W Q ,K=p i W K ,V=p i W V (2)

[0019] Among them, W Q ,W K ,W V is the weight matrix; after that, calculate the feature V:

[0020]

[0021] Among them, WO is the weight matrix, d k is a fixed constant.

[0022] In the present invention, the specific content of step 3) is as follows:

[0023] 3-1) All input and output sequence pairs are concatenated along the time dimension and Fourier transformed to obtain the frequency domain context sequence; including:

[0024] Step 3-1-1) In a batch of B input and output sample pairs {{X1,Y1},{X2,Y2},…,{X B ,Y B}}, each pair of input and output sequences contains an input sequence of length T and a tag sequence of length H

[0025]

[0026] Step 3-1-2) Concatenate the input and output sequence pairs along the time dimension to obtain B context sequences {S1, S2, ..., S B};

[0027]

[0028] Step 3-1-3) Perform Fourier transform on the context sequence to obtain the frequency domain context sequence

[0029]

[0030]

[0031] in is the output of the fast Fourier transform of the context sequence of length T+H, A(Z) is the amplitude, Φ(Z) is the phase; use In short, Re(Z) and Im(Z) are the real and imaginary parts of the above formula respectively, i is the imaginary unit, and i 2 =-1.

[0032] 3-2) Calculating the frequency domain similarity between each pair of frequency domain context sequences obtained in step 3-1) to form a frequency domain context autocorrelation matrix; including:

[0033] Step 3-2-1) In a batch of B frequency domain context sequence samples , calculate their pairwise similarity;

[0034] A pair of frequency domain context sequences consisting of complex-valued vectors and Their similarity measurement formula is as follows:

[0035]

[0036] Where * represents the conjugate transpose operation on a complex-valued vector, |·| represents the modulus calculation of the vector, and · is the complex-valued dot product operation; after expansion, we have:

[0037]

[0038] This similarity measures the similarity between two frequency domain context sequences in the frequency domain phase spectrum;

[0039] Step 3-2-2) Based on the similarity between all frequency domain context sequences in step 3-2-1), a frequency domain context autocorrelation matrix is constructed.

[0040]

[0041] In formula (9), A FreqSim (i, j) represents the frequency domain context correlation between the i-th and j-th input sequences in a batch of input sequence samples.

[0042] 3-3) Select the column corresponding to the highest correlation item except the diagonal from each row of the frequency domain context autocorrelation matrix to obtain the positive sample number corresponding to each sample; the frequency domain context autocorrelation matrix A obtained from step 3-2) FreqSim For each row in , select a column number corresponding to the item with the largest autocorrelation value except the diagonal; suppose the feature of any sample in a batch of samples is V i For this sample, the column number corresponding to the column with the largest autocorrelation in the i-th row of the autocorrelation matrix is set to j.

[0043] 3-4) Find the corresponding input sample feature according to the column number of the column with the highest correlation except the diagonal, mark the sample corresponding to the sample feature as a positive sample in the stacked sample, and mark the other samples as negative samples; find the corresponding sample feature V from the column number j obtained in step 3-3) j , as the sample V in step 3-3) i Corresponding positive samples, other features V in the same batch k as negative samples.

[0044] 3-5) Based on the positive and negative samples marked above, calculate the similarity between the sample features extracted by the deep learning model and the positive and negative sample features respectively, and divide the similarity of the positive sample pair by the average similarity of the negative sample pair and take the logarithm to obtain the frequency domain context autocorrelation contrast loss; for any sample feature V in a batch i, there is another sample with the highest correlation with its frequency domain context, and it is marked as a positive sample V j , the other samples in the batch are marked as negative samples V k ; On this basis, the frequency domain context autocorrelation contrast loss is defined as follows:

[0045]

[0046] In formula (10), Sim(·,·) represents the similarity between two features, usually cosine similarity:

[0047]

[0048] In formula (11), |·| represents the modulus of the feature.

[0049] In the present invention, step 4) comprises:

[0050] 4-1) For all output sequence samples in step 2), calculate the mutual correlation value between each two to obtain the time domain label mutual correlation matrix, including:

[0051] Step 4-1-1) In a batch of B output samples Y, each output sample is a label sequence of length H Calculate the Person correlation coefficient between each pair as a correlation measure:

[0052]

[0053] In formula (12), x n represents the nth element in the sequence X, Indicates the mean of each element of the two sequences involved in the calculation;

[0054] Step 4-1-2) Calculate the correlation between all label samples according to step 4-1-1) to form the time domain label mutual correlation matrix A TimeCorr :

[0055]

[0056] In formula (13), A TimeCorr (i, j) represents the temporal label correlation between the i-th and j-th samples in a batch of samples.

[0057] 4-2) Select the column corresponding to the highest correlation item except the diagonal from each row of the time domain label correlation matrix to obtain the positive sample number corresponding to each input sample; the time domain label correlation matrix A obtained from step 4-1) TimeCorr For each row in , select a column number corresponding to the item with the largest autocorrelation value except the diagonal; suppose the feature of any sample in a batch of samples is V iFor this sample, the column number corresponding to the column with the largest autocorrelation in the i-th row of the autocorrelation matrix is set to j.

[0058] 4-3) Select the input sample feature according to the positive sample number and mark it as a positive sample, and mark other samples in the row as negative samples; from the column number j obtained in step 4-2), find the corresponding sample feature V j , as the sample V in step 4-2) i Corresponding positive samples, other features V in the same batch k as negative samples.

[0059] 4-4) According to the positive and negative samples marked in step 4-3), calculate the similarity between each input sample feature and its positive sample feature and negative sample feature respectively, and divide the similarity of the positive sample pair by the average similarity of the negative sample pair and take the logarithm to obtain the time domain label cross-correlation contrast loss; for any sample feature V in a batch i , there is another sample with the highest global correlation, and it is marked as a positive sample V j , the other samples in the batch are marked as negative samples V k On this basis, the time domain label cross-correlation contrast loss is defined as follows:

[0060]

[0061] In formula (14), Sim(·,·) represents the similarity between two features, usually cosine similarity:

[0062]

[0063] In formula (15), |·| represents the modulus of the feature.

[0064] In the present invention, in step 5), based on the feature V extracted by the deep learning model in step 2), the feature is mapped into a prediction output using the prediction layer Predictor

[0065]

[0066] In formula (16), W O and b are both learnable matrices; the predicted sequence is measured by mean square error MSE The error between the actual sequence y is used as the prediction loss:

[0067]

[0068] In the present invention, step 6) comprises:

[0069] Step 6-1) is based on the frequency domain context autocorrelation contrast loss of step 3), the time domain label cross-correlation contrast loss of step 4), and the prediction loss of step 5. The three are weighted and summed to obtain the training loss that guides model optimization:

[0070] L total =α*L FreqCorr +(1-α)*L TimeCorr +L pred (18)

[0071] In formula (13), α is the weight of the loss term, which controls the relative size of the two contrast losses;

[0072] In step 6-2), a dynamic weight update mechanism in the time-frequency domain is set up to adaptively adjust the prediction focus of the model. The update rules for each round are as follows:

[0073]

[0074] In formula (19), epoch is the number of training rounds, and the loss item weight α is updated by the relative size ratio of the two losses in the previous round.

[0075] In the present invention, step 7) comprises:

[0076] Step 7-1) determines whether the prediction error of the prediction model on the validation set no longer decreases. If so, execute step 7-2); otherwise, adjust the parameters of the deep learning model and the linear predictor using the training loss, and return to step 3);

[0077] Step 7-2) The solar wind speed time series over the past period of time is used as the input of the model, and the output of the model is the corresponding future wind speed prediction series.

[0078] Compared with the prior art, the present invention has the following beneficial effects:

[0079] Existing time series prediction tasks combine Fourier analysis with feature extraction tasks and model structures to capture global periodic dependencies, but the effect is limited because its analysis scope is limited to a relatively short input window, and Fourier analysis has difficulty capturing information with a larger span that can better reflect periodic and contextual dependencies. The present invention jointly considers the contextual dependencies of the input and label sequences, fuses the information of the context sequence in the frequency domain space, selects the sample input sub-sequence with the highest similarity in the frequency domain as the positive sample and maximizes the similarity with the anchor input feature, retaining the contextual dependency between the input and output sequences, so that the model can adjust the potential features of the input sequence according to the supervisory label. This innovation not only fully utilizes the global information gain brought by Fourier analysis, but also improves the contextual prediction ability of time series.

[0080] Existing time series comparison prediction methods only consider the internal enhancement and subsequence relationships within the input sequence, ignoring supervisory information that is more critical to the prediction task. Data enhancement and subsequence context dependency mining within the input sequence fail to account for the potential information of future sequences. For example, when the similarity between different input samples differs significantly from the similarity of the corresponding labeled samples, existing methods struggle to effectively address this issue. This invention selects positive and negative sample pairs based on the correlation between labeled samples, discovers common features for similar future input sequences, and narrows the correlation gap between input and output samples.

[0081] The present invention not only overcomes the limitations of existing methods in constructing positive and negative samples and capturing time-frequency information, but also significantly improves the model's ability to capture the correlation between input and output sequences in time series, providing a more powerful representation learning framework for the solar wind speed time series prediction task. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] Figure 1 It is a schematic diagram of the overall model structure and loss function action position of the present invention;

[0083] Figure 2 Schematic diagram of the frequency domain contextual autocorrelation contrast loss proposed in the present invention;

[0084] Figure 3 This is a schematic diagram of the time domain label cross-correlation contrast loss proposed in the present invention. DETAILED DESCRIPTION

[0085] The design idea of the solar wind speed time series prediction method proposed in the present invention that integrates time-frequency autocorrelation contrast learning with frequency domain consistency is as follows: in the frequency domain analysis part, the input sequence and the label sequence to be predicted are spliced and then Fourier transformed. The obtained frequency domain context samples integrate the overall information of the long sequence, including features such as period and trend. The degree of correlation between all frequency domain context samples is calculated in a batch, and all samples select other samples with the highest degree of frequency domain correlation to form positive pairs, guiding the model to extract context-related phase information. In the time domain analysis part, the degree of correlation is calculated for a batch of sequences to be predicted, and all samples select other samples with the highest degree of label correlation to form positive pairs, guiding the model to extract amplitude information related to the label from the input samples. After training and optimization, the above two contrast losses will guide the model to simultaneously explore the context dependency between the input and output sequences from both the time domain and frequency domain perspectives. This method effectively solves the limitation of self-supervised time series prediction tasks that cannot fully utilize label information, and ignores the problem of multi-perspective collaboration in the time and frequency domains, and is suitable for prediction tasks of time series data.

[0086] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, but the following embodiments do not limit the present invention in any way.

[0087] The problem definition in this invention is: Suppose there are L time points of solar wind speed time series data set S = {s1, s2, ..., s L}, each time point is composed of six indicators: date, solar particle temperature, solar wind density, solar wind pressure, magnetic field pressure to thermal pressure ratio and wind speed. Sampling from this data set can obtain an input sequence X of length T = {x1, x2, ..., x T}∈S, the task is to predict the future sequence Y={x T+1 ,x T+2 ,…,x T+H}∈S.

[0088] See also Figure 1 、 Figure 2 and Figure 3 The solar wind speed time series prediction method based on time-frequency autocorrelation contrast learning integrating frequency domain consistency proposed in the present invention includes the following steps:

[0089] Step 1) Data preprocessing: Read the existing solar wind speed time series dataset S and divide it into training, validation, and test sets in a certain proportion for training, validation, and testing respectively. Missing values and outliers are linearly filled. The mean and variance are calculated on the training set, and the entire dataset is normalized based on the mean and variance to prevent training instability and extreme prediction phenomena.

[0090] Step 2) Extract sample features through the feature extractor of the deep learning model: Divide the training set preprocessed in step 1) into multiple input and output sequence pairs of equal length, take the input sequence, each input sequence of length T X={x1,x2,…,x T}, each sequence X i Input to the model Model to extract features and obtain an output feature V i ;

[0091] V i =Model(X i ) (1)

[0092] In formula (1), the deep learning model Model is an arbitrary time series feature encoder, and the Transformer model is used as the feature extractor. The brief calculation process inside the Transformer model is as follows:

[0093] Q=p i W Q ,K=p i W K ,V=p i W V (2)

[0094] Among them, W Q,W K ,W V is the weight matrix; after that, calculate the feature V:

[0095]

[0096] Among them, W O is the weight matrix, d k is a fixed constant.

[0097] Step 3) Figure 2 , the frequency domain contextual autocorrelation contrast learning process is as follows:

[0098] Step 3-1-1) In a batch of B input and output sample pairs {{X1,Y1},{X2,Y2},…,{X B ,Y B}}, each pair of input and output sequences contains an input sequence of length T and a future sequence of length H

[0099] Step 3-1-2) Concatenate the input and output sequence pairs along the time dimension to obtain B context sequences {Z1, Z2, ..., Z B};

[0100]

[0101] Step 3-1-3) Perform Fourier transform on the context sequence to obtain the frequency domain context sequence

[0102]

[0103]

[0104] in is the output of the fast Fourier transform of the context sequence of length T+H, A(Z) is the amplitude, and Φ(Z) is the phase. In short, Re(Z) and Im(Z) are the real and imaginary parts of the above formula respectively, i is the imaginary unit, and i 2 =-1.

[0105] Step 3-2) Calculation of frequency domain context autocorrelation matrix:

[0106] Step 3-2-1) In a batch of B frequency domain context sequence samples , calculate their pairwise similarity;

[0107] For two complex-valued vectors and Their similarity measures are expressed as follows:

[0108]

[0109] Where * represents the conjugate transpose operation on a complex-valued vector, |·| represents the modulus calculation of the vector, and · is the complex-valued dot product operation; after expansion, we have:

[0110]

[0111] This similarity measures the similarity of the frequency domain components of two sequences from a phase perspective.

[0112] Step 3-2-2) Based on the similarity between all frequency domain context sequences in step 3-2-1), a frequency domain context autocorrelation matrix is constructed.

[0113]

[0114] In formula (9), A FreqSim (i, j) represents the frequency domain context correlation between the i-th and j-th input sequences in a batch of input sequence samples;

[0115] Step 3-3) The frequency domain context autocorrelation matrix A obtained from step 3-2) FreqSim For each row in , select a column number corresponding to the item with the largest autocorrelation value except the diagonal; suppose the feature of any sample in a batch of samples is V i , for this sample, the column number corresponding to the column with the largest autocorrelation in the i-th row of the autocorrelation matrix is set to j;

[0116] Step 3-4) Find the corresponding sample feature v from the column number j obtained in step 3-3) j , as the sample v in step 3-3-1) i Corresponding positive samples, other features v in the same batch k as negative samples.

[0117] Step 3-5) For any sample feature V in a batch i , there is another sample with the highest correlation with its frequency domain context, and it is marked as a positive sample V j , the other samples in the batch are marked as negative samples V k ; On this basis, the frequency domain context autocorrelation contrast loss is defined as follows:

[0118]

[0119] In formula (10), Sim(·,·) represents the similarity between two features, usually cosine similarity:

[0120]

[0121] In formula (11), |·| represents the modulus of the feature.

[0122] Step 4) Figure 3 ,The time domain label cross correlation contrast learning process is as follows:

[0123] Step 4-1) Calculate the time domain label cross-correlation matrix;

[0124] Step 4-1-1) In a batch of B output sequence samples Y, each output sample is a label sequence of length H Calculate the Person correlation coefficient between each pair as a correlation measure:

[0125]

[0126] In formula (12), x n represents the nth element in the sequence X, Indicates the mean of each element of the two sequences involved in the calculation;

[0127] Step 4-1-2) Calculate the correlation between all label samples according to step 4-1-1) to form the time domain label mutual correlation matrix A TimeCorr :

[0128]

[0129] In formula (13), A TimeCorr (i, j) represents the time domain label correlation between the i-th and j-th samples in a batch of samples;

[0130] Step 4-2) The time domain label correlation matrix A obtained from step 4-1) TimeCorr For each row in , select a column number corresponding to the item with the largest correlation value except the diagonal; suppose the feature of any sample in a batch of samples is V i , for this sample, the column number corresponding to the column with the largest cross-correlation in the i-th row of the cross-correlation matrix is set to j;

[0131] Step 4-3) Find the corresponding sample feature V according to the column number j obtained in step 4-2) j , as the sample V in step 4-2) i Corresponding positive samples, other features V in the same batch k As negative samples;

[0132] Step 4-4) For any sample feature V in a batch i , there is another sample with the highest global correlation, and it is marked as a positive sample V j , the other samples in the batch are marked as negative samples V kOn this basis, the time domain label cross-correlation contrast loss is defined as follows:

[0133]

[0134] In formula (14), Sim(·,·) represents the similarity between two features, usually cosine similarity:

[0135]

[0136] In formula (15), |·| represents the modulus of the feature.

[0137] Step 5) Fusion of frequency domain consistency time-frequency autocorrelation contrast learning prediction training:

[0138] The linear predictor of the deep learning model is used to calculate the predicted sequence based on the extracted sample features, and the mean square error between the predicted sequence and the true sequence is used as the prediction loss;

[0139] Based on the feature V extracted by the deep learning model in step 2, the prediction layer Predictor is used to map the feature into a prediction output

[0140]

[0141] In formula (16), W O and b are both learnable matrices; the predicted sequence is measured by mean square error MSE The error between the actual sequence y is used as the prediction loss:

[0142]

[0143] Step 6) Model optimization: Based on the frequency domain context autocorrelation contrast loss of step 3), the time domain label cross-correlation contrast loss of step 4), and the prediction loss of step 6), the three are weighted and summed to obtain the training loss for model optimization. The initial weight value is 0.5.

[0144] Step 6-1) is based on the frequency domain context autocorrelation contrast loss of step 3), the time domain label cross-correlation contrast loss of step 4), and the prediction loss of step 5. The three are weighted and summed to obtain the training loss that guides model optimization:

[0145] L total =α*L FreqCorr +(1-α)*L TimeCorr +L pred (18)

[0146] In formula (13), α is the weight of the loss term, which controls the relative size of the two contrast losses;

[0147] In step 6-2), a dynamic weight update mechanism in the time-frequency domain is set up to adaptively adjust the prediction focus of the model. The update rules for each round are as follows:

[0148]

[0149] In formula (19), epoch is the number of training rounds, and the loss item weight α is updated by the relative size ratio of the two losses in the previous round.

[0150] Step 7) Use the optimized model to predict the solar wind speed time series:

[0151] Step 7-1) determines whether the prediction error of the prediction model on the validation set no longer decreases. If so, execute step 7-2); otherwise, adjust the parameters of the deep learning model and the linear predictor using the training loss, and return to step 3);

[0152] Step 7-2) The solar wind speed time series over the past period of time is used as the input of the model, and the output of the model is the corresponding future wind speed prediction series.

[0153] Research Materials

[0154] This method is applied to the solar wind speed time series forecasting task. The solar wind speed dataset used consists of 50,000 time points. Each time point is composed of six indicators: date, solar particle temperature, solar wind density, solar wind pressure, magnetic field pressure to thermal pressure ratio, and wind speed. The multivariate forecasting task requires the prediction of five indicators in addition to the date, while the univariate forecasting task requires the prediction of wind speed. For all methods, each input sample is a time series of length 96, containing the values of 96 time points. The lengths of the future series to be predicted are 96, 192, 336, and 720, respectively. The mean squared error (MSE) and mean absolute error (MAE) are used as metrics to evaluate the time series forecasting performance of the model. Table 1 compares the performance of this method with other publicly available methods for the solar wind time series forecasting task.

[0155] Table 1

[0156]

[0157] Table 1 shows the prediction results of this method and three other publicly available time series prediction methods for the solar wind speed time series prediction task. As can be seen from Table 1, compared to the other methods, this method achieves the best prediction results, namely the smallest MSE and MAE errors, under the aforementioned conditions of different prediction lengths and numbers of variables. This demonstrates that the proposed method is highly capable of performing both long-term and short-term wind speed forecasting tasks. This demonstrates the practicality and accuracy of this method for solar wind speed time series prediction tasks.

[0158] This research also selected publicly available datasets from seven different application domains: ETTh1, ETTh2, ETTm1, ETTm2, ECL, Weather, and Traffic. Mean Squared Error (MSE) and Mean Absolute Error (MAE) were used as metrics to evaluate the model's time series forecasting performance. Table 2 (and Table 2 in Supplementary Table 2) compares the prediction results of the proposed method on multivariate time series datasets with other recent and mainstream methods. "OOM" indicates that the method is unavailable for the corresponding dataset or forecast length.

[0159] Table 2

[0160]

[0161] Table 2

[0162]

[0163] Using existing mature methods and datasets, the data in Table 2 (including Table 2 in the continuation) further demonstrate that this method achieves the minimum prediction error in a variety of application scenarios (mechanical equipment, energy and electricity, weather, and transportation), and can be applied to various fields to complete time series forecasting tasks.

[0164] Although the present invention has been described above in conjunction with the accompanying drawings, the present invention is not limited to the above-mentioned specific embodiments. The above-mentioned specific embodiments are merely illustrative and not restrictive. Under the guidance of the present invention, ordinary technicians in this field can make many improvements and changes without departing from the purpose of the present invention, which are all protected by the present invention.

Claims

1. A solar wind speed time series prediction method integrating time-frequency autocorrelation contrast learning with frequency domain consistency, characterized by: The steps include: Step 1) Data preprocessing: Read an existing solar wind speed time series dataset and divide it into a training set, a validation set, and a test set in a certain proportion for training, validation, and testing, respectively. Missing values and outliers are linearly imputed. The mean and variance are calculated on the training set and the entire dataset, including the validation and test sets, is normalized based on these statistics. Step 2) Extracting sample features using a feature extractor of a deep learning model: Divide the training set preprocessed in step 1) into multiple input and output sequence pairs of equal length and input them into a deep learning model to extract sample features; Step 3) The frequency domain context autocorrelation contrast loss is obtained through frequency domain context autocorrelation contrast learning, including: 3-1) All input and output sequence pairs are concatenated along the time dimension and Fourier transformed to obtain the frequency domain context sequence; 3-2) Calculating the frequency domain similarity between each pair of frequency domain context sequences obtained in step 3-1) to construct a frequency domain context autocorrelation matrix; 3-3) Selecting the column corresponding to the highest correlation item except the diagonal item from each row of the frequency domain context autocorrelation matrix to obtain the positive sample number corresponding to each sample; 3-4) Find the corresponding input sample feature according to the column number of the column corresponding to the highest correlation item except the diagonal, and mark the sample corresponding to the sample feature as a positive sample in the stacked sample, and mark the other samples as negative samples; 3-5) Based on the positive and negative samples marked above, calculate the similarity between the sample features extracted by the deep learning model and the positive and negative sample features respectively, and divide the similarity of the positive sample pair by the average similarity of the negative sample pair and take the logarithm to obtain the frequency domain contextual autocorrelation contrast loss; Step 4) The time domain label cross-correlation contrast loss is obtained through time domain label cross-correlation contrast learning, including: 4-1) For all output sequence samples in step 2), calculate the mutual correlation value between each two to obtain the time domain label mutual correlation matrix; 4-2) Select the column corresponding to the highest correlation item (excluding the diagonal) from each row of the time-domain label cross-correlation matrix to obtain the positive sample number corresponding to each input sample; 4-3) Select the input sample feature according to the positive sample number and mark it as a positive sample, and mark the other samples in the row as negative samples; 4-4) Based on the positive and negative samples marked in step 4-3), calculate the similarity between each input sample feature and its positive sample feature and negative sample feature respectively, and divide the similarity of the positive sample pair by the average similarity of the negative sample pair and take the logarithm to obtain the time domain label cross-correlation contrast loss; Step 5) Fusion of time-frequency autocorrelation contrast learning prediction training with frequency domain consistency: The linear predictor of the deep learning model is used to calculate the predicted sequence based on the extracted sample features, and the mean square error between the predicted sequence and the true sequence is used as the prediction loss; Step 6) Model optimization: Based on the frequency domain context autocorrelation contrast loss of step 3), the time domain label cross-correlation contrast loss of step 4), and the prediction loss of step 5), the three are weighted and summed to obtain the training loss for model optimization. The initial weight value is 0.

5. Step 7) Use the optimized model to predict the solar wind speed time series: Step 7-1) determines whether the prediction error of the prediction model on the validation set no longer decreases. If so, execute step 7-2); otherwise, adjust the parameters of the deep learning model and the linear predictor using the training loss, and return to step 3); Step 7-2) The solar wind speed time series over the past period of time is used as the input of the model, and the output of the model is the corresponding future wind speed prediction series.

2. The solar wind speed time series prediction method according to claim 1, characterized in that: The specific content of the step 2) is as follows: The training set preprocessed in step 1) is divided into multiple input and output sequence pairs of equal length, and each input sequence of length T is taken as X={x1,x2,…,x T }, input all samples into the model Model to extract features and obtain an output feature V i ; V i =Model(X i ) (1) In formula (1), the deep learning model Model is an arbitrary time series feature encoder, and the Transformer model is used as the feature extractor. The brief calculation process inside the Transformer model is as follows: Q=p i W Q ,K=p i W K ,V=p i W V (2) Among them, W Q ,W K ,W V is the weight matrix; after that, calculate the feature V: Among them, W O is the weight matrix, d k is a fixed constant.

3. The solar wind speed time series prediction method according to claim 1, characterized in that: In the step 3): The specific contents of step 3-1) include: Step 3-1-1) In a batch of B input and output sample pairs {{X1,Y1},{X2,Y2},…,{X B ,Y B }}, each pair of input and output sequences contains an input sequence of length T and a tag sequence of length H Step 3-1-2) Concatenate the input and output sequence pairs along the time dimension to obtain B context sequences {Z1, Z2, ..., Z B }; Step 3-1-3) Perform Fourier transform on the context sequence to obtain the frequency domain context sequence in is the output of the fast Fourier transform of the context sequence of length T+H, A(Z) is the amplitude, Φ(Z) is the phase; use In short, Re(Z) and Im(Z) are the real and imaginary parts of the above formula respectively, i is the imaginary unit, and i 2 =-1; The specific contents of step 3-2) include: Step 3-2-1) In a batch of B frequency domain context sequence samples , calculate their pairwise similarity; A pair of frequency domain context sequences consisting of complex-valued vectors and Their similarity measurement formula is as follows: Where * represents the conjugate transpose operation on a complex-valued vector, |·| represents the modulus calculation of the vector, and · is the complex-valued dot product operation; after expansion, we have: This similarity measures the similarity between two frequency domain context sequences in the frequency domain phase spectrum; Step 3-2-2) Based on the similarity between all frequency domain context sequences in step 3-2-1), a frequency domain context autocorrelation matrix is constructed. In formula (9), A FreqSim (i, j) represents the frequency domain context correlation between the i-th and j-th input sequences in a batch of input sequence samples; In step 3-3), the frequency domain context autocorrelation matrix A obtained from step 3-2) FreqSim For each row in , select a column number corresponding to the item with the largest autocorrelation value except the diagonal; suppose the feature of any sample in a batch of samples is V i , for this sample, the column number corresponding to the column with the largest autocorrelation in the i-th row of the autocorrelation matrix is set to j; In step 3-4), find the corresponding sample feature V from the column number j obtained in step 3-3) j , as the sample V in step 3-3) i Corresponding positive samples, other features V in the same batch k As negative samples; In step 3-5), for any sample feature V in a batch i , there is another sample with the highest correlation with its frequency domain context, and it is marked as a positive sample V j , the other samples in the batch are marked as negative samples V k ; On this basis, the frequency domain context autocorrelation contrast loss is defined as follows: In formula (10), Sim(·,·) represents the similarity between two features, usually cosine similarity: In formula (11), |·| represents the modulus of the feature.

4. The solar wind speed time series prediction method according to claim 1, characterized in that: In the step 4): The specific contents of step 4-1) include: Step 4-1-1) In a batch of B output samples Y, each output sample is a label sequence of length H Calculate the Person correlation coefficient between each pair as a correlation measure: In formula (12), x n represents the nth element in the sequence X, Indicates the mean of each element of the two sequences involved in the calculation; Step 4-1-2) Calculate the correlation between all label samples according to step 4-1-1) to form the time domain label mutual correlation matrix A TimeCorr : In formula (13), A TimeCorr (i, j) represents the time domain label correlation between the i-th and j-th samples in a batch of samples; In step 4-2), the time domain label mutual correlation matrix A obtained from step 4-1) TimeCorr For each row in , select a column number corresponding to the item with the largest cross-correlation value except the diagonal; suppose the feature of any sample in a batch of samples is V i , for this sample, the column number corresponding to the column with the largest cross-correlation value in the i-th row of the cross-correlation matrix is set to j; In step 4-3), find the corresponding sample feature V from the column number j obtained in step 4-2) j , as the sample V in step 4-2) i Corresponding positive samples, other features V in the same batch k As negative samples; In step 4-4), for any sample feature V in a batch i , there is another sample with the highest global correlation, and it is marked as a positive sample V j , the other samples in the batch are marked as negative samples V k On this basis, the time domain label cross-correlation contrast loss is defined as follows: In formula (14), Sim(·,·) represents the similarity between two features, usually cosine similarity: In formula (15), |·| represents the modulus of the feature.

5. The solar wind speed time series prediction method according to claim 1, characterized in that: The specific content of the step 5) integrating the time-frequency autocorrelation contrast learning prediction training with frequency domain consistency is as follows: based on the feature V extracted by the deep learning model in step 2), the feature is mapped into a prediction output using the prediction layer Predictor In formula (16), W O and b are both learnable matrices; The predicted sequence is measured by the mean square error MSE The error between the actual sequence y is used as the prediction loss:

6. The solar wind speed time series prediction method according to claim 1, characterized in that: The specific contents of step 6) include: Step 6-1) is based on the frequency domain context autocorrelation contrast loss of step 3), the time domain label cross-correlation contrast loss of step 4), and the prediction loss of step 5. The three are weighted and summed to obtain the training loss that guides model optimization: L total =α*L FreqCorr +(1-a)*L TimeCorr +L pred (18) In formula (13), α is the weight of the loss term, which controls the relative size of the two contrast losses; In step 6-2), a dynamic weight update mechanism in the time-frequency domain is set up to adaptively adjust the prediction focus of the model. The update rules for each round are as follows: In formula (19), epoch is the number of training rounds, and the loss item weight α is updated by the relative size ratio of the two losses in the previous round.

Citation Information

Cited By

  • Boundary-guided rolling bearing semi-supervised fault diagnosis method and system

    CN121051573A