Sea surface temperature prediction method based on spatiotemporal enhanced ConvGRU

By adopting a space-time-enhanced ConvGRU model in sea surface temperature prediction, combining multi-scale feature extraction and position-enhanced attention mechanism, the problem of insufficient SST prediction accuracy in the prior art is solved, and higher prediction accuracy and spatial information processing capabilities are achieved.

CN119249919BActive Publication Date: 2025-03-11FIRST INSTITUTE OF OCEANOGRAPHY MNR
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411773534.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-03-11
Estimated Expiration
2044-12-05

AI Technical Summary

Technical Problem

The prior art is difficult to fully capture the dynamic characteristics of sea surface temperature data that contain both time and space complexity, resulting in insufficient SST prediction accuracy.

Method used

The deep learning algorithm model based on space-time enhanced ConvGRU is adopted, and the spatial information processing capability and prediction accuracy are improved through the multi-scale feature extraction module, the position enhancement attention module and the convolutional gating cycle unit module.

Benefits of technology

It improves the spatial information processing capability and prediction accuracy of sea surface temperature prediction, and can more effectively mine hidden information and rules in sea surface temperature data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119249919B_ABST
    Figure CN119249919B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of sea surface temperature prediction, and discloses a sea surface temperature prediction method based on spatiotemporal enhanced ConvGRU, comprising the following steps: pre-processing a sea surface temperature data set obtained from the ERA5 reanalysis data of the European Centre for Medium-Term Weather Forecasts, and dividing it into a training set, a validation set and a test set; inputting the data of the training set into a deep learning algorithm model of spatiotemporal position enhanced attention for training, using the data of the validation set to evaluate the model accuracy and adjust the parameters, and using the test set to evaluate the generalization ability and prediction accuracy of the model; the model includes a multi-scale feature extraction module, a position enhanced attention module and a convolution gated recurrent unit module; after pre-processing the sea surface temperature data of the sea area to be predicted, inputting it into a qualified model for sea surface temperature prediction. The method disclosed by the present invention can improve the processing capability of spatial information and improve the prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of sea surface temperature prediction, and in particular to a sea surface temperature prediction method based on spatiotemporal enhanced ConvGRU. Background Art

[0002] Sea surface temperature (SST) is a key parameter of the Earth's surface energy balance and plays an important role in regulating the exchange of energy, momentum and moisture between the ocean and the atmosphere. Changes in SST have a profound impact on the global climate system and biodiversity. Therefore, accurate prediction of SST is crucial to many fields such as climate forecasting, marine fishery management and marine environmental protection.

[0003] At present, the methods for predicting sea surface temperature are mainly divided into two categories: physics-based numerical models and data-driven models based on data. The numerical model method uses a series of complex numerical equations to simulate the temperature change process. This approach has a solid physical basis, but the computational cost is high. The data-driven method extracts patterns from historical observation data and constructs a prediction model. Commonly used methods include multi-layer perceptrons and support vector machines. Compared with numerical models, this method has fewer parameters and lower computational complexity, but it performs poorly when the amount of data is large and has certain limitations.

[0004] With the continuous advancement of deep learning technology, previous prediction methods are difficult to meet the demand for SST prediction accuracy. Therefore, deep learning-based methods for sea surface temperature prediction have become a research hotspot. SST data are not only large in scale, but also contain rich time series and spatial correlation information. Therefore, how to effectively use deep learning methods to deeply explore the hidden information and rules in these data is of vital importance to improving the prediction accuracy of SST in time and space. Early deep learning methods, such as the gated recurrent unit (GRU) and its variant, the convolutional gated recurrent unit (Convolutional Gated Recurrent Unit, ConvGRU), can effectively capture time dependencies when processing time series data. The original intention of these methods is to focus more on modeling the time dimension. For data such as SST data that contain both time and space complexity, modeling that relies solely on the time dimension is often difficult to fully capture its dynamic characteristics. Summary of the invention

[0005] In order to solve the above technical problems, the present invention provides a sea surface temperature prediction method based on spatiotemporal enhanced ConvGRU, so as to achieve the purpose of improving the processing capability of spatial information and improving the prediction accuracy.

[0006] To achieve the above object, the technical solution of the present invention is as follows:

