Lake algae bloom outbreak short-term prediction method based on machine learning
Through machine learning models based on remote sensing images and water quality monitoring data, the flexibility and spatial distribution problems of algae bloom prediction model are solved, efficient algae bloom coverage and spatial distribution prediction are achieved, and early forecast window is provided to support effective management and emergency measures.
Patent Information
- Application Number
- CN202510568237.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-07-25
AI Technical Summary
The existing algae bloom prediction model requires a large amount of observation data and parameter adjustment, which is poor in flexibility, difficult to adapt to different lake ecosystems and environmental conditions, and there are difficulties in predicting spatial distribution, failure of prediction when cloud cover, and lack of efficient variable accumulation and spatial interpolation technology.
Based on the historical remote sensing image data of lakes, the spatial distribution of algae blooms is extracted, the cumulative value of environmental variables is calculated, and the time and space accumulation variables are constructed using machine learning models. Combining remote sensing data and water quality monitoring data, a machine learning prediction model is constructed to predict the distribution of algae blooms in the future.
Efficient and low-cost algae bloom coverage and spatial distribution prediction are achieved, and early forecast windows are provided to support timely management and emergency measures to reduce the impact of algae blooms on public health and ecosystems.
Smart Images

Figure CN120373137A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of machine learning technology and its applications, and particularly to a short-term prediction method for lake algal bloom outbreaks based on machine learning. Background Art
[0002] Cyanobacterial blooms refer to the phenomenon where cyanobacteria multiply in large numbers and form visible scum aggregations on the water surface, which has become one of the most serious environmental problems in inland waters. Moreover, with the intensification of climate change and human activities, the expansion of global algal blooms has been continuously accelerating. These algal blooms not only change the color of the water body and are accompanied by a foul smell, but also seriously threaten irrigation, fisheries, and drinking water safety. More seriously, the toxins released by algal blooms can directly harm the health of humans and animals. Therefore, it is particularly important to predict the occurrence of algal blooms in a timely manner, but their dynamics and complexity pose great challenges to the development of effective prediction models.
[0003] Regarding algal bloom prediction, mechanistic models (such as EFDC, PCLake, MIKE, etc.) currently dominate. Although these models are constructed based on physical, chemical, and biological principles and can describe algal bloom dynamics to a certain extent, they have obvious limitations. First of all, they require a large amount of observational data to determine numerous parameters and boundary conditions. In addition, the flexibility and generality of these models are poor. Facing different lake ecosystems and environmental conditions, a large number of parameter adjustments and recalibrations are often required, which undoubtedly further exacerbates the prediction complexity of the models in variable water body environments. In contrast, machine learning algorithms have significant advantages. Their data requirements are flexible and they can efficiently process complex relationships. Such as random forest (RF), gradient boosting decision tree (GBDT), extreme gradient boosting (XGBoost), artificial neural network (ANN), and long short-term memory (LSTM) networks, etc., can automatically extract non-linear patterns and accurately capture the complex variable relationships affecting algal blooms. Among these models, RF combines multiple base learners to improve the learning ability, flexibly adjusts parameters to improve the generalization performance, so as to adapt to the characteristics of different lakes and data features, and achieve personalized training. And the calculation speed is fast during prediction, which can provide timely support for algal bloom emergency management and decision-making, and shows great potential in CyanoHABs prediction.
[0004] The computational advantages of machine learning coexist with challenges. One of the challenges lies in constructing effective variables for algal bloom prediction. In traditional predictions, instantaneous variables are usually the main ones, and their cumulative effects and time lag effects have not been fully explored. Conventional cumulative effect studies usually focus on meteorological variables. Water quality parameters such as nitrogen and phosphorus are directly related to algal growth, but due to the scarcity of daily monitoring data, they are usually excluded from the cumulative impact analysis. Integrating heterogeneous variables and constructing a reasonable variable accumulation and combination strategy will help to more comprehensively reveal the comprehensive response relationship between algal blooms and the environment.
[0005] Another key challenge facing machine learning models is the prediction of the spatial distribution of algal blooms. Current methods have difficulty balancing computational feasibility and the need for spatially representative variables that reflect the overall heterogeneity of the lake. Remote sensing-based methods are capable of large-scale algal bloom predictions but tend to fail during summer cloud cover, which disrupts temporal continuity. ERA5-Land meteorological data cannot resolve fine spatial patterns, limiting its application to large water bodies. Although in situ monitoring data are difficult to capture the full picture of a lake, they are the most direct indicator of the state of the algal bloom. Integrating advanced data mining techniques (such as data fusion and spatial interpolation) based on monitoring data can open up new avenues for high-resolution spatial forecasting. Summary of the invention
[0006] The purpose of the present invention is to provide a short-term prediction method for lake algal bloom outbreaks based on machine learning, so as to achieve future short-term prediction of algal blooms in eutrophic lakes.
[0007] In order to achieve the above technical objectives, the present invention adopts the following technical solutions:
[0008] A short-term prediction method for lake algal bloom outbreaks based on machine learning, the method comprising:
[0009] Based on the remote sensing image data of the lake in the historical period, the spatial distribution binary raster data of algal blooms were extracted and the coverage rate of algal blooms was calculated;
[0010] Based on the monitoring data of environmental variables related to algal bloom occurrence, the cumulative values of environmental variables at different cumulative time steps under different prediction periods are calculated, and multiple sets of variable sets with different cumulative time steps are generated for each prediction period.
[0011] Based on the correlation between the algal bloom coverage and the environmental variables in different groups of variables, the optimal time accumulation variable for each prediction period is selected; and the optimal time accumulation variable is spatially interpolated to obtain the optimal spatial accumulation variable for each prediction period;
[0012] Taking the optimal time accumulation variable as input and the algal bloom coverage as output, a machine learning model corresponding to the prediction period is constructed and trained; taking the optimal spatial accumulation variable as input and the raster data as output, a machine learning model corresponding to the prediction period is constructed and trained;
[0013] For the lake to be predicted, the trained machine learning model is used to predict the algal bloom coverage prediction results and the algal bloom occurrence probability distribution values for different prediction periods. The algal bloom probability occurrence threshold is calculated based on the algal bloom coverage prediction results and the algal bloom occurrence probability distribution values, and the algal bloom spatial distribution prediction results corresponding to different prediction periods are obtained.
[0014] In some embodiments of the present invention, floating algae indices are used to identify algae in the image, the image pixels are divided into bloom-occurring pixels and non-bloom-occurring pixels, and binary raster data is formed.
[0015] The ratio of the number of bloom-occurring pixels to the number of all lake pixels is calculated as the bloom coverage rate.
[0016] The floating algae index in the present invention can be the existing FAI index, or alternative indices such as the AFAI index can be selected according to the band differences of different images.
[0017] In some embodiments of the present invention, the environmental variables include water quality variables and meteorological variables.
[0018] The selected environmental variables are those for which daily continuous monitoring data can be obtained.
[0019] In some embodiments of the present invention, the method of generating multiple sets of variable sets with different cumulative time steps for each prediction period is as follows:
[0020] For the case where the prediction period is m days in advance, the cumulative value of each environmental variable is calculated from the target date t backwards for m to n days, where m ≤ n and n is the preset maximum cumulative time for each variable.
[0021] The cumulative value is selected as the statistical value of the environmental variable during the period from the target date t backwards for m to n days.
[0022] Optionally, m = 1, 3, 7, and the maximum cumulative time n is taken as 30. That is, the cumulative value of each environmental variable is calculated from the target date backwards for 1 day (t - 1) to 30 days (t - 30), the cumulative value of each environmental variable is calculated from the target date backwards for 3 days (t - 3) to 30 days (t - 30), and the cumulative value of each environmental variable is calculated from the target date backwards for 7 days (t - 7) to 30 days (t - 30). Taking m = 1 and the maximum cumulative time n = 30 as an example, the model constructed at this time is the model for a 1-day advance prediction period. The cumulative value of each environmental variable is calculated from the target date backwards for 1 day, the cumulative value from the target date backwards for 1 day to 2 days, the cumulative value from the target date backwards for 1 day to 3 days... the cumulative value from the target date backwards for 1 day to 30 days, and 30 sets of variable sets with different cumulative time steps are constructed. The best time cumulative variable corresponding to a 1-day advance prediction period is selected from the 30 sets of variable sets with different cumulative time steps for constructing the model for a 1-day advance prediction period.
[0023] Optionally, the statistical value includes one or more of the maximum value, minimum value, average value, and total value.
[0024] In some embodiments of the present invention, the method of spatial interpolation includes:
[0025] An irregular triangular network TIN is established using the optimal time cumulative variables at multiple stations in the lake. All triangles in the TIN are traversed and searched, and the centroid position is extracted as the position of the added virtual sample point.
[0026] The triangles are traversed and superimposed step by step to continuously densify the sample points. Finally, the attributes are calculated and interpolated using the inverse distance weighting method based on the triangle vertices, and the optimal spatial cumulative variables are obtained in each environmental variable.
[0027] In some embodiments of the present invention, when training the machine learning model, the input parameters are permuted and combined to construct multiple machine learning models with different single-parameter or multi-parameter combinations as inputs.
[0028] The optimal model is selected as the model for predicting the algal bloom coverage rate or predicting the algal bloom occurrence probability distribution value.
[0029] For example, after obtaining n optimal time cumulative variables for a set of variables at a specific time step, single variables among the n optimal time cumulative variables or combinations of 2, 3,..., n variables among the n optimal time cumulative variables are used as inputs to construct and train several machine learning models. After accuracy verification of the obtained several machine learning models, the optimal model is selected as the prediction model for the algal bloom coverage rate.
[0030] Optionally, the performance of each variable combination is tested using the coefficient of determination (R 2 ) and the root mean square error (RMSE) of the validation data; the optimal prediction model is selected.
[0031] In some embodiments of the present invention, the algal bloom coverage rate data is logarithmically processed with log10 before being used for model training.
[0032] In some embodiments of the present invention, the method for determining the algal bloom probability occurrence threshold is as follows:
[0033] By combining the predicted algal bloom coverage rate values and occurrence probability values of each sample, the probability mean and standard deviation of all samples are calculated to determine the algal bloom probability occurrence threshold in different prediction periods.
[0034] Optionally, the sum of the probability mean µ and the standard deviation σ (µ + σ) is used as the algal bloom probability occurrence threshold in different prediction periods.
[0035] In some embodiments of the present invention, the machine learning model selects the random forest model.
[0036] In some embodiments of the present invention, the remote sensing image data selects MODIS-Terra images, and the MODIS-Terra image data is used to extract the algal bloom spatial distribution after geometric correction and atmospheric correction processing.
[0037] Through the cumulative effect analysis of the occurrence of algal blooms in historical remote sensing monitoring data and the data of historical meteorological and water quality monitoring stations, the present invention reveals the long-term impact of various environmental variables on the development of cyanobacterial blooms. Based on this analysis, using multi-site, multi-type and daily continuous meteorological and water quality monitoring data as environmental variables, the optimal time cumulative variables of environmental variables and the corresponding optimal time cumulative variables in different prediction periods are mined as prediction models. Using the algal bloom coverage rate data and the spatial distribution binary raster data derived from remote sensing satellite data as prediction targets, machine learning prediction models for different prediction periods are constructed to predict the distribution of algal blooms in the short term in the future.
[0038] The present invention has the following beneficial effects:
[0039] (1) The prediction results directly output the algal bloom coverage rate and spatial distribution map, rather than indirect indicators (such as chlorophyll a concentration, algal biomass, microcystin concentration, etc.), which provides an intuitive decision-making basis for managers;
[0040] (2) Only relying on the meteorological and water quality station data on historical consecutive dates as input variables of the machine learning model, this efficient and low-cost technical framework makes up for the failure of the current satellite-dependent system during cloud cover and the large number of parameterization problems of numerical models;
[0041] (3) The early warning window (such as 1 / 3 / 7 days in advance) is used for the active management of algal blooms, which provides a valuable time window for managers to deploy monitoring and emergency measures in advance to ensure rapid response and control of large-scale algal blooms. Through the predicted algal bloom spatial distribution map, managers can preferentially take intervention measures for key areas such as drinking water intake points and tourist areas to reduce the impact of algal blooms on public health and ecosystem services. Description of the Drawings
[0042] Figure 1 is the flowchart of the method of the present invention.
[0043] Figure 2 is a schematic diagram of the results of predicting the algal bloom coverage rate 1 / 3 / 7 days in advance in Chaohu Lake, Anhui Province, which is a specific embodiment of the present invention.
[0044] Figure 3 is a schematic diagram of the results of predicting the algal bloom spatial distribution 1 / 3 / 7 days in advance in Chaohu Lake, Anhui Province, which is a specific embodiment of the present invention. Detailed Embodiments
[0045] Taking Chaohu Lake, a typical eutrophic lake in China, as an example, the technical solution of the present invention is further elaborated as follows:
[0046] (1) Collect environmental factors closely related to the occurrence of algal blooms, which may include water quality variables and meteorological variables.
[0047] Since algal blooms have high temporal dynamic characteristics, the environmental variables in the embodiment mainly consider meteorological variables and water quality variables at multiple sites around the lake volume, including daily continuous average temperature, maximum temperature, minimum temperature, average wind speed, maximum wind speed, sunshine hours, average relative humidity, precipitation, air pressure, pH, dissolved oxygen, total nitrogen, total phosphorus, and nitrogen-phosphorus ratio.
[0048] (2) Obtain remote sensing image data of the lake to be predicted in the historical period.
[0049] High-frequency satellite data is essential for revealing the dynamic changes of algal blooms. The MODIS satellite provides daily remote sensing images and is a key tool for monitoring algal blooms. The present invention uses MODIS-Terra images with low cloud cover and high quality. The images have been processed by geometric correction, atmospheric radiation correction, etc., and are remote sensing reflectance (Rrc) data of the top atmosphere after Rayleigh scattering correction.
[0050] (3) Extract binary raster data samples of algal bloom coverage and spatial distribution.
[0051] Based on the reported floating algal bloom index (FAI), pixels were divided into algal bloom pixels and algal bloom non-bloom pixels, and the algal bloom spatial distribution binary raster data was extracted. Based on the number of algal bloom pixels / the number of pixels in the entire lake, the algal bloom coverage samples were extracted. The algal bloom coverage and spatial distribution binary raster data were used as the target variables of the model respectively. In order to make the algal bloom coverage samples conform to the normal distribution, they were log10 transformed before model training.
[0052] (4) Construct time accumulation variables as model input.
[0053] There is a time cumulative effect between algal blooms and environmental variables. To make full use of the relationship between the two and perform effective modeling, considering the growth cycle of cyanobacteria, the present invention sets 30 days as the maximum cumulative time for each variable to construct time cumulative variables: ① For each variable in different prediction periods (predicting 1 / 3 / 7 days in advance), starting from 1 day before the target date t (t - 1), 3 days before (t - 3), and 7 days before (t - 7) respectively, the cumulative time period is increased day by day forward until 30 days before; ② For each variable within different cumulative time steps, the cumulative maximum value, minimum value, average value, and total value are calculated respectively, so as to generate subsets of cumulative variables with different time steps; ③ Spearman correlation analysis is adopted to calculate the correlation and significance level between the algal bloom coverage rate and each group of cumulative variables respectively. Through this analysis, the optimal cumulative time for each variable is determined in the corresponding prediction period, and the variables based on these times are the optimal cumulative variables. For the series data of air temperature (average, maximum, minimum), wind speed (average, maximum), and nitrogen and phosphorus (total nitrogen, total phosphorus, nitrogen-phosphorus ratio), only the variable with the highest Spearman correlation value is selected as the prediction variable.
[0054] (5) Perform spatial interpolation based on the optimal time cumulative variables to obtain the optimal spatial cumulative variables.
[0055] Use the multi-site and optimal time cumulative variables to establish a Triangulated Irregular Network (TIN). Traverse and search all triangles in the TIN, and extract the centroid position as the position of the added virtual sample point. Gradually superimpose and traverse the triangles to continuously densify the sample points. Finally, calculate the attribute (cumulative value) and interpolate based on the triangle vertices using the inverse distance weighting method (Equation 1) to obtain the optimal spatial cumulative variables in each environmental variable.
[0056]
[0057]
[0058]
[0059] Where is the attribute value of the added sample point, and are the weight value and attribute (optimal cumulative value) of each original sample point respectively, is the distance between the added sample point and the 𝑖-th original sample point, ([[]] , ) and ([[]] , ) are the coordinate positions of the added sample point and the original sample point respectively.
[0060] (6) Screen the best variable combinations for 1 / 3 / 7 days in advance.
[0061] To find the optimal variable combination for achieving good prediction, this study traversed and searched every possible variable subset: Assuming there are n variables, the model gradually increased the input variables from 1 to n, which would generate 2 n - 1 variable combinations and the corresponding 2 n - 1 algorithms, and used the R of the validation data 2 (Equation 2) and RMSE (Equation 3) to test the performance of each variable combination. Finally, the variable combination with the optimal performance was selected to predict algal blooms.
[0062]
[0063]
[0064] Where is the actual value, is the predicted value, is the average value of the actual values, is the number of samples.
[0065] (7) Construct RF models for 1 / 3 / 7 days in advance to predict the algal bloom coverage rate.
[0066] Based on the best time - cumulative variables and the algal bloom coverage rate data samples, the data was divided into a training set and a test set in a ratio of 7:3. The optimal variable combinations and RF models corresponding to the predictions 1 / 3 / 7 days in advance were respectively selected to predict the algal bloom coverage rate, and the predicted results of the algal bloom coverage rate are as Figure 2 shown. The R values of the above - constructed algal bloom coverage rate prediction models in the predictions 1 / 3 / 7 days in advance 2 are 0.81, 0.74, and 0.59 respectively.
[0067] (8) Construct RF models for 1 / 3 / 7 days in advance to predict the spatial distribution of algal blooms.
[0068] Based on the best spatial - cumulative variables and the binarized raster data samples of algal blooms, the RF model initially outputs the probability values of algal blooms occurring or not occurring for each pixel. Combining the predicted algal bloom coverage rate values and the probability values of each sample, the probability mean (µ) and standard deviation (σ) of all samples were calculated. The method of µ + σ was used to calculate the threshold to avoid the phenomenon that the relatively small number of large - scale algal bloom samples might lead to a relatively low calculated threshold. Finally, the algal bloom occurrence thresholds for the predictions 1 / 3 / 7 days in advance were determined to be 0.61, 0.60, and 0.56 respectively. Based on these thresholds, the binary map of the spatial distribution of algal blooms was extracted, and the predicted results of the spatial distribution of algal blooms are as Figure 3 shown.
[0069] To verify the applicability and robustness of the model for algal blooms of different scales, the present invention is based on the classification standard for the severity of algal blooms in the "Environmental Protection Standard" (HJ1098-2020), and in combination with the actual situation of algal blooms in Chaohu Lake, uses the monitored algal bloom coverage data to divide the algal blooms in Chaohu Lake into four grades: no algal bloom (0%), small-scale algal bloom (0-10%), medium-scale algal bloom (10-30%), and large-scale algal bloom (30-60%). In the 1-day-ahead prediction, the overall accuracies of the above-built model applied to the prediction of algal blooms of different grades are 0.95, 0.83, 0.79, and 0.64 respectively; in the 3-day-ahead prediction, the overall accuracies of the prediction of algal blooms of different grades are 0.95, 0.82, 0.77, and 0.60 respectively; in the 7-day-ahead prediction, the overall accuracies of the prediction of algal blooms of different grades are 0.95, 0.77, 0.73, and 0.59 respectively. The average overall accuracies of the 1 / 3 / 7-day-ahead predictions are 0.84, 0.83, and 0.80 respectively.
Claims
1. A short-term prediction method for lake algal bloom outbreaks based on machine learning, characterized in that, The method includes: Extracting binary raster data of the spatial distribution of algal blooms based on remote sensing image data of the lake in historical periods, and calculating the algal bloom coverage rate; Based on the monitoring data of environmental variables related to the occurrence of algal blooms, calculating the cumulative values of environmental variables at different cumulative time steps for different prediction periods, and generating multiple sets of variable sets with different cumulative time steps for each prediction period; Screening the optimal time cumulative variables for each prediction period based on the correlation between the algal bloom coverage rate and the environmental variables in different sets of variable sets; and performing spatial interpolation on the optimal time cumulative variables to obtain the optimal spatial cumulative variables for each prediction period; Using the optimal time cumulative variables as inputs and the algal bloom coverage rate as outputs, constructing and training machine learning models for the corresponding prediction periods; using the optimal spatial cumulative variables as inputs and the raster data as outputs, constructing and training machine learning models for the corresponding prediction periods; For the lake to be predicted, using the trained machine learning models to predict the algal bloom coverage rate prediction results and the algal bloom occurrence probability distribution values for different prediction periods, calculating the algal bloom probability occurrence threshold by combining the algal bloom coverage rate prediction results and the algal bloom occurrence probability distribution values, and obtaining the algal bloom spatial distribution prediction results corresponding to different prediction periods.
2. The method according to claim 1, characterized in that, Identifying algae in the image using the Phytoplankton Index, dividing the image pixels into algal bloom occurrence pixels and non-algal bloom occurrence pixels, and forming binary raster data; Calculating the ratio of the number of algal bloom occurrence pixels to the number of all lake pixels as the algal bloom coverage rate.
3. The method according to claim 1, characterized in that The environmental variables include water quality variables and meteorological variables; The selected environmental variables are variables for which continuous daily monitoring data can be obtained.
4. The method according to claim 1, wherein The method of generating multiple sets of variable sets with different cumulative time steps for each prediction period is: For the case where the prediction period is m days in advance, calculate the cumulative value of each environmental variable from the target date t by pushing forward in sequence m~n days during the period, m ≤ n , n being the longest cumulative time for each preset variable; The cumulative value selects the target date t Push forward in sequence m~n The statistical value of the environmental variable during the date 5. The method according to claim 1, wherein The method of spatial interpolation includes: Using the optimal time cumulative variables at multiple stations in the lake to establish an irregular triangular network TIN, traversing and searching all triangles in the TIN, and extracting the centroid positions as the positions of added virtual sample points; Gradually superimposing and traversing the triangles to continuously densify the sample points, and finally calculating the attributes and interpolating based on the triangle vertices using the inverse distance weighting method to obtain the optimal spatial cumulative variables in each environmental variable.
6. The method according to claim 1, wherein When training the machine learning models, arranging and combining the input parameters to construct multiple machine learning models with different single-parameter or multi-parameter combinations as inputs; Selecting the optimal model as the model for predicting the algal bloom coverage rate prediction results or the algal bloom occurrence probability distribution values.
7. The method according to claim 1, characterized in that Before being used for model training, the algal bloom coverage rate data is processed by log10 logarithm.
8. The method according to claim 1, wherein The method for determining the algal bloom probability occurrence threshold is: Using the algal bloom coverage rate values and occurrence probability values predicted for each sample, calculating the probability mean and standard deviation of all samples, and determining the algal bloom probability occurrence threshold in different prediction periods.
9. The method according to claim 1, wherein The machine learning model selects the random forest model.
10. The method according to claim 1, wherein The remote sensing image data selects MODIS-Terra images, and the MODIS-Terra image data is used for extracting the spatial distribution of algal blooms after geometric correction and atmospheric correction processing.
Citation Information
Cited By
Green tide disaster outbreak prediction method, device and equipment
CN121301828A