A method and system for spatiotemporal prediction of ocean thermocline based on thermodynamic constraints

By embedding thermodynamic constraints and attention mechanisms into the ResNet architecture, a spatiotemporal prediction model for thermoclines is developed, which solves the problems of high computational cost and neglect of physical mechanisms in existing technologies, and achieves high-precision spatiotemporal prediction and distribution characteristics characterization of thermoclines.

CN120822436BActive Publication Date: 2025-11-21CHINA UNIV OF PETROLEUM (EAST CHINA)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511331837.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-18
Publication Date
2025-11-21
Estimated Expiration
2045-09-18

AI Technical Summary

Technical Problem

Existing technologies suffer from high computational costs and poor timeliness in thermocline prediction, and deep learning algorithms ignore the physical mechanisms of dynamic changes in thermoclines, making it difficult to fully characterize their distribution characteristics.

Method used

A spatiotemporal prediction model for thermoclines based on the ResNet architecture is adopted. By embedding the thermodynamic physical laws affecting the formation of thermoclines into the neural network training process, and combining the 3D-SCConv module and CBAM attention mechanism, the thermal balance equation is introduced as the loss function to achieve spatiotemporal four-dimensional prediction from sea surface data to underwater thermoclines. Furthermore, a regional identification strategy is combined with QFA and GC methods.

Benefits of technology

It significantly reduces computational complexity, improves prediction accuracy and interpretability, and achieves high-precision spatiotemporal prediction of thermoclines with multiple parameters. It breaks through the timeliness and spatial reconstruction limitations of traditional models and can fully characterize the distribution characteristics of thermoclines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120822436B_ABST
    Figure CN120822436B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of ocean thermocline prediction, and discloses a thermodynamic constraint-based ocean thermocline space-time prediction method and system. The method comprises the following steps: data set construction and preprocessing; constructing a thermodynamic constraint-based ocean thermocline space-time prediction model, extracting the space-time characteristics of the thermocline, training and applying the model, and completing the space-time prediction of the temperature at different depths from the surface layer to the underwater future; combining the quasi-step function approximation method (QFA) and the vertical gradient criterion (GC) regional identification strategy, and completing the space-time extraction of the thermocline multi-features according to the predicted temperature at different depths. By introducing the physical mechanism constraint, the application not only improves the accuracy of the thermocline prediction, but also enhances the interpretability of the model, and realizes the space-time prediction of the multi-key features of the underwater thermocline from the sea surface data.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of ocean thermocline prediction, and particularly relates to a method and system for spatiotemporal prediction of ocean thermocline based on thermodynamic constraints. BACKGROUND

[0002] Thermocline refers to a water layer in the ocean where the temperature of seawater changes significantly in vertical distribution, and is usually between the upper mixed layer and the deep water layer. The existence and change of the thermocline can have a great impact on the marine environment. On the one hand, it defines the vertical distribution boundary of different water masses, and significantly changes the sound wave propagation characteristics through its temperature gradient characteristics, directly affecting the detection efficiency and communication quality of underwater sonar systems. On the other hand, a stable thermocline structure forms an effective density barrier, inhibiting the exchange of energy and matter in the vertical direction, and thus affecting the ocean circulation pattern and internal wave generation mechanism. Therefore, the study of thermocline is of great significance to the military activities such as underwater navigation, communication, detection and concealment of vehicles.

[0003] For the prediction of thermocline, the existing technical means can be divided into three categories: numerical simulation, statistical prediction and artificial intelligence prediction. Numerical simulation, as an effective means to explore the formation mechanism of thermocline in the early stage, constructs a water temperature vertical structure simulation method through a water temperature vertical profile self-modeling function or in combination with a heat conduction equation, but the amount of calculation is large, and it usually needs to rely on supercomputers, which has high cost and low efficiency in practical application; the statistical prediction method such as empirical orthogonal function (EOF) and generalized F-distribution empirical model is simple and easy to implement, but the model input parameters are single, and the prediction effect is poor when facing extreme events or insufficient sample representation, which is difficult to fully and stably meet the prediction demand of thermocline in complex marine environment; the artificial intelligence method has obvious limitations:

[0004] Lack of physical interpretability, easy to fall into "black box" dilemma, limiting its wide application;

[0005] Most existing models are limited to three-dimensional space reconstruction of information from the sea surface to underwater, lacking four-dimensional prediction ability integrating time dimension;

[0006] Most models only predict a single feature of the thermocline, and it is difficult to completely describe its distribution characteristics. SUMMARY

[0007] To overcome the problems in the related art, the embodiment of the present application provides a thermodynamic constraint-based marine thermocline spatiotemporal prediction method and system. The present application integrates the advantages of physical modeling and deep learning, proposes a thermodynamic constraint-based marine thermocline spatiotemporal prediction method (4D-TOTnet), embeds the relevant physical laws affecting the formation of the thermocline into the network training process, ensures that the input and output of the model meet the physical constraints, and uses the ocean surface data to achieve spatiotemporal prediction of multiple features of the underwater thermocline.

[0008] The technical solution is as follows: a thermodynamic constraint-based marine thermocline spatiotemporal prediction method, comprising the following steps:

[0009] S1, data set construction and preprocessing;

[0010] S2, based on the preprocessed data set, an improved ResNet architecture is adopted, a three-dimensional space channel reconstruction convolution 3D-SCConv module for capturing spatiotemporal information and a convolution block attention module CBAM for enhancing the key spatiotemporal feature capturing ability of the execution attention mechanism are fused, a thermodynamic constraint-based marine thermocline spatiotemporal prediction model is constructed, and a one-dimensional heat balance equation related to the formation of the thermocline is embedded into the neural network loss function as a physical constraint to enhance the physical consistency and explainability of the prediction results;

[0011] S3, training and application of the constructed thermodynamic constraint-based marine thermocline spatiotemporal prediction model, according to the multi-source sea surface layer data and the introduction of the time dimension, the spatiotemporal prediction of the sea surface layer to the future underwater temperature at different depths is completed;

[0012] S4, according to the spatiotemporal prediction results of the future underwater temperature at different depths, combining the quasi-step function approximation QFA and the vertical gradient criterion GC regional identification strategy, the spatiotemporal extraction of the thermocline multiple features is completed.

[0013] In step S1, the data set includes multi-source sea surface layer data: sea level anomaly SLA, sea surface temperature SST, net heat flux and sea surface wind field SSW as input features; the downloaded subsurface temperature data is used as training labels and performance evaluation benchmarks.

[0014] In step S1, the data set preprocessing includes:

[0015] Firstly, all the data are standardized, the spatial resolution is unified to 0.5°x0.5°, and the time resolution is unified to 5 days;

[0016] Secondly, the input features are normalized.

[0017] Step S2 specifically includes:

[0018] (1) ResNet as the basic model framework, using 3D convolution instead of 2D convolution; in the initial stage of the network, the input image is first down-sampled through a 3x3x3 convolution layer and a maximum pooling layer with a stride of 2, and then enters 4 residual blocks; each residual block contains 2 convolution layers, in order to capture the time dimension information, using three-dimensional space channel reconstruction convolution 3D-SCConv module instead of two-dimensional SCConv 3x3x3 convolution kernel, the feature map is convolved, batch normalized and activated in turn; complete the spatio-temporal extraction of the thermocline;

[0019] (2) In the first and last residual block, the convolution block attention module CBAM that executes the attention mechanism is introduced to enhance the key spatio-temporal feature capture ability, and the convolution block attention module CBAM processes the input features through the concatenated channel attention CA module and spatial attention SA module;

[0020] (3) The output is performed through the global average pooling layer and the fully connected layer, and after the prediction of the fully connected layer, the one-dimensional heat balance equation related to the thermocline is coded into a loss function independent of the network layer as a physical loss term , wherein the difference between the prediction value and the true value of the ocean thermocline spatio-temporal prediction model based on the thermodynamic constraint is calculated, and the input of the loss function is the prediction result of the fully connected layer and the true label.

[0021] In step (1), the three-dimensional space channel reconstruction convolution 3D-SCConv includes a space reconstruction unit SRU and a channel reconstruction unit CRU; the SRU reduces spatial redundancy through a separation-reconstruction method, including: in the separation stage, the input :

[0022] ;

[0023] wherein, is the output feature map processed by the group normalization GN layer, is the group normalization operation, is the input feature map, are all trainable variables, is the mean, is the standard deviation, is a very small constant (usually 10 -8 to 10 -5 orders of magnitude) used to ensure stability;

