Method and system for inverting lake chlorophyll based on annealing optimized LSTM algorithm

By using an annealing-optimized MHA-LSTM model, combined with multi-head local self-attention and attention gating mechanisms, the performance limitations of chlorophyll inversion models in processing high-dimensional spectral data and long-term series data are addressed. This results in high-precision and efficient chlorophyll concentration prediction, applicable to various lake environments.

CN118658080BActive Publication Date: 2024-11-22NANJING UNIV OF INFORMATION SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411150514.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2024-11-22
Estimated Expiration
2044-08-21

AI Technical Summary

Technical Problem

Existing chlorophyll retrieval models have performance limitations when processing high-dimensional spectral data and long-term series data, especially in adapting to and generalizing to different lake environments.

Method used

We employ a multi-head self-attention long short-term memory network (MHA-LSTM) model based on annealing optimization, combining multi-head local self-attention and attention gating mechanisms. The model parameters are dynamically adjusted through the annealing optimization algorithm to optimize the model hyperparameters and improve prediction accuracy and efficiency.

Benefits of technology

It significantly improves the accuracy and robustness of chlorophyll concentration prediction, maintains stable high-precision prediction in different lake environments, reduces computational resource consumption, is highly adaptable, and is suitable for hyperspectral datasets of different lakes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118658080B_ABST
    Figure CN118658080B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for inverting lake chlorophyll based on annealing optimization LSTM algorithm, belonging to the field of pattern recognition technology in artificial intelligence. The method comprises obtaining a hyperspectral image of a lake, extracting spectral sequence data of each pixel point from the hyperspectral image; inputting the spectral sequence data of each pixel point in the hyperspectral image into a pre-trained MHA-LSTM model optimized based on an annealing optimization algorithm, predicting the chlorophyll concentration of each pixel point; and generating a thermal map representing the distribution of chlorophyll based on the predicted chlorophyll concentration of each pixel point. The MHA-LSTM model comprises a coding layer, a multi-head local self-attention mechanism layer, an LSTM layer, an attention gating mechanism layer and an output layer connected in sequence. The present invention can significantly improve the accuracy of chlorophyll concentration prediction, and significantly reduce training time and computing resource consumption while ensuring the prediction accuracy of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of pattern recognition in artificial intelligence, and in particular relates to a method and system for inverting lake chlorophyll based on an annealing optimized LSTM algorithm. Background Art

[0002] In the field of water remote sensing science, accurate inversion of chlorophyll is a core task, the purpose of which is to accurately determine the concentration of chlorophyll in water bodies through advanced remote sensing technology. Chlorophyll, as a key photosynthetic pigment in aquatic organisms, has a direct impact on the biomass and nutritional status of water bodies, and plays an indispensable role in assessing the health of the water environment and monitoring changes in the ecosystem. Traditionally, chlorophyll inversion methods mainly include empirical models based on field data, semi-analytical models that rely on radiation transfer and optical theory, and data-driven machine learning models such as LSTM models.

[0003] Empirical models rely on a large amount of field observation data, and these models are usually only valid in specific environments and are difficult to generalize to different lakes or water environments. In addition, the generalization ability of empirical models is weak and cannot adapt to changing natural conditions. Semi-analytical models estimate the concentration of chlorophyll based on radiation transfer theory and complex optical models. The calculations are complex and require a large amount of input data. The processing speed is slow and it is difficult to apply in real time. In addition, this type of model has high requirements on the quality and accuracy of the input data. If there are errors in the input data, the output accuracy of the model will be significantly reduced. Although the traditional LSTM model performs well in processing time series data, when processing high-dimensional spectral data, the model has high computational overhead and low training efficiency. In addition, the LSTM model may have performance bottlenecks when capturing long-term dependencies, resulting in less than ideal prediction accuracy when processing large-scale data. Summary of the invention

[0004] The purpose of the present invention is to provide a method and system for inverting lake chlorophyll based on annealing optimized LSTM algorithm, so as to solve the problem that the existing chlorophyll concentration inversion model has insufficient performance when processing high-dimensional spectral data and long time series data.

[0005] To achieve the above object, the present invention adopts the following technical solution:

[0006] In a first aspect, the present invention provides a method for inverting lake chlorophyll based on an annealing optimized LSTM algorithm, comprising:

[0007] Obtain a hyperspectral image of the lake, and extract spectral sequence data of each pixel point from the hyperspectral image;

[0008] The spectral sequence data of each pixel in the hyperspectral image is input into the pre-trained MHA-LSTM model optimized by the annealing optimization algorithm to predict the chlorophyll concentration of each pixel;

[0009] Based on the predicted chlorophyll concentration of each pixel, a heat map representing the chlorophyll distribution is generated.

[0010] Furthermore, the MHA-LSTM model includes a coding layer, a multi-head local self-attention mechanism layer, an LSTM layer, an attention gating mechanism layer and an output layer connected in sequence, wherein the coding layer maps the input data to a high-dimensional feature space, the multi-head local self-attention mechanism layer performs local self-attention calculation on the data output by the coding layer, and extracts local spectral features; the LSTM layer processes the features output by the multi-head local self-attention mechanism layer to capture long-term dependencies in time series data; the attention gating mechanism layer weights the features output by the LSTM layer; the output layer performs a linear transformation on the features weighted by the attention gating mechanism layer, and outputs the predicted value of chlorophyll concentration for each pixel.

[0011] Furthermore, the multi-head local self-attention mechanism layer includes:

[0012] For query Q ,key K ,value V Construct multiple one-dimensional convolutional layers respectively, each one-dimensional convolutional layer corresponds to an attention head;

[0013] By query Q and key K Dot product operation between them to calculate the attention score of each attention head;

[0014] The attention score of each attention head is normalized by the softmax function to obtain the attention weight of each position;

[0015] The attention weight of each position is V Perform weighted summation to generate the local self-attention output of each attention head;

[0016] The local self-attention outputs of multiple attention heads are integrated through the first fully connected layer to obtain the output of the multi-head local self-attention mechanism layer.

[0017] Furthermore, each one-dimensional convolutional layer contains 64 convolution kernels with a kernel size of 3×3, a stride of 1, and a padding of 1.

[0018] Furthermore, the attention gating mechanism layer includes a second fully connected layer and a Sigmoid activation function, which performs a linear transformation on the input features through the second fully connected layer to generate a higher-dimensional feature representation; generates a weight vector for each feature representation through the Sigmoid activation function; and multiplies the input features by the weight vector element by element to obtain weighted features.

[0019] Furthermore, the MHA-LSTM model is obtained according to the following method:

[0020] Use the annealing optimization algorithm to find the optimal hyperparameters of the MHA-LSTM model;

[0021] According to the optimal hyperparameters, the optimized MHA-LSTM model is constructed;

[0022] Obtain a lake spectral sequence dataset and divide the dataset into a training set and a test set;

[0023] The optimized MHA-LSTM model is trained using the training set, and the trained MHA-LSTM model is tested using the test set.

[0024] Furthermore, the method of using the annealing optimization algorithm to find the optimal hyperparameters of the MHA-LSTM model includes:

[0025] Define the initial parameters of the annealing optimization algorithm, set the initial state of the model, set the maximum number of iterations, and loop through steps S1 to S3:

[0026] S1, make a small-scale random adjustment based on the current state to generate a new state;

[0027] S2, reconstruct the MHA-LSTM model according to the new state, train the reconstructed MHA-LSTM model using the training set, and evaluate its performance on the test set;

[0028] S3, decide whether to accept the new state based on whether the new state can improve the model performance or based on the preset probability conditions;

[0029] S4: After each round of iteration, determine whether the termination condition is met. If not, lower the temperature and reset the number of iterations. Continue to loop through steps S1 to S3 until the termination condition is met. Select the best performing state as the optimal hyperparameter of the model.

[0030] Furthermore, the lake spectral sequence dataset is obtained according to the following method:

[0031] Collect chlorophyll concentration data at the lake site as labels and record the longitude and latitude coordinates of the collection points;

[0032] According to the longitude and latitude coordinates of the acquisition point, the spectral sequence data of the corresponding acquisition point is obtained in the remote sensing image data;

[0033] The chlorophyll concentration labels of the collection points are integrated with the corresponding spectral sequence data to obtain the lake spectral sequence dataset.

[0034] Furthermore, generating a heat map representing chlorophyll distribution according to the predicted chlorophyll concentration of each pixel point includes:

[0035] Each pixel is colored according to the predicted chlorophyll concentration at each pixel, generating a heat map representing the chlorophyll distribution.

