Algae bloom evolution trend prediction method

By integrating multiple machine learning models and multi-indicator data through a Bayesian model averaging model, the problem of poor generalization ability of algal bloom prediction methods under different lake scenarios was solved, realizing intelligent prediction and early warning of algal bloom evolution trends, and improving the accuracy and stability of prediction.

CN121502219APending Publication Date: 2026-02-10CHINA CONSTRUCTION ZHONGHUAN CONSTRUCTION DEVELOPMENT GROUP CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511678857.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-17
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Existing algal bloom prediction methods rely on single water quality indicators or conventional machine learning models, which make it difficult to accurately characterize the coupling effects of complex environmental factors. This results in poor generalization ability of prediction results in different lake scenarios, affecting the reliability of algal bloom early warning systems.

Method used

By employing a Bayesian model to average the prediction results of multiple machine learning models, and combining historical algal bloom data and growth environment data, the model weights are dynamically adjusted through cross-validation and expectation-maximization algorithms to achieve multi-indicator data fusion and improve generalization ability.

Benefits of technology

It improves the accuracy and stability of predicting the evolution trend of algal blooms, enhances the model's adaptability to complex data and uncertain tasks, and provides a quantitative basis for early warning of lake algal blooms and ecological restoration strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121502219A_ABST
    Figure CN121502219A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of algal bloom prediction, discloses an algal bloom evolution trend prediction method, and aims to solve the problem of one-sidedness in algal bloom evolution trend prediction in the prior art. According to the method, the prediction accuracy is improved, a data set containing the algae bloom historical characteristic data and the corresponding algae bloom historical growth environment data is used when the Bayesian model average model is built, the algae bloom historical growth environment data contains a plurality of indexes related to the historical characteristic data of the algae bloom evolution, multi-index data fusion is achieved, and the prediction accuracy is improved. And the generalization ability of the model is improved. According to the technical scheme, the algal bloom growth environment data is collected, the Bayesian model average model is called to predict the algal bloom evolution trend, and intelligent prediction of the algal bloom evolution trend is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of algal bloom prediction technology, and in particular to a method for predicting the evolution trend of algal blooms. Background Technology

[0002] Algal blooms are a natural phenomenon in which the explosive proliferation of phytoplankton in aquatic bodies causes changes in water color. Their formation requires eutrophication, a suitable temperature and salinity environment, and stable hydrological and meteorological factors. Algal blooms endanger drinking water safety by producing toxic substances such as microcystins, cause oxygen depletion in the water leading to the death of organisms, and damage aquatic resources.

[0003] As core landscape units of terrestrial ecosystems, lakes' ecological health is directly linked to regional water resource security and biodiversity maintenance. However, with the increasing severity of global water pollution, algal blooms caused by lake eutrophication have become frequent, posing a key challenge to ecological governance. Currently, eutrophication and algal blooms in inland lakes have become a global challenge; therefore, predicting lake algal biomass is crucial for early warning of algal blooms and for lake ecological protection.

[0004] Current methods for predicting algal blooms largely rely on single water quality indicators or conventional machine learning models. However, single water quality indicators struggle to accurately characterize the coupling effects of complex environmental factors such as total phosphorus concentration, water temperature stratification, and photoperiod. Furthermore, while machine learning is widely used in algal bloom prediction, conventional models (such as random forests and support vector machines) have limitations in capturing the complex response mechanisms of algal growth, resulting in poor generalization ability of prediction results across different lake scenarios. This severely restricts the reliability of algal bloom early warning systems.

[0005] Therefore, how to achieve multi-indicator data fusion, improve the generalization ability of the algorithm, and realize intelligent prediction of algal bloom evolution trends is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0006] The purpose of this invention is to address the one-sidedness of current technologies in predicting algal bloom evolution trends. Therefore, this invention provides a method for predicting algal bloom evolution trends, which integrates multi-indicator data, improves the generalization ability of the algorithm, and enables intelligent prediction of algal bloom evolution trends.

[0007] To address the aforementioned technical problems, this invention provides a method for predicting the evolution trend of algal blooms, comprising:

[0008] Obtain data on the growth environment of algal blooms;

[0009] Based on the growth environment data, the Bayesian model averaging model is called to predict the evolution trend of algal blooms; the construction of the Bayesian model averaging model includes: constructing a dataset containing historical algal bloom feature data and corresponding historical algal bloom growth environment data; based on the dataset, calling each pre-designed learning model to perform model training respectively; based on the model training results, selecting a preset number of learning models to build the Bayesian model averaging model.