[0024] The trainable parameter is used to measure the spatial pixel variance, and the larger the variance, the larger ; the normalization weight is calculated to quantify the correlation between different feature maps:

[0025] ;

[0026] wherein, is is the normalized weight set, is the trainable scaling parameter corresponding to the th channel (feature map), is the trainable scaling parameter corresponding to the th channel, is the channel index, used to traverse all channels from 1 to ; is the total number of channels of the input feature map;

[0027] The weight is mapped to by the Sigmoid function, and the gating is performed by threshold processing, and the expression is:

[0028] ;

[0029] wherein, is the final weight matrix filtered by the gating mechanism Gate, is the gating function, is the S-type activation function;

[0030] The input is respectively multiplied by to obtain the information enhancement feature and the information suppression feature ; wherein, is the gating weight for enhancing key information, is the gating weight for suppressing redundant information;

[0031] In the reconstruction stage, the is cross-added and spliced with to generate the spatial refinement feature , and the calculation process is:

[0032] ;

[0033] wherein, is the information enhancement feature obtained by element-wise multiplication with the weight , is the information suppression feature obtained by element-wise multiplication with the weight , is the element-wise multiplication operation, is the first part of the feature , is the second part of the feature , is an element-wise addition operation, is a first partial sub-feature of , is a second partial sub-feature of , is a first group of cross-addition result features, is a second group of cross-addition result features, is a union operation;

[0034] The CRU adopts a splitting-conversion-fusion method to reduce channel redundancy, including: in the splitting stage, channels are divided into two parts, one part has channels, and the other part has channels, where is a hyperparameter, , is the total number of input feature channels; 1x1 convolution kernels are used to compress the channel numbers of the two groups of features, respectively, to obtain and ; where is the group of features with more channels (usually part), is the group of features with fewer channels (usually part);

[0035] The conversion operation includes: taking as input, performing grouped convolution GWC, point-by-point convolution PWC, and adding, outputting rich feature extraction result ; taking as a supplementary input, performing PWC, and taking the union with the original input to obtain the extraction result ;

[0036] In the fusion stage, first, the global average pooling is combined with the global spatial and channel statistical information of to obtain the pooling result ; then the feature weight is generated through Softmax; finally, the weighted sum is calculated to complete the channel feature extraction, and the expression is:

[0037] ;

[0038] In the formula, is the channel refinement feature.

[0039] In step (2), the CA module aggregates the spatial information of the feature map through average pooling and max pooling operations to create two feature maps; the two feature maps are input into a shared multi-layer perceptron MLP for feature extraction, the two feature maps are fused, and the result is converted to The CA module is calculated as follows:

[0040] ;

[0041] wherein, is a channel attention weight matrix, is a shared multi-layer perception, is a global average pooling operation, is a global max pooling operation, is a Sigmoid function, is an input feature map;

[0042] The SA module input is the result of element-wise multiplication of the original input and the CA module output, two feature maps are generated using two pooling methods; the two feature maps are connected and convolved through a standard convolutional layer, and the result is input into an activation function to obtain the final attention map; the SA module calculation is:

[0043] ;

[0044] wherein, is a convolution operation with a filter size of 7x7, is a spatial attention weight matrix, is the output result of concatenating the average pooling and the max pooling along the channel dimension;

[0045] In step (2), the convolution block attention module CBAM processes the input features by concatenating the channel attention CA module and the spatial attention SA module, including:

[0046] ;

[0047] ;

[0048] wherein, is the final optimized output, is the intermediate feature map processed by the channel attention module, is an element-wise multiplication operation.

[0049] In step (3), the loss function includes: an empirical loss , a physical loss and a regularization term , the expression is:

[0050] ;

[0051] wherein, are all trainable hyperparameters, to balance the degree of fitting between model predicted values and real observations, to balance the adaptability of model predicted results and physical laws, to control the regularization strength to prevent model overfitting, ;

[0052] empirical loss and regularization term as follows:

[0053] ;

[0054] where, are real value and predicted value respectively, is model weight, is row index of weight matrix, is column index of weight matrix;

[0055] A one-dimensional heat balance equation is used as the physical loss term, and the temperature change is balanced by the sum of turbulent heat flux diffusion and radiative heat flux:

[0056] ;

[0057] where, is time, is turbulent heat flux, is temperature at depth , is radiative heat flux, is seawater density, is constant-pressure specific heat, taking the value of 3890 J ( kg · K ); is physical loss term, is vertical depth coordinate;

[0058] For the heat diffusion term, the following formula is used for calculation:

[0059] ;

[0060] where, is turbulent heat rate, taking the value of 14×10 -6 m 2 / s; is the second-order derivative of temperature in the vertical direction;

[0061] At the sea surface , the radiative heat flux term ; when , the heating effect of radiative heat flux on seawater is represented by the following parameterization function:

[0062] ;

