A method for predicting algal blooms by integrating multi-parameter spatiotemporal information

By constructing a multi-perspective information fusion algal bloom prediction model based on the Transformer architecture and utilizing the time, space and variable attention mechanism, the problems of insufficient accuracy and transparency of the algal bloom prediction model are solved, higher prediction accuracy and interpretability are achieved, and water environment management is supported.

CN119178863BActive Publication Date: 2025-09-23CHONGQING INST OF GREEN & INTELLIGENT TECH CHINESE ACAD OF SCI
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411224038.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2025-09-23
Estimated Expiration
2044-08-28

AI Technical Summary

Technical Problem

Existing algal bloom prediction models lack accuracy and transparency, making it difficult to explain driving factors and effectively respond to the suddenness and randomness of algal blooms, making it difficult to effectively implement emergency measures.

Method used

A water bloom prediction method that integrates multi-parameter spatiotemporal information is adopted. By designing a deep learning model with three attention mechanisms of time, space and variables, end-to-end feature extraction and training are performed using water quality and meteorological monitoring data, and a multi-perspective information fusion prediction model based on the Transformer architecture is constructed.

Benefits of technology

It improves the accuracy of algal bloom prediction and the explainability of its mechanism, and provides a scientific basis to support water environment management and protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119178863B_ABST
    Figure CN119178863B_ABST
Patent Text Reader

Abstract

This invention relates to a water bloom prediction method that integrates multi-parameter spatiotemporal information, belonging to the fields of deep learning and environmental monitoring. This method is implemented using a water bloom monitoring system that integrates multi-perspective information. The system is composed of several water quality monitoring stations and meteorological stations within the monitoring area, as well as a cloud server. The method comprises the following steps: S1: sending a data collection instruction; S2: collecting water quality indicators; S3: collecting meteorological indicators; S4: constructing a water quality-meteorological dataset; S5: building a multi-perspective information-integrated water bloom prediction model; S6: model training; and S7: model prediction. By designing three attention mechanisms—time, space and variable, and attention aggregation—the proposed method establishes a deep learning model capable of in-depth analysis of online monitoring data from different perspectives, improving the accuracy of water bloom predictions and the interpretability of the prediction mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a water bloom prediction method that integrates multi-parameter spatiotemporal information, belongs to the field of deep learning and environmental monitoring, and is particularly suitable for water bloom prediction that integrates multi-perspective information. Background Art

[0002] Algal blooms are a natural ecological phenomenon, formed by algae under specific conditions. Generally, naturally occurring algal blooms disappear on their own and pose no environmental risk. However, eutrophication of water bodies caused by human activities is a key factor in the formation and persistence of algal blooms. This eutrophication provides a rich nutritional base for algae, increasing the frequency and intensity of algal blooms. Due to the combined influence of human activities and global climate change, eutrophication and frequent algal blooms in lakes and reservoirs will remain prominent issues for the aquatic ecosystem for some time to come. Algal blooms can degrade water functions and reduce their self-purification capacity, posing risks to drinking water safety and ultimately causing aquatic ecosystem disasters. The occurrence of algal blooms is highly random, sudden, and potentially dangerous, with different driving mechanisms for different water bodies. Once an algal bloom occurs, emergency measures may not be implemented in a timely manner to minimize the damage, potentially increasing control costs and failing to achieve the desired results. Therefore, accurate prediction of algal blooms is crucial. It can buy time for relevant departments to implement emergency measures and develop control plans, provide scientific guidance for preventing and controlling algal blooms, and have significant practical significance for improving water quality.

[0003] Algal bloom outbreaks are influenced by a variety of factors, including changes in water quality and meteorological indicators. These indicators are not simply linearly related; rather, complex interactions exist between them, making it difficult to select the appropriate environmental factors to use when constructing algal bloom prediction models. Furthermore, while algal bloom prediction models based on extensive temporal and spatial monitoring data have demonstrated high accuracy, they lack transparency, failing to explain which environmental factors drive bloom outbreaks and when. Therefore, a method is needed that can improve both prediction accuracy and transparency. Summary of the Invention

[0004] In view of this, the present invention provides a water bloom prediction method that integrates multi-parameter spatiotemporal information. It intends to design three attention mechanisms of time, space and variables, so that the established deep learning model can conduct in-depth analysis of online monitoring data from different perspectives, and ultimately achieve improved accuracy of water bloom prediction and interpretability of prediction mechanism.