[0010] The historical growth environment data includes multiple indicators related to the historical characteristics of algal bloom evolution.

[0011] Preferably, the step of calling each pre-designed learning model to train the model according to the dataset includes:

[0012] The dataset was divided into a validation training set and a validation evaluation set using cross-validation.

[0013] Each learning model is trained using the aforementioned validation training set;

[0014] The performance of each learning model is evaluated using the aforementioned validation and evaluation set;

[0015] Furthermore, the step of selecting a predetermined number of learning models to construct the average model of the Bayesian model based on the model training results includes:

[0016] Based on the performance evaluation results, a predetermined number of learning models are selected as sub-models according to the coefficient of determination and mean absolute percentage error in the performance evaluation to build the average model of the Bayesian model.

[0017] Preferably, the Bayesian model average model constructed based on the sub-model includes:

[0018] Construct a prior distribution for each sub-model and determine the prior weights for each sub-model;

[0019] The posterior probability of each sub-model is calculated using the E-step of the expectation-maximization algorithm.

[0020] The likelihood function is calculated based on the posterior probability.

[0021] Based on the results of cross-validation, the weights of each sub-model are iteratively updated using the M-step of the expectation-maximization algorithm while satisfying the maximization of the likelihood function.

[0022] Based on the updated weights, the prediction results of the algal bloom evolution trend of each sub-model are weighted and averaged to obtain the prediction result of the Bayesian model average model.

[0023] Preferably, the construction of the dataset containing historical algal bloom characteristic data and corresponding historical algal bloom growth environment data includes:

[0024] Data related to algal bloom evolution is obtained through data sources, including satellite remote sensing, ground monitoring stations, and historical water quality reports.

[0025] Correct the erroneous data in each data source;

[0026] Fill in missing data in various data sources using a long short-term memory network model;

[0027] The tail-reduction method is used to process discrete data from various data sources;

[0028] Normalize the data from each data source;

[0029] Merge data from various data sources;

[0030] Select historical characteristic data of algal blooms from the selected data, and select historical growth environment data of algal blooms that are highly correlated with the historical characteristic data based on correlation analysis to construct a dataset.

[0031] Preferably, after selecting historical algal bloom characteristic data from the selected data and choosing historical algal bloom growth environment data that is highly correlated with the historical characteristic data based on correlation analysis, the method further includes:

[0032] Principal component analysis was performed on the historical growth environment data to reduce dimensionality.

[0033] Furthermore, the dataset is constructed based on the dimensionality-reduced data.

[0034] Preferably, the historical characteristic data is chlorophyll a concentration;

[0035] The historical growth environment data includes nutrient indicators, water physicochemical properties indicators, meteorological driving indicators, and spatial characteristic indicators.

[0036] Preferably, the historical growth environment data of algal blooms selected based on correlation analysis that are highly correlated with the historical characteristic data include:

[0037] The correlation between the growth environment data and chlorophyll a concentration was calculated using the Spearman correlation coefficient.

[0038] Based on the order of their correlation values, growth environment data that meet the threshold values ​​are selected as historical growth environment data of algal blooms that are highly correlated with the historical feature data.

[0039] Preferred options also include:

[0040] The dataset is divided into a training set and a test set based on time continuity;

[0041] Correspondingly, each model is trained using the training set;

[0042] The training results of each model are verified using the test set.

[0043] Preferred, pre-designed learning models include: backpropagation neural network, lightweight gradient booster, random forest, classification boosting, and extreme gradient boosting;

[0044] The performance evaluation metrics for each learning model include: coefficient of determination, relative root mean square error, explanatory power, and mean absolute percentage error.

[0045] Preferably, the iterative update of the weights of each sub-model is performed by iteratively updating the weights of each sub-model until the weight change is less than a preset value or the maximum number of iterations is reached.

[0046] This invention provides a method for predicting the evolution trend of algal blooms. Compared to current technologies that suffer from limitations in predicting algal bloom trends, the Bayesian model averaging method used in this invention improves prediction accuracy by fusing prediction results from multiple machine learning models. Furthermore, the Bayesian model averaging model is constructed using a dataset containing historical algal bloom characteristic data and corresponding historical algal bloom growth environment data. This historical algal bloom growth environment data includes multiple indicators related to the historical characteristics of algal bloom evolution, achieving multi-indicator data fusion and improving the model's generalization ability. Using this technical solution, by collecting algal bloom growth environment data and calling the Bayesian model averaging model to predict algal bloom evolution trends, intelligent prediction of algal bloom evolution trends is achieved. Attached Figure Description