[0063] In the formula, All parameters are adjustable and meet the requirements. ; For the sea surface ( The incident shortwave radiation flux, It is a natural exponential function.

[0064] In step S3, the spatiotemporal prediction of future underwater temperatures at different depths from the sea surface to underwater, based on multi-source sea surface data and the introduction of a time dimension, includes:

[0065] Select training and testing sets and input them into a pre-defined thermodynamically constrained spatiotemporal prediction model for the ocean thermocline. The input to this model is a 5D tensor of B×C×T×H×W, composed of sea surface features from the past month. The output is a 5D tensor of B×D×T×H×W, predicting temperatures at 16 different depths shallower than 550 meters for the next 40 days. B C is the batch size, D is the number of input channels, T is the number of depth layers, H is the number of time steps, and W is the longitude and latitude grid size, respectively.

[0066] To address the differences in underwater temperature characteristics at different depths, spatiotemporal prediction models of the ocean thermocline based on thermodynamic constraints were constructed for different depths and trained using an optimizer, including:

[0067] The optimizer selected was Adam, an adaptive moment estimator, with the learning rate set to adaptive adjustment based on the gradient changes of each parameter. The initial learning rate was 0.001, and the batch size was 100. After the training of the thermodynamically constrained spatiotemporal prediction models of the ocean thermocline built at different depths was completed, sea surface data was input during the application testing phase to obtain the predicted underwater temperature field data for the next 40 days.

[0068] In step S4, a regional identification strategy is adopted: the quasi-step function approximation method (QFA) is used in the shelf region, and the vertical gradient criterion (GC) method is used in the non-shelf region to complete the spatiotemporal extraction of multiple features of the thermocline.

[0069] Another objective of this invention is to provide a thermodynamically constrained spatiotemporal prediction system for ocean thermoclines, implementing the aforementioned thermodynamically constrained spatiotemporal prediction method for ocean thermoclines. The system includes:

[0070] The dataset construction and preprocessing module is used for dataset construction and preprocessing.

[0071] The thermodynamic constraint-based ocean thermocline spatio-temporal prediction model construction module is based on the preprocessed data set, adopts an improved ResNet architecture, fuses a three-dimensional space channel reconstruction convolution 3D-SCConv module for capturing spatio-temporal information and a convolution block attention module CBAM for enhancing the execution attention mechanism of the key spatio-temporal feature capturing capability, constructs a thermodynamic constraint-based ocean thermocline spatio-temporal prediction model, and embeds a one-dimensional thermal equilibrium equation related to the formation of the thermocline as a physical constraint into a neural network loss function, thereby enhancing the physical consistency and explainability of the prediction result.

[0072] The model training and application module is used for training and applying the constructed thermodynamic constraint-based ocean thermocline spatio-temporal prediction model, and according to multi-source sea surface layer data and the introduction of a time dimension, the spatio-temporal prediction of the sea surface layer to the temperature at different depths under water in the future is completed.

[0073] The thermocline identification and extraction module is used for identifying the thermocline according to the spatio-temporal prediction result of the temperature at different depths under water in the future, combining a quasi-step function approximation QFA and a vertical gradient criterion GC, and completing the spatio-temporal extraction of multiple features of the thermocline.

[0074] In combination with all the technical solutions described above, the present application has the following beneficial effects:

[0075] The present application proposes a thermodynamic constraint thermocline spatio-temporal prediction model based on a ResNet architecture, aiming at the problems of high calculation cost and poor timeliness of the traditional thermocline prediction method, and the defects of the existing deep learning algorithm that ignores the physical mechanism of the dynamic change of the thermocline, is limited to spatial reconstruction and is difficult to completely depict the distribution characteristics. The thermodynamic physical law affecting the formation and evolution of the thermocline is embedded in the neural network training process, and the model architecture is optimized through physical constraints. Compared with the traditional numerical prediction method, the calculation complexity is significantly reduced; compared with the pure data-driven deep learning algorithm, by introducing the physical mechanism constraint, not only the accuracy of the thermocline prediction is improved, but also the explainability of the model is enhanced, and the spatio-temporal prediction of the multiple key features of the thermocline from the sea surface data to the underwater thermocline is realized.

[0076] The thermodynamic constraint-based marine thermocline spatio-temporal prediction model strictly follows physical laws on the basis of data driving by embedding a heat balance equation into a loss function, solves the "black box" problem of traditional intelligent models, can more accurately capture the spatial distribution characteristics and seasonal evolution law of the thermocline, and significantly improves the prediction accuracy of the model; by improving the residual block structure, introducing a 3D-SCConv module and a CBAM attention mechanism, the limitation of the existing model to three-dimensional space reconstruction is broken through, four-dimensional spatio-temporal prediction from sea surface data to underwater thermocline is realized, and the model has stable long-term sequence prediction capability. The present application adopts a regional identification strategy, combines the advantages of the QFA method and the GC method, realizes high-precision synchronous extraction of multiple parameters such as thermocline depth, thickness, intensity and maximum intensity depth, and completely describes the distribution characteristics of the thermocline. BRIEF DESCRIPTION OF DRAWINGS

[0077] The accompanying drawings, which are incorporated into and form a part of the specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure;

[0078] Figure 1 is a flow chart of the thermodynamic constraint-based marine thermocline spatio-temporal prediction method provided by the embodiments of the present application;

[0079] Figure 2 is a principle diagram of the thermodynamic constraint-based marine thermocline spatio-temporal prediction method provided by the embodiments of the present application;

[0080] Figure 3 is a graph of the trend of correlation coefficient (R) with depth at different delay times;

[0081] Figure 4 is a graph of the trend of root mean square error (RMSE) with depth at different delay times;

[0082] Figure 5 is a graph of the trend of normalized root mean square error (NRMSE) with depth at different delay times;

[0083] Figure 6 is a comparison graph of the temperature-depth curve of the model prediction result and the SODA data in different seasons at a delay time of 5 days;

[0084] Figure 7 is a comparison graph of the temperature-depth curve of the model prediction result and the SODA data in different seasons at a delay time of 20 days;

[0085] Figure 8 is a comparison graph of the temperature-depth curve of the model prediction result and the SODA data in different seasons at a delay time of 35 days;

[0086] Figure 9The flow chart for thermocline identification and extraction is shown in the figure.

[0087] Figure 10 The figure for the temporal evolution of the thermocline depth, thickness, intensity and maximum intensity depth in 2013 is shown in the figure. DETAILED DESCRIPTION

[0088] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the accompanying drawings. In the following description, a large number of specific details are set forth in order to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without departing from the scope of the present application, so the present application is not limited to the specific implementation disclosed below.

[0089] The innovation of the present application is that the present application introduces physical constraints by embedding the heat balance equation into the loss function, adopts the improved 3D-SCConv and CBAM to enhance the spatio-temporal feature extraction capability, and combines the QFA and GC regional identification strategies to realize high-precision and interpretable prediction of the thermocline multi-parameter.

[0090] The present application encodes the one-dimensional heat balance equation into the deep learning model training process, so that the data-driven prediction result is subject to the laws of thermodynamics, and a loss function design fusing the heat balance equation is proposed.

[0091] The present application proposes an improved ResNet residual block architecture, which adopts 3D-SCConv instead of traditional convolution in the residual block to realize synchronous capture of spatio-temporal information, and introduces CBAM attention module to further enhance the model's ability to capture key spatio-temporal features, and focuses on the design of the residual block structure of the 3D-SCConv module and the CBAM attention mechanism.

[0092] The present application proposes a regional identification and extraction of the thermocline by combining the QFA method and the GC method, realizes complete prediction of the multi-key features (depth, thickness, intensity, etc.) from the sea surface features to the underwater thermocline, and focuses on the design of the regional identification and multi-feature extraction method of the thermocline.

[0093] In the embodiment 1, as shown in the figure, the thermodynamic constraint-based spatio-temporal prediction method for marine thermocline provided by the present application comprises: Figure 1

[0094] S1, data set construction and preprocessing;

[0095] ​S2, based on the pre-processed data set, using an improved ResNet architecture, fusing a three-dimensional spatial channel reconstruction convolution 3D-SCConv module capturing spatio-temporal information and a convolution block attention module CBAM for enhancing the key spatio-temporal feature capturing ability of the execution attention mechanism, constructing a thermodynamic constraint-based marine thermocline spatio-temporal prediction model, and embedding a one-dimensional heat balance equation related to the formation of the thermocline as a physical constraint into the neural network loss function, enhancing the physical consistency and explainability of the prediction results;

[0096] The key spatio-temporal features mainly focus on the short-term dramatic fluctuations of sea surface temperature anomaly regions, the thermal advection signals caused by mesoscale eddies and ocean current fronts, the heat flux change regions generated under the sea-air interaction, and the vertical mixing and upwelling regions formed under the influence of wind stress and topography. These features collectively represent the core driving role of surface thermal and dynamic processes on the formation and evolution of the thermocline.

[0097] S3, training and applying the constructed thermodynamic constraint-based marine thermocline spatio-temporal prediction model, according to multi-source sea surface data and introducing the time dimension, completing the spatio-temporal prediction of sea surface temperature to different depths underwater in the future;

[0098] S4, according to the spatio-temporal prediction results of the future temperature at different depths underwater, combining the quasi-step function approximation QFA and the vertical gradient criterion GC regional identification strategy, completing the multi-feature spatio-temporal extraction of the thermocline.

[0099] For example, step S1 data set construction and preprocessing specifically includes:

[0100] Download multi-source sea surface data from a public data website, including: sea level anomaly (SLA), sea surface temperature (SST), net heat flux (Q ), and sea surface wind field (SSW, including eastward component VSSW and northward component USSW) as model input features; at the same time, download subsurface temperature data as training labels and model performance evaluation benchmarks.

[0101] To ensure the quality and consistency of the model training data and reduce the interference of data differences on model training, the present application adopts the following data preprocessing process:

[0102] Firstly, standardize all data, unify the spatial resolution to 0.5°x0.5°, and unify the time resolution to 5 days;

[0103] Then, normalize the input features to eliminate the numerical magnitude difference caused by different physical dimensions.

[0104] In step S2, the application proposes a thermodynamic constraint-based marine thermocline spatiotemporal prediction model using ResNet as the basic model framework. The thermodynamic constraint-based marine thermocline spatiotemporal prediction model can reduce the computational complexity of traditional numerical models and greatly save the calculation cost. The one-dimensional heat balance equation related to the formation of the thermocline is coded into the model training, so that the model complies with the laws of thermodynamics on the basis of large-scale data training, accurately reproduces the spatial distribution and seasonal evolution law of the thermocline, and improves the prediction accuracy and reliability. The ResNet residual block is improved, and the 3D-SCConv module is used to capture spatiotemporal information, breaking through the limitations of existing deep learning models to realize four-dimensional prediction of the thermocline. The CBAM attention mechanism is introduced to enhance the key spatiotemporal feature capture capability.

[0105] To extract the spatiotemporal correlation in marine data, the thermodynamic constraint-based marine thermocline spatiotemporal prediction model uses ResNet as the basic model framework and replaces the traditional 2D convolution with 3D convolution. In the initial stage of the network, the input image is first down-sampled through a 3x3x3 convolution layer and a maximum pooling layer with a stride of 2, and then enters 4 residual blocks. Each residual block contains 2 convolution layers, which use three-dimensional spatial channel reconstruction convolution (3D-SCConv) to replace the traditional 3x3x3 convolution kernel, and perform convolution, batch normalization and RELU activation on the feature map in turn. In the first and last residual blocks, a convolution block attention module (CBAM) (filter size 1x1x1, activation function "Sigmoid") is added to enhance the thermodynamic constraint-based marine thermocline spatiotemporal prediction model's understanding of the importance of different spatiotemporal regions in the ocean. Finally, the output is obtained through a global average pooling layer and a fully connected layer.

[0106] And the one-dimensional heat balance equation related to the formation of the thermocline is coded into a loss function independent of the network layer which ensures that the input and output of the thermodynamic constraint-based marine thermocline spatiotemporal prediction model satisfy the physical constraints, where the loss function The input of the loss function is the prediction result of the fully connected layer and the true label. As shown in Figure 2 The main technical route includes: data set construction, model construction, model training and application: according to multi-source sea surface layer data to realize spatiotemporal prediction of temperature at different depths underwater (specifically, to predict the underwater temperature in the future 40 days from the past one month 5 sea surface characteristics, wherein the application mainly includes from the sea surface to underwater, and introducing time dimension, realizing spatiotemporal prediction), and performing thermocline spatiotemporal extraction, combining the quasi-step function approximation method QFA and the vertical gradient criterion GC regional identification strategy, and realizing the thermocline multi-feature spatiotemporal extraction according to the predicted underwater temperature.

[0107] In step S2, the application proposes a thermodynamic constraint-based marine thermocline spatiotemporal prediction model using ResNet as the basic model framework. The thermodynamic constraint-based marine thermocline spatiotemporal prediction model can reduce the computational complexity of traditional numerical models and greatly save the calculation cost. The one-dimensional heat balance equation related to the formation of the thermocline is coded into the model training, so that the model complies with the laws of thermodynamics on the basis of large-scale data training, accurately reproduces the spatial distribution and seasonal evolution law of the thermocline, and improves the prediction accuracy and reliability. The ResNet residual block is improved, and the 3D-SCConv module is used to capture spatiotemporal information, breaking through the limitations of existing deep learning models to realize four-dimensional prediction of the thermocline. The CBAM attention mechanism is introduced to enhance the key spatiotemporal feature capture capability.

[0108] (1) ResNet as the basic model framework, using 3D convolution instead of traditional 2D convolution; in the initial stage of the network, the input image is first down-sampled through a 3x3x3 convolution layer and a maximum pooling layer with a stride of 2, and then enters 4 residual blocks; each residual block contains 2 convolution layers, in order to capture the time dimension information, using three-dimensional space channel reconstruction convolution 3D-SCConv module instead of traditional two-dimensional SCConv 3x3x3 convolution kernel, the feature map is convolved, batch normalized and activated in turn; complete the spatio-temporal extraction of the thermocline;

[0109] (2) Introduce the convolution block attention module CBAM that executes attention mechanism in the first and last residual blocks to enhance the key spatio-temporal feature capture ability, the convolution block attention module CBAM processes the input features through the concatenated channel attention CA module and spatial attention SA module;

[0110] (3) Finally, the global average pooling layer and the fully connected layer are used for output, and after the fully connected layer outputs the prediction, the one-dimensional heat balance equation related to the thermocline is encoded into the loss function independent of the network layer as a physical loss term , the difference between the prediction value and the true value of the ocean thermocline spatio-temporal prediction model based on thermodynamic constraints is calculated, wherein the loss function The input of the loss function is the prediction result of the fully connected layer and the true label.

[0111] Among them, the ocean physical knowledge is automatically encoded into the modeling process to ensure that the model training strictly follows the physical laws. By minimizing the loss function , the prediction result not only fits the observation data, but also meets the basic physical laws such as ocean thermodynamics.

[0112] For example, in step (1), the three-dimensional space channel reconstruction convolution 3D-SCConv module includes a space reconstruction unit (SRU) and a channel reconstruction unit (CRU). SRU reduces spatial redundancy through a separation-reconstruction method. In the separation stage, first, the input :

[0113] ;

[0114] wherein, is the output feature map processed by the group normalization GN layer, is the group normalization operation, is the input feature map, are all trainable variables, is the mean, is the standard deviation, is a very small constant (usually 10 -8 to 10-5 Magnitude) ;

[0115] With trainable parameters Measure the spatial pixel variance, the larger the variance Large, reflecting the richness of information.

[0116] Then calculate the normalized weight To quantify the correlation between different feature maps:

[0117] ;

[0118] In the formula, The normalized weight set, The trainable scaling parameter corresponding to the Channel (feature map), The trainable scaling parameter corresponding to the Channel, The channel index is used to traverse all channels from 1 to ; The total number of input feature channels;

[0119] Then map the weight to Through the Sigmoid function, and through threshold processing for gating:

[0120] ;

[0121] In the formula, The final weight matrix filtered by the gating mechanism Gate, The gating function, The S-shaped activation function;

[0122] Finally, input Element-wise multiplication with , get information enhancement feature And information suppression feature ; Where, The gating weight for enhancing key information, The gating weight for suppressing redundant information;

[0123] In the reconstruction phase, cross-add And Splicing generates spatial refinement feature , enhance feature information flow, suppress spatial redundancy, but the channel dimension is still redundant, the whole calculation process is:

[0124] ;

[0125] In the formula, The weight information enhancement feature obtained after element-wise multiplication, is element-wise multiplication operation, information suppression feature obtained after element-wise multiplication, is element-wise multiplication operation, is first partial sub-feature of is second partial sub-feature of is element-wise addition operation, is first partial sub-feature of is second partial sub-feature of is first group of cross-addition result features, is second group of cross-addition result features, is union set;

[0126] The CRU adopts a segmentation-conversion-fusion method to reduce channel redundancy. In the segmentation stage, X the channels of the input feature map are first divided into two parts, one part has channels, and the other part has channels, where is a hyperparameter ( ), is the total number of channels of the input feature map; then 1x1 convolution kernels are used to compress the channel numbers of the two groups of features, respectively, to obtain and ; where is the group of features with more channels (usually part), is the group of features with fewer channels (usually part).

[0127] The conversion operation includes two parts: taking as input, performing grouped convolution (GWC), point-wise convolution (PWC), and addition, and outputting rich feature extraction result ; taking as a supplementary input, performing PWC, and taking the union set with the original input to obtain , so as to realize the targeted extraction and processing of different features.

[0128] In the fusion stage, first, the global average pooling is combined with the global spatial and channel statistical information of to obtain the pooling result ; then the Softmax is performed to generate feature weight ; finally, the weighted sum is performed to complete the channel feature extraction.

[0129] For example, step (2) includes: because ResNet adopts fixed convolution kernel and channel, the learning ability of different feature correlation and importance is limited, in order to enhance the modeling ability of the thermodynamic constraint based spatiotemporal prediction model of ocean thermocline to different features, the application introduces a convolution block attention module CBAM (CBAM attention mechanism) which performs attention mechanism in the first and last residual block, the convolution block attention module CBAM processes the input features through the channel attention (CA) module and the spatial attention (SA) module connected in series.

[0130] The purpose of the CA module is to focus on the features of "where" are meaningful to the task. First, the spatial information of the feature map is aggregated through average pooling and maximum pooling operations to create two feature maps, then the two feature maps are input into a shared multi-layer perception (MLP) for feature extraction, and finally the two feature maps are fused and the result is converted to Interval using the Sigmoid function. The CA module is calculated as follows:

[0131] ;

[0132] In the formula, is the channel attention weight matrix, is the shared multi-layer perception, is the global average pooling operation, is the global maximum pooling operation, is the Sigmoid function, is the input feature map;

[0133] The SA module focuses on "where" information is meaningful to the task, which is a supplement to the CA module. The input of the SA module is the element-wise multiplication result of the original input and the CA module output. Two feature maps are generated using two pooling methods. Then, the two feature maps are connected and convolved through a standard convolution layer, and the result is input into an activation function to obtain the final attention map. The SA module is calculated as follows:

[0134] ;

[0135] In the formula, is the convolution operation with a filter size of 7x7, is the spatial attention weight matrix, is the output result of the average pooling and the maximum pooling concatenated along the channel dimension;

[0136] The overall attention process can be summarized as:

[0137] ;

[0138] ;

[0139] wherein, is the final optimized output, is the intermediate feature map processed by the channel attention module, is an element-wise multiplication operation.

[0140] For example, in step (3), the present application introduces a physical loss term in the loss function , which automatically encodes ocean physical knowledge into the modeling process, ensuring that the training of the thermocline spatiotemporal prediction model based on thermodynamic constraints strictly follows the physical laws. By minimizing the loss function , the prediction results not only fit the observation data, but also conform to the basic physical laws such as ocean thermodynamics. The loss function is composed of three parts: empirical loss , physical loss , and regularization term , as shown below:

[0141] ;

[0142] wherein, are trainable hyperparameters, used to balance the fitting degree between the model prediction value and the true observation value, used to balance the adaptability of the model prediction result to the physical laws, control the regularization strength to prevent model overfitting, ;

[0143] The empirical loss and the regularization term are as follows:

[0144] ;

[0145] wherein, are the true value and the prediction value, respectively, is the model weight, is the row index of the weight matrix, is the column index of the weight matrix;

[0146] For example, the heat balance equation can be used to analyze the distribution and propagation of heat at different depths underwater, which helps to understand the formation of the thermocline. Therefore, the present application adopts a one-dimensional heat balance equation as the physical loss term, which assumes that the temperature change at a specific depth is balanced by the sum of turbulent heat diffusion and radiative heat flux:

[0147] ;

[0148] wherein, is the time, is the turbulent heat flux, is the depth is the temperature at the depth, is the radiative heat flux, is the seawater density, is the specific heat at constant pressure, and the value is 3890 J / ( kg · K ); is the physical loss term, is the vertical depth coordinate;

[0149] For the heat diffusion term, the following formula is used for calculation:

[0150] ;

[0151] In the formula, is the turbulent heat transfer rate, and the value is 14x10 -6 m 2 / s; is the second-order derivative of temperature in the vertical direction;

[0152] At the sea surface , the radiative heat flux term ; when , the heating effect of the radiative heat flux on the seawater is represented by the following parameterization function:

[0153] ;

[0154] In the formula, are all adjustable parameters, satisfying ; is the incident shortwave radiation flux of the sea surface (SWdown), is a natural exponential function. It can be understood that on the basis of the traditional empirical loss function, the present application innovatively introduces the physical loss term and the regularization term, significantly improves the physical rationality and generalization ability of the model under the premise of ensuring the data fitting accuracy, and innovatively modifies the traditional loss function by combining the physical loss and the regularization term.

[0155] The exemplary step S3 includes: selecting 2005-2012 as the training set and 2013 as the test set, and inputting into the established thermodynamic constraint-based ocean thermocline spatiotemporal prediction model 4D-TOTnet. The input of the thermodynamic constraint-based ocean thermocline spatiotemporal prediction model is a 5D tensor (X), which is composed of the characteristics of the sea surface in the past month, and the output is also a 5D tensor (Y).

[0156] B x C x T x H x W B x D x T x H x W ​​), to predict the temperature of 16 different depth levels within 40 days, 550 meters or less, where B is the batch size, C is the number of input channels, D is the number of depth layers, T is the number of time steps, H and W are the longitude and latitude grid sizes, respectively. Since the characteristics of ocean water temperature vary at different depths, a thermodynamic constraint-based ocean thermocline spatiotemporal prediction model is constructed for different depths.

