Constructed wetland pollution prediction method

By integrating learning methods and genetic algorithm-optimized stacking models, the problem of low pollutant regulation efficiency in artificial wetlands is solved, and high-precision and stable pollutant prediction is achieved, which is suitable for multi-objective evaluation and decision support.

CN120745924APending Publication Date: 2025-10-03CHINA THREE GORGES CORPORATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510868191.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-26
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

In existing technologies, pollutant regulation in artificial wetlands relies on manual management, which is inefficient and costly. Linear dynamic models cannot describe complex nonlinear mechanisms, resulting in poor prediction accuracy and stability.

Method used

Random forest, XGBoost and LightGBM are used as base learners, combined with the meta-learner of genetic algorithm, and integrated learning is performed through the stacking model to optimize the predictor model. SMOTE is used to generate minority class samples, and the SHAP method is used to evaluate feature contribution to predict artificial wetland pollutants.

Benefits of technology

The accuracy and stability of pollutant prediction in artificial wetlands have been improved, and the effluent concentrations of multiple pollutants can be predicted simultaneously, adapting to different types of wetland operating environments and providing reliable decision support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120745924A_ABST
    Figure CN120745924A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of artificial wetland pollution management, in particular to an artificial wetland pollution prediction method which comprises the following steps: retrieving literatures to obtain related parameters; performing frequency coding and feature scaling on the parameters to obtain a data set; dividing the data set into a training set and a test set; establishing a predictor model based on a stacking model, wherein the predictor model comprises a base learner and a meta learner; respectively training the models of the base learner by adopting the training set; obtaining a prediction result of the base learner as an input of the meta learner; using a genetic algorithm to optimize the prediction weight of the base learner model; performing weighted fusion on prediction results of the three models of the base learner, predicting the test set again, and calculating a final performance index; and measuring the deviation and prediction performance of the predicted value of the constructed wetland. According to the method, the problems of limited prediction precision and poor stability of a traditional single model are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of artificial wetland pollution management, in particular to an artificial wetland pollution prediction method. Background Art

[0002] As a naturally occurring sewage treatment method, artificial wetlands have been widely used in sewage treatment. However, due to its complexity, the diversity of wastewater composition, and various interdependent physical, chemical, and biological factors, the properties of wastewater vary greatly, posing a challenge to the design of artificial wetlands. In addition, the current regulatory measures for artificial wetlands are still relatively backward, and management work mainly relies on manpower. The management model is often carried out through temporary spot checks or inspections, which are costly, inefficient, and difficult to implement. To meet this challenge, many mathematical models have been studied for the modeling of wetland systems, aiming to transform "artificial management and design" into "information technology support." Due to the complexity of the pollutant removal mechanism of artificial wetlands, these linear kinetic models cannot describe the observed nonlinear mechanisms and therefore cannot be used in such complex scenarios. Summary of the Invention

[0003] The present invention aims to solve the above problems and provides a method for predicting pollution of artificial wetlands. The technical solution adopted is as follows: A method for predicting artificial wetland pollution comprises the following steps: S1. Search the literature on artificial wetlands to obtain water quality parameters, environmental parameters, and structural parameters; S2. Perform frequency encoding and feature scaling on the acquired parameters to obtain a data set; S3. Divide the dataset into training set and test set; S4. Establish a predictor model based on the stacking model, wherein the predictor model includes a base learner and a meta learner, and the base learner adopts three models: random forest, XGBoost and LightGBM; S5. Use the training set to train the three models of the base learner separately; S6. Obtain the prediction results of the three models of the base learner for the training set and the test set as the input of the meta-learner, and assign corresponding prediction weights to the three models respectively; S7. Use a genetic algorithm to optimize the prediction weights of the three models of the base learner in the meta-learner. S8. The meta-learner obtains the optimized optimal weights, performs weighted fusion on the prediction results of the three models of the base learner, predicts the test set again, and calculates the final performance indicator; S9. Measure the bias and performance of constructed wetland predictions; S10. Input the field sampling data of different wetlands into the trained stacking model for predictive analysis.

[0004] On the basis of the above scheme, SMOTE is used to generate new minority class samples based on the predictor after weight optimization in step S8.

[0005] Preferably, the missing content when acquiring data in step S1 is supplemented by using ridge regression algorithm and multiple interpolation.

[0006] Preferably, 80% of the dataset is divided into a training set and the other 20% is divided into a test set. The training set is subjected to 10-fold cross validation and grid search for hyperparameter tuning.