[0047] Figure 1 A flowchart illustrating a method for predicting the evolution trend of algal blooms provided in an embodiment of the present invention;

[0048] Figure 2 An XGboost test set prediction value fitting curve is provided as an embodiment of the present invention;

[0049] Figure 3 This invention provides a Catboost test set prediction value fitting curve.

[0050] Figure 4 A BPNN test set prediction value fitting curve is provided as an embodiment of the present invention;

[0051] Figure 5 This is a BMA test set prediction value fitting curve provided in an embodiment of the present invention. Detailed Implementation

[0052] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present invention.

[0053] The core of this invention is to provide a method for predicting the evolution trend of algal blooms, which can achieve multi-indicator data fusion, improve the generalization ability of the algorithm, and realize intelligent prediction of the evolution trend of algal blooms.

[0054] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0055] Figure 1 A flowchart of a method for predicting the evolution trend of algal blooms provided in an embodiment of the present invention is shown below. Figure 1 As shown, the method includes:

[0056] S10: Obtain data on the algal bloom growth environment;

[0057] S11: Based on the growth environment data, use the Bayesian model averaging model to predict the evolution trend of algal blooms; the construction of the Bayesian model averaging model includes: constructing a dataset containing historical algal bloom feature data and corresponding historical algal bloom growth environment data; using the dataset, calling each pre-designed learning model to train the model respectively; based on the model training results, selecting a preset number of learning models to build the Bayesian model averaging model; the historical growth environment data includes multiple indicators related to the historical feature data of algal bloom evolution.

[0058] First, it should be noted that the algal bloom evolution trend prediction method provided by this invention is mainly used for predicting the algal bloom evolution trend in lakes. The main body executing this method can be an algal bloom evolution trend prediction device, which specifically includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the algal bloom evolution trend prediction method provided in the above embodiments. In some embodiments, the algal bloom evolution trend prediction device may also include a display, touch screen, or other human-computer interaction device. The algal bloom growth environment data acquired in step S10 can be input through a human-computer interaction device. In specific implementations, the algal bloom evolution trend prediction device provided in this embodiment may include, but is not limited to, smartphones, tablets, laptops, or desktop computers.

[0059] Of course, it is understood that if the methods in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the technical solution of the present invention can be embodied in the form of a software product, which is stored in a storage medium and executes all or part of the steps of the methods of the various embodiments of the present invention.

[0060] When using the method provided by this invention to predict the evolution trend of algal blooms, only the current algal bloom growth environment data is needed to call the Bayesian model averaging model for prediction. In step S10, the growth environment data is an important factor determining the degree of algal bloom evolution. Taking into account various factors that may affect lake algal biomass, this data can integrate multi-dimensional watershed environmental characteristic data such as soil geomorphology, land use, socio-economic factors, climate and meteorology, and hydrology and water quality to construct a lake algal biomass prediction index system. This data can be obtained by collecting relevant data from statistical yearbooks, environmental bulletins, and public data platforms. In step S11, the Bayesian model averaging model used in this invention is built based on a dataset containing historical algal bloom characteristic data and corresponding historical algal bloom growth environment data. It is understood that, in order to enhance the prediction accuracy of the Bayesian model averaging model, the Bayesian model averaging model used for lakes in different regions should be different. When building the Bayesian model averaging model, the growth status of algal blooms in lakes in different regions will be different, and the data used to build the dataset should be considered in conjunction with the actual site. When predicting the evolution trend of algal blooms, the Bayesian model average model can be directly called based on the algal bloom growth environment data under the current lake conditions.

[0061] Based on the construction of the Bayesian model average model, it can be understood that the algal bloom evolution trend prediction method provided by this invention predicts the characteristic data of algal blooms by the Bayesian model average model. This characteristic data represents the algal biomass in the lake. This invention predicts the future algal biomass in the lake by using the current growth environment data of algal blooms in the lake, thereby characterizing the evolution trend of algal blooms.