[0157] The optimizer selects the adaptive moment estimation (Adam), which is simple to implement, computationally efficient, and has low memory requirements, making it suitable for large data or parameter problems. The learning rate is set to be adaptively adjusted, which can adjust according to the gradient changes of each parameter to avoid gradient vanishing and explosion. The initial learning rate is 0.001, and the batch size is 100. After the model training is completed, the 2013 sea surface data is input in the application test stage to obtain the predicted temperature field data at different depths under water for the next 40 days;

[0158] For example, in step S4, the thermodynamic constraint-based ocean thermocline spatiotemporal prediction model predicts the temperature field data at different depths, which is combined with the quasi-step function approximation (QFA) and the vertical gradient criterion (GC). The QFA method is used on the continental shelf, and the GC method is used on the non-continental shelf area. Through data preprocessing, calculation, screening, merging, and selection, the thermocline is identified and extracted. The present application innovatively combines the advantages of both to calculate the thermocline multi-feature spatiotemporal. Specifically, it includes:

[0159] (1) Data preprocessing: Before calculating the thermocline, it is necessary to note that instrument errors and certain hydrological characteristics can interfere with the data, resulting in the detection of thin thermoclines with a thickness of 1-2 meters. Therefore, the underwater temperature data needs to be re-interpolated. The present application uses a cubic spline interpolation method to generate uniformly distributed data points at 1-meter intervals.