[0007] A sea surface temperature prediction method based on spatiotemporal enhanced ConvGRU includes the following steps:

[0008] Step 1: preprocess the sea surface temperature dataset obtained from the ERA5 reanalysis data of the European Centre for Medium-Range Weather Forecasts and divide it into training set, validation set and test set;

[0009] Step 2: Input the training set data into the deep learning algorithm model of spatiotemporal position enhanced attention for training, use the validation set data to evaluate the model accuracy and adjust the parameters, and use the test set to evaluate the generalization ability and prediction accuracy of the model;

[0010] The model includes a multi-scale feature extraction module, a position-enhanced attention module, and a convolutional gated recurrent unit module;

[0011] The multi-scale feature extraction module consists of four branches. The first branch includes three 3D convolutional layers; the second branch includes a maximum pooling layer and a 3D convolutional layer; the third branch includes two 3D convolutional layers; the fourth branch includes a 3D convolutional layer. A batch normalization layer and a Relu activation function are added after each 3D convolutional layer; the four branches are spliced ​​in the channel dimension and output after merging;

[0012] The position-enhanced attention module includes a position encoding module, a channel attention module and a spatial attention module; the position encoding module is used to add a unique position encoding to each grid point in the input sea surface temperature data so that the model can capture information at different positions; the channel attention module consists of two fully connected layers and two reshaping layers, and the module is used to generate corresponding weights to weight the input feature map; the spatial attention module consists of two two-dimensional convolutional layers, the first two-dimensional convolutional layer is used to capture local features, and the second two-dimensional convolutional layer is used to generate a normalized weight map; each two-dimensional convolutional layer is followed by a batch normalization layer, and the weight map is then element-wise multiplied with the feature map processed by the channel attention, and further added to the original input of the module to finally generate a fused output feature map;

[0013] The convolution gated recurrent unit module includes a ConvGRU2D layer and a two-dimensional convolution layer, the ConvGRU2D layer includes 40 ConvGRU units; the ConvGRU unit includes two gating structures, an update gate and a reset gate;

[0014] Step 3: After preprocessing the sea surface temperature data of the sea area to be predicted, input it into the tested model to predict the sea surface temperature.

[0015] In the above scheme, in the multi-scale feature extraction module, in the first branch, the input data first increases the number of channels to 32 through a three-dimensional convolution layer with a convolution kernel size of 1×1×1, and then further extracts spatial features through two consecutive three-dimensional convolution layers with a convolution kernel size of 3×3×3, increases the receptive field to capture large-scale information, and uses batch normalization layers and ReLU function activation to enhance nonlinear expression capabilities.

[0016] In the above scheme, in the multi-scale feature extraction module, in the second branch, the input data is first down-sampled through a maximum pooling layer with a pooling window size of 3×3×3, and then the number of channels is increased to 32 through a three-dimensional convolution layer with a convolution kernel size of 3×3×3, thereby capturing larger-scale spatial feature information.

[0017] In the above scheme, in the multi-scale feature extraction module, in the third branch, the input data first increases the number of channels to 32 through a three-dimensional convolution layer with a convolution kernel size of 1×1×1, and then uses a three-dimensional convolution layer with a convolution kernel size of 3×3×3 to capture medium-scale spatial feature information.

[0018] In the above scheme, in the multi-scale feature extraction module, in the fourth branch, the input data increases the number of channels to 32 through a three-dimensional convolution layer with a convolution kernel size of 1×1×1, and stabilizes the training process through a batch normalization layer and a ReLU activation function; the four branches are spliced ​​in the channel dimension, and the number of channels after merging is 128.

[0019] In the above scheme, the position encoding module first generates position indexes in the height and width directions, and generates a frequency factor for each channel position that exponentially decays as the number of channels increases; then, these position indexes and frequency factors are used to calculate the angle value of each position, and the sine and cosine functions are calculated based on the angle value to construct a coding vector containing the position information; finally, the position codes in height and width are added, and added to the input of the module to generate the final comprehensive position coding tensor, which helps the model to more effectively identify and utilize information at different positions when spatial data is used.

[0020] In the above scheme, in the channel attention module, the input data first passes through the reshaping layer to flatten the input tensor except the channel dimension, and then the first fully connected layer compresses the number of input channels to 1 / 4 of the original, and the activation function is ReLU; the second fully connected layer restores the number of channels to the original number, and the activation function is Sigmoid, and finally the data shape is restored through the reshaping layer.