[0036] In a second aspect, the present invention provides a system for inverting lake chlorophyll based on an annealing optimized LSTM algorithm, comprising:

[0037] A data acquisition module is used to acquire a hyperspectral image of the lake and extract spectral sequence data of each pixel point from the hyperspectral image;

[0038] The chlorophyll concentration inversion module is used to input the spectral sequence data of each pixel in the hyperspectral image into the pre-trained MHA-LSTM model optimized by the annealing optimization algorithm to predict the chlorophyll concentration of each pixel;

[0039] The heat map generation module is used to generate a heat map representing the chlorophyll distribution according to the predicted chlorophyll concentration of each pixel.

[0040] The present invention also provides an electronic device, comprising one or more processors, a memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing any of the methods described in the first aspect.

[0041] The present invention also provides a readable storage medium having one or more programs stored thereon, wherein the one or more programs include instructions, which, when executed by a computing device, enable the computing device to execute any one of the methods described in the first aspect.

[0042] Compared with the prior art, the beneficial technical effects achieved by the present invention are:

[0043] (1) Compared with the traditional LSTM model, the MHA-LSTM model of the present invention combines the advantages of the multi-head self-attention mechanism and the long short-term memory network (LSTM), which can more effectively capture the local features and time series dependencies in the spectral data, making the model perform better on the test data set. The prediction accuracy of the model can reach more than 95%, significantly improving the accuracy of chlorophyll concentration prediction;

[0044] (2) The present invention dynamically adjusts the model parameters through the annealing optimization algorithm, avoiding redundant calculations under fixed parameters, so that the model achieves the best balance between computational complexity and prediction accuracy. The MHA-LSTM model optimized by annealing can significantly reduce the training time and consumption of computing resources while ensuring prediction accuracy.

[0045] (3) By using the annealing optimization algorithm, the trap of local optimal solutions is avoided during the optimization process, ensuring that the model can find the global optimal solution. Experiments show that the model optimized by annealing can maintain stable prediction performance in different lake environments and exhibits good robustness.

[0046] (4) The MHA-LSTM model and its optimization method of the present invention are applicable to hyperspectral datasets of different lakes, have strong adaptability and scalability, and have good generalizability. The adaptability test results of the model on different datasets show that regardless of the size of the dataset, the model can converge quickly and provide high-precision prediction results. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 is a flow chart of the method of the present invention;

[0048] Figure 2 It is a structural diagram of the MHA-LSTM model of the present invention;

[0049] Figure 3 It is a structural diagram of the multi-head local self-attention mechanism layer;

[0050] Figure 4 This is the structural diagram of the attention gating mechanism layer;

[0051] Figure 5 Comparison chart of chlorophyll concentration prediction results and actual results of the optimized MHA-LSTM model inputting test set data;

[0052] Figure 6 This is the water body outline map of Nanyi Lake;

[0053] Figure 7 This is the inversion result of chlorophyll concentration in Nanyi Lake. DETAILED DESCRIPTION

[0054] The present invention will be further described below in conjunction with specific examples. The following examples are only used to more clearly illustrate the technical solutions of the present invention, and are not intended to limit the scope of protection of the present invention.

[0055] like Figure 1 As shown, the present invention provides a method for inverting lake chlorophyll based on annealing optimization LSTM algorithm, comprising:

[0056] Obtain a hyperspectral image of the lake, and extract spectral sequence data of each pixel point from the hyperspectral image;

[0057] The spectral sequence data of each pixel in the hyperspectral image is input into the pre-trained MHA-LSTM model optimized by the annealing optimization algorithm to predict the chlorophyll concentration of each pixel;

[0058] Based on the predicted chlorophyll concentration of each pixel, a heat map representing the chlorophyll distribution is generated.

[0059] like Figure 2 As shown in Figure 1, the MHA-LSTM model includes a sequentially connected encoding layer, a multi-head local self-attention mechanism layer, an LSTM layer, an attention gating mechanism layer, and an output layer.

[0060] The encoding layer uses a fully connected layer to map the input time series data to a high-dimensional feature space to convert the input data into a format that the network model can effectively process. The encoding layer helps to enrich the feature representation of the input data.

[0061] The multi-head local self-attention mechanism layer is used to perform local self-attention calculation on the data output by the encoding layer and extract local spectral features.