[0007] Preferably, for the model features in the base learner, the SHAP method is used to calculate the Shapley value of each feature based on the model output of different feature combinations to obtain the average marginal contribution of the feature to the prediction result.

[0008] Preferably, the water quality index parameter types include pH, dissolved oxygen, influent ammonia nitrogen, nitrate nitrogen, total nitrogen, chemical oxygen demand and heavy metals; the environmental parameter types include air temperature; and the structural parameter types include hydraulic retention time, wetland type, water inlet method and plant type.

[0009] Preferably, in step S9, the deviation and prediction performance of the artificial wetland prediction value are measured by calculating the root mean square error and the correlation coefficient.

[0010] Preferably, in step S10, the field sampling data of different wetlands are input into the trained stacking model for prediction analysis.

[0011] The beneficial effects of the present invention are: proposing an ensemble learning method based on random forest, xgboost, and lightgbm models as base learners and a genetic algorithm as a meta-learner for predicting the effluent concentrations of ammonia nitrogen, COD, SMX, etc. in constructed wetlands, solving the problems of limited prediction accuracy and poor stability of traditional single models, and having the following advantages: 1. Random forest, XGBoost, and LightGBM each excel at different types of feature learning. Using these three models as base learners can fully capture the diversity and nonlinear relationships in the data, significantly improving prediction accuracy. The meta-learner, combined with the genetic algorithm, effectively combines the prediction results of the base learners through global optimization capabilities to generate a more accurate ensemble model, significantly improving prediction performance. 2. Ensemble learning methods combine the prediction results of multiple models, reducing the uncertainty of a single model caused by data fluctuations or noise, and improving model stability. Genetic algorithms avoid local optimality through evolutionary selection mechanisms, ensuring that the model remains highly adaptable under complex data distributions. 3. It can simultaneously predict the effluent concentrations of multiple pollutants, meet the actual needs of constructed wetland treatment performance evaluation, meet the requirements of multi-objective prediction tasks, and effectively handle the correlation between different target variables to improve the overall accuracy of multi-objective prediction; 4. The model structure of this scheme is simple and reliable, and can be quickly deployed and adapted to the operating environment of different types of constructed wetlands. The prediction results are accurate and highly interpretable, providing reliable decision support for the operation optimization and design of wetland systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 : Flowchart of this method. DETAILED DESCRIPTION

[0013] The present invention will be further described below with reference to the accompanying drawings and examples: like Figure 1 As shown, a method for predicting artificial wetland pollution includes the following steps: S1. Search the literature on artificial wetlands to obtain water quality parameters, environmental parameters, and structural parameters; The search methods included Web of Science, Google Scholar, Elsevier ScienceDirect and other literature platforms, and the search keywords included “constructed wetlands”, “CW”, “constructed wetlands”, “water quality prediction”, “nitrogen”, “heavy metal”, “antibiotics”, etc. The water quality index parameter types include pH, dissolved oxygen, influent ammonia nitrogen, nitrate nitrogen, total nitrogen, chemical oxygen demand and heavy metals; the environmental parameter types include air temperature; the structural parameter types include hydraulic retention time, wetland type, water inlet method and plant type; the index statistics are shown in Table 1, which lists some of the main indicators: Table 1 List of indicators and reasonable value ranges

[0014] S2. To avoid introducing meaningless numerical sequences, the discrete data in the obtained parameters are frequency-encoded, and then feature scaling is performed on each data point to prevent large differences in the numerical values ​​of different features in the sample from affecting the learning efficiency of the model, thus obtaining a dataset. Due to the differences in the research content of the literature, data missing from the data obtained in step S1 are inevitably supplemented using the ridge regression algorithm and multiple interpolation to improve the stability and predictive performance of the subsequent model. S3. Divide the dataset into training and test sets. 80% of the dataset is divided into the training set and the remaining 20% ​​into the test set. Perform hyperparameter tuning on the training set using 10-fold cross-validation and grid search: Randomly divide the training set into 10 roughly equal parts (folds), then use each fold as the validation set and the remaining 9 folds as the training set for 10 iterations. Record the model performance for each iteration, including accuracy or other evaluation metrics, and then calculate the average model performance to obtain the overall model performance. Finally, use the validation set for a final evaluation of the model's predictive performance. S4. Establish a predictor model based on the stacking model. The predictor model includes a base learner and a meta-learner. The base learner uses three models: random forest, XGBoost, and LightGBM. The hyperparameter configurations that need to be optimized for the three models are shown in Table 2: Table 2 Hyperparameter optimization list of three models through grid search