[0021] In the above scheme, in the spatial attention module, the convolution kernel size of the first two-dimensional convolution is 3×3, the output channel is 1 / 4 of the original, and the ReLU activation function is used; the convolution kernel size of the second two-dimensional convolution is 3×3, the output channel is 1, and the Sigmoid activation function is used.

[0022] In the above scheme, the formula of the position enhanced attention module is as follows:

[0023] ;

[0024] ;

[0025] ;

[0026] In the formula, is the input tensor, Position encoding module, is the channel attention module, represents the spatial attention module, is the input of the channel attention module, is the input of the spatial attention module, Enhance the output of the attention module for the position; is the Hadamard product, which is the multiplication of the elements of the two matrices at the same position; + means addition, the values ​​of the two tensors at the same position are added together to generate a new tensor;

[0027] Among them, the channel attention module formula is as follows:

[0028] ;

[0029] In the formula, is the input of the channel attention module, is the channel attention module; represents the Sigmoid activation function; f is the ReLU activation function; Dense is the fully connected layer; Re represents the Reshape layer, which is used to flatten the dimensions except the channel;

[0030] The formula of the spatial attention module is as follows:

[0031] ;

[0032] In the formula, is the input of the spatial attention module, represents the spatial attention module; represents the Sigmoid activation function, represents the Conv2D function, the convolution kernel size is 3×3, the step size is 1, the same padding is used, and B represents the batch normalization layer;

[0033] The ReLU activation function formula is as follows:

[0034] ;

[0035] The Sigmoid activation function formula is as follows:

[0036] ;

[0037] In the formula, x represents the input sea surface temperature data, Represents the activation function.

[0038] In the above scheme, in the convolutional gated recurrent unit module, the number of output channels of the ConvGRU2D layer is 24, the convolution kernel size is 3×3, the step size is 1, and the convolution kernel size of the two-dimensional convolution layer is 1×1;

[0039] The convolutional gated recurrent unit module formula is as follows:

[0040] ;

[0041] ;

[0042] ;

[0043] ;

[0044] In the formula, Represents the update gate, which is used to control the hidden state of the previous moment And the hidden state at the current moment How much flows into the hidden state at the current time t middle;

[0045] Represents the reset gate, which is used to control the hidden state of the previous moment How many candidate hidden states are flowing into the current moment middle;

[0046] Represents candidate hidden states, based on the current input and the hidden state at the previous moment Calculated;

[0047] Represents the hidden state, when the gate is updated When it is close to 1, the input The information of is basically ignored, and ConvGRU tends to only retain the old state information; on the contrary, when the update gate When it is close to 0, ConvGRU tends to keep the candidate hidden state information;

[0048] , , represents the weight matrix, represents the Sigmoid function, is the Hadamard product.

[0049] Through the above technical solution, the sea surface temperature prediction method based on position enhanced ConvGRU provided by the present invention has the following beneficial effects:

[0050] The present invention uses a multi-scale feature extraction module (InceptionV2) to extract multi-scale features, introduces a position enhanced attention module (PEAM) combined with geographic location information to enhance attention to key areas, and uses a convolutional gated recurrent unit (ConvGRU) to capture dynamic changes in time series data. Finally, a 1×1 convolutional layer outputs the prediction results, and constructs a deep learning algorithm model based on spatio-temporal enhanced ConvGRU (Spatio-Temporal EnhancedConvGRU, STE-ConvGRU). The model extracts multi-scale features in SST data through multi-scale convolution, and uses the position enhanced attention module to provide a unique identifier for each location, ensuring that each time step and each location has corresponding location information, thereby helping the model to better explore the intrinsic connection between each location and make full use of long-distance information. The convolutional gated recurrent unit (ConvGRU) can capture the long-term dependencies of time series. This design not only enhances the model's understanding of spatial layout, but also improves its performance in processing data with complex spatio-temporal dependencies. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.

[0052] Figure 1 A schematic flow chart of a sea surface temperature prediction method based on spatiotemporal enhanced ConvGRU disclosed in an embodiment of the present invention;

