Abnormal water inflow tracing method and system for sewage treatment plants based on Fréchet distance

Through the abnormal water inlet traceability method of sewage treatment plants based on Frecher distance, the problem of abnormal water inlet concentration traceability in the sewage treatment plants in the existing technology is solved, and the rapid and accurate pollution source positioning and traceability visualization are achieved, and the management efficiency and environmental protection effect of sewage treatment plants are improved.

CN119648472BActive Publication Date: 2025-04-22SOUTH CHINA INST OF ENVIRONMENTAL SCI MEP

Patent Information

Application Number
CN202510175092.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-18
Publication Date
2025-04-22
Estimated Expiration
2045-02-18

AI Technical Summary

Technical Problem

The existing sewage treatment plant traceability methods have limitations, and it is difficult to effectively trace the source of abnormal water inlet concentration in sewage treatment plant, especially when the pipeline network model and the "enterprise-pipe network-sewage plant" are insufficient.

Method used

The abnormal water inlet traceability method of sewage treatment plants based on Frecher distance is adopted. By determining the traceability range, building a GIS model, generating the plant-net-plot-source pointer relationship database, collecting and analyzing monitoring data, building a water quality prediction module and a Frecher distance pollution traceability module, the traceability visualization of the total phosphorus concentration in the sewage treatment plant exceeds the standard.

Benefits of technology

This method can quickly and accurately locate pollution sources, shorten traceability time, improve traceability efficiency and accuracy, and at the same time display traceability results and control solutions through a visual platform to improve traceability visibility and effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119648472B_ABST
    Figure CN119648472B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for tracing the source of abnormal water inflow of a sewage treatment plant based on the Frechet distance, and divides the water inflow range of the sewage treatment plant into units in combination with plot information, pipe network information, confluence conditions, monitoring stations, etc., and analyzes the correlation between total phosphorus and conductivity; arranges pipe network water quality monitoring microstations, and sorts out the "plant-network-plot-source" pointer relationship library; constructs a big data warehouse for sewage treatment plants, cleans and manages related data, and connects the data to a pollutant tracing visualization platform; constructs a tracing model for water pollution in sewage treatment plants, selects the incident of excessive total phosphorus in the water inlet to carry out tracing research, and embeds the tracing model into a visualization platform to realize the visualization of tracing the source of excessive total phosphorus concentration in sewage treatment plants. Compared with the tracing method for tracing the source of abnormal water inflow in sewage treatment plants, the present invention can greatly improve the utilization rate of big data resources while saving a lot of manpower and material resources, and provide a basis for locking down enterprises that discharge illegally, predicting the spread of pollution, and providing a basis for environmental emergency response.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method for tracing the source of abnormal water inflow in a sewage treatment plant, in particular to a method for tracing the source of abnormal water inflow in a sewage treatment plant based on the Fréchet distance. Background Art

[0002] At present, in terms of tracing the source of sewage plants, domestic research focuses on the tracing effect of sewage plants and solving the treatment effect of sewage plants. There are fewer studies on pipe network models and the connection between "enterprises-pipe networks-sewage plants". In addition, domestic research on drainage pipe water quality models mainly focuses on the mathematical model of drainage pipe water quality transformation based on the activated sludge model. The kinetic parameters in the model are mostly quoted or referenced from foreign literature. Some existing tracing methods also have certain limitations. For example, suspected pollution sources can be identified through water quality fingerprint technology, but this technology is costly, time-consuming and financially intensive in actual environmental protection work, and is difficult to be widely used. There are fewer studies on pipe network models and the overall research of "enterprises-pipe networks-sewage plants". How to trace the source of abnormal influent concentration in sewage treatment plants is still a major research difficulty in the field of water environment. Summary of the invention

[0003] The purpose of the invention is to provide a method for tracing the source of abnormal water inflow in a sewage treatment plant based on the Fréchet distance to solve the above-mentioned problems existing in the prior art. On the other hand, a system for tracing the source of abnormal water inflow in a sewage treatment plant based on the Fréchet distance is provided.

[0004] Technical solution, according to one aspect of the present application, a method for tracing the source of abnormal water inflow in a sewage treatment plant based on the Fréchet distance comprises the following steps:

[0005] Step S1, determine the traceability range of the sewage treatment plant and obtain basic data, divide the traceability range into units to form at least two sub-units;

[0006] Step S2, read the basic data and build a GIS model for each sub-unit within the tracing range, analyze the GIS model and determine the layout plan of the monitoring stations, generate a plant-network-plot-source pointer relationship library based on the layout plan, and build a pollution tracing monitoring network;

[0007] Step S3: Collect and obtain monitoring data of pollution sources through the pollution source tracing monitoring network, and build a basic database including sewage treatment plant information, plot pipe network information, basic water quality information and tracing information;

[0008] Step S4: extract water quality data from the monitoring data and spatial features from the GIS model as tracing input data, build a water quality prediction module and a Fréchet distance pollution tracing module, and output the calculation results to the pollutant tracing visualization platform to achieve tracing visualization of the total phosphorus concentration exceeding the standard in the sewage treatment plant.

[0009] According to one aspect of the present application, step S1 further comprises:

[0010] Step S11, determine the traceability scope of the sewage treatment plant, and obtain basic data including at least geographical location, geographical elevation, area, population, climate, rainfall, water system, pipe network system and existing monitoring stations;

[0011] Step S12, dividing the traceability range into units to form at least two sub-units; reading the data of total phosphorus and conductivity from the monitoring data of the existing monitoring station, and using the time series statistical analysis method to study the time course change law of total phosphorus and conductivity;

[0012] Step S13, analyzing and obtaining the spatial distribution and evolution law of total phosphorus and electrical conductivity, and analyzing the correlation between total phosphorus and electrical conductivity by calculating the Pearson correlation coefficient.

[0013] According to one aspect of the present application, step S2 further comprises:

[0014] Step S21, reading geographic elevation data in basic data, and constructing a GIS model for each subunit within the traceability range;

[0015] Step S22: Based on the GIS model and pre-stored field survey data, determine the layout location of the monitoring station, determine the monitoring indicators and frequency, and form a layout plan for the monitoring stations of the water quality in the pipe network; the monitoring stations are divided into first-class monitoring stations and second-class monitoring stations. The monitoring indicators of the first-class monitoring stations include pH value, conductivity, total phosphorus, flow rate and liquid level; the monitoring indicators of the second-class monitoring stations include pH value, conductivity and liquid level;

[0016] Step S23, generate a plant-network-plot-source pointer relationship library for the sewage treatment plants within the traceability range and their pollution receiving range, and build a traceability monitoring network to provide a plant-network-plot-source traceability chain for subsequent abnormal water inflow tracing research of sewage treatment plants.

[0017] According to one aspect of the present application, step S3 further comprises:

[0018] Step S31, collecting and obtaining monitoring data of pollution sources through the pollution source tracing monitoring network;

[0019] The data transmission method based on TCP / IP is adopted to send the monitoring data collected by the monitoring equipment to the GPRS module via the RS232 serial interface. The GPRS module packages the collected data again according to the TCP / IP communication protocol format and transmits it to the database through the GPRS wireless data communication network.

[0020] Step S32, designing a database, the database including a sewage treatment plant information class, a plot pipe network information class, a basic water quality information class, and a traceability information class, so as to construct a basic database including sewage treatment plant information, plot pipe network information, basic water quality information, and traceability information;

[0021] Step S33: Re-examine and verify the water quality monitoring data and rainfall data of the pipeline node monitoring stations corresponding to the sewage treatment plant, the water-related enterprise monitoring stations, and the sewage treatment plant water inlet to delete redundant and repeated information, correct errors in the water quality monitoring data, and verify the consistency of the data.

[0022] According to one aspect of the present application, step S4 is further:

[0023] Step S41, constructing an ARIMA model to obtain the linear relationship and autocorrelation of water quality data;

[0024] Step S42: construct an SSA-CNN-LSTM-Attention model to obtain the nonlinear relationship and long-term dependency of water quality data of N variables, where N is a natural number greater than 2;

[0025] Step S43: construct a PMF model to perform factor analysis on water quality data, identify the main factors affecting water quality, and calculate the contribution rate of each factor;

[0026] Step S44, construct and use the ASFA method to optimize the parameters of the ARIMA module, the SSA-CNN-LSTM-Attention module and the PMF model to obtain the optimized parameters of each model;

[0027] Step S45, constructing the weight matrix of the ARIMA module, the SSA-CNN-LSTM-Attention module and the PMF model;

[0028] Step S46: Based on the weight matrix and the output results of each model, the final water quality prediction result is given and compared with the monitoring value; the prediction error and evaluation index are calculated.

[0029] According to one aspect of the present application, step S4 further includes:

[0030] Step S47: judging whether there are any key pollutants exceeding the standard based on the water quality monitoring value or the water quality prediction result;

[0031] The key pollutants include at least total phosphorus concentration and electrical conductivity;

[0032] If it exists, call the constructed Fréchet distance pollution source tracing module, use the Fréchet distance algorithm, and locate the key network nodes where the pollution source is located by comparing the similarity between the total phosphorus concentration curve of the water inlet and the total phosphorus concentration or conductivity curve of the network node;

[0033] Step S48: based on the located key pipe network nodes, combined with the pre-stored dynamic water pollution emission list and the plant-network-land-source pointer relationship library, trace back to the specific pollution source type and location, and conduct on-site investigation and evidence collection;

[0034] Step S49: Based on the type and characteristic information of the traced target pollution source, search for cases that meet the corresponding characteristics in the case library, propose targeted control plans based on the cases, and display the traceability results and control plans through a visualization platform.

[0035] According to one aspect of the present application, step S33 further includes:

[0036] Step S33a, classifying the monitoring stations by their attributes and dividing the monitoring stations in the pipe network;

[0037] Step S33b, unify the longitude and latitude of the monitoring points into the same coordinate system; remove the longitude and latitude sites that cannot be confirmed; programmatically replace the sites with scattered longitude and latitude;

[0038] Step S33c, processing water environment parameter data abnormal values, eliminating a series of abnormal values ​​in the monitoring data, including null values, 0 values, negative values, 0.345 monitoring values ​​and maximum and minimum abnormal values;

[0039] Step S33d, through programming, time matching is performed for sites with different monitoring start and end times; data for sites that enter different stable monitoring states are deleted; and data in different intervals that are missing due to equipment problems are filled with mean values ​​according to the upper and lower time series.

[0040] According to one aspect of the present application, in step S47, the process of constructing and using the Fréchet distance pollution tracing module is further as follows:

[0041] Step S47a, constructing a water pollution source tracing model for sewage treatment plants in the study area based on the Fréchet distance algorithm;

[0042] Step S47b, combining the total phosphorus data of the sewage treatment plant, selecting the period when the total phosphorus exceeds the standard as a source tracing event;

[0043] Step S47c, in combination with the selected sewage treatment plant total phosphorus exceeding standard time period, according to the pipe network distance and water flow velocity from each first-class monitoring station to the sewage treatment plant, the time period for selecting total phosphorus data for each first-class monitoring station is calculated; according to the pipe network distance and water flow velocity from each second-class monitoring station to the first-class monitoring station, the time period for selecting conductivity data for each second-class monitoring station is calculated;

[0044] Step S47d, performing maximum-minimum normalization processing on the selected total phosphorus concentration data of the sewage treatment plant inlet, the total phosphorus concentration and conductivity data of the first-category monitoring station, and the conductivity data of the second-category monitoring station to eliminate the influence of the indicator dimension difference on the traceability result;

[0045] Step S47e, based on the Fréchet distance pollution source tracing algorithm, calculate the Fréchet distance between the total phosphorus concentration curve of the sewage treatment plant and the total phosphorus concentration curve of the first-category monitoring station, and find the first-category monitoring station with the smallest distance; calculate the Fréchet distance between the conductivity of the first-category monitoring station and the corresponding conductivity of multiple second-category monitoring stations in the logical pointer relationship library again, and find the second-category monitoring station with the smallest distance;

[0046] Step S47f, combining the plant-grid-land-source connectivity logic pointer library, find the drainage land and sewage-discharging enterprise corresponding to the second type of monitoring station, and identify the pollution source through manual investigation.

[0047] According to one aspect of the present application, step S49 further includes:

[0048] Step S49a, obtaining the type and characteristic information of the traced target pollution source, including emission substances, emission amount, emission time and emission location, and matching it with the pollution source information in the case library to find the most similar or most relevant case;

[0049] Step S49b: Based on the most similar or relevant cases found, take the control measures that can be taken, including limiting emissions, improving processes, and strengthening supervision; and formulate targeted control plans based on actual conditions, including setting emission standards, installing online monitoring equipment, and imposing environmental fines;

[0050] Step S49c: Use the visualization platform to display the traceability results and control plans to relevant personnel or departments, including sewage treatment plants, environmental protection bureaus and the public, in the form of charts, maps, animations, etc., and provide corresponding data support and analysis reports.

[0051] According to another aspect of the present application, a system for tracing abnormal water inflow in a sewage treatment plant based on the Fréchet distance comprises:

[0052] at least one processor; and

[0053] a memory communicatively connected to at least one of the processors; wherein,

[0054] The memory stores instructions that can be executed by the processor, and the instructions are used to be executed by the processor to implement the method for tracing the abnormal water inflow of a sewage treatment plant based on the Fréchet distance as described in any of the above technical solutions.

[0055] Beneficial effect: a method for tracing the source of abnormal water inflow to a sewage treatment plant based on the Fréchet distance is adopted. The present invention proposes a method and system for tracing the source of abnormal water inflow to a sewage treatment plant based on the Fréchet distance to solve the above-mentioned problems that exist currently. While saving a lot of manpower and material resources, it can greatly improve the utilization rate of big data resources, and provide a basis for locking down illegal discharge enterprises, predicting the spread of pollution, and preparing for environmental emergencies. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 It is a flow chart of the present invention.

[0057] Figure 2 It is a flow chart of step S1 of the present invention.

[0058] Figure 3 It is a flow chart of step S2 of the present invention.

[0059] Figure 4 It is a flow chart of step S3 of the present invention.

[0060] Figure 5 It is a flow chart of step S4 of the present invention. DETAILED DESCRIPTION

[0061] like Figure 1 As shown, the following technical solution is proposed.

[0062] According to one aspect of the present application, a method for tracing the source of abnormal water inflow in a sewage treatment plant based on the Fréchet distance comprises the following steps:

[0063] Step S1, determine the traceability range of the sewage treatment plant and obtain basic data, divide the traceability range into units to form at least two sub-units;

[0064] Step S2, read the basic data and build a GIS model for each sub-unit within the tracing range, analyze the GIS model and determine the layout plan of the monitoring stations, generate a plant-network-plot-source pointer relationship library based on the layout plan, and build a pollution tracing monitoring network;

[0065] Step S3: Collect and obtain monitoring data of pollution sources through the pollution source tracing monitoring network, and build a basic database including sewage treatment plant information, plot pipe network information, basic water quality information and tracing information;

[0066] Step S4: extract water quality data from the monitoring data and spatial features from the GIS model as tracing input data, build a water quality prediction module and a Fréchet distance pollution tracing module, and output the calculation results to the pollutant tracing visualization platform to achieve tracing visualization of the total phosphorus concentration exceeding the standard in the sewage treatment plant.

[0067] First, this embodiment can realize the rapid tracing of abnormal water inflow to the sewage treatment plant. By comparing the similarity between the total phosphorus concentration curve of the water inlet and the total phosphorus concentration or conductivity curve of the pipe network node, the key pipe network nodes where the pollution source is located are located using the Freche distance algorithm, thereby shortening the tracing time and improving the tracing efficiency. Secondly, this embodiment can realize the accurate tracing of abnormal water inflow to the sewage treatment plant. By constructing a GIS model and a "plant-network-plot-source" pointer relationship library, combined with a dynamic water pollution emission inventory, it can further trace back to the specific type and location of the pollution source, and conduct on-site investigation and evidence collection, thereby improving the accuracy of tracing and reducing the tracing error. Finally, this embodiment can realize the visual tracing of abnormal water inflow to the sewage treatment plant. By constructing a water quality prediction module and a Freche distance pollution tracing module, the calculation results are output to the pollutant tracing visualization platform, and the tracing results and control plans are displayed in the form of charts, maps, animations, etc., thereby improving the visibility of tracing and enhancing the tracing effect.

[0068] like Figure 2 As shown, according to one aspect of the present application, the step S1 is further:

[0069] Step S11, determine the traceability scope of the sewage treatment plant, and obtain basic data including at least geographical location, geographical elevation, area, population, climate, rainfall, water system, pipe network system and existing monitoring stations;

[0070] First, it is necessary to clarify the scope of the sewage treatment plant. By cooperating with the local environmental protection department or water bureau, relevant map data can be obtained to delineate the pollution range of the sewage treatment plant. Within the pollution range obtained, basic data such as geographical location, geographical elevation, area, population, climate, and rainfall can be collected. These data can be obtained from local statistics bureaus, meteorological bureaus and other departments. For information on water systems, pipe networks and existing monitoring stations, detailed data can be obtained by cooperating with local water bureaus or environmental protection departments.