[0005] In order to achieve the above object, the present invention provides the following technical solutions:

[0006] A water bloom prediction method that integrates multi-parameter spatiotemporal information is implemented by a water bloom monitoring system that integrates multi-perspective information. The water bloom monitoring system that integrates multi-perspective information is composed of several water quality monitoring stations and meteorological stations within a monitoring area, and a cloud server. The water quality monitoring stations use sensors to measure water quality indicators within the monitoring area in real time according to a sampling frequency, and transmit the results to the cloud server via a network connection. The meteorological stations use sensors to measure meteorological indicators within the monitoring area, including temperature, precipitation, wind speed, relative humidity, and air pressure, in real time according to a sampling frequency, and transmit the results to the cloud server via a network connection. The cloud server is a computer device that has built-in programmed code for a water bloom prediction method that integrates multi-parameter spatiotemporal information.

[0007] The specific steps include:

[0008] S1: The cloud server sends data collection instructions to the water quality monitoring stations and weather stations in the monitoring area;

[0009] S2: Each water quality monitoring station measures the water quality indicators of the water body in the monitoring area and uploads them to the cloud server;

[0010] S3: Each weather station measures meteorological indicators within the monitoring area and uploads them to the cloud server;

[0011] S4: Traverse all water quality monitoring stations. The cloud server will combine the data and time of water quality monitoring stations and meteorological stations with overlapping monitoring areas to construct a water quality-meteorological dataset for the corresponding water quality monitoring station.

[0012] S5: The cloud server builds a multi-view information fusion algal bloom prediction model based on the Transformer architecture and initializes the network weights;

[0013] S6: The cloud server divides the water quality-meteorological datasets of all historical water quality monitoring stations into training sets and test sets according to a certain ratio. The network is trained using the training set data and tested using the test set data.

[0014] S7: Set a monitoring time period T. The cloud server inputs the water quality-meteorological data of all water quality monitoring stations within the time period T into the encoder of the multi-perspective information fusion algal bloom prediction model. The cloud server inputs the water quality-meteorological data set of the target water quality monitoring station within the time period T and the future meteorological indicators predicted by the weather station into the decoder of the multi-perspective information fusion algal bloom prediction model to predict the chlorophyll a concentration of the target water quality monitoring station.

[0015] Furthermore, the water quality indicators include: water temperature (°C), pH (dimensionless), dissolved oxygen (mg / L), conductivity (μS / cm), turbidity (NTU), permanganate index (mg / L), ammonia nitrogen (mg / L), total phosphorus (mg / L), total nitrogen (mg / L), and chlorophyll a (ug / L);

[0016] Furthermore, the meteorological indicators include: temperature (°C), precipitation (mm), wind speed (m / s), relative humidity (%), and air pressure (Pa);

[0017] The multi-view information fusion water bloom prediction model is composed of an encoder and a decoder based on the attention mechanism;

[0018] Furthermore, the encoder is composed of a temporal attention mechanism, a variable attention mechanism, a spatial attention mechanism, an attention aggregation mechanism, and an encoding layer in a traditional Transformer; the decoder is composed of an attention aggregation mechanism and a decoding layer in a traditional Transformer;

[0019] Furthermore, the architecture of the encoder is a parallel spatial attention mechanism and a time variable part connected in series with the encoding layer in the traditional Transformer and then connected in series with an attention aggregation mechanism, wherein the time variable part is a parallel connection of the time attention mechanism and the variable attention mechanism and then connected in series with an attention aggregation mechanism; the architecture of the decoder is an attention aggregation mechanism connected in series with the decoding layer in the traditional Transformer.

[0020] Furthermore, the calculation process of the temporal attention mechanism and the variable attention mechanism is specifically as follows:

[0021] (1-1) Calculate the normalization coefficient X′=Tanh(X⊙W); where, input l is the size of the lookback time window in the temporal attention mechanism, and the number of variables, i.e. the number of indicators, in the variable attention mechanism, and d is the embedding dimension; is a learnable weight matrix; Tanh(.) is the activation function; ⊙ represents element-by-element multiplication;

[0022] (1-2) Calculate the standardized coefficient Among them, μ(·) and σ(·) represent the mean and variance; ε is a small constant for numerical stability; Softmax(·) is the activation function;

[0023] (1-3) Calculate the output Y = A × X; is the output.

[0024] Furthermore, the calculation process of the spatial attention mechanism is as follows:

[0025] (2-1) Calculate average pooling A avg =Avgpool(X); where input Avgpool(·) stands for average pooling;

[0026] (2-2) Calculate the maximum pooling A max =Maxpool(X); where Maxpool(·) represents maximum pooling;

[0027] (2-3) Calculate the fully connected output Y = MLP (A avg +A max ); where MLP(·) represents the fully connected layer;

[0028] (2-4) Calculate the prior knowledge output Y′=(1-λ)Y+λP, where λ is an adjustable hyperparameter that balances the network’s extracted feature information with the prior knowledge; P is a similarity matrix, which measures geographic spatial similarity using the inverse of distance and is a form of prior knowledge.

[0029] (2-5) Calculate the standardized coefficient Among them, μ(·) and σ(·) represent the mean and variance; ε is a small constant for numerical stability; Softmax(·) is the activation function;

[0030] (2-6) Calculate the final output out = attn × X; is the final output.

[0031] Furthermore, the attention aggregation mechanism is as follows: first, concatenate the input using concat, then perform deep feature extraction on the concatenated result, and then aggregate the extracted result with the result of the spatial attention mechanism. The specific calculation process is:

[0032] (3-1) Calculate input concatenation: Y′=concat(Y1, Y2); where Y1 and Y2 are inputs of the same dimension; concat(·) is a concat connection;

[0033] (3-2) Calculate the output: Y = Y′ + Attention(Y′); where Attention(·) represents the scaled dot product self-attention; and Y represents the output after fusion.

[0034] The beneficial effects of the present invention are: the present invention provides a water bloom prediction method that integrates multi-parameter spatiotemporal information, which has higher adaptability and generalization capabilities through end-to-end deep neural network feature extraction and training. It utilizes the time, space, and variable attention mechanism to fully explore the spatiotemporal correlation and interaction between variables in the monitoring data, and can also visualize the time-space-variable attention distribution, thereby improving the accuracy of water bloom prediction and the interpretability of the mechanism, and providing a scientific basis for water environment management and protection. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to illustrate the purpose and technical solution of the present invention, the present invention provides the following drawings:

[0036] Figure 1 This is a flow chart of a water bloom prediction method integrating multi-parameter spatiotemporal information of the present invention;

[0037] Figure 2 This is the architecture diagram of the water bloom monitoring system integrating multi-perspective information of the present invention; wherein 1 is the water quality monitoring station, 2 is the weather station, and 3 is the cloud server;

[0038] Figure 3 A distribution map of water quality monitoring stations in the monitoring waters of Dianchi Lake in Example 1 of the present invention;

[0039] Figure 4 This is an architecture diagram of the multi-view information fusion algal bloom prediction model in Example 1 of the present invention;

[0040] Figure 5 This is an architecture diagram of the temporal attention mechanism and the variable attention mechanism in Example 1 of the present invention;

[0041] Figure 6 This is an architecture diagram of the spatial attention mechanism in Example 1 of the present invention;

[0042] Figure 7 This is an architectural diagram of the attention aggregation mechanism in Example 1 of the present invention. DETAILED DESCRIPTION

[0043] In order to make the purpose and technical solution of the present invention more clear, the present invention is described in detail below with reference to the accompanying drawings and embodiments.

[0044] Example 1: In order to predict the blue algae bloom phenomenon in the waters of Dianchi Lake, there are 2 monitoring stations in the Caohai waters of Dianchi Lake, namely Broken Bridge and Caohai Center, and 8 monitoring stations in the Waihai Huiwan Middle, Luojiaying, Guanyinshan East, Guanyinshan Middle, Guanyinshan West, Baiyukou, Haikou West and Dianchi South, totaling 10 monitoring stations. These 10 monitoring stations are all national control points, and their specific locations are as follows: Figure 3As shown, the water quality information collected by the sensors, together with the meteorological data of the Kunming area, constitute the basic data set of this embodiment. The data set contains 65,770 water quality data of these 10 monitoring stations and meteorological data of the meteorological monitoring stations from 0:00 on January 1, 2019 to 20:00 on December 31, 2021. This embodiment provides "a method for predicting water blooms by integrating multi-parameter spatiotemporal information", combined with Figure 2 , is realized by a water bloom monitoring system integrating multi-perspective information, the water bloom monitoring system integrating multi-perspective information is composed of the 10 water quality monitoring stations (1) in the monitoring area and the weather station (2) in Kunming, and a cloud server (3); the water quality monitoring station (1) uses sensors to measure water quality indicators in the monitoring area in real time according to the sampling frequency, and transmits them to the cloud server (3) through a network connection; the weather station (2) uses sensors to measure meteorological indicators including temperature, precipitation, wind speed, relative humidity, and air pressure in the monitoring area in real time according to the sampling frequency, and transmits them to the cloud server (3) through a network connection; the cloud server (3) is a computer device, which has a built-in programmed code for a water bloom prediction method integrating multi-parameter spatiotemporal information.