[0053] Figure 2 The overall structure diagram of the deep learning algorithm model for enhancing attention in spatiotemporal position constructed by the present invention;

[0054] Figure 3 This is the internal structure diagram of the multi-scale feature extraction module;

[0055] Figure 4This is the internal structure diagram of the position enhanced attention module;

[0056] Figure 5 This is the structure diagram of the convolutional gated recurrent unit module;

[0057] Figure 6 It is the structure diagram of ConvGRU unit;

[0058] Figure 7 Average RMSE for 1-20 days forecast for each model;

[0059] Figure 8 Forecast the average MAE of 1-20 days for each model;

[0060] Fig. 9 RMSE distribution diagrams for different models predicting the 20th day; (a) RMSE distribution diagram of GRU; (b) RMSE distribution diagram of BiGRU; (c) RMSE distribution diagram of ConvGRU; (d) RMSE distribution diagram of STE-ConvGRU. DETAILED DESCRIPTION

[0061] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0062] The present invention provides a sea surface temperature prediction method based on spatiotemporal enhanced ConvGRU, such as Figure 1 As shown, the following steps are included:

[0063] Step 1: The sea surface temperature dataset obtained from the ERA5 reanalysis data of the European Centre for Medium-Range Weather Forecasts is preprocessed and divided into training set, validation set and test set.

[0064] 24-hour data based on ERA5 SST reanalysis data, with a time range of January 1, 2014 - December 31, 2023, and a spatial range of 103°E - 121°E, 0°N - 23°N.

[0065] a: First, average the 24-hour SST data to obtain the daily average SST dataset.

[0066] b: Convert the Kelvin temperature of the daily average SST dataset to Celsius temperature and convert the data to floating point type for subsequent processing.

[0067] c: Set the fill value of SST data to 0 to uniformly process the fill value.

[0068] d: Before dividing the data set, normalize the data to the range of 0-1. The normalization formula is:

[0069] ;

[0070] In the formula, x represents the value of SST in the original data, represents the normalized SST value of x, represents the minimum value of SST in the original data, Indicates the maximum value of SST in the original data.

[0071] e: The training set, validation set, and test set are divided into a ratio of 7:2:1. The model input has five dimensions, namely batch size (b), time step (t), height (h), width (w), and number of channels (c). The label has four dimensions, namely batch size (b), height (h), width (w), and number of channels (c).

[0072] Step 2: Input the data of the training set into the deep learning algorithm model of spatiotemporal position enhanced attention for training, use the data of the validation set to evaluate the model accuracy and adjust the parameters, and use the test set to evaluate the generalization ability and prediction accuracy of the model.

[0073] 1. Construct a deep learning algorithm model for spatiotemporal position enhanced attention (STE-ConvGRU):

[0074] like Figure 2 As shown, the model includes a multi-scale feature extraction module (InceptionV2), a position enhanced attention module (PEAM), and a convolutional gated recurrent unit module.

[0075] 1. Multi-scale feature extraction module (InceptionV2)

[0076] like Figure 3 As shown in Figure 1, the multi-scale feature extraction module consists of four branches, and the functions of each branch are connected in sequence, as shown in Table 1.

[0077] Table 1 Four branches of the multi-scale feature extraction module

[0078]

[0079] The first branch includes three 3D convolutional layers, each followed by a batch normalization layer and a ReLU activation function. First, the number of channels is increased to 32 through a 3D convolution with a kernel size of 1×1×1, and then two consecutive 3D convolutions with a kernel size of 3×3×3 are used to further extract spatial features, increase the receptive field to capture large-scale information, and use batch normalization layers and ReLU activation functions to enhance nonlinear expression capabilities.

[0080] The second branch includes a maximum pooling layer and a 3D convolution layer, and a batch normalization layer and a Relu activation function are added after each 3D convolution layer. Downsampling is performed through a maximum pooling layer with a pooling window size of 3×3×3, and then the number of channels is increased to 32 through a 3D convolution with a convolution kernel size of 3×3×3, thereby capturing larger-scale spatial feature information.

[0081] The third branch includes two 3D convolutional layers, each followed by a batch normalization layer and a ReLU activation function. The number of channels is increased to 32 by using a 3D convolution with a kernel size of 1×1×1, followed by a 3D convolution with a kernel size of 3×3×3 to capture medium-scale spatial feature information.