[0071] Step S12: Divide the tracing range into units to form at least two sub-units; for example, divide it according to different river basins or communities to more accurately find possible pollution sources.

[0072] The data of total phosphorus and conductivity are read from the monitoring data of existing monitoring stations, and the time series statistical analysis method is used to study the temporal change law of total phosphorus and conductivity; considering that the data may have temporal characteristics, such as seasonal changes, increase or decrease in rainfall, etc., the changes of these data may have regularities. Therefore, the time series statistical analysis method is used to study the change law of these two indicators. For example, methods such as sliding average and Fourier transform can be used to analyze the temporal characteristics of data.

[0073] Step S13: Analyze and obtain the spatial distribution and evolution of total phosphorus and conductivity, and use GIS tools to visualize the spatial distribution of total phosphorus and conductivity to observe their distribution in different regions. At the same time, combined with the results of time series analysis, observe their evolution over time. For example, whether the total phosphorus concentration in a certain area will suddenly increase during the rainy season.

[0074] The Pearson correlation coefficient was calculated to analyze the correlation between total phosphorus and conductivity. This helps understand whether there is a certain relationship between the two indicators. For example, if the two are highly correlated, conductivity data can be used to trace the source of total phosphorus.

[0075] In this embodiment, the pollution source can be located more accurately. For example, if the total phosphorus concentration and conductivity of a subunit suddenly rise, and are significantly different from the data of other subunits, then this subunit is likely to be the source of pollution. Through the correlation analysis of total phosphorus and conductivity, the possible source of pollutants can be inferred. For example, if the two are highly correlated, it may indicate that the pollutants come from a specific industrial process. Therefore, this embodiment can find the source of pollution more accurately through detailed unit division and spatiotemporal data analysis. Through systematic and scientific methods, the tracing work can be completed in a shorter time and work efficiency can be improved. In short, through the comprehensive use of various data and technical means, this embodiment systematically performs data processing and analysis, so as to achieve accurate tracing of pollution sources. Each step is to find the source of pollution more accurately and quickly, so as to achieve the purpose of controlling pollution and protecting the environment.

[0076] like Figure 3 As shown, according to one aspect of the present application, the step S2 is further:

[0077] Step S21, reading geographic elevation data in basic data, and constructing a GIS model for each subunit within the traceability range;

[0078] Step S22: Based on the GIS model and pre-stored field survey data, determine the layout location of the monitoring station, determine the monitoring indicators and frequency, and form a layout plan for the monitoring stations of the water quality in the pipe network; the monitoring stations are divided into first-class monitoring stations and second-class monitoring stations. The monitoring indicators of the first-class monitoring stations include pH value, conductivity, total phosphorus, flow rate and liquid level; the monitoring indicators of the second-class monitoring stations include pH value, conductivity and liquid level;

[0079] Step S23, generate a plant-network-plot-source pointer relationship library for the sewage treatment plants within the traceability range and their pollution receiving range, and build a traceability monitoring network to provide a plant-network-plot-source traceability chain for subsequent abnormal water inflow tracing research of sewage treatment plants.

[0080] In a certain scenario, the specific data processing flow may include: first, extracting geographic elevation data from the basic data collected previously. These data can present information such as terrain undulations and water flow direction within the traceability range. Using geographic information system (GIS) tools such as ArcGIS or QGIS, combined with geographic elevation data, a model is built for each subunit. This model can display information such as terrain, rivers, lakes, residential areas, industrial areas, etc. within the traceability range. Based on the GIS model, combined with the field survey data collected previously, analyze which places are more susceptible to pollution or which places are the key paths for pollutant transmission, so as to determine the location of the monitoring station. According to the needs of the sewage treatment plant and the local water quality standards, determine the indicators and monitoring frequency that the monitoring station needs to monitor. The monitoring stations are divided into the first and second categories. The first type of monitoring stations are located in key locations, such as the water inlet of the sewage treatment plant, near the main pollution source, etc., so more indicators need to be monitored. The second type of monitoring stations are located in other locations and only need to monitor some key indicators. Integrate all data to generate a pointer relationship library of plant-network-plot-source. This library can clearly show the relationship between sewage treatment plants, pipe networks, plots and pollution sources. Based on the pointer relationship library, a traceability monitoring network is constructed using GIS tools. This network can clearly show where the possible pollution source is when the sewage treatment plant's influent is abnormal, and how the pollutants are transmitted to the sewage treatment plant.

[0081] In this embodiment, through the constructed traceability monitoring network, when the influent of the sewage treatment plant is abnormal, the possible source of pollution can be quickly found, greatly reducing the time to deal with the abnormality. Through the precise monitoring station layout plan, key data can be collected more efficiently and the management efficiency of the sewage treatment plant can be improved. Through the precise monitoring station layout and traceability monitoring network, the source of pollution can be found more accurately, providing strong support for pollution control. When the influent of the sewage treatment plant is abnormal, the problem can be quickly found and timely measures can be taken to improve the efficiency of sewage treatment.

[0082] like Figure 4As shown, according to one aspect of the present application, step S3 is further:

[0083] Step S31, collecting and obtaining monitoring data of pollution sources through the pollution source tracing monitoring network;

[0084] The data transmission method based on TCP / IP is adopted to send the monitoring data collected by the monitoring equipment to the GPRS module via the RS232 serial interface. The GPRS module packages the collected data again according to the TCP / IP communication protocol format and transmits it to the database through the GPRS wireless data communication network.

[0085] Step S32, designing a database, the database including a sewage treatment plant information class, a plot pipe network information class, a basic water quality information class, and a traceability information class, so as to construct a basic database including sewage treatment plant information, plot pipe network information, basic water quality information, and traceability information;

[0086] Step S33: Re-examine and verify the water quality monitoring data and rainfall data of the pipeline node monitoring stations corresponding to the sewage treatment plant, the water-related enterprise monitoring stations, and the sewage treatment plant water inlet to delete redundant and repeated information, correct errors in the water quality monitoring data, and verify the consistency of the data.

[0087] In a certain scenario, the following implementation process can be adopted: Deploy monitoring equipment at key locations such as the water inlet of the sewage treatment plant, key pipe network nodes, and the water outlet of water-related enterprises. Whenever the device detects new data, it will send the data to the GPRS module through the RS232 serial interface. The GPRS module will package the data and send it to the central database through the GPRS wireless data communication network. The design and construction of the database include: Sewage treatment plant information category: including the location, scale, processing capacity, historical data, etc. of the plant. Plot pipe network information category: covering the city's sewer system, key nodes, flow direction, flow, etc. Basic water quality information category: involving basic water quality parameters, such as pH value, total phosphorus, conductivity, etc. Traceability information category: record detailed data of each pollution incident, such as time, location, pollutant concentration, etc.

[0088] Conduct a preliminary review of the collected data and remove redundant and repeated information. Correct possible errors in the data, such as obvious outliers, data deviations caused by equipment errors, etc. Ensure that all data are coherent in time and space, such as ensuring that the data of multiple data points collected at the same time point are consistent.

[0089] In this embodiment, by acquiring basic data, necessary information is provided for subsequent GIS model construction and monitoring station layout; by dividing the traceability range into units, a basis is provided for the subsequent Fréchet distance algorithm; by analyzing the spatiotemporal variation of total phosphorus and conductivity and calculating the correlation between them, a mapping relationship of total phosphorus traced by conductivity is established. Exceeding the standard concentration of pollutants in the influent of a sewage treatment plant is a complex problem that may involve multiple pollution sources and complex pollution transmission pathways. In order to find the real source of pollution, a large amount of data needs to be collected and analyzed. By deploying monitoring equipment and using efficient data transmission and storage methods, these data can be quickly collected. Then, through data review and verification, the accuracy and reliability of the data are ensured. Finally, by analyzing these data, possible sources of pollution can be found and corresponding measures can be taken.

[0090] Water quality prediction is a complex problem involving multiple factors and variables. In order to improve the accuracy of prediction, multiple models need to be used to analyze data. Each model has its advantages and limitations. By integrating them together, the advantages and disadvantages of each other can be complemented to improve the accuracy and stability of prediction. In addition, by optimizing the parameters of the model, the performance of the prediction can be further improved. To this end, the following embodiments are provided.

[0091] like Figure 5 As shown, according to one aspect of the present application, step S4 is further:

[0092] Step S41: construct an ARIMA model to obtain the linear relationship and autocorrelation of water quality data; use the ARIMA model to analyze historical water quality data to identify the linear trend and periodic changes therein. According to the results of the model, determine the autocorrelation of water quality data and possible external interference factors.

[0093] For example, assuming that the water quality data includes indicators such as total phosphorus, ammonia nitrogen, and dissolved oxygen, the ARIMA model can be used to perform time series analysis on each indicator, determine the optimal difference order, autoregression order, and moving average order, and estimate the model parameters to capture the linear relationship and autocorrelation of water quality data and predict water quality change trends in the future.