[0062] The Bayesian model averaging model in this invention is built using multiple learning models. These models are trained on the dataset separately, and then selected for the final model. To enhance the generalization ability of the Bayesian model averaging model, the selected models should be those with the best training performance. It should be noted that "multiple" in this invention only indicates that the number of models should be greater than one. In one embodiment, the number of models participating in training can be the same as the number of models ultimately selected.

[0063] To verify the results of model training, datasets are typically divided into training and testing sets during construction. Models are trained on the training set, and the training results are validated on the testing set. This embodiment builds upon this, further dividing the dataset into 80% training and 20% testing sets to ensure temporal continuity between the training and testing sets, enabling the model to learn time-series features.

[0064] This invention provides a method for predicting the evolution trend of algal blooms. Compared to current technologies that suffer from limitations in predicting algal bloom trends, the Bayesian model averaging method used in this invention improves prediction accuracy by fusing prediction results from multiple machine learning models. Furthermore, the Bayesian model averaging model is constructed using a dataset containing historical algal bloom characteristic data and corresponding historical algal bloom growth environment data. This historical algal bloom growth environment data includes multiple indicators related to the historical characteristics of algal bloom evolution, achieving multi-indicator data fusion and improving the model's generalization ability. Using this technical solution, by collecting algal bloom growth environment data and calling the Bayesian model averaging model to predict algal bloom evolution trends, intelligent prediction of algal bloom evolution trends is achieved.

[0065] The above embodiments illustrate that the Bayesian model averaging model is built by fusing the prediction results of multiple learning models. Based on the above embodiments, this embodiment provides a specific method for selecting learning models.

[0066] First, based on the dataset, each pre-designed learning model is called to train the model and predict the evolution trend of algal blooms. This step specifically includes: using cross-validation to divide the dataset into a validation training set and a validation evaluation set; training each learning model using the validation training set; and evaluating the performance of each learning model using the validation evaluation set.

[0067] Cross-validation is a statistical method used to evaluate the generalization ability of machine learning models. It involves dividing the dataset into training and evaluation sets. The training set is used to train the model, and the evaluation set is used to assess its performance. This method effectively prevents overfitting. In practice, K-fold cross-validation can be used for training. During training, the training loss, validation loss, and relevant performance evaluation metrics for each model are recorded, such as the coefficient of determination, relative root mean square error, interpretability, and mean absolute percentage error. Several of these metrics can be selected as evaluation criteria for choosing sub-models. For example, based on the performance evaluation results, a predetermined number of learning models can be selected as sub-models to build a Bayesian average model, based on the coefficient of determination and mean absolute percentage error.

[0068] As one example, the pre-designed learning models include: backpropagation neural network, lightweight gradient booster, random forest, classification boosting, and extreme gradient boosting; the performance evaluation metrics for each learning model include: coefficient of determination, relative root mean square error, interpretability, and mean absolute percentage error.

[0069] The construction of the Backpropagation Neural Network (BPNN) includes: building the BP neural network using the Keras library in Python; selecting a sequential model and adding several dense layers (e.g., input layer, hidden layer, and output layer); using the Rectified Linear Unit (ReLU) activation function, with the output layer activation function using a linear function to adapt to the regression task; configuring the optimizer as Adaptive Moment Estimation (Adam) or Stochastic Gradient Descent (SGD) and setting the learning rate (e.g., 0.001); using Mean Squared Error (MSE) as the loss function for model training; and during training, setting an appropriate batch size (optimal 32) and the number of neurons in each hidden layer (optimal 128), and monitoring the loss and validation loss during training.

[0070] The Lightweight Gradient Boosting Machine (LightGBM) was built by using LGBMRegressor from the LightGBM library for modeling. Initial parameters were set (learning rate 0.03, number of trees 30, maximum depth 3, etc.) and trained. Hyperparameters were optimized through cross-validation (setting the learning rate to 0.15, number of trees to 40, maximum depth to 3, maximum number of leaves to 40, training sample ratio to 0.8, minimum number of samples per node to 30, and minimum weighted sum to 2) to ensure consistent performance across different data splits.

[0071] The construction of a Random Forest (RF) involves using RandomForestRegressor from Scikit-Learn. Initial settings include the number of decision trees (10) and maximum depth (unlimited). The model's performance is evaluated through cross-validation, and parameters are adjusted to improve accuracy and stability. Ultimately, the number of decision trees is determined to be 30, with sampling with replacement. The maximum tree depth is 30, the minimum number of samples required for node splits is 4, the minimum number of samples required for each leaf node is 5, and the maximum number of features is 0.8.