[0082] The fourth branch includes a 3D convolution layer, followed by a batch normalization layer and a ReLU activation function. This branch increases the number of channels to 32 through a 3D convolution with a kernel size of 1×1×1, and stabilizes the training process through a batch normalization layer and a ReLU activation function. This branch is mainly used to retain the global information in the original input and capture small-scale spatial feature information with fewer parameters.

[0083] These four branches are spliced ​​in the channel dimension, and the number of channels after merging is 128. This module extracts and enhances spatial feature information of different scales respectively, combines the receptive fields from small to large, and effectively improves the model's ability to capture multi-scale features.

[0084] 2. Position Enhanced Attention Module (PEAM)

[0085] like Figure 4 As shown in the figure, PEAM works together through three sub-modules: position encoding module, channel attention module and spatial attention module, so that the network can not only distinguish information at different positions, but also highlight important channels and regions, thereby improving the performance of the model.

[0086] The position encoding module is mainly used to add a unique position code to each grid point in the input SST data so that the model can capture information at different locations. This module first generates position indexes in height and width, and generates a frequency factor for each channel position that decays exponentially with the number of channels. Subsequently, these position indexes and frequency factors are used to calculate the angle value of each position, and the sine and cosine functions are calculated based on this angle value to construct a coding vector containing position information. Finally, the position codes in height and width are added and added to the input of the module to generate the final comprehensive position coding tensor, which helps the model to more effectively identify and utilize information at different locations when using spatial data.

[0087] The channel attention module consists of two fully connected layers and two reshape layers. First, the input tensor of the channel attention module is flattened except for the channel dimension through the reshape layer, and the shape is (-1, c); then the first fully connected layer compresses the number of input channels to 1 / 4 of the original, and the activation function is ReLU; the second fully connected layer restores the number of channels to the original number, and the activation function is Sigmoid; finally, the reshape layer restores the data shape to (b, t, h, w, c). Through this compression and recovery process, the module is able to learn the importance of each channel and generate corresponding weights; these weights are then used to weight the input feature map, thereby highlighting the important feature maps.

[0088] The spatial attention module consists of two 2D convolutions. The convolution kernel size of the first 2D convolution layer is 3×3, the output channel is 1 / 4 of the original, and the ReLU activation function is used to capture local features. The convolution kernel size of the second 2D convolution layer is 3×3, the output channel is 1, and the Sigmoid activation function is used to generate a normalized weight map. Each convolution layer is followed by a batch normalization (BN) layer to improve the stability and convergence speed of the model. The weight map is then element-wise multiplied with the feature map processed by the channel attention, and further added to the original input of the module to finally generate a fused output feature map. This mechanism helps to improve the model's ability to selectively focus on features, thereby optimizing the overall performance of the model.

[0089] Through the collaborative work of the above three sub-modules, namely the spatial attention module, the channel attention module and the position encoding mechanism, PEAM can not only preserve the integrity of the input features, but also strengthen the relevance of spatial information through position encoding, and use the attention mechanism to highlight important feature parts, thereby comprehensively improving the performance of the model.

[0090] The formula of the position-enhanced attention module is as follows:

[0091] ;

[0092] ;

[0093] ;

[0094] In the formula, is the input tensor, Position encoding module, is the channel attention module, represents the spatial attention module, is the input of the channel attention module, is the input of the spatial attention module, The output of the attention module is enhanced for the position; is the Hadamard product, which is the multiplication of the elements of the two matrices at the same position; + means addition, the values ​​of the two tensors at the same position are added together to generate a new tensor;

[0095] Among them, the channel attention module formula is as follows:

[0096] ;

[0097] In the formula, is the input of the channel attention module, is the channel attention module; represents the Sigmoid activation function; f is the ReLU activation function; Dense is the fully connected layer; Re represents the Reshape layer, which is used to flatten the dimensions except the channel;

[0098] The formula of the spatial attention module is as follows:

[0099] ;

[0100] In the formula, is the input of the spatial attention module, represents the spatial attention module; represents the Sigmoid activation function, represents the Conv2D function, the convolution kernel size is 3×3, the step size is 1, the same padding is used, and B represents the batch normalization layer;

[0101] The ReLU activation function formula is as follows:

[0102] ;

