Lake chlorophyll inversion method based on global-local feature fusion
By employing a global-local feature fusion method and combining graph attention network and PatchEncoder module with a one-way cross attention mechanism, the universality and accuracy issues of existing lake chlorophyll a inversion models are resolved, achieving high-precision inversion results for multiple lakes and multiple time phases.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA UNIV OF GEOSCIENCES (WUHAN)
- Filing Date
- 2025-11-25
- Publication Date
- 2026-04-10
AI Technical Summary
Existing technologies struggle to construct lake chlorophyll a inversion models that combine universality and high accuracy under limited sample conditions. It is difficult to balance model generalization and accuracy, and training data acquisition is also limited.
A global-local feature fusion method is adopted. Global features between lakes are extracted through graph attention network, local features are extracted by PatchEncoder module, and feature fusion is achieved through one-way cross attention mechanism and gating fusion mechanism. Chlorophyll a concentration is predicted by convolutional neural network.
High-precision chlorophyll a inversion was achieved under multiple lakes and multiple time phases, improving the model's adaptability and generalization performance, and significantly enhancing the stability and accuracy of the inversion results.
Smart Images

Figure CN121837873A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of lake chlorophyll a inversion technology, and in particular to a lake chlorophyll a inversion method based on global-local feature fusion. Background Technology
[0002] Chlorophyll-a (Chla), as an important bio-optical parameter reflecting the trophic status of water bodies, is a key indicator in lake eutrophication assessment and water quality monitoring. Utilizing satellite remote sensing technology to retrieve chlorophyll-a concentrations in lakes enables dynamic monitoring and spatiotemporal variation analysis of large-scale aquatic environments. Currently, methods for remote sensing retrieval of Chla concentrations are mainly divided into three categories: analytical methods, semi-empirical methods, and machine learning methods. Machine learning methods are essentially an extension of semi-empirical models, possessing stronger nonlinear modeling and feature learning capabilities compared to traditional methods, and are therefore widely used in the field of water quality parameter retrieval.
[0003] However, existing methods still face two major challenges. First, it is difficult to balance model generalization and accuracy. The complex composition of water bodies and the significant spatial heterogeneity among different lakes lead to large differences in spectral characteristics. This complexity makes it extremely challenging to establish a universal inversion model that can adapt to multiple lake regions while maintaining high accuracy. Second, the availability of training data is limited. Machine learning models typically rely on a large number of high-quality satellite-ground synchronized samples for training, but the existing field measurement samples are limited in number and unevenly distributed, severely restricting further improvements in model performance. To address these issues, common solutions include: one is to perform regional modeling and inversion based on water body optical type classification to mitigate the impact of spectral differences; the other is to construct and publish water body measurement datasets to provide more sample sources for model training. Although these methods improve model performance to some extent, they still suffer from insufficient data, strong regional dependence of models, and difficulty in achieving unified parameterization, making it difficult to support large-scale, high spatiotemporal resolution lake Chla inversion tasks. Therefore, how to fully explore the potential information correlations among multiple lakes under limited sample conditions and construct a lake chlorophyll a inversion model with universality and high accuracy has become a key scientific problem that urgently needs to be solved in the field of remote sensing water quality monitoring. Summary of the Invention
[0004] The purpose of this invention is to address the problem in existing technologies that make it difficult to fully explore the potential information correlations among multiple lakes, thus hindering the construction of a chlorophyll a retrieval model that is both universal and highly accurate. This invention proposes a lake chlorophyll a retrieval method based on global-local feature fusion, comprising the following steps: S1. Acquire satellite spectral and water quality remote sensing data of multiple lakes, sample the spectral remote sensing data of each lake to obtain the spectral patch of each sampling point, and obtain the corresponding chlorophyll a concentration sample from the water quality remote sensing data. S2. Using lakes as nodes, extract the average spectral remote sensing data and auxiliary environmental parameters of the lakes, calculate the cosine similarity between lakes, construct a sparse adjacency matrix based on the similarity, and use a graph attention network to extract global features between lakes to obtain the feature vector of lake nodes. S3. Encode the spectral patch of each sampling point, extract local features, and obtain the feature vector of the sampling point; S4. Construct a query vector using the feature vectors of the sampling points and construct key and value vectors using the feature vectors of the lake nodes. Execute a one-way cross-attention mechanism to fuse the feature vectors of the lake nodes and the feature vectors of the sampling points to obtain a fused feature vector. S5. Input the fused feature vector into the chlorophyll a inversion model, use the chlorophyll a concentration samples as label data, train the model, and use the trained model for chlorophyll a concentration prediction.
[0005] Furthermore, multi-source satellite spectral remote sensing data for multiple lakes were acquired, including: Multi-source satellite optical remote sensing image data of the lake area was acquired, atmospheric correction and band selection were performed on the optical images, the reflectance of each band of the optical remote sensing images was limited to the range of 0–0.1, and pixels that did not meet the conditions were removed.
[0006] Furthermore, for each lake node, only the three neighboring nodes with the highest similarity are retained, and the remaining weights are reset to zero, forming a sparse graph structure.
[0007] Furthermore, the unidirectional cross-attention mechanism includes the following computational relationships:
[0008]
[0009]
[0010]
[0011] in, This represents the attention result, where Q is the query vector, K is the key vector, and V is the value vector. , and It is a linear projection matrix of Q, K, and V. Represents the feature vector of the sampling point. This represents the feature vector of a lake node.
[0012] Furthermore, a gating factor is calculated based on the Euclidean distance between the feature vectors of lake nodes and the feature vectors of sampling points, adaptively adjusting the fusion ratio of global and local feature vectors, expressed by the formula:
[0013]
[0014] in, Let G represent the fused feature vector, and G represent the gating factor. Represents the feature vector of the sampling point. Represents the feature vector of a lake node. This represents the learnable transformation parameters used to calculate the gating factor. This represents the activation function. express and Euclidean distance.
[0015] Furthermore, a two-layer graph attention network is used to extract global features between lakes. The output dimension of the first-layer graph attention network is 64, and the output dimension of the second-layer graph attention network is 32. At the same time, a residual branch is set up, and the input of the first-layer graph attention network is linearly mapped and added to the output of the second layer.
[0016] Furthermore, the chlorophyll a inversion model employs a convolutional neural network.
[0017] The present invention also proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for lake chlorophyll a inversion based on global-local feature fusion.
[0018] The present invention also proposes an electronic device, including a processor and a memory, wherein the processor and the memory are interconnected, wherein the memory is used to store a computer program, the computer program including computer-readable instructions, and the processor is configured to invoke the computer-readable instructions to execute the above-described lake chlorophyll a inversion method based on global-local feature fusion.
[0019] The present invention also proposes a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-described lake chlorophyll a inversion method based on global-local feature fusion.
[0020] The beneficial effects of the technical solution provided by this invention are: This invention proposes an inversion method combining global-local feature fusion. It introduces features from a global lake layer and a local sampling point layer, using lakes as nodes. Lake feature maps are constructed using the average spectral features of the lakes and environmental auxiliary data. Based on cosine similarity, feature associations between lakes are calculated, retaining only the most representative adjacent connections, thus achieving structural modeling of spectral similarity between lakes. A graph attention network dynamically aggregates feature information from similar lakes to obtain a global representation reflecting spatial associations and ecological consistency between lakes. At the local level, this invention uses a PatchEncoder module to perform convolutional feature encoding on local spectral patches of sampling points, learning spatial context relationships and neighborhood spectral variation features to generate stable local representation vectors. Subsequently, a global-local feature fusion mechanism is designed, using sampling point features as query vectors and lake features as key-value pairs for unidirectional cross-attention calculation, achieving association guidance from sampling point features to global lake features, thereby introducing global lake background information into local spatial features. A gated fusion mechanism is further introduced, adaptively adjusting the feature dependency based on the Euclidean distance between the fused features and the original sampling point features. When the difference is large, it relies more on the sampling point features, and when the difference is small, it relies more on lake features, achieving a dynamic balance in feature fusion. Finally, the fused features are input into a convolutional neural network for chlorophyll a concentration inversion, obtaining pixel-level Chla prediction results. This invention achieves the synergistic fusion of global inter-lake structural correlations and local sampling point feature representations at the model level, fully exploring the potential information correlations among multiple lakes and enhancing the model's adaptability and generalization performance to lake spectral heterogeneity. At the feature level, it achieves complementary representation of global statistical features and local spatial features, significantly improving the stability and accuracy of the inversion results. At the application level, this invention can achieve high-precision Chla inversion and cross-regional generalization for multiple lakes and multiple time phases under limited sample conditions. Attached Figure Description
[0021] Figure 1 This is a flowchart of the lake chlorophyll a inversion method based on global-local feature fusion according to an embodiment of the present invention; Figure 2 This is a structural diagram of the PatchEncoder module in an embodiment of the present invention; Figure 3 This is a structural diagram of the convolutional neural network for chlorophyll a inversion according to an embodiment of the present invention; Figure 4 This is a block diagram of an electronic device according to an exemplary embodiment of the present invention. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0023] The flowchart of the lake chlorophyll a inversion method based on global-local feature fusion in this embodiment of the invention is as follows: Figure 1 Specifically, it includes the following steps: S1. Acquire satellite spectral and water quality remote sensing data for multiple lakes, specifically including: acquiring multi-source satellite remote sensing imagery, including Sentinel-2 optical remote sensing images and Sentinel-3 water quality product data. Sentinel-2 is used to provide high-resolution spectral information, while Sentinel-3 is used to provide water quality parameters and spatial consistency constraints. Radiometric and atmospheric corrections are performed on the Sentinel-2 images to obtain surface reflectance data. Subsequently, sample points are selected within the lake area, and their corresponding 5×5 spectral patches are extracted. To ensure sample quality, a three-stage screening process is used to obtain high-confidence sampling point patch data, which is then matched with their corresponding measured chlorophyll a concentration samples.
[0024] The three-stage screening process is as follows: (1) Reflectance range constraint: The reflectance of each band is limited to [0, 0.1]. If it exceeds the range, it will be removed; (2) Local consistency constraint: The local standard deviation of the spectrum within the patch is calculated. If it exceeds the threshold, it is considered a spatially unstable pixel and is removed; (3) Gradient constraint screening: Based on the gradient confidence index constructed from Sentinel-3 data, samples with abnormal gradients or low confidence are removed.
[0025] And obtain the corresponding chlorophyll a concentration samples from water quality remote sensing data.
[0026] S2. To characterize the global similarity and structural dependencies among lakes, each lake is treated as a node for feature modeling. First, the average spectral feature vector of each lake (i.e., the average of the multispectral reflectance within the lake area) is calculated, and combined with auxiliary environmental parameters (such as lake area, water temperature, turbidity, etc.) to form a lake feature vector representation. Then, a cosine similarity matrix is calculated based on the feature vectors of all lakes to measure the spectral similarity between lakes. The cosine similarity calculation formula is as follows:
[0027] in, and The first and the The feature vectors of each lake include average spectral and environmental attribute parameters; Indicates the first and the Cosine similarity of the lakes.
[0028] To avoid redundant connections, only the connections between each lake and its highest-similar neighboring lake nodes are retained, and the remaining weights are reset to zero, resulting in a sparse adjacency matrix A. Using these features and adjacency relationships, a lake layer graph structure is constructed. ,in Let E represent the set of lake nodes, E represent the set of edges, and A represent the adjacency matrix. This invention retains only the three most similar neighboring nodes for each lake node, setting the weights of the remaining nodes to zero to form a sparse graph structure. A sparse adjacency matrix is constructed, and a graph attention network is used to extract global features between lakes. Adjacent node information is dynamically aggregated through an attention weight mechanism, thereby obtaining a lake node feature vector that integrates spatial similarity and ecological consistency. .
[0029] The adjacency matrix A is:
[0030] The formula for the attention-based update of lake feature representation stage is expressed as:
[0031]
[0032] in, This represents the value in the i-th row and j-th column of the adjacency matrix. This represents the feature similarity value between the i-th lake and the j-th lake. This represents the activation function. This represents the attention coefficients of the i-th and j-th nodes. Let represent the set of neighboring nodes of the i-th node, and W represent the matrix of node feature transformation. Let represent the feature vector of the j-th node, and α represent the function for calculating the correlation between two nodes. This represents the feature vector of the k-th node. This represents the feature vector of the i-th node. In one exemplary embodiment, a two-layer graph attention network is used to extract global features between lakes. The output dimension of the first-layer graph attention network is 64, and the output dimension of the second-layer graph attention network is 32. At the same time, a residual branch is set up. The input of the first-layer graph attention network is linearly mapped and then added to the output of the second layer to achieve stable updating of node features.
[0033] S3. Encode the spectral patch for each sampling point, learn the local spatial and spectral context information through the PatchEncoder module, extract local features, and obtain a fixed-length sampling point feature vector.
[0034] In one exemplary embodiment, a PatchEncoder module is designed to fully learn the local spatial texture and contextual information of the water body spectrum, and its structure diagram is shown below. Figure 2 The input patch data has a shape of (5,5,7), representing a spatial neighborhood containing 7 spectral bands. The PatchEncoder module consists of three sequentially connected 2D convolutional layers with kernel sizes of 5×5, 5×5, and 3×3, and channel numbers of 32, 64, and 64 respectively. The first two 2D convolutional layers are followed by batch normalization layers (Conv2D+BN), the third 2D convolutional layer is followed by a global average pooling layer, and finally, a fully connected (Dense) layer outputs a 64-dimensional local feature vector. The final output feature is a fixed-length feature vector of sampled points. , is used to describe the consistency of local spatial spectral distribution with its neighborhood.
[0035] S4. To achieve deep fusion of global lake features and local sampling point features, a query vector is constructed using the sampling point feature vector, and key and value vectors are constructed using the lake node feature vector. A one-way cross-attention mechanism is executed to extract global lake information associated with the sampling points. The lake node feature vector and the sampling point feature vector are then fused to obtain a fused feature vector. The one-way cross-attention mechanism includes the following computational relationships:
[0036]
[0037]
[0038]
[0039] in, This represents the attention result, where Q is the query vector, K is the key vector, and V is the value vector. , and It is a linear projection matrix of Q, K, and V. Represents the feature vector of the sampling point. This represents the feature vector of a lake node.
[0040] By employing attention weighting, the lake feature information most relevant to the sampling points is extracted, achieving a one-way fusion process of "sampling point guidance - lake feature enhancement". A gating factor is calculated based on the Euclidean distance between the lake node feature vector and the sampling point feature vector, adaptively adjusting the fusion ratio of global and local feature vectors, expressed by the formula:
[0041]
[0042] in, Let G represent the fused feature vector, and G represent the gating factor, with a value between 0 and 1, which controls the fusion weights of local and global information. Represents the feature vector of the sampling point. Represents the feature vector of a lake node. This represents the learnable transformation parameters used to calculate the gating factor. This represents the activation function. express and Euclidean distance.
[0043] A larger distance indicates that the global features deviate from the local features, and G approaches 1, indicating a greater reliance on the features of the sampled points. Conversely, a smaller distance indicates that G approaches 0, indicating a greater reliance on the global lake features. This mechanism ensures the adaptability and stability of feature fusion under different lake conditions, allowing the model to flexibly adjust the degree of global dependence according to the data characteristics.
[0044] S5. Input the fused feature vector into the chlorophyll a inversion model, use the chlorophyll a concentration samples as label data, train the model, and use the trained model for chlorophyll a concentration prediction.
[0045] In an exemplary embodiment, the chlorophyll a inversion model employs a convolutional neural network, the structure of which is shown in the diagram below. Figure 3 The algorithm consists of two cascaded one-dimensional convolutional layers. The first layer comprises two cascaded one-dimensional convolutions and one one-dimensional pooling layer. The second layer comprises two cascaded one-dimensional convolutions, one two-dimensional global pooling layer, and one batch normalization (BN) layer. After a dropout layer and two fully connected (Dense) layers, the predicted chlorophyll a concentration is output. Finally, the predicted results for all sampling points are mapped to a spatial range to generate a chlorophyll a distribution map of the lake region, achieving spatialized and high-precision remote sensing inversion of lake water quality.
[0046] In this invention, the end-to-end inversion process that integrates CNNs not only achieves comprehensive utilization of spectral-spatial information, but also significantly improves the model's generalization ability under different lakes and time conditions.
[0047] In one exemplary embodiment, a computer-readable storage medium is included, which stores a computer program that, when executed by a processor, implements the above-described method for lake chlorophyll a inversion based on global-local feature fusion.
[0048] Please see Figure 4 In one exemplary embodiment, the device further includes an electronic device including at least one processor, at least one memory, and at least one communication bus.
[0049] The memory stores a computer program, which includes computer-readable instructions. The processor calls the computer-readable instructions stored in the memory through the communication bus to execute the above-mentioned lake chlorophyll a inversion method based on global-local feature fusion.
[0050] In one exemplary embodiment, a computer program product is proposed, comprising a computer program / instruction that, when executed by a processor, implements the steps of the above-described method for retrieving lake chlorophyll a based on global-local feature fusion.
[0051] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for inverting lake chlorophyll a based on global-local feature fusion, characterized in that, Includes the following steps: S1. Acquire satellite spectral and water quality remote sensing data of multiple lakes, sample the spectral remote sensing data of each lake to obtain the spectral patch of each sampling point, and obtain the corresponding chlorophyll a concentration sample from the water quality remote sensing data. S2. Using lakes as nodes, extract the average spectral remote sensing data and auxiliary environmental parameters of the lakes, calculate the cosine similarity between lakes, construct a sparse adjacency matrix based on the similarity, and use a graph attention network to extract global features between lakes to obtain the feature vector of lake nodes. S3. Encode the spectral patch of each sampling point, extract local features, and obtain the feature vector of the sampling point; S4. Construct a query vector using the feature vectors of the sampling points and construct key and value vectors using the feature vectors of the lake nodes. Execute a one-way cross-attention mechanism to fuse the feature vectors of the lake nodes and the feature vectors of the sampling points to obtain a fused feature vector. S5. Input the fused feature vector into the chlorophyll a inversion model, use the chlorophyll a concentration samples as label data, train the model, and use the trained model for chlorophyll a concentration prediction.
2. The lake chlorophyll a inversion method based on global-local feature fusion according to claim 1, characterized in that, Acquire multi-source satellite spectral remote sensing data for multiple lakes, including: Multi-source satellite optical remote sensing image data of the lake area was acquired, atmospheric correction and band selection were performed on the optical images, the reflectance of each band of the optical remote sensing images was limited to the range of 0–0.1, and pixels that did not meet the conditions were removed.
3. The lake chlorophyll a inversion method based on global-local feature fusion according to claim 1, characterized in that, For each lake node, only the three neighboring nodes with the highest similarity are retained, and the weights of the rest are reset to zero, forming a sparse graph structure.
4. The lake chlorophyll a inversion method based on global-local feature fusion according to claim 1, characterized in that, The unidirectional cross-attention mechanism includes the following computational relationships: in, This represents the attention result, where Q is the query vector, K is the key vector, and V is the value vector. , and It is a linear projection matrix of Q, K, and V. Represents the feature vector of the sampling point. This represents the feature vector of a lake node.
5. The lake chlorophyll a inversion method based on global-local feature fusion according to claim 1, characterized in that, The gating factor is calculated based on the Euclidean distance between the feature vectors of lake nodes and the feature vectors of sampling points, and the fusion ratio of global and local feature vectors is adaptively adjusted, as expressed by the formula: in, Let G represent the fused feature vector, and G represent the gating factor. Represents the feature vector of the sampling point. Represents the feature vector of a lake node. This represents the learnable transformation parameters used to calculate the gating factor. This represents the activation function. express and Euclidean distance.
6. The lake chlorophyll a inversion method based on global-local feature fusion according to claim 1, characterized in that, A two-layer graph attention network is used to extract global features between lakes. The output dimension of the first-layer graph attention network is 64, and the output dimension of the second-layer graph attention network is 32. At the same time, a residual branch is set up. The input of the first-layer graph attention network is linearly mapped and then added to the output of the second layer.
7. The lake chlorophyll a inversion method based on global-local feature fusion according to claim 1, characterized in that, The chlorophyll a inversion model uses a convolutional neural network.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it implements the method as described in any one of claims 1-7.
9. An electronic device, characterized in that, The device includes a processor and a memory interconnected thereto, wherein the memory is used to store a computer program, the computer program including computer-readable instructions, and the processor is configured to invoke the computer-readable instructions to perform the method as described in any one of claims 1-7.
10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1-7.