[0072] The process of establishing Categorical Boosting (CatBoost) involves: modeling using CatBoostRegressor from the CatBoost library; encoding categorical features; and initially setting parameters such as the learning rate, number of trees, and maximum depth. During training, CatBoost's built-in hyperparameter tuning tools are used to automatically optimize the parameters, determining the optimal parameter combination (70 decision trees, a learning rate of 0.1, a maximum depth of 4, an L2 regularization coefficient of 3, and a feature ratio of 0.8) to improve model performance.

[0073] The implementation of Extreme Gradient Boosting (XGBoost) involves: modeling using XGBRegressor from the XGBoost library; setting hyperparameters such as learning rate, number of trees, and maximum depth; optimizing hyperparameters through grid search and cross-validation to improve model performance on the validation set; and finally determining the optimal parameters as follows: 60 decision trees, a maximum decision tree depth of 3, a learning rate of 0.1, a feature selection ratio of 1 for each tree, and a sample selection ratio of 1.

[0074] The evaluation indicators include: the coefficient of determination (R²). 2 R: The coefficient of determination between the model's predicted and actual values, reflecting the model's ability to explain data variation. 2 The closer the value is to 1, the stronger the explanatory power of the model.

[0075] Relative Root Mean Square Error (RRMSE): This metric measures the relative error between the model's predicted values ​​and the actual values, reflecting the accuracy of the model's predictions. The smaller the RRMSE value, the smaller the model's prediction error relative to the actual value, and the higher the prediction accuracy.

[0076] Explanatory power: Measures the extent to which explanatory variables explain the explained variable, reflecting the goodness of fit of the model to the data. The closer the explanatory power value is to 1, the stronger the explanatory power of the explanatory variables to the explained variable.

[0077] Mean Absolute Percentage Error (MAPE): This calculates the average absolute value of the relative error between the predicted and actual values, reflecting the degree of relative deviation between the model's predictions and the actual values. The smaller the MAPE value, the higher the model's prediction accuracy.

[0078] In practical implementation, the comparison table of the above learning model performance evaluation indicators is shown in Table 1.

[0079] Table 1 Comparison of Learning Model Performance Evaluation Indicators

[0080]

[0081] As can be seen from Table 1, for XGBoost: test set R 2 It has the highest RRMSE (0.83), and its RRMSE (0.42) and MAPE (0.43) are both better than other tree models (such as RF and LightGBM).

[0082] For CatBoost: Test Set R 2 The value is 0.82, and the MAPE is the lowest (0.41), indicating strong robustness to outliers.

[0083] For BPNN: Test set R 2 With a value of 0.83, it provides the most accurate prediction of extreme peak values, compensating for the shortcomings of tree models. Neural network structures excel at capturing nonlinear interactions (such as the coupling effect between the nitrogen-phosphorus ratio and temperature).

[0084] Therefore, after comprehensive consideration, these three models were selected as sub-models to build a Bayesian Model Averaging (BMA) model. The performance evaluation index comparison table of the BMA model and the sub-models is shown in Table 2.

[0085] Table 2 Comparison of Performance Evaluation Indicators of BMA Model and Sub-model

[0086]

[0087] This invention constructs a robust and stable BMA model by integrating multiple learning models. It retains the advantage of rapidly processing high-dimensional data while also learning the long-term dynamic characteristics of lake ecosystems. After targeted training and validation using multiple performance metrics (R², RRMSE, interpretability, MAPE), the model maintains stable performance even in the face of data noise, parameter fluctuations, and environmental changes, effectively solving the problems of computational complexity and poor generalization of traditional mechanistic models.

[0088] This technique dynamically adjusts model weights through an iterative process: first, uniform initial weights are set; then, the posterior probability of each model is calculated in the E-step; and finally, the weights are updated based on these probabilities in the M-step. This process not only enables the model to adaptively optimize its predictive performance but also significantly improves the accuracy and robustness of predictions. Compared with traditional methods, this dynamic weight adjustment mechanism effectively reduces the bias risk of a single model and enhances the model's adaptability to complex data and uncertain tasks, providing strong technical support for the accurate prediction and effective control of algal blooms in lakes.