[0062] The main principle of the multi-head local self-attention mechanism is to reduce the amount of computation and focus on the local area of ​​the sequence data to capture local dependencies and features. The self-attention mechanism allows the model to calculate attention scores between different positions within the sequence, thereby learning the dependencies between the positions. It is calculated through three main components: query, key, and value, usually expressed as Q , K and V For local self-attention, this process is applied to a local window of the sequence instead of the entire sequence. The multi-head local self-attention mechanism processes the input data in parallel through multiple independent attention heads to capture more feature information.

[0063] like Figure 3 As shown in the figure, the multi-head local self-attention mechanism layer specifically includes:

[0064] (1) Construct convolutional layer: for query ( Q),key( K ),value( V ) construct multiple one-dimensional convolutional layers respectively. Each one-dimensional convolutional layer contains 64 convolution kernels with a kernel size of 3×3, a stride of 1, and a padding of 1.

[0065] Each one-dimensional convolutional layer corresponds to an attention head, and each attention head independently extracts features from a local region of the input data.

[0066] Among them, the query convolution layer is used to calculate the query representation of the input data, the key convolution layer is used to calculate the key representation of the input data, and the value convolution layer is used to calculate the value representation of the input data. These convolution layers are used to extract features in local areas to help the model better capture the local dependencies of the input data. Without increasing the computational complexity, the multi-head attention mechanism is used for parallel processing to improve the accuracy of the model in capturing local features.

[0067] (2) Use query ( Q ) and key( K ) to obtain the attention scores for each attention head, and each attention head calculates these scores independently.

[0068] (3) Normalize the score of each attention head through the softmax function to obtain the attention weight of each position;

[0069] (4) The attention weight pair value of each position ( V ) is weighted summed, and each attention head independently weights the value vector ( V ), and obtain the local self-attention output of each attention head respectively;

[0070] (5) The local self-attention outputs of multiple attention heads are integrated through the first fully connected layer to obtain the output of the final multi-head local self-attention mechanism layer.

[0071] More specifically, the calculation steps of the multi-head local self-attention mechanism layer include:

[0072] Calculate the attention score: For each position i , calculate its relative position to other positions in the local window j Attention score.

[0073] The attention score is obtained by querying Q With all keys K The dot product is obtained and then normalized by the softmax function:

[0074]

[0075] in, It's location i With other positions in the local window j The attention weight of Window represents the position in the sequence i is the local window centered on Q i , K j It's location i and j The query and key vectors at T Indicates transpose.

[0076] Calculate the weighted sum: Add the attention weights For value ( V ) to perform weighted summation to obtain the output at each position:

[0077]

[0078] in O i is the vector of all values ​​in the window V j And the corresponding attention weight The weighted sum of V j It's location j A vector of values ​​of .

[0079] The LSTM layer is used to process the features output by the multi-head local self-attention mechanism layer to capture the long-term dependencies in the time series data.

[0080] The attention gating mechanism layer performs weighted modulation on the output of the LSTM layer by calculating the importance weights of the features.

[0081] like Figure 4 As shown in Figure 1, the attention gating mechanism layer includes a second fully connected layer and a Sigmoid activation function. The second fully connected layer performs a linear transformation on the input features to generate a higher-dimensional feature representation; the Sigmoid activation function generates a weight vector for each feature representation; the input features are element-wise multiplied with the weight vector to obtain the weighted features, which are used as the final output of the model.

[0082] Assume the input vector is , through the second fully connected layer and the Sigmoid activation function, the weight vector can be obtained ,in , represents the Sigmoid function, Express The fully connected layer transformation is applied. Finally, the input feature is multiplied by the weight vector to obtain the weighted feature .

[0083] The input features are transformed through the second fully connected layer to extract higher-level feature representations. The transformed features are passed through the Sigmoid activation function to generate the importance weights of each feature. Each weight value is between 0 and 1, indicating the importance of each feature to the model output. Finally, each feature is multiplied by its corresponding weight to highlight important features and suppress unimportant features to improve the model's prediction results.

[0084] The output layer uses the third fully connected layer to perform a linear transformation on the features weighted by the attention gating mechanism layer to generate the final prediction output. The output size is 1, which is used to predict the chlorophyll concentration value of each pixel.