[0103] The Sigmoid activation function formula is as follows:

[0104] ;

[0105] In the formula, x represents the input sea surface temperature data, Represents the activation function.

[0106] 3. Convolutional gated recurrent unit module

[0107] like Figure 5 As shown in Figure 2, the convolutional gated recurrent unit module includes a ConvGRU2D layer (which contains 40 ConvGRU units, see Figure 6), the number of output channels is 24, the convolution kernel size is 3×3, and the stride is 1; in addition, the module also contains a two-dimensional convolution layer with a convolution kernel size of 1×1. The ConvGRU2D layer combines the ability of CNN to capture spatial features and GRU to capture time series dependencies. Compared with ConvLSTM, ConvGRU has only two gating structures: update gate and reset gate, while ConvLSTM has three gates: input gate, forget gate and output gate. Therefore, with the same number of parameters, ConvGRU training speed will be faster. In addition, since the ConvGRU gating mechanism is simpler, the number of parameters is usually less than ConvLSTM, which means that parameter adjustment is relatively simple, reduces the risk of overfitting, and accelerates the convergence of the model. ConvGRU generates a multi-channel feature map based on spatiotemporal features. Then, a 1×1 convolution layer is used to fuse the multi-channel information of a multi-channel feature map obtained by ConvGRU processing and convert it into a single-channel feature map. Finally, the SST for the next 20 days is predicted by rolling prediction.

[0108] The convolutional gated recurrent unit module formula is as follows:

[0109] ;

[0110] ;

[0111] ;

[0112] ;

[0113] In the formula, Represents the update gate, which is used to control the hidden state of the previous moment And the hidden state at the current moment How much flows into the hidden state at the current time t middle;

[0114] Represents the reset gate, which is used to control the hidden state of the previous moment How many candidate hidden states are flowing into the current moment middle;

[0115] Represents candidate hidden states, based on the current input and the hidden state at the previous moment Calculated;

[0116] Represents the hidden state, when the gate is updated When it is close to 1, the input The information of is basically ignored, and ConvGRU tends to only retain the old state information; on the contrary, when the update gate When it is close to 0, ConvGRU tends to keep the candidate hidden state information;

[0117] , , represents the weight matrix, represents the Sigmoid function, is the Hadamard product.

[0118] 2. Use the training set for training, use the validation set for evaluation and adjust parameters

[0119] First, the SST of the 40th day is used to predict the SST of the 41st day, and then the SST of the 41st day is added to the end of the 40-day sequence, and the SST of the 1st day is removed to form a new 40-day sequence to predict the SST data of the 42nd day. This cycle is repeated to achieve rolling prediction of the SST data for the next 20 days. A comparison chart of the predicted value and the true value of the 20th day predicted by each model is drawn, and the average RMSE and average MAE of the prediction for the next 1-20 days are calculated.

[0120] The RMSE and MAE formulas are as follows:

[0121] ;

[0122] ;

[0123] in, represents the predicted SST value, represents the actual observed SST value, and n refers to the number of grid points in the data set. The smaller the RMSE and MAE values ​​are, the better the prediction performance of the model is.

[0124] The hyperparameters of the model are set as follows: batch size is set to 10, training epochs are set to 70, RMSE is used as the loss function, the optimizer used is Adam, and the initial learning rate of training is 0.001. ReLU and Sigmoid are used as activation functions. During the training process, the learning rate decay strategy is adopted. If the loss error on the validation set does not decrease within 5 consecutive epochs, the learning rate at this time is reduced to half of the original. And the early stopping method is adopted. If the loss function on the test set does not decrease within 20 consecutive epochs, the training stops.

[0125] 3. Evaluate the generalization ability and prediction accuracy of the model on the test set

[0126] Figure 7 , Figure 8The average RMSE and MAE of different models for 1 day, 5 days, 10 days, 15 days and 20 days in the test set are calculated in Table 1. It can be seen that the average RMSE and average MAE of the 20th day predicted by GRU, BiGRU, ConvGRU to STE-ConvGRU have been decreasing, and the prediction effect is getting better and better.

[0127] Table 2 Average RMSE and MAE of different models

[0128]

