Sea surface temperature prediction method and device based on multivariable time series
By building a multivariable time series sea surface temperature prediction model, using Transformer encoder and linear modeling layer to capture the complex characteristics of sea surface temperature data, the problem of insufficient accuracy and robustness of sea surface temperature prediction in the existing technology is solved, and higher prediction accuracy and adaptability are achieved.
Patent Information
- Application Number
- CN202510283087.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-06-10
AI Technical Summary
The prior art is difficult to effectively capture the complex multivariable interaction, non-stationarity and multi-temporal scale characteristics in sea surface temperature data, resulting in insufficient accuracy and robustness of sea surface temperature prediction.
The sea surface temperature prediction method based on multivariate time series is adopted to build a prediction model through variable embedding layer, hysteresis feature embedding layer, Transformer encoder, linear modeling layer, output layer and RevIN modules to capture the nonlinear timing dependence and linear relationship of the data, and deal with non-stationarity problems.
It significantly improves the accuracy and robustness of the sea surface temperature prediction model, can more effectively capture complex multivariable interactions and multi-temporal scale characteristics, and enhances the adaptability to non-stationary data.
Smart Images

Figure CN120123696A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of meteorological and oceanographic data processing and prediction, and in particular to a sea surface temperature prediction method and device based on multivariate time series for predicting the changes in the sea surface temperature of the North Pacific Ocean. Background Art
[0002] As one of the important indicators of the ocean state, the sea surface temperature (SST) not only reflects the thermodynamic characteristics of the ocean surface layer, but is also closely related to climate change, ocean circulation and weather anomalies. Climate patterns such as the El Niño phenomenon, the La Nina phenomenon and the Indian Ocean dipole all take the SST change as a key driving factor, which is of great significance for the long-term prediction of the global weather and climate.
[0003] Ocean data analysis with SST prediction as the core has been widely applied in fields such as climate change assessment, ocean disaster warning, fishery resource management and shipping planning. However, the complexity of ocean data itself, such as non-linearity, multi-temporal and spatial scale correlations and high-noise characteristics, poses a huge challenge to accurate prediction.
[0004] Once upon a time, time series analysis methods were the mainstream tools for SST prediction, including the classical autoregressive integrated moving average (ARIMA) model and the vector autoregressive (VAR) model. These methods model and predict by analyzing the stationary characteristics of time series. However, ocean data often shows significant non-stationarity and non-linear changes, and traditional methods show obvious deficiencies in capturing complex patterns and long-term dependence relationships. In addition, statistical models rely on specific assumptions, such as linear relationships and data distribution characteristics, which limit their application effects in high-dimensional multivariate scenarios.
[0005] Machine learning-based methods, such as support vector machines (SVM) and random forests (RF), have been introduced into the field of SST prediction. These methods improve the expressive ability of the model through non-linear function approximation. However, they have a high dependence on the structure of the input data and usually require manual feature design; and due to the lack of the ability to directly model time dependence relationships, their effects are limited in long-term prediction tasks.
[0006] With the development of deep learning technology, time series analysis methods based on neural networks have gradually shown great potential. Recurrent neural network (RNN) architectures such as long short-term memory networks (LSTM) and gated recurrent units (GRU) have been widely used in time series modeling, which can capture the long-term dependence relationships of data and process non-linear characteristics. However, such methods have problems such as high computational complexity, difficulty in parallelization and insufficient ability to capture long sequence information.
[0007] In recent years, due to its excellent parallel computing ability and the advantage of capturing global dependencies, the Transformer architecture based on the attention mechanism has been introduced into the field of time series analysis. Compared with traditional RNNs, Transformer does not need to process sequence data step by step and can efficiently model global correlations over long time spans, making it particularly suitable for handling high-dimensional multivariate time series. However, in practical applications, Transformer still faces challenges such as overfitting, insufficient multi-scale feature modeling, and poor adaptability to non-stationary data.
[0008] In the prior art, the requirements and difficulties of ocean data prediction are as follows: (1) Modeling of multivariate interaction relationships: SST prediction usually requires joint modeling by combining multiple meteorological factors (such as air pressure, wind speed, humidity). The complex non-linear relationships between these variables increase the modeling difficulty.
[0009] (2) Non-stationarity and noise interference: Ocean data has strong non-stationary and periodic characteristics, and is also accompanied by high noise interference, which poses higher requirements for the robustness of the model.
[0010] (3) Multi-temporal and spatial scale characteristics: The change of SST is affected by multi-temporal and spatial scales of ocean circulation and atmospheric movement, and the model is required to be able to capture both short-term fluctuations and long-term trends simultaneously.
[0011] (4) Data sparsity and imbalance: The spatial distribution of observational data may be uneven, and the data in some areas is sparse or missing, which brings difficulties to model training.
[0012] In view of this, it is necessary to develop a sea surface temperature prediction method and device based on multivariate time series to solve the above problems. Summary of the Invention
[0013] The technical problem to be solved by the present invention is to provide a sea surface temperature prediction method and device based on multivariate time series, which can capture complex time dependencies, enhance the robustness to non-stationary data, and improve the multivariate modeling ability, so that the sea surface temperature prediction model shows higher accuracy and robustness in complex multivariate scenarios.
[0014] To solve the above technical problems, the technical solution adopted by the present invention is: A sea surface temperature prediction method based on multivariate time series, comprising the following steps: Step 1, collect sea surface temperature and meteorological factor data from multi-source observational data in the target area, and preprocess the collected data to obtain cleaned time series data; Step 2, build a sea surface temperature prediction model based on multivariate time series; the sea surface temperature prediction includes a variable embedding layer, a lag feature embedding layer, a Transformer encoder, a linear modeling layer, an output layer, and a RevIN module; The variable embedding layer is used to map the time series data of each sea surface temperature and related meteorological factor variables into a low-dimensional dense vector space, so as to extract the feature information of each variable; The lag feature embedding layer is used to process the constructed lag features, and this layer maps the concatenated lag feature vectors to another dimensional space for subsequent fusion and prediction; The Transformer encoder is used to capture the complex non-linear time series dependencies in the sea surface temperature data; The linear modeling layer is used to extract the linear relationships in the lag features as a supplement to the Transformer encoder; The output layer is used to map the fused feature vectors to the final prediction results; The RevIN module is used to handle the non-stationarity problem of time series; Step 3, use the preprocessed data to train the built sea surface temperature prediction model; Step 4, use the trained sea surface temperature prediction model to predict the daily sea surface temperature for the next 30 days.
[0015] A further improvement of the technical solution of the present invention lies in: in Step 2, when using the multivariate embedding method to extract variable features in the variable embedding layer, it specifically includes: for the input time series data, only model the variables, and adjust the input data structure by permuting the data dimensions, so that the time series data is transformed from a format with time as the main axis to a format with variables as the main axis, strengthening the modeling ability of the relationships between multiple variables; the dimension of the embedded data is: [batch_size, num_vars, d_model].
[0016] A further improvement of the technical solution of the present invention lies in: in Step 2, when the lag feature embedding layer performs feature extraction, first construct a lag window, aggregate historical multi-step data into high-dimensional feature inputs, including short-term lag window features and long-term lag window features, so as to capture multi-scale feature information; specifically including: (1) Set the lag step lag_steps; for the time series of each variable after embedding, extract the data of its past lag_steps time steps as lag features respectively; (2) To ensure the consistency of the input dimension, padding with 0 is performed at the front end of the sequence; then, the lag features of all variables are concatenated to form a feature vector containing rich historical information; this step is achieved through loop traversal and the F.pad function; (3) Subsequently, the linear layer lag_embedding is used to further extract features and reduce the dimension of the concatenated lag features to obtain the final lag feature representation.
[0017] A further improvement of the technical solution of the present invention lies in: in step 2, the Transformer encoder is stacked by multiple encoder layers with the same structure, and each encoder layer includes a multi-head attention mechanism and a feed-forward network, which can perform deep non-linear modeling on the features after variable embedding. Specifically, it includes the following content: The feature representations of each ocean observation variable are used as the input of the Transformer encoder. The multi-head attention mechanism can capture the complex non-linear dependence relationships between different variables, while the feed-forward network further enhances the expression ability of the features; the input of the Transformer encoder is the features after variable embedding, and the output is the encoded feature representation, with the dimension of: [batch_size, num_vars, d_model].
[0018] A further improvement of the technical solution of the present invention lies in: in step 2, the linear modeling layer can perform linear and non-linear modeling on the short-term lag window features and long-term lag window features: the linear modeling part extracts the linear relationship between variables through simple linear transformation, and the non-linear modeling part captures the complex non-linear interaction relationships through a deep learning model based on the attention mechanism; the input of the linear layer is the lag feature representation, and the output dimension is: [batch_size, num_vars, d_model].
[0019] A further improvement of the technical solution of the present invention lies in: in step 2, the output layer fuses the output of the Transformer encoder and the output of the linear modeling layer. The fused feature representation contains both the non-linear interaction information and the linear correlation information of the variables, and can more comprehensively describe the change law of the sea surface temperature; finally, the linear layer output_layer is used to predict the fused features to obtain the final prediction result; the dimension of the prediction result is: [batch_size, num_vars, pred_len] Among them, pred_len represents the predicted future time step, indicating how many time steps in the future the sea surface temperature prediction model predicts the sea surface temperature.
[0020] A further improvement of the technical solution of the present invention lies in: in step 2, when the RevIN module processes the non-stationarity problem of the time series, if use_norm is configured to be True, before the sea surface temperature prediction model makes a prediction, the RevIN module is used to normalize the input data to eliminate the dimensional differences between different variables; after the sea surface temperature prediction model outputs, the RevIN module is used to inverse-normalize the prediction result to restore the predicted value to the original data scale, which is convenient for users to understand and apply; the inverse-normalization operation is implemented by calling self.RevIN(x, mode), where the mode parameter specifies whether to perform normalization (norm) or inverse-normalization (denorm); finally, the prediction result is dimensionally transformed to obtain the final output out of the sea surface temperature prediction model, with the dimension of [batch_size, pred_len, num_vars].
[0021] A computer-readable storage medium stores a computer program thereon, and when the program is executed by a processor, it implements the steps of a sea surface temperature prediction method based on multivariate time series.
[0022] A computing device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the steps of a sea surface temperature prediction method based on multivariate time series. Due to the adoption of the above technical solution, the technical progress achieved by the present invention is: 1. By modeling the multivariate relationships of time series data and processing lag features, the present invention can capture the dynamic change features of data at different time steps, enhance the prediction ability of the sea surface temperature prediction model, and at the same time get rid of the dependence on time features, significantly improving the computing efficiency and prediction accuracy; by combining linear and nonlinear modeling methods, the ability to capture short-term and long-term trends is further optimized, making the sea surface temperature prediction model show higher accuracy and robustness in complex multivariate scenarios.
[0023] 2. By only modeling variables, the present invention gets rid of the dependence of traditional time series models on time features, reduces the interference of redundant information, and significantly improves the modeling efficiency and prediction performance.
[0024] 3. The lag window mechanism in the present invention effectively captures the dynamic features of variables at different time steps, enhances the modeling ability of the sea surface temperature prediction model for short-term and long-term trends, and improves the prediction accuracy and robustness.
[0025] 4. The present invention combines linear and non-linear modeling methods, enabling the sea surface temperature prediction model to capture both linear relationships and complex non-linear interaction relationships simultaneously, thereby improving the adaptability and expressive ability for multivariate data.
[0026] 5. In the sea surface temperature prediction task, the present invention can not only accurately predict the future values of target variables, but also has strong generalization ability, and can be widely applied to climate prediction, disaster warning and other multivariate time series prediction tasks, with important practical value and broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings; Figure 1 is a flowchart of a sea surface temperature prediction method based on multivariate time series provided by an embodiment of the present invention; Figure 2 is a schematic structural diagram of a sea surface temperature prediction model provided by an embodiment of the present invention; Figure 3 is a schematic structural diagram of a variable embedding layer provided by an embodiment of the present invention; Figure 4 is a schematic diagram of constructing lag features provided by an embodiment of the present invention; Figure 5 is a schematic diagram of the prediction output of the sea surface temperature prediction model provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0028] It should be noted that the terms "comprising" and "having" and any variations thereof in the description and claims of the present invention and the above drawings are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0029] The following will further describe the present invention in detail with reference to the drawings and embodiments: As Figure 1 shown, a sea surface temperature prediction method based on multivariate time series includes the following steps: Step 1, Data Preparation Collect historical sea surface temperature data in the North Pacific Ocean and related multi-source observation data, such as meteorological factor data like air pressure and wind speed. Preprocess the collected raw data, including removing outliers, filling in missing values, and performing standardization processing to obtain the cleaned time series data.
[0030] Step 2, build a sea surface temperature prediction model based on multivariate time series; As Figure 2 shown, the sea surface temperature prediction model includes a variable embedding layer (Embedding), a lag feature embedding layer (lag window), a Transformer encoder (including Multivariate Attention, LayerNorm, Feed-forward, LayerNorm), a linear modeling layer (projectio n ), an output layer (output), and a RevIN module for inverse normalization operation. The specific building process is as follows: 2.1, Variable embedding As Figure 2 and Figure 3 shown, in Figure 3 highlights the process of the variable embedding layer extracting features from the input data; for the input time series data x_enc, break the way of the traditional Transformer model modeling the time stamps, and adopt the method of only modeling the variables. The specific content includes the following: (1) Perform a dimensionality transformation on the input time series data, adjust the shape of the data from [batch_size, seq_len, num_vars] to [batch_size, num_vars, seq_len], and this step is achieved through x_enc.permute(0, 2, 1). This way avoids redundant modeling of time information, pays more attention to the interdependence between different ocean observation variables, and improves the learning efficiency of the sea surface temperature prediction model.
[0031] (2) Use the linear layer variable_embedding to embed the time series of each variable (for example, sea surface temperatures at different locations or different meteorological factors), and learn the unique feature representations of each variable. The dimension of the embedded data is [batch_size, num_vars, d_model].
[0032] 2.2, Lag feature construction As Figure 2 and Figure 4 shown, in Figure 4In it, it is shown in detail how to construct lag features containing information from multiple past time steps through a sliding window; in order to effectively capture the temporal dependence relationship of sea surface temperature time series data, a lag window mechanism is introduced. Specifically, it includes: (1) Set the lag step lag_steps. In this embodiment, lag_steps is set to 7. For the time series of each variable after embedding, extract the data of its past lag_steps time steps as lag features. To ensure the consistency of the input dimension, pad 0 at the front end of the sequence.
[0033] (2) Concatenate the lag features of all variables to form a feature vector containing rich historical information. This step is implemented through loop traversal and the F.pad function.
[0034] (3) Use the linear layer lag_embedding to further extract features and reduce the dimension of the concatenated lag features to obtain the final lag feature representation.
[0035] 2.3, Transformer Encoder As Figure 2 shown, it clearly presents that the Transformer encoder includes: Multivariate Attention, LayerNorm, Feed-forward, and LayerNorm; Use the Transformer encoder to perform deep non-linear modeling on the features after variable embedding. Different from the traditional Transformer model, only the feature representations of each ocean observation variable are used as the input of the Transformer encoder, avoiding the interference of timestamp information. The Transformer encoder is stacked by multiple encoder layers with the same structure, and each encoder layer contains a multi-head attention mechanism and a feed-forward network. The multi-head attention mechanism can capture the complex non-linear dependence relationships between different variables, while the feed-forward network further enhances the expression ability of the features. The input of the encoder is the feature after variable embedding, and the output is the encoded feature representation, with the dimension of [batch_size, num_vars, d_model].
[0036] 2.4, Linear Modeling As Figure 2As shown, in order to supplement the Transformer encoder's ability to model linear relationships, a linear modeling layer var_layer is introduced. The linear modeling layer performs a linear transformation on the lag features extracted in step 2.2 to extract simple linear relationships between variables. The input of the linear modeling layer is the lag feature representation, and the output dimension is [batch_size, num_vars, d_model].
[0037] 2.5, Fusion of Prediction and Inverse Normalization As Figure 2 and Figure 5 shown, in order to comprehensively utilize the advantages of linear modeling and non-linear modeling, the output of the Transformer encoder and the output of the linear modeling layer are fused. In this embodiment, a simple addition fusion method is adopted. The fused feature representation contains both the non-linear interaction information and the linear correlation information of the variables, and can more comprehensively describe the variation law of sea surface temperature.
[0038] Finally, use the linear modeling layer output_layer to predict the fused features to obtain the final prediction result. The dimension of the prediction result is [batch_size, num_vars, pred_len], where pred_len is the prediction step, representing how many time steps in the future the sea surface temperature prediction model predicts the sea surface temperature.
[0039] Considering the possible non-stationarity of the sea surface temperature data, in order to improve the stability and prediction accuracy of the sea surface temperature prediction model, the RevIN module is used for inverse normalization operations. If the configuration use_norm is True, then before the sea surface temperature prediction model makes a prediction, the RevIN module is used to normalize the input data to eliminate the dimensional differences between different variables. After the sea surface temperature prediction model outputs, the RevIN module is used to perform inverse normalization on the prediction result to restore the predicted value to the original data scale for easy understanding and application by users. The inverse normalization operation is achieved by calling self.RevIN(x, mode), where the mode parameter specifies whether to perform normalization (norm) or inverse normalization (denorm).
[0040] Perform a dimension transformation on the prediction result to obtain the final output out of the sea surface temperature prediction model, with the dimension [batch_size, pred_len, num_vars].
[0041] The structure of the sea surface temperature prediction model is described in detail as follows: As Figure 2As shown in the figure, the core components of the sea surface temperature prediction model proposed by the present invention for predicting the sea surface temperature in the North Pacific Ocean include: (1) Variable embedding layer: This is a linear layer, whose function is to map the time series data of each sea surface temperature and related meteorological factor variables into a low-dimensional dense vector space, so as to extract the characteristic information of each variable. The input dimension of this layer is configs.seq_len, and the output dimension is configs.d_model.
[0042] (2) Lag feature embedding layer: This is also a linear layer, which is used to process the constructed lag features. This layer maps the concatenated lag feature vectors into another dimensional space for subsequent fusion and prediction. The input dimension is configs.enc_in * self.lag_steps, and the output dimension is configs.d_model * self.lag_steps.
[0043] (3) Transformer encoder: This encoder is the core component of the sea surface temperature prediction model, which is used to capture the complex non-linear time series dependence relationships in the sea surface temperature data. It is stacked by num_layers encoder_layers. Each encoder_layer mainly includes a multi-head self-attention mechanism module and a feed-forward network module.
[0044] (4) Linear modeling layer: This layer is a simple linear layer, which is used to extract the linear relationships in the lag features as a supplement to the Transformer encoder. Its input dimension is configs.d_model * self.lag_steps, and the output dimension is configs.d_model.
[0045] (5) Output layer: This is a linear layer, which is used to map the fused feature vectors to the final prediction results. Its input dimension is configs.d_model, and the output dimension is configs.pred_len.
[0046] (6) RevIN module: This is an optional reverse normalization module, which is used to handle the non-stationarity problem of time series. When configs.use_norm is set to True, this module will normalize the data before it is input into the sea surface temperature prediction model and perform reverse normalization after the sea surface temperature prediction model outputs.
[0047] The present invention breaks the advantages of traditional Transformer models in timestamp modeling: Traditional time series Transformer models usually encode timestamp information as additional features, which increases the complexity and computational cost of the model to a certain extent. This invention draws on the idea of iTransformer and innovatively models only variables, that is, directly takes different sea surface temperature and meteorological factor variables as the input of the sea surface temperature prediction model, and focuses the attention mechanism of the sea surface temperature prediction model on learning the mutual relationships between different variables through the permute operation, avoiding redundant encoding of timestamp information, thus simplifying the structure of the sea surface temperature prediction model and improving the training efficiency and prediction speed of the sea surface temperature prediction model.
[0048] The role of the lag window mechanism in this invention: The introduction of the lag window mechanism enables the sea surface temperature prediction model to effectively capture the temporal dependence relationships in the sea surface temperature time series data. By constructing lag features containing information of multiple past time steps, the sea surface temperature prediction model can learn the short-term and long-term trends of sea surface temperature changes, thus predicting the future sea surface temperature more accurately.
[0049] The significance of the fusion of linear modeling and non-linear modeling in this invention: This invention combines the non-linear modeling ability of the Transformer encoder and the linear modeling ability of the linear modeling layer. The Transformer encoder can effectively capture the complex non-linear interaction relationships in the sea surface temperature data, while the linear modeling layer can extract the simple linear trends in the lag features. By fusing the outputs of the two, the sea surface temperature prediction model can learn the change rules of the sea surface temperature more comprehensively, improving the prediction accuracy and robustness.
[0050] The input and output of the sea surface temperature prediction model in this invention: The input of the sea surface temperature prediction model includes the encoder input x_enc. The shape of x_enc is [batch_size, seq_len, num_vars], where batch_size represents the batch size, seq_len represents the length of the input sequence, and num_vars represents the number of variables (i.e., the quantity of sea surface temperature and related meteorological factors). The shape of the output out of the sea surface temperature prediction model is [batch_size, pred_len, num_vars], where pred_len represents the number of future time steps for prediction.
[0051] Step 3: Use the preprocessed data to train the constructed sea surface temperature prediction model; Step 4: Use the trained sea surface temperature prediction model to predict the daily sea surface temperature for the next 30 days.
[0052] Specifically, taking the prediction of sea surface temperature in a certain sea area of the North Pacific as an example, assume that the sea surface temperature for the next 30 days needs to be predicted. First, collect the daily sea surface temperature data of this sea area in the past 10 years and the data of meteorological factors such as air pressure, wind speed, and humidity during the same period. Preprocess the collected data, including outlier processing, missing value filling, and standardization. Then, input the preprocessed data into the established sea surface temperature prediction model for training. The sea surface temperature prediction model learns the potential relationship between different meteorological factors and sea surface temperature through the variable embedding layer, captures the time dependence through the lag window mechanism, and learns the complex pattern of sea surface temperature change through the Transformer encoder and the linear modeling layer. After training, the sea surface temperature prediction model can be used to predict the daily sea surface temperature for the next 30 days.
[0053] A computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the steps of the above-mentioned method for predicting sea surface temperature based on multivariate time series.
[0054] A computing device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, it implements the steps of the above-mentioned method for predicting sea surface temperature based on multivariate time series.
[0055] In summary, the method and device for predicting sea surface temperature based on multivariate time series provided by the present invention collect sea surface temperature and related meteorological factor data from multi-source observation data; preprocess the collected data; extract variable features using the multivariate embedding method and combine historical lag step features as input; use the sequence modeling module based on the Transformer architecture to encode the input features to capture the multivariate interaction relationship and time correlation; perform normalization and denormalization processing on non-stationary data through the inverse normalization module; and finally output the predicted value of the future sea surface temperature through the fully connected layer. The present invention can effectively capture the non-linear dynamic change of the sea surface temperature, significantly improve the prediction accuracy. The experimental results show that the present invention has a significant effect of reducing errors compared with traditional methods in the task of predicting the sea surface temperature in the North Pacific and has good application prospects.
[0056] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A sea surface temperature prediction method based on multivariate time series, characterized in that: The following steps are involved: Step 1: collect sea surface temperature and meteorological factor data from multi-source observation data in the target area, and pre-process the collected data to obtain cleaned time series data; Step 2, building a sea surface temperature prediction model based on multivariate time series; the sea surface temperature prediction includes a variable embedding layer, a lagged feature embedding layer, a Transformer encoder, a linear modeling layer, an output layer and a RevIN module; The variable embedding layer is used to map the time series data of each sea surface temperature and related meteorological factor variables into a low-dimensional dense vector space, so as to extract the characteristic information of each variable; The lag feature embedding layer is used to process the constructed lag features, and the layer maps the concatenated lag feature vectors to another dimensional space for subsequent fusion and prediction; The Transformer encoder is used to capture the complex nonlinear temporal dependencies in the sea surface temperature data; The linear modeling layer is used to extract linear relationships in lagged features as a complement to the Transformer encoder; The output layer is used to map the fused feature vector to the final prediction result; The RevIN module is used to deal with the non-stationary problem of time series; Step 3: Use the preprocessed data to train the constructed sea surface temperature prediction model; Step 4: Use the trained sea surface temperature prediction model to predict the daily sea surface temperature for the next 30 days.
2. A method for predicting sea surface temperature based on multivariate time series according to claim 1, characterized in that: In step 2, when the variable embedding layer uses a multivariate embedding method to extract variable features, it specifically includes: for the input time series data, only the variables are modeled, and the input data structure is adjusted by replacing the data dimension method, so that the time series data is converted from a format with time as the main axis to a format with variables as the main axis, thereby strengthening the modeling ability of the relationship between multiple variables; the data dimension after embedding is: [batch_size, num_vars, d_model].
3. A method for predicting sea surface temperature based on multivariate time series according to claim 1, characterized in that: In step 2, when performing feature extraction, the lag feature embedding layer first constructs a lag window and aggregates historical multi-step data into high-dimensional feature input, including short-term lag window features and long-term lag window features, thereby capturing multi-scale feature information; Specifically include: (1) Set the lag step length lag_steps; for each time series of the embedded variable, extract the data of the past lag_steps time steps as the lag features; (2) To ensure the consistency of the input dimension, pad the front end of the sequence with 0. Then, concatenate the lagged features of all variables to form a feature vector containing rich historical information. This step is achieved through loop traversal and the F.pad function. (3) Subsequently, the linear layer lag_embedding is used to perform further feature extraction and dimensionality reduction on the concatenated lag features to obtain the final lag feature representation.
4. The method for predicting sea surface temperature based on multivariate time series according to claim 1, characterized in that: In step 2, the Transformer encoder is composed of multiple encoder layers with the same structure. Each encoder layer contains a multi-head attention mechanism and a feedforward network, which can perform deep nonlinear modeling on the features after variable embedding, including the following: The feature representation of each ocean observation variable is used as the input of the Transformer encoder. The multi-head attention mechanism can capture the complex nonlinear dependencies between different variables, and the feedforward network further improves the expressiveness of the features. The input of the Transformer encoder is the embedded features of the variables, and the output is the encoded feature representation, with a dimension of:. [batch_size, num_vars, d_model].
5. The method for predicting sea surface temperature based on multivariate time series according to claim 1, characterized in that: In step 2, the linear modeling layer can perform linear modeling and nonlinear modeling on the short-term lag window features and the long-term lag window features: the linear modeling part extracts the linear relationship between variables through a simple linear transformation, and the nonlinear modeling part captures the complex nonlinear interaction relationship through a deep learning model based on the attention mechanism; the input of the linear layer is the lag feature representation, and the output dimension is: [batch_size, num_vars, d_model].
6. The method for predicting sea surface temperature based on multivariate time series according to claim 1, characterized in that: In step 2, the output layer fuses the output of the Transformer encoder and the output of the linear modeling layer. The fused feature representation contains both the nonlinear interaction information and the linear correlation information of the variables, which can more comprehensively describe the variation of the sea surface temperature. Finally, the linear layer output_layer is used to predict the fused features to obtain the final prediction result. The dimension of the prediction result is: [batch_size, num_vars, pred_len] Among them, pred_len represents the predicted future time step, which means how many future time steps the sea surface temperature prediction model predicts the sea surface temperature.
7. The method for predicting sea surface temperature based on multivariate time series according to claim 1, characterized in that: In step 2, when the RevIN module handles the non-stationary problem of time series, if use_norm is configured as True, the RevIN module is used to normalize the input data before the sea surface temperature prediction model predicts to eliminate the dimensional differences between different variables; after the sea surface temperature prediction model outputs, the RevIN module is used to inverse normalize the prediction results to restore the predicted values to the original data scale for easy user understanding and application; the inverse normalization operation is implemented by calling self.RevIN(x, mode), where the mode parameter specifies whether to perform normalization (norm) or inverse normalization (denorm); finally, the prediction results are transformed in dimension to obtain the final output out of the sea surface temperature prediction model, with the dimension [batch_size, pred_len, num_vars].
8. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a method for predicting sea surface temperature based on multivariate time series as described in any one of claims 1 to 7.
9. A computing device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of a sea surface temperature prediction method based on multivariate time series as described in any one of claims 1 to 7 when executing the computer program.
Citation Information
Cited By
Seawater state multi-factor forecasting method based on mixed attention mechanism
CN120850015A
Data processing method and system based on multi-granularity sliding time window
CN121456326A
Double-branch two-stage sea surface temperature forecasting method based on multi-element input
CN121997031A