[0085] Annealing optimization algorithm, commonly known as simulated annealing (SA), is a probabilistic optimization algorithm used to find a sufficiently good approximate global optimal solution in a given large search space.

[0086] Before using the annealing optimization algorithm to optimize the MHA-LSTM model and training the MHA-LSTM model, obtain the lake spectrum sequence dataset and divide it into a training set and a test set, including:

[0087] Collect chlorophyll concentration data at the lake site as labels and record the longitude and latitude coordinates of the collection points;

[0088] According to the longitude and latitude coordinates of the acquisition point, the hyperspectral sequence data of the corresponding acquisition point is obtained in the remote sensing image data;

[0089] The chlorophyll concentration labels of the collection points are integrated with the corresponding spectral sequence data to obtain the lake spectral sequence dataset;

[0090] The lake spectral sequence dataset is divided into a training set and a test set.

[0091] The MHA-LSTM model is optimized using the annealing optimization algorithm, including:

[0092] Define the initial parameters of the annealing optimization algorithm, including the initial temperature and cooling rate; set the initial state of the model, including the hidden layer dimension, number of layers, learning rate, batch size and other hyperparameters of the MHA-LSTM model.

[0093] Set the maximum number of iterations and loop through the following steps S1 to S3:

[0094] S1, make a small-scale random adjustment based on the current state to generate a new state;

[0095] S2, reconstruct the MHA-LSTM model according to the new state, use the training set to train the reconstructed MHA-LSTM model, and evaluate the performance of the current model on the test set, calculate the fitness, and use the mean square error as the loss function;

[0096] The performance evaluation on the test set is based on the error between the predicted chlorophyll concentration and the true chlorophyll concentration.

[0097] S3, decide whether to accept the new state based on whether the new state can improve the model performance or based on the preset probability conditions;

[0098] If the performance of the new state is worse than the current state, the new state is directly accepted; if the performance of the new state is not as good as the current state, whether to accept the new state is determined based on the probability of the current temperature and performance difference.

[0099] The probability formula is:

[0100]

[0101] in is the difference between the fitness of the current state and the fitness of the new state, T 0 represents "temperature", which is a control parameter in the annealing optimization algorithm.

[0102] S4, after each round of iteration, determine whether the termination condition is met. If not, lower the "temperature" of the system and reset the number of iterations, and repeat steps S1 to S3 until the termination condition is met;

[0103] Among them, the termination condition is usually taken as terminating the algorithm when several consecutive new states are not accepted.

[0104] After the iteration, the best performing state is selected as the final result, which is the model parameter with the smallest fitness error, that is, the optimal hyperparameter of the model.

[0105] According to the obtained optimal hyperparameters of the model, an optimized MHA-LSTM model is constructed. The optimized MHA-LSTM model is trained using the training set, and the performance of the trained MHA-LSTM model is evaluated using the test set to obtain a trained MHA-LSTM model.

[0106] Among them, evaluating model performance includes calculating the error between the predicted value and the true value, including mean square error (MSE), root mean square error (RMSE), and mean absolute error (MAE).

[0107] After obtaining the trained MHA-LSTM model, the hyperspectral image of the lake to be tested is obtained, and the spectral sequence data of each pixel point is extracted from the hyperspectral image; the spectral sequence data of each pixel point in the hyperspectral image is input into the trained MHA-LSTM model, and the predicted chlorophyll concentration of each pixel point is output; based on the predicted chlorophyll concentration of each pixel point, a heat map representing the chlorophyll distribution is generated.

[0108] Among them, according to the predicted chlorophyll concentration of each pixel, a heat map representing the chlorophyll distribution is generated, including:

[0109] Each pixel is colored according to the predicted chlorophyll concentration at each pixel, generating a heat map representing the chlorophyll distribution.

[0110] Specific embodiments are given below:

[0111] Taking Nanyi Lake as the research object, the water body contour map of Nanyi Lake is as follows Figure 6 The actual test data of chlorophyll concentration at 37 points in Nanyi Lake were collected, the longitude and latitude coordinates of the collection points were recorded, the remote sensing image data synchronized by the Gaofen-6 satellite during this period was obtained, and the image preprocessing was performed. According to the longitude and latitude coordinates of the collection points, the spectral sequence data of each collection point was extracted. The obtained data are shown in Table 1. The actual band data and the chlorophyll concentration data are matched to form a data set.

