A method and system for tracing the source of multi-point source pollution of surface water

By forming a pollutant label library through deep learning algorithms and cluster analysis, the problems of insufficient accuracy and efficiency of surface water pollution source tracing technology are solved, and rapid and accurate pollution source identification and control strategy support are achieved.

CN120217089BActive Publication Date: 2025-09-26SUN YAT SEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510284877.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-11
Publication Date
2025-09-26
Estimated Expiration
2045-03-11

AI Technical Summary

Technical Problem

Existing surface water pollution tracing technology lacks accuracy and efficiency, and cannot meet the needs of environmental protection and water resources management.

Method used

Deep learning algorithms are used to conduct in-depth learning and classification calibration of historical pollution source data to form a pollutant label library and knowledge base. Cluster analysis is combined to segment and label pollution events, and deep learning models are used to quickly identify pollution types and locations.

Benefits of technology

It improves the accuracy and efficiency of pollution source identification, can quickly identify new pollution incidents, reduce misjudgments and missed judgments, and provides a valuable basis for pollution prevention and control strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120217089B_ABST
    Figure CN120217089B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention relates to the field of pollution source tracing technology and discloses a method for tracing the source of multi-point source pollution of surface water, comprising: preprocessing water quality time series data and environmental parameter information; extracting features from the preprocessed water quality time series data to obtain key water quality features; inputting the key water quality features into a pre-built deep learning model for identification to obtain corresponding pollution identification results, wherein the deep learning model includes a time series processing module, which is used to process the water quality time series features in the key water quality features; and outputting corresponding pollution identification results, which include pollution type information, pollution source location information, and confidence information. It uses a deep learning algorithm to conduct in-depth learning and classification calibration of historical pollution source data to form a pollutant label library and knowledge base, providing support for the rapid identification of new pollution events.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of pollution source tracing, and in particular to a method and system for tracing the source of multi-point source pollution of surface water. Background Art

[0002] Current water quality monitoring and pollution source tracing technologies suffer from inaccuracies and low efficiency. Traditional surface water pollution source tracing technologies have numerous shortcomings in monitoring methods, tracing methods, data processing and analysis capabilities, emergency response mechanisms, and costs, making them inadequate for meeting current environmental protection and water resource management needs. Possible approaches or solutions to address these shortcomings include: First, increasing the number and distribution of fixed monitoring stations to improve monitoring coverage, but this approach may be limited by factors such as cost, terrain, and weather. Second, adopting more advanced chemical analysis techniques or instrumentation to improve the precision and accuracy of tracing, but this approach can be costly and technically complex. Third, strengthening data processing and analysis capabilities, integrating data from different sources, and improving tracing efficiency, however, requires specialized data processing tools and methods, as well as cross-departmental data sharing and collaboration mechanisms. Fourth, establishing a more comprehensive emergency response mechanism and strengthening interdepartmental communication and coordination to improve tracing and remediation effectiveness, but this requires the support and cooperation of the government and relevant departments. However, these approaches or solutions often only address part of the problem and come with numerous limitations and challenges. Summary of the Invention

[0003] In response to the above-mentioned defects, an embodiment of the present invention discloses a method for tracing the source of multi-point source pollution of surface water, which can quickly identify new pollution incidents and improve the efficiency of pollution tracing.

[0004] A first aspect of an embodiment of the present invention discloses a method for tracing the source of multi-point source pollution of surface water, comprising:

[0005] When it is detected that the traceability trigger condition is met, the water quality time series data and environmental parameter information of the corresponding monitoring point within the set time range are obtained, and the water quality time series data and environmental parameter information are preprocessed;

[0006] Performing feature extraction on the pre-processed water quality time series data to obtain key water quality features, wherein the key water quality features include water quality statistical features, water quality time series features, and water quality frequency domain features;

[0007] Inputting the key water quality features into a pre-built deep learning model for identification to obtain corresponding pollution identification results, wherein the deep learning model includes a time series processing module, and the time series processing module is used to process the water quality time series features in the key water quality features;

[0008] The corresponding pollution identification result is output, and the pollution identification result includes pollution type information, pollution source location information and confidence information.

[0009] As an optional implementation manner, in the first aspect of the embodiment of the present invention, after extracting features from the preprocessed water quality time series data to obtain key water quality features, the method further includes:

[0010] The pollution event features in the knowledge base pre-constructed according to the water quality statistical features, water quality time series features and water quality frequency domain features are matched to obtain a model parameter set associated with the current pollution event, and the model parameters in the deep learning model are updated according to the model parameter set; wherein, the knowledge base includes a pollutant label library and a model parameter library, the pollutant label library includes historical pollution type labels and pollution feature descriptions; the model parameter library includes optimal model parameters corresponding to different pollution types.

[0011] As an optional implementation, in the first aspect of the embodiment of the present invention, the pollutant label library is determined by the following steps:

[0012] Acquiring a historical pollution data set, the historical pollution data set including historical pollution events, historical water quality time series data, and historical environmental parameters, and preprocessing the historical pollution data set;

[0013] Performing feature extraction on the pre-processed historical pollution data to obtain historical key features, and performing dimensionality reduction processing on the historical key features using the PCA algorithm or the t-SNA algorithm to obtain dimensionality reduction key features whose contribution rate exceeds the set contribution rate;

[0014] Dividing the historical pollution dataset into a plurality of clusters and taking the dimensionality reduction key features as input;

[0015] Randomly select a data point in the historical pollution data set as the first cluster center, and select subsequent cluster centers according to the maximum distance principle;

[0016] For each data point, calculate its distance from each cluster center and assign it to the cluster represented by the cluster center closest to it; for each cluster, calculate the mean of all data points in the cluster and use it as the new cluster center;

[0017] Continuously update the cluster assignment and cluster center of the data points until the change in the cluster center is less than a certain threshold or reaches the preset number of iterations, then clustering is completed;

[0018] After clustering is completed, statistics are calculated for each cluster to determine the cluster characteristics, and the cluster characteristics are defined according to the set label rules to determine the historical pollution type labels and pollution feature descriptions, and saved to the pollutant label library.

[0019] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the deep learning model is constructed by the following steps:

[0020] Obtain a historical contamination training set, and construct a three-dimensional input tensor based on the historical contamination training set, wherein the three-dimensional input tensor includes the number of samples, time steps, and feature dimensions;

[0021] Input the three-dimensional input tensor into a pre-built initial deep learning model for training until the set training requirements are met, wherein the initial deep learning model includes an input layer, a first LSTM layer, a Dropout layer, a second LSTM layer, a Dense layer, and an output layer connected in sequence; if the model output is a classification task, a cross entropy loss function is used as the loss function; if the model output is a regression task, a mean square error loss function is selected as the loss function;

[0022] The hyperparameter combination with the best performance is saved as the optimal parameters of the model to obtain a deep learning model.

[0023] As an optional implementation, in the first aspect of the embodiment of the present invention, obtaining a historical contamination training set and constructing a three-dimensional input tensor based on the historical contamination training set includes:

[0024] Obtain a historical pollution training set, and perform SMOTE oversampling processing on data in the historical pollution training set whose corresponding pollution type data is less than a set value, wherein the historical pollution training set includes training pollution events, training water quality time series data, and training environmental parameters;

[0025] Preprocessing the historical pollution training set, wherein the preprocessing includes missing value processing, spatial interpolation and noise filtering;

[0026] Performing feature extraction on the pre-processed historical pollution training to obtain key training features, and performing dimensionality reduction processing on the key training features using a PCA algorithm or a t-SNA algorithm to obtain dimensionality reduction training features whose contribution rate exceeds a set contribution rate;

[0027] constructing a three-dimensional input tensor based on the dimensionality reduction training features;

[0028] And / or, after inputting the three-dimensional input tensor into a pre-built initial deep learning model for training until set training requirements are met, further comprising:

[0029] For each sample, the SHAP algorithm traverses all possible feature combinations to calculate the impact of each feature added to the feature combination on the model output; wherein the SHAP algorithm includes a Monte Carlo simulation algorithm or a Kernel SHAP algorithm;

[0030] Calculate the Shapley value of each feature based on its impact on the model output;

[0031] Sort the Shapley values ​​of all features by absolute value to obtain the global feature importance, and output the global feature importance;

[0032] And / or, the tracing trigger condition is satisfied, including: obtaining water quality indicators of each station in the monitoring area. If the water quality indicators obtained at the corresponding station in the monitoring area exceed the set water quality parameters, the tracing trigger condition is satisfied.

[0033] As an optional implementation manner, in the first aspect of the embodiment of the present invention, after outputting the corresponding pollution identification result, the method further includes: if the confidence information is less than a set confidence parameter, executing the next step;