[0094] Step S42: construct an SSA-CNN-LSTM-Attention model to obtain the nonlinear relationship and long-term dependency of water quality data of N variables, where N is a natural number greater than 2; use the SSA-CNN-LSTM-Attention model to consider N variables (e.g., temperature, pH value, total phosphorus, etc.) to analyze the nonlinear relationship of water quality data. Through the model, determine the mutual influence between these variables and their long-term influence on water quality.

[0095] Assuming that water quality data includes indicators such as total phosphorus, ammonia nitrogen, and dissolved oxygen, the SSA-CNN-LSTM-Attention model can be used to perform deep learning on these indicators. First, the SSA method is used to decompose the water quality data to extract the main components and noise components; then the CNN model is used to extract features of the main components, and the LSTM model is used to extract features of the noise components; finally, the Attention mechanism is used to perform weighted fusion on the outputs of CNN and LSTM, so as to learn the nonlinear relationship and long-term dependency of water quality data and predict the trend of water quality changes in the future.

[0096] Step S43: construct a PMF model to perform factor analysis on water quality data, identify the main factors affecting water quality, and calculate the contribution rate of each factor; determine which factors are the most important.

[0097] Assuming that water quality data include indicators such as total phosphorus, ammonia nitrogen, and dissolved oxygen, the PMF model can be used to perform factor analysis on these indicators. First, the maximum likelihood method is used to estimate the number of factors and the factor loading matrix; then the Monte Carlo method is used to calculate the uncertainty and confidence interval; finally, the factor diagnostic diagram and factor characteristic comparison method are used to identify the main factors affecting water quality, and the contribution rate of each factor is calculated.

[0098] Step S44, construct and use the ASFA method to optimize the parameters of the ARIMA module, the SSA-CNN-LSTM-Attention module and the PMF model to obtain the optimized parameters of each model;

[0099] Assuming that the parameters of the ARIMA module, SSA-CNN-LSTM-Attention module and PMF model are p, q, d, n, k, m, r, s, etc., respectively, the ASFA method can be used to optimize these parameters. First, the artificial fish swarm algorithm is used to generate the initial solution set, and the objective function is constructed according to the prediction error; then the solution set is updated using the iterative search process, and the optimal solution is retained; finally, the optimal p, q, d, n, k, m, r, s and other parameter values ​​are obtained.

[0100] Step S45, construct the weight matrix of the ARIMA module, the SSA-CNN-LSTM-Attention module and the PMF model; determine the weight of each model in the final prediction to make the prediction of the integrated model more accurate.

[0101] Assuming that the ARIMA module, SSA-CNN-LSTM-Attention module and PMF model output the predicted values ​​y1, y2, y3 of indicators such as total phosphorus, ammonia nitrogen, and dissolved oxygen respectively, a 3×3 weight matrix W can be constructed, where Wij represents the weight of the jth module of the i-th indicator, and the value of Wij can be determined based on the prediction error or other evaluation indicators.

[0102] Step S46: Based on the weight matrix and the output results of each model, the final water quality prediction result is given and compared with the monitoring value; the prediction error and evaluation index are calculated.

[0103] Assuming that the ARIMA module, SSA-CNN-LSTM-Attention module and PMF model output the predicted values ​​y1, y2, y3 of indicators such as total phosphorus, ammonia nitrogen, and dissolved oxygen respectively, the weight matrix W and the output results y1, y2, y3 can be used to calculate the final water quality prediction result y, that is, y=Wy1+Wy2+Wy3; then y is compared with the monitoring value x to calculate the prediction error e, that is, e=xy; finally, the evaluation indicators such as root mean square error RMSE, mean absolute error MAE, correlation coefficient R, etc. are calculated based on the prediction error e.

[0104] In this embodiment, the future water quality can be predicted more accurately, so as to better adjust the treatment process and measures. At the same time, through the multi-model integration method, the deviation and error of a single model can be reduced, and the stability and reliability of the prediction can be improved.

[0105] In summary, by using the ARIMA model to process the linear characteristics of water quality data, the accuracy and stability of water quality prediction can be improved; by using the SSA-CNN-LSTM-Attention model to process the nonlinear characteristics of water quality data, the sensitivity and robustness of water quality prediction can be improved; by using the PMF model to identify the main factors affecting water quality, the interpretability and distinguishability of water quality prediction can be improved; by using the ASFA method to optimize the parameters of each module or model, the fitting effect and generalization ability of water quality prediction can be improved; by using the weight matrix to fuse the output results of each module or model, the comprehensiveness and reliability of water quality prediction can be improved.

[0106] According to one aspect of the present application, step S4 further includes:

[0107] Step S47: judging whether there are any key pollutants exceeding the standard based on the water quality monitoring value or the water quality prediction result;

[0108] The key pollutants include at least total phosphorus concentration and electrical conductivity;

[0109] If it exists, call the constructed Fréchet distance pollution source tracing module, use the Fréchet distance algorithm, and locate the key network nodes where the pollution source is located by comparing the similarity between the total phosphorus concentration curve of the water inlet and the total phosphorus concentration or conductivity curve of the network node;

[0110] Step S48: based on the located key pipe network nodes, combined with the pre-stored dynamic water pollution emission list and the plant-network-land-source pointer relationship library, trace back to the specific pollution source type and location, and conduct on-site investigation and evidence collection;

[0111] Step S49: Based on the type and characteristic information of the traced target pollution source, search for cases that meet the corresponding characteristics in the case library, propose targeted control plans based on the cases, and display the traceability results and control plans through a visualization platform.

[0112] In one embodiment, it can be as follows: Detect the water quality of the water source, especially the total phosphorus concentration and conductivity. If any key pollutant is found to exceed the standard, immediately start the pollution source tracing program. Use the Fréchet distance algorithm to compare the total phosphorus concentration curve of the water source with the total phosphorus concentration or conductivity curve of each pipe network node in the city. According to the similarity of the curves, determine the key pipe network nodes where the pollutants may come from. According to the previously located key pipe network nodes, consult the pre-stored dynamic water pollution emission list. Combined with the plant-network-plot-source pointer relationship library, determine the possible source of pollutants, such as a specific factory, farmland, etc. Conduct on-site investigation and evidence collection to verify the accuracy of the tracing results. According to the type and characteristics of the traced pollution source, search for relevant cases in the case library. Combined with these cases, propose targeted control plans, such as adding sewage treatment facilities, improving agricultural fertilization methods, etc. Use a visualization platform to display the traceability results and control plans so that decision makers and the public can understand the situation and response measures of the pollution source.

[0113] In this embodiment, the source of water pollution can be traced quickly and accurately, providing strong technical support for decision makers. By taking targeted control measures, water pollution can be effectively reduced to ensure the safety of drinking water for residents.

[0114] According to one aspect of the present application, step S33 further includes:

[0115] Step S33a, classifying the monitoring stations by their attributes and dividing the monitoring stations in the pipe network;

[0116] Step S33b, unify the longitude and latitude of the monitoring points into the same coordinate system; remove the longitude and latitude sites that cannot be confirmed; programmatically replace the sites with scattered longitude and latitude;

[0117] Step S33c, processing water environment parameter data abnormal values, eliminating a series of abnormal values ​​in the monitoring data, including null values, 0 values, negative values, 0.345 monitoring values ​​and maximum and minimum abnormal values;

[0118] Step S33d, through programming, time matching is performed for sites with different monitoring start and end times; data for sites that enter different stable monitoring states are deleted; and data in different intervals that are missing due to equipment problems are filled with mean values ​​according to the upper and lower time series.

[0119] In a certain embodiment, first, the micro-stations are classified by attributes, such as their geographical location (such as close to industrial areas, residential areas or farmland), main monitoring functions (such as only monitoring total phosphorus or conductivity), etc. For example, all micro-stations located in industrial areas are classified into one category, and micro-stations in residential areas are classified into another category. Such classification helps to better understand the data characteristics and differences of different types of stations in subsequent analysis. The longitude and latitude of all monitoring points are unified into the WGS 84 coordinate system. For those stations whose coordinates cannot be confirmed, they are directly removed from the data set. Use programming scripts to check any longitude and latitude data, and replace or correct them if they are found to be too different from the positions of surrounding stations. Ensure that the location data of all stations is accurate and consistent, providing an accurate data basis for subsequent spatial analysis. For those stations with different monitoring start and end times, only their common time period data are retained. For data missing due to equipment failure, the mean can be calculated based on the data before and after the station to fill it. Ensure that the data of all stations are complete within the same time range, so that subsequent time series analysis is more accurate.