[0112] Table 1

[0113]

[0114] Then, the MHA-LSTM model was used for analysis and prediction, and the annealing optimization algorithm was used to optimize the model's hyperparameters. Specifically, the data set was divided into a training set and a test set, accounting for 70% and 30% of the total data volume, respectively. The input dimension of the model was set to 4, the encoding layer dimension was 256, the multi-head local self-attention mechanism layer used 4 heads, and the convolution kernel size was 3×3. The hidden layer dimension of the MHA-LSTM model was 10, the number of layers was 2, and the initial learning rate was 0.1. During the optimization process of the annealing optimization algorithm, the initial temperature was set to 2.0, the cooling rate was 0.99, and the maximum number of iterations was set to 10000. After 100 rounds of iterations, the best hyperparameter combination was found: hidden layer dimension 10, number of layers 3, learning rate 0.006, and output dimension 1.

[0115] The model corresponding to the best hyperparameters is tested on the test set. Figure 5The chlorophyll concentration prediction results of the optimized MHA-LSTM model with the test set data input are compared with the actual results. After calculation, the mean square error (MSE) is 0.0131, the mean absolute error (MAE) is 0.1570, and the root mean square error (RMSE) is 0.1943. It can be seen that the model prediction accuracy exceeds 95%. This shows that after model optimization, the present invention can effectively predict the water body related indicators of Nanyi Lake.

[0116] Finally, each pixel is colored according to the predicted chlorophyll concentration value of each pixel to generate a heat map representing the chlorophyll distribution, such as Figure 7 shown.

[0117] The present invention also provides a system for inverting lake chlorophyll based on annealing optimized LSTM algorithm, comprising:

[0118] A data acquisition module is used to acquire a hyperspectral image of the lake and extract spectral sequence data of each pixel point from the hyperspectral image;

[0119] The chlorophyll concentration inversion module is used to input the spectral sequence data of each pixel in the hyperspectral image into the pre-trained MHA-LSTM model optimized by the annealing optimization algorithm to predict the chlorophyll concentration of each pixel;

[0120] The heat map generation module is used to generate a heat map representing the chlorophyll distribution according to the predicted chlorophyll concentration of each pixel.

[0121] The present invention also provides an electronic device, comprising one or more processors, a memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing any of the aforementioned methods.

[0122] The present invention also provides a readable storage medium having one or more programs stored thereon, wherein the one or more programs include instructions, and when the instructions are executed by a computing device, the computing device executes any one of the aforementioned methods.

[0123] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0124] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0125] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0126] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0127] The above are merely embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are included in the scope of the claims of the present invention to be approved.

Claims

1. A method for inverting lake chlorophyll based on annealing optimized LSTM algorithm, characterized in that: include: Obtain a hyperspectral image of the lake, and extract spectral sequence data of each pixel point from the hyperspectral image; The spectral sequence data of each pixel in the hyperspectral image is input into the pre-trained MHA-LSTM model optimized by the annealing optimization algorithm to predict the chlorophyll concentration of each pixel; Generate a heat map showing the chlorophyll distribution based on the predicted chlorophyll concentration of each pixel; The MHA-LSTM model includes a coding layer, a multi-head local self-attention mechanism layer, an LSTM layer, an attention gating mechanism layer and an output layer connected in sequence. The coding layer maps the input data to a high-dimensional feature space. The multi-head local self-attention mechanism layer performs local self-attention calculation on the data output by the coding layer to extract local spectral features. The LSTM layer processes the features output by the multi-head local self-attention mechanism layer to capture long-term dependencies in time series data. The attention gating mechanism layer weights the features output by the LSTM layer. The output layer performs a linear transformation on the features weighted by the attention gating mechanism layer to output the predicted value of chlorophyll concentration for each pixel.

2. The method for inverting lake chlorophyll based on annealing optimized LSTM algorithm according to claim 1, characterized in that: The multi-head local self-attention mechanism layer includes: For query Q ,key K ,value V Construct multiple one-dimensional convolutional layers respectively, each one-dimensional convolutional layer corresponds to an attention head; By query Q and key K Dot product operation between them to calculate the attention score of each attention head; The attention score of each attention head is normalized by the softmax function to obtain the attention weight of each position; The attention weight of each position is V Perform weighted summation to generate the local self-attention output of each attention head; The local self-attention outputs of multiple attention heads are integrated through the first fully connected layer to obtain the output of the multi-head local self-attention mechanism layer.