[0034] Obtain pollution monitoring data of corresponding monitoring points within a set time range, wherein the pollution monitoring data includes water quality time series data and environmental parameter information;

[0035] Constructing a water quality evolution model, wherein the water quality evolution model includes an analytical solution of a permanganate index pollution control equation, an analytical solution of an ammonia nitrogen pollution control equation, an analytical solution of a total phosphorus pollution control equation, and an analytical solution of a dissolved oxygen pollution control equation;

[0036] Determine an n×3 matrix as the population, where n is the population size. Each population individual contains the emission location, total emission amount, and emission time. According to the pre-set parameter value range, randomly generate values ​​and fill them into the population matrix to form the initial population;

[0037] Define the fitness function and calculate the sum of squares of the relative errors between the theoretical concentration and the actual monitoring concentration of each individual at all monitoring points and monitoring times. The fitness function is:

[0038]

[0039] Among them, N s is the number of pollution sources, N r is the number of monitoring points, N t is the number of monitoring times, i is the population individual, j is the monitoring moment, is the theoretical pollutant concentration value generated by pollution source k at time j and monitoring point i. The pollution discharge characteristics of pollution source k are (M j ,X j ,Tj ); is the monitoring concentration information at monitoring point i at time j;

[0040] The fitness function result is calculated, and the individual with the smaller relative sum of squared errors is determined as the optimal solution and retained. The above screening, evaluation and optimization process is repeated until the preset number of iterations is reached or the fitness function result meets the stopping condition;

[0041] The optimal parameter value corresponding to the optimal individual is output, and the optimal parameter value is the inversion result of the pollution source, and the optimal parameter value includes the emission location, the total emission amount and the emission time.

[0042] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the analytical solution of the permanganate index pollution control equation includes:

[0043]

[0044] in, is the mass of pollutants released at the ith instant, X i is the i-th pollution location, T i is the initial emission moment of the i-th pollution source, A is the average cross-sectional area of ​​the target river section, D x is the longitudinal diffusion coefficient of pollutants, u is the average flow velocity of the target river section, is the pollutant attenuation coefficient, K DO is the half-saturation constant of dissolved oxygen, C DO ( t ) is C at time t DO concentration, is at position x and time t concentration;

[0045] The analytical solution of the ammonia nitrogen pollution control equation includes:

[0046]

[0047]

[0048]

[0049] in, is the mass of pollutants released at the ith instant, X i is the i-th pollution location, T i is the initial emission moment of the i-th pollution source, A is the average cross-sectional area of ​​the target river section, D xis the longitudinal diffusion coefficient of pollutants, u is the average flow velocity of the target river section, K1 is the rate constant of ammonia nitrogen oxidation to nitrite, K2 is the rate constant of nitrite oxidation to nitrate, and τ is an integral variable, which represents the initial emission time T from the pollution source. i To a certain time point between the current time t, which is used to calculate in this time period, by Transformed The total amount; τ1, τ2 are integral variables, τ1 represents the initial emission time T from the pollution source i to a certain time point between T and the current time t, and τ2 represents the time period from T i to another time point between τ and τ1. These two variables are used together to calculate First convert to Then by Convert to the total amount;

[0050] The analytical solution of the total phosphorus pollution control equation includes:

[0051]

[0052] in, is the mass of pollutants released at the ith instant, X i is the i-th pollution location, T i is the initial emission moment of the i-th pollution source, Q k (τ) is the emission rate of the kth external phosphorus source, X ext,k is the emission position of the kth external phosphorus source, τ is the initial emission time of the kth external phosphorus source, and the integral interval [τ start,k , τ end,k ] represents the discharge period of the kth external phosphorus source, A is the average cross-sectional area of ​​the target river section, D x is the longitudinal diffusion coefficient of pollutants, u is the average flow velocity of the target river section, K TP is the phosphorus decay rate constant, K r is the sediment release rate constant of phosphorus, K ext,k is the decay rate constant of the kth external phosphorus source;

[0053] The analytical solution of the dissolved oxygen pollution control equation includes:

[0054]

[0055] in, is the mass of pollutants released at the ith instant, X i is the i-th pollution location, T i is the initial emission moment of the i-th pollution source, A is the average cross-sectional area of ​​the target river section, D xis the longitudinal diffusion coefficient of pollutants, u is the average flow velocity of the target river section, K p is the photosynthesis rate constant, K re is the respiration rate constant, and Chla is the chlorophyll a concentration.

[0056] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the method for tracing the source of pollution further includes:

[0057] Obtain the current status of the monitoring device, which includes device location information, environmental parameter information, and current concentration information;

[0058] Based on the current state of the monitoring device, the pollution concentration at the current location is calculated using a pollution diffusion model. The device location and concentration data are spliced ​​into a state vector, and the state vector is input into a reinforcement learning model for recognition to obtain an updated device location and an updated detection time.

[0059] The distance between the new device location and the pollution source and the energy consumption of the action are determined based on the updated device location and the updated detection time, and the reward value is calculated according to the reward formula; if the reward satisfies the termination condition, the corresponding dynamic pollution source information is output.

[0060] A second aspect of an embodiment of the present invention discloses a system for tracing the source of multi-point source pollution of surface water, comprising:

[0061] Acquisition module: used to obtain water quality time series data and environmental parameter information of the corresponding monitoring point within a set time range when it is detected that the traceability trigger condition is met, and pre-process the water quality time series data and environmental parameter information;

[0062] Feature extraction module: used to extract features from pre-processed water quality time series data to obtain key water quality features, including water quality statistical features, water quality time series features and water quality frequency domain features;

[0063] Identification module: used to input the key water quality features into a pre-built deep learning model for identification to obtain corresponding pollution identification results, wherein the deep learning model includes a time series processing module, which is used to process the water quality time series features in the key water quality features;

[0064] Output module: used to output corresponding pollution identification results, which include pollution type information, pollution source location information and confidence information.

[0065] The third aspect of an embodiment of the present invention discloses an electronic device, comprising: a memory storing executable program code; a processor coupled to the memory; the processor calls the executable program code stored in the memory to execute the method for tracing multi-point source pollution of surface water disclosed in the first aspect of an embodiment of the present invention.

[0066] A fourth aspect of an embodiment of the present invention discloses a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the method for tracing the source of multi-point source pollution of surface water disclosed in the first aspect of an embodiment of the present invention.

[0067] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0068] The surface water multi-source pollution tracing method in this embodiment uses a deep learning algorithm to deeply study and classify historical pollution source data, forming a pollutant label library and knowledge base to support the rapid identification of new pollution incidents. Using cluster analysis to segment and label pollution incidents helps to more precisely capture the differences in pollution incidents and improve the accuracy and efficiency of pollution source identification. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0070] Figure 1 It is a flow chart of a method for tracing the source of multi-point source pollution of surface water disclosed in an embodiment of the present invention;

[0071] Figure 2 This is a schematic diagram of the process of pollution label clustering processing disclosed in an embodiment of the present invention;

[0072] Figure 3 It is a schematic diagram of the process of constructing the deep learning model disclosed in the embodiment of the present invention;

[0073] Figure 4 This is a schematic diagram of the process of pollution source inversion calculation disclosed in an embodiment of the present invention;

[0074] Figure 5 This is a diagram of an optimized monitoring equipment layout scheme disclosed in an embodiment of the present invention;

[0075] Figure 6 is a flow chart of pollution event determination disclosed in an embodiment of the present invention;

[0076] Figure 7This is an example diagram of pollution event judgment disclosed in an embodiment of the present invention;

[0077] Figure 8 This is a schematic diagram of the structure of a system for tracing multi-point source pollution of surface water provided by an embodiment of the present invention;

[0078] Figure 9 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0079] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0080] It should be noted that the terms "first," "second," "third," "fourth," etc. in the description and claims of the present invention are used to distinguish different objects rather than to describe a specific order. The terms "including" and "having," as well as any variations thereof, in the embodiments of the present invention, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such process, method, product, or apparatus.

[0081] Current water quality monitoring and pollution source tracing technologies suffer from inaccuracy and low efficiency. Traditional surface water pollution tracing technologies have many deficiencies in monitoring methods, tracing methods, data processing and analysis capabilities, emergency response mechanisms, and costs, making it difficult to meet the current needs of environmental protection and water resource management. Based on this, an embodiment of the present invention discloses a method, system, electronic device, and storage medium for tracing surface water multi-point source pollution, which uses a deep learning algorithm to conduct in-depth learning and classification calibration of historical pollution source data to form a pollutant label library and knowledge base to provide support for the rapid identification of new pollution events. Using cluster analysis to segment and label pollution events helps to more finely capture the differences in pollution events and improve the accuracy and efficiency of pollution source identification.

[0082] Example 1

