A two-branch two-stage sea surface temperature prediction method based on multi-element input
By constructing a dual-branch collaborative optimization deep learning model that includes short-term and medium-to-long-term branches, and combining ConvGRU and Transformer encoders, the problems of insufficient feature extraction capability and error accumulation in ocean surface temperature forecasting are solved, and high-precision and stable ocean surface temperature forecasting is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- FIRST INSTITUTE OF OCEANOGRAPHY MNR
- Filing Date
- 2026-04-07
- Publication Date
- 2026-05-29
AI Technical Summary
Existing ocean surface temperature forecasting methods have limited feature extraction capabilities and insufficient model generalization performance when faced with high-dimensional, strongly nonlinear, and strongly spatiotemporally coupled ocean data, making it difficult to meet the requirements for high-precision forecasting. Furthermore, medium- and long-term forecasts suffer from error accumulation problems, making it difficult to meet the stability and reliability requirements of practical operational applications.
A two-branch, two-stage sea surface temperature forecasting method based on multi-factor input is adopted, including a short-term forecast branch and a medium- to long-term forecast branch. The short-term branch extracts spatiotemporal features through ConvGRU and an improved multi-scale spatiotemporal information fusion module, while the medium- to long-term branch constructs adaptive weighted multi-source variables and long-distance spatiotemporal dependency modeling through a Transformer encoder. The two branches are co-optimized to suppress error accumulation.
It achieves complementary advantages between short-term and medium-to-long-term forecasts, significantly improves the accuracy and stability of sea surface temperature forecasts, suppresses error accumulation, enhances the adaptability and robustness of the model, reduces computational resource consumption, and improves forecast accuracy and reliability.
Smart Images