[0045] Combine Figure 1 , the method comprises the following steps:

[0046] Step 1: The cloud server (3) sends a data collection instruction with a sampling frequency of 4 hours / time to the water quality monitoring station (1) and the weather station (2) in the monitoring area.

[0047] Step 2: 10 water quality monitoring stations (1) measure the water quality indicators of the water bodies in the monitoring area and upload them to the cloud server (3).

[0048] The water quality indicators include: water temperature (°C), pH (dimensionless), dissolved oxygen (mg / L), conductivity (μS / cm), turbidity (NTU), permanganate index (mg / L), ammonia nitrogen (mg / L), total phosphorus (mg / L), total nitrogen (mg / L), and chlorophyll a (ug / L).

[0049] Step 3: The Kunming Weather Station (2) measures the meteorological indicators in the monitoring area and uploads them to the cloud server (3).

[0050] The meteorological indicators include: temperature (°C), precipitation (mm), wind speed (m / s), relative humidity (%), and air pressure (Pa).

[0051] Step 4: Traverse the 10 water quality monitoring stations (1), and the cloud server (3) combines the data and time of each water quality monitoring station (1) with the data of the Kunming meteorological station (2) to construct a water quality-meteorological data set corresponding to the water quality monitoring station.

[0052] Step 5: The cloud server (3) builds a multi-view information fusion water bloom prediction model based on the Transformer architecture and initializes the network weights.

[0053] Combine Figure 4 , the multi-view information fusion water bloom prediction model is composed of an encoder and a decoder based on the attention mechanism;

[0054] The encoder is composed of a temporal attention mechanism, a variable attention mechanism, a spatial attention mechanism, an attention aggregation mechanism, and an encoding layer in a traditional Transformer; the decoder is composed of an attention aggregation mechanism and a decoding layer in a traditional Transformer.

[0055] The architecture of the encoder is a parallel spatial attention mechanism and a time variable part connected in series with the encoding layer in the traditional Transformer and then connected in series with an attention aggregation mechanism, wherein the time variable part is a parallel connection of the time attention mechanism and the variable attention mechanism and then connected in series with an attention aggregation mechanism; the architecture of the decoder is an attention aggregation mechanism connected in series with the decoding layer in the traditional Transformer.

[0056] Combine Figure 5 , the calculation process of the temporal attention mechanism and the variable attention mechanism is specifically as follows:

[0057] (1-1) Calculate the normalization coefficient X′=Tanh(X⊙W); where, input l is the size of the lookback time window in the temporal attention mechanism, and the number of variables, i.e. the number of indicators, in the variable attention mechanism, and d is the embedding dimension; is a learnable weight matrix; Tanh(·) is the activation function; ⊙ represents element-wise multiplication;

[0058] (1-2) Calculate the standardized coefficient Among them, μ(·) and σ(·) represent the mean and variance; ε is a small constant for numerical stability; Softmax(·) is the activation function;

[0059] (1-3) Calculate the output Y = A × X; is the output.

[0060] Combine Figure 6 , the calculation process of the spatial attention mechanism is specifically as follows:

[0061] (2-1) Calculate average pooling A avg =Avgpool(X); where input Avgpool(·) stands for average pooling;

[0062] (2-2) Calculate the maximum pooling A max =Maxpool(X); where Maxpool(·) represents maximum pooling;

[0063] (2-3) Calculate the fully connected output Y = MLP (A avg +A max ); where MLP(·) represents the fully connected layer;

[0064] (2-4) Calculate the prior knowledge output Y′=(1-λ)Y+λP, where λ is an adjustable hyperparameter that balances the network’s extracted feature information with the prior knowledge; P is a similarity matrix, which measures geographic spatial similarity using the inverse of distance and is a form of prior knowledge.

[0065] (2-5) Calculate the standardized coefficient Among them, μ(·) and σ(·) represent the mean and variance; ε is a small constant for numerical stability; Softmax(·) is the activation function;