[0120] According to one aspect of the present application, in step S47, the process of constructing and using the Fréchet distance pollution tracing module is further as follows:

[0121] Step S47a, constructing a water pollution source tracing model for sewage treatment plants in the study area based on the Fréchet distance algorithm;

[0122] There are three sewage treatment plants A1, B1, and C1 in a certain study area, corresponding to three subunits A, B, and C respectively. Then, the Fleche distance algorithm can be used to construct a three-layer water pollution source tracing model, where the first layer is the sewage treatment plant layer, the second layer is the first-class monitoring station layer, and the third layer is the second-class monitoring station layer. In each layer, the Fleche distance algorithm can be used to calculate the similarity between different nodes, thereby determining the node where the pollution source is located.

[0123] Step S47b, combining the total phosphorus data of the sewage treatment plant, selecting the period when the total phosphorus exceeds the standard as a source tracing event;

[0124] Assuming that the total phosphorus emission standard of sewage treatment plant A1 is 0.5 mg / L, the time period when the total phosphorus exceeds 0.5 mg / L can be found from the monitoring data of A1 as the time range of a tracing event.

[0125] Step S47c, in combination with the selected sewage treatment plant total phosphorus exceeding standard time period, according to the pipe network distance and water flow velocity from each first-class monitoring station to the sewage treatment plant, the time period for selecting total phosphorus data for each first-class monitoring station is calculated; according to the pipe network distance and water flow velocity from each second-class monitoring station to the first-class monitoring station, the time period for selecting conductivity data for each second-class monitoring station is calculated;

[0126] Assuming that the total phosphorus exceeds the standard during the period of 9:00-10:00 in A1, the time period for selecting total phosphorus data at the first-class monitoring stations A2, A3, A4, etc. can be deduced based on the pipe network distance and water flow rate from A1 to the first-class monitoring stations A2, A3, A4, etc., such as 8:50-9:50 for A2, 8:40-9:40 for A3, 8:30-9:30 for A4, etc.; then, based on the pipe network distance and water flow rate from the first-class monitoring stations A2, A3, A4, etc. to the corresponding multiple second-class monitoring stations, the time period for selecting conductivity data at each second-class monitoring station can be deduced, such as 8:45-9:45 for A21, 8:40-9:40 for A22, 8:35-9:35 for A31, etc.

[0127] Step S47d, performing maximum-minimum normalization processing on the selected total phosphorus concentration data of the sewage treatment plant inlet, the total phosphorus concentration and conductivity data of the first-category monitoring station, and the conductivity data of the second-category monitoring station to eliminate the influence of the indicator dimension difference on the traceability result;

[0128] Assuming that the total phosphorus concentration data at the selected sewage treatment plant inlet is y1=[0.6, 0.7, 0.8, 0.9, 0.7] mg / L, the maximum-minimum normalization formula y1'=(y1-min(y1)) / (max(y1)-min(y1)) can be used to convert it into y1'=[0, 0.25, 0.5, 0.75, 0.25]; similarly, the same processing can be performed on the data of other indicators to obtain normalized data.

[0129] Step S47e, based on the Fréchet distance pollution source tracing algorithm, calculate the Fréchet distance between the total phosphorus concentration curve of the sewage treatment plant and the total phosphorus concentration curve of the first-category monitoring station, and find the first-category monitoring station with the smallest distance; calculate the Fréchet distance between the conductivity of the first-category monitoring station and the corresponding conductivity of multiple second-category monitoring stations in the logical pointer relationship library again, and find the second-category monitoring station with the smallest distance;

[0130] Assuming that the total phosphorus concentration curve of sewage treatment plant A1 is y1'=[0,0.25,0.5,0.75,0.25], and the total phosphorus concentration curves of the first-class monitoring stations A2, A3, and A4 are y2'=[0.1,0.2,0.4,0.6,0.2], y3'=[0.2,0.3,0.5,0.7,0.3], and y4'=[0.3,0.4,0.6,0.8,0.4], then the Fréchet distance formula d(y1',y2')=sqrt(sum((y1'-y2').^2)) can be used to calculate the total phosphorus concentration of sewage treatment plant A1. The Fleche distances between plant A1 and the first-category monitoring stations A2, A3, and A4 are d(y1', y2') = 0.11, d(y1', y3') = 0.22, and d(y1', y4') = 0.33, respectively, so the first-category monitoring station A2 with the shortest distance is found; then, according to the logical pointer relationship library, multiple second-category monitoring stations A21, A22, etc. corresponding to A2 are found, and the Fleche distances between them and A2 are calculated, such as d(A2, A21) = 0.05, d(A2, A22) = 0.15, etc., so the second-category monitoring station A21 with the shortest distance is found.

[0131] Step S47f, combining the plant-grid-land-source connectivity logic pointer library, find the drainage land and sewage-discharging enterprise corresponding to the second type of monitoring station, and identify the pollution source through manual investigation.

[0132] If the drainage area corresponding to the second-class monitoring station A21 is D21 and the pollutant-discharging enterprise is E21, then the pollution source causing the excessive total phosphorus can be found out through manual inspection of the discharge conditions of D21 and E21.

[0133] In this embodiment, by constructing a water pollution source tracing model of the sewage treatment plant in the study area based on the Frechet distance algorithm, the quantitative calculation of the similarity between nodes at different levels can be realized, so as to quickly locate the key pipe network nodes where the pollution source is located. By combining the total phosphorus data of the sewage treatment plant and selecting the period of total phosphorus exceeding the standard as a source tracing event, the temporal and spatial scope of abnormal water inflow of the sewage treatment plant can be determined, thereby narrowing the scope of tracing and improving the efficiency of tracing. By combining the selected period of total phosphorus exceeding the standard of the sewage treatment plant, according to the pipe network distance and water flow rate from each monitoring station to the sewage treatment plant, the time period of data to be selected by each monitoring station is calculated, and the time synchronization of the monitoring data can be achieved, thereby eliminating the influence of time delay on the tracing results. By performing maximum and minimum normalization processing on the selected monitoring data to eliminate the influence of indicator dimension differences on the tracing results, the standardized processing of the monitoring data can be achieved, thereby improving the comparability and credibility of the tracing results. By using the Fréchet distance algorithm to calculate the Fréchet distance between the total phosphorus concentration curve of the sewage treatment plant and the total phosphorus concentration curve of the first-class monitoring station, the first-class monitoring station with the smallest distance is found; the Fréchet distance between the conductivity of the first-class monitoring station and the corresponding conductivity of multiple second-class monitoring stations in the logical pointer relationship library is calculated again to find the second-class monitoring station with the smallest distance, which can achieve accurate positioning of the node where the pollution source is located, thereby reducing the traceability error and uncertainty. By combining the plant-network-plot-source connectivity logical pointer library, the drainage plot and sewage-discharging enterprise corresponding to the second-class monitoring station are found, and the pollution source is found through manual investigation, which can achieve clear identification of the type and location of the pollution source, thereby improving the accuracy and effectiveness of traceability.

[0134] For example, in a sewage treatment plant A in a certain city, it was recently found that the total phosphorus concentration at the water inlet often exceeded the standard. In order to find the pollution source, it was decided to use the Fréchet distance tracing module. First, based on the Fréchet distance algorithm, a water pollution tracing model for sewage treatment plant A was constructed. This model can determine which data is most similar to the data of sewage treatment plant A by comparing the curve shapes of different data. Combined with the total phosphorus data of the sewage treatment plant, it was determined that 10:00 to 15:00 last Friday was an exceeding period, which was used as the research object of this tracing event. Considering the flow rate of water in the pipeline and the actual distance of the pipeline network, it was calculated that the total phosphorus data of the first-class monitoring station 1 should be selected from 9:30 to 14:30 last Friday, and the data of the first-class monitoring station 2 should be selected from 9:45 to 14:45 last Friday; the conductivity data of the second-class monitoring stations A and B were selected from 9:15 to 14:15 and 9:00 to 14:00 respectively. Through calculation, it was found that the total phosphorus data of the first-class monitoring station 1 was most similar to the data of sewage treatment plant A. Then, the conductivity data was compared and it was found that the data of the second-category monitoring station A was closest to the data of the first-category monitoring station 1. According to the connected logic pointer library, it was determined that the drainage plot corresponding to the second-category monitoring station A was plot X, and the sewage discharge enterprise under this plot was Company Y. After manual investigation, it was finally determined that Company Y was the pollution source of this pollution incident.

[0135] According to one aspect of the present application, step S49 further includes:

[0136] Step S49a, obtaining the type and characteristic information of the traced target pollution source, including emission substances, emission amount, emission time and emission location, and matching it with the pollution source information in the case library to find the most similar or most relevant case;