[0083] See also Figure 1 , Figure 1It is a flow chart of the method for tracing the source of multi-point source pollution of surface water disclosed in the embodiment of the present invention. Among them, the execution subject of the method described in the embodiment of the present invention is an execution subject composed of software and / or hardware, and the execution subject can receive relevant information by wired or / and wireless means, and can send certain instructions. Of course, it can also have certain processing functions and storage functions. The execution subject can control multiple devices, such as a remote physical server or cloud server and related software, or it can be a local host or server and related software that performs related operations on a device placed somewhere. In some scenarios, multiple storage devices can also be controlled, and the storage devices can be placed in the same place or different places as the devices. For example Figures 1 to 6 As shown, the method for tracing the source of surface water multi-point source pollution includes the following steps:

[0084] S101: When it is detected that the traceability trigger condition is met, the water quality time series data and environmental parameter information of the corresponding monitoring point within a set time range are obtained, and the water quality time series data and environmental parameter information are preprocessed;

[0085] S102: Extracting features from the pre-processed water quality time series data to obtain key water quality features, where the key water quality features include water quality statistical features, water quality time series features, and water quality frequency domain features;

[0086] S103: Inputting the key water quality features into a pre-built deep learning model for identification to obtain corresponding pollution identification results, wherein the deep learning model includes a time series processing module, and the time series processing module is used to process the water quality time series features in the key water quality features;

[0087] S104: Outputting the corresponding pollution identification results, which include pollution type information, pollution source location information, and confidence information. Through automated data collection, processing, and analysis, this embodiment of the present invention can quickly identify pollution types and pollution source locations from large amounts of monitoring data. Compared to traditional manual investigation methods, this significantly shortens pollution source tracing time, improves work efficiency, and enables the implementation of appropriate pollution control and remediation measures in a shorter timeframe.

[0088] The embodiment of the present invention takes into account the multi-dimensional characteristics of water quality and uses a deep learning model for processing, so that the method can better cope with the complexity and uncertainty of multi-point source pollution of surface water. It can handle complex situations such as the mixing of multiple types of pollutants and the discharge of different pollution sources at different times and spaces, accurately identify each pollution source and its contribution, and provide a basis for formulating a comprehensive and effective pollution control strategy. In the process of continuous pollution tracing, a large amount of water quality data, characteristic data, pollution identification results and other information will be accumulated. These data can be further used to improve and optimize the deep learning model and improve the accuracy and reliability of the model. At the same time, it also provides rich data resources and practical experience for subsequent surface water environmental protection and pollution control research, which helps to promote the continuous development and progress of related technologies.

[0089] In the work of tracing the source of multi-point source pollution in surface water, most cases involve the investigation of historical pollution incidents. The traditional inversion tracing method is often complicated to implement because it needs to consider many complex historical environmental factors, the diffusion changes of pollutants in different time periods, etc. It is not only time-consuming and labor-intensive, but also requires extremely high technical and data accuracy. It is prone to deviations and leads to low tracing efficiency. However, this method uses a deep learning model, which has significant advantages when facing this type of historical pollution tracing. With its powerful feature learning and pattern recognition capabilities, the deep learning model is able to deeply mine a large amount of historical water quality time series data and environmental parameter information. By extracting and analyzing water quality statistical characteristics, water quality time series characteristics and water quality frequency domain characteristics, the model can quickly capture characteristic patterns related to different pollution types and pollution source locations. Compared with traditional inversion tracing, there is no need to tediously simulate and calculate the environmental conditions at every moment accurately. For example, when faced with abnormal water quality in a certain area, the deep learning model can directly analyze the massive data accumulated at the monitoring point at that time, quickly provide information on the type of pollution, such as whether it is industrial wastewater pollution, domestic sewage pollution or agricultural non-point source pollution, and roughly determine the location of the pollution source, greatly improving the speed of tracing the source. In actual application scenarios, suppose that a certain river basin monitors water quality deterioration for unknown reasons. If traditional inversion tracing is used, it will take a lot of manpower and material resources to collect and analyze various types of data in different seasons and different hydrological conditions over many years. In addition, due to problems such as missing or inaccurate data, tracing the source is extremely difficult. However, the deep learning model using this method can quickly process this data and quickly identify possible sources and locations of pollution, saving a lot of time for the formulation of subsequent control measures, thereby significantly improving the efficiency and accuracy of historical pollution tracing and effectively overcoming the complexity and limitations of traditional inversion tracing methods.

[0090] More preferably, after extracting features from the pre-processed water quality time series data to obtain key water quality features, the method further includes:

[0091] The pollution event features in the knowledge base pre-constructed according to the water quality statistical features, water quality time series features and water quality frequency domain features are matched to obtain a model parameter set associated with the current pollution event, and the model parameters in the deep learning model are updated according to the model parameter set; wherein, the knowledge base includes a pollutant label library and a model parameter library, the pollutant label library includes historical pollution type labels and pollution feature descriptions; the model parameter library includes optimal model parameters corresponding to different pollution types.

[0092] By matching the currently extracted key water quality features with the pollution event features in the knowledge base, the embodiment of the present invention can find the model parameter set that best suits the current pollution situation and use it to update the deep learning model. This allows the model to better fit the current pollution data, improve the accuracy of identifying pollution types, pollution source locations, etc., and reduce misjudgments and missed judgments. Using the optimal model parameters in an existing knowledge base as a basis for initialization or updating can provide a better starting point for training the deep learning model, reduce the number of training iterations, and accelerate model convergence, thereby improving the efficiency of pollution tracing and obtaining accurate pollution identification results more quickly.

[0093] The knowledge base composed of the pollutant label library and the model parameter library is an accumulation of historical pollution events and the corresponding optimal model parameters. New pollution event data are constantly added to enrich the content of the knowledge base, realize the inheritance of knowledge, avoid the loss of knowledge, and provide valuable information for subsequent pollution tracing and research. The historical pollution type labels and pollution feature descriptions in the pollutant label library enable staff to quickly query and understand the situation of similar pollution events in the past, and provide a reference for the analysis and decision-making of current pollution events. The model parameter library facilitates direct access to the optimal model parameters for different pollution types, improves work efficiency, and reduces duplication of work. The pollutant label library records pollution events from the dimensions of pollution type and feature description, and the model parameter library stores them from the dimension of model parameters. The combination of the two supports multi-dimensional analysis of pollution events, helps to understand pollution problems more comprehensively and deeply, and provides a basis for formulating more effective pollution prevention and control strategies. Such as Figure 7 As shown, it is the specific pollution event judgment result and the corresponding label content.

[0094] More preferably, the pollutant label library is determined by the following steps:

[0095] S100a: Acquire a historical pollution dataset, the historical pollution dataset including historical pollution events, historical water quality time series data, and historical environmental parameters, and preprocess the historical pollution dataset;

[0096] S100b: extracting features from the pre-processed historical pollution data to obtain historical key features, and performing dimensionality reduction processing on the historical key features using a PCA algorithm or a t-SNA algorithm to obtain dimensionality reduction key features whose contribution rate exceeds a set contribution rate;

[0097] S100c: Divide the historical pollution dataset into multiple clusters, and use the dimensionality reduction key features as input; in specific implementation, the multiple clusters here can be configured accordingly according to actual conditions;

[0098] S100d: randomly selecting a data point in the historical pollution data set as the first cluster center, and selecting subsequent cluster centers according to the maximum distance principle;

[0099] S100e: For each data point, calculate its distance to each cluster center and assign it to the cluster represented by the cluster center closest to it; for each cluster, calculate the mean of all data points in the cluster and use it as the new cluster center;

[0100] S100f: Continuously update the cluster assignments and cluster centers of data points until the change in cluster centers is less than a certain threshold or reaches a preset number of iterations, and then clustering is completed;

[0101] S100g: After clustering is completed, internal statistics of each cluster are calculated to determine cluster characteristics, and the cluster characteristics are defined according to the set labeling rules to determine the historical pollution type labels and pollution characteristic descriptions, and saved to the pollutant label library.

[0102] After clustering is complete, the internal statistical characteristics of each cluster are calculated to determine the cluster characteristics. Historical pollution type labels and pollution feature descriptions are then determined based on the defined labeling rules. This allows the clustering results to be converted into meaningful pollution type labels and feature descriptions, making it easier for staff to quickly understand and identify different types of pollution. Saving this information in the pollutant label library effectively stores and manages historical pollution knowledge, providing an important reference for subsequent pollution tracing, analysis, and decision-making. This helps improve the efficiency and accuracy of pollution tracing and supports the development of targeted pollution prevention and control measures.

