Toxic pollutant real-time monitoring method fusing biosensing and machine learning
By using biosensor arrays and machine learning methods, real-time, online monitoring of toxic pollutants in water bodies has been achieved, solving the problems of response delay and insufficient monitoring in existing technologies, and enabling rapid and accurate water toxicity assessment and alarm.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-18
- Publication Date
- 2026-03-10
AI Technical Summary
Existing water toxicity monitoring technologies cannot achieve real-time, online assessment and cannot fully reflect the synergistic effects of mixed pollutants, resulting in problems such as response delay and insufficient monitoring sensitivity.
By employing a biosensor array combined with machine learning methods, real-time toxicity assessment and alarms are achieved through multi-channel signal acquisition, preprocessing, and decision function optimization. The concentration of toxic pollutants in water is collected using microbial fuel cells, enzyme sensors, or cell sensors, and the decision function is optimized by combining support vector machine or random forest algorithms for comprehensive signal analysis.
It achieves second-level response to water pollution, can comprehensively assess water toxicity, improve monitoring accuracy and noise interference resistance, supports integration with IoT platforms, and realizes networked monitoring.
Smart Images

Figure CN121637152A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of water pollution monitoring technology, specifically the name. Background Technology
[0002] Water toxicity monitoring plays a crucial role in areas such as drinking water safety, industrial wastewater discharge, and agricultural runoff control. Traditional chemical detection methods (such as chromatography-mass spectrometry) require laboratory analysis, which takes several hours to several days, and cannot meet the rapid response requirements for sudden pollution incidents (such as pesticide leaks).
[0003] While existing biosensing technologies (such as toxicity tests based on luminescent bacteria) can reflect biological effects, they still rely on offline cultivation and manual operation, making it difficult to achieve real-time continuous monitoring. Furthermore, their implementation still suffers from the following shortcomings:
[0004] First, existing technologies require sample transportation, pretreatment, and instrument analysis, resulting in response delays (>24 hours), which cannot guarantee the timeliness and effectiveness of monitoring;
[0005] Secondly, existing technologies cannot assess comprehensive biotoxicity, and their chemical detection only targets specific pollutants, ignoring the synergistic effects of mixtures, thus failing to meet the needs of comprehensive water quality testing.
[0006] Finally, existing technologies are insufficient in terms of monitoring sensitivity, especially for low-concentration pollutants (such as heavy metals at the μg / L level), which are prone to missed detection.
[0007] In summary, those skilled in the art urgently need a method that can assess the comprehensive biotoxicity of water bodies in real time and online. Summary of the Invention
[0008] The purpose of this invention is to solve the above-mentioned problems. It adopts a technology that integrates biosensing and machine learning to break through traditional limitations. Through continuous signal acquisition and intelligent analysis, it can achieve rapid and low-cost toxicity early warning, thus ensuring public safety and ecological health.
[0009] The technical solution of the present invention to achieve the above objectives is as follows: The method includes the following steps:
[0010] Step 1: Biosensor data acquisition. The concentration values of toxic pollutants in the water are continuously collected through a biosensor array to obtain multiple sets of concentration values of toxic pollutants. Then, the concentration values of multiple sets of toxic pollutants are input into the comprehensive signal output model to obtain multiple initial signal values.
[0011] Step 2, signal preprocessing, involves preprocessing multiple initial signals separately. The preprocessing process includes filtering (such as wavelet denoising), normalization, and feature extraction to eliminate noise and enhance signal effectiveness, thereby obtaining preprocessed signal features.
[0012] Step 3: Construct a decision function to obtain the mapping relationship between signal characteristics and biotoxicity (such as half-maximal inhibitory concentration, IC50);
[0013] Step four involves calibrating the decision function. The decision function is trained using preprocessed signal features, and its parameters are optimized. Then, the accuracy of the optimized decision function is verified (using a confusion matrix or mean squared error), thereby improving the accuracy of the decision function's output.
[0014] Step 5: Real-time toxicity assessment and alarm. The collected real-time signal is input into the calibrated decision function to obtain the real-time toxicity assessment result (i.e., IC50 value, where IC50 is the half-inhibitory concentration or half-inhibitory rate). The toxicity assessment result includes, but is not limited to, toxicity level and confidence level. If the toxicity level and / or confidence level in the toxicity assessment result exceeds the set threshold, an alarm is triggered.
[0015] The biosensor array in step one includes at least one of a microbial fuel cell, an enzyme sensor, or a cell sensor. The sensor array employs a multi-channel design, with each channel designed to detect and collect the concentration value of a type of toxic pollutant. The toxic pollutant includes, but is not limited to, heavy metals or pesticides. The concentration value of the toxic pollutant is represented in the form of a bioelectrochemical signal, which includes, but is not limited to, the current value, voltage value, or impedance value output by the multi-channel biosensor.
[0016] The preprocessed signal features include: the peak value of the initial signal and the frequency domain features of the initial signal.
[0017] The mathematical expression for the integrated signal output model is:
[0018]
[0019] In the formula, S(t) is the sensor signal value at time t, B0 is the baseline signal (background value when there are no pollutants), and k i Let C be the sensitivity coefficient for the i-th pollutant. i (t) represents the concentration of the i-th pollutant at time t, and ∈(t) represents the measurement noise.
[0020] The machine learning algorithms mentioned include, but are not limited to, Support Vector Machine (SVM) and Random Forest.
[0021] The mathematical expression for the decision function is:
[0022]
[0023] In the formula, f(x) is the confidence level, x is the input feature vector (such as signal peak value, frequency domain energy), and y is the input feature vector. iFor labeling (toxicity level, such as high / medium / low), α i For Lagrange multipliers, K(x) i ,x) is the kernel function (such as the Gaussian kernel), and b is the bias term.
[0024] A real-time monitoring system for toxic pollutants, the system comprising the following functional modules:
[0025] A sensor array is used to continuously collect the concentration of toxic pollutants in water and output the corresponding initial signal value;
[0026] The signal processor preprocesses the initial signal and obtains the characteristics of the preprocessed signal.
[0027] The machine learning module is used to deploy and optimize decision functions, and to perform real-time toxicity assessments using these decision functions, thereby obtaining real-time toxicity assessment results.
[0028] The alarm unit determines whether to issue an alarm based on the toxicity assessment results.
[0029] The sensor array employs a multi-channel design, with each channel designed for a different type of pollutant.
[0030] An electronic device storing a computer program, which, when executed, performs the method according to any one of claims 1-6.
[0031] Compared with the prior art, the present invention has the following beneficial effects:
[0032] 1. This invention can respond quickly to water pollution and shorten the monitoring cycle from hours to seconds;
[0033] 2. This invention can comprehensively assess water pollution, especially the concentration of toxic substances in water, and fully reflect the mixed state of multiple toxic substances in water, ensuring the accuracy and comprehensiveness of water quality testing.
[0034] 3. This invention has high robustness in real-time water quality monitoring. Its use of machine learning models can effectively reduce external interference, improve the anti-noise interference capability of the monitoring process, and ensure the stability of monitoring results.
[0035] 4. This invention has high scalability, and its system supports integration with IoT platforms, thereby realizing networked monitoring. Attached Figure Description
[0036] Figure 1 This is a flowchart of the name described in Embodiment 1 of the present invention;
[0037] Figure 2 This is a schematic diagram of the name described in Embodiment 4 of the present invention;
[0038] Figure 3 This is a comparison table of the prediction results and actual labels described in Embodiment 1 of the present invention;
[0039] Figure 4 These are the operating parameters of the SVM-based real-time monitoring method for toxic pollutants described in Embodiment 3 of the present invention;
[0040] Figure 5 This is a comparison table of the effectiveness data of the SVM-based real-time monitoring method for toxic pollutants described in Embodiment 3 of the present invention;
[0041] Figure 6 This is the operating parameter table of a real-time monitoring system for toxic pollutants as described in Embodiment 5 of the present invention;
[0042] Figure 7 This is a comparison table of the performance data of a real-time monitoring system for toxic pollutants as described in Embodiment 5 of the present invention. Detailed Implementation
[0043] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings:
[0044] Example 1:
[0045] A real-time monitoring method for toxic pollutants that integrates biosensing and machine learning, such as Figure 1 As shown, the method includes the following steps:
[0046] Step 1: Biosensor data acquisition. The concentration values of toxic pollutants (such as heavy metals and pesticides) in the water body are collected in real time through multi-channel biosensors (such as microbial fuel cells, enzyme sensors or cell sensors). The concentration values are mainly represented by bioelectrochemical signals (such as changes in current, voltage or impedance) caused by toxic pollutants. Then, the concentration values of multiple toxic pollutants are input into the comprehensive signal output model to obtain multiple initial signal values.
[0047] The mathematical expression for the integrated signal output model is as follows:
[0048]
[0049] In the formula, S(t) is the sensor signal value at time t, B0 is the baseline signal (background value when there are no pollutants), and k i Let C be the sensitivity coefficient for the i-th pollutant. i (t) represents the concentration of the i-th pollutant at time t, and ∈(t) represents the measurement noise;
[0050] Step 2: Signal preprocessing, which involves filtering (e.g., wavelet denoising), normalizing, and extracting features (e.g., peak value, slope, frequency domain features) from the original signal to eliminate noise and enhance signal effectiveness;
[0051] Step 3: Model building and toxicity prediction. The decision function is trained using the preprocessed signal features to obtain the mapping relationship between signal features and biotoxicity (such as half-maximal inhibitory concentration IC50).
[0052] The mathematical expression for the decision function is:
[0053]
[0054] In the formula, f(x) is the confidence level, x is the input feature vector (such as signal peak value, frequency domain energy), and y is the input feature vector. i For labeling (toxicity level, such as high / medium / low), α i For Lagrange multipliers, K(x) i (x) represents the kernel function (such as a Gaussian kernel), and b represents the bias term.
[0055] Step 4: Real-time toxicity assessment and alarm. Input the real-time signal into the trained model and output the toxicity level and confidence level. If the threshold is exceeded, an alarm will be triggered.
[0056] It should be noted that the independent variable of the integrated signal output model is the concentration C of the i-th pollutant at time t. i (t) (where i = 1, 2, ..., n, representing different types of pollutants, such as heavy metals and pesticides); the dependent variable is the sensor signal value S(t) at time t (i.e., bioelectrochemical signal, such as current, voltage or impedance value);
[0057] The process of establishing the comprehensive signal output model is as follows:
[0058] Data acquisition: Under a controlled laboratory environment, standard pollutant samples (such as heavy metal solutions or pesticide solutions of known concentrations) are used to calibrate the sensor, and sensor output signals at different concentrations are collected.
[0059] Parameter fitting: Linear regression or least squares method is used to fit the model parameters. Specific steps include: determining the baseline signal B0, measuring the average value of the sensor output under contaminant-free conditions, and then calculating the sensitivity coefficient k. i By changing the concentration of a single pollutant C i (t), measuring signal changes, using the formula Make an estimate;
[0060] Model validation: Use independent datasets to validate the model accuracy, calculate the mean square error (MSE) between the predicted signal values and the actual signal values, and ensure the reliability of the model (usually requiring MSE < 5%).
[0061] The independent variables in the decision function are sensor signal characteristics (such as peak value P, slope ΔS / Δt, and frequency domain energy E).f The dependent variables are the biotoxicity level (classification) and the toxicity confidence level (e.g., IC50).
[0062] The process of establishing the decision function is as follows:
[0063] First, samples of pollutants with known toxicity concentrations are collected to obtain sensor signals;
[0064] Secondly, extract signal features and label them with toxicity tags;
[0065] Third, use machine learning algorithms (such as support vector machines, SVM) to train the decision function and optimize the parameters of the decision function;
[0066] Finally, verify the model's accuracy (e.g., confusion matrix, mean squared error).
[0067] It should be noted that the process of verifying the decision function using a wonton matrix or mean squared error is as follows:
[0068] First, confusion matrix verification (for toxicity level classification):
[0069] The decision function is input using a test dataset (containing samples with known toxicity levels) to obtain predicted toxicity levels (e.g., high, medium, low); then the predicted results are compared with the actual labels to construct a confusion matrix (e.g., ...). Figure 3 (as shown); Finally, calculate the performance metrics: Accuracy = (TP+TN) / (TP+TN+FP+FN), Precision = TP / (TP+FP), Recall = TP / (TP+FN), F1 score = 2 × Precision × Recall Precision + Recall 2 × Precision + Recall Precision × Recall
[0070] Secondly, mean squared error verification (used for toxicity index regression, such as IC50):
[0071] First, use decision functions to predict toxicity indices (such as IC50 values);
[0072] Then calculate the mean squared error (MSE):
[0073] Among them, y j This is the actual IC50 value. To predict the IC50 value, N is the sample size, and the model is considered effective if MSE < 10%.
[0074] It should be noted that the specific working process of this system is as follows:
[0075] First, the sensor array is immersed in the water body to be tested, and the electrochemical signals (i.e., initial signal values) of the water body are collected in real time.
[0076] Secondly, the initial signal values are preprocessed to extract the corresponding feature vectors;
[0077] Next, the feature vector is input into the trained decision function, and the toxicity assessment result is output.
[0078] Finally, if the toxicity assessment result exceeds the preset threshold (e.g., IC50 > 50%), the system will trigger an alarm and record the data.
[0079] The main innovation of this system lies in its multi-sensor fusion setup, which combines various biosensors (such as microorganisms / enzymes / cells) to enhance the breadth of response to different pollutants. Then, it uses machine learning to dynamically model and obtain decision functions, and uses adaptive algorithms (such as support vector machines, SVM) to update the model in real time, ensuring that the decision functions can adapt to environmental changes in a timely manner. More importantly, this system does not require markers: it directly utilizes bioelectrochemical signals, avoiding the use of chemical reagents.
[0080] Example 2;
[0081] A real-time monitoring method for toxic pollutants that integrates biosensing and machine learning, such as Figure 1 As shown, the process of optimizing the decision function parameters using a random forest in step 3 of this method is as follows:
[0082] Step 1, parameter selection. The hyperparameters of random forest include the number of trees (n_estimators), maximum depth (max_depth), minimum sample split (min_samples_split), etc.
[0083] Step two, grid search cross-validation: Use grid search to traverse combinations within the parameter space, for example: n estimators =[50,100,200], max depth =[5,10,15];
[0084] Step 3: Use k-fold cross-validation (k=5) to divide the training data into 5 parts, and use 4 parts for training and 1 part for validation in turn.
[0085] Step four: Evaluation metrics. For classification problems, use accuracy; for regression problems, use MSE.
[0086] Step 5, Model Training: After selecting the optimal parameter combination, retrain the random forest model and test its generalization ability.
[0087] Everything else is the same as in Example 1.
[0088] Example 3;
[0089] A real-time monitoring method for toxic pollutants based on SVM, and the specific implementation process of the method:
[0090] Step 1: Biosensor data acquisition. A multi-channel biosensor array (including microbial fuel cells and enzyme sensors) is deployed at the effluent outlet of the wastewater treatment plant to collect bioelectrochemical signals (current and voltage) in the water, corresponding to the concentrations of heavy metals (lead, mercury) and pesticides (organophosphates). A comprehensive signal output model is then applied.
[0091]
[0092] Wherein, the baseline signal B0 = 0.5V, and the sensitivity coefficient k i The calibration results were determined to be: lead k1 = 0.2, mercury k2 = 0.15, and organophosphorus k3 = 0.1.
[0093] Step 2, signal preprocessing: perform wavelet denoising on the original signal (using the Daubechies wavelet basis), normalize to the [0,1] range, and extract features: calculate the signal peak value P, slope ΔS / Δt, and frequency domain energy E. f (Through FFT transformation);
[0094] Step 3, Model Building and Toxicity Prediction: The decision function is optimized using a Support Vector Machine (SVM), with a Gaussian kernel K(x) as the kernel function. i ,x)=exp(-γ||x i -x|| 2 );
[0095] Training data: 1000 samples, toxicity level based on IC50 value (low: IC50>100mg / L, medium: 10-100mg / L, high: <10mg / L);
[0096] Parameter optimization: SVM parameters C = 1.0 and γ = 0.1 were selected through cross-validation;
[0097] Step 4, Real-time toxicity assessment and alarm: Input the real-time signal characteristics into the decision function, output the toxicity level and confidence level, and set the threshold: the toxicity level is "high" or the confidence level is >95%. When the toxicity assessment result output by the decision function exceeds the set threshold, an alarm (audible and visual alarm) is triggered.
[0098] The operating parameter table for this embodiment is as follows: Figure 4 As shown in the comparison table of effect data, Figure 5 As shown, everything else is the same as in Example 1.
[0099] Example 4;
[0100] A real-time monitoring system for toxic pollutants, such as Figure 2As shown, the system includes the following functional modules:
[0101] A sensor array is used to continuously collect the concentration of toxic pollutants in water and output the corresponding initial signal value;
[0102] The signal processor preprocesses the initial signal and obtains the characteristics of the preprocessed signal.
[0103] The machine learning module is used to deploy and optimize decision functions, and to perform real-time toxicity assessments using these decision functions, thereby obtaining real-time toxicity assessment results.
[0104] The alarm unit determines whether to issue an alarm based on the toxicity assessment results.
[0105] Example 5;
[0106] A real-time monitoring system for toxic pollutants, deployed as follows:
[0107] Sensor array: Deployed at the river cross section, it adopts a 3-channel design (channel 1: heavy metals, channel 2: pesticides, channel 3: organic pollutants), and each channel outputs a current signal (range 0-5V);
[0108] Signal processor: Employs an embedded ARM Cortex-M7 microcontroller with a sampling rate of 100Hz. It preprocesses the initial signal and extracts the features of the preprocessed signal. Subsequently, it performs wavelet denoising and feature extraction in real time, and uploads the extracted feature vectors to the cloud-based machine learning module for evaluation via the communication module.
[0109] Machine learning module: Deployed on a cloud server (AWS EC2 instance), running the Python Scikit-learn library, using pre-trained decision functions for toxicity assessment;
[0110] Alarm unit: Integrated GSM module, automatically sends SMS and email alarms when the toxicity assessment result exceeds the threshold (IC50>50%).
[0111] The specific workflow of this system is as follows:
[0112] The sensor continuously collects water signals and transmits them to the cloud server via a 4G network.
[0113] The server processes signals in real time and calls the decision function model to output toxicity assessment results;
[0114] The alarm unit triggers an action based on the result, and the data is stored in the database for historical analysis.
[0115] The system calibration process for this system is as follows: On-site calibration is performed monthly, using standard solutions to adjust sensor parameters. The operating parameter table for this embodiment is as follows: Figure 6 As shown in the comparison table of effect data, Figure 7 As shown, everything else is the same as in Example 4. The above technical solutions only embody the preferred technical solutions of the present invention. Any modifications that those skilled in the art may make to certain parts thereof all embody the principles of the present invention and fall within the protection scope of the present invention.
Claims
1. A name characterized by, The method comprises the following steps: Step one, biological sensor data collection, continuously collecting concentration values of toxic pollutants in water through a biological sensor array, and then obtaining multiple sets of concentration values of toxic pollutants, and then inputting the multiple sets of concentration values of toxic pollutants into a comprehensive signal output model to obtain multiple initial signal values; Step two, signal preprocessing, preprocessing the multiple initial signals to obtain preprocessed signal features; Step three, constructing a decision function to obtain the mapping relationship between signal features and biological toxicity; Step four, correcting the decision function, using the preprocessed signal features to train the constructed decision function, optimizing the parameters of the decision function, and verifying the accuracy of the optimized decision function; Step five, real-time toxicity assessment and alarm, inputting the collected real-time signal into the corrected decision function to obtain a real-time toxicity assessment result, and triggering an alarm if the real-time toxicity assessment result exceeds a set threshold.
2. The method of claim 1, wherein, The biological sensor array in step one comprises at least one of a microbial fuel cell, an enzyme sensor or a cell sensor.
3. The method of claim 1, wherein, The preprocessed signal features include peak values of the initial signals and frequency domain features of the initial signals.
4. The method of claim 1, wherein, The mathematical expression of the comprehensive signal output model is: where S(t) is the sensor signal value at time t, B0is the baseline signal, k i is the sensitivity coefficient for the ith pollutant, C i (t) is the concentration of the ith pollutant at time t, and ∈(t) is the measurement noise.
5. The method of claim 1, wherein, The machine learning algorithm includes but is not limited to support vector machine SVM and random forest.
6. The method of claim 1, wherein, The mathematical expression of the decision function is: In the formula, f(x) is the confidence, x is the input feature vector (such as signal peak value, frequency energy), y i is the label, alpha i is the Lagrange multiplier, K(x i , x) is the kernel function (such as Gaussian kernel), and b is the bias term.
7. A real-time monitoring system for toxic pollutants, characterized in that, The system can implement the method of any one of claims 1-6.
8. The real-time monitoring system of claim 1, wherein, The system comprises the following functional modules: A sensor array for continuously collecting concentrations of toxic pollutants in water and outputting corresponding initial signal values; A signal processor for preprocessing the initial signals and obtaining preprocessed signal features; A machine learning module for arranging and optimizing a decision function, and using the decision function for real-time toxicity assessment to obtain a real-time toxicity assessment result; An alarm unit for determining whether to issue an alarm according to the toxicity assessment result.
9. The real-time monitoring system of claim 1, wherein, The sensor array adopts a multi-channel design, and each channel is aimed at different types of pollutants.
10. An electronic device in which a computer program is stored, characterized by The computer program, when executed, can implement the method of any one of claims 1-6.
Citation Information
Cited By
Soil heavy metal ecological risk microorganism rapid detection method and system
CN121884991A