[0137] Step S49b: Based on the most similar or relevant cases found, take the control measures that can be taken, including limiting emissions, improving processes, and strengthening supervision; and formulate targeted control plans based on actual conditions, including setting emission standards, installing online monitoring equipment, and imposing environmental fines;

[0138] Step S49c: Use the visualization platform to display the traceability results and control plans to relevant personnel or departments, including sewage treatment plants, environmental protection bureaus and the public, in the form of charts, maps, animations, etc., and provide corresponding data support and analysis reports.

[0139] In order to illustrate the technical idea of ​​the present application, a simplified embodiment is provided, which includes the following steps:

[0140] Step S1, dividing the water supply range of the sewage treatment plant into units, studying the time course variation law, spatial distribution and evolution law of total phosphorus and conductivity and the correlation between the two; Step S1 also includes:

[0141] Step S11, understanding the general situation of the study area, including geographical location, area, population, climate, rainfall, water system and pipe network system;

[0142] Step S12, understanding the conditions of enterprises and water quality monitoring stations within the water supply range of the sewage treatment plant;

[0143] Step S13, using a time series statistical analysis method based on the monitoring data of the monitoring site to study the temporal variation law of total phosphorus and conductivity;

[0144] Step S14, using GIS to study the spatial distribution and evolution of total phosphorus and electrical conductivity;

[0145] Step S15: Analyze the correlation between total phosphorus and conductivity using the Pearson correlation coefficient.

[0146] The change in conductivity is related to the content of dissolved solids in the water body. The greater the content, the higher the conductivity. At the same time, the monitoring of conductivity requires much less equipment at the monitoring station than other water quality indicators. Therefore, in this embodiment, the relationship between total phosphorus and conductivity in the study area is analyzed to determine whether conductivity can be used to indicate the total phosphorus index within the water supply range of the sewage plant.

[0147] Step S2: Use GIS combined with field research to determine the location, automatic detection indicators and frequency, and propose a method for deploying micro-stations for pipe network water quality monitoring; secondly, formulate a plan for building a pollution source monitoring network for sewage treatment plants based on the proposed deployment method; and construct a “plant-network (first-class monitoring station-second-class monitoring station)-plot-source” pointer relationship library;

[0148] The step S2 is further as follows:

[0149] Step S21, using GIS combined with field research to determine the location of the deployment, based on the research in the previous step, the automatic detection index and frequency are determined, and a method for deploying micro-stations for water quality monitoring in the pipe network is proposed;

[0150] The step S21 is further as follows:

[0151] Step S21a, establish a "nine-node" water quality online monitoring system in the study area, including pollution sources, drainage plots, important nodes of sewage pipe networks, water inlets of domestic sewage treatment plants, water inlets of industrial sewage treatment plants, sewage outlets into rivers, sewage outlets into the sea, river monitoring sections and ocean monitoring points, to achieve full coverage of automatic online monitoring of water pollution from generation, treatment to discharge;

[0152] Step S21b, identify important nodes of the drainage network through GIS, and install online water quality monitoring equipment. The optional indicators for automatic monitoring include: COD, ammonia nitrogen, pH, conductivity, liquid level, flow and other water quality and hydrological indicators, and collect data about every 15 minutes. Select appropriate monitoring factors, analyze the water quality characteristics of drainage from various industries, form an industry discharge water quality fingerprint library, and further guide the layout and development of micro stations;

[0153] Step S21c, during the layout of the pipe network node microstation, the water-related enterprises in the drainage plot units in the study area are investigated and surveyed to understand the key drainage enterprises, scattered water-related enterprises, and industry characteristics of water-related enterprises in the drainage plots. In addition, the field survey found that the collected spatial vector data such as drainage plots and pipe networks need to be further verified and optimized, and the locations of pipe networks, interception wells and inspection wells corresponding to some drainage plots should be re-determined. The layout of the surface water quality monitoring microstation is to conduct a field survey of the surface water conditions in the region to understand its actual situation, laying the foundation for the reasonable layout of monitoring sites and data analysis.

[0154] In this embodiment, GIS is used to identify important nodes of the drainage network and install online water quality monitoring equipment. Important nodes mainly include drainage ends of drainage units, main nodes where sewage enters sewage trunk pipes and important sewage branches, important gates, sewage interception wells, water level mutation locations, important discharge outlets, sewage treatment plant inlets, and inspection wells where the total discharge outlets of industrial clusters are connected to the public drainage network. Under the premise of meeting the economy, feasibility, and equipment operation stability of the installation and maintenance of monitoring equipment, the locations where online monitoring equipment such as pipe network inspection wells, interception wells, and sewage outlets are suitable for installation are spatially superimposed and compared with the above-mentioned important nodes, and the coverage of the important nodes of the drainage network at the installable locations is evaluated, and the layout location is optimized to achieve rapid tracing back to the relevant drainage plots when the operation of the sewage treatment plant is impacted, and then traced back to the relevant enterprises that caused the accident (the traceability methods of enterprises that have installed and have not installed micro stations are different).

[0155] In this embodiment, the selectable indicators for automatic monitoring include: water quality and hydrological indicators such as COD, ammonia nitrogen, pH, conductivity, liquid level, flow, etc., and data is collected every 15 minutes. Select appropriate monitoring factors based on factors such as application scenarios, industry characteristics of water pollutants discharged into the pipe network in the region, and actual conditions of the pipe network. Regarding the relationship between industry characteristic pollution analysis and micro-station layout, analyze the water quality characteristics of drainage from various industries (including main indicator pollution factors, concentrations, discharge time characteristics, etc.) to form an industry discharge water quality fingerprint library, which further guides the layout and development of micro-stations.

[0156] Step S22: According to the distribution of plots within the sewage treatment plant's pollution range and the distribution of key drainage households, several pipe network water quality monitoring microstations are deployed, which are divided into two categories, A and B. The monitoring indicators of Class A microstations are pH value, conductivity, total phosphorus, flow rate, and liquid level; the monitoring indicators of Class B microstations are pH value, conductivity, and liquid level.

[0157] Step S23, establish a "plant-network (first-category monitoring station-second-category monitoring station)-plot-source" pointer relationship library for the research object sewage treatment plant and its pollution receiving range. This result provides a "plant-network-plot-source" traceability chain for subsequent abnormal water inflow tracing research of sewage treatment plants.

[0158] There is a clear logic between the elements of sewage treatment plants, sewage pipe networks, key nodes, secondary nodes, drainage unit plots, and enterprise sources. The sewage treatment plant pollution source tracing monitoring network established in this embodiment sorts out the logical pointer relationship between sewage treatment plants-pipe networks (first-class monitoring stations-second-class monitoring stations)-plots-sources, and constructs a four-part pointer relationship library. Clarify the plot areas and upstream and downstream connectivity relationships corresponding to the monitoring stations within the pollution range of the sewage treatment plant, divide them into different levels of pipeline logical relationships, and form a grid management pattern combining points, lines, and surfaces. When a sewage treatment plant or a key node of the pipe network is suddenly impacted by high-concentration sewage, it is convenient to trigger the tracing model, check the abnormal conditions of abnormal sites and the plots to which they belong, so as to find the source of the abnormality, discover the cause of the abnormality, and gradually narrow the scope of tracing. At the same time, it can provide guidance for subsequent source control.

[0159] Step S3: Collect data related to the study area and pollution sources, and clean and manage the data; build a database containing sewage treatment plant information, plot pipe network information, basic water quality information and traceability information; connect the collected data and the constructed database to the pollutant traceability visualization platform of the study area;

[0160] Step S31: To ensure the accuracy and rationality of the micro-station monitoring data, the micro-stations of the sewage treatment plant corresponding to the pipeline nodes, the micro-stations of each water-related enterprise, the water quality monitoring data of the sewage treatment plant water inlet, the rainfall data, and other data representing the impact on the sewage treatment plant concentration are reviewed and verified, with the aim of deleting redundant and repeated information, correcting errors in the water quality monitoring data, and ensuring data consistency;

[0161] The step S31 is further as follows:

[0162] Step S31a, classify the monitoring stations by attributes. Divide the monitoring stations in the pipe network, such as main pipes, trunk pipes, and micro stations at the nodes of the trunk pipes, and distinguish their attributes;

[0163] Step S31b, verify the longitude and latitude. The cleaning principles include: unifying the longitude and latitude of the monitoring points into the same coordinate system; eliminating the longitude and latitude sites that cannot be confirmed; and replacing the sites with scattered longitude and latitude by programming;

[0164] Step S31c, process water environment parameter data abnormal values. Eliminate a series of abnormal values ​​in the monitoring data, including null values, 0 values, negative values, 0.345 monitoring values, and maximum and minimum abnormal values;