[0103] The embodiment of the present invention combines mathematical models, uses deep learning algorithms, cluster analysis, and label definition to study historical pollution source data, form a knowledge base, and establish a mathematical model to provide support for the rapid identification of new pollution events. Cluster analysis is performed on pollution source data within 24 hours of each pollution event. Through the clustering algorithm, events with similar pollution characteristics are grouped together to form a pollutant label library. This step helps to identify common pollution patterns in complex data sets and provide a structured data foundation for subsequent analysis. Before cluster analysis and label definition, feature selection and dimensionality reduction are performed to remove redundant features, retain the most critical information for pollution source identification, and reduce computational complexity.

[0104] The number of clustering features mentioned in the embodiment of the present invention can be designed according to actual needs. Since the conditions in different watersheds may be different, the number of clustering features and labels here can be designed according to actual needs.

[0105] During the clustering process, key features such as the concentration of pollutants and the degree of exceeding the standard were taken into consideration, and the events were subdivided into different groups. For example, taking the total phosphorus exceeding the standard as an example, the water was divided into Class IV water (concentration > 0.2 mg / L, ≤ 0.3 mg / L), Class V water (concentration > 0.3 mg / L, ≤ 0.4 mg / L), and Class V-minus water (concentration > 0.4 mg / L) according to the degree of exceeding the standard, so as to more accurately capture the differences in pollution events. Secondly, based on clustering, labels were defined for various types of pollution events. The label definition is based on the similarities and differences between events, and each group of events is given a specific descriptive label. These labels reflect the key characteristics of the pollution event. The label definition not only takes into account the numerical changes of pollutants, but also combines statistical indicators such as the curvature of change, mean, variance, and extreme value difference to ensure the accuracy and comprehensiveness of the label. With the continuous accumulation of manual traceability events, the label library has been continuously enriched and improved, providing a more detailed reference for the subsequent analysis of pollution events.

[0106] During the specific implementation, the adaptability of different genetic algorithms in the tracing tasks of single-point source, double-point source and triple-point source pollution incidents and the subsequent parameter optimization adjustment were explored. Five advanced genetic algorithms were selected for relevant experiments, including Strengthen Elitist GA Algorithm (enhanced elite retention genetic algorithm), Elitist Reservation GA Algorithm (elite retention genetic algorithm), Polysomy Steady State GA Algorithm (multi-chromosome steady-state genetic algorithm), Generational Gap Simple GA Algorithm (simple genetic algorithm with generation gap) and Polysomy Stud GA Algorithm (multi-chromosome stallion genetic algorithm).

[0107] To simulate real-world pollution events and provide sufficient test data for the algorithm, 10 different sets of monitoring data were generated for each point source type (single, dual, and triple sources). During data generation, random noise was added to the raw data, with the noise level strictly controlled between 0 and 5% to ensure data authenticity and diversity. A total of 30 sets of monitoring data provided a solid foundation for subsequent experiments. Population size adjustment and testing process: The population size was set between 100 and 300 and increased in steps of 10, generating a total of 21 different population sizes. For each point source type, the following testing process was used: ① Set the population size to an initial value (e.g., 100). ② Test the 10 sets of point source monitoring data sequentially using the five genetic algorithms, repeating the test 30 times for each set of data for each algorithm, and recording the traceability results. ③ Increase the population size to the next set value (e.g., 110) and repeat the above testing process. ④ Continue increasing the population size until it reaches the maximum value of 300, completing all tests for that point source type. ⑤ Organize and analyze the test data, recording key information such as the number of point sources, parameter settings (population size), and monitoring data sets used for each test. In summary, this experiment conducted a total of 94,500 tests (5 algorithms × 21 population sizes × 10 monitoring data sets × 30 repetitions × 3 point source types). This experiment aimed to comprehensively and in-depth evaluate the ability of different genetic algorithms to trace single, dual, and triple point source pollution incidents at different population sizes, providing solid data support for subsequent algorithm performance comparison and optimization.

[0108] Specifically, the cluster analysis algorithm to choose is: DBSCAN (suitable for noisy data) or K-means++ (requires a preset number of clusters). Input data: Feature matrix after dimensionality reduction (e.g., 10-dimensional data after PCA). Key parameters: DBSCAN: neighborhood radius (eps = 0.5), minimum number of samples (min_samples = 5). K-means: In this embodiment of the present invention, the optimal number of clusters is 4.

[0109] Label definition rules can be based on statistical characteristics: Label 1: Peak pollution (e.g., a sudden increase in concentration at a monitoring point of >50%), Label 2: Sustained pollution (concentration remains above the threshold for >6 hours). Based on environmental associations: Label 3: Flow rate sensitivity (pollution concentration is strongly correlated with flow rate, r > 0.7). Label 4: Temperature sensitivity (pollution concentration is strongly correlated with temperature, r > 0.6).