[0015] S5. Use the training set to train the three models of the base learner separately; S6. Obtain the prediction results of the three models of the base learner for the training set and the test set as the input of the meta-learner, and assign corresponding prediction weights to the three models respectively; S7. Use a genetic algorithm to optimize the prediction weights of the three models of the base learner in the meta-learner. S8. The meta-learner obtains the optimized optimal weights, performs a weighted fusion on the prediction results of the three models of the base learner, predicts the test set again, and calculates the final performance indicator. Here, the meta-learner performs a weighted fusion process based on a genetic algorithm. S9. Measure the bias and prediction performance of the artificial wetland prediction values, specifically by calculating the root mean square error (RMSE) and the correlation coefficient (R). 2 The deviation and prediction performance of the artificial wetland prediction value are measured as follows: (1) (2) Where N1 is the total number of samples, is the true value of the jth sample, is the true mean of all experimental samples, is the predicted value of the jth sample.

[0016] Based on the predictor after weight optimization in step S8, SMOTE (Synthetic Minority Over-sampling Technique) is used to generate new minority class samples, thereby achieving the purpose of expanding the data set and balancing the class distribution.

[0017] S10. Input the field sampling data of different wetlands into the trained stacking model for predictive analysis.

[0018] For the model features in the base learner, the SHAP method (SHapley Additive exPlanations is a method for explaining the output of machine learning models) is used to calculate the Shapley value of each feature based on the model output of different feature combinations to obtain the average marginal contribution of the feature to the prediction result.

[0019] The present invention has been described above by way of examples, but the present invention is not limited to the above specific embodiments. Any changes or modifications based on the present invention fall within the scope of protection claimed by the present invention.

Claims

1. A method for predicting artificial wetland pollution, characterized in that: The following steps are involved: S1. Search the literature on artificial wetlands to obtain water quality parameters, environmental parameters, and structural parameters; S2. Perform frequency encoding and feature scaling on the acquired parameters to obtain a data set; S3. Divide the dataset into training set and test set; S4. Establish a predictor model based on the stacking model, wherein the predictor model includes a base learner and a meta learner, and the base learner adopts three models: random forest, XGBoost and LightGBM; S5. Use the training set to train the three models of the base learner separately; S6. Obtain the prediction results of the three models of the base learner for the training set and the test set as the input of the meta-learner, and assign corresponding prediction weights to the three models respectively; S7. Use a genetic algorithm to optimize the prediction weights of the three models of the base learner in the meta-learner. S8. The meta-learner obtains the optimized optimal weights, performs weighted fusion on the prediction results of the three models of the base learner, predicts the test set again, and calculates the final performance indicator; S9. Measure the bias and performance of constructed wetland predictions; S10. Input the field sampling data of different wetlands into the trained stacking model for predictive analysis.

2. The method for predicting artificial wetland pollution according to claim 1, characterized in that: Based on the predictor after weight optimization in step S8, SMOTE is used to generate new minority class samples.

3. The method for predicting artificial wetland pollution according to claim 1, characterized in that: The missing content when obtaining data in step S1 is supplemented by using the ridge regression algorithm and multiple interpolation.

4. The method for predicting artificial wetland pollution according to claim 1, characterized in that: 80% of the dataset was divided into a training set and the other 20% was divided into a test set. The training set was subjected to 10-fold cross validation and grid search for hyperparameter tuning.

5. The method for predicting artificial wetland pollution according to claim 1, characterized in that: For the model features in the base learner, the SHAP method is used to calculate the Shapley value of each feature based on the model output of different feature combinations to obtain the average marginal contribution of the feature to the prediction result.

6. The method for predicting artificial wetland pollution according to claim 1, characterized in that: The water quality index parameter types include pH, dissolved oxygen, influent ammonia nitrogen, nitrate nitrogen, total nitrogen, chemical oxygen demand and heavy metals; the environmental parameter types include air temperature; the structural parameter types include hydraulic retention time, wetland type, water inlet method and plant type.

7. The method for predicting artificial wetland pollution according to claim 1, characterized in that: In step S9, the deviation and prediction performance of the artificial wetland prediction value are measured by calculating the root mean square error and the correlation coefficient.

8. The method for predicting artificial wetland pollution according to claim 1, characterized in that: In step S10, the on-site sampling data of different wetlands are input into the trained stacking model for prediction analysis.