[0160] (2) Calculation: The QFA method uses three line segments to fit the vertical temperature profile of three layers (surface mixed layer, bottom mixed layer, and thermocline) in the continental shelf sea area of China. The quasi-step function is defined as:

[0161] ;

[0162] where, is the temperature value at depth , is the depth of the profile, is the strength of the thermocline, are the depths of the top and bottom of the thermocline, respectively, are the vertical average temperatures of the surface mixed layer and the bottom mixed layer, respectively;

[0163] The criterion of 0.05 °C / m gradient and The initial values, the best values of these parameters are calculated by minimizing the curve residual with the least square method. This method can well fit the three-layer structure of the Chinese continental shelf, but it is not suitable for the area outside the continental shelf.

[0164] GC method: the thermocline is defined as the depth where the continuous vertical temperature gradient exceeds a given threshold, and the seawater is divided into layers, the temperature and depth of each layer are recorded as and Thermocline intensity is defined as:

[0165] ;

[0166] In the formula, is the temperature difference between the th layer and the th layer, is the depth difference between the th layer and the th layer, is the temperature value of the th layer, is the temperature value of the th layer, is the depth of the th layer, is the depth of the th layer;

[0167] First, calculate the vertical temperature gradient layer by layer, and then filter the data according to the thermocline intensity standard. The top depth of the layer is the thermocline depth, the thickness is the thermocline thickness, and the overall vertical gradient is the thermocline intensity. This method can determine the upper and lower boundaries of the thermocline at the same time, which is convenient for practical application.

[0168] (3) Screening: According to the minimum standard value of the thermocline intensity specified in the “Marine Survey Specification” and “Technical Regulations for Exclusive Economic Zone and Continental Shelf Survey”, the minimum value of the thermocline temperature gradient is 0.2 °C / m in the shallow water area with a depth of less than 200 meters; when the water depth is more than 200 meters, the minimum value is 0.05 °C / m. After calculating the temperature gradient of each profile by combining the QFA and GC methods, the water layer with a vertical gradient meeting the above standard is determined as the thermocline layer by layer screening.

[0169] (4) Merge: First, filter out the layers with a thickness of less than 5 meters; then judge the interval between the upper boundary of the current layer and the lower boundary of the last layer. If the interval is not more than 5 meters, merge; if the interval is more than 5 meters, do not merge the layers, and treat the current layer as an independent layer.

[0170] (5) Selection: Select the multiple thermoclines obtained after merging according to the principle of "the greater the intensity, the better", and select the largest intensity as the thermocline at the point; when the intensity is similar, the larger thickness is selected.

[0171] From the above examples, it can be seen that the present application proposes a thermodynamic constraint-based marine thermocline spatiotemporal prediction method, which has the following advantages:

[0172] Low calculation cost and high timeliness: Compared with traditional numerical models, the thermodynamic constraint-based marine thermocline spatiotemporal prediction model significantly reduces the calculation complexity, greatly saves the calculation cost, and can efficiently complete the long-term prediction of 40 days, and the long-term prediction accuracy is stable.

[0173] Physical interpretability: The present application encodes the one-dimensional heat balance equation related to the formation of the thermocline into the model training process, so that the model meets the thermodynamic physical law on the basis of large-scale data training. The introduction of the physical mechanism makes the model accurately reproduce the spatial distribution characteristics and seasonal evolution law of the thermocline.

[0174] Complete representation of spatiotemporal characteristics: Existing deep learning models are mainly limited to spatial reconstruction and lack four-dimensional prediction considering time information. The present application improves the traditional ResNet residual block architecture, uses a 3D-SCConv module to realize four-dimensional spatiotemporal prediction of the thermocline, and introduces a CBAM attention mechanism to further enhance the model's ability to capture key spatiotemporal features.

[0175] Comprehensive prediction of multiple features of the thermocline: Most existing models are aimed at a single feature of the thermocline, and it is difficult to completely reflect its distribution characteristics. The present application identifies and extracts multiple core features of the thermocline depth, thickness, intensity and maximum intensity depth, providing a more complete and accurate thermocline cognitive framework for marine environmental monitoring and scientific research.