[0089] This model not only achieves high-precision prediction of algal biomass (chlorophyll a concentration), but also dynamically updates weights through a Bayesian framework to adapt to new observational data. Its output provides quantitative evidence for early warning of lake algal blooms and the formulation of ecological restoration strategies, helping environmental management departments respond quickly to changes in water quality. This technology has low deployment barriers and strong scalability, providing a reusable intelligent tool for global lake eutrophication control and water resource protection.

[0090] Based on the above embodiments, to further improve the prediction accuracy of the BMA model, the weights of each sub-model are adjusted when building the Bayesian model averaging model using sub-models. In this embodiment, building the Bayesian model averaging model based on the sub-models includes: constructing a prior distribution for each sub-model and determining the prior weights of each sub-model; calculating the posterior probability of each sub-model using the E-step of the Expectation-Maximization algorithm; calculating the likelihood function based on the posterior probability; iteratively updating the weights of each sub-model using the M-step of the Expectation-Maximization algorithm, while satisfying the maximization of the likelihood function, based on the results of cross-validation; and performing a weighted average of the algal bloom evolution trend prediction results of each sub-model based on the updated weights, which is used as the prediction result of the Bayesian model averaging model.

[0091] The prior distribution in the Bayesian model average reflects the belief in the relative merits of each candidate model before observed data, and is a crucial part of model selection and prediction. Prior distributions are constructed and weights are calculated for the three high-performing learning models selected in the above examples. It is assumed that the weights of each model follow a Dirichlet distribution, and the weights are initially equal, i.e., the prior distribution parameters are (1, 1, 1). The prediction error of each model is calculated on the training set, assuming the error follows a Gaussian distribution, and the likelihood function of each model is calculated.

[0092] Specifically, assuming the initial weights are uniformly distributed, the initial weight calculation formula is as follows:

[0093] ;

[0094] in, The number of models participating in the integration. These are the initial weights.

[0095] In the model training phase using cross-validation, each sub-model is used to predict data in the validation evaluation set, resulting in a prediction matrix for each sub-model. Next, the weight calculation phase employs the Expectation Maximization (EM) algorithm to iteratively update the model weights. Finally, based on the updated weights, a weighted average of the algal bloom evolution trend predictions from each sub-model is calculated, serving as the weighted prediction result for the Bayesian model average. Specifically, based on the BMA model framework, the E-step and M-step iterations of the EM algorithm capture the dynamic changes in model weights as prediction bias accumulates, constructing a weight adjustment mechanism. The model's interpretability of data points is used to analyze the weight propagation pattern, identify the contributions of key sub-models, and construct a weight allocation system. A two-step iterative network is constructed, consisting of an E-step calculating the posterior probability and an M-step updating the weights. The core idea of ​​this algorithm is to solve for the posterior weights of each model to maximize the likelihood function of the BMA model; the calculation process is divided into E-steps and M-steps. In the E-step, the posterior probability of each model is calculated for each data point, and the likelihood function of each model is calculated based on these posterior probabilities. The M-step then updates the model weights based on the results of the E-step to maximize the current expected likelihood function. That is, the stronger the model's explanatory power for multiple data points, the greater the increase in its weights. The specific calculation is shown in the following formula:

[0096] ;

[0097] ;

[0098] in, Indicates the first In this iteration, the data points From the model The generated posterior probability, For the first Model at the next iteration The weights (prior probabilities). For the model In the input Predict The likelihood value, This represents the total number of models, which should be 3 here, corresponding to the 3 sub-models selected in the above embodiment. For the first Model at the next iteration The updated weights The total number of training data samples, This represents the contribution of the posterior probability calculated in the E-step.

[0099] In practice, the E-step and M-step are repeated until the weight change is less than the preset value or the maximum number of iterations is reached. Table 3 shows the BMA model iteration process record. The weights of XGBoost and BPNN increase significantly with iteration, while the weights of CatBoost gradually decrease due to the accumulation of prediction bias. By the fifth iteration, the weights tend to stabilize. Through dynamic weight adjustment, the predictive ability of sub-models is effectively captured, thereby improving model performance to a certain extent. Even if the initial weights are not ideal, the BMA model can still gradually approach the optimal weights through the iteration process, achieving dynamic adaptation and improvement of model performance. Based on this, the prior distribution is determined, balancing model complexity and fitting effect, showing a good balance in practical applications. Predictions are made for each model using a test set. Figure 2 This invention provides an XGboost test set prediction value fitting curve. Figure 3 This invention provides a Catboost test set prediction value fitting curve. Figure 4 This is a BPNN test set prediction value fitting curve provided in an embodiment of the present invention. Figure 5 This invention provides a BMA test set prediction value fitting curve, for comparison. Figure 2 , Figure 3 , Figure 4 and Figure 5 It can be seen that the predicted distribution of the BMA model is closest to the true distribution.