[0066] (2-6) Calculate the final output out = attn × X; is the final output.

[0067] Combine Figure 7 The attention aggregation mechanism is as follows: first, concatenate the input using concat, then perform deep feature extraction on the concatenated result, and then aggregate the extracted result with the result of the spatial attention mechanism. The specific calculation process is:

[0068] (3-1) Calculate input concatenation: Y′=concat(Y1, Y2); where Y1 and Y2 are inputs of the same dimension; concat(·) is a concat connection;

[0069] (3-2) Calculate the output: Y = Y′ + Attention(Y′); where Attention(·) represents the scaled dot product self-attention; and Y represents the output after fusion.

[0070] Step 6: The cloud server (3) divides the water quality-meteorological data set of all historical water quality monitoring stations (1) into a training set and a test set in a ratio of 7:3, uses the training set data to train the network, and uses the test set data to test it.

[0071] Step 7: Set the monitoring time periods T to 6, 18, and 42 respectively. The cloud server (3) inputs the water quality-meteorological data of all water quality monitoring stations (1) within the T time period into the encoder of the multi-perspective information fusion water bloom prediction model. The 10 water quality monitoring stations (1) are taken as target water quality monitoring stations in turn. The water quality-meteorological data sets within the T time period and the future meteorological indicators predicted by the weather station (2) are input into the decoder of the multi-perspective information fusion water bloom prediction model to predict the chlorophyll a concentration of the target water quality monitoring station.

[0072] In order to verify the effectiveness of the method of the present invention, four commonly used and representative models in time series prediction tasks, namely iTransformer, Informer, Transformer and LSTM, were selected for comparative experiments. In the process of building the comparative models, the encoder-decoder architecture was adopted. The number of layers and hidden layer dimensions of the encoder and decoder were consistent with the MPFNet prediction task, and the remaining hyperparameters of the comparison model were appropriately adjusted. In addition, all models were trained and tested using the same data set, and the data preprocessing steps were also consistent to ensure fairness in the comparison. The RMSE and MAE indicators were used to evaluate the prediction performance of the model for the test set of each monitoring point under three different prediction tasks of 6 steps, 18 steps, and 42 steps in the future. The results are shown in Table 1.

[0073] Table 1 Comparison of algal bloom prediction performance between the method of the present invention and different models at 10 monitoring stations in Dianchi Lake

[0074]

[0075]

[0076] As can be seen, for all target monitoring sites, as the prediction step size increases, the RMSE and MAE of all models increase. For each prediction task, the method of the present invention generally has the lowest RMSE and MAE values ​​compared to all other comparison models. Therefore, the method of the present invention performs better in this example.

[0077] Finally, it should be noted that the above preferred embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention has been described in detail through the above preferred embodiments, those skilled in the art should understand that various changes can be made in form and details without departing from the scope defined by the claims of the present invention.

Claims