3. The method for inverting lake chlorophyll based on annealing optimization LSTM algorithm according to claim 2 is characterized in that: Each one-dimensional convolutional layer contains 64 convolution kernels with a kernel size of 3×3, a stride of 1, and a padding of 1.

4. The method for inverting lake chlorophyll based on annealing optimization LSTM algorithm according to claim 1, characterized in that: The attention gating mechanism layer includes a second fully connected layer and a Sigmoid activation function. The second fully connected layer performs a linear transformation on the input features to generate a higher-dimensional feature representation. The Sigmoid activation function generates a weight vector for each feature representation. The input features are element-wise multiplied by the weight vector to obtain weighted features.

5. The method for inverting lake chlorophyll based on annealing optimized LSTM algorithm according to claim 1, characterized in that: The MHA-LSTM model is obtained according to the following method: Use the annealing optimization algorithm to find the optimal hyperparameters of the MHA-LSTM model; According to the optimal hyperparameters, the optimized MHA-LSTM model is constructed; Obtain a lake spectral sequence dataset and divide the dataset into a training set and a test set; The optimized MHA-LSTM model is trained using the training set, and the trained MHA-LSTM model is tested using the test set.

6. The method for inverting lake chlorophyll based on annealing optimization LSTM algorithm according to claim 5, characterized in that: The annealing optimization algorithm is used to find the optimal hyperparameters of the MHA-LSTM model, including: Define the initial parameters of the annealing optimization algorithm, set the initial state of the model, set the maximum number of iterations, and loop through steps S1 to S3: S1, make a small-scale random adjustment based on the current state to generate a new state; S2, reconstruct the MHA-LSTM model according to the new state, train the reconstructed MHA-LSTM model using the training set, and evaluate its performance on the test set; S3, decide whether to accept the new state based on whether the new state can improve the model performance or based on the preset probability conditions; S4: After each round of iteration, determine whether the termination condition is met. If not, lower the temperature and reset the number of iterations. Continue to loop through steps S1 to S3 until the termination condition is met. Select the best performing state as the optimal hyperparameter of the model.

7. The method for inverting lake chlorophyll based on annealing optimized LSTM algorithm according to claim 5, characterized in that: The lake spectral sequence dataset was obtained using the following method: Collect chlorophyll concentration data at the lake site as labels and record the longitude and latitude coordinates of the collection points; According to the longitude and latitude coordinates of the acquisition point, the spectral sequence data of the corresponding acquisition point is obtained in the remote sensing image data; The chlorophyll concentration labels of the collection points are integrated with the corresponding spectral sequence data to obtain the lake spectral sequence dataset.

8. The method for inverting lake chlorophyll based on annealing optimized LSTM algorithm according to claim 1, characterized in that: The step of generating a heat map representing chlorophyll distribution according to the predicted chlorophyll concentration of each pixel point includes: Each pixel is colored according to the predicted chlorophyll concentration at each pixel, generating a heat map representing the chlorophyll distribution.

9. A system for inverting lake chlorophyll based on annealing optimized LSTM algorithm, characterized in that: include: A data acquisition module is used to acquire a hyperspectral image of the lake and extract spectral sequence data of each pixel point from the hyperspectral image; The chlorophyll concentration inversion module is used to input the spectral sequence data of each pixel in the hyperspectral image into the pre-trained MHA-LSTM model optimized by the annealing optimization algorithm to predict the chlorophyll concentration of each pixel; A heat map generation module is used to generate a heat map representing chlorophyll distribution according to the predicted chlorophyll concentration of each pixel; The MHA-LSTM model includes a coding layer, a multi-head local self-attention mechanism layer, an LSTM layer, an attention gating mechanism layer and an output layer connected in sequence. The coding layer maps the input data to a high-dimensional feature space. The multi-head local self-attention mechanism layer performs local self-attention calculation on the data output by the coding layer to extract local spectral features. The LSTM layer processes the features output by the multi-head local self-attention mechanism layer to capture long-term dependencies in time series data. The attention gating mechanism layer weights the features output by the LSTM layer. The output layer performs a linear transformation on the features weighted by the attention gating mechanism layer to output the predicted value of chlorophyll concentration for each pixel.