Water quality pollution detection-based drainage basin water environment monitoring and emergency pollution rapid tracing method and system
By constructing a multi-parameter collaborative monitoring model in the river basin water environment and combining distributed sampling with an AI-driven model, the complexity and high cost of emergency pollution tracing in the river basin water environment have been solved, rapid and accurate water pollution tracing and monitoring have been achieved, and the adaptability and evidentiary effectiveness of the model have been improved.
Patent Information
- Application Number
- CN202511133893.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-14
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-08-14
AI Technical Summary
Existing technologies make it difficult to achieve rapid and accurate emergency pollution source tracing in river basin water environments, especially in large river basins. Traditional methods are costly, complex, and difficult to integrate multi-source heterogeneous data, resulting in insufficient information utilization, insufficient model architecture optimization, category imbalance problems, slow emergency response, and insufficient evidence support capabilities.
A combination of distributed active and passive sampling in large river basins is adopted, with real-time and time-sharing data collection, to build a multi-parameter collaborative monitoring model. MLP and LSTM/GRU models are used, combined with batch normalization, Dropout, and SMOTE oversampling techniques, to fuse EEM spectral data with environmental characteristics, to conduct multi-source heterogeneous data analysis, and to automatically trace the source through an AI-driven pollution identification algorithm.
It has achieved rapid and accurate tracing of water pollution in large-scale river basin water environments, improved the effectiveness of evidence, reduced costs, and enhanced the generalization and adaptability of the model. It can take into account monitoring needs in both normal and emergency situations and provide an efficient and accurate pollution tracing tool.
Smart Images