1. A method for predicting algal blooms by integrating multi-parameter spatiotemporal information, characterized in that: This is achieved by the algal bloom monitoring system that integrates multi-perspective information. The water bloom monitoring system integrating multi-perspective information is composed of a plurality of water quality monitoring stations (1) and meteorological stations (2) in a monitoring area, and a cloud server (3); the water quality monitoring station (1) uses a sensor to measure water quality indicators in the monitoring area in real time according to a sampling frequency, and transmits the results to the cloud server (3) via a network connection; the meteorological station (2) uses a sensor to measure meteorological indicators including temperature, precipitation, wind speed, relative humidity, and air pressure in the monitoring area in real time according to a sampling frequency, and transmits the results to the cloud server (3) via a network connection; the cloud server (3) is a computer device, in which a programmed code for a water bloom prediction method integrating multi-parameter spatiotemporal information is built-in; the method comprises the following steps: S1: The cloud server (3) sends data collection instructions to the water quality monitoring station (1) and weather station (2) in the monitoring area; S2: Each water quality monitoring station (1) measures the water quality indicators of the water body in the monitoring area and uploads them to the cloud server (3); S3: Each weather station (2) measures the meteorological indicators in the monitoring area and uploads them to the cloud server (3); S4: Traverse all water quality monitoring stations (1), and the cloud server (3) combines the data and time of the water quality monitoring stations (1) and weather stations (2) whose monitoring areas overlap, and constructs a water quality-meteorological dataset corresponding to the water quality monitoring station (1); S5: The cloud server (3) builds a multi-view information fusion water bloom prediction model based on the Transformer architecture and initializes the network weights; S6: The cloud server (3) divides the water quality-meteorological data sets of all historical water quality monitoring stations into training sets and test sets according to a certain ratio, uses the training set data to train the network, and uses the test set data to test it; S7: Setting a monitoring time period T, the cloud server (3) inputs the water quality-meteorological data of all water quality monitoring stations (1) within the time period T into the encoder of the multi-perspective information fusion water bloom prediction model, inputs the water quality-meteorological data set of the target water quality monitoring station within the time period T and the future meteorological indicators predicted by the weather station (2) into the decoder of the multi-perspective information fusion water bloom prediction model, and predicts the chlorophyll a concentration of the target water quality monitoring station; The multi-view information fusion water bloom prediction model is composed of an encoder and a decoder based on the attention mechanism; The encoder is composed of a temporal attention mechanism, a variable attention mechanism, a spatial attention mechanism, an attention aggregation mechanism, and an encoding layer in a traditional Transformer; the decoder is composed of an attention aggregation mechanism and a decoding layer in a traditional Transformer; the architecture of the encoder is a spatial attention mechanism and a temporal variable part connected in parallel in series with the encoding layer in a traditional Transformer and then connected in series with an attention aggregation mechanism, wherein the temporal variable part is a temporal attention mechanism and a variable attention mechanism connected in parallel in series with an attention aggregation mechanism; the architecture of the decoder is an attention aggregation mechanism connected in series with the decoding layer in a traditional Transformer.

2. The algal bloom prediction method integrating multi-parameter spatiotemporal information according to claim 1, characterized in that: The water quality indicators include: water temperature, pH, dissolved oxygen, conductivity, turbidity, permanganate index, ammonia nitrogen, total phosphorus, total nitrogen, and chlorophyll a.

3. The algal bloom prediction method integrating multi-parameter spatiotemporal information according to claim 1, characterized in that: The calculation process of the temporal attention mechanism and the variable attention mechanism is specifically as follows: (1-1) Calculate the normalization coefficient X′=Tanh(X⊙W); where, input l is the size of the lookback time window in the temporal attention mechanism, and the number of variables, i.e. the number of indicators, in the variable attention mechanism, and d is the embedding dimension; is a learnable weight matrix; Tanh(·) is the activation function; ⊙ represents element-wise multiplication; (1-2) Calculate the standardized coefficient Among them, μ(·) and σ(·) represent the mean and variance; ε is a small constant for numerical stability; Softmax(·) is the activation function; (1-3) Calculate the output Y = A × X; is the output.

4. The algal bloom prediction method integrating multi-parameter spatiotemporal information according to claim 1, characterized in that: The calculation process of the spatial attention mechanism is specifically as follows: (2-1) Calculate average pooling A avg =Avgpool(X); where input Avgpool(·) stands for average pooling; (2-2) Calculate the maximum pooling A max =Maxpool(X); where Maxpool(·) represents maximum pooling; (2-3) Calculate the fully connected output Y = MLP (A avg +A max ); where MLP(·) represents the fully connected layer; (2-4) Calculate the prior knowledge output Y′=(1-λ)Y+λP, where λ is an adjustable hyperparameter that balances the network’s extracted feature information with the prior knowledge; P is a similarity matrix, which measures geographic spatial similarity using the inverse of distance and is a form of prior knowledge. (2-5) Calculate the standardized coefficient Among them, μ(·) and σ(·) represent the mean and variance; ε is a small constant for numerical stability; Softmax(·) is the activation function; (2-6) Calculate the final output out = attn × X; is the final output.

5. The algal bloom prediction method integrating multi-parameter spatiotemporal information according to claim 1, characterized in that: The attention aggregation mechanism is as follows: first, concatenate the input using concat, then perform deep feature extraction on the concatenated result, and then aggregate the extracted result with the result of the spatial attention mechanism. The specific calculation process is: (3-1) Calculate input concatenation: Y′ = concat(Y1, Y2); where Y1 and Y2 are inputs of the same dimension; concat(·) is concat connection; (3-2) Calculate the output: Y = Y′ + Attention(Y′); where Attention(·) represents the scaled dot product self-attention; and Y represents the output after fusion.

Citation Information

Patent Citations

  • Aquaculture water quality prediction system and method

    CN114282724A