[0110] The knowledge base architecture design consists of the following modules: Pollutant Label Library: stores historical event labels and feature descriptions. Model Parameter Library: records the optimal model parameters for different pollution types (such as the number of LSTM units and learning rate). Rule Library: expert experience rules (such as "Total phosphorus exceeds the standard and flow rate is low → probability of agricultural non-point source pollution > 70%)."

[0111] More preferably, the deep learning model is constructed by the following steps:

[0112] S1031: Obtain a historical pollution training set, and construct a three-dimensional input tensor based on the historical pollution training set, wherein the three-dimensional input tensor includes the number of samples, time step, and feature dimension;

[0113] S1032: Input the three-dimensional input tensor into a pre-built initial deep learning model for training until the set training requirements are met, wherein the initial deep learning model includes an input layer, a first LSTM layer, a Dropout layer, a second LSTM layer, a Dense layer, and an output layer connected in sequence; if the model output is a classification task, a cross entropy loss function is used as the loss function; if the model output is a regression task, a mean square error loss function is selected as the loss function;

[0114] S1033: Save the hyperparameter combination with the best performance as the optimal parameters of the model to obtain a deep learning model.

[0115] By defining the time step and feature dimension, the embodiments of the present invention can simultaneously capture time series information and the relationship between different features in the data, which helps the model learn the changes in pollution data over time and the impact of each feature on pollution, thereby improving the model's understanding and prediction capabilities of pollution situations.

[0116] The first and second LSTM layers in the initial deep learning model effectively process sequence data, effectively extracting long-term dependent features from contaminated data and capturing the complex dynamics of the contamination process. The Dropout layer prevents overfitting and improves the model's generalization, enabling it to perform well on new, unseen data. The Dense layer further combines and weights the extracted features, exploring potential relationships between them and providing a more representative feature representation for the final output.

[0117] Choosing either the cross-entropy loss function or the mean squared error loss function based on the type of model output task can optimize the model for different task objectives. For classification tasks, the cross-entropy loss function can effectively measure the difference between the model's predictions and the true labels, guiding the model to learn the correct classification boundaries. For regression tasks, the mean squared error loss function can measure the error between the model's predictions and the true values, guiding the model to train in a direction that reduces this error and improves prediction accuracy.

[0118] More preferably, obtaining a historical contamination training set and constructing a three-dimensional input tensor based on the historical contamination training set includes:

[0119] Obtain a historical pollution training set, and perform SMOTE oversampling processing on data in the historical pollution training set whose corresponding pollution type data is less than a set value, wherein the historical pollution training set includes training pollution events, training water quality time series data, and training environmental parameters;

[0120] Preprocessing the historical pollution training set, wherein the preprocessing includes missing value processing, spatial interpolation and noise filtering;

[0121] Performing feature extraction on the pre-processed historical pollution training to obtain key training features, and performing dimensionality reduction processing on the key training features using a PCA algorithm or a t-SNA algorithm to obtain dimensionality reduction training features whose contribution rate exceeds a set contribution rate;

[0122] constructing a three-dimensional input tensor based on the dimensionality reduction training features;

[0123] And / or, after inputting the three-dimensional input tensor into a pre-built initial deep learning model for training until set training requirements are met, further comprising:

[0124] For each sample, the SHAP algorithm traverses all possible feature combinations to calculate the impact of each feature added to the feature combination on the model output; wherein the SHAP algorithm includes a Monte Carlo simulation algorithm or a Kernel SHAP algorithm;

[0125] Calculate the Shapley value of each feature based on its impact on the model output;

[0126] Sort the Shapley values ​​of all features by absolute value to obtain the global feature importance, and output the global feature importance;

[0127] And / or, the tracing trigger condition is satisfied, including: obtaining water quality indicators of each station in the monitoring area. If the water quality indicators obtained at the corresponding station in the monitoring area exceed the set water quality parameters, the tracing trigger condition is satisfied.

[0128] Specifically, the data sources include historical pollution event data: including pollution source location (X), emission volume (M), emission time (T), and pollutant concentrations (COD, ammonia nitrogen, total phosphorus, etc.); water quality time series data: time series concentration data for each monitoring point within 24 hours (sampling frequency ≥ 1 time / hour); environmental parameters: flow rate, water depth, temperature, dissolved oxygen, chlorophyll a, and other auxiliary data.

[0129] Data cleaning and enhancement: Missing value handling: Use time series interpolation (such as cubic spline interpolation) to fill missing values. Noise filtering: Use wavelet denoising (such as Daubechies wavelet) to remove high-frequency noise. Data enhancement: Oversample minority pollution events (such as the SMOTE algorithm) to balance the dataset.

[0130] Feature extraction and dimensionality reduction, key feature extraction: Statistical features: mean, variance, extreme value, rate of change (such as hourly concentration change). Time series features: sliding window statistics (such as the average concentration in the past 3 hours), Fourier transform to extract frequency domain features. Environmental correlation features: Pearson correlation coefficient between pollutant concentration and flow rate and temperature. Dimensionality reduction: Use PCA or t-SNE to reduce the dimensionality of high-dimensional features, and retain the principal components with a cumulative contribution rate of >90%. Feature examples: 1. Statistical features: determine the mutation type and the persistence type; 2. Time series features: determine the positive and negative correlation between concentration and time changes; 3. Environmental correlation features: total phosphorus and turbidity, flow rate, dissolved oxygen and temperature, chlorophyll a, pH, ammonia nitrogen and permanganate index.

[0131] During specific implementation, the input format is: three-dimensional tensor (number of samples × time step × feature dimension), such as (1000 × 24 × 8). Model training and parameter adjustment of the embodiment of the present invention, loss function: cross entropy loss is used for classification tasks, and mean square error (MSE) is used for regression tasks. Optimizer: Adam (learning rate = 0.001, decay rate = 1e-6). Hyperparameter tuning: Use grid search or Bayesian optimization to adjust the number of LSTM units, Dropout rate, and batch size (recommended range: 32-128). Feature importance analysis method: Use SHAP value (Shapley Additive Explanations) to quantify the contribution of each feature to the prediction results. Example: If the dissolved oxygen concentration has the highest SHAP value, it means that it has a significant impact on pollution source identification.

[0132] More preferably, if the confidence information is less than a set confidence parameter, executing the next step;

[0133] S105: Acquire pollution monitoring data of corresponding monitoring points within a set time range, wherein the pollution monitoring data includes water quality time series data and environmental parameter information;

[0134] S106: Constructing a water quality evolution model, wherein the water quality evolution model includes an analytical solution to a permanganate index pollution control equation, an analytical solution to an ammonia nitrogen pollution control equation, an analytical solution to a total phosphorus pollution control equation, and an analytical solution to a dissolved oxygen pollution control equation;

[0135] S107: Determine an n×3 matrix as a population, where n is the population size. Each population individual contains the emission location, total emission amount, and emission time. According to the pre-set parameter value range, randomly generate values ​​and fill them into the population matrix to form an initial population.

[0136] S108: Define a fitness function to calculate the sum of squares of the relative errors between the theoretical concentration and the actual monitoring concentration of each individual at all monitoring points and monitoring times. The fitness function is:

[0137]

[0138] Among them, N s is the number of pollution sources, N r is the number of monitoring points, N t is the number of monitoring times, i is the population individual, j is the monitoring moment, is the theoretical pollutant concentration value generated by pollution source k at time j and monitoring point i. The pollution discharge characteristics of pollution source k are (M j ,X j ,T j ); is the monitoring concentration information at monitoring point i at time j;

[0139] S109: Calculate the fitness function result, determine the individual with the smaller relative sum of squared errors as the optimal solution, and retain it. Repeat the above screening, evaluation and optimization process until the preset number of iterations is reached or the fitness function result meets the stopping condition;

[0140] S1010: Output the optimal parameter value corresponding to the optimal individual, where the optimal parameter value is the inversion result of the pollution source, and the optimal parameter value includes the emission location, the total emission amount, and the emission time.

[0141] More preferably, the analytical solution of the permanganate index pollution control equation includes:

[0142]

[0143] in, is the mass of pollutants released at the ith instant, X i is the i-th pollution location, T i is the initial emission moment of the i-th pollution source, A is the average cross-sectional area of ​​the target river section, D x is the longitudinal diffusion coefficient of pollutants, u is the average flow velocity of the target river section, is the pollutant attenuation coefficient, K DO is the half-saturation constant of dissolved oxygen, C DO ( t ) is C at time t DO concentration, is at position x and time t concentration;

[0144] The analytical solution of the ammonia nitrogen pollution control equation includes:

[0145]

[0146]

[0147]

[0148]

[0149] in, is the mass of pollutants released at the ith instant, X i is the i-th pollution location, T i is the initial emission moment of the i-th pollution source, A is the average cross-sectional area of ​​the target river section, D x is the longitudinal diffusion coefficient of pollutants, u is the average flow velocity of the target river section, K1 is the rate constant of ammonia nitrogen oxidation to nitrite, K2 is the rate constant of nitrite oxidation to nitrate, and τ is an integral variable, which represents the initial emission time T from the pollution source. i To a certain time point between the current time t, which is used to calculate in this time period, by Transformed The total amount; τ1, τ2 are integral variables, τ1 represents the initial emission time T from the pollution source i to a certain time point between T and the current time t, and τ2 represents the time period from T i to another time point between τ and τ1. These two variables are used together to calculate First convert to Then by Convert to the total amount;

[0150] The analytical solution of the total phosphorus pollution control equation includes:

[0151]

[0152] in, is the mass of pollutants released at the ith instant, X i is the i-th pollution location, T i is the initial emission moment of the i-th pollution source, Qk (τ) is the emission rate of the kth external phosphorus source, X ext,k is the emission position of the kth external phosphorus source, τ is the initial emission time of the kth external phosphorus source, and the integral interval [τ start,k , τ end,k ] represents the discharge period of the kth external phosphorus source, A is the average cross-sectional area of ​​the target river section, D x is the longitudinal diffusion coefficient of pollutants, u is the average flow velocity of the target river section, K TP is the phosphorus decay rate constant, K r is the sediment release rate constant of phosphorus, K ext,k is the decay rate constant of the kth external phosphorus source;

[0153] The analytical solution of the dissolved oxygen pollution control equation includes:

[0154]

[0155] in, is the mass of pollutants released at the ith instant, X i is the i-th pollution location, T i is the initial emission moment of the i-th pollution source, A is the average cross-sectional area of ​​the target river section, D x is the longitudinal diffusion coefficient of pollutants, u is the average flow velocity of the target river section, K p is the photosynthesis rate constant, K re is the respiration rate constant, and Chla is the chlorophyll a concentration.

[0156] In the embodiment of the present invention, pollution source identification is essentially a process of finding the optimal solution by comparing the calculation results of the mass transfer model with the actual monitoring data, that is, an optimization problem. In this process, the purpose is to find a set of pollution source parameters that minimizes the error between the concentration predicted by the model and the concentration actually monitored. Specifically, the monitoring concentration is defined as Cmes (mg / L), and Cth is the calculated concentration obtained by simulating the surface water quality model based on the pollution source information X (including the discharge location X (m), the total discharge amount M (g) and the discharge time T (min)). The goal of the embodiment of the present invention is to find the set of X that minimizes the error between Cth and Cmes. In order to achieve this goal, an inversion algorithm that couples the surface water quality model with a genetic algorithm is used. The surface water quality model is used to describe the changes in pollutant concentrations over time and space in pollution accidents, while the genetic algorithm is used to find the optimal solution in this complex multidimensional space.

[0157] Based on the analytical solution of the classic water diffusion equation and combined with the EFDC (Electronic Fluid Dynamics Code), we selected water quality data types available from online monitoring equipment, compiled analytical solutions for different water quality indicators of multi-point source pollutants, and constructed an optimized water quality evolution model. This model, based on the water diffusion equation and the EFDC code, combined with data from small water quality monitoring stations, provides an optimized analytical solution that accurately reflects water quality conditions and provides a scientific basis for tracing pollution sources.

[0158] Utilizing a genetic algorithm and a multi-point source tracing spatiotemporal inversion algorithm, the genetic algorithm is used to transform the pollution source tracing problem into an iterative optimization problem among individuals in a population. Through continuous iterative optimization, the true pollution source information is approximated. Simultaneously, combined with a water quality evolution model with various indicators, a multi-point source tracing spatiotemporal inversion algorithm is constructed to accurately invert instantaneous emissions from multiple sources, improving the accuracy of pollution source tracing. Through comparative testing experiments, a more suitable genetic algorithm—an enhanced elite retention genetic algorithm—was selected and parameterized. While retaining outstanding individuals, this algorithm enhances its ability to explore new solutions, making it more suitable for processing and analyzing water quality monitoring data and further optimizing pollution source tracing. Subsequent introduction of reinforcement learning elements enables the algorithm to dynamically adjust its search strategy based on feedback, converging more quickly to the optimal solution. Furthermore, an adaptive mechanism is designed to dynamically adjust algorithm parameters, such as population size and crossover mutation rate, based on the characteristics of pollution data.

[0159] More preferably, the pollution source tracing method further comprises:

[0160] Obtain the current status of the monitoring device, which includes device location information, environmental parameter information, and current concentration information;

[0161] Based on the current state of the monitoring device, the pollution concentration at the current location is calculated using a pollution diffusion model. The device location and concentration data are spliced ​​into a state vector, and the state vector is input into a reinforcement learning model for recognition to obtain an updated device location and an updated detection time.

[0162] The distance between the new device location and the pollution source and the energy consumption of the action are determined based on the updated device location and the updated detection time, and the reward value is calculated according to the reward formula; if the reward satisfies the termination condition, the corresponding dynamic pollution source information is output.

[0163] like Figure 5As shown in the figure, the system integrates unmanned water quality monitoring ships, drones, distributed monitoring instruments and small water quality monitoring stations to form a full life cycle monitoring system of "source-network-factory-river-basin". The fusion of multi-source information greatly improves the flexibility and coverage of monitoring, and can capture water quality changes more comprehensively. Optimize the layout of monitoring points: Utilize unmanned monitoring technology to optimize the layout of monitoring points to ensure efficient monitoring at the lowest cost, which is difficult to match with traditional monitoring methods. The goal of an embodiment of the present invention is to quickly locate the source of pollution by dynamically adjusting the position of mobile monitoring equipment (such as unmanned ships and drones). Dynamic pollution source: Assume that the pollution source may move (such as illegal dumping vehicles) or the diffusion path is affected by environmental changes.

[0164] In this embodiment of the present invention, a suitable reward function is designed, using factors such as pollution source identification accuracy and speed as reward indicators. Positive rewards are given when the model makes correct identification decisions, and negative rewards are given when the identification is incorrect or inefficient. The model continuously interacts with the environment, dynamically adjusting its search strategy based on reward feedback. For example, during the search for the optimal solution, the size and direction of the reward can be used to determine whether to adjust the model's parameters or alter the search path, thereby accelerating convergence to the optimal solution.

[0165] Specifically, the elements of reinforcement learning are defined as follows: State: current monitoring data (COD, ammonia nitrogen, etc. concentration), monitoring equipment location coordinates (x, y), environmental parameters (flow rate, wind direction, temperature). Action: moving direction (Δx, Δy), range limit (such as no more than 10 meters per movement), monitoring frequency adjustment (optional). Reward: Positive reward: the reward increases when approaching the pollution source (such as the square of the distance decreases), negative penalty: energy consumption cost (linear function of moving distance), time cost; formula example: R = -||d current -d previous ||2-λ, where d is the distance between the equipment and the pollution source, and λ is the energy consumption weight.

[0166] The pollution diffusion model uses the classic water diffusion equation to simulate the pollution concentration field:

[0167]

[0168] Among them, (x0, y0) is the location of the pollution source, u x ,u y is the flow velocity component.

[0169] The embodiment of the present invention obtains the current status of the monitoring equipment, which includes equipment location information, environmental parameter information, and current concentration information, and can provide a multi-dimensional data basis for pollution tracing. Equipment location information can clarify the spatial distribution of monitoring points, making it easier to determine the location of pollution in space; environmental parameter information helps to understand the external conditions for pollution diffusion, such as wind speed, water flow speed, etc., which will affect the diffusion direction and speed of pollutants; current concentration information directly reflects the degree of pollution and provides a basis for analyzing the development trend of pollution. It can grasp the status changes of monitoring equipment in real time, promptly detect abnormal fluctuations in pollution concentration and changes in environmental parameters, provide real-time data support for subsequent pollution diffusion analysis and tracing, and help to take timely measures to deal with pollution incidents.

[0170] Using a pollution diffusion model to calculate the pollution concentration at the current location based on the current state of the monitoring equipment can simulate the diffusion process of pollutants in the environment. Taking into account the impact of environmental factors on pollution diffusion, it can more accurately predict the spread of pollution and changes in concentration distribution, providing more accurate pollution concentration data for source tracing. The device location and concentration data are spliced ​​into a state vector and input into the reinforcement learning model for identification, resulting in updated device locations and updated detection times. This process enables intelligent decision-making. The reinforcement learning model can automatically learn and determine the optimal device location and detection time based on the current pollution status and environmental information to improve the efficiency of tracking pollution sources, optimize monitoring strategies, and make monitoring more scientific and reasonable. The location and detection time of monitoring equipment can be adjusted in real time according to the changing pollution situation and environmental conditions, making the entire traceability system adaptive, better able to cope with complex and changing pollution scenarios, and improving the accuracy and reliability of traceability.

[0171] This embodiment of the present invention features a dynamic tracking mechanism: RL enables autonomous movement of monitoring equipment to adapt to changes in the location of pollution sources. It also employs an energy-accuracy tradeoff: energy penalties are introduced into the reward function to avoid ineffective movement. Environmental interaction simulation: Simulating pollution diffusion through a mechanistic model enhances training realism.

[0172] In the model training and prediction process of this embodiment of the present invention, an adaptive mechanism is introduced, enabling the model to automatically adjust parameters and strategies based on different input data and environmental conditions. For example, based on the complexity and data characteristics of new pollution events, the deep learning model's learning rate, batch size, and other parameters are dynamically adjusted to improve the model's adaptability and performance.

[0173] The present invention integrates unmanned monitoring vessels, drones, distributed monitoring stations, and IoT technology to build a comprehensive monitoring system spanning the entire "source-network-factory-river-basin" lifecycle. This system overcomes the limitations of traditional fixed monitoring stations and improves monitoring coverage and flexibility. Existing technologies often rely on a single monitoring method (such as fixed stations or manual sampling). This research significantly reduces costs and improves real-time performance through multi-source data fusion and optimized layout.

[0174] The embodiment of the present invention combines the water quality diffusion equation with the genetic algorithm to develop a multi-point tracing spatiotemporal inversion algorithm, transforms the pollution source inversion into an iterative optimization problem, and optimizes the algorithm performance by enhancing the elite retention strategy.

[0175] This embodiment of the present invention introduces deep learning (an RNN variant) to process time series data, combining cluster analysis with label definition to build a knowledge base, enabling intelligent learning of historical data and rapid matching of new events. While existing research has often used either mechanistic models (such as diffusion models) or data-driven models (such as machine learning) independently, this study leverages both, taking into account both physical laws and data characteristics, significantly improving traceability accuracy.

[0176] This embodiment of the present invention derives analytical solutions for pollutant diffusion for multiple water quality indicators, including total phosphorus, ammonia nitrogen, and dissolved oxygen. It also incorporates dynamic parameters (such as sediment release rate and photosynthesis rate) to optimize model adaptability. While traditional models often focus on a single pollutant or simplify parameters, this model better reflects the complex environments of actual water bodies.

[0177] This embodiment of the present invention dynamically adjusts genetic algorithm parameters (such as population size and crossover rate) through reinforcement learning, and combines this with cluster analysis to form a pollutant label library, enabling the algorithm to self-learn and accumulate knowledge. Existing algorithms often rely on fixed parameters and lack dynamic optimization capabilities. This research is more robust in complex multi-source pollution scenarios.

[0178] Specific steps for implementing cross-basin generalized traceability driven by transfer learning in this embodiment are as follows: data collection, source basin data: historical pollution event data, water quality monitoring data (COD, ammonia nitrogen, etc.), geographic information (flow rate, water depth), pollution source labels. Target basin data: a small amount of monitoring data (no pollution source labels or partial labels), geographic information. Data preprocessing and standardization: Z-score standardization of monitoring data (such as concentration and flow rate). Spatiotemporal alignment: unify timestamps and spatial coordinates (such as conversion to UTM coordinate system).

[0179] The specific implementation of the solution in this embodiment of the present invention is as follows: First, historical data from monitoring stations is analyzed. The main indicators of historical data include total phosphorus, ammonia nitrogen, permanganate index, and dissolved oxygen. When capturing data, it is necessary to consider the data 24 hours before and 23 hours after the time of the exceedance, output all monitoring factors within the corresponding time period, and independently organize the individual alarm events of each station into corresponding table data. Cluster analysis is performed on this independent table data, and corresponding label classification is assigned to it.

[0180] Second, during implementation, logical classification based on on-site manual pollution source tracing experience, combined with clustering algorithms, will refine the labels for existing pollution events. Based on these label definitions, the expert experience database will be used to directly define the likely sources of pollution for each pollution event. For example, expert experience rules (such as "Total phosphorus exceeds the standard and flow rate is low → probability of agricultural non-point source pollution > 70%) can be used to efficiently identify pollution events that occur frequently (such as sewage plant overflows, rainfall, and agricultural non-point source irrigation).

[0181] Third, if a black box pollution incident (i.e., an unknown, sudden pollution incident) occurs and existing mathematical models are unable to produce a conclusion, a mechanistic model is activated. Using its formulas and algorithms, the approximate location of the pollution is determined, reducing the scope of manual investigation. Manual tracing is then used to ultimately determine the cause of the pollution incident. Fourth, confirmed pollution incident data is added to the training set, and the model is retrained regularly to update the knowledge base labels and rules.

[0182] The surface water multi-source pollution tracing method in this embodiment uses a deep learning algorithm to deeply study and classify historical pollution source data, forming a pollutant label library and knowledge base to support the rapid identification of new pollution incidents. Using cluster analysis to segment and label pollution incidents helps to more precisely capture the differences in pollution incidents and improve the accuracy and efficiency of pollution source identification.

[0183] Example 2

[0184] See also Figure 8 , Figure 8 This is a schematic diagram of the structure of the system for tracing the source of surface water multi-point pollution disclosed in an embodiment of the present invention. Figure 8 As shown, the surface water multi-point source pollution tracing system may include:

[0185] Acquisition module 21: for acquiring water quality time series data and environmental parameter information of corresponding monitoring points within a set time range when it is detected that the traceability trigger condition is met, and preprocessing the water quality time series data and environmental parameter information;

[0186] Feature extraction module 22: used to extract features from the pre-processed water quality time series data to obtain key water quality features, wherein the key water quality features include water quality statistical features, water quality time series features and water quality frequency domain features;

[0187] Identification module 23: used to input the key water quality features into a pre-built deep learning model for identification to obtain corresponding pollution identification results, wherein the deep learning model includes a time series processing module, which is used to process the water quality time series features in the key water quality features;

[0188] Output module 24: used to output corresponding pollution identification results, which include pollution type information, pollution source location information and confidence information.

[0189] The surface water multi-source pollution tracing method in this embodiment uses a deep learning algorithm to deeply study and classify historical pollution source data, forming a pollutant label library and knowledge base to support the rapid identification of new pollution incidents. Using cluster analysis to segment and label pollution incidents helps to more precisely capture the differences in pollution incidents and improve the accuracy and efficiency of pollution source identification.

[0190] Example 3

[0191] See also Figure 9 , Figure 9 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present invention. The electronic device can be a computer, a server, etc. Of course, in certain circumstances, it can also be a smart device such as a mobile phone, a tablet computer, a monitoring terminal, and an image acquisition device with processing functions. Figure 9 As shown, the electronic device may include:

[0192] A memory 510 storing executable program code;

[0193] a processor 520 coupled to the memory 510;

[0194] The processor 520 calls the executable program code stored in the memory 510 to execute part or all of the steps in the method for tracing the source of multi-point source pollution of surface water in the first embodiment.

[0195] An embodiment of the present invention discloses a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute some or all of the steps in the method for tracing the source of multi-point source pollution of surface water in embodiment one.

[0196] An embodiment of the present invention further discloses a computer program product, wherein when the computer program product is run on a computer, the computer is caused to execute some or all of the steps in the method for tracing the source of multi-point source pollution of surface water in embodiment one.

[0197] An embodiment of the present invention also discloses an application publishing platform, wherein the application publishing platform is used to publish a computer program product. When the computer program product runs on a computer, the computer executes some or all of the steps in the method for tracing multi-point source pollution of surface water in embodiment one.

[0198] In various embodiments of the present invention, it should be understood that the size of the serial numbers of the processes does not necessarily mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0199] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one place or distributed across multiple network units. Some or all of these units may be selected based on actual needs to achieve the objectives of this embodiment.

[0200] In addition, the functional units in the embodiments of the present invention may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The integrated unit may be implemented in the form of hardware or software functional units.

[0201] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-accessible memory. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a memory and includes several requests for causing a computer device (which can be a personal computer, server, or network device, specifically a processor in the computer device) to execute some or all of the steps of the method described in each embodiment of the present invention.

[0202] In the embodiments provided herein, it should be understood that "B corresponding to A" means that B is associated with A and B can be determined based on A. However, it should also be understood that determining B based on A does not mean determining B based solely on A; B can also be determined based on A and / or other information.

[0203] Those skilled in the art will appreciate that some or all of the steps in the various methods of the embodiments may be performed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, such as a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.

[0204] The above is a detailed introduction to the method, system, electronic device and storage medium for tracing multi-point source pollution of surface water disclosed in the embodiments of the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for tracing the source of multi-point source pollution of surface water, characterized in that: include: When it is detected that the traceability trigger condition is met, the water quality time series data and environmental parameter information of the corresponding monitoring point within the set time range are obtained, and the water quality time series data and environmental parameter information are preprocessed; the satisfying of the traceability trigger condition includes: obtaining the water quality indicators of each station in the monitoring area, and if the water quality indicators obtained at the corresponding station in the monitoring area exceed the set water quality parameters, the traceability trigger condition is met; Performing feature extraction on the pre-processed water quality time series data to obtain key water quality features, wherein the key water quality features include water quality statistical features, water quality time series features, and water quality frequency domain features; The key water quality features are input into a pre-built deep learning model for identification to obtain corresponding pollution identification results, wherein the deep learning model includes a time series processing module, which is used to process the water quality time series features in the key water quality features; the deep learning model is constructed by the following steps: Obtaining a historical contamination training set and constructing a three-dimensional input tensor based on the historical contamination training set, wherein the three-dimensional input tensor includes the number of samples, the time step, and the feature dimension; obtaining the historical contamination training set and constructing the three-dimensional input tensor based on the historical contamination training set includes: Obtain a historical pollution training set, and perform SMOTE oversampling processing on data in the historical pollution training set whose corresponding pollution type data is less than a set value, wherein the historical pollution training set includes training pollution events, training water quality time series data, and training environmental parameters; Preprocessing the historical pollution training set, wherein the preprocessing includes missing value processing, spatial interpolation and noise filtering; Performing feature extraction on the pre-processed historical pollution training to obtain key training features, and performing dimensionality reduction processing on the key training features using a PCA algorithm or a t-SNA algorithm to obtain dimensionality reduction training features whose contribution rate exceeds a set contribution rate; constructing a three-dimensional input tensor based on the dimensionality reduction training features; Input the three-dimensional input tensor into a pre-built initial deep learning model for training until the set training requirements are met, wherein the initial deep learning model includes an input layer, a first LSTM layer, a Dropout layer, a second LSTM layer, a Dense layer, and an output layer connected in sequence; if the model output is a classification task, a cross entropy loss function is used as the loss function; if the model output is a regression task, a mean square error loss function is selected as the loss function; For each sample, the SHAP algorithm traverses all possible feature combinations to calculate the impact of each feature added to the feature combination on the model output; wherein the SHAP algorithm includes a Monte Carlo simulation algorithm or a Kernel SHAP algorithm; Calculate the Shapley value of each feature based on its impact on the model output; Sort the Shapley values ​​of all features by absolute value to obtain the global feature importance, and output the global feature importance; Save the hyperparameter combination with the best performance as the optimal parameters of the model to obtain a deep learning model; The corresponding pollution identification result is output, and the pollution identification result includes pollution type information, pollution source location information and confidence information.

2. The method for tracing the source of multi-point source pollution of surface water according to claim 1, characterized in that: After extracting features from the pre-processed water quality time series data to obtain key water quality features, the method further includes: The pollution event features in the knowledge base pre-constructed according to the water quality statistical features, water quality time series features and water quality frequency domain features are matched to obtain a model parameter set associated with the current pollution event, and the model parameters in the deep learning model are updated according to the model parameter set; wherein, the knowledge base includes a pollutant label library and a model parameter library, the pollutant label library includes historical pollution type labels and pollution feature descriptions; the model parameter library includes optimal model parameters corresponding to different pollution types.

3. The method for tracing the source of multi-point source pollution of surface water according to claim 2, characterized in that: The pollutant label library is determined by the following steps: Acquiring a historical pollution data set, the historical pollution data set including historical pollution events, historical water quality time series data, and historical environmental parameters, and preprocessing the historical pollution data set; Performing feature extraction on the pre-processed historical pollution data to obtain historical key features, and performing dimensionality reduction processing on the historical key features using the PCA algorithm or the t-SNA algorithm to obtain dimensionality reduction key features whose contribution rate exceeds the set contribution rate; Dividing the historical pollution dataset into a plurality of clusters and taking the dimensionality reduction key features as input; Randomly select a data point in the historical pollution data set as the first cluster center, and select subsequent cluster centers according to the maximum distance principle; For each data point, calculate its distance from each cluster center and assign it to the cluster represented by the nearest cluster center; For each cluster, calculate the mean of all data points in the cluster and use it as the new cluster center; Continuously update the cluster assignment and cluster center of the data points until the change in the cluster center is less than a certain threshold or reaches the preset number of iterations, then clustering is completed; After clustering is completed, statistics are calculated for each cluster to determine the cluster characteristics, and the cluster characteristics are defined according to the set label rules to determine the historical pollution type labels and pollution feature descriptions, and saved to the pollutant label library.

4. The method for tracing the source of multi-point source pollution of surface water according to claim 1, characterized in that: After outputting the corresponding pollution identification result, the method further includes: If the confidence information is less than the set confidence parameter, proceed to the next step; Obtain pollution monitoring data of corresponding monitoring points within a set time range, wherein the pollution monitoring data includes water quality time series data and environmental parameter information; Constructing a water quality evolution model, wherein the water quality evolution model includes an analytical solution of a permanganate index pollution control equation, an analytical solution of an ammonia nitrogen pollution control equation, an analytical solution of a total phosphorus pollution control equation, and an analytical solution of a dissolved oxygen pollution control equation; Determine an n×3 matrix as the population, where n is the population size. Each population individual contains the emission location, total emission amount, and emission time. According to the pre-set parameter value range, randomly generate values ​​and fill them into the population matrix to form the initial population; Define the fitness function and calculate the sum of squares of the relative errors between the theoretical concentration and the actual monitoring concentration of each individual at all monitoring points and monitoring times. The fitness function is: Among them, N s is the number of pollution sources, N r is the number of monitoring points, N t is the number of monitoring times, i is the population individual, j is the monitoring moment, is the theoretical pollutant concentration value generated by pollution source k at time j and monitoring point i. The pollution discharge characteristics of pollution source k are (M j ,X j ,T j ); is the monitoring concentration information at monitoring point i at time j; The fitness function result is calculated and retained, and the above screening, evaluation and optimization process is repeated until the preset number of iterations is reached or the fitness function result meets the stopping condition; The optimal parameter value corresponding to the optimal individual is output, and the optimal parameter value is the inversion result of the pollution source, and the optimal parameter value includes the emission location, the total emission amount and the emission time.

5. The method for tracing the source of multi-point source pollution of surface water according to claim 4, characterized in that: The analytical solution of the permanganate index pollution control equation includes: in, is the mass of pollutants released at the ith instant, X i is the i-th pollution location, T i is the initial emission moment of the i-th pollution source, A is the average cross-sectional area of ​​the target river section, D x is the longitudinal diffusion coefficient of pollutants, u is the average flow velocity of the target river section, is the pollutant attenuation coefficient, K DO is the half-saturation constant of dissolved oxygen, C DO(t) is C at time t DO concentration, is at position x and time t concentration; The analytical solution of the ammonia nitrogen pollution control equation includes: in, is the mass of pollutants released at the ith instant, X i is the i-th pollution location, T i is the initial emission moment of the i-th pollution source, A is the average cross-sectional area of ​​the target river section, D x is the longitudinal diffusion coefficient of pollutants, u is the average flow velocity of the target river section, K1 is the rate constant of ammonia nitrogen oxidation to nitrite, K2 is the rate constant of nitrite oxidation to nitrate, and τ is an integral variable, which represents the initial emission time T from the pollution source. i To a certain time point between the current time t, which is used to calculate in this time period, by Transformed The total amount; τ1, τ2 are integral variables, τ1 represents the initial emission time T from the pollution source i to a certain time point between T and the current time t, and τ2 represents the time period from T i At another time point between τ1 and τ2, these two variables are used together to calculate the First convert to Then by Convert to the total amount; The analytical solution of the total phosphorus pollution control equation includes: in, is the mass of pollutants released at the ith instant, X i is the i-th pollution location, T i is the initial emission moment of the i-th pollution source, Q k (τ) is the emission rate of the kth external phosphorus source, X ext,k is the emission position of the kth external phosphorus source, τ is the initial emission time of the kth external phosphorus source, and the integral interval [τ start,k , τ end,k ] represents the discharge period of the kth external phosphorus source, A is the average cross-sectional area of ​​the target river section, D x is the longitudinal diffusion coefficient of pollutants, u is the average flow velocity of the target river section, K TP is the phosphorus decay rate constant, K r is the sediment release rate constant of phosphorus, K ext,k is the decay rate constant of the kth external phosphorus source; The analytical solution of the dissolved oxygen pollution control equation includes: in, is the mass of pollutants released at the ith instant, X i is the i-th pollution location, T i is the initial emission moment of the i-th pollution source, A is the average cross-sectional area of ​​the target river section, D x is the longitudinal diffusion coefficient of pollutants, u is the average flow velocity of the target river section, K p is the photosynthesis rate constant, K re is the respiration rate constant, and Chla is the chlorophyll a concentration.

6. The method for tracing the source of multi-point source pollution of surface water according to claim 1, characterized in that: The pollution source tracing method further includes: Obtain the current status of the monitoring device, which includes device location information, environmental parameter information, and current concentration information; Based on the current state of the monitoring device, the pollution concentration at the current location is calculated using a pollution diffusion model. The device location and concentration data are spliced ​​into a state vector, and the state vector is input into a reinforcement learning model for recognition to obtain an updated device location and an updated detection time. The distance between the new device location and the pollution source and the energy consumption of the action are determined based on the updated device location and the updated detection time, and the reward value is calculated according to the reward formula; if the reward satisfies the termination condition, the corresponding dynamic pollution source information is output.

7. A system for tracing the source of multi-point source pollution of surface water, characterized in that: include: Acquisition module: used to obtain water quality time series data and environmental parameter information of the corresponding monitoring point within a set time range when it is detected that the traceability trigger condition is met, and pre-process the water quality time series data and environmental parameter information; the traceability trigger condition is met, including: obtaining water quality indicators of each station in the monitoring area. If the water quality indicators obtained at the corresponding station in the monitoring area exceed the set water quality parameters, the traceability trigger condition is met; Feature extraction module: used to extract features from pre-processed water quality time series data to obtain key water quality features, including water quality statistical features, water quality time series features and water quality frequency domain features; Identification module: used to input the key water quality features into a pre-built deep learning model for identification to obtain corresponding pollution identification results, wherein the deep learning model includes a time series processing module, which is used to process the water quality time series features in the key water quality features; the deep learning model is constructed through the following steps: Obtaining a historical contamination training set and constructing a three-dimensional input tensor based on the historical contamination training set, wherein the three-dimensional input tensor includes the number of samples, the time step, and the feature dimension; obtaining the historical contamination training set and constructing the three-dimensional input tensor based on the historical contamination training set includes: Obtain a historical pollution training set, and perform SMOTE oversampling processing on data in the historical pollution training set whose corresponding pollution type data is less than a set value, wherein the historical pollution training set includes training pollution events, training water quality time series data, and training environmental parameters; Preprocessing the historical pollution training set, wherein the preprocessing includes missing value processing, spatial interpolation and noise filtering; Performing feature extraction on the pre-processed historical pollution training to obtain key training features, and performing dimensionality reduction processing on the key training features using a PCA algorithm or a t-SNA algorithm to obtain dimensionality reduction training features whose contribution rate exceeds a set contribution rate; constructing a three-dimensional input tensor based on the dimensionality reduction training features; Input the three-dimensional input tensor into a pre-built initial deep learning model for training until the set training requirements are met, wherein the initial deep learning model includes an input layer, a first LSTM layer, a Dropout layer, a second LSTM layer, a Dense layer, and an output layer connected in sequence; if the model output is a classification task, a cross entropy loss function is used as the loss function; if the model output is a regression task, a mean square error loss function is selected as the loss function; For each sample, the SHAP algorithm traverses all possible feature combinations to calculate the impact of each feature added to the feature combination on the model output; wherein the SHAP algorithm includes a Monte Carlo simulation algorithm or a Kernel SHAP algorithm; Calculate the Shapley value of each feature based on its impact on the model output; Sort the Shapley values ​​of all features by absolute value to obtain the global feature importance, and output the global feature importance; Save the hyperparameter combination with the best performance as the optimal parameters of the model to obtain a deep learning model; Output module: used to output corresponding pollution identification results, which include pollution type information, pollution source location information and confidence information.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program enables a computer to execute the method for tracing the source of multi-point source pollution of surface water according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Atmospheric pollution monitoring method, device, equipment, storage medium and product

    CN119086818A

  • Water quality pollution source reverse tracking method based on LSTM model and pollution scene database

    CN119167034A