[0165] Step S31d, time-space data consistency processing. Through programming, the time sequence of sites with different monitoring start and end times is matched; the data of sites that enter different stable monitoring states are deleted; the data in different intervals that are missing due to equipment problems are filled with the mean according to the upper and lower time sequences.

[0166] Step S32: Use MySQL 8.0 to design the database. The data stored in the table database includes online monitoring data access and data collection from other departments.

[0167] Step S33: using a data transmission method based on TCP / IP, the monitoring data collected by the monitoring equipment is sent to the GPRS module via the RS232 serial interface. The GPRS module repackages the collected data according to the TCP / IP communication protocol format and transmits it to the database via the GPRS wireless data communication network.

[0168] The data communication system is responsible for the reception and command communication of remote data of the entire sewage network water quality automatic monitoring station. In remote data transmission, the stability, correctness and security of data transmission are the key to the entire application system. When designing the system, it is crucial to select a network platform with fast transmission speed, stable operation, safe and reliable data transmission, and wide business coverage. Therefore, in this embodiment, a data transmission method based on TCP / IP is adopted, and the received message is decoded using the HJ212 protocol. The HJ212 protocol is a string protocol. The data transmission communication package is mainly composed of a packet header, a data segment length, a data segment, a CRC check, and a packet tail. The "data segment" content includes a request code, a system code, a command code, a password, a device unique identifier, a total number of packets, a packet number, and a command parameter. The request code is the timestamp of the request, the system code ST is uniformly specified as 22, the command code CN is the time type of the data packet, the access password and the device unique identifier are provided by the platform when docking, and the command parameter is the data content.

[0169] Step S34, designing a database table, the database includes a sewage treatment plant information class, a plot pipe network information class, a basic water quality information class, and a traceability information class.

[0170] The database includes sewage treatment plant information, plot pipe network information, basic water quality information and traceability information. Among them, the sewage treatment plant information includes the basic information table of the sewage plant and the monitoring data table of the sewage plant water inlet; the plot pipe network information mainly includes the basic information table of the drainage plot; the basic water quality information includes the basic information table of Class A monitoring stations, the basic water quality monitoring data table of Class A monitoring stations, the basic information table of Class B monitoring stations, the basic water quality monitoring data table of Class B monitoring stations, the information table of key drainage households monitoring stations (Class C stations), the basic information table of key drainage households, and the basic monitoring data table of key drainage households monitoring stations (Class C stations); the traceability information includes the statistics table of the pipe network length of the first-class monitoring station to the sewage treatment plant to which it belongs, the statistics table of the pipe network length and required time of the second-class monitoring station to which it belongs, and the traceability result table of pipe network water quality pollution.

[0171] Step S35: Connect the above collected data and constructed database to the pollutant source tracing visualization platform to realize the visualization of relevant information of the sewage treatment plant.

[0172] Step S4: construct a water pollution (TP) source tracing model for sewage treatment plants in the study area based on the Fréchet distance algorithm; select the incident of excessive total phosphorus at the water inlet of the sewage treatment plant to conduct source tracing research; embed the water pollution source tracing model for sewage treatment plants based on the Fréchet distance algorithm into its pollutant source tracing visualization platform to realize the visualization of excessive total phosphorus concentration in sewage treatment plants. Step S4 is further as follows:

[0173] Step S41, constructing a water pollution (TP) source tracing model of sewage treatment plants in the study area based on the Fréchet distance algorithm;

[0174] Fréchet distance is a path space similarity description proposed by French mathematician Maurice René Fréchet in 1906. It is an algorithm for calculating the distance between two curves and is used to determine the similarity between the two curves. The smaller the calculated result, the higher the similarity. In this embodiment, the smaller the Fréchet distance, the higher the similarity between the two water quality change curves. In other words, the more similar the water quality change characteristics of the two stations are.

[0175] Step S42: Conduct source tracing research on the total phosphorus exceeding the standard at the sewage treatment plant inlet, find the key pipe network nodes, and further trace the source to the drainage plots and the drainage enterprises involved by combining the pointer relationship of "plant-network (first-class monitoring station-second-class monitoring station)-plot-source" of the sewage treatment plant;

[0176] The step S42 is further as follows:

[0177] Step S42a, combining the total phosphorus data of the sewage treatment plant, selecting the period when the total phosphorus exceeds the standard as a source tracing event;

[0178] Step S42b: Combined with the selected time period when the total phosphorus exceeds the standard in the sewage treatment plant, the time period for which the total phosphorus data should be selected for each first-class monitoring station is calculated based on the pipe network distance and water flow rate from each first-class monitoring station to the sewage treatment plant. Similarly, the time period for which the conductivity data should be selected for each second-class monitoring station is calculated based on the pipe network distance and water flow rate from each second-class monitoring station to the first-class monitoring station;

[0179] Step S42c, performing maximum-minimum normalization processing on the total phosphorus concentration data of the selected sewage treatment plant inlet, the total phosphorus concentration and conductivity data of the first-category monitoring station, and the conductivity data of the second-category monitoring station to facilitate the subsequent application of the Fréchet distance model and eliminate the influence of the indicator dimension difference on the traceability result;

[0180] Step S42d: Based on the Fréchet distance pollution source tracing algorithm, the Fréchet distance between the total phosphorus concentration curve of the sewage treatment plant and the total phosphorus concentration curve of the first-class monitoring station is calculated to find the first-class monitoring station with the smallest distance. Similarly, the Fréchet distance between the conductivity of the first-class monitoring station and the corresponding conductivity of multiple second-class monitoring stations in the logical pointer relationship library is calculated again to find the second-class monitoring station with the smallest distance.

[0181] Step S42e: Combine the previously sorted connectivity logic pointer library to find the drainage plots and sewage-discharging enterprises corresponding to the second-category monitoring station, and identify the pollution sources through manual investigation.

[0182] In this embodiment, the main idea of ​​the research on tracing the source of excessive total phosphorus in sewage treatment plants is as follows: when the total phosphorus concentration in the sewage treatment plant influent exceeds the standard alarm, the Fréchet distance pollution source tracing algorithm is triggered, and the Fréchet distance of water quality changes from the key node (first-class monitoring station) to the sewage treatment plant is determined based on the connectivity logic pointer library of the sewage treatment plant-pipeline network (first-class monitoring station-second-class monitoring station)-land plot-enterprise source, the length and flow rate of the pipeline network from each node to the sewage treatment plant, and other information, and the most similar key nodes are traced; taking the first-class monitoring station with the shortest Fréchet distance as the starting point, the Fréchet distance is calculated again based on the association attributes of the key node (first-class monitoring station)-secondary node (second-class monitoring station) to determine the position of the secondary node causing the pollution of the key node; after finding the second-class monitoring station, the corresponding drainage plot and sewage-discharging enterprise are found in combination with the connectivity logic pointer library, and the pollution source is found through manual investigation.

[0183] Step S43, connecting the constructed Fréchet distance algorithm to the pollutant source tracing visualization platform, combined with the real-time monitoring data in the database, can realize the automatic tracing of the excessive total phosphorus concentration at the sewage treatment plant inlet and the visualization of the tracing results.

[0184] According to another aspect of the present application, a system for tracing the source of abnormal water inflow in a sewage treatment plant based on the Fréchet distance is provided, which is characterized by comprising:

[0185] at least one processor; and

[0186] a memory communicatively connected to at least one of the processors; wherein,

[0187] The memory stores instructions that can be executed by the processor, and the instructions are used to be executed by the processor to implement any of the above-mentioned methods for tracing the source of abnormal water inflow in a sewage treatment plant based on the Fréchet distance.

[0188] The preferred embodiments of the present invention are described in detail above; however, the present invention is not limited to the specific details in the above embodiments. Within the technical concept of the present invention, various equivalent transformations can be made to the technical solutions of the present invention, and these equivalent transformations all belong to the protection scope of the present invention.

Claims