[0100] Table 3. Record of BMA Model Iteration Process

[0101]

[0102] As a representative indicator of algal biomass, chlorophyll a concentration can be used as a feature data in practical applications, allowing for the prediction of algal bloom evolution trends in lakes. The algal bloom growth environment data related to chlorophyll a concentration includes not only nutrient data such as the nitrogen-to-phosphorus ratio in the lake, but also information such as lake water quality. Specifically, in this embodiment, when constructing the dataset, historical feature data is set as chlorophyll a concentration; historical growth environment data is divided into nutrient indicators, water physicochemical property indicators, meteorological driving indicators, and spatial feature indicators.

[0103] To obtain more comprehensive growth environment data related to algal bloom evolution, the above embodiments introduced the acquisition of data from multiple channels. This embodiment provides a specific application scenario. Specifically, constructing a dataset containing historical algal bloom characteristic data and corresponding historical algal bloom growth environment data includes: acquiring algal bloom evolution-related data through data sources; data sources include satellite remote sensing, ground monitoring stations, and historical water quality reports; correcting erroneous data in each data source; filling in missing data in each data source based on a long short-term memory network model; processing discrete data in each data source using a tail reduction method; normalizing the data in each data source; fusing the data in each data source; selecting historical algal bloom characteristic data from the data, and selecting historical algal bloom growth environment data highly correlated with the historical characteristic data based on correlation analysis to construct the dataset.

[0104] In this embodiment, the remote sensing data provided by satellite remote sensing technology may include derived indicators such as chlorophyll a concentration, water temperature, and transparency, while the data provided by ground monitoring stations covers water temperature, light hours, etc., and historical water quality reports include nitrogen-phosphorus ratio, pH, dissolved oxygen, etc.

[0105] To construct the dataset, it is necessary to check and correct erroneous, missing, and outlier values. Erroneous values ​​can be corrected based on the data range and physical principles; missing values ​​can be imputed using interpolation or imputation methods based on long short-term memory network models; and outliers are handled using tail reduction. It is understandable that due to different data sources, the data types are not consistent. Therefore, to eliminate scale differences between different data sources, data normalization is performed, allowing data from different sources to be compared and analyzed under a unified standard. Finally, data from different data sources are fused accordingly, aligning remote sensing data with ground monitoring data. In this embodiment, satellite remote sensing technology provides broad-coverage chlorophyll a concentration information, while ground monitoring stations provide more precise location data. Combined with indicator data from historical water quality reports, this improves the comprehensiveness and completeness of the data.

[0106] When chlorophyll a concentration is selected as the historical characteristic data of algal blooms in the chosen data set, Spearman's correlation coefficient can be used to calculate the correlation between each growth environment data and chlorophyll a concentration in order to reduce data dimensionality. Based on the magnitude of each correlation, growth environment data meeting the threshold are selected as the historical growth environment data for algal blooms that are highly correlated with the historical characteristic data. Finally, the fused historical growth environment data can be divided into nutrient indicators, water physicochemical property indicators, meteorological driving indicators, and spatial characteristic indicators. These four indicators form an indicator system highly correlated with the prediction of algal bloom evolution trends. The specific data included in each indicator are shown in Table 4.

[0107] Table 4. Indicator System for Predicting Algal Bloom Evolution Trends

[0108]

[0109] After identifying highly correlated variables, principal component analysis (PCA) is performed to reduce dimensionality. PCA transforms multiple correlated variables into a few principal components through linear transformation, which retain most of the information from the original data. PCA not only reduces the dimensionality of the data but also removes redundant information, thereby reducing the complexity of the model and computational cost.

[0110] The method for predicting algal bloom evolution trends provided by this invention has been described in detail above. The various embodiments in the specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. It should be noted that those skilled in the art can make various improvements and modifications to this invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this invention.

Claims