[0129] Fig. 9 The RMSE distribution graph and MAE distribution graph for different models predicting the 20th day. The RMSE (MAE) distribution graph is an error distribution graph drawn by plotting the average value of the RMSE (MAE) predicted for 20 days for each point in the test set. Fig. 9 It can be seen that GRU, BiGRU and ConvGRU all have large errors when predicting the land marginal sea area, while the RMSE range of the STE-ConvGRU model proposed in the present invention is concentrated between 0-0.5. Not only is the error in the prediction of the land marginal sea area small, but also in the prediction of a larger range of sea areas, the RMSE is closer to 0. Therefore, the model of the present invention has better effect.

[0130] Step 3: After preprocessing the sea surface temperature data of the sea area to be predicted, input it into the tested model to predict the sea surface temperature.

[0131] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one 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 present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A sea surface temperature prediction method based on spatiotemporal enhanced ConvGRU, characterized in that: The steps include: Step 1: preprocess the sea surface temperature dataset obtained from the ERA5 reanalysis data of the European Centre for Medium-Range Weather Forecasts and divide it into training set, validation set and test set; Step 2: Input the training set data into the deep learning algorithm model of spatiotemporal position enhanced attention for training, use the validation set data to evaluate the model accuracy and adjust the parameters, and use the test set to evaluate the generalization ability and prediction accuracy of the model; The model includes a multi-scale feature extraction module, a position-enhanced attention module, and a convolutional gated recurrent unit module; The multi-scale feature extraction module consists of four branches. The first branch includes three 3D convolutional layers; the second branch includes a maximum pooling layer and a 3D convolutional layer; the third branch includes two 3D convolutional layers; the fourth branch includes a 3D convolutional layer. A batch normalization layer and a Relu activation function are added after each 3D convolutional layer; the four branches are spliced ​​in the channel dimension and output after merging; The position-enhanced attention module includes a position encoding module, a channel attention module and a spatial attention module; The position encoding module is used to add a unique position code to each grid point in the input sea surface temperature data so that the model can capture information at different locations; the channel attention module consists of two fully connected layers and two reshape layers. This module is used to generate corresponding weights to weight the input feature map; the spatial attention module consists of two two-dimensional convolutional layers, the first two-dimensional convolutional layer is used to capture local features, and the second two-dimensional convolutional layer is used to generate a normalized weight map; each two-dimensional convolutional layer is followed by a batch normalization layer, and the weight map is then element-wise multiplied with the feature map processed by the channel attention, and further added to the original input of the module to finally generate a fused output feature map; The convolution gated recurrent unit module includes a ConvGRU2D layer and a two-dimensional convolution layer, the ConvGRU2D layer includes 40 ConvGRU units; the ConvGRU unit includes two gating structures, an update gate and a reset gate; Step 3: After preprocessing the sea surface temperature data of the sea area to be predicted, input it into the tested model to predict the sea surface temperature.

2. A sea surface temperature prediction method based on spatiotemporal enhanced ConvGRU according to claim 1, characterized in that: In the multi-scale feature extraction module, in the first branch, the input data first passes through a three-dimensional convolution layer with a convolution kernel size of 1×1×1 to increase the number of channels to 32, and then passes through two consecutive three-dimensional convolution layers with a convolution kernel size of 3×3×3 to further extract spatial features, increase the receptive field to capture large-scale information, and use batch normalization layers and ReLU function activation to enhance nonlinear expression capabilities.

3. The sea surface temperature prediction method based on spatiotemporal enhanced ConvGRU according to claim 1 is characterized in that: In the multi-scale feature extraction module, in the second branch, the input data is first down-sampled through a maximum pooling layer with a pooling window size of 3×3×3, and then the number of channels is increased to 32 through a three-dimensional convolution layer with a convolution kernel size of 3×3×3, thereby capturing larger-scale spatial feature information.

4. The sea surface temperature prediction method based on spatiotemporal enhanced ConvGRU according to claim 1 is characterized in that: In the multi-scale feature extraction module, in the third branch, the input data first increases the number of channels to 32 through a three-dimensional convolution layer with a convolution kernel size of 1×1×1, and then uses a three-dimensional convolution layer with a convolution kernel size of 3×3×3 to capture medium-scale spatial feature information.