1. A method for tracing the source of abnormal water inflow in a sewage treatment plant based on Fréchet distance, characterized in that: The steps include: Step S1, determine the traceability range of the sewage treatment plant and obtain basic data, divide the traceability range into units to form at least two sub-units; Step S2, read the basic data and build a GIS model for each sub-unit within the tracing range, analyze the GIS model and determine the layout plan of the monitoring stations, generate a plant-network-plot-source pointer relationship library based on the layout plan, and build a pollution tracing monitoring network; Step S3: Collect and obtain monitoring data of pollution sources through the pollution source tracing monitoring network, and build a basic database including sewage treatment plant information, plot pipe network information, basic water quality information and tracing information; Step S4, extracting water quality data from the monitoring data and spatial features from the GIS model as tracing input data, constructing a water quality prediction module and a Fréchet distance pollution tracing module, and outputting the calculation results to the pollutant tracing visualization platform to achieve tracing visualization of the total phosphorus concentration exceeding the standard in the sewage treatment plant; The step S4 is further as follows: Step S41, constructing an ARIMA model to obtain the linear relationship and autocorrelation of water quality data; Step S42: construct an SSA-CNN-LSTM-Attention model to obtain the nonlinear relationship and long-term dependency of water quality data of N variables, where N is a natural number greater than 2; Step S43: construct a PMF model to perform factor analysis on water quality data, identify the main factors affecting water quality, and calculate the contribution rate of each factor; Step S44, construct and use the ASFA method to optimize the parameters of the ARIMA module, the SSA-CNN-LSTM-Attention module and the PMF model to obtain the optimized parameters of each model; Step S45, constructing the weight matrix of the ARIMA module, the SSA-CNN-LSTM-Attention module and the PMF model; Step S46: Based on the weight matrix and the output results of each model, the final water quality prediction result is given and compared with the monitoring value; the prediction error and evaluation index are calculated; Step S47: judging whether there are any key pollutants exceeding the standard based on the water quality monitoring value or the water quality prediction result; The key pollutants include at least total phosphorus concentration and electrical conductivity; If it exists, call the constructed Fréchet distance pollution source tracing module, use the Fréchet distance algorithm, and locate the key network nodes where the pollution source is located by comparing the similarity between the total phosphorus concentration curve of the water inlet and the total phosphorus concentration or conductivity curve of the network node; Step S48: based on the located key pipe network nodes, combined with the pre-stored dynamic water pollution emission list and the plant-network-land-source pointer relationship library, trace back to the specific pollution source type and location, and conduct on-site investigation and evidence collection; Step S49: Search for cases that meet the corresponding characteristics in the case library according to the type and characteristic information of the target pollution source traced back, propose targeted control plans based on the cases, and display the tracing results and control plans through a visualization platform; In step S47, the process of constructing and using the Fréchet distance pollution source tracing module is further as follows: Step S47a, constructing a water pollution source tracing model for sewage treatment plants in the study area based on the Fréchet distance algorithm; Step S47b, combining the total phosphorus data of the sewage treatment plant, selecting the period when the total phosphorus exceeds the standard as a source tracing event; Step S47c, in combination with the selected sewage treatment plant total phosphorus exceeding standard time period, according to the pipe network distance and water flow velocity from each first-class monitoring station to the sewage treatment plant, the time period for selecting total phosphorus data for each first-class monitoring station is calculated; according to the pipe network distance and water flow velocity from each second-class monitoring station to the first-class monitoring station, the time period for selecting conductivity data for each second-class monitoring station is calculated; Step S47d, performing maximum-minimum normalization processing on the selected total phosphorus concentration data of the sewage treatment plant inlet, the total phosphorus concentration and conductivity data of the first-category monitoring station, and the conductivity data of the second-category monitoring station to eliminate the influence of the indicator dimension difference on the traceability result; Step S47e, based on the Fréchet distance pollution source tracing algorithm, calculate the Fréchet distance between the total phosphorus concentration curve of the sewage treatment plant and the total phosphorus concentration curve of the first-category monitoring station, and find the first-category monitoring station with the smallest distance; calculate the Fréchet distance between the conductivity of the first-category monitoring station and the corresponding conductivity of multiple second-category monitoring stations in the logical pointer relationship library again, and find the second-category monitoring station with the smallest distance; Step S47f, combining the plant-grid-land-source connectivity logic pointer library, find the drainage land and sewage-discharging enterprise corresponding to the second type of monitoring station, and identify the pollution source through manual investigation.

2. The method for tracing abnormal water inflow in a sewage treatment plant based on Fréchet distance according to claim 1, characterized in that: The step S1 is further as follows: Step S11, determine the traceability scope of the sewage treatment plant, and obtain basic data including at least geographical location, geographical elevation, area, population, climate, rainfall, water system, pipe network system and existing monitoring stations; Step S12, dividing the traceability range into units to form at least two sub-units; reading the data of total phosphorus and conductivity from the monitoring data of the existing monitoring station, and using the time series statistical analysis method to study the time course change law of total phosphorus and conductivity; Step S13, analyzing and obtaining the spatial distribution and evolution law of total phosphorus and electrical conductivity, and analyzing the correlation between total phosphorus and electrical conductivity by calculating the Pearson correlation coefficient.

3. The method for tracing the source of abnormal water inflow in a sewage treatment plant based on Fréchet distance according to claim 1, characterized in that: The step S2 is further as follows: Step S21, reading geographic elevation data in basic data, and constructing a GIS model for each subunit within the traceability range; Step S22: Based on the GIS model and pre-stored field survey data, determine the layout location of the monitoring station, determine the monitoring indicators and frequency, and form a layout plan for the monitoring stations of the water quality in the pipe network; the monitoring stations are divided into first-class monitoring stations and second-class monitoring stations. The monitoring indicators of the first-class monitoring stations include pH value, conductivity, total phosphorus, flow rate and liquid level; the monitoring indicators of the second-class monitoring stations include pH value, conductivity and liquid level; Step S23, generate a plant-network-plot-source pointer relationship library for the sewage treatment plants within the traceability range and their pollution receiving range, and build a traceability monitoring network to provide a plant-network-plot-source traceability chain for subsequent abnormal water inflow tracing research of sewage treatment plants.

4. The method for tracing the source of abnormal water inflow in a sewage treatment plant based on Fréchet distance according to claim 1, characterized in that: The step S3 is further as follows: Step S31, collecting and obtaining monitoring data of pollution sources through the pollution source tracing monitoring network; The data transmission method based on TCP / IP is adopted to send the monitoring data collected by the monitoring equipment to the GPRS module via the RS232 serial interface. The GPRS module packages the collected data again according to the TCP / IP communication protocol format and transmits it to the database through the GPRS wireless data communication network. Step S32, designing a database, the database including a sewage treatment plant information class, a plot pipe network information class, a basic water quality information class, and a traceability information class, so as to construct a basic database including sewage treatment plant information, plot pipe network information, basic water quality information, and traceability information; Step S33: Re-examine and verify the water quality monitoring data and rainfall data of the pipeline node monitoring stations corresponding to the sewage treatment plant, the water-related enterprise monitoring stations, and the sewage treatment plant water inlet to delete redundant and repeated information, correct errors in the water quality monitoring data, and verify the consistency of the data.

5. The method for tracing the source of abnormal water inflow in a sewage treatment plant based on Fréchet distance according to claim 4, characterized in that: The step S33 further comprises: Step S33a, classifying the monitoring stations by their attributes and dividing the monitoring stations in the pipe network; Step S33b, unify the longitude and latitude of the monitoring points into the same coordinate system; remove the longitude and latitude sites that cannot be confirmed; programmatically replace the sites with scattered longitude and latitude; Step S33c, processing water environment parameter data abnormal values, eliminating a series of abnormal values ​​in the monitoring data, including null values, 0 values, negative values, 0.345 monitoring values ​​and maximum and minimum abnormal values; Step S33d, through programming, time matching is performed for sites with different monitoring start and end times; data for sites that enter different stable monitoring states are deleted; and data in different intervals that are missing due to equipment problems are filled with mean values ​​according to the upper and lower time series.

6. The method for tracing the source of abnormal water inflow in a sewage treatment plant based on Fréchet distance according to claim 1, characterized in that: The step S49 further comprises: Step S49a, obtaining the type and characteristic information of the traced target pollution source, including emission substances, emission amount, emission time and emission location, and matching it with the pollution source information in the case library to find the most similar or most relevant case; Step S49b: Based on the most similar or relevant cases found, take the control measures that can be taken, including limiting emissions, improving processes, and strengthening supervision; and formulate targeted control plans based on actual conditions, including setting emission standards, installing online monitoring equipment, and imposing environmental fines; Step S49c: Use the visualization platform to display the traceability results and control plans in the form of charts, maps, and animations to relevant personnel or departments, including sewage treatment plants, environmental protection bureaus, and the public, and provide corresponding data support and analysis reports.

7. The abnormal water inflow tracing system of sewage treatment plant based on Fréchet distance is characterized by: include: at least one processor; as well as a memory communicatively connected to at least one of the processors; wherein, The memory stores instructions that can be executed by the processor, and the instructions are used to be executed by the processor to implement the abnormal water inflow tracing method for a sewage treatment plant based on the Fréchet distance as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Pollution discharge and control equipment state studying and judging method based on curve discrete Frechet distance matching

    CN113077174A

  • Drainage pipe network pollution abnormity tracing method based on intelligent Internet of Things

    CN116205592A

Cited By

  • Method and system for tracing new pollutants in geology based on big data analysis

    CN120747331A