A method, system, device and storage medium for inverting ocean surface salinity
By pre-processing and interpolation processing of the ocean surface brightness data, combined with the salinity intelligent inversion network model, the brightness characteristics are extracted and the model parameters are optimized, and the problem of low salinity inversion accuracy in the existing technology is solved, and a higher precision salinity inversion is achieved.
Patent Information
- Application Number
- CN202510749917.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2045-06-06
AI Technical Summary
The existing marine surface salinity inversion algorithm model has poor generalization ability in different marine circulation areas and cannot effectively capture complex dynamics, resulting in low inversion accuracy.
By obtaining training sunlight temperature data and training monthly salinity data, pre-processing and interpolation processing are performed for time alignment, the salinity intelligent inversion network model is used to extract the bright temperature characteristics, and the model parameters are adjusted through the loss function to optimize the model to improve the inversion accuracy.
It improves the accuracy of marine surface salinity inversion, enhances the expression ability of data characteristics, better captures information at different scales, and improves the generalization ability of the model.
Smart Images

Figure CN120257062B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of ocean remote sensing detection, and in particular relates to a method, system, equipment and storage medium for inverting ocean surface salinity. Background Art
[0002] Ocean surface salinity is a crucial indicator for describing ocean conditions, simulating ocean circulation, and monitoring climate change, and is therefore of great significance to marine research. With the continuous advancement of remote sensing technology, satellite remote sensing has become an important means of obtaining ocean surface salinity data. Once raw brightness temperature data is obtained from satellites, it is necessary to preprocess the data and convert it into corresponding salinity data using an ocean surface salinity inversion model.
[0003] In related technologies, commonly used ocean surface salinity inversion algorithm models include empirical algorithm models, multivariate linear regression models, and ridge regression models.
[0004] For the aforementioned technologies, empirical algorithm model parameters are typically calibrated for specific regions or scenarios. They generally generalize poorly to other regions, such as different ocean circulation zones. Actual salinity in multivariate linear regression models is dominated by nonlinear processes (such as salinity fronts and eddy mixing), and linear models cannot capture complex dynamics. Ridge regression models rely on sufficient historical data for regularization, and their improvement is limited when data is scarce. These models all have limitations, resulting in low salinity inversion accuracy. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a method, system, equipment and storage medium for inverting the salinity of the ocean surface. By mapping the extracted feature output to a higher dimension, the expressive ability of the data features is enhanced, more information of different scales is obtained, and the inversion accuracy is improved.
[0006] A method for inverting ocean surface salinity, comprising:
[0007] Obtain training daily brightness temperature data and training monthly salinity data of the ocean surface;
[0008] After preprocessing the training day brightness temperature data, regional screening is performed to obtain regional brightness temperature data;
[0009] Performing interpolation processing on the training month salinity data to obtain interpolated salinity data;
[0010] Time-aligning the regional brightness data and the interpolated salinity data to obtain a brightness temperature dataset and a salinity dataset;
[0011] Extracting features from the brightness temperature dataset to obtain brightness temperature features, inputting the brightness temperature features into a salinity intelligent inversion network model to obtain an output salinity value, calculating the output salinity value and an output loss value of the salinity dataset using a loss function, and adjusting model parameters of the salinity intelligent inversion network model according to the output loss value to obtain an optimized model;
[0012] The actual brightness temperature data is input into the optimization model to obtain the salinity value.
[0013] Optionally, performing interpolation processing on the training month salinity data to obtain interpolated salinity data includes:
[0014] According to the training monthly salinity data, a target coordinate value, a salinity corresponding to the target coordinate value, four coordinate values nearest to the target coordinate, and salinities corresponding to the four coordinate values are obtained;
[0015] Substituting the target coordinate value, the salinity corresponding to the target coordinate value, the four coordinate values closest to the target coordinate, and the salinity corresponding to the four coordinate values into an interpolation formula to obtain interpolated salinity data;
[0016] The interpolation formula is:
[0017]
[0018] Among them, x and y are the horizontal and vertical coordinates of the target coordinate values. 、 、 as well as are the four coordinate values around the target coordinates, is the interpolated salinity data, and S is the salinity corresponding to the four coordinate values.
[0019] Optionally, the preprocessing of the training day brightness temperature data and then performing regional screening to obtain regional brightness temperature data includes:
[0020] Converting the brightness temperature data of the training day into a format to obtain converted data;
[0021] Correcting the transformed data to obtain corrected data;
[0022] Set a flag bit, which includes an ocean flag bit and other flag bits, the ocean flag bit is 1, and the other flag bits are 0;
[0023] Multiplying the correction data and the marker bit to obtain marker bit data;
[0024] Get the filter area;
[0025] The flag data is filtered according to the filtering area to obtain regional brightness temperature data.
[0026] Optionally, extracting features according to the brightness temperature dataset to obtain brightness temperature features includes:
[0027] The brightness temperature dataset is divided into time series to obtain a plurality of patch data, and the patch data is subjected to a one-dimensional convolution operation to obtain convolution data. The brightness temperature dataset is represented as: H×W×C;
[0028] Where H represents the number of grid points used to construct the brightness temperature dataset, W represents the time length of the constructed brightness temperature dataset, which is 30 days, and C represents the number of channels of the brightness temperature dataset.
[0029] Mapping the convolution data to a fixed embedding dimension D through a linear projection layer to obtain low-dimensional brightness temperature feature data;
[0030] The low-dimensional brightness temperature feature data is sequentially input into the fully connected layer, the self-attention layer, the position encoding layer, and the normalization layer, and the high-dimensional brightness temperature data is used as the brightness temperature feature;
[0031] The fully connected layer is expressed as:
[0032] ;
[0033] Among them, X is the low-dimensional brightness temperature data output by the patch embedding layer and the position encoding layer, with a shape of [H, W / P, D], and Z is the high-dimensional brightness temperature data output after the fully connected layer, with a shape of [H, W / P, M]. is a nonlinear activation function, b is the learnable weight bias of the fully connected layer, is the learnable weight matrix of the fully connected layer, the matrix shape is [D, M], is a dynamic gating factor based on ocean physics priors, and M is the dimension of high-dimensional brightness temperature data.
[0034] Optionally, the weight matrix is obtained by:
[0035] Obtain the mean, variance, maximum brightness temperature value of each month, and minimum brightness temperature value of each month of low-dimensional brightness temperature feature data;
[0036] Substituting the mean, variance, maximum brightness temperature value of each month, and minimum brightness temperature value of each month into a weight matrix formula to obtain a weight matrix;
[0037] The weight matrix formula is:
[0038] ;
[0039] Where f is the mapping function, is the mean, is the variance, max is the maximum brightness temperature value of each month, min is the minimum brightness temperature value of each month, is the weight matrix.
[0040] Optionally, obtaining dynamic gating factors includes:
[0041] Get the average brightness temperature of the ocean surface for the month;
[0042] Get the average brightness temperature of the patch data;
[0043] Obtaining a dynamic gating factor according to the brightness temperature mean, the average brightness temperature, and a judgment formula;
[0044] The judgment formula is:
[0045] ;
[0046] Among them, H is the number of grid points, W is the time length of the constructed brightness temperature dataset, C is the number of channels of the brightness temperature dataset, and P is the segmentation length. is the average brightness temperature value of the original brightness temperature observation value in the time dimension at the grid point H in the W / Pth time patch, is the mean brightness temperature, and To learn the parameters, The value range is 1.5 ~ 2.0, The value range is 0.3 ~ 0.7.
[0047] Optionally, the loss function is expressed as:
[0048] ;
[0049] Where n represents the number of grid points in the target ocean area, represents the measured salinity value corresponding to the i-th grid point, represents the salinity value inverted by the inversion model corresponding to the i-th grid point of the model, and MAE is the loss function value.
[0050] A sea surface salinity inversion system, comprising:
[0051] Acquisition module, used to obtain training day brightness temperature data and training month salinity data of the ocean surface;
[0052] A preprocessing module is used to preprocess the training day brightness temperature data and then perform regional screening to obtain regional brightness temperature data;
[0053] Performing interpolation processing on the training month salinity data to obtain interpolated salinity data;
[0054] an interpolation module, configured to time-align the regional brightness data and the interpolated salinity data to obtain a brightness temperature dataset and a salinity dataset;
[0055] an optimization module, configured to extract features from the brightness temperature dataset to obtain brightness temperature features, input the brightness temperature features into a salinity intelligent inversion network model to obtain an output salinity value, calculate the output salinity value and an output loss value of the salinity dataset using a loss function, and adjust model parameters of the salinity intelligent inversion network model according to the output loss value to obtain an optimized model;
[0056] The output module is used to input the actual brightness temperature data into the optimization model to obtain the salinity value.
[0057] A terminal device includes a memory and a processor. The memory stores a computer program that can be run on the processor. When the processor loads and executes the computer program, a method for inverting the salinity of the ocean surface is adopted.
[0058] A computer-readable storage medium stores a computer program. When the computer program is loaded and executed by a processor, a method for inverting ocean surface salinity is adopted.
[0059] The beneficial effects of the present invention are:
[0060] 1. Pre-process the training day brightness temperature data and then perform regional screening to obtain regional brightness temperature data. Interpolate the training month salinity data to obtain interpolated salinity data. Time-align the regional brightness data and the interpolated salinity data to obtain a brightness temperature dataset and a salinity dataset. Extract features based on the brightness temperature dataset to obtain brightness temperature features. Input the brightness temperature features into the salinity intelligent inversion network model to obtain an output salinity value. Calculate the output salinity value and the output loss value of the salinity dataset through a loss function. According to the output loss value, adjust the model parameters of the salinity intelligent inversion network model to obtain an optimized model. Input the actual brightness temperature data into the optimized model to obtain a salinity value. Compared with the traditional inversion model, the present application inputs brightness temperature features of different scales and dimensions into the inversion network model for training to obtain an optimized model, thereby improving the accuracy of inversion.
[0061] 2. An innovatively improved fully-connected layer is added before the encoding layer, followed by a multi-scale convolutional layer. Compared to the traditional encoder module, the addition of the improved fully-connected layer before the encoder adjusts the dimensionality of the input features, mapping low-dimensional brightness temperature inputs to higher feature dimensions. The input brightness temperature data features after patch embedding and position encoding are relatively simple. The introduction of nonlinearity through the activation function (ReLU) facilitates the extraction of more complex brightness temperature data feature representations in the subsequent encoding layer, thereby improving the model's inversion accuracy.
[0062] 3. When improving the fully connected layer, the weight matrix is dynamically generated by mapping the spatiotemporal statistical characteristics of the brightness temperature data through a mapping function, which has stronger generalized feature extraction capabilities. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 This is a schematic diagram of an image of brightness temperature data before flag bit processing according to the present invention;
[0064] Figure 2 This is a schematic diagram of an image after brightness temperature data of the present invention has been processed with flag bits;
[0065] Figure 3 This is a schematic diagram of the results of regional selection of ocean brightness temperature data in the present invention;
[0066] Figure 4 Schematic diagram of the model structure of the salinity intelligent inversion network model of the present invention;
[0067] Figure 5 The salinity distribution map for August 2022 obtained by the ocean surface inversion model of the salinity intelligent inversion network model of the present invention;
[0068] Figure 6 The present invention is a salinity distribution map for July 2022 obtained by the ocean surface inversion model of the salinity intelligent inversion network model;
[0069] Figure 7 This is a schematic diagram of the inversion results obtained using the optimization model of the present invention. DETAILED DESCRIPTION
[0070] A method for inverting ocean surface salinity, comprising:
[0071] S1. Obtain the training daily brightness temperature data and training monthly salinity data of the ocean surface;
[0072] Specifically, the brightness temperature data observed daily by satellite and the actual measured monthly sea surface salinity data are obtained, and the brightness temperature and salinity dataset corresponding to the ocean scene is processed and constructed. The subset of this dataset reflects the monthly salinity value and daily brightness temperature value corresponding to each grid point (the center point of the grid unit divided by longitude and latitude on the earth's surface) in a certain year and month in the target ocean area. Specifically, for a subset of the brightness temperature and salinity dataset of an ocean scene, assuming that the number of grid points is N, the subset of the dataset can be specifically represented as N rows and 31 columns. The first column is the monthly salinity value corresponding to each grid point, which serves as the training monthly salinity data required for inversion by the inversion model; the second to the 31st columns are the moon temperature values corresponding to each grid point, which serve as the brightness temperature data feature set of the inversion model.
[0073] S2. Preprocess the training day brightness temperature data and then perform regional screening to obtain regional brightness temperature data;
[0074] After preprocessing the training day brightness temperature data, regional screening is performed to obtain regional brightness temperature data including:
[0075] S21, converting the format of the training day brightness temperature data to obtain converted data;
[0076] Specifically, the formats of the training day brightness temperature data and salinity data are different. The brightness temperature data is in the SMOS satellite data format, and the salinity data is in the Argo format. Convert the SMOS brightness temperature data to the NetCDF (.nc) format, which is the same as the Argo data format.
[0077] S22, correcting the transformed data to obtain corrected data;
[0078] Specifically, geometric correction, radiation correction and error correction are performed on the SMOS brightness temperature data to ensure the quality and accuracy of the data.
[0079] S23, setting a flag bit, the flag bit including an ocean flag bit and other flag bits, the ocean flag bit is 1, and the other flag bits are 0;
[0080] S24, multiplying the correction data and the flag bit to obtain flag bit data;
[0081] Specifically, the ocean flag in the land and sea mask in the SMOS data is 1, and all flag bits except 1 in the flag data are set to 0. Then the land and sea mask is multiplied with the SMOS brightness temperature data to filter out the ocean data in the SMOS original data. Figure 1 and Figure 2 The specific images of the SMOS original data before and after flag processing are shown respectively.
[0082] S25, obtaining the screening area;
[0083] S26. Filter the flag data according to the filter area to obtain regional brightness temperature data.
[0084] Specifically, the filter area is the area where salinity needs to be obtained. In this example, the South China Sea area is selected, with longitude and latitude of 110 to 118 degrees east longitude and 8 to 22 degrees north latitude. The data is filtered by determining the longitude and latitude, and the corresponding brightness temperature, longitude and latitude data are extracted. Figure 3 The results of selecting the South China Sea region for ocean brightness temperature data are shown.
[0085] S3, interpolating the training month salinity data to obtain interpolated salinity data;
[0086] Specifically, the measured salinity data undergoes preprocessing by region selection and interpolation to align the spatiotemporal dimensions of the salinity and brightness temperature data, facilitating subsequent data matching. The region selection for the Argo data is consistent with that for the SMOS data, specifically for longitude and latitude between 110 and 118 degrees east and 8 and 22 degrees north. The interpolation process can reduce the precision of the Argo data from 1° × 1° to 0.1° × 0.1°, facilitating subsequent matching with the SMOS data.
[0087] Interpolation processing is performed on the training month salinity data to obtain the interpolated salinity data including:
[0088] According to the training month salinity data, the target coordinate value, the salinity corresponding to the target coordinate value, the four coordinate values closest to the target coordinate, and the salinity corresponding to the four coordinate values are obtained;
[0089] Substitute the target coordinate value, the salinity corresponding to the target coordinate value, the four coordinate values closest to the target coordinate, and the salinity corresponding to the four coordinate values into the interpolation formula to obtain the interpolated salinity data;
[0090] The interpolation formula is:
[0091]
[0092] Among them, x and y are the horizontal and vertical coordinates of the target coordinate values. 、 、 as well as are the four coordinate values around the target coordinates, is the interpolated salinity data, S is the salinity corresponding to the four coordinate values, for example, The coordinates are salinity.
[0093] S4. Time-aligning the regional brightness data and the interpolated salinity data to obtain a brightness temperature dataset and a salinity dataset;
[0094] Specifically, the processed satellite brightness temperature data and salinity data of the same month are effectively time-aligned, and the longitude and latitude of the two are matched. The matched data are combined, outliers and erroneous data are removed, and the accuracy and consistency of the data are ensured to form a complete sea surface brightness temperature and salinity dataset.
[0095] Each subset of the complete sea surface brightness temperature and salinity dataset is normalized. Specifically, the salinity values are normalized to their dynamic range to accommodate salinity differences across different ocean regions, and the brightness temperature data are normalized to 0-255 to simulate the quantization process of remote sensing data.
[0096] The dataset was divided into training and test sets in an 8:2 ratio to obtain the training and test sets required for the inversion model. Specifically, the training set is shaped like [number of grid points, 31], where the first column contains the monthly salinity value corresponding to the grid point, and the next 30 columns contain the daily brightness temperature values corresponding to the grid point.
[0097] S5. Extract features based on the brightness temperature dataset to obtain brightness temperature features, input the brightness temperature features into the salinity intelligent inversion network model to obtain an output salinity value, calculate the output salinity value and the output loss value of the salinity dataset using a loss function, and adjust model parameters of the salinity intelligent inversion network model based on the output loss value to obtain an optimized model;
[0098] The features extracted from the brightness temperature dataset include:
[0099] S51. Divide the brightness temperature dataset into time series to obtain a plurality of patch data, perform a one-dimensional convolution operation on the patch data to obtain convolution data. The brightness temperature dataset is represented as: H×W×C;
[0100] Where H represents the number of grid points used to construct the brightness temperature dataset, W represents the time length of the constructed brightness temperature dataset, which is 30 days, and C represents the number of channels of the brightness temperature dataset.
[0101] S52, mapping the convolution data to a fixed embedding dimension D through a linear projection layer and performing position encoding to obtain low-dimensional brightness temperature feature data;
[0102] S53, inputting the low-dimensional brightness temperature feature data into the fully connected layer, the self-attention layer, the position encoding layer, and the normalization layer in sequence, and taking the high-dimensional brightness temperature data as the brightness temperature feature;
[0103] The fully connected layer is expressed as:
[0104] ;
[0105] Among them, X is the low-dimensional brightness temperature data output by the patch embedding layer and the position encoding layer, with a shape of [H, W / P, D], and Z is the high-dimensional brightness temperature data output after the fully connected layer, with a shape of [H, W / P, M]. is a nonlinear activation function, b is the learnable weight bias of the fully connected layer, is the learnable weight matrix of the fully connected layer, the matrix shape is [D, M], is a dynamic gating factor based on ocean physics priors, and M is the dimension of high-dimensional brightness temperature data.
[0106] Specifically, in order to fully explore the local feature information of brightness temperature data at different scales, a multi-scale convolution structure is introduced after the encoder module to improve the accuracy of the inversion results.
[0107] Specifically, the training set of the dataset is input into the salinity intelligent inversion network model. The brightness temperature data of the training set is used as the input feature set ([number of grid points, 30]), and the salinity data is used as the target set to train the salinity intelligent inversion network model. A loss function is calculated between the salinity values output by the network and the salinity values of the target set. The gradient of the loss function with respect to the model parameters is calculated using a backpropagation algorithm. Based on the gradient of the model parameters, an optimization algorithm is used to update the model parameters. When the loss function is minimized, the model training is stopped, and the salinity intelligent inversion network model is determined to be a suitable ocean surface salinity inversion model.
[0108] The structure of salinity intelligent inversion network model is as follows: Figure 4 As shown, the encoding layer has been optimized and improved based on the characteristics of brightness temperature data. An improved fully connected layer is innovatively added before the encoding layer, and a multi-scale convolutional layer is added after the encoding layer. Compared to the traditional encoder module, adding the improved fully connected layer before the encoder adjusts the dimensionality of the input features, mapping the low-dimensional brightness temperature input to a higher feature dimension. The input brightness temperature data features after patch embedding and positional encoding are relatively simple. The introduction of nonlinearity through the activation function (ReLU) helps to extract more complex brightness temperature data feature representations in the subsequent encoding layer, thereby improving the model's inversion accuracy. The addition of a multi-scale convolutional layer after the encoding layer can capture detailed variations in brightness temperature data at different time scales and spatial neighborhoods. Traditional encoder modules rely on a self-attention mechanism, focusing on capturing global dependencies and lacking local features of the brightness temperature data. The multi-scale convolutional layer compensates for this lack of local feature perception, thereby improving the accuracy of sea surface salinity inversion. In addition, the salinity intelligent inversion network model does not use the decoder in the traditional network for inversion, but combines the characteristics of sea surface salinity inversion to achieve good inversion effects by adjusting the output layer.
[0109] Specifically, the input brightness temperature dataset is a tensor of size H×W×C, where H represents the number of grid points used to construct the brightness temperature dataset; W represents the time span of the constructed brightness temperature dataset, which is 30 days; and C represents the number of channels in the brightness temperature dataset, with C=1. The patch embedding layer divides the width W of the long-term brightness temperature dataset into patches of length P, dividing the sequence into H×W / P patches, each of size 1×P. After flattening the patches, a one-dimensional vector is obtained, which is mapped to a fixed embedding dimension D through a linear projection layer. The shape of all patch embeddings is [H, W / P, D]. After positional encoding, the shape of the dataset remains unchanged, resulting in a low-dimensional brightness temperature feature dataset of shape [H, W / P, D]. The optimized encoding layer and adjusted output layer of this model are described as follows:
[0110] The optimized encoder module consists of multiple modules. Compared to the traditional encoder module (each module includes a self-attention layer, a multi-layer perceptron, layer normalization, and random depth), it has two improvements: the first is the addition of an improved fully connected layer before the encoder module, which combines physical priors with the spatiotemporal statistics of brightness temperature; the second is the addition of a convolutional layer after the encoder. These modules are responsible for extracting complex information from the embedded features to obtain high-dimensional features of the brightness temperature dataset.
[0111] Improved fully connected layer: The low-dimensional brightness temperature data output of the patch embedding layer and position encoding layer after simple feature extraction is mapped to a higher dimension to enhance the expressiveness of data features.
[0112] Self-attention layer: The basic operation of the self-attention mechanism is to map the input features (or patches) into the query (Q), key (K), and value (V) spaces. These values are weightedly aggregated by calculating attention weights, resulting in an output that incorporates the relevant information between different locations in the input high-dimensional brightness temperature data. This output is then restored to its original size [H, W / P, M] by adding a residual connection and normalization. Q, K, and V are obtained by linearly transforming the input X.
[0113] Specifically:
[0114] Assume that the input feature is X∈R H×W×C First, three learnable weight matrices W Q, W K, W V Map input to query, key, and value spaces:
[0115] Q=XW Q , K=XW K , V=XW V .
[0116] Where: Q, K, V∈R H×W×d (d is the attention dimension, usually , here we take d=1).
[0117] Calculate attention weights:
[0118] The attention score is calculated by scaling the dot product and applying Softmax normalization:
[0119]
[0120] The denominator d is used to prevent gradient instability caused by excessively large dot product values, and T is the transposition operation.
[0121] The output dimension is R H×W×d .
[0122] Residual connection and normalization:
[0123] To preserve the original information and stabilize training, the self-attention output needs to be added to the input (residual connection) and then normalized:
[0124] Y=LayerNorm(X+Attention(Q,K,V)).
[0125] Residual connection: X+Attention(⋯).
[0126] Normalization: Normalize each channel of each sample to keep the output and input dimensions the same.
[0127] Multilayer Perceptron (MLP): A multilayer perceptron (MLP) is a feedforward neural network consisting of multiple linear layers and activation functions. It is used to perform nonlinear transformations on features to extract more complex features. In the salinity intelligent inversion network model, MLP is applied after the self-attention layer to further enhance the brightness temperature feature representation capability.
[0128] Layer Normalization: Layer normalization is a standardization technique used to improve training stability and accelerate convergence. It normalizes the features of each sample so that its mean is 0 and its standard deviation is 1. Unlike batch normalization, layer normalization is performed within each sample, rather than across batches.
[0129] Random Depth: Random Depth is a regularization technique used to enhance the generalization ability of the model. During the training process, random depth is used to randomly discard some paths to reduce the model's dependence on certain specific paths, thereby improving the robustness of the model.
[0130] Multi-scale convolutional layer: To fully exploit the local features of brightness temperature data at different scales, a multi-scale convolutional structure is introduced after the encoder module. Considering the continuity and local correlation of brightness temperature data over time, a one-dimensional convolutional layer is used as the basic building block. Different convolution kernel sizes (3, 5, and 7) are set to simultaneously extract the short-term, medium-term, and long-term variations in brightness temperature data. All convolutional layers use a stride of 1 and padding to maintain the output sequence length. The number of output channels is standardized to C = 64.
[0131] Specifically, the input high-dimensional brightness temperature feature data is shaped like [H, W / P, M], where W / P = 3 corresponds to different convolution kernel sizes (3, 5, 7). To adapt to the input requirements of one-dimensional convolution, the feature dimensions are first transposed to [H, M, W / P]. Subsequently, multiple convolution kernels are used to slide along the time dimension to extract features at different scales. The convolution operation uniformly sets the step size to 1, padding the edges to maintain the sequence length, and the number of output channels is set to C = 64 to ensure dimensional consistency of the output features. Finally, local information at each scale is integrated through feature concatenation or weighted fusion, resulting in a multi-scale brightness temperature feature representation with an output shape of [H, C, W / P].
[0132] Compared with traditional convolutional layers and encoders, the multi-scale convolutional layer can provide richer local perception capabilities of time series for subsequent salinity inversion, improve the model's sensitivity and discrimination to brightness temperature changes at different scales, and make the salinity inversion results more accurate.
[0133] In the salinity intelligent inversion network, the output layer maps the high-dimensional feature representation of brightness temperature data obtained from the encoder layer to the final prediction result or target value. In its implementation, it consists of four main components: feature integration, an MLP head (multi-layer perceptron), an activation function, and a linear transformation.
[0134] Feature integration: The task of feature integration is to flatten the encoder output and map it to a fixed-length vector through a linear transformation, converting the multidimensional features output by the encoding layer into a one-dimensional vector suitable for processing by a fully connected network. The encoder output, which has a shape of [H, C, W / P], is flattened into a tensor of shape [H, C × W / P] through a reshape operation for subsequent processing.
[0135] The MLP head (Multi-layer Perceptron) progressively extracts high-order features through multiple layers of nonlinear transformations, ultimately mapping them to the target output space. In the fully connected network, seven fully connected layers are defined and feature fusion is achieved through residual connections. The dimension of each hidden layer is 128. The output of each layer is added to the sum of the outputs of all previous layers, preserving multi-scale information and mitigating vanishing gradients.
[0136] Activation function: Introduces nonlinearity to enhance the model's ability to fit complex patterns. A ReLU activation function is applied after each fully connected layer (except the last one).
[0137] Linear transformation: compresses the features after the first 6 layers of full connection and residual connection into the low-dimensional salinity space required for the task.
[0138] These structures of the output layer enable the model to effectively map the high-dimensional feature brightness temperature data obtained from the encoder to the salinity value results inverted by the final inversion model.
[0139] The method to obtain the weight matrix is:
[0140] Obtain the mean, variance, maximum brightness temperature value of each month, and minimum brightness temperature value of each month of low-dimensional brightness temperature feature data;
[0141] Substitute the mean, variance, maximum brightness temperature value of each month, and minimum brightness temperature value of each month into the weight matrix formula to obtain the weight matrix;
[0142] The weight matrix formula is:
[0143] ;
[0144] Where f is the mapping function, is the mean, is the variance, max is the maximum brightness temperature value of each month, min is the minimum brightness temperature value of each month, is the weight matrix.
[0145] Obtaining dynamic gating factors includes:
[0146] Get the average brightness temperature of the ocean surface for the month;
[0147] Get the average brightness temperature of the patch data;
[0148] According to the brightness temperature mean, average brightness temperature and judgment formula, the dynamic gating factor is obtained;
[0149] The judgment formula is:
[0150] ;
[0151] Among them, H is the number of grid points, W is the time length of the constructed brightness temperature dataset, C is the number of channels of the brightness temperature dataset, and P is the segmentation length. is the average brightness temperature value of the original brightness temperature observation value in the time dimension at the grid point H in the W / Pth time patch, is the mean brightness temperature, and To learn the parameters, The value range is 1.5 ~ 2.0, The value range is 0.3 ~ 0.7.
[0152] The loss function is expressed as:
[0153] ;
[0154] Where n represents the number of grid points in the target ocean area, represents the measured salinity value corresponding to the i-th grid point, represents the salinity value inverted by the inversion model corresponding to the i-th grid point of the model, and MAE is the loss function value.
[0155] S6. Input the actual brightness temperature data into the optimization model to obtain the salinity value.
[0156] Specific examples are as follows:
[0157] Figure 5 It shows that the salinity data for August 2022 were inverted using the brightness temperature data from June, July and August 2015 to 2017 as the dataset and the buoy data as the label. Figure 6 The figure shows the salinity data for July 2022, obtained by inverting brightness temperature data from June, July, and August 2015 to 2017 as the dataset and buoy data as the label. The figure shows that the inverted salinity in the South China Sea is similar to the actual salinity distribution.
[0158] Figure 7 It reflects that the MSE of the data for June, July and August of 2018 obtained by inverting the data from June, July and August of 2015 to 2017 based on the brightness temperature-convolutional collaborative coding network are 0.072, 0.1146 and 0.2113 respectively. Compared with using the data of this period as a training set to invert the data of 2019, 2020, 2021 and 2022, the MSE of the inverted data of 2018 is relatively the smallest. And as time increases, the value of MAE also has a trend of increasing. For example, using the data from 2015 to July 2017 as a training set, the MAE of the data from 2018 to July 2022 obtained by inversion are 0.1146, 0.1341, 0.1880, 0.1955 and 0.2261 respectively. It can be seen that the accuracy of the ocean surface salinity obtained by the inversion method used in this application is higher.
[0159] A sea surface salinity inversion system, comprising:
[0160] Acquisition module, used to obtain training day brightness temperature data and training month salinity data of the ocean surface;
[0161] The preprocessing module is used to preprocess the training day brightness temperature data and then perform regional screening to obtain regional brightness temperature data;
[0162] Interpolate the training month salinity data to obtain interpolated salinity data;
[0163] The interpolation module is used to time-align the regional brightness data and the interpolated salinity data to obtain the brightness temperature dataset and the salinity dataset;
[0164] An optimization module is used to extract features from the brightness temperature dataset to obtain brightness temperature features, input the brightness temperature features into the salinity intelligent inversion network model to obtain an output salinity value, calculate the output salinity value and the output loss value of the salinity dataset through a loss function, and adjust the model parameters of the salinity intelligent inversion network model according to the output loss value to obtain an optimized model;
[0165] The output module is used to input the actual brightness temperature data into the optimization model to obtain the salinity value.
[0166] An embodiment of the present application also discloses a terminal device, including a memory and a processor. The memory stores a computer program that can be run on the processor. When the processor loads and executes the computer program, a method for inverting the salinity of the ocean surface is adopted.
[0167] Among them, the terminal device can be a computer device such as a desktop computer, a laptop computer or a cloud server, and the terminal device includes but is not limited to a processor and a memory. For example, the terminal device can also include input and output devices, network access devices and buses, etc.
[0168] Among them, the processor can adopt a central processing unit (CPU). Of course, according to actual usage, other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. can also be adopted. The general-purpose processor can adopt a microprocessor or any conventional processor, etc., and this application does not impose any restrictions on this.
[0169] Among them, the memory can be an internal storage unit of the terminal device, such as the hard disk or memory of the terminal device, or it can be an external storage device of the terminal device, such as a plug-in hard disk, smart memory card (SMC), secure digital card (SD) or flash memory card (FC) equipped on the terminal device, etc., and the memory can also be a combination of the internal storage unit and the external storage device of the terminal device. The memory is used to store computer programs and other programs and data required by the terminal device. The memory can also be used to temporarily store data that has been output or is to be output. This application does not impose any restrictions on this.
[0170] Among them, through this terminal device, a method for inverting the salinity of the ocean surface in the above embodiment is stored in the memory of the terminal device, and is loaded and executed on the processor of the terminal device for easy use.
[0171] An embodiment of the present application further discloses a computer-readable storage medium, and the computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, a method for inverting ocean surface salinity in the above embodiment is adopted.
[0172] Among them, the computer program can be stored in a computer-readable medium, the computer program includes computer program code, the computer program code can be in the form of source code, object code, executable file or certain middleware, etc. The computer-readable medium includes any entity or device that can carry computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that computer-readable medium includes but is not limited to the above-mentioned components.
[0173] Among them, through this computer-readable storage medium, a method for inverting the salinity of the ocean surface in the above embodiment is stored in a computer-readable storage medium, and is loaded and executed on a processor to facilitate the storage and application of the above method.
[0174] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of protection of the present application is limited to these examples. In line with the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of different aspects of one or more embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0175] The one or more embodiments of this application are intended to encompass all such substitutions, modifications, and variations that fall within the broad scope of this application. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of this application should be included in the scope of protection of this application.
Claims
1. A method for inverting ocean surface salinity, characterized in that: include: Obtain training daily brightness temperature data and training monthly salinity data of the ocean surface; After preprocessing the training day brightness temperature data, regional screening is performed to obtain regional brightness temperature data; Performing interpolation processing on the training month salinity data to obtain interpolated salinity data; Time-aligning the regional brightness temperature data and the interpolated salinity data to obtain a brightness temperature dataset and a salinity dataset; Extracting features from the brightness temperature dataset to obtain brightness temperature features, inputting the brightness temperature features into a salinity intelligent inversion network model to obtain an output salinity value, calculating the output salinity value and an output loss value of the salinity dataset using a loss function, and adjusting model parameters of the salinity intelligent inversion network model according to the output loss value to obtain an optimized model; Inputting actual brightness temperature data into the optimization model to obtain salinity value; Extracting features based on the brightness temperature dataset to obtain brightness temperature features includes: The brightness temperature dataset is divided into time series to obtain a plurality of patch data, and the patch data is subjected to a one-dimensional convolution operation to obtain convolution data. The brightness temperature dataset is represented as: H×W×C; Where H represents the number of grid points used to construct the brightness temperature dataset, W represents the time length of the constructed brightness temperature dataset, which is 30 days, and C represents the number of channels of the brightness temperature dataset. Mapping the convolution data to a fixed embedding dimension D through a linear projection layer to obtain low-dimensional brightness temperature feature data; The low-dimensional brightness temperature feature data is sequentially input into the fully connected layer, the self-attention layer, the position encoding layer, and the normalization layer to obtain high-dimensional brightness temperature data, which is used as the brightness temperature feature; The fully connected layer is expressed as: ; Among them, X is the low-dimensional brightness temperature data output by the patch embedding layer and the position encoding layer, with a shape of [H, W / P, D], and Z is the high-dimensional brightness temperature data output after the fully connected layer, with a shape of [H, W / P, M]. is a nonlinear activation function, b is the learnable weight bias of the fully connected layer, is the learnable weight matrix of the fully connected layer, the matrix shape is [D, M], It is a dynamic gating factor based on ocean physics priors, M is the dimension of high-dimensional brightness temperature data, and P is the segmentation length.
2. The method for inverting ocean surface salinity as claimed in claim 1, wherein: The interpolation processing of the training month salinity data to obtain interpolated salinity data includes: According to the training monthly salinity data, a target coordinate value, a salinity corresponding to the target coordinate value, four coordinate values nearest to the target coordinate, and salinities corresponding to the four coordinate values are obtained; Substituting the target coordinate value, the salinity corresponding to the target coordinate value, the four coordinate values closest to the target coordinate, and the salinity corresponding to the four coordinate values into an interpolation formula to obtain interpolated salinity data; The interpolation formula is: Among them, x and y are the horizontal and vertical coordinates of the target coordinate values. 、 as well as are the four coordinate values around the target coordinates, is the interpolated salinity data, and S is the salinity corresponding to the four coordinate values.
3. The method for inverting ocean surface salinity as claimed in claim 1, wherein: The pre-processing of the training day brightness temperature data and the regional screening to obtain regional brightness temperature data include: Converting the brightness temperature data of the training day into a format to obtain converted data; Correcting the transformed data to obtain corrected data; Set a flag bit, which includes an ocean flag bit and other flag bits, the ocean flag bit is 1, and the other flag bits are 0; Multiplying the correction data and the marker bit to obtain marker bit data; Get the filter area; The flag data is filtered according to the filtering area to obtain regional brightness temperature data.
4. The method for inverting ocean surface salinity as claimed in claim 1, wherein: The method for obtaining the weight matrix is: Obtain the mean, variance, maximum brightness temperature value of each month, and minimum brightness temperature value of each month of low-dimensional brightness temperature feature data; Substituting the mean, variance, maximum brightness temperature value of each month, and minimum brightness temperature value of each month into a weight matrix formula to obtain a weight matrix; The weight matrix formula is: ; Where f is the mapping function, is the mean, is the variance, max is the maximum brightness temperature value of each month, min is the minimum brightness temperature value of each month, is the weight matrix.
5. The method for inverting ocean surface salinity as claimed in claim 1, wherein: Obtaining dynamic gating factors includes: Get the average brightness temperature of the ocean surface for the month; Get the average brightness temperature of the patch data; Obtaining a dynamic gating factor according to the brightness temperature mean, the average brightness temperature, and a judgment formula; The judgment formula is: ; Among them, H is the number of grid points, W is the time length of the constructed brightness temperature dataset, C is the number of channels of the brightness temperature dataset, and P is the segmentation length. is the average brightness temperature value of the original brightness temperature observation value in the time dimension at the grid point H in the W / Pth time patch, is the mean brightness temperature, and To learn the parameters, The value range is 1.5 ~ 2.0, The value range is 0.3 ~ 0.
7.
6. The method for inverting ocean surface salinity as claimed in claim 1, wherein: The loss function is expressed as: ; Where n represents the number of grid points in the target ocean area, represents the measured salinity value corresponding to the i-th grid point, represents the salinity value inverted by the inversion model corresponding to the i-th grid point of the model, and MAE is the loss function value.
7. A system for inverting ocean surface salinity, characterized by: include: Acquisition module, used to obtain training day brightness temperature data and training month salinity data of the ocean surface; A preprocessing module is used to preprocess the training day brightness temperature data and then perform regional screening to obtain regional brightness temperature data; Performing interpolation processing on the training month salinity data to obtain interpolated salinity data; an interpolation module, configured to time-align the regional brightness temperature data and the interpolated salinity data to obtain a brightness temperature dataset and a salinity dataset; an optimization module, configured to extract features from the brightness temperature dataset to obtain brightness temperature features, input the brightness temperature features into a salinity intelligent inversion network model to obtain an output salinity value, calculate the output salinity value and an output loss value of the salinity dataset using a loss function, and adjust model parameters of the salinity intelligent inversion network model according to the output loss value to obtain an optimized model; an output module, for inputting actual brightness temperature data into the optimization model to obtain a salinity value; Extracting features based on the brightness temperature dataset to obtain brightness temperature features includes: The brightness temperature dataset is divided into time series to obtain a plurality of patch data, and the patch data is subjected to a one-dimensional convolution operation to obtain convolution data. The brightness temperature dataset is represented as: H×W×C; Where H represents the number of grid points used to construct the brightness temperature dataset, W represents the time length of the constructed brightness temperature dataset, which is 30 days, and C represents the number of channels of the brightness temperature dataset. Mapping the convolution data to a fixed embedding dimension D through a linear projection layer to obtain low-dimensional brightness temperature feature data; The low-dimensional brightness temperature feature data is sequentially input into the fully connected layer, the self-attention layer, the position encoding layer, and the normalization layer to obtain high-dimensional brightness temperature data, which is used as the brightness temperature feature; The fully connected layer is expressed as: ; Among them, X is the low-dimensional brightness temperature data output by the patch embedding layer and the position encoding layer, with a shape of [H, W / P, D], and Z is the high-dimensional brightness temperature data output after the fully connected layer, with a shape of [H, W / P, M]. is a nonlinear activation function, b is the learnable weight bias of the fully connected layer, is the learnable weight matrix of the fully connected layer, the matrix shape is [D, M], It is a dynamic gating factor based on ocean physics priors, M is the dimension of high-dimensional brightness temperature data, and P is the segmentation length.
8. A terminal device comprising a memory and a processor, characterized in that: The memory stores a computer program that can be run on the processor. When the processor loads and executes the computer program, the method according to any one of claims 1 to 6 is adopted.
9. A computer-readable storage medium storing a computer program, wherein: When the computer program is loaded and executed by a processor, the method according to any one of claims 1 to 6 is adopted.
Citation Information
Patent Citations
Sea surface salinity inversion method for active and passive microwave salinity meter based on machine learning
CN110532662A