[0176] From the above examples, it can be seen that the present application has significant application potential in multiple fields such as marine engineering, climate prediction and marine resource exploration. In marine engineering, it can provide accurate marine environmental data support for offshore platform design and submarine pipeline layout; in climate prediction and fishery resource management, it can provide more accurate thermocline dynamic information to assist long-term climate modeling and fishing ground prediction. After commercialization, it can form a sustainable business model through providing high-precision thermocline prediction services, customized marine environmental data analysis systems, etc., and has broad market prospects and economic benefits.

[0177] There is no mature method in the prior art to fuse the formation rule of the thermocline and the advantage of deep learning to realize the systematic method of four-dimensional spatiotemporal prediction of multiple features from the sea surface to the underwater thermocline. The thermocline spatiotemporal prediction method based on thermodynamic constraints provided in the present application firstly embeds a one-dimensional heat balance equation as a physical loss term into a neural network, combines 3D-SCConv and CBAM mechanisms, and realizes high-precision synchronous prediction of multiple parameters such as the depth, thickness and intensity of the thermocline.

[0178] Due to the high cost and low efficiency of traditional numerical methods, the poor adaptability of statistical methods to extreme events, and the lack of physical mechanism support for existing artificial intelligence methods, which are mostly "black box" models and are mostly limited to three-dimensional space reconstruction, it is difficult to realize the spatiotemporal collaborative prediction of multiple features of the thermocline. The present application successfully realizes efficient, high-precision and interpretable four-dimensional prediction of the thermocline through the introduction of physical constraints, model structure innovation and multi-method fusion.

[0179] Traditional views believe that it is difficult to effectively fuse physical models and data-driven models, and the complexity of physical models will restrict the efficiency of deep learning, while pure data-driven models lack interpretability. The present application embeds the heat balance equation as a loss term into the network, which not only maintains the efficiency of deep learning, but also introduces physical constraints. Through regional fusion of QFA and GC methods, the limitations of the applicability of single methods are overcome, and accurate identification and extraction of the thermocline in the continental shelf and deep sea regions are realized.

[0180] In embodiment 2, the present application provides a marine thermocline spatiotemporal prediction system based on thermodynamic constraints, which comprises:

[0181] A data set construction and preprocessing module for data set construction and preprocessing;

[0182] A marine thermocline spatiotemporal prediction model construction module based on thermodynamic constraints, based on the preprocessed data set, using an improved ResNet architecture, combining a three-dimensional space channel reconstruction convolution 3D-SCConv module for capturing spatiotemporal information and a convolution block attention module CBAM for enhancing the key spatiotemporal feature capturing ability, to construct a marine thermocline spatiotemporal prediction model based on thermodynamic constraints, and embed the one-dimensional heat balance equation related to the formation of the thermocline into the neural network loss function as a physical constraint to enhance the physical consistency and interpretability of the prediction results;

[0183] A model training and application module for training and applying the constructed marine thermocline spatiotemporal prediction model based on thermodynamic constraints, according to the multi-source sea surface layer data and the introduction of the time dimension, to complete the spatiotemporal prediction of the temperature from the sea surface layer to different depths underwater in the future;

[0184] A thermocline identification and extraction module is configured to identify and extract the thermocline according to the spatiotemporal prediction results of the temperature at different depths in the future, in combination with a quasi-step function approximation (QFA) and a vertical gradient criterion (GC) regional identification strategy.

[0185] The research scope of the present application is the South China Sea region from 0.125°N to 25.125°N and from 105.125°E to 120.125°E. The proposed thermodynamic constraint-based spatiotemporal prediction method for the ocean thermocline comprises four parts: the first part is data set construction and preprocessing, the second part is the design of a thermodynamic constraint-based spatiotemporal prediction model for the ocean thermocline, the third part is model training and application, and the fourth part is thermocline identification and extraction. For details, refer to FIG. Figure 2 .

[0186] The main steps are as follows:

[0187] Step 1: Construct a database for thermocline prediction. Collect various types of marine data, including surface data (SLA, SST, , VSSW, and USSW) and subsurface temperature data, and integrate them to form the basic database required for prediction.

[0188] The data preprocessing includes:

[0189] Uniform spatiotemporal resolution: unify the time resolution to 5 days, and use cubic spline interpolation to interpolate all data to a spatial resolution of 0.5°;

[0190] Data normalization: Z-value normalization is used to normalize the marine surface data:

[0191] ;

[0192] In the formula, is the standardized data, is the original input, is the standard deviation, is the average value.

[0193] Step 2: Design a thermodynamic constraint-based spatiotemporal prediction model for the ocean thermocline.

[0194] 4D-TOTnet adopts the ResNet framework and contains 4 residual blocks. The parameters of each module are configured as shown in the following table. In the residual block, the 3D-SCConv is used to replace the traditional 3x3x3 convolution: first, the SRU evaluates the importance of the feature map and cross-reconstructs the spatial features, and then the CRU divides the channels and respectively uses lightweight convolution to fuse and finally outputs the optimized features with reduced redundancy; at the same time, the CBAM attention module is embedded in the first and last residual block: first, the CA module generates channel weights to filter key channels, and then the SA module generates spatial weights to focus on important areas, and finally outputs the feature map fused with double attention. The included modules are shown in Table 1.

[0195] Table 1. 4D-TOTnet module parameter reference table

[0196]

[0197] The input image is first down-sampled by a 3x3x3 convolution layer and a maximum pooling layer with a stride of 2, and then enters the 4 residual blocks. Each residual block contains 2 convolution layers, which perform convolution, batch normalization and RELU activation operations on the feature map in turn. Finally, the global average pooling layer and the fully connected layer output the results.

[0198] To strengthen the model's learning of the physical mechanism of the thermocline, the one-dimensional heat balance equation related to the formation of the thermocline is coded into the loss function, and the loss function is composed of three parts, including the experience loss , the physical loss and the regularization term :

[0199] ;

[0200] The experience loss and the regularization term are as follows:

[0201] ;

[0202] The one-dimensional heat balance equation is selected as the physical loss term :

[0203] ;

[0204] At the sea surface , the radiative heat flux term ; when , the heating effect of the radiative heat flux on seawater is represented by the following parameterized function:

[0205] ;

[0206] Step 3: Model training and application.

[0207] The training data is from 2005 to 2012, and the test data is from 2013. The model input is the sea surface feature (SLA, SST, , VSSW, USSW) in the past 30 days, which is reorganized into a 5D tensor (BxCxTxHxW), where, B represents the batch size, C is the number of input channels (value 5), T is the number of time steps, H and W correspond to the longitude and latitude grid size, respectively. The model output is the temperature of the future 40 days, 550 meters or less in 16 different depth levels. A model is built for each depth data and trained.

[0208] During training, the Adam optimizer is used, the learning rate is set to adaptive adjustment, the initial learning rate is 0.001, and the batch size is 100. First, the thermodynamic constraint-based ocean thermocline spatiotemporal prediction model is used to carry out supervised training on the training data set. After the model is trained, the ocean surface data in 2013 is input, and the temperature at each depth of the subsurface is predicted. Then the model prediction results are respectively verified in time distribution, spatial distribution and vertical distribution, and the implementability of the technical scheme is comprehensively evaluated.

[0209] Time distribution verification: calculate the root mean square error (RMSE), correlation coefficient (R), and normalized root mean square error (NRMSE) between the predicted value and the SODA grid data. For example, Figures 3-5 Different color segments correspond to different delay time results, which can intuitively observe the trend of the model prediction results with depth. Overall, 4D-TOTnet provides reliable estimation results and has significant advantages in long-term prediction.

[0210] where, Figure 3 is the correlation coefficient (R) trend graph with depth at different delay times; Figure 4 is the root mean square error (RMSE) trend graph with depth at different delay times; Figure 5 is the normalized root mean square error (NRMSE) trend graph with depth at different delay times;

[0211] Spatial distribution verification: taking delay time as an example, 5 days, 20 days, and 35 days, at depths of 25.22 meters, 45.28 meters, 66.26 meters, 98.62 meters, 181.31 meters, and 330.01 meters, the model prediction results are compared with the SODA grid data. By comparing the temperature field of the SODA grid data at different delay times, the present application can accurately reproduce the spatial variation characteristics of temperature at different depths while meeting the physical constraints and achieving accurate prediction.