1. A method for predicting the evolution trend of algal blooms, characterized in that, include: Obtain data on the growth environment of algal blooms; Based on the growth environment data, the Bayesian average model is used to predict the evolution trend of algal blooms. The construction of the Bayesian model averaging model includes: constructing a dataset containing historical algal bloom feature data and corresponding historical algal bloom growth environment data; training each pre-designed learning model according to the dataset; and selecting a preset number of learning models to construct the Bayesian model averaging model based on the model training results. The historical growth environment data includes multiple indicators related to the historical characteristics of algal bloom evolution.

2. The method for predicting the evolution trend of algal blooms according to claim 1, characterized in that, The step of calling each pre-designed learning model to train the model according to the dataset includes: The dataset was divided into a validation training set and a validation evaluation set using cross-validation. Each learning model is trained using the aforementioned validation training set; The performance of each learning model is evaluated using the aforementioned validation and evaluation set; Furthermore, the step of selecting a predetermined number of learning models to construct the average model of the Bayesian model based on the model training results includes: Based on the performance evaluation results, a predetermined number of learning models are selected as sub-models according to the coefficient of determination and mean absolute percentage error in the performance evaluation to build the average model of the Bayesian model.

3. The method for predicting the evolution trend of algal blooms according to claim 2, characterized in that, The Bayesian model is constructed based on the sub-models, including the average model: Construct a prior distribution for each sub-model and determine the prior weights for each sub-model; The posterior probability of each sub-model is calculated using the E-step of the expectation-maximization algorithm. The likelihood function is calculated based on the posterior probability. Based on the results of cross-validation, the weights of each sub-model are iteratively updated using the M-step of the expectation-maximization algorithm while satisfying the maximization of the likelihood function. Based on the updated weights, the prediction results of the algal bloom evolution trend of each sub-model are weighted and averaged to obtain the prediction result of the Bayesian model average model.

4. The method for predicting the evolution trend of algal blooms according to any one of claims 1 to 3, characterized in that, The dataset constructed, which includes historical characteristic data of algal blooms and corresponding historical growth environment data of algal blooms, includes: Data related to algal bloom evolution is obtained through data sources, including satellite remote sensing, ground monitoring stations, and historical water quality reports. Correct the erroneous data in each data source; Fill in missing data in various data sources using a long short-term memory network model; The tail-reduction method is used to process discrete data from various data sources; Normalize the data from each data source; Merge data from various data sources; Select historical characteristic data of algal blooms from the selected data, and select historical growth environment data of algal blooms that are highly correlated with the historical characteristic data based on correlation analysis to construct a dataset.

5. The method for predicting the evolution trend of algal blooms according to claim 4, characterized in that, After selecting historical algal bloom characteristic data from the chosen data, and selecting historical algal bloom growth environment data that are highly correlated with the historical characteristic data based on correlation analysis, the data further includes: Principal component analysis was performed on the historical growth environment data to reduce dimensionality. Furthermore, the dataset is constructed based on the dimensionality-reduced data.

6. The method for predicting the evolution trend of algal blooms according to claim 5, characterized in that, The historical characteristic data refers to chlorophyll a concentration; The historical growth environment data includes nutrient indicators, water physicochemical properties indicators, meteorological driving indicators, and spatial characteristic indicators.

7. The method for predicting the evolution trend of algal blooms according to claim 6, characterized in that, The historical growth environment data of algal blooms that are highly correlated with the historical characteristic data, selected based on correlation analysis, include: The correlation between the growth environment data and chlorophyll a concentration was calculated using the Spearman correlation coefficient. Based on the order of their correlation values, growth environment data that meet the threshold values ​​are selected as historical growth environment data of algal blooms that are highly correlated with the historical feature data.

8. The method for predicting the evolution trend of algal blooms according to claim 4, characterized in that, Also includes: The dataset is divided into a training set and a test set based on time continuity; Correspondingly, each model is trained using the training set; The training results of each model are verified using the test set.

9. The method for predicting the evolution trend of algal blooms according to claim 2, characterized in that, The pre-designed learning models include: backpropagation neural network, lightweight gradient booster, random forest, classification boosting, and extreme gradient boosting. The performance evaluation metrics for each learning model include: coefficient of determination, relative root mean square error, explanatory power, and mean absolute percentage error.

10. The method for predicting the evolution trend of algal blooms according to claim 3, characterized in that, The iterative update of the weights of each sub-model is as follows: iteratively update the weights of each sub-model until the weight change is less than a preset value or the maximum number of iterations is reached.