5. The sea surface temperature prediction method based on spatiotemporal enhanced ConvGRU according to claim 1 is characterized in that: In the multi-scale feature extraction module, in the fourth branch, the input data increases the number of channels to 32 through a three-dimensional convolution layer with a convolution kernel size of 1×1×1, and stabilizes the training process through a batch normalization layer and a ReLU activation function; The four branches are spliced ​​in the channel dimension, and the number of channels after merging is 128.

6. The sea surface temperature prediction method based on spatiotemporal enhanced ConvGRU according to claim 1, characterized in that: The position encoding module first generates position indexes in height and width directions, and generates a frequency factor for each channel position that decays exponentially as the number of channels increases; Subsequently, the angle value of each position is calculated using these position indexes and frequency factors, and the sine and cosine functions are calculated based on this angle value to construct a coding vector containing the position information; finally, the position codes in height and width are added together and added to the input of the module to generate the final comprehensive position coding tensor, which helps the model to more effectively identify and utilize information at different positions when processing spatial data.

7. The sea surface temperature prediction method based on spatiotemporal enhanced ConvGRU according to claim 1, characterized in that: In the channel attention module, the input data first passes through a reshaping layer to flatten the input tensor except the channel dimension, and then the first fully connected layer compresses the number of input channels to 1 / 4 of the original number, and the activation function is ReLU; the second fully connected layer restores the number of channels to the original number, and the activation function is Sigmoid, and finally the data shape is restored through the reshaping layer.

8. The sea surface temperature prediction method based on spatiotemporal enhanced ConvGRU according to claim 1, characterized in that: In the spatial attention module, the convolution kernel size of the first two-dimensional convolution is 3×3, the output channel is 1 / 4 of the original, and the ReLU activation function is used; the convolution kernel size of the second two-dimensional convolution is 3×3, the output channel is 1, and the Sigmoid activation function is used.

9. The sea surface temperature prediction method based on spatiotemporal enhanced ConvGRU according to claim 1, characterized in that: The formula of the position-enhanced attention module is as follows: ; ; ; In the formula, is the input tensor, Position encoding module, is the channel attention module, represents the spatial attention module, is the input of the channel attention module, is the input of the spatial attention module, Enhance the output of the attention module for the position; is the Hadamard product, which is the multiplication of the elements of the two matrices at the same position; + means addition, the values ​​of the two tensors at the same position are added together to generate a new tensor; Among them, the channel attention module formula is as follows: ; In the formula, is the input of the channel attention module, is the channel attention module; represents the Sigmoid activation function; f is the ReLU activation function; Dense is the fully connected layer; Re represents the Reshape layer, which is used to flatten the dimensions except the channel; The formula of the spatial attention module is as follows: ; In the formula, is the input of the spatial attention module, represents the spatial attention module; represents the Sigmoid activation function, represents the Conv2D function, the convolution kernel size is 3×3, the step size is 1, the same padding is used, and B represents the batch normalization layer; The ReLU activation function formula is as follows: ; The Sigmoid activation function formula is as follows: ; In the formula, x represents the input sea surface temperature data, Represents the activation function.

10. The sea surface temperature prediction method based on spatiotemporal enhanced ConvGRU according to claim 1, characterized in that: In the convolutional gated recurrent unit module, the number of output channels of the ConvGRU2D layer is 24, the convolution kernel size is 3×3, the step size is 1, and the convolution kernel size of the two-dimensional convolution layer is 1×1; The convolutional gated recurrent unit module formula is as follows: ; ; ; In the formula, Represents the update gate, which is used to control the hidden state of the previous moment And the hidden state at the current moment How much flows into the hidden state at the current time t middle; Represents the reset gate, which is used to control the hidden state of the previous moment How many candidate hidden states are flowing into the current moment middle; Represents candidate hidden states, based on the current input and the hidden state at the previous moment Calculated; Represents the hidden state, when the gate is updated When it is close to 1, the input The information of is basically ignored, and ConvGRU tends to only retain the old state information; on the contrary, when the update gate When it is close to 0, ConvGRU tends to keep the candidate hidden state information; , represents the weight matrix, represents the Sigmoid function, is the Hadamard product.

Citation Information

Patent Citations

  • Sea wave height prediction and model training method, electronic equipment and storage medium

    CN115660041A

  • Ocean surface temperature sequence prediction method based on space-time double-flow non-stationary perception

    CN116612396A