Figure CN120744675A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of environmental water pollution monitoring, and specifically to a method and system for rapid tracing of watershed water environment monitoring and emergency pollution based on multi-source data and artificial intelligence model fusion analysis of water pollution detection. Background Art
[0002] River basin water pollution monitoring and tracing, especially real-time monitoring and rapid and accurate tracing of water pollution incidents during emergencies, is one of the core issues in environmental supervision and law enforcement activities. It is of great significance for formulating effective river basin water pollution control strategies and safeguarding ecological security and human health. River basin water environment monitoring and emergency pollution rapid tracing technology are key means to address water environment pollution problems. Their importance is reflected in multiple dimensions such as ecological protection, public safety, and economic development. Current environmental monitoring and law enforcement activities have placed higher requirements on river basin water environment monitoring and emergency pollution rapid tracing technology, and they need to take into account multiple dimensions such as technical feasibility, legal compliance, emergency response efficiency, and evidence effectiveness. However, existing technologies generally cannot meet these requirements efficiently.
[0003] With the intensification of industrialization, urbanization, and agricultural activities, pollutants enter water bodies through various pathways, causing water quality deterioration and threatening ecosystems and human health. Traditional methods for watershed water pollution monitoring and emergency pollution tracing, such as isotope tracing and chemical fingerprint analysis, can provide accurate results in specific scenarios, but they typically require complex sample processing processes, expensive instruments, and a long time, limiting their application in large-scale watershed water environments and real-time, emergency pollution monitoring and law enforcement. In addition, existing methods have limited comprehensive analysis capabilities for multi-source pollutants and are unable to cope with the complexity of modern water pollution. Real-time sensors can quickly acquire basic physical and chemical data of flowing water (such as pH, conductivity, DO, turbidity, and flow rate), as well as the concentrations of some pollutants (such as residual chlorine and heavy metal concentrations). This is of practical value for determining the presence of pollution and classifying it into broad categories. In emergency monitoring of sudden leaks, sensor data such as pH, conductivity, and heavy metal concentrations can trigger alarms when abnormalities occur, helping to quickly locate contaminated areas and, combined with flow rate data, provide preliminary estimates of the spread range. In drinking water source early warning monitoring, sensors such as DO, residual chlorine, and turbidity are used to monitor water sources in real time, triggering alarms when abnormalities occur (e.g., DO fluctuations caused by algae blooms). However, these sensors have limited ability to identify specific pollutant components, low-concentration pollution, and emerging pollutants. Furthermore, the independently acquired data and preliminary analysis results are often insufficient to serve as an effective basis for direct environmental law enforcement and require time-consuming verification through laboratory analysis and watershed monitoring networks.
[0004] In recent years, spectral analysis techniques, particularly fluorescence excitation-emission matrix (EEM) spectroscopy, have garnered widespread attention in water quality monitoring due to its non-destructive, rapid, and highly sensitive nature. EEM spectroscopy can characterize the "fingerprint" characteristics of organic pollutants in water samples, providing a new technical approach for pollution source tracing. However, the multidimensionality and complexity of EEM data make traditional statistical methods or simple machine learning approaches inadequate for feature extraction and source classification, making it difficult to fully utilize the full information contained. Meanwhile, environmental characteristics (such as geographic location, type of industrial activity, and river type) serve as crucial reference information for pollution sources and offer high discriminatory power. However, existing technologies rarely integrate these with multi-source heterogeneous data, such as spectral data, and cross-correlate them with other data (such as real-time sensor data) to improve the accuracy and reliability of source tracing, avoid disputes over liability determination caused by single technical errors, and enhance the legal validity of the analytical process and results.
[0005] Specifically, existing water environment monitoring and pollution source tracing methods have the following deficiencies, making them difficult to meet the needs of environmental law enforcement: 1) Reliance on a single data type and insufficient data fusion: Most methods focus on spectral data or chemical parameters, rarely integrating heterogeneous data from multiple sources, such as real-time and time-sharing data, environmental characteristics, and spectral features. This leads to inadequate information utilization, hindering comprehensive understanding and accurate source tracing of complex pollution. For example, the surface water ICM concentration prediction method disclosed in CN 118430684 A only predicts specific pollutants and relies on traditional chemical analysis, failing to achieve deep integration of heterogeneous data from multiple sources and rapid identification of a broad spectrum of pollutants.
[0006] 2) Inadequate model architecture optimization and coordination: Traditional machine learning models (such as standard multilayer perceptrons) have limited modeling capabilities when processing high-dimensional, complex data, making it difficult to capture deep relationships between features. They also fail to adequately address the multidimensionality and statistical limitations of EEM data processing. Existing neural network applications, such as the method disclosed in CN 118425458 A, emphasize optimizing predictive performance, but their model architectures are not fully optimized for the specific challenges of water environment monitoring and traceability (such as real-time performance, multi-source data fusion, and class imbalance), and they lack a clear mechanism for the coordinated operation of multiple AI models.
[0007] 3) Class imbalance and poor robustness: Water sample data often exhibits an uneven distribution of classes (e.g., a small number of wastewater samples), which impacts the model's ability to classify and trace minority pollution classes. Existing methods lack effective technical solutions (such as SMOTE oversampling) to address this issue, resulting in poor robustness for the model's identification and tracing of minority classes.
[0008] 4) Inadequate emergency response and evidence support capabilities: Existing methods often have slow response times to sudden pollution incidents, rely heavily on manual analysis, and have low levels of automation and intelligence. Furthermore, their data collection and analysis processes lack necessary verification tags and cross-validation mechanisms, resulting in insufficient evidence and difficulty supporting direct environmental law enforcement. Summary of the Invention
[0009] In view of the deficiencies of the above-mentioned prior art, the purpose of the present invention is to propose a method and system for watershed water environment monitoring and emergency pollution rapid tracing based on water pollution detection. In response to the needs of large-scale and large-scale supervision and law enforcement of water environment in the watershed, a combination of distributed active sampling and passive sampling in a large watershed, real-time sampling and time-sharing sampling, and software and hardware are adopted to carry out water pollution detection, objectively carry out data collection and multi-parameter collaborative analysis, and combine scalable models, large-scale multi-source data processing and automatic alarm mechanisms to solve the contradiction between large watershed area, large-scale sampling, multi-source data processing and timeliness and accuracy of water pollution detection, and take into account the needs of emergency pollution rapid tracing and routine routine monitoring of water pollution detection, and meet the requirements of environmental monitoring and law enforcement activities that need to take into account multiple dimensions such as technical feasibility, legal compliance, emergency response efficiency and evidence effectiveness.
[0010] The technical solution provided by the present invention to solve the above problems is: A method for rapid source tracing of water environment monitoring and emergency pollution based on water pollution detection in a watershed is based on water pollution detection, multi-source data collection and artificial intelligence model fusion analysis to carry out rapid source tracing of water environment monitoring and emergency pollution in a watershed, including the following steps: first, a multi-parameter collaborative monitoring model is constructed, including a multi-layer perceptron MLP model and an LSTM / GRU model, and trained and deployed; then, real-time data and time-sharing data of verification marks of water environment and water pollution detection in the watershed are collected through distributed sampling points and sampling stations, and an AI-driven pollution identification MLP model and LSTM / The GRU model, combined with batch normalization, Dropout, and SMOTE oversampling technologies, fuses EEM spectral data with environmental characteristics to fuse and analyze multi-source heterogeneous data. It then automatically identifies whether an emergency pollution incident has occurred according to preset conditions. If it is initially determined that an emergency pollution incident has occurred, it initiates pollution type determination, source tracing, and cross-validation, and automatically outputs the pollution type and source tracing results for water environment monitoring and emergency pollution. These are then further verified by humans and environmental law enforcement is carried out to complete the monitoring of water environment pollution in the basin and the rapid tracking and tracing of emergency pollution. The specific steps include: S1. Construct a multi-parameter collaborative monitoring model Construct a multi-parameter collaborative monitoring model for real-time water pollution monitoring and rapid emergency pollution source tracing covering the entire water environment area of the basin. Specifically, a multi-layer perceptron (MLP) model and an LSTM / GRU model are constructed, and environmental characteristics, pollutants, and pollution source information of key node grids in the entire water environment area of the basin are imported. Use a known historical data set to train the constructed multi-layer perceptron (MLP) model, adjust the model parameters, and optimize the model parameters to improve classification and source tracing performance. The training specifically adopts a weighted cross-entropy loss function (calculating weights by the inverse of the number of category samples), uses the Adam optimizer, sets the learning rate scheduler to Lambda LR or Cosine Annealing LR, and introduces an early stopping mechanism (stopping training based on validation loss). Deploy the trained multi-layer perceptron (MLP) model and LSTM / GRU model to a network server. S2. Collect water body data Field sampling points and sampling stations are set up within the grid of key nodes in the watershed to collect water quality pollution detection and water environment data in the watershed, and verification tags such as data collection device ID, GIS and timestamp, encryption information and non-tamperable identifiers are added to the data. Sensors at field sampling points automatically collect water body data in real time on site, obtaining GIS, time, flow rate, color, transparency and other information of the water body (including turbidity, pH, conductivity, DO, residual chlorine, and heavy metal pollutant concentrations), obtaining real-time data sets, adding verification standards and transmitting them to the network server. Sampling instruments at sampling stations take samples regularly or irregularly (sampling can be started at any time in emergency monitoring mode), test water samples, obtain data including the time, location, environmental characteristics and fluorescence excitation-emission matrix (EEM) spectrum data of the water samples, obtain time-sharing data sets for water quality pollution detection, add verification standards and transmit them to the network server. S3, data feature extraction and preprocessing A multivariate correlation dataset was constructed. Real-time and time-sharing data sets from water pollution monitoring at key grid nodes within the watershed were analyzed and processed to create a multivariate correlation dataset with validation tags. The correlation parameters included: device ID, time, location, pollutant type, pollution source, and validation tag. Feature extraction and preprocessing were then performed. Data fusion and preprocessing were performed, with the EEM spectral data subjected to grid integration (FRI) processing, followed by horizontal concatenation of FRI features with environmental features. Data standardization was performed using the sklearn preprocessing Label Encoder to convert water sample source labels into integer labels. Feature importance analysis was performed using the feature importances property of the Random Forest Classifier to identify dominant features in the data.
[0011] S4. Model operation for abnormal monitoring The LSTM / GRU model is combined with the MLP model to conduct real-time classification and indicator anomaly monitoring on the real-time data of the on-site sampling points using the conventional monitoring mode. If an indicator anomaly is found, the system switches to the emergency monitoring mode, and simultaneously initiates the cross-validation and pollution source tracing mechanism, and simultaneously initiates sampling at downstream sampling points and sampling stations. The trained multi-layer perceptron MLP model is used to classify and trace the pollutants, and conducts comparative analysis and cross-validation on the real-time data group and the time-sharing data group, making a multi-parameter collaborative judgment to determine whether an emergency water pollution incident has occurred. If an emergency water pollution incident occurs, the pollutants are further classified, and the pollution source and predicted diffusion range information are preliminarily determined and output, and handed over to manual verification and processing, and the manual verification results are entered into the network server. S5. Model update and continuous monitoring Using the verified multivariate correlation data set, the multilayer perceptron model and LSTM / GRU model are trained again, and the new model is deployed to the network server for operation. Steps S2-S4 are repeated to analyze and process the real-time data group and the time-sharing data group, and the monitoring results are output.
[0012] A rapid source tracing system for watershed water environment monitoring and emergency pollution response, which is used to implement a rapid source tracing method for watershed water environment monitoring and emergency pollution response, and includes: Multiple distributed sampling points and sampling stations connected to each other through a network server and management terminal; Management terminal, used for input and output operations; Multiple distributed sampling points are deployed at key nodes in the watershed to perform fixed-point and timed sampling, collect real-time environmental characteristic data, and upload it to the network server; Multiple distributed sampling stations are deployed at key monitoring nodes in the watershed to collect EEM spectrum data and environmental characteristics regularly or irregularly and upload them to the network server; The network server is used to receive monitoring data, analyze and process it, and output the processing results. It has a built-in rapid tracing program for watershed water environment monitoring and emergency pollution. The program includes the following modules: The monitoring site management module is used to connect and manage the distributed on-site sampling points and sampling stations, and receive the real-time data sets sent back by the on-site sampling points and the time-sharing data sets sent back by the sampling stations; The data processing module is used to process real-time and time-sharing data sets, construct multivariate correlation datasets, and partition known multivariate correlation datasets for model training. This module calculates the grid region integral (FRI) of spectral data using the calculate grid integrals function, fuses multidimensional features, and performs normalization and SMOTE oversampling. Classification and anomaly monitoring module: Using a trained multi-layer perceptron (MLP) model combined with an AI-driven pollution identification LSTM / GRU model, the module uses a conventional monitoring mode to conduct real-time classification and indicator anomaly monitoring on real-time data from on-site sampling points. If an indicator anomaly is found, the module switches to emergency monitoring mode, simultaneously initiating cross-validation and pollution source tracing mechanisms, and simultaneously initiating sampling at downstream sampling points and sampling stations. The module then compares and analyzes the real-time data set with the time-sharing data set, performing cross-validation, and determining whether an emergency water pollution incident has occurred. Source tracing and prediction module: used to further process data that the model initially determines to be a water emergency pollution incident, locate and classify pollutants, and preliminarily determine and output pollution sources and predict the spread range; Notification and visualization display module: used to output monitoring data analysis results, including routine monitoring information, emergency pollution incident alarm information, pollutant classification and location, pollution sources, and predicted diffusion range information; Pollution monitoring and law enforcement management module: Law enforcement personnel conduct manual verification based on the output monitoring data analysis results, and enter the manual verification result data into the network server.
[0013] The method and system for watershed water environment monitoring and emergency pollution rapid source tracing provided by the present invention have at least the following beneficial effects compared with the prior art: 1. This invention focuses on large-scale, large-scale water pollution monitoring and rapid pollution source tracing in river basins. By collaboratively collecting real-time and time-sharing water pollution data with verification tags (including unalterable identifiers) through distributed sampling points and stations, it overcomes the complexity and high cost limitations of traditional traceability methods. By integrating multi-source heterogeneous data (EEM spectra, environmental characteristics, real-time, time-sharing) with AI-driven recognition models (MLP, LSTM / GRU) for collaborative analysis, combined with batch normalization, dropout, and SMOTE oversampling techniques for data processing and model training, the data collection, analysis process, and output results (including verification tags, manual verification result entry, and logging) can all serve directly as effective evidence for environmental monitoring and law enforcement, significantly improving the effectiveness of evidence.
[0014] 2. This invention integrates EEM spectral data with environmental characteristics, real-time and time-sharing water pollution data collection, a multi-parameter collaborative monitoring model (MLP), and an AI-driven pollution identification algorithm model, LSTM / GRU. This model designs a multi-layer perceptron (MLP) model for water pollution classification (using a PyTorch framework, with a total parameter count of at least 1.5M and including optimizations such as Batch Norm and Dropout 0.3). It also employs techniques such as SMOTE oversampling (k neighbors = 3) to address class imbalance, achieving high-precision classification (five categories) of water sample sources and water pollutants, and pollution source tracing. This invention utilizes a combination of distributed active and passive sampling across large watersheds, as well as real-time and time-sharing sampling, to construct a scalable model and large-scale multi-source data processing framework. This model can address both emergency and routine water pollution source tracing needs, achieving both normal and emergency response requirements. The system operates stably and reliably, reduces costs through optimized technologies and automated processes, and is easily disseminated, providing an efficient and accurate tool for environmental protection and sustainable development.
[0015] 3. The AI model and other machine learning technologies employed in this invention provide new approaches for processing EEM data and environmental features. By constructing a water pollution classification model, it can automatically identify the source of water samples and the type of pollution-free samples, thereby enabling efficient pollution tracing. Different from earlier water pollution monitoring technologies based on statistical models and simple machine learning algorithms, the water sample source classification and pollution tracing method proposed in this invention, based on water pollution detection data and an improved multi-layer perceptron, fuses fluorescence excitation-emission matrix (EEM) spectral data with environmental features to construct a multi-source data fusion framework (generating a 225-dimensional feature vector, 56 dimensions for the environmental component, and 169 dimensions for the FRI component). This enables efficient processing and accurate analysis of large-scale, multi-source, high-dimensional water quality detection data, overcoming the data processing limitations of traditional methods. It also significantly improves the model's generalization, adaptability, and timeliness. Specifically, this invention enhances monitoring and tracing capabilities by combining real-time and time-sharing data collection. Real-time data collection enables immediate monitoring of sudden pollution incidents through fast-response sensors, while time-sharing data collection provides historical data support, laying the foundation for model training and long-term trend analysis. At the same time, a multi-parameter collaborative monitoring model is constructed to construct an MLP, integrating EEM spectral data, environmental characteristics, and other water quality parameters such as pH, conductivity, dissolved oxygen (DO), residual chlorine, turbidity, and heavy metals to comprehensively reflect water pollution status and improve traceability accuracy. Furthermore, the present invention utilizes two AI-driven pollution identification algorithm models—LSTM / GRU and MLP—combined with batch normalization, dropout, and SMOTE oversampling (kneighbors=3) techniques. Through machine learning, it fuses and analyzes multi-source heterogeneous data, automatically identifying pollution types and improving classification accuracy. It can accurately distinguish between five water sample sources: fish pond aquaculture water, groundwater, surface water, wastewater, and simulated emergency contaminated wastewater, maintaining excellent performance even in the presence of uneven sample distribution. This method eliminates the need for tedious sample pretreatment (compared to traditional chemical analysis) and, combined with the rapid computing power of machine learning, enables rapid classification, tracking, and traceability of water pollution at low cost and on a large scale.
[0016] 4. The present invention adopts a variety of intelligent models and algorithms for water pollution monitoring, classification and tracing that cooperate with each other, combines multi-source data such as water body indicators, spatial characteristics, spectral characteristics as the input of the prediction and tracing model, and uses neural network models (especially improved MLP, LSTM / GRU) to achieve high-precision positioning of pollution sources and accurate identification of pollutant types; by adding dynamic correction factors to the neural network model (similar effects are achieved by adopting Adam optimizer and Lambda LR or CosineAnnealing LR learning rate scheduling strategy), the model can adjust the learning rate in real time according to the prediction performance. Combined with the early stopping mechanism, the model is more flexible during the training process and can quickly adapt to data changes and noise, thereby improving the accuracy and robustness in water pollution classification and tracing, thereby improving the efficiency and accuracy of water pollution monitoring.
[0017] 5. This invention offers significant advantages in various application scenarios. In water pollution emergency monitoring, such as in the event of a sudden leak, pH, conductivity, and heavy metal sensors can be used to quickly locate the contaminated area and, combined with flow rate data, predict the spread range. In drinking water source early warning monitoring, DO, residual chlorine, and turbidity sensors can be used to monitor the water source in real time, triggering alarms when indicators are abnormal. This overcomes technical difficulties, such as the challenges of data fusion and intelligent analysis, by overcoming the limitation that a single indicator cannot fully reflect the pollution situation.
[0018] 6. The present invention improves the accuracy of pollution type identification by integrating multi-parameter data through machine learning algorithms. At the same time, in order to solve the problem that model training requires a large amount of historical data, it proposes a solution of building a large-scale multi-correlated historical database with verification marks and adopting model updates and continuous monitoring, so as to achieve both normal and emergency situations. The use of a set of systems and methods can achieve both routine monitoring of water pollution and rapid tracing of emergency pollution, significantly improving real-time performance and operability, reflecting careful consideration of actual application scenarios.
[0019] 7. The present invention combines real-time and time-sharing data collection for water pollution detection with verification-tagged rapid-response sensors (e.g., pH, conductivity, heavy metals, and flow rate) and verification-tagged time-sharing data (including EEM and environmental characteristics) to enable immediate monitoring of sudden pollution events and long-term trend analysis. During emergency monitoring, intensified sampling at downstream sampling points and sampling stations is synchronized to acquire multivariate data for water pollution detection. Flow rate data is then used to predict the spread of pollution, and cross-validation of real-time and time-sharing data is performed to enhance the accuracy of monitoring and analysis results.
[0020] 8. The present invention builds a multi-parameter collaborative monitoring model (MLP, LSTM / GRU), integrates 225-dimensional features (including 169-dimensional EEM spectral FRI features and 56-dimensional environmental features), and other water quality parameters such as DO, residual chlorine, turbidity, etc., to comprehensively reflect the water pollution status; in drinking water source early warning monitoring, when the indicators are abnormal (determined by the collaborative judgment of AI-driven LSTM / GRU and improved MLP model), an alarm is triggered to avoid misjudgments and false alarms.
[0021] 9. The AI-driven pollution identification algorithm model constructed by this invention includes an improved pollutant classification MLP model (including Batch Norm, Dropout 0.3, a total parameter of no less than 1.5M, and 5-category classification) and an LSTM / GRU model. Combined with SMOTE oversampling (k=3), batch normalization, and Dropout techniques, it improves pollutant classification accuracy and traceability. By integrating multi-parameter data through machine learning, it overcomes the limitations of a single indicator. By learning from unpolluted water data to identify anomalies, it triggers anomaly alerts when classification results deviate from preset thresholds. This allows for timely detection and correction of model issues, improving operational stability.
[0022] 10. The present invention provides an automated process, from data loading with verification tags (including tamper-proof identifiers), preprocessing (FRI calculation, fusion, Standard Scaler normalization, SMOTE oversampling), model training (Adam optimizer, LR scheduling strategy, early stopping mechanism), evaluation (classification report, confusion matrix, Random Forest Classifier feature importance analysis) to result output (visual display), notification (alarm sending), recording (log file), manual verification of data entry, model update, the entire process is automated or semi-automated, reducing manual intervention; the log file records the classification report, confusion matrix and feature importance analysis, providing data support for event management.
[0023] 11. The present invention has broad application prospects. The method and system provide efficient, accurate, robust, and law enforcement-supporting new tools for pollution source tracing and water quality monitoring, and are of great significance to watershed water pollution detection, environmental protection, and sustainable development. For example, in the event of a sudden water pollution leak, the present invention can rapidly locate the contaminated area using multi-parameter sensor data and flow rate data, and, combined with information on the predicted spread range, guide on-site evidence collection and emergency response. For early warning monitoring of drinking water sources, DO, residual chlorine, and turbidity sensors can be used to monitor the water source in real time, triggering alarm mechanisms in the event of anomalies. For monitoring and tracing industrial wastewater, EEM spectral data and environmental characteristics can be integrated to rapidly identify the source and type of wastewater and preliminarily determine the source of pollution. Furthermore, the present system's visualization display module and information notification (which prompts law enforcement personnel to collect evidence on-site and sends alarms), as well as its pollution monitoring and law enforcement management module (which manually inputs verification results), enable it to serve directly as the basis for environmental monitoring and law enforcement. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 This is a schematic diagram of the module composition structure of a watershed water environment monitoring and emergency pollution rapid tracing system based on water pollution detection according to an embodiment of the present invention; Figure 2 This is a confusion matrix diagram comparing the classification effects of different learning rate scheduling strategies in the embodiment of the present invention, that is, a comparison diagram of the model predicted categories and the actual categories; Figure 3 Graphs showing the training loss and validation loss for each round of model training using the Cosine Annealing LR learning rate scheduling strategy in an embodiment of the present invention.
[0025] Figure 4 1 is a graph showing the training accuracy and verification accuracy of each round of model training using the Cosine Annealing LR learning rate scheduling strategy in an embodiment of the present invention.
[0026] Figure 5 1 is a graph showing the learning rate change in each round of model training for the Cosine Annealing LR learning rate scheduling strategy in an embodiment of the present invention.
[0027] Figure 6 1 is a graph showing the training loss and validation loss of each round of model training using the Lambda LR learning rate scheduling strategy in an embodiment of the present invention.
[0028] Figure 7 3 is a graph showing the training accuracy and verification accuracy of each round of model training using the Lambda LR learning rate scheduling strategy in an embodiment of the present invention.
[0029] Figure 83 is a graph showing the learning rate change in each round of model training for different learning rate scheduling strategies for Lambda LR in an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following is an introduction to the drawings of the embodiments of the present invention or the related technical solutions in the prior art. It should be understood that the drawings described below are only for the convenience of clearly illustrating some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without inventive work.
[0031] Unless otherwise specified, the experimental supplies, instruments and techniques used in the following embodiments of the present invention are commercially available and conventional techniques.
[0032] Example 1 See also Figure 1 , the embodiment of the present invention improves the method and system for rapid source tracing of water environment monitoring and emergency pollution based on water pollution detection. Specifically, it is a method for rapid source tracing of water pollution detection, monitoring and emergency pollution for water environment with large area, wide range, complex water flow and water system network, and its supporting information network management system. Among them, the method is based on multi-source data collection and artificial intelligence model fusion analysis, and performs rapid classification and source tracing of water quality pollution detection, water environment monitoring and emergency pollution based on multi-source water pollution detection data, including the following steps: first, construct a multi-parameter collaborative monitoring model, including a multi-layer perceptron MLP model and an LSTM / GRU model, and train and deploy it; then, through distributed sampling points and sampling stations, collect the real-time data and time-sharing data of the water environment and water pollution detection of the watershed with verification marks, and adopt AI-driven pollution identification MLP model, LSTM / GRU model, combined with batch normalization, Dropout and SM OTE oversampling technology integrates EEM spectral data and environmental characteristics to fuse and analyze multi-source heterogeneous data; then, it automatically identifies whether an emergency pollution incident has occurred according to preset conditions. If it is initially determined that an emergency pollution incident has occurred, it initiates pollution type judgment, source tracing, and cross-validation, and automatically outputs the pollution type and source tracing results of water environment monitoring and emergency pollution. Further manual verification is performed, and environmental law enforcement verification is carried out to complete the monitoring of watershed water environment pollution conditions and rapid tracking and tracing of emergency pollution; the method of the embodiment of the present invention is applicable to various scenarios such as daily routine monitoring of watershed water environment, emergency monitoring and sudden leakage incidents, and early warning monitoring of drinking water sources. The method specifically includes the following steps: S1. Construct a multi-parameter collaborative monitoring model Build, train, and deploy an AI model for multi-parameter collaborative monitoring Build a multi-parameter collaborative monitoring system covering the entire watershed water environment area for real-time water pollution monitoring and rapid emergency pollution tracing, AI-driven multi-layer perceptron (MLP) models and LSTM / GRU models, and import environmental characteristics, pollutants, and pollution source information of key node grids in the entire watershed water environment area; Using known historical data sets, the constructed multi-layer perceptron (MLP) model and LSTM / GRU are collaboratively trained, and model parameters are adjusted and optimized to improve classification and traceability performance. Deploy the trained multi-layer perceptron (MLP) model and LSTM / GRU model to the network server; S2. Collect water body data Set up on-site sampling points and sampling stations within the key node grids of the watershed to collect water quality pollution detection and water environment data in the watershed, and add verification tags such as data collection device ID, GIS and timestamps, encryption information and non-tamperable identifiers to the data; Sensors at on-site sampling points automatically collect water data in real time, obtaining information such as GIS, time, flow rate, color, and transparency of the water body, and obtaining real-time data sets for water pollution detection. After adding verification tags, they are transmitted to the network server. The sampling instrument at the sampling station collects samples regularly or irregularly, tests the water samples, and obtains data including the time, location, environmental characteristics and fluorescence excitation-emission matrix (EEM) spectrum data of the water samples, obtains a time-sharing data set for water pollution detection, adds a verification mark, and transmits it to the network server; S3, data feature extraction and preprocessing Construct a multivariate correlation dataset. After analyzing and processing the real-time and time-sharing data sets of water pollution detection at key node grids within the watershed, a multivariate correlation dataset with verification tags is constructed. The correlation parameters include: device ID, time, location, pollutant type, pollution source, and verification tag. Feature extraction and preprocessing are then performed. S4. Model operation for abnormal monitoring The trained multi-layer perceptron (MLP) model, combined with the LSTM / GRU model, uses a conventional monitoring mode to conduct real-time classification and indicator anomaly monitoring on the real-time data of on-site sampling points. If an indicator anomaly is found, it switches to emergency monitoring mode, simultaneously initiates cross-validation and pollution source tracing mechanisms, and simultaneously initiates sampling at downstream sampling points and sampling stations. The real-time data group and the time-sharing data group are then compared and analyzed, cross-validated, to determine whether an emergency water pollution incident has occurred. If an emergency water pollution incident has occurred, the pollutants are further classified, and a preliminary judgment and output of the pollution source and the predicted diffusion range are made. The information is then handed over to manual verification and processing, and environmental law enforcement verification is carried out. The manual verification results are then entered into the network server. The MLP model and the LSTM / GRU model work together to perform real-time classification and indicator anomaly monitoring on the real-time data of on-site sampling points using conventional monitoring modes. When some indicators initially judged by either model are abnormal, the two models perform data comparison and cross-validation analysis. If both models judge multiple identical indicators to be abnormal, it is determined that an emergency water pollution incident has occurred, triggering an alarm. The system further classifies the pollutants and preliminarily determines and outputs information on the pollution source and predicted spread range. S5. Model update and continuous monitoring Using the multivariate correlation data set that has been verified by environmental law enforcement, the multilayer perceptron MLP model and LSTM / GRU model are trained again, and the new model is deployed to the network server for operation. Steps S2-S4 are repeated to analyze and process the real-time data group and the time-sharing data group, and the monitoring results are output.
[0033] A rapid source tracing system for watershed water environment monitoring and emergency pollution response, which is used to implement the aforementioned rapid source tracing method for watershed water environment monitoring and emergency pollution response, and includes: Multiple distributed sampling points and sampling stations connected to each other through a network server and management terminal; Management terminal, used for input and output operations; Multiple distributed sampling points are deployed at key nodes in the watershed to perform fixed-point and timed sampling of water pollution, collect real-time environmental characteristic data, and upload it to the network server; Multiple distributed sampling stations are deployed at key monitoring nodes in the watershed to collect EEM spectrum data and environmental characteristics of water pollution regularly or irregularly, and upload them to the network server; The network server is used to receive monitoring data, analyze and process it, and output the processing results. It has a built-in rapid tracing program for watershed water environment monitoring and emergency pollution. The program includes the following modules: The monitoring site management module is used to connect and manage the distributed on-site sampling points and sampling stations, and receive the real-time data sets sent back by the on-site sampling points and the time-sharing data sets sent back by the sampling stations; The data processing module is used to process real-time and time-sharing data sets, construct multivariate correlation datasets, and partition known multivariate correlation datasets for model training. This module calculates the grid region integral (FRI) of spectral data using the calculate grid integrals function, fuses multidimensional features, and performs normalization and SMOTE oversampling. Classification and anomaly monitoring module: Using a trained multi-layer perceptron (MLP) model, combined with an AI-driven pollution identification LSTM / GRU model (in tandem), the module uses a conventional monitoring mode to classify and monitor anomaly indicators in real time for real-time data from on-site sampling points. If the LSTM / GRU model detects an anomaly in a water pollution indicator, it switches to emergency monitoring mode, simultaneously initiating cross-validation and pollution source tracing mechanisms, and simultaneously initiating sampling at downstream sampling points and sampling stations. The module then compares and analyzes the real-time data set with the time-sharing data set, performing cross-validation, and determining whether an emergency water pollution incident has occurred. Among them, the LSTM / GRU model is responsible for modeling time series features: learning the normal fluctuation pattern of indicators over time (such as the periodic changes in dissolved oxygen during the day and night), supporting trend-based classification (such as "a continuous decrease in dissolved oxygen for 3 hours" corresponds to "a transition from mild pollution to severe pollution") and "dynamic time series anomaly" detection (such as the amplitude of the indicator mutation exceeding the historical trend range); the MLP model is responsible for modeling static features: learning the association between "indicator value combinations" and water quality status (such as "COD>50mg / L and ammonia nitrogen>10mg / L" corresponds to "severe pollution"), supporting real-time classification and "instantaneous static anomaly" detection (such as an indicator combination at a certain moment that has never appeared in historical normal samples).
[0034] Source tracing and prediction module: used to further process data that one of the models preliminarily determines is a water body emergency pollution incident, locate and classify pollutants, and preliminarily determine and output pollution sources and predict the spread range; The notification and visualization display module is used to output monitoring data analysis results, including routine monitoring information, emergency pollution incident alarm information, pollutant classification and location, pollution sources, and predicted diffusion range information; Pollution monitoring and law enforcement management module: Law enforcement personnel conduct manual verification based on the output monitoring data analysis results, and enter the manual verification result data into the network server.
[0035] The rapid source tracing system for watershed water environment monitoring and emergency pollution provided in this embodiment has the following daily operation process: 1) Multiple distributed sampling points and sampling stations collect and upload watershed water environment monitoring data; 2) The monitoring site management module receives the data and forwards it to the data processing module for processing; 3) The data processing module performs feature extraction and preprocessing; 4) Classification and anomaly monitoring module performs real-time classification and anomaly detection; 5) If an anomaly is detected, the tracing and prediction module activates the pollution tracing mechanism, locates the polluted area, predicts the pollution source and spread range, and outputs preliminary monitoring and analysis results; 6) Notification and visualization display module: Outputs display content based on monitoring and analysis results. When an emergency pollution incident occurs, it automatically initiates an emergency response alert, which is then handed over to environmental administrative law enforcement personnel for manual verification. It also presents the monitoring, tracing, and treatment results and the entire process. 7) Pollution monitoring and law enforcement management module, which records the entire chain of data including pollution monitoring and law enforcement data, manual verification, law enforcement evidence, and processing results, to support the legal, reasonable, and compliant implementation of environmental administrative law enforcement; 8) The system uses a multivariate correlation dataset verified by law enforcement, as well as a newly acquired dataset, to retrain the multi-layer perceptron model and deploy the new model to a network server for operation, thereby achieving continuous model updates and optimizing system performance.
[0036] It should be noted that the various real-time sensors used in the distributed sampling points of this embodiment can quickly obtain basic physical and chemical data of flowing water bodies and the concentrations of some pollutants. They are of practical value for judging the existence of pollution and classifying it into major categories (such as organic matter, heavy metals, and nutrient salt pollution). However, their ability to identify specific pollutant components, low-concentration pollution, and new pollutants is limited. It is necessary to combine the laboratory analysis of the sampling station with the watershed monitoring network to achieve accurate monitoring and tracing to avoid misjudgment and false alarms.
[0037] The embodiment of the present invention adopts an AI water pollution identification model based on the combination of sensor data and laboratory data. The LSTM / GRU model therein mainly captures the dynamic changes of pollution indicators by processing time series data (such as the pH value, dissolved oxygen, heavy metal concentration and other time series of water quality sensors). It is suitable for analyzing the evolution of pollution over time (such as the periodic fluctuations of industrial wastewater discharge) and has the ability to detect anomalies: by learning normal water quality patterns, it can identify sudden pollution events; however, it has problems such as sensor noise sensitivity. Missing sensor data or noise may lead to model misjudgment. Therefore, cross-validation is performed with laboratory data from sampling stations to ensure the objectivity and accuracy of the data.
[0038] In this embodiment of the present invention, the MLP and LSTM / GRU models collaborate in a serial fashion (time series feature extraction → static feature classification) for real-time monitoring of watershed water environments. The LSTM / GRU first extracts features from the real-time monitored time series data, then feeds the time series features into the MLP, where they are combined with static features to perform classification or anomaly detection. This approach is suitable for scenarios where time series dynamics dominate but static attributes are required for decision-making (e.g., combining "time series anomaly patterns + sampling point locations" to determine pollution sources). The MLP (Multi-Layer Perceptron) and LSTM / GRU models collaborate to process real-time data from sampling points, enabling real-time classification (e.g., water quality classification) and indicator anomaly detection. This approach leverages the complementary strengths of the two models: the MLP captures static features and correlations between indicators, while the LSTM / GRU captures dynamic trends and long-term dependencies in the time series. This collaborative logic of "feature separation - separate modeling - output fusion" improves monitoring accuracy. The core synergy between MLP and LSTM / GRU is the dual-dimensional modeling of "static snapshot + dynamic trend": MLP captures correlations between indicators to improve classification and static anomaly detection accuracy, while LSTM / GRU captures temporal dependencies to enhance trend classification and dynamic anomaly sensitivity. Through a framework of feature separation, parallel inference, and output fusion, this approach achieves efficient monitoring with a minimal number of sampling points while ensuring real-time performance. This reduces false alarms and missed alerts, while providing rapid decision-making support for emergency source tracing of watershed pollution.
[0039] Example 2 See also Figure 1 The rapid source tracing method and system for water environment monitoring and emergency pollution in a river basin according to the embodiment of the present invention is a refinement of the first embodiment. The focus is on improving the efficiency and coverage of monitoring and management through a systematic new solution, making it applicable to water pollution detection, real-time monitoring, and pollution emergency response in large river basins (such as the Pearl River Basin) to reduce overall costs, make it easy to implement, and effectively support all aspects of environmental law enforcement. The differences are: The monitoring site management module is used to connect and manage distributed field sampling points and sampling stations deployed at key nodes and key monitoring nodes in the basin, receive real-time data sets with verification marks (including GIS, time, flow rate, color, turbidity, pH, conductivity, DO, residual chlorine, heavy metal pollutant concentration and other data) sent back by distributed field sampling points, and time-sharing data sets with verification marks (including time, location, environmental characteristics such as longitude and latitude, industrial activity-related parameters, river type, and fluorescence excitation-emission matrix (EEM) spectral data, excitation / emission range 250-500nm, step size 5nm, generating a 52x52 matrix) sent back by distributed sampling stations; the sampling station has the ability to perform regular sampling in conventional monitoring mode and to start sampling at any time in emergency monitoring mode.
[0040] Data Processing Module: This module processes real-time and time-sharing data sets. Through analysis and processing, it constructs a multivariate correlation dataset containing correlation parameters such as device ID, time, location, pollutant type, pollution source, and verification tags, along with verification tags. A stratified 8:1:1 partitioning of the known historical dataset is performed for model training. The grid region integral (FRI) is calculated for the EEM spectral data in the time-sharing data using the calculate grid integrals function. The FRI features (169 dimensions) are then horizontally concatenated with the environmental features (56 dimensions) to form a 225-dimensional feature vector. Features are standardized using the Standard Scaler, and the water sample source labels are converted to integers using the sklearn preprocessing Label Encoder. SMOTE oversampling is performed on the minority class in the training set (k neighbors = 3). Feature importance analysis is performed using the feature importances property of the Random Forest Classifier.
[0041] The Classification and Anomaly Monitoring Module utilizes a trained Multi-Layer Perceptron (MLP) model (built in PyTorch, with a total parameter count of at least 1.5M and an architecture that includes batch norm and dropout 0.3) and an LSTM / GRU model to perform real-time classification and anomaly monitoring on real-time data from field sampling points using a conventional monitoring model. The MLP model classifies water samples into five categories: fish pond water, groundwater, surface water, wastewater, and simulated emergency contaminated wastewater. This module identifies normal patterns by learning from data collected from uncontaminated water bodies. The Classification and Anomaly Monitoring Module classifies pollutants using pre-learned classification data from uncontaminated water bodies using the LSTM / GRU and MLP models, combined with the classification capabilities of the MLP model.
[0042] When the MLP model classifies water samples, if the classification results deviate from the preset threshold, including an increase in the probability of an abnormal category, an anomaly alert is triggered. A multi-layer perceptron (MLP) model and an LSTM / GRU model jointly perform real-time classification and indicator anomaly monitoring on real-time data from on-site sampling points using conventional monitoring mode. The MLP model classifies water samples into five categories: fish pond water, groundwater, surface water, wastewater, and simulated emergency contaminated wastewater. If an abnormal indicator is detected during real-time monitoring, or if the MLP classification results deviate from the preset threshold (increased probability of an abnormal category), an anomaly alert is automatically triggered and the system switches to emergency monitoring mode. Cross-validation and pollution source tracing mechanisms are simultaneously activated, and intensified sampling is initiated at downstream sampling points and stations. Simulated emergency contaminated wastewater is prepared by mixing wastewater containing emergency pollutants with river water in ratios of 1:1, 1:2, or 1:100, and then allowing the mixture to stand at 25°C for two hours before use.
[0043] The tracing and prediction module is used to further analyze data that is preliminarily judged to be an emergency water pollution incident. By integrating a pollution tracing model based on environmental characteristics and three-dimensional fluorescence, the pollutants in water samples are pinpointed and classified, and a preliminary judgment and output of information such as the pollution source and predicted diffusion range are analyzed. The results are then verified through an accounting verification model. After an anomaly is detected, the system immediately starts the emergency response mode, and through multi-parameter sensor data (such as heavy metals, pH, etc.) and flow rate data, it quickly locates the pollution source and predicts the diffusion range, providing law enforcement personnel with verification objects, targets and pollution data for manual verification.
[0044] The notification and visualization display module is used to output the monitoring data analysis results, system status and emergency information. It includes routine monitoring information, emergency pollution incident alarm information, pollutant classification and location, pollution source, and predicted diffusion range information. When an emergency pollution incident occurs, the system automatically sends an alarm to the relevant law enforcement personnel or departments, including information such as the location of the pollution source and the type of pollutant, prompting the law enforcement personnel to conduct on-site tracing and evidence collection based on the results of the source tracing analysis, and guide emergency response. The visualization display module displays content including environmental characteristics, FRI feature heat maps, training history curves, confusion matrices, and FRI box plots. The information notifications in the notification and visualization display module include information prompting law enforcement personnel to conduct on-site tracing and evidence collection based on the results of the source tracing analysis; in the event of an emergency pollution incident, the system automatically sends an alarm to the relevant law enforcement personnel or departments, including information such as the location of the pollution source and the type of pollutant, to guide on-site evidence collection and emergency response; the visualization display content includes: environmental characteristics, FRI feature heat maps, training history curves, confusion matrices, and FRI box plots; The pollution monitoring and law enforcement management module specifically manages various types of pollution incidents. It is connected to the notification and visualization display module to archive pollution incident management and perform statistical analysis to generate log files. The log files are used to record the classification reports, confusion matrices, and feature importance analysis corresponding to various types of pollution incidents, providing data support for environmental pollution incident management and environmental law enforcement.
[0045] The rapid source tracing method for watershed water environment monitoring and emergency pollution provided in this embodiment more specifically includes the following steps: S1. Construct a multi-parameter collaborative monitoring model S1-1 Model construction A multi-layer perceptron (MLP) model and an LSTM / GRU model were built, trained, and deployed for water pollution classification across the entire watershed. The model then imported environmental characteristics, pollutant, and pollution source information from key grid nodes within the watershed. The model, built using the PyTorch framework and containing at least 1.5M parameters, comprised a 225-dimensional input layer, multiple hidden layers (512, 256, 128) with linear models, batch norms, ReLUs, and dropouts, and a classification layer with five output categories (corresponding to water sample sources: fish pond aquaculture, groundwater, surface water, wastewater, and simulated emergency contaminated wastewater). The dropout rate in the hidden layers was set to 0.3.
[0046] Among them, building a multi-layer perceptron MLP model includes: designing the model architecture, including designing the input layer, multiple hidden layers and classification layer in sequence, according to the following steps: 1) Input layer (225 dimensions) → 512-dimensional hidden layer (Linear + Batch Norm + ReLU + Dropout); 2) → 256-dimensional hidden layer (Linear + Batch Norm + ReLU + Dropout); 3) → 128-dimensional hidden layer (Linear + Batch Norm + ReLU + Dropout); 4) The classification layer outputs classification probabilities for five categories, corresponding to the five water sample sources: fish pond aquaculture, groundwater, surface water, wastewater, and simulated emergency contaminated wastewater; Among them, the design of hidden layer further includes: 1) Linear transformation layer: transforms the input features into 512 dimensions, 256 dimensions, and 128 dimensions in sequence, achieving gradual dimensionality reduction and abstraction of features; 2) Batch normalization layer, used to accelerate convergence and stabilize training; 3) ReLU activation function, introducing nonlinear transformation; 4) Dropout layer, set the dropout rate to 0.3 to prevent the model from overfitting.
[0047] Construct an LSTM / GRU model for time series feature extraction. Its structure is as follows: Input: Real-time monitoring time series data window (such as pH, dissolved oxygen, COD and other indicators of a sampling point in the past hour, divided by time step, with the shape of [time step, indicator dimension]).
[0048] Processing: Capture temporal dependencies (such as the temporal correlation of sudden rises and falls in indicators and periodic fluctuation patterns) through the recurrent layer of LSTM / GRU, and output a temporal feature vector (such as the hidden state of the last time step, or the global pooling feature of all time steps, with a shape of [1, temporal feature dimension]).
[0049] Construct an MLP module for classification / anomaly judgment, and its structure is as follows: Input: Time series feature vector output by LSTM / GRU + static features of sampling points (such as sampling point coordinates, surrounding pollution source type (factory / farmland), river flow rate, etc., with a shape of [1, static feature dimension]).
[0050] Processing: MLP performs nonlinear mapping on the fused features through 2-3 fully connected layers (ReLU is used as the activation function), and the output layer uses Softmax (classification tasks, such as pollution type: industrial pollution / agricultural non-point source pollution) or Sigmoid (anomaly monitoring, such as "normal / abnormal" binary classification).
[0051] S1-2 model training Model training uses a known historical dataset, splitting the training, validation, and test sets into a stratified ratio of 8:1:1. SMOTE oversampling (k neighbors = 3) is used for the minority class in the training set. Feature vectors are normalized using StandardScaler. The loss function is weighted cross-entropy loss (weights are calculated based on the inverse of the number of class samples). Adam is used as the optimizer (initial learning rate 0.0005, weight decay 0.0001). A Lambda LR or Cosine Annealing LR learning rate scheduler is used, and an early stopping mechanism (with a patience value of 10, stopping based on validation loss) is implemented to prevent overfitting.
[0052] Co-training of MLP and LSTM / GRU models: Jointly train the two modules, using the categorical cross entropy (classification tasks) or MSE + cross entropy (anomaly detection, taking into account both error and classification).
[0053] S1-3 Model evaluation and pollution source verification Evaluate model performance on the test set, using the classification report to calculate accuracy, precision, recall, and F1 score, and plot a confusion matrix to analyze classification results. Use the Random Forest Classifier to calculate feature importances and identify key features. Based on the classification results and feature importances, infer the source of contamination, generate a traceability report, and then verify the accuracy of the report. Compare the classification results of water pollution detection with known actual source categories to analyze classification accuracy and pollution traceability. This includes calculating accuracy, precision, recall, and F1 scores on the test set; generating a confusion matrix to analyze misclassification between categories; and using a random forest model to assess feature importance and identify the environmental and spectral features that contribute most to classification. The trained model is then deployed to a network server.
[0054] S2. Collect water body data Scientifically set up field sampling points and sampling stations within the grid of key nodes in the watershed. The points are arranged based on the DEM grid division, taking into account the hydrological and hydrodynamic characteristics (rapids, slow flows, confluences), the surrounding areas of fixed and mobile pollution sources, and environmentally sensitive areas and risk hotspots. The sensors at the field sampling points automatically collect real-time data groups with verification marks (including geographic information GIS, time, flow rate, color, turbidity, pH, conductivity, DO, residual chlorine, heavy metal pollutant concentrations, etc.), and transmit them with verification marks. The instruments at the sampling stations take samples regularly or irregularly (start at any time in emergency mode), and obtain the time, location, environmental characteristics (including longitude and latitude, parameters related to industrial activities, river type) and fluorescence excitation-emission matrix (EEM) spectral data) of water samples to form a time-sharing data group with verification marks for transmission. Specifically, the following steps are included: S2-1 Set up on-site sampling points and sampling stations within the key node grid of the watershed First, the watershed is divided into equal-area grids (e.g., 1 km x 1 km) based on a DEM (digital elevation model). Each grid contains at least one representative sampling point. Kriging interpolation is then used to analyze the spatial distribution of water quality parameters to ensure that the sampling points reflect the mean water quality within the grid and to avoid data bias due to insufficient sampling points (e.g., if the spatial coefficient of variation of COD concentration is greater than 15%, more sampling points are needed). The second is to set up on-site sampling points at key nodes of water quality changes Based on the hydrological and hydrodynamic characteristics, taking into account the flow morphology and pollutant diffusion patterns, as well as the tidal and runoff periodicity, sampling points should be set at locations with sudden changes in flow conditions, such as turbulent water (such as waterfalls and shallows), slow-flowing areas (such as river bends and reservoirs), and tributary confluences, as these areas are prone to pollutant mixing or deposition. Third, on-site sampling points and sampling stations should be set up around both fixed and mobile pollution sources, with a focus on fixed sources such as industrial wastewater discharge outlets, urban sewage treatment plant outlets, and farmland drainage outlets, as well as areas with dense ship traffic (mobile sources), to ensure that pollution sources are directly monitored. Fourth, we will increase the number of monitoring points based on environmentally sensitive areas and risk hotspots. This includes areas with a high incidence of historical pollution incidents (such as river sections with heavy metal leaks) and other sensitive areas such as drinking water source protection areas, nature reserves, and aquaculture areas. We will also prioritize long-term monitoring. S2-2 On-site sampling points to collect water pollution and water environment data in the basin Collect water environment data of the river basin and add verification marks such as data collection device ID, GIS (geographic information) and timestamp, encryption information and non-tamperable identifier to the data; Among them, sensors at on-site sampling points automatically collect water data in real time, obtaining information such as GIS, time, flow rate, color, turbidity, pH, conductivity, DO, residual chlorine, and heavy metal pollutant concentrations of the water body, obtaining a real-time data set of water pollution, and transmitting it to the network server after verification. S2-3 sampling station collects water environment data of the basin The sampling instruments at the sampling stations are used for regular sampling in the conventional monitoring mode and for testing water quality pollution. In the emergency monitoring mode, they are used for irregular sampling and can start sampling and testing water quality pollution at any time. The sampling station obtains the environmental characteristics of water samples and fluorescence excitation-emission matrix (EEM) spectral data through water sample collection and data analysis, specifically: S2-3-1 collects water samples and records environmental characteristics, including latitude and longitude, parameters related to industrial activities, and river type; uses a fluorescence spectrophotometer to collect EEM spectral data of the water samples, with an excitation wavelength range of 250-500 nm, an emission wavelength range of 250-500 nm, and a step size of 5 nm, to generate a 52×52 fluorescence intensity matrix; S2-3-2 fuses the environmental features with the EEM spectral features after grid integration (FRI) processing to generate a 225-dimensional feature vector, of which the environmental features account for 56 dimensions and the FRI spectral features account for 169 dimensions; S2-3-3 will obtain a time-sharing data set including the time, location, environmental characteristics and fluorescence excitation-emission matrix (EEM) spectral data of the water sample, and transmit it to the network server with verification standards.
[0055] S3, data feature extraction and preprocessing S3-1 Constructing a multivariate correlation dataset Analyze and process the real-time and time-sharing data sets to construct a multivariate correlation dataset with verification tags. The correlation parameters include device ID-time-location-pollutant type-pollution source-verification tag. After analyzing and processing the real-time and time-sharing data sets of water pollution in key node grids in the basin, construct a multivariate correlation dataset with verification tags. The correlation parameters include: device ID-time-location-pollutant type-pollution source-verification tag, so that it meets the data evidence standard requirements of administrative law enforcement; S3-2 Feature extraction and preprocessing Data fusion and preprocessing were performed, and the EEM spectral data were grid-integrated. FRI features were then horizontally concatenated with environmental features. Data normalization was performed using the sklearn preprocessing Label Encoder to convert water sample source labels into integer labels. Label Encoder was used to convert water sample source labels into integers, and the feature vectors were normalized using StandardScaler. Feature extraction and preprocessing were then performed, and the EEM spectral data were grid-integrated (FRI). FRI features were then horizontally concatenated with environmental features to generate a 225-dimensional feature vector (56 dimensions for environmental features and 169 for FRI spectral features).
[0056] S3-3 Feature Importance Analysis Identify the dominant features in the data using the feature importances property of the Random Forest Classifier.
[0057] S4. Model operation for abnormal monitoring and traceability response In S4-1's conventional monitoring mode, the AI-driven pollution identification LSTM / GRU model uses conventional monitoring to analyze real-time water quality data from on-site sampling points, performing real-time classification and monitoring for indicator anomalies. If an indicator anomaly is detected or the MLP model classification results deviate from the preset threshold (increasing the probability of an abnormal category), the system is preliminarily judged to have an emergency pollution incident based on preset conditions. The system immediately switches to emergency monitoring mode, simultaneously initiating cross-validation and pollution source tracing mechanisms, and simultaneously starting intensified sampling at downstream sampling points and stations.
[0058] S4-2 uses the trained MLP model to classify and trace pollutants. It also conducts comparative analysis and cross-validation of real-time and time-sharing data sets, making a multi-parameter collaborative judgment to determine whether a water pollution emergency has occurred. If confirmed, the system further classifies the pollutants, preliminarily identifies and outputs the pollution source and predicted spread range. This information is then manually verified and processed by law enforcement personnel, who then log the manual verification results into a network server.
[0059] In this step, the two models can be used in tandem or in parallel. The MLP branch takes static features as input, uses a fully connected layer to learn "indicator combination patterns" for different water quality categories, and outputs static classification probabilities (e.g., "The probability that the current static features correspond to 'mild pollution' is 80%"). Advantages include: rapid capture of nonlinear correlations between indicators (e.g., "Low pH is often associated with high ammonia nitrogen"), fast inference speed, and suitability for real-time response. The LSTM / GRU branch takes time series features as input, uses a gating mechanism to capture long-term dependencies (e.g., "COD typically rises first and then falls during the rainy season"), and outputs time series classification probabilities (e.g., "The probability that the current time series trend corresponds to 'moderate pollution' is 75%"). Advantages include: avoiding the inability of traditional time series models (e.g., ARIMA) to handle nonlinear trends and being particularly well-suited for cyclical and sudden changes in water quality indicators. Output fusion of these two models can improve classification robustness.
[0060] The outputs of the two models are integrated through a fusion layer to address the limitations of a single model (such as MLP ignoring trends and LSTM being sensitive to transient anomalies), including: Basic fusion: Use weighted averaging (the weights can be verified and determined through historical data, such as a static feature weight of 0.4 and a temporal feature weight of 0.6) and take the category with the highest probability as the final result.
[0061] Advanced Fusion: Introducing the attention mechanism to dynamically adjust weights. For example, when the indicator value fluctuates gently (weak temporal features), the MLP weight is increased; when the indicator changes dramatically (strong temporal features), the LSTM / GRU weight is increased.
[0062] Conflict resolution: If the highest probability categories output by the two models are different (e.g., MLP judges it as "good" and LSTM judges it as "mildly polluted"), and the confidence levels of both are above the threshold (e.g., > 60%), a "fuzzy classification" tag is triggered (e.g., "good-mildly polluted transition") and pushed to the law enforcement end for decision-making assistance.
[0063] The two models collaborate to monitor abnormal indicators, including independently identifying "values outside the normal range" or "changes that do not conform to the trend" (such as a sudden leak causing a sudden increase in COD). The collaborative logic process is as follows: (1) Define exceptions and divide models: Static anomaly: The indicator value or combination at a certain moment deviates significantly from the historical normal sample (for example, pH = 4.0, which is far below the historical normal range of 6.5-8.5). MLP detects this through "normal sample distribution learning" (such as calculating the reconstruction error between the current feature and the normal sample).
[0064] Time series anomalies: When the trend of an indicator deviates from historical patterns (for example, dissolved oxygen drops from 5 mg / L to 1 mg / L within 10 minutes, far exceeding the historical maximum rate of change), the LSTM / GRU detects this through "time series prediction error" (for example, the residual between the predicted value at the next moment and the actual value).
[0065] (2) Perform model parallel testing Among them, the MLP model is responsible for static anomaly detection. During training, the MLP learns the static feature distribution of normal samples (for example, reconstructing normal samples through an autoencoder will result in large reconstruction errors for abnormal samples). During real-time monitoring, the reconstruction error of the current static features is calculated. If it exceeds a threshold (such as the 95th percentile), it is marked as a "static anomaly candidate."
[0066] The LSTM / GRU model is responsible for time series anomaly detection. During training, the LSTM predicts future values based on historical time series data (for example, using data from time t-5 to time t to predict the value at time t+1) and learns normal trends. During real-time monitoring, the data from time t-5 to time t is used to predict the value at time t+1, and the residual between the predicted value and the actual value at t+1 is calculated. If the residual exceeds a threshold (for example, 3σ based on the historical residual distribution), it is marked as a "time series anomaly candidate."
[0067] (3) Abnormal confirmation and linkage Anomaly labeling using a single model may result in false positives (e.g., MLP misclassifying occasional fluctuations as static anomalies, or LSTM misclassifying short-term noise as temporal anomalies). This requires collaborative confirmation using two models: Double verification: When a "static anomaly candidate" and a "time series anomaly candidate" appear at the same time, it is determined to be a "real anomaly" (such as a sudden increase in COD and its combined characteristics deviate from the normal, and the change trend is abnormal), and an alarm is immediately triggered.
[0068] Graded response: If there is only a static anomaly (such as an instantaneous value exceeding the threshold but the trend is normal, which may be a sensor error), it is marked as a "low priority anomaly" and waits for verification by the next time step data; if there is only a temporal anomaly (such as an abnormal trend but the value does not exceed the threshold, which may be the early stage of pollution), it is marked as a "medium priority anomaly" and the monitoring frequency of this indicator is increased (such as changing from once every 5 minutes to once every 1 minute).
[0069] S5. Model update and continuous monitoring: Use the multivariate correlation data set that has been verified by environmental law enforcement and the newly obtained multivariate correlation data set during operation to retrain the multilayer perceptron MLP model and LSTM / GRU model, and deploy the new model to the network server for operation. Repeat steps S2-S4 (i.e., collecting water body data, data feature extraction and preprocessing, model operation anomaly monitoring and traceability response), analyze and process the real-time data group and time-sharing data group, and output the monitoring results. This process is carried out regularly (usually updated once a week) to form a continuous optimization closed loop.
[0070] Example 3 See also Figure 2-Figure 8 Building on Examples 1 and 2, this embodiment further addresses the large, extensive, and complex water flow and network conditions of the Pearl River Basin. A specific method and supporting system for water quality pollution detection-based water environment monitoring and emergency pollution rapid source tracing is proposed. Distributed sampling points and sampling stations collaboratively collect verified, labeled real-time and time-sharing data. A multi-layer perceptron (MLP) model is used for multi-parameter collaborative monitoring and classification, combined with an AI-driven pollution identification LSTM / GRU model for real-time anomaly detection. This method and system integrates multi-source heterogeneous data, such as EEM spectral data and environmental characteristics, and utilizes batch normalization, dropout, and SMOTE oversampling techniques for data processing and model training. Based on preset conditions, the method and system automatically identifies whether an emergency pollution incident has occurred. If an emergency pollution incident is initially determined to have occurred, the system rapidly initiates pollution type determination, source tracing, and cross-validation, automatically outputting results for further manual verification. Ultimately, this method and system achieves rapid monitoring of the water environment in the basin, emergency source tracing, and supports environmental law enforcement, meeting the needs of large-scale applications while optimizing efficiency and cost through network technology.
[0071] This embodiment provides a method for rapid source tracing of water environment monitoring and emergency pollution in the Pearl River Basin. The specific steps are as follows: Step 1: To construct a classification model suitable for watershed water pollution detection and water environment monitoring, a water sample dataset was collected and expanded. This step corresponds to the data collection, feature extraction, and preprocessing steps in methods S2 and S3. A total of 311 water samples were collected, categorized as follows: fish pond aquaculture (41), groundwater (32), surface water (129), wastewater (17), and simulated emergency contaminated wastewater (92). Detailed information on the water sample collection is provided in Table 1. Specifically, fish pond aquaculture water, groundwater, surface water, and wastewater were field-collected and labeled water samples. The simulated emergency contaminated wastewater was prepared in the laboratory to simulate the spread of surface water in an emergency water pollution incident, such as an enterprise wastewater leak or unauthorized discharge. The simulated emergency contaminated wastewater was prepared by collecting 500 mL of wastewater from the enterprise's wastewater collection tank and transporting it back to the laboratory. A large amount of surface water was also collected from rivers and streams near the enterprise's location. Back in the laboratory, we prepared raw industrial wastewater and river water at ratios of 1:1, 1:2, 1:3, 1:4, 1:6, 1:8, 1:10, 1:20, 1:50, and 1:100, respectively. For each water sample, we collected and validated environmental features, including 56-dimensional environmental features (including latitude and longitude, regional information, parameters related to industrial activity, river type, and examples of FluI, FreI, BIX, and HIX). We also collected and validated EEM spectral data using a fluorescence spectrophotometer (excitation / emission wavelength range 250-500 nm, 5 nm step size, generating a 52×52 fluorescence intensity matrix). A Python script was used to read the data for each sample.
[0072]
[0073]
[0074]
[0075]
[0076]
[0077]
[0078] Subsequently, feature extraction was performed on the EEM spectral data: the 52×52 matrix was integrated on a 13x13 grid using the calculategridintegrals function to generate 169-dimensional FRI features. During feature extraction, data quality was ensured to be free of NaN or infinite values. Finally, the 56-dimensional environmental features were horizontally concatenated and fused with the 169-dimensional FRI features to form a 225-dimensional feature vector, which served as the modeling dataset. Data preprocessing included normalization using the Standard Scaler and oversampling the training set using SMOTE (k neighbors = 3). Labels were converted using the Label Encoder.
[0079] Step 2: Build a distributed water environment monitoring and pollution tracing system to process, analyze, and output data for each specific monitoring and tracing step. To achieve distributed sampling, the system includes multiple distributed on-site sampling points and sampling stations. The network server has a built-in rapid tracing program for watershed water environment monitoring and emergency pollution. Step 3: Model training and optimization. This step corresponds to the training and partial evaluation of step S1 in the previous embodiment. On the network server, the model training of step S1 is performed using the data processed in step S3. The MLP model parameters and training hyperparameters are as follows: Input dimension: 225; hidden layer structure: [512, 256, 128]; activation function: ReLU; regularization: BatchNorm + Dropout (0.3); output layer: 5 categories.
[0080] Training hyperparameters: Optimizer: Adam (lr=0.0005, weight decay=1e-4); Batch size: 64; Scheduler: Cosine Annealing LR (T max=100) or Lambda LR (piecewise decay). Early stopping mechanism (patience value 10).
[0081] The training results show that Cosine Annealing LR performs better in test accuracy (98.41%) and validation loss (0.0224), which is better than Lambda LR (test accuracy 96.83%). For example, in the Cosine Annealing LR learning rate scheduler model, Figure 3 As shown in the figure, both curves decrease rapidly with the increase of training rounds and converge to a very low level close to 0 after about 20 rounds. The curves of training loss and validation loss are very close, which further proves that the model has good generalization ability and stable convergence. Figure 4The two curves show that both rise rapidly with the number of training rounds (horizontal axis). After approximately 15-20 rounds, both the training accuracy and the validation accuracy reach or reach 100% and stabilize. The two curves overlap closely, indicating that the model is learning rapidly without overfitting. Figure 5 The data indicates that the learning rate, starting from an initial value of 0.0005, exhibits a smooth cosine function-like decline curve, gradually and slowly decaying toward 0. This smooth decay facilitates more refined fine-tuning of the model in the later stages of training, helping it find a more optimal local minimum. This is consistent with the data in column F of the training log table, validating the successful implementation of the cosine annealing learning rate strategy.
[0082] Figure 6 The Lambda learning rate scheduler's model loss curve is shown in the figure. The figure contains two curves: training loss (blue) and validation loss (orange). Both curves decrease rapidly with the increase in training rounds and converge to a very low level close to 0 after about 15-20 rounds. The very close trend of the training loss and validation loss curves further proves that the model has good generalization ability. At the same time, Figure 7 As shown in the figure, both curves rise rapidly with the increase in the number of training rounds. After about 15-20 rounds, the training accuracy and verification accuracy both reach a level close to 100% and tend to stabilize, indicating that the model learns very quickly without obvious overfitting. Figure 8 The data shows that the learning rate remained constant at 0.0005 from epoch 0 to 30. At epoch 31, the learning rate dropped dramatically to 0.00005 and remained constant throughout the training. This is consistent with the data in column F of the training log table, confirming the successful implementation of the stepwise decay strategy.
[0083] Step 4: Data processing and classification result display. This step corresponds to part of the functions of steps S3 and S4 in the above embodiment. Figure 2Figure 2 shows the confusion matrix of the classification results obtained on a test set using an improved multilayer perceptron (MLP) model in an embodiment of the present invention, using two different learning rate scheduling strategies: LambdaLR and Cosine Annealing LR. The test set contains 63 samples. The vertical axis of the confusion matrix represents the true classification of the samples, and the horizontal axis represents the model's predicted classification. The values on the diagonal indicate the number of samples correctly predicted by the model, while the values on the off-diagonal indicate the number of samples incorrectly predicted by the model. The figure compares the performance of the two strategies. When using the Lambda LR learning rate scheduling strategy, the model misclassified two samples on the test set: For the "fish pond aquaculture water" category, 7 out of 8 real samples were correctly classified, but 1 was incorrectly predicted as "groundwater." For the "surface water" category, 25 out of 26 real samples were correctly classified, but 1 was incorrectly predicted as "fish pond aquaculture water." For the "groundwater," "wastewater," and "simulated emergency contaminated wastewater" categories, the model achieved 100% correct classification. Under this strategy, the model correctly predicted a total of 61 samples, with an overall classification accuracy of 96.83% (61 / 63). When the Cosine Annealing LR learning rate scheduling strategy was adopted, the model's performance was further improved, with only one misclassification: for the "fish pond aquaculture water" category, all eight real samples were correctly classified. For the "surface water" category, 25 of the 26 real samples were correctly classified, while one was still incorrectly predicted as "fish pond aquaculture water." For the "groundwater," "wastewater," and "simulated emergency contaminated wastewater" categories, the model also achieved 100% correct classification. Under this strategy, the model correctly predicted a total of 62 samples, with an overall classification accuracy of 98.41% (62 / 63). This demonstrates that the model has high classification accuracy and can quickly and accurately identify the source of water samples.
[0084] Step 5: Anomaly Detection and Rapid Source Tracing. This step corresponds to the core process of step S4 in the previous embodiment. When the AI-driven LSTM / GRU model detects an anomaly in real-time data or the MLP classification results deviate from a preset threshold (e.g., an increase in the probability of an anomaly category), the system triggers an anomaly alert and initiates a rapid source tracing mechanism: cross-validation and pollution source tracing are simultaneously initiated, along with downstream encrypted sampling. This system combines comparative analysis and cross-validation of real-time and time-sharing data sets to conduct a multi-parameter collaborative assessment. If a pollution incident is confirmed, pollutant type identification, geographic location, and diffusion range estimation are performed (using water flow models and historical data). A preliminary pollution source is determined, and a database of polluting enterprises is queried for matching. The source tracing results are then verified using an accounting verification model. The source tracing results are pushed to relevant departments via a notification and visualization module, and an automatic alert (including information such as the pollution source location and pollutant type) is sent, prompting law enforcement personnel to conduct on-site evidence collection based on the source tracing analysis results, providing guidance for rapid handling of the pollution incident.
[0085] The MLP and LSTM / GRU models can also operate in parallel collaboration (parallel fusion of multiple source features), with the MLP and LSTM / GRU processing different types of input features (static features vs. temporal features) in parallel, and then integrating their outputs through a fusion layer to achieve joint decision-making. This is suitable for scenarios where static and temporal features are equally important (such as "the intensity of pollution sources around the sampling point + real-time indicator fluctuations" jointly determine the anomaly level).
[0086] Step 6: System evaluation and optimization. This step corresponds to the partial evaluation and continuous monitoring of steps S1 and S5 in the aforementioned embodiment. The system regularly uses the test set to verify the model performance, analyzes the classification performance of the model on the test set, and evaluates the accuracy and reliability. The system manages the multivariate correlation data set that has been manually checked and verified through the pollution event management module, and uses this data to retrain and improve the MLP, LSTM / GRU model as described in step S5, to achieve continuous optimization of the model and improvement of system performance. The daily operation of the system follows the step process of steps S1-S5, forming a closed loop of continuous monitoring, analysis, response and optimization.
[0087] The rapid tracing system for watershed water environment monitoring and emergency pollution provided in this embodiment can perform any combination of the steps in the above method. There is no strict order between the steps performed in this system, and they can be combined and adjusted as needed. For example, the equipment system loads the fluorescence excitation-emission matrix (EEM) spectral data and environmental characteristics of the verification mark through the data processing module, calculates the grid regional integral (FRI) features through the calculate grid integrals function, fuses the FRI features with the environmental features into a 225-dimensional feature vector, performs Standard Scaler standardization and SMOTE oversampling processing, and finally uses the trained improved multi-layer perceptron (MLP) model to achieve high-precision 5-category classification of the source of water samples in the classification and anomaly monitoring module, and combines the fusion model output results in the tracing and prediction module to provide support for pollution tracing.
[0088] The aforementioned embodiments of the present invention, through real-time and time-sharing data collection for water pollution detection, multi-parameter collaborative monitoring, and AI-driven pollution identification algorithm models, achieve efficient and accurate water sample and pollutant classification and pollution source tracing, balancing both routine monitoring and emergency response needs. The system operates stably, efficiently, covers a wide range, and has low operating costs, making it widely applicable and of great significance for the protection and sustainable development of water environments in large river basins. For example, in emergency monitoring for sudden leaks, the system focuses on analyzing sensor data such as pH, conductivity, and heavy metal concentrations. When abnormal indicators are detected, an alarm is triggered, quickly locating the contaminated area. The spread is predicted by combining flow rate data, allowing for rapid decision-making regarding emergency response and environmental enforcement. In drinking water source early warning monitoring, sensors such as DO, residual chlorine, and turbidity are used to monitor water sources in real time. When abnormal indicators are detected (e.g., DO fluctuations caused by algae blooms), an alarm is triggered, quickly locating the abnormal area, and the spread is predicted by combining flow rate data, allowing for rapid decision-making regarding emergency response and environmental enforcement.
[0089] It should be noted that in other embodiments of the present invention, other different schemes obtained by making specific selections within the scope of the steps, instruments, algorithms, models, process parameters and conditions recorded in the present invention can all achieve the technical effects recorded in the present invention, so the present invention will no longer list them one by one.
[0090] The above description is merely a preferred embodiment of the present invention and does not constitute any form of limitation to the present invention. Any person skilled in the art can utilize the methods and technical contents disclosed above to make many possible variations and modifications to the technical solutions of the present invention without departing from the scope of the technical solutions of the present invention, or modify them into equivalent embodiments with equivalent variations. All equivalent variations made based on the components, proportions, and processes of the present invention are intended to be covered by the scope of protection of the present invention.
Claims
1. A method for rapid source tracing of water environment monitoring and emergency pollution based on water pollution detection, characterized in that: It is based on water quality pollution detection, multi-source data collection and artificial intelligence model fusion analysis to conduct rapid tracing of watershed water environment monitoring and emergency pollution, including the following steps: first, build a multi-parameter collaborative monitoring model, including a multi-layer perceptron MLP model and an LSTM / GRU model, and train and deploy it; then, through distributed sampling points and sampling stations, collect real-time data and time-sharing data of watershed water environment and water quality pollution detection with verification marks, and use AI-driven pollution identification MLP model and LSTM / GRU model, combined with batch normalization, Dropout and SMOTE oversampling technology, to fuse EEM spectral data and environmental characteristics, and fuse and analyze multi-source heterogeneous data; then, according to preset conditions, automatically identify whether an emergency pollution incident occurs. If it is preliminarily determined that an emergency pollution incident has occurred, the pollution type judgment, tracing, and cross-validation are initiated, and the pollution type and tracing results of water environment monitoring and emergency pollution are automatically output, which are further verified by manual verification and environmental law enforcement verification to complete the monitoring of watershed water environment pollution status and rapid tracing and tracing of emergency pollution.
2. The method for rapid source tracing of water environment monitoring and emergency pollution based on water pollution detection according to claim 1 is characterized in that: The specific steps include: S1. Construct a multi-parameter collaborative monitoring model Build, train, and deploy multi-layer perceptron (MLP) models and LSTM / GRU models for multi-parameter collaborative monitoring. Build a multi-parameter collaborative monitoring system covering the entire watershed water environment area for real-time water pollution monitoring and emergency pollution rapid tracing, a multi-layer perceptron (MLP) model, and an LSTM / GRU model. This system also imports environmental characteristics, pollutants, and pollution source information for key node grids in the entire watershed water environment area. Use known historical data sets to train the constructed multi-layer perceptron (MLP) model and LSTM / GRU model, adjust and optimize the model parameters to improve classification and traceability performance; Deploy the trained multi-layer perceptron (MLP) model and LSTM / GRU model to the network server; S2. Collect water body data Set up on-site sampling points and sampling stations within the key node grids of the watershed to collect water quality pollution detection and water environment data in the watershed, and add verification tags such as data collection device ID, GIS and timestamps, encryption information and non-tamperable identifiers to the data; Sensors at on-site sampling points automatically collect water data in real time, obtaining GIS, time, flow rate, color, and transparency information of the water body, and obtaining real-time data sets for water pollution detection. After adding verification tags, they are transmitted to the network server; The sampling instrument at the sampling station collects samples regularly or irregularly, tests the water samples, and obtains data including the time, location, environmental characteristics and fluorescence excitation-emission matrix (EEM) spectrum data of the water samples, obtains a time-sharing data set for water pollution detection, adds a verification mark, and transmits it to the network server; S3, data feature extraction and preprocessing Construct a multivariate correlation dataset. After analyzing and processing the real-time and time-sharing data sets of water pollution detection at key node grids within the watershed, a multivariate correlation dataset with verification tags is constructed. The correlation parameters include: device ID, time, location, pollutant type, pollution source, and verification tag. Feature extraction and preprocessing are then performed. S4. Model operation for abnormal monitoring The LSTM / GRU model is combined with the multi-layer perceptron (MLP) model to conduct real-time classification and indicator anomaly monitoring on the real-time data of on-site sampling points using a conventional monitoring mode. If an indicator anomaly is found, the system switches to emergency monitoring mode, simultaneously initiates cross-validation and pollution source tracing mechanisms, and simultaneously initiates sampling at downstream sampling points and sampling stations. The real-time data group and the time-sharing data group are then compared, analyzed, and cross-validated to determine whether a water emergency pollution incident has occurred. If a water emergency pollution incident has occurred, the pollutants are further classified, and a preliminary judgment and output of the pollution source and predicted diffusion range are made. The information is then handed over to manual verification and processing, and environmental law enforcement verification is carried out. The manual verification results are then entered into the network server. S5. Model update and continuous monitoring Using the multivariate correlation data set that has been verified by environmental law enforcement, the multilayer perceptron MLP model and LSTM / GRU model are trained again, and the new model is deployed to the network server for operation. Steps S2-S4 are repeated to analyze and process the real-time data group and the time-sharing data group, and the monitoring results are output.
3. The method for rapid source tracing of water environment monitoring and emergency pollution based on water pollution detection according to claim 2 is characterized in that: The step S1 constructs a multi-layer perceptron MLP model, specifically comprising the following steps: S1-1 Model construction: Using the PyTorch framework, a multi-layer perceptron (MLP) model for water pollution was constructed with a total parameter count of no less than 1.5M. The MLP model architecture includes an input layer, multiple hidden layers, and a classification layer. The hidden layers include linear transformation layer, batch normalization layer: ReLU activation function and Dropout layer; The classification layer outputs 5 categories of water sample classification probabilities, corresponding to the five types of water sample sources; S1-2 Model Training: Use a known historical dataset to train a multi-layer perceptron (MLP) model. A weighted cross-entropy loss function is used, with weights calculated as the inverse of the number of class samples to balance the influence of the minority class. The Adam optimizer is used, with the learning rate scheduler set to Lambda LR or Cosine Annealing LR. An early stopping mechanism is introduced to stop training based on validation loss. Model parameters are adjusted and optimized to improve classification and traceability performance. S1-3 Model Evaluation and Pollution Source Traceability Verification: Evaluate model performance on the test set, use ClassificationReport to calculate accuracy, precision, recall, and F1 score, and plot a confusion matrix to analyze classification results; use RandomForest Classifier to calculate feature importance using feature importances and identify key features; based on the classification results and feature importance, infer the source of pollution, generate a traceability report, and then verify the accuracy of the report; The classification results of water pollution detection are compared with known actual source categories to analyze the classification accuracy and pollution traceability, including: calculating the accuracy, precision, recall and F1 score on the test set; generating a confusion matrix to analyze the misclassification between categories; using a random forest model to evaluate feature importance and identify the environmental and spectral features that contribute most to the classification.
4. The method for rapid source tracing of water environment monitoring and emergency pollution based on water pollution detection according to claim 3 is characterized in that: The model training step S1-2 specifically includes the following steps: The constructed model is trained using known historical datasets, including: S1-2-1 divides the dataset into training, validation, and test sets in a ratio of 8:1:1, and uses stratified sampling to ensure consistent proportions of each category; S1-2-2 uses SMOTE technology to oversample the minority classes in the training set, setting k neighbors = 3, and generating synthetic samples to balance the class distribution; S1-2-3 uses the Standard Scaler to standardize the 225-dimensional feature vector to a mean of 0 and a variance of 1. A weighted cross-entropy loss function is used, where the weight is calculated based on the inverse of the number of class samples. Training is performed using the Adam optimizer with an initial learning rate of 0.0005 and a weight decay of 0.0001. S1-2-4 sets the Cosine Annealing LR or Lambda LR learning rate scheduling strategy, combined with the early stopping mechanism and a patience value of 10 to prevent overfitting.
5. The method for rapid source tracing of water environment monitoring and emergency pollution based on water pollution detection according to claim 2 is characterized in that: The step S2 of collecting water body data specifically includes the following steps: S2-1 Set up on-site sampling points and sampling stations within the key node grid of the watershed First, the watershed is divided into equal-area grids based on the digital elevation model (DEM). Each grid contains at least one representative sampling point. Kriging interpolation is then used to analyze the spatial distribution of water quality parameters to ensure that the sampling points reflect the mean water quality within the grid and avoid data bias caused by insufficient points. The second is to set up on-site sampling points at key nodes of water quality changes According to the hydrological and hydrodynamic characteristics, taking into account the flow morphology and pollutant diffusion law, tide and runoff periodicity, sampling points are set in areas with turbulent water flow, slow flow areas, and where the water flow state suddenly changes; Third, on-site sampling points and sampling stations should be set up around both fixed and mobile pollution sources, with a focus on fixed sources such as industrial wastewater discharge outlets, urban sewage treatment plant outlets, and farmland drainage outlets, as well as areas with high ship traffic, to ensure that pollution sources are directly monitored. Fourth, we should increase the number of monitoring points based on environmentally sensitive areas and risk hotspots. We should increase the number of monitoring points in sensitive areas such as drinking water source protection areas, nature reserves, and aquaculture areas, and make areas with a high incidence of historical pollution incidents the focus of long-term monitoring. S2-2 On-site sampling points to collect water pollution and water environment data in the basin Collect water environment data of the river basin and add verification marks such as data collection device ID, GIS and timestamp, encryption information and non-tamperable identifier to the data; Among them, sensors at on-site sampling points automatically collect water data in real time, obtaining information on the water body's GIS, time, flow rate, color, turbidity, pH, conductivity, DO, residual chlorine, and heavy metal pollutant concentrations, obtaining a real-time data set of water pollution, adding verification tags and transmitting it to the network server; S2-3 sampling station collects water environment data of the basin The sampling station's sampling instruments perform regular sampling and water quality pollution testing in conventional monitoring mode. In emergency monitoring mode, sampling is performed irregularly, and sampling and water quality pollution testing can be started at any time. The sampling station obtains the environmental characteristics of the water samples and fluorescence excitation-emission matrix (EEM) spectral data through water sample collection and data analysis, specifically: S2-3-1 collects water samples and records environmental characteristics, including latitude and longitude, parameters related to industrial activities, and river type; uses a fluorescence spectrophotometer to collect EEM spectral data of the water samples, with an excitation wavelength range of 250-500 nm, an emission wavelength range of 250-500 nm, and a step size of 5 nm, to generate a 52×52 fluorescence intensity matrix; S2-3-2 fuses the environmental features with the EEM spectral features after grid-integrated FRI processing to generate a 225-dimensional feature vector, of which the environmental features account for 56 dimensions and the FRI spectral features account for 169 dimensions; S2-3-3 will obtain a time-sharing data set including the time, location, environmental characteristics and fluorescence excitation-emission matrix EEM spectrum data of the water sample, add a verification mark and transmit it to the network server.
6. The method for rapid source tracing of water environment monitoring and emergency pollution based on water pollution detection according to claim 2 is characterized in that: The step S3 data feature extraction and preprocessing specifically includes the following steps: S3-1 Constructing a multivariate correlation dataset After analyzing and processing the real-time and time-sharing data sets of water pollution classification within each key node grid in the watershed, a multivariate correlation dataset with verification tags was constructed. The correlation parameters include: equipment ID-time-location-pollutant type-pollution source-verification tag; S3-2 Feature extraction and preprocessing Data fusion and preprocessing were performed, and the EEM spectral data were grid-integrated, followed by horizontal splicing of FRI features and environmental features. Data standardization: sklearn preprocessing Label Encoder was used to convert water sample source labels into integer labels. S3-3 Feature Importance Analysis: Use the feature importances property of the Random Forest Classifier to identify the dominant features in the data.
7. The method for rapid source tracing of water environment monitoring and emergency pollution based on water pollution detection according to claim 2 is characterized in that: The step S4 model runs to perform abnormal monitoring, specifically including the following steps: S4-1 uses the LSTM / GRU model to monitor real-time water pollution data at on-site sampling points in a conventional monitoring mode, performing real-time classification and monitoring for abnormal indicators. If an abnormal indicator is found, it switches to emergency monitoring mode, simultaneously activating cross-validation and pollution source tracing mechanisms, and simultaneously initiating sampling at downstream sampling points and sampling stations. S4-2 uses a multi-layer perceptron (MLP) model to classify and trace the pollutants of water pollution, and conducts comparative analysis and cross-validation on real-time data groups and time-sharing data groups, and makes multi-parameter collaborative judgments to determine whether a water emergency pollution incident has occurred. If a water emergency pollution incident has occurred, the pollutants will be further classified, and a preliminary judgment and output of the pollution source and predicted diffusion range will be made, and the information will be handed over to manual verification and processing for environmental law enforcement verification, and the manual verification results will be entered into the network server.
8. The method for rapid source tracing of water environment monitoring and emergency pollution based on water pollution detection according to claim 2 is characterized in that: The step S5 of model updating and continuous monitoring specifically includes the following steps: S5-1 uses the multivariate correlation dataset verified by environmental law enforcement and the newly obtained multivariate correlation dataset during operation to retrain the multilayer perceptron model and deploy the new model to the network server for operation; S5-2 repeats steps S2-S4, analyzes and processes the real-time data group and the time-sharing data group, and outputs the monitoring results.
9. A watershed water environment monitoring and emergency pollution rapid tracing system based on water pollution detection, characterized by: It is used to implement the rapid source tracing method for watershed water environment monitoring and emergency pollution according to any one of claims 1 to 8, comprising: Multiple distributed sampling points and sampling stations connected to each other through a network server and management terminal; Management terminal, used for input and output operations; Multiple distributed sampling points are deployed at key nodes in the watershed to perform fixed-point and timed sampling of water pollution, collect real-time water pollution and environmental characteristic data, and upload them to the network server; Multiple distributed sampling stations are deployed at key monitoring nodes in the watershed to collect EEM spectrum data and environmental characteristics of water pollution regularly or irregularly, and upload them to the network server; The network server is used to receive monitoring data, analyze and process it, and output the processing results. It has a built-in rapid tracing program for watershed water environment monitoring and emergency pollution. The program includes the following modules: The monitoring site management module is used to connect and manage the distributed on-site sampling points and sampling stations, and receive the real-time data sets sent back by the on-site sampling points and the time-sharing data sets sent back by the sampling stations; The data processing module is used to process real-time and time-sharing data sets, construct multivariate correlation datasets, and partition known multivariate correlation datasets for model training. This module calculates the grid region integral (FRI) of spectral data using the calculate grid integrals function, fuses multidimensional features, and performs normalization and SMOTE oversampling. Classification and anomaly monitoring module: Using the trained multi-layer perceptron (MLP) model and LSTM / GRU model, the module uses a conventional monitoring mode to conduct real-time classification and indicator anomaly monitoring on the real-time data of on-site sampling points. If an abnormal water pollution indicator is found, the module switches to emergency monitoring mode, simultaneously activates cross-validation and pollution source tracing mechanisms, and simultaneously initiates sampling at downstream sampling points and sampling stations. The real-time data group and the time-sharing data group are then compared, analyzed, and cross-validated to determine whether an emergency water pollution incident has occurred. Source tracing and prediction module: used to further process data that the model initially determines to be a water emergency pollution incident, locate and classify pollutants, and preliminarily determine and output pollution sources and predict the spread range; The notification and visualization display module is used to output monitoring data analysis results, including routine monitoring information, emergency pollution incident alarm information, pollutant classification and location, pollution sources, and predicted diffusion range information; Pollution monitoring and law enforcement management module: Law enforcement personnel conduct manual verification based on the output monitoring data analysis results, and enter the manual verification result data into the network server.
10. The watershed water environment monitoring and emergency pollution rapid tracing system based on water pollution detection according to claim 9 is characterized in that: The classification and anomaly monitoring module uses the LSTM / GRU model and the MLP model to pre-learn the classification data of uncontaminated water bodies, and then combines it with the classification function of the MLP model to complete the task. When the MLP model classifies water samples, if the classification results deviate from the preset threshold, including an increase in the probability of an abnormal category, an abnormal alarm is triggered. The traceability and prediction module analyzes water samples by integrating a pollution traceability model based on environmental characteristics and three-dimensional fluorescence, verifies the results through a calculation verification model, and outputs the traceability analysis results. Upon detecting an anomaly, the system immediately activates emergency response mode, using multi-parameter sensor data and flow rate data to quickly locate the pollution source and predict the spread range. Information notifications in the notification and visualization display module include information prompting law enforcement personnel to conduct on-site source tracing and evidence collection based on the traceability analysis results. In the event of an emergency pollution incident, the system automatically sends an alert to relevant law enforcement personnel or departments, including information on the pollution source location and pollutant type, to guide on-site evidence collection and emergency response. The visualization content includes: environmental characteristics, FRI feature heat map, training history curve, confusion matrix and FRI box plot; The pollution monitoring and law enforcement management module specifically manages various types of pollution incidents. It is connected to the notification and visualization display module to archive pollution incident management and perform statistical analysis to generate log files. The log files are used to record the classification reports, confusion matrices, and feature importance analysis corresponding to various types of pollution incidents, providing data support for environmental pollution incident management and environmental law enforcement.
Citation Information
Patent Citations
Water pollution accurate tracing method based on neural network model
CN118425458A
Surface water ICM concentration prediction method and system based on machine learning
CN118430684A
Urban water environment small-scale traceability method based on multi-layer sensor model
CN118098442A
Water pollution abnormity traceability detection method and system
CN118566455A
Water pollution traceability analysis method and system based on multi-dimensional data fusion analysis
CN118883880A
Cited By
Method and system for processing multi-source heterogeneous environmental monitoring data
CN121682141A
Water quality multi-parameter prediction method and system based on image recognition
CN121767743A
Low-voltage power supply environment noise traceability edge calculation method and system
CN121980368A
External water positioning method and system for pipe network pollution coupling inversion based on conductivity
CN122021072A
Water quality anomaly tracing method and system based on water quality fluorescence fingerprint
CN122385569A