Figure CN121997031B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of marine environmental forecasting technology, and in particular to a two-branch, two-stage sea surface temperature forecasting method based on multi-factor input. Background Technology
[0002] The ocean is a resource reservoir and ecological cornerstone supporting human sustainable development. Sea surface temperature (SST), as a key parameter characterizing energy exchange between the ocean and the atmosphere, can significantly impact global climate, natural disasters, and marine ecosystems even with minor anomalies. Accurate SST forecasting not only enhances disaster prevention and mitigation capabilities but also provides a scientific basis for decision-making in marine economic activities such as fisheries and shipping, which is of great significance for the rational development of marine resources, safeguarding maritime rights, and promoting high-quality development.
[0003] Currently, SST forecasting methods can be mainly divided into physical mechanism-based numerical modeling methods and data-driven methods based on historical observations. Numerical modeling methods are based on the dynamics and thermodynamics of the ocean-atmosphere system, simulating energy and matter exchange processes by solving complex partial differential equations, and have clear physical mechanism support. However, these methods are computationally expensive, highly sensitive to initial conditions and parameter settings, and their root mean square error (RMSE) has long remained between 0.6℃ and 1.0℃, facing a significant bottleneck in accuracy improvement. In contrast, data-driven methods construct forecasting models by mining statistical patterns in historical observation data, offering high computational efficiency and flexible implementation paths. However, traditional data-driven algorithms (such as Markov models and Bayesian algorithms) have limited feature extraction capabilities and insufficient model generalization performance when dealing with high-dimensional, strongly nonlinear, and strongly spatiotemporally coupled ocean data, making it difficult to meet the requirements of high-precision forecasting.
[0004] With the rapid development of deep learning technology, it has shown significant advantages in automatic feature extraction, complex nonlinear modeling, and spatiotemporal pattern recognition, providing a new technical path to overcome the bottleneck of SST forecast accuracy. Intelligent SST forecasting methods based on convolutional neural networks, recurrent neural networks, and their variants have gradually become an important research hotspot in the interdisciplinary field of marine science and artificial intelligence.
[0005] However, due to the complex structure of monsoon systems and ocean currents, as well as multi-scale interactions, the marine environment is highly non-stationary, and conventional deep learning methods still face challenges in terms of accuracy and adaptability. Existing research largely focuses on single-variable SST forecasts, neglecting the coupling relationships between SST and various ocean-atmosphere elements such as nearshore air temperature (T2m) and sea level pressure (MSL), thus limiting the model's ability to characterize complex physical processes. Furthermore, existing methods generally suffer from error accumulation when dealing with medium- and long-term forecasting tasks, leading to a significant decrease in forecast accuracy as the forecast duration increases, making it difficult to meet the stability and reliability requirements of practical operational applications for medium- and long-term forecasts.
[0006] Therefore, it is necessary to further explore ocean-atmosphere multi-element joint forecasting methods based on deep learning. By integrating multi-source and multi-variable information, introducing attention mechanisms and efficient feature extraction structures, we can construct an SST forecasting framework that takes into account both global evolution patterns and regional local characteristics. Furthermore, we can design differentiated modeling strategies for the different characteristics of short-term and medium- to long-term forecasts to effectively suppress error accumulation and achieve a synergistic improvement in the accuracy and stability of SST forecasts. Summary of the Invention
[0007] To address the aforementioned technical problems, this invention provides a two-branch, two-stage sea surface temperature forecasting method based on multi-factor input, aiming to synergistically improve the accuracy and stability of sea surface temperature forecasts in the medium and long term, and effectively suppress error accumulation in autoregressive rolling forecasts.
[0008] To achieve the above objectives, the technical solution of the present invention is as follows:
[0009] A two-branch, two-stage sea surface temperature forecasting method based on multi-factor input includes the following steps:
[0010] Step S1: Obtain ocean-atmosphere multi-element reanalysis data of the target sea area, perform preprocessing, and construct a training dataset; the multi-element reanalysis data includes sea surface temperature, 2-meter temperature, and solar radiation incident at the top of the atmosphere;
[0011] Step S2: Construct a dual-branch collaborative optimization deep learning model, which includes a short-term forecast branch and a medium- to long-term forecast branch. The short-term forecast branch is used to extract spatiotemporal features from the input sea surface temperature data and generate the sea surface temperature forecast result for the first time period. The medium- to long-term forecast branch is used to generate the sea surface temperature forecast result for the second time period based on adaptive weighted multi-source variables and long-distance spatiotemporal dependency modeling. The first time period is adjacent to the second time period, and the second time period is longer.
[0012] Step S3: Train the model using the training dataset;
[0013] Step S4: Input the multi-factor reanalysis data from several consecutive days before the forecast time into the trained model, generate the sea surface temperature forecast result for the first time period through the short-term forecast branch, and generate the sea surface temperature forecast result for the second time period through the medium- and long-term forecast branch.
[0014] In the above scheme, the short-term forecast branch is composed of a front-end ConvGRU, a multi-scale spatial information fusion module, a feature splicing and fusion unit, and a rear-end ConvGRU connected in sequence.
[0015] The pre-convGRU is used to extract preliminary time series features;
[0016] The multi-scale spatial information fusion module is a four-branch parallel three-dimensional convolutional structure, and each convolutional layer is followed by a BN layer and a ReLU activation function to extract multi-scale spatial features.
[0017] The feature splicing and fusion unit is used to splice and fuse the preliminary time series features and the multi-scale spatial features in the channel dimension;
[0018] The post-convGRU is used for time-series dynamic modeling, enhancing the time-dependent characterization of sea surface temperature evolution.
[0019] In a further technical solution, the multi-scale spatial information fusion module includes four branches:
[0020] The first branch uses a 1×1×1 three-dimensional convolutional layer to capture small-scale features and preserve high-resolution details;
[0021] The second branch uses a 3×3×3 three-dimensional convolutional layer to enhance the ability to represent local features and expand the channel dimension;
[0022] The third branch sequentially connects a 1×1×1 three-dimensional convolutional layer and a 3×3×3 three-dimensional convolutional layer, first expanding the dimensions and then extracting the mesoscale features;
[0023] The fourth branch sequentially connects a 1×1×1 three-dimensional convolutional layer and two cascaded 3×3×3 three-dimensional convolutional layers to construct a large-scale receptive field to capture complex spatial patterns.
[0024] In the above scheme, the medium- and long-term forecast branch includes an adaptive multi-scale spatiotemporal information fusion module, an encoder, and a decoder connected in sequence;
[0025] The adaptive multi-scale spatiotemporal information fusion module is used to perform channel adaptive weighting on the input multi-element spatiotemporal sequence, and then extract multi-scale spatial features and temporal dynamic features through the multi-scale spatial information fusion module and ConvGRU respectively, and fuse them in the channel dimension to obtain spatiotemporal fusion features.
[0026] The encoder is used to superimpose spatiotemporal encoding on the spatiotemporal fusion features to obtain enhanced spatiotemporal fusion features; a reshaping layer flattens the two-dimensional spatial features corresponding to each time step of the enhanced spatiotemporal fusion features into a one-dimensional feature vector to obtain a feature sequence across time and space; a fully connected layer unifies the channel dimension of the feature sequence to a preset embedding dimension; the dimension-unified feature sequence is input into a Transformer encoder, and after processing by a preset number of Transformer encoder layers, a high-level spatiotemporal representation is output.
[0027] The decoder is used to extract the feature vector of the final time step from the high-level spatiotemporal representation, reconstruct it into a two-dimensional spatial structure, and regress it to obtain the sea surface temperature forecast result for a single channel.
[0028] In a further technical solution, in the adaptive multi-scale spatiotemporal information fusion module, before entering the multi-scale spatial information fusion module and ConvGRU, the input tensor is processed. X Introduce trainable channel weights The weight allocation is obtained by applying nonnegativity constraints. The contribution ratio of each ocean-atmosphere variable is dynamically adjusted, as shown in the following formula:
[0029] ;
[0030] Where ReLU represents the ReLU activation function; c The number of input variables, i.e., the number of channels; Indicates channel c The weights;
[0031] The weighted feature X′ is represented as:
[0032] ;
[0033] in, Represents a multi-factor input tensor; The weighted tensor at time t represents The element value at that position, h Indicates the number of grid points in the latitudinal direction. w Indicates the number of meridional grid points;
[0034] The output of the adaptive multi-scale spatiotemporal information fusion module is as follows:
[0035] ;
[0036] in, This represents the output of the adaptive multi-scale spatiotemporal information fusion module; This indicates a multi-scale spatial information fusion module. This indicates a splicing operation along the channel dimension.
[0037] In a further technical solution, the spatiotemporal coding is composed of a superposition of time coding and spatial location coding, used to enhance the ability to distinguish between different time steps and different spatial locations, as shown in the following formula:
[0038] ;
[0039] ;
[0040] in, This serves as the initial spatiotemporal encoding; Encode for time; Encoding for space; This represents the output of the adaptive multi-scale spatiotemporal information fusion module. This is the final spatiotemporal encoding.
[0041] In a further technical solution, the Transformer encoder includes a multi-head self-attention mechanism and a feedforward neural network layer;
[0042] The multi-head self-attention mechanism is used to generate query vector, key vector and value vector respectively by linear projection of input feature sequence, and divide attention calculation into multiple parallel attention heads. Scaled dot product attention is calculated in each attention head, and then the outputs of all attention heads are concatenated along the feature dimension and mapped through the output projection matrix to obtain the attention output.
[0043] The feedforward neural network layer is used to sequentially pass the attention output through the first fully connected layer for dimensional expansion, nonlinear transformation of the activation function, and mapping it back to the preset embedding dimension through the second fully connected layer to obtain the feedforward output;
[0044] The multi-head self-attention mechanism and the feedforward neural network layer are combined with residual connections and layer normalization, respectively, to stabilize the training process and preserve the original feature information.
[0045] In a further technical solution, the decoder is specifically used for:
[0046] Receive the high-level spatiotemporal representation output by the encoder;
[0047] The feature vector of the final time step in the high-level spatiotemporal representation is extracted through the Lambda layer and used as the state feature vector.
[0048] The state feature vector is sequentially input into a fully connected layer for dimensionality expansion, a reshaping layer to restore the two-dimensional spatial structure, and a 1×1 convolutional layer for regression, finally outputting a single-channel sea surface temperature forecast result; the decoder formula is as follows:
[0049] ;
[0050] In the formula, This represents the final single-channel sea surface temperature forecast result; Represents the remodeling layer; This represents the feature vector at the final time step obtained after processing by the Lambda layer. This is represented by the weight matrix of the fully connected layer. Represents the bias term; This represents a 1×1 convolution.
[0051] In the above plan, the first period is 1-10 days, and the second period is 11-30 days.
[0052] In the above scheme, steps S3 and S4 use an autoregressive rolling forecast method to generate sea surface temperature forecasts for the next few days, specifically including:
[0053] Using time series data for a first preset number of consecutive days as input, predict the SST result for the next day;
[0054] The predicted SST result for the next day is added to the end of the time series data, and the data for the first day is removed from the time series data to form a new time series data for a continuous first preset number of days.
[0055] Using the new consecutive first preset number of days of time series data as input, predict the SST result for the next day;
[0056] Repeat the above steps in a loop until an SST forecast result for the second preset number of days in the future is generated.
[0057] Through the above technical solution, the dual-branch two-stage sea surface temperature forecasting method based on multi-factor input provided by the present invention has the following beneficial effects:
[0058] 1. This invention achieves complementary advantages between short-term and medium-to-long-term forecasts by constructing a dual-branch collaborative optimization deep learning model that includes short-term and medium-to-long-term forecast branches. The short-term forecast branch adopts a structure combining ConvGRU and an improved multi-scale spatiotemporal information fusion module, which can efficiently extract high-precision short-term spatiotemporal features and provide a high-quality initial field for medium-to-long-term forecasts. The medium-to-long-term forecast branch is built based on a Transformer encoder and effectively captures the evolution of sea surface temperature over long time scales through adaptive weighted multi-source variable and long-distance spatiotemporal dependency modeling. The two branches operate collaboratively within an autoregressive rolling forecast framework, significantly suppressing the error accumulation problem common in traditional methods and achieving a synergistic improvement in the accuracy and stability of sea surface temperature forecasts.
[0059] 2. This invention designs an improved multi-scale spatiotemporal information fusion module in the short-term forecast branch. By concatenating and fusing the temporal features extracted by ConvGRU with the multi-scale spatial features extracted by the multi-scale spatial information fusion module along the channel dimension, deep fusion of spatiotemporal features is achieved. The multi-scale spatial information fusion module adopts a parallel structure with four branches, using three-dimensional convolution kernels of different scales, such as 1×1×1 convolution, 3×3×3 convolution, and cascaded convolution. This enables the simultaneous capture of small-scale detailed features, mesoscale structural features, and large-scale global features, effectively improving the model's ability to characterize the multi-scale spatiotemporal variation of sea surface temperature.
[0060] 3. This invention designs an adaptive multi-scale spatiotemporal information fusion module in the medium- and long-term forecasting branch. By introducing trainable channel weights and applying non-negative constraints to the weights, it achieves adaptive learning of the contribution levels of multi-source ocean-atmosphere variables. This mechanism can dynamically amplify variable channels with significant contributions and suppress redundant or noisy channels, effectively solving the problem of unbalanced contributions from multi-source data and improving the adaptability and robustness of multi-source information fusion.
[0061] 4. In the medium- and long-term forecast branch, this invention employs a Transformer encoder to construct a global spatiotemporal dependency modeling module. It establishes global correlations across time and space through a multi-head self-attention mechanism and enhances the model's ability to distinguish between different time steps and spatial locations by combining spatiotemporal coding. This design enables the model to capture long-distance spatiotemporal dependencies over longer time scales and larger spatial ranges, effectively ensuring the stability of medium- and long-term forecasts.
[0062] 5. Through correlation analysis and ablation experiments, this invention selects three key ocean-atmosphere variables—sea surface temperature, 2-meter temperature, and solar radiation incident at the top of the atmosphere—as inputs. While ensuring forecast accuracy, it achieves feature dimensionality reduction, effectively reducing computational resource consumption, lowering model complexity, mitigating the risk of overfitting, and improving the model's generalization ability.
[0063] 6. Experimental results show that the method of this invention outperforms existing ConvLSTM and ConvGRU models in 1- to 30-day sea surface temperature forecasts for the target sea area, with superior root mean square error (RMSE) and anomaly correlation coefficient (ACC). In the 30-day medium- to long-term forecast, the RMSE reaches 0.508℃, lower than the industry benchmark of 0.6℃, and the ACC reaches 0.823, significantly higher than the practical threshold of 0.6. 2 The accuracy reached 0.805. The spatial error distribution was uniform, and the scattered points were highly clustered along the ideal diagonal, confirming that the method of this invention has excellent temporal stability and spatial consistency, providing more accurate and efficient technical support for marine resource development, disaster prevention and mitigation, and climate change research. Attached Figure Description
[0064] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0065] Figure 1 This is a flowchart of a two-branch, two-stage sea surface temperature forecasting method based on multi-factor input disclosed in an embodiment of the present invention.
[0066] Figure 2 A heatmap of the correlation coefficient matrix;
[0067] Figure 3 Plot showing the changes in RMSE of SST forecasts under univariate and multivariate inputs;
[0068] Figure 4 The mid- to long-term SST prediction performance of the MFDNet model under different input schemes is shown in the figure.
[0069] Figure 5 To optimize the deep learning model graph for dual-branch collaborative optimization;
[0070] Figure 6 This is a branch diagram for short-term forecasts;
[0071] Figure 7 This is a branch diagram for medium- and long-term forecasts. Detailed Implementation
[0072] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0073] This invention provides a two-branch, two-stage sea surface temperature forecasting method based on multi-factor input, such as... Figure 1As shown below, the process will be explained in detail from four aspects: data preprocessing, model building, model training, and rolling forecasting.
[0074] Step S1: Data Acquisition and Preprocessing
[0075] First, ocean-atmosphere multi-element reanalysis data are acquired for the target sea area. In one specific embodiment, the target sea area ranges from 0°N to 23°N and from 103°E to 121°E. The data comes from the ERA5 reanalysis dataset. This invention uses the following 16 ERA5 meteorological variables: SST (sea surface temperature), 2-meter temperature (T2m), 2-meter dewpoint temperature (D2m), 10-meter wind components (U10 / V10), mean sea level pressure (MSL), TOA incident solar radiation (TISR), mean surface sensible heat flux (MSSHF), surface latent heat flux (SLHF), total cloud cover (TCC), surface net solar radiation (SSR), total precipitation (TP), surface net thermal radiation (STR), clear sky surface net solar radiation (SSRC), and downward surface solar radiation (SSR). Radiation Downwards (SSRD) and Cloud Base Height (CBH). The time range is from January 1, 2014 to December 31, 2023, a total of 10 years, with hourly temporal resolution and spatial resolution of 0.25° × 0.25°.
[0076] To improve model efficiency and reduce noise, the original data is preprocessed as follows:
[0077] (1) Daily average calculation: Take the average of the 24-hour data of each day and convert it into daily average data.
[0078] (2) Unit conversion and data type conversion: convert Kelvin temperature to Celsius and convert all data to floating point type.
[0079] (3) Missing value handling: assign 0 to missing values in land areas and data.
[0080] (4) Normalization: Before splitting the dataset, normalize the data to the range of [0, 1] to accelerate model convergence.
[0081] (5) Data set partitioning: The data is divided into training set, validation set and test set in a ratio of 7:2:1.
[0082] (6) Input and output format definition: The input data dimension of the model is [batch size, time step, latitude, longitude, number of features], and the label data dimension is [batch size, latitude, longitude, number of features].
[0083] In a preferred embodiment, not all variables are used as model inputs. First, a Pearson correlation analysis is performed on all variables to calculate the correlation coefficient between each variable and sea surface temperature. The formula is as follows:
[0084] ;
[0085] In the formula, Indicates at grid points Variable x and y The Pearson correlation coefficient between them; t =1,…,T represents the time step index, and T represents the total time step length, where T=50 days; and Representing variables respectively x and y In time t and spatial location The observed values; and Representing variables x and y At grid points The average time value.
[0086] like Figure 2 As shown, the results indicate that the absolute values of the Pearson correlation coefficients between sea surface temperature, 2-meter temperature, 2-meter dew point temperature, mean sea level pressure, solar radiation incident at the top of the atmosphere, net solar radiation at the surface under clear skies, 10-meter wind speed component U10, 10-meter wind speed component V10, and wind speed magnitude and SST are all greater than 0.3. Based on the above correlation analysis, this invention selects SST, T2m, D2m, MSL, TISR, SSRC, U10, V10, and Wind_10 as candidate input variables.
[0087] Furthermore, ablation experiments were conducted to determine the optimal input variables.
[0088] (a) Variable ablation
[0089] To address the input optimization requirements of the long-term forecast branch in the MFDNet model, this invention conducted ablation experiments with multiple combinations of variables (results are shown in...). Figure 3 The RMSE changes of various input schemes under different forecast durations were compared to screen key variable combinations that can effectively suppress error accumulation in the mid-to-late stages while balancing accuracy and stability. Based on the experimental results, the mid-to-long-term branch should prioritize ensuring stability in the later stages of the forecast. Ultimately, the combinations SST+T2m+TISR and SST+T2m+Wind_10 were determined as the optimal input schemes for the mid-to-long-term forecast branch, and subsequent branch ablation experiments were conducted accordingly.
[0090] (b) Branch ablation
[0091] To verify the effectiveness of the MFDNet dual-branch model in medium- to long-term SST forecasts, this invention conducts branch ablation experiments, comparing the RMSE performance of using only short-term branches, only medium- to long-term branches, and the dual-branch model (MFDNet) at different forecast durations. The results are evaluated using two medium- to long-term input schemes: SST+T2m+TISR and SST+T2m+Wind_10. Figure 4 As shown, the results indicate that MFDNet inherits the low error advantage of the short-term branch in the early stages of forecasting, and exhibits a lower error growth rate in the middle and later stages, demonstrating that dual-branch fusion can effectively suppress error accumulation. Among the two input schemes, SST+T2m+TISR performs better overall, especially in the later stages of forecasting with stronger stability: its 30-day RMSE is 0.508, which is about 9.8% lower than SST+T2m+Wind_10's 0.558. In summary, the branch ablation experiment verifies the effectiveness of the MFDNet dual-branch architecture, and SST+T2m+TISR can be used as an input combination for subsequent experiments.
[0092] Therefore, the core input variables of the final model are: sea surface temperature, 2-meter temperature, and solar radiation incident at the top of the atmosphere.
[0093] Step S2: Construct a dual-branch collaborative optimization deep learning model
[0094] This step constructs a two-branch collaborative optimization deep learning model named MFDNet. For example... Figure 5 As shown, the model includes a short-term forecast branch and a medium- to long-term forecast branch.
[0095] 1. Construction of Short-Term Forecast Branch
[0096] like Figure 6As shown, the short-term forecast branch is used to forecast SST for the next 1-10 days. Its structure is: front-end ConvGRU - multi-scale spatial information fusion module - feature splicing and fusion unit - back-end ConvGRU.
[0097] Front-end ConvGRU: Receives input data and is used to extract preliminary time series features.
[0098] Multi-scale spatial information fusion module: Employs a four-branch parallel 3D convolutional structure, with each convolutional layer followed by a batch normalization (BN) layer and a ReLU activation function. Specifically:
[0099] First branch: Use a 1×1×1 three-dimensional convolutional layer to capture small-scale features.
[0100] The second branch uses a 3×3×3 three-dimensional convolutional layer to enhance local features.
[0101] The third branch: sequentially connects 1×1×1 and 3×3×3 three-dimensional convolutional layers to extract mesoscale features.
[0102] The fourth branch: sequentially connects 1×1×1 and two cascaded 3×3×3 three-dimensional convolutional layers to construct a large-scale receptive field.
[0103] Feature splicing and fusion unit: splices the temporal features output by the front-end ConvGRU with the spatial features output by the multi-scale spatial information fusion module in the channel dimension.
[0104] Post-convGRU: Performs temporal dynamic modeling on the fused features, and finally outputs SST prediction results for 1-10 days through a 1×1 convolutional layer.
[0105] 2. Construction of medium- and long-term forecast branches
[0106] like Figure 7 As shown, the medium- and long-term forecast branch is used to forecast SST for the next 11-30 days. Its structure includes an adaptive multi-scale spatiotemporal information fusion module, an encoder, and a decoder connected in sequence.
[0107] (1) Adaptive multi-scale spatiotemporal information fusion module
[0108] First, before entering the multi-scale spatial information fusion module and ConvGRU, the input tensor is processed. X Introduce trainable channel weights The weight allocation is obtained by applying nonnegativity constraints. The contribution ratio of each ocean-atmosphere variable is dynamically adjusted, as shown in the following formula:
[0109] ;
[0110] Where ReLU represents the ReLU activation function; c The number of input variables, i.e., the number of channels; Indicates channel c The weights;
[0111] The weighted feature X′ is represented as:
[0112] ;
[0113] in, Represents a multi-factor input tensor; The weighted tensor at time t represents The element value at that position, h Indicates the number of grid points in the latitudinal direction. w Indicates the number of meridional grid points;
[0114] Subsequently, the weighted features are input into the multi-scale spatial information fusion module and ConvGRU respectively to extract multi-scale spatial features and temporal dynamic features, and then concatenated along the channel dimension to obtain spatiotemporal fusion features. The output of the adaptive multi-scale spatiotemporal information fusion module is as follows:
[0115] ;
[0116] in, This represents the output of the adaptive multi-scale spatiotemporal information fusion module; This represents the output of the multi-scale spatial information fusion module. This indicates a splicing operation along the channel dimension.
[0117] (2) Encoder
[0118] First, spatiotemporal coding is superimposed on the spatiotemporal fusion features. Spatiotemporal coding is composed of temporal coding and spatial location coding, as shown in the formula:
[0119] ;
[0120] ;
[0121] in, This serves as the initial spatiotemporal encoding; Encode for time; Encoding for space; This represents the output of the adaptive multi-scale spatiotemporal information fusion module. This is the final spatiotemporal encoding.
[0122] Then, the two-dimensional spatial features corresponding to each time step are flattened into one-dimensional feature vectors through a reshaping layer, resulting in a feature sequence spanning both time and space. It should be noted that after the spatial dimension is flattened into a sequence, the spatial location information is not lost, but rather incorporated into the sequence in the form of location encoding. The feature representation is as follows:
[0123] ;
[0124] In the formula, The number of spatial tokens for each time step is equal to 93 × 73 × the number of channels.
[0125] Next, a fully connected layer unifies the feature dimension to a preset embedding dimension d=128. Then, the feature sequence is input into a Transformer encoder. The encoder includes a multi-head self-attention mechanism and a feedforward neural network layer, both combined with residual connections and layer normalization. After processing by the encoder, a high-level spatiotemporal representation is output.
[0126] Specifically, the Transformer encoder establishes global connections across time and space based on a multi-head self-attention (MHSA) mechanism. Specifically, the... Layers As input, the attention computation is divided into H parallel attention heads. Size is obtained through linear projection. , and and in the low-dimensional subspace ( The scaled dot product attention is calculated within the header to obtain its output. The outputs of all heads are then concatenated along the feature dimension to fuse the correlation information captured in different subspaces. To further achieve linear remixing of multi-head information and maintain consistency between the output and input dimensions, the concatenation result is projected through the output matrix. The mapping yields the final attention output. Meanwhile, encoders typically combine residual connections and layer normalization (LN) for structural stability training and to enhance expressive power, thereby injecting incremental representations obtained through global attention modeling while preserving the original feature information. The MHSA formula is as follows:
[0127] ;
[0128] ;
[0129] ;
[0130] ;
[0131] In the formula, The query vector represents what information the current location wants to obtain from other locations. The key vector represents the features that each position can provide for matching. The value vector represents the content information that is finally weighted and aggregated. Indicates the number of encoder layers, in this invention Set to 1; Indicates the number of attention heads, this invention Set to 4; Represents scaled dot product attention; This is a scaling factor used to stabilize the gradient and numerical range; This is a similarity matrix; This is the activation function used to normalize the similarity score into attention weights.
[0132] Next, the encoder further performs a nonlinear transformation on the sublayer representation using a feedforward neural network. The feedforward neural network employs a two-layer fully connected network, first expanding the embedding dimension from d to the hidden dimension. ( =4d), after passing through the ReLU activation function, it is mapped back to d, thus performing position-by-position nonlinear reconstruction of the channel features of each token. Similar to the multi-head self-attention mechanism, the feedforward neural network also uses residual connections and layer normalization to stabilize the training process and preserve the original representation information. After passing through the L-layer encoder, the input embedding Mapped as a high-level spatiotemporal representation This output, while maintaining the same number of tokens and dimensions, incorporates long-range dependency information across time and space through a self-attention mechanism. The formula is as follows:
[0133] .
[0134] (3) Decoder
[0135] First, the decoder receives the high-level spatiotemporal representation output by the encoder;
[0136] Then, the feature vector of the final time step in the high-level spatiotemporal representation is extracted through the Lambda layer and used as the state feature vector;
[0137] The state feature vector is then sequentially input into a fully connected layer for dimensional expansion, a reshaping layer to restore the two-dimensional spatial structure, and a 1×1 convolutional layer for regression, finally outputting a single-channel sea surface temperature forecast result; the decoder formula is as follows:
[0138] ;
[0139] In the formula, This represents the final single-channel sea surface temperature forecast result; Represents the remodeling layer; This represents the feature vector at the final time step obtained after processing by the Lambda layer. This is represented by the weight matrix of the fully connected layer. Represents the bias term; This represents a 1×1 convolution.
[0140] Step S3: Model Training
[0141] During the model training phase, an autoregressive rolling forecast method is used to generate training samples. Specifically, 50 consecutive days of input data are used to forecast the SST for the next day. The forecasted SST is then added to the end of the sequence, and the data from the first day of the sequence is removed to form a new 50-day sequence to forecast the next day. This process is repeated to construct multi-step forecast samples for training the model.
[0142] The model training loss function is mean squared error, the optimizer is Adam, the initial learning rate is set to 0.001, the batch size is set to 4, and the total number of training epochs is 200. ReLU and Sigmoid are used as activation functions. During training, a learning rate decay strategy is employed: if the loss error on the validation set does not decrease within 10 consecutive epochs, the learning rate is reduced to half its original value. Early stopping is also used: if the loss function on the test set does not decrease within 10 consecutive epochs, training is terminated early.
[0143] Step S4: Generate sea surface temperature forecast results
[0144] Sea surface temperature (SST), 2-meter temperature (2 m), and solar radiation incident at the top of the atmosphere for 50 consecutive days prior to the forecast time are input into the trained MFDNet model. The model first generates SST forecasts for the next 1-10 days from the short-term forecast branch; then, this short-term forecast is used as the initial field and input into the medium- and long-term forecast branch, which, combined with the original multi-factor input, generates SST forecasts for the next 11-30 days.
[0145] In actual operational forecasting, the autoregressive rolling forecasting method is also adopted. Using 50 consecutive days of time series data as input, the SST result for the first day of the future is forecasted; then, this forecast result is added to the end of the series, and the first day's data is removed to form a new 50-day series; this process is repeated iteratively until the SST forecast result for the next 30 days is generated.
[0146] Experimental verification results
[0147] To verify the effectiveness of this invention, the model performance was evaluated on a test set and compared with ConvLSTM and ConvGRU models. Evaluation metrics included root mean square error (RMSE) and outlier correlation coefficient (ACC), as shown in the following formulas:
[0148] ;
[0149] ;
[0150] In the formula, h and w are the grid indices in the latitude and longitude directions, respectively; H and W represent the number of grid points in the height (latitude direction) and width (longitude direction), respectively. and They represent the positions ( h , w Forecast and observed values at ().
[0151] The experimental results are shown in Table 1:
[0152] Table 1. Average RMSE and ACC for different models
[0153]
[0154] Experimental results (see Table 1) show that the MFDNet model of this invention achieves high RMSE, ACC, and R-values in the 1–30 day SST forecasts for this sea area. 2 It comprehensively outperforms ConvLSTM and ConvGRU models. In 30-day medium- to long-term forecasts, the RMSE of this invention is 0.508℃ (<0.6℃), the ACC reaches 0.823 (significantly higher than the practical threshold of 0.6, p<0.05), and the R... 2 The value is 0.805. This performance improvement stems from the invention's unique dual-branch collaborative architecture, which effectively suppresses error accumulation by fusing short-term and medium-to-long-term forecast branches, significantly enhancing the reliability, robustness, and operational applicability of medium-to-long-term marine environmental forecasts, and providing substantial progress for marine forecasting technology.
[0155] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A two-branch, two-stage sea surface temperature forecasting method based on multi-factor input, characterized in that, Includes the following steps: Step S1: Obtain ocean-atmosphere multi-element reanalysis data of the target sea area, perform preprocessing, and construct a training dataset; the multi-element reanalysis data includes sea surface temperature, 2-meter temperature, and solar radiation incident at the top of the atmosphere; Step S2: Construct a dual-branch collaborative optimization deep learning model, which includes a short-term forecast branch and a medium- to long-term forecast branch. The short-term forecast branch is used to extract spatiotemporal features from the input sea surface temperature data and generate the sea surface temperature forecast result for the first time period. The medium- to long-term forecast branch is used to generate the sea surface temperature forecast result for the second time period based on adaptive weighted multi-source variables and long-distance spatiotemporal dependency modeling. The first time period is adjacent to the second time period, and the second time period is longer. Step S3: Train the model using the training dataset; Step S4: Input the multi-factor reanalysis data from several consecutive days before the forecast time into the trained model, generate the sea surface temperature forecast result for the first time period through the short-term forecast branch, and generate the sea surface temperature forecast result for the second time period through the medium- and long-term forecast branch. The short-term forecast branch is composed of a front-end ConvGRU, a multi-scale spatial information fusion module, a feature splicing and fusion unit, and a rear-end ConvGRU connected in sequence. The pre-convGRU is used to extract preliminary time series features; The multi-scale spatial information fusion module is a four-branch parallel three-dimensional convolutional structure, and each convolutional layer is followed by a BN layer and a ReLU activation function to extract multi-scale spatial features. The feature splicing and fusion unit is used to splice and fuse the preliminary time series features and the multi-scale spatial features in the channel dimension; The post-convGRU is used for time-series dynamic modeling to enhance the time-series dependence characterization of sea surface temperature evolution. The medium- and long-term forecast branch includes an adaptive multi-scale spatiotemporal information fusion module, an encoder, and a decoder connected in sequence. The adaptive multi-scale spatiotemporal information fusion module is used to perform channel adaptive weighting on the input multi-element spatiotemporal sequence, and then extract multi-scale spatial features and temporal dynamic features through the multi-scale spatial information fusion module and ConvGRU respectively, and fuse them in the channel dimension to obtain spatiotemporal fusion features. The encoder is used to superimpose spatiotemporal coding on the spatiotemporal fusion features to obtain enhanced spatiotemporal fusion features; The enhanced spatiotemporal fusion features are flattened into one-dimensional feature vectors at each time step by a reshaping layer to obtain a feature sequence that spans time and space. The channel dimension of the feature sequence is unified to a preset embedding dimension by a fully connected layer. The feature sequence with unified dimension is input into a Transformer encoder. After processing by a preset number of Transformer encoder layers, a high-level spatiotemporal representation is output. The decoder is used to extract the feature vector of the final time step from the high-level spatiotemporal representation, reconstruct it into a two-dimensional spatial structure, and regress it to obtain the sea surface temperature forecast result for a single channel.
2. The two-branch, two-stage sea surface temperature forecasting method based on multi-factor input as described in claim 1, characterized in that, The multi-scale spatial information fusion module includes four branches: The first branch uses a 1×1×1 three-dimensional convolutional layer to capture small-scale features and preserve high-resolution details; The second branch uses a 3×3×3 three-dimensional convolutional layer to enhance the ability to represent local features and expand the channel dimension; The third branch sequentially connects a 1×1×1 three-dimensional convolutional layer and a 3×3×3 three-dimensional convolutional layer, first expanding the dimensions and then extracting the mesoscale features; The fourth branch sequentially connects a 1×1×1 three-dimensional convolutional layer and two cascaded 3×3×3 three-dimensional convolutional layers to construct a large-scale receptive field to capture complex spatial patterns.
3. The two-branch, two-stage sea surface temperature forecasting method based on multi-factor input as described in claim 1, characterized in that, In the adaptive multi-scale spatiotemporal information fusion module, before entering the multi-scale spatial information fusion module and ConvGRU, the input tensor is processed. X Introduce trainable channel weights The weight allocation is obtained by applying nonnegativity constraints. The contribution ratio of each ocean-atmosphere variable is dynamically adjusted, as shown in the following formula: ; Where ReLU represents the ReLU activation function; c The number of input variables, i.e., the number of channels; Indicates channel c The weights; The weighted feature X′ is represented as: ; in, Represents a multi-factor input tensor; The weighted tensor at time t represents The element value at that position, h Indicates the number of grid points in the latitudinal direction. w Indicates the number of meridional grid points; The output of the adaptive multi-scale spatiotemporal information fusion module is as follows: ; in, This represents the output of the adaptive multi-scale spatiotemporal information fusion module; This indicates a multi-scale spatial information fusion module. This indicates a splicing operation along the channel dimension.
4. The two-branch, two-stage sea surface temperature forecasting method based on multi-factor input as described in claim 1, characterized in that, The spatiotemporal coding is composed of time coding and spatial location coding, and is used to enhance the ability to distinguish between different time steps and different spatial locations. The formula is as follows: ; ; in, This serves as the initial spatiotemporal encoding; Encode for time; Encoding for space; This represents the output of the adaptive multi-scale spatiotemporal information fusion module. This is the final spatiotemporal encoding.
5. The two-branch, two-stage sea surface temperature forecasting method based on multi-factor input as described in claim 1, characterized in that, The Transformer encoder includes a multi-head self-attention mechanism and a feedforward neural network layer; The multi-head self-attention mechanism is used to generate query vector, key vector and value vector respectively by linear projection of input feature sequence, and divide attention calculation into multiple parallel attention heads. Scaled dot product attention is calculated in each attention head, and then the outputs of all attention heads are concatenated along the feature dimension and mapped through the output projection matrix to obtain the attention output. The feedforward neural network layer is used to sequentially pass the attention output through the first fully connected layer for dimensional expansion, nonlinear transformation of the activation function, and mapping it back to the preset embedding dimension through the second fully connected layer to obtain the feedforward output; The multi-head self-attention mechanism and the feedforward neural network layer are combined with residual connections and layer normalization, respectively, to stabilize the training process and preserve the original feature information.
6. The two-branch, two-stage sea surface temperature forecasting method based on multi-factor input as described in claim 1, characterized in that, The decoder is specifically used for: Receive the high-level spatiotemporal representation output by the encoder; The feature vector of the final time step in the high-level spatiotemporal representation is extracted through the Lambda layer and used as the state feature vector. The state feature vector is sequentially input into a fully connected layer for dimensional expansion, a reshaping layer to restore the two-dimensional spatial structure, and a 1×1 convolutional layer for regression, and finally outputs a single-channel sea surface temperature forecast result. The decoder formula is as follows: ; In the formula, This represents the final single-channel sea surface temperature forecast result; Represents the remodeling layer; This represents the feature vector at the final time step obtained after processing by the Lambda layer. This is represented by the weight matrix of the fully connected layer. Represents the bias term; This represents a 1×1 convolution.
7. The two-branch, two-stage sea surface temperature forecasting method based on multi-factor input as described in claim 1, characterized in that, The first period is 1-10 days, and the second period is 11-30 days.
8. The two-branch, two-stage sea surface temperature forecasting method based on multi-factor input as described in claim 1, characterized in that, Steps S3 and S4 employ an autoregressive rolling forecast method to generate multi-day sea surface temperature forecasts, specifically including: Using time series data for a first preset number of consecutive days as input, predict the SST result for the next day; The predicted SST result for the next day is added to the end of the time series data, and the data for the first day is removed from the time series data to form a new time series data for a continuous first preset number of days. Using the new consecutive first preset number of days of time series data as input, predict the SST result for the next day; Repeat the above steps in a loop until an SST forecast result for the second preset number of days in the future is generated.