[0212] Vertical distribution verification: Select a representative rectangular area of Xianghai 112.125°E to 113.625°E, 9.125°N to 10.625°N, and compare the model prediction results with the SODA grid data profile, as shown in Figures 6-8 . Taking a delay of 5 days, 20 days, and 35 days as an example, Figures 6-8 The temperature-depth curves of different columns correspond to different seasons (black line for SODA value, red line for predicted value), from which it can be seen that the predicted temperature is basically consistent with the actual temperature, and the application can accurately capture the seasonal distribution characteristics of the subsurface temperature.

[0213] Wherein, Figure 6 is the temperature-depth curve comparison of the model prediction results and the SODA data in different seasons when the delay time is 5 days; Figure 7 is the temperature-depth curve comparison of the model prediction results and the SODA data in different seasons when the delay time is 20 days; Figure 8 is the temperature-depth curve comparison of the model prediction results and the SODA data in different seasons when the delay time is 35 days.

[0214] Step 4: Thermocline identification and extraction.

[0215] Based on the underwater temperature field data predicted by the 4D-TOTnet model, the thermocline is extracted by using a regional identification strategy: the continental shelf area uses the QFA method, and the non-continental shelf area uses the GC method. The identification and extraction are completed through five steps of data preprocessing, calculation, screening, merging, and selection, and the thermocline identification and extraction process is as shown in Figure 9 . Including:

[0216] (1) Data preprocessing: using cubic spline interpolation method to re-interpolate the underwater temperature field data predicted by the model with 1 meter interval;

[0217] (2) Calculation: the continental shelf area uses the QFA method, and the temperature profile (surface mixed layer, bottom mixed layer, thermocline) is fitted by three-line segment;

[0218] ;

[0219] The gradient criterion of 0.05°C / m is used to estimate D t and D b The initial value is optimized by the least square method.

[0220] The deep sea area uses the GC method, and the vertical temperature gradient is calculated layer by layer, and the thermocline strength is defined as:

[0221] ;

[0222] Next, continuous water layers that meet the threshold are selected. The top depth of this layer is the thermocline depth, the thickness is the thermocline thickness, and the overall vertical gradient is the thermocline intensity.

[0223] (3) Screening: Based on the standards of shallow water area (depth < 200 meters): strength ≥ 0.2℃ / m; deep water area (depth ≥ 200 meters): strength ≥ 0.05℃ / m, the thermocline layer that meets the conditions is screened layer by layer;

[0224] (4) Merging: First, filter out layers with a thickness of less than 5 meters, then make a judgment. When the vertical distance between adjacent thermoclines is ≤ 5 meters, merge the layers; otherwise, retain them as independent thermoclines.

[0225] (5) Selection: Select the multiple thermoclines obtained after merging, and prioritize the thermocline with the largest vertical temperature gradient as the thermocline at that point; when the strengths are similar, select the one with the larger thickness.

[0226] like Figure 10 The graph shown illustrates the temporal evolution of the thermocline depth, thickness, intensity, and maximum intensity depth in 2013. The thermocline identification and extraction results clearly demonstrate the temporal evolution of the multi-parameter characteristics of the thermocline during 2013. The red line represents the thermocline depth, the blue line represents the lower boundary depth of the thermocline, the gray line represents the thermocline intensity, and the black line represents the maximum intensity depth of the thermocline.

[0227] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by those skilled in the art within the scope of the technology disclosed in the present invention and within the spirit and principles of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A spatiotemporal prediction method for ocean thermoclines based on thermodynamic constraints, characterized in that, The method includes the following steps: S1, Dataset Construction and Preprocessing; S2, based on the preprocessed dataset, adopts an improved ResNet architecture, fusing the 3D-SCConv module for 3D spatial channel reconstruction that captures spatiotemporal information with the CBAM module for convolutional block attention that performs an attention mechanism to enhance the capture of key spatiotemporal features, to construct a spatiotemporal prediction model of the ocean thermocline based on thermodynamic constraints. The one-dimensional thermal balance equation related to the formation of the thermocline is embedded as a physical constraint into the neural network loss function to enhance the physical consistency and interpretability of the prediction results. S3 trains and applies the constructed thermodynamically constrained ocean thermocline spatiotemporal prediction model. Based on multi-source sea surface data and the introduction of the time dimension, it completes the spatiotemporal prediction of sea surface temperature to different underwater depths in the future. S4. Based on the spatiotemporal prediction results of future underwater temperatures at different depths, and combining the quasi-step function approximation method QFA with the vertical gradient criterion GC regional identification strategy, the spatiotemporal extraction of multiple features of the thermocline is completed. Step S2 specifically includes: (1) Using ResNet as the basic model framework, 3D convolution is used instead of 2D convolution. In the initial stage of the network, the input image is downsampled by a 3×3×3 convolutional layer and a max pooling layer with a stride of 2, and then enters 4 residual blocks. Each residual block contains 2 convolutional layers. In order to capture the temporal dimension information, the 3D spatial channel reconstruction convolution 3D-SCConv module is used to replace the 2D SCConv 3×3×3 convolutional kernel. The feature map is convolved, batch normalized and ReLU activated in sequence to complete the spatiotemporal extraction of the thermocline layer. (2) In the first and last residual blocks, a convolutional block attention module (CBAM) with an execution attention mechanism is introduced to enhance the ability to capture key spatiotemporal features. The CBAM processes input features through a cascaded channel attention module (CA) and spatial attention module (SA). (3) Output is made through a global average pooling layer and a fully connected layer. After the prediction is output by the fully connected layer, the one-dimensional thermal balance equation related to the formation of the thermocline is encoded as a physical loss term into the loss function CostF, which is independent of the network layer. The difference between the predicted value and the true value of the spatiotemporal prediction model of the ocean thermocline based on thermodynamic constraints is calculated. The input of the loss function CostF is the prediction result of the fully connected layer and the true label.

2. The method for spatiotemporal prediction of ocean thermoclines based on thermodynamic constraints according to claim 1, characterized in that, In step S1, the dataset comprises multi-source sea surface skin data: sea level anomaly SLA, sea surface temperature SST, net heat flux Q net and sea surface wind field SSW as input features; The downloaded subsurface temperature data was used as training labels and performance evaluation benchmarks.

3. The method for spatiotemporal prediction of ocean thermoclines based on thermodynamic constraints according to claim 1, characterized in that, In step S1, dataset preprocessing includes: First, all data were standardized, with the spatial resolution unified to 0.5°×0.5° and the temporal resolution unified to 5 days. Secondly, the input features are normalized.

4. The method for spatiotemporal prediction of ocean thermoclines based on thermodynamic constraints according to claim 1, characterized in that, In step (1), the 3D spatial channel reconstruction convolution 3D-SCConv includes a spatial reconstruction unit (SRU) and a channel reconstruction unit (CRU); the SRU reduces spatial redundancy through a separation-reconstruction method, including: in the separation phase, normalizing the input X with a group normalized GN layer: In the formula, X out is the output feature map after group normalization GN layer processing, GN() is the group normalization operation, X is the input feature map, γ, β are both trainable variables, μ is the mean, σ is the standard deviation, and ε is a constant; With the help of trainable parameter γ, the spatial pixel variance is measured, and the larger the variance is, the larger γ is; the normalized weight W is calculated γ To quantify the correlation between different feature maps: In the formula, {w i} is a normalized weight set, γ i is a trainable scaling parameter corresponding to the i-th channel, γ j is a trainable scaling parameter corresponding to the j-th channel, i and j are channel indexes, used to traverse all channels from 1 to C, and C is the total number of channels of the input feature map; The weights are mapped to (0,1) using the Sigmoid function, and then gating is performed using a threshold. The expression is as follows: W = Gate(Sigmoid(W γ (GN(X)))) Where \(W\) is the final weight matrix after being screened by the gating mechanism Gate, \(Gate()\) is the gating function, and \(Sigmoid()\) is the S-shaped activation function; Input X is multiplied element-wise by W1 and W2 respectively to obtain information-enhanced features. and information inhibition features Among them, W1 is used to enhance the gating weight of key information, and W2 is used to suppress the gating weight of redundant information. During the reconstruction phase, and After cross-addition and concatenation, spatial refinement feature X is generated. w The calculation process is as follows: In the formula, The information enhancement feature is obtained by multiplying the weight W1 element by element. The information suppression feature is obtained by multiplying it element-wise with weight W2. This is an element-wise multiplication operation. for The first part of the sub-features, for The second part of the sub-features, This is an element-wise addition operation. for The first part of the sub-features, for The second part of the sub-feature, X w1 X is the feature of the first group of cross-addition results. w2 The second set of cross-addition results are characterized by ∪, where ∪ represents the union of sets. The CRU adopts a splitting-conversion-fusion method to reduce channel redundancy, including: in the splitting stage, the channels of X are divided into two parts, one part has a channel number of aC, and the other part has a channel number of (1-a)C, wherein a is a hyperparameter, 0≤a≤1, and C is the total channel number of the input feature map; 1×1 convolution kernels are used to compress the channel numbers of the two groups of features, respectively, to obtain X up and X low ; wherein X up is the aC part, and X low is the (1-a)C part; The conversion operation includes: taking X up as input, packet convolution GWC, point-by-point convolution PWC, and addition, outputting feature extraction result Y1; taking X low as a supplementary input, taking the union of the original input after PWC, and obtaining extraction result Y2; In the fusion stage, first, global average pooling is used to combine the global spatial and channel statistical information of \(Y1\) and \(Y2\) to obtain the pooling results \(S1\) and \(S2\); then, the feature weights \(\beta1\) and \(\beta2\) are generated through Softmax; finally, weighted summation is performed to complete the channel feature refinement, and the expression is: \(Y = \beta1Y1+\beta2Y2\) Where \(Y\) is the channel refined feature.

5. The method for spatiotemporal prediction of ocean thermoclines based on thermodynamic constraints according to claim 1, characterized in that, In step (2), the CA module aggregates the spatial information of the feature map through average pooling and max pooling operations to create two feature maps; these two feature maps are input into a shared multi-layer perceptron MLP for feature extraction, and the two feature maps are fused, and the Sigmoid function is used to convert the result to the interval \((0,1)\); the calculation of the CA module is as follows: where Attention CA (X) is a channel attention weight matrix, MLP() is a shared multi-layer perceptron, AvgPool() is a global average pooling operation, MaxPool() is a global max pooling operation, σ() is a Sigmoid function, and X is an input feature map. The input of the SA module is the result of the element-wise multiplication of the original input and the output of the CA module. Two feature maps are generated using two pooling methods; these two feature maps are connected and convolved through a standard convolutional layer, and the result is input into the activation function to obtain the final attention map; the calculation of the SA module is: Attention SA (X)=σ(f 7×7 ([AvqPool(X);MaxPool(X)])) In the formula, f 7×7 For convolution operations with a filter size of 7×7, Attention SA (X) is the spatial attention weight matrix, [AvgPool(X); MaxPool(X) is the output of average pooling and max pooling concatenated along the channel dimension; In step (2), the convolutional block attention module CBAM processes the input features through the cascaded channel attention CA module and spatial attention SA module, including: In the formula, X ” For the final optimized output, X ' This is the intermediate feature map after processing by the channel attention module. This is an element-wise multiplication operation.

6. The method for spatiotemporal prediction of ocean thermoclines based on thermodynamic constraints according to claim 1, characterized in that, In step (3), the loss function CostF includes: empirical loss C(Y) true ,Y pred Physical loss C phy (Y pred The expression for the regularization term Reg(W) is: CostF=λ1C(Y true ,Y pred )+X2C phy (Y pred )+λ3Reg(W) In the formula, λ1, λ2, and λ3 are all trainable hyperparameters. λ1 is used to balance the fit between the model's predicted values ​​and the actual observed values, λ2 is used to balance the fit between the model's predicted results and the physical laws, and λ3 controls the regularization strength to prevent the model from overfitting. λ1 = 0.9, λ2 = 0.2, λ3 = 1e -4 ; Experience loss C(Y) true ,Y pred The regularization term Reg(W) is shown below: In the formula, Y true ,Y pred W represents the actual value and the predicted value, respectively. k,l Here, k represents the row index of the weight matrix, and l represents the column index of the weight matrix; The one-dimensional heat balance equation is used as the physical loss term, and the temperature change is balanced by the sum of the turbulent heat transfer diffusion and the radiative heat flux: In the formula, t is time, WT is turbulent heat flux, T(z) is the temperature at depth z, I(z) is radiative heat flux, ρ is seawater density, and C p For isobaric specific heat, C phy (Y pred ) represents the physical loss term, and z represents the vertical depth coordinate; For the heat diffusion term, the following formula is used for calculation: In the formula, K T The turbulent heat transfer rate is taken as 14 × 10⁻⁶. -6 m 2 / s; This is the second derivative of temperature in the vertical direction; At the sea surface \(z = 0\), the radiative heat flux term \(I(z)=I0\); when \(z\neq0\), the heating effect of the radiative heat flux on seawater is represented by the following parameterization function: Where \(a\), \(b\), and \(c\) are all adjustable parameters, satisfying \( ext{0 <}a,b,c ext{ <}1\); \(I0\) is the incident short-wave radiation flux at the sea surface, and \(exp[]\) is the natural exponential function.

7. The method for spatiotemporal prediction of ocean thermoclines based on thermodynamic constraints according to claim 1, characterized in that, In step S3, according to the multi-source sea surface layer data and introducing the time dimension, the spatio-temporal prediction of the temperature from the sea surface layer to different depths underwater includes: Select the training set and the test set and input them into the set ocean thermocline spatio-temporal prediction model based on thermodynamic constraints; the input of the ocean thermocline spatio-temporal prediction model based on thermodynamic constraints is a 5D tensor of \(B\times C\times T\times H\times W\), which is composed of the sea surface characteristics of the past month, and outputs a 5D tensor \(B\times D\times T\times H\times W\) to predict the temperature at 16 different depth levels within 550 meters for the next 40 days; where \(B\) is the batch size, \(C\) is the number of input channels, \(D\) is the number of depth layers, \(T\) is the number of time steps, and \(H\) and \(W\) are the longitude and latitude grid sizes respectively; In view of the differences in the characteristics of the ocean underwater temperature at different depths, the ocean thermocline spatio-temporal prediction models built for different depths respectively are trained using an optimizer, including: The optimizer selected was Adam, an adaptive moment estimator, with the learning rate set to adaptive adjustment based on the gradient changes of each parameter. The initial learning rate was 0.001, and the batch size was 100. After the training of the thermodynamically constrained spatiotemporal prediction models of the ocean thermocline built at different depths was completed, sea surface data was input during the application testing phase to obtain the predicted underwater temperature field data for the next 40 days.

8. The method for spatiotemporal prediction of ocean thermoclines based on thermodynamic constraints according to claim 1, characterized in that, In step S4, a regional identification strategy is adopted: the quasi-step function approximation method (QFA) is used in the shelf region, and the vertical gradient criterion (GC) method is used in the non-shelf region to complete the spatiotemporal extraction of multiple features of the thermocline.

9. A spatiotemporal prediction system for ocean thermoclines based on thermodynamic constraints, characterized in that, The system implementing the thermodynamically constrained spatiotemporal prediction method for ocean thermoclines as described in any one of claims 1-8, the system comprising: The dataset construction and preprocessing module is used for dataset construction and preprocessing. The module for constructing a thermodynamically constrained spatiotemporal prediction model for the ocean thermocline is based on a preprocessed dataset. It adopts an improved ResNet architecture, integrates a 3D-SCConv module for reconstructing three-dimensional spatial channels to capture spatiotemporal information and a CBAM module for executing attention mechanisms to enhance the capture of key spatiotemporal features. The module constructs a thermodynamically constrained spatiotemporal prediction model for the ocean thermocline and embeds the one-dimensional thermal balance equation related to the formation of the thermocline as a physical constraint into the neural network loss function to enhance the physical consistency and interpretability of the prediction results. The model training and application module is used to train and apply the constructed thermodynamically constrained ocean thermocline spatiotemporal prediction model. Based on multi-source sea surface data and the introduction of the time dimension, it completes the spatiotemporal prediction of the sea surface temperature to different underwater depths in the future. The thermocline identification and extraction module is used to extract multiple features of the thermocline in the spatiotemporal manner based on the spatiotemporal prediction results of future underwater temperatures at different depths, combined with the quasi-step function approximation method (QFA) and the vertical gradient criterion (GC) regional identification strategy.

Citation Information

Patent Citations

  • High-resolution ocean thermocline depth rapid reconstruction method based on random forest

    CN119168095A

  • Ocean state variable forecasting method based on thermocline adaptive loss

    CN119646459A