Water quality monitoring interference substance intelligent identification method and system

CN120892786BActive Publication Date: 2026-10-30CHINA NAT ENVIRONMENTAL MONITORING CENT
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510997181.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-18
Publication Date
2026-10-30
Estimated Expiration
2045-07-18

AI Technical Summary

Technical Problem

传统的水质监测方法存在以下问题:1、传统方法通常只关注某一类水质指标,如氨氮、总磷等,忽视了环境因素、监测设备及多种关联参数的影响

Benefits of technology

[0060]与现有技术相比,本发明的水质监测干扰物质智能识别方法及系统具有如下有益技术效果中的一者或多者:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120892786B_ABST
    Figure CN120892786B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of water quality monitoring, and relates to a water quality monitoring interference substance intelligent identification method and system.The method comprises the following steps: collecting water quality monitoring data, equipment data and environmental auxiliary data of a water quality monitoring station; obtaining a dynamic threshold value of the water quality monitoring data; obtaining time sequence characteristics and spatial characteristics, fusing the time sequence characteristics and the spatial characteristics to obtain space-time fusion characteristics; removing abnormal data caused by equipment failure or environmental mutation based on the space-time fusion characteristics; reconstructing the space-time fusion characteristics to analyze reconstruction errors and identify abnormal patterns caused by external interference substances based on the reconstruction errors; and identifying interference substances of water quality monitoring in a knowledge graph reasoning manner based on the dynamic threshold value, the space-time fusion characteristics, the abnormal patterns, the water quality monitoring data, the equipment data and the environmental auxiliary data.The method can comprehensively utilize multi-source data, optimize dynamic adjustment of threshold values in the water quality monitoring process, and realize intelligent identification of interference substances.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of water quality monitoring technology, and relates to an intelligent identification method and system for water quality monitoring interference substances. Background Technology

[0002] With the increasing severity of water pollution, water quality monitoring has become an important means of environmental protection. Traditional water quality monitoring methods have the following problems: 1. Traditional methods typically focus only on a single water quality indicator, such as ammonia nitrogen or total phosphorus, neglecting the influence of environmental factors, monitoring equipment, and various related parameters. 2. Traditional methods usually use fixed thresholds based on historical data, which cannot adapt to complex water quality changes, leading to lag and inaccuracy in monitoring results. 3. Water quality monitoring data is easily interfered with by various external factors (such as rainfall and upstream pollution sources), and traditional methods lack intelligent identification mechanisms to automatically distinguish interfering substances.

[0003] Therefore, there is an urgent need for a new method that can integrate multi-source data, optimize the dynamic adjustment of thresholds in the water quality monitoring process, and achieve intelligent identification of interfering substances. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention proposes an intelligent identification method and system for water quality monitoring interference substances. This system can integrate multi-source data, optimize the dynamic adjustment of thresholds during water quality monitoring, and achieve intelligent identification of interference substances.

[0005] To achieve the above objectives, the present invention provides the following technical solution:

[0006] A method for intelligent identification of interfering substances in water quality monitoring, characterized by comprising the following steps:

[0007] 1) Collect water quality monitoring data, equipment data, and environmental auxiliary data from water quality monitoring stations;

[0008] 2) Based on the statistical distribution of historical water quality monitoring data, determine the baseline threshold of the water quality monitoring data and optimize the baseline threshold based on seasonal changes, watershed characteristics, sudden changes in water quality, equipment status and environmental factors to obtain the dynamic threshold of the water quality monitoring data;

[0009] 3) Temporal features are extracted from the water quality monitoring data and environmental auxiliary data using a temporal convolutional network to obtain temporal features. Spatial features are extracted from the water quality monitoring data using a graph neural network and spatial features are transformed from the environmental auxiliary data using spatial interpolation and watershed association to obtain spatial features. The temporal features and spatial features are then fused to obtain spatiotemporal fusion features.

[0010] 4) Based on the spatiotemporal fusion features, abnormal data caused by equipment failure or sudden environmental changes are removed;

[0011] 5) Reconstruct the spatiotemporal fusion features to analyze the reconstruction error and identify abnormal patterns caused by external interference based on the reconstruction error;

[0012] 6) Based on the dynamic threshold, spatiotemporal fusion features, anomaly patterns, water quality monitoring data, equipment data, and environmental auxiliary data, knowledge graph reasoning is used to identify interfering substances in water quality monitoring.

[0013] Preferably, in step 1), the water quality monitoring data of the water quality monitoring station includes ammonia nitrogen, total phosphorus, turbidity, oxidation-reduction potential, water temperature, and pH value; the equipment data is the equipment detection limit; and the environmental auxiliary data includes rainfall, upstream sewage outlet information, and meteorological data. Furthermore, the collected water quality monitoring data, equipment data, and environmental auxiliary data of the water quality monitoring station are subjected to outlier correction and data standardization processing.

[0014] Preferably, in step 2), optimizing the baseline threshold based on seasonal changes, watershed characteristics, sudden changes in water quality, equipment status, and environmental factors to obtain the dynamic threshold of the water quality monitoring data specifically includes:

[0015] 21) Determine the seasonal adjustment factor SI s and watershed feature weights W basin :

[0016]

[0017] In the formula, SI s Let C be the seasonal adjustment factor for the s-th season. s,y This represents the average value of the water quality monitoring data for the s-th season of year y. The average value of the water quality monitoring data for the entire year of year y is given, and N is the number of years included in the calculation.

[0018]

[0019] In the formula, W basin For the watershed feature weights, F i w is the normalized value of the i-th watershed characteristic factor. i is the weight of the i-th watershed characteristic factor, and m is the number of selected watershed characteristic factors;

[0020] 22) Calculate the water quality mutation factor ΔQ t Equipment state factor D s (t) and environmental association factor E c (t):

[0021]

[0022] In the formula, ΔQ t Let x be the water quality mutation factor at the current time t. t-i and x t-i+1 The data are water quality monitoring data at time ti and time t-i+1, respectively, where Δt is the time step and w is the width of the sliding window.

[0023] D s (t)=1-(ω1·F) err (t)+ω2·M gap (t)+ω3·Q dev (t))

[0024] In the formula, D s (t) is the device state factor at current time t, F err (t) represents the equipment failure rate, M gap (t) represents the time since the last maintenance of the device, Q dev (t) represents the degree of deviation of the equipment's quality control indicators, with ω1, ω2, and ω3 being the weights;

[0025] E c (t)=max j∈EnvVars |Corr Pearson (x t ,e j,t )|,

[0026] In the formula, E c (t) represents the environmental correlation factor at the current time t, x t Let e ​​be the water quality monitoring data at time t. j,t Let be the j-th environmental auxiliary data at time t, and EnvVars be the total number of environmental auxiliary data. Pearson The Pearson correlation coefficient;

[0027] 23) Calculate the dynamic threshold τ(t):

[0028]

[0029] In the formula, τ base The baseline threshold is α(t), β(t), γ(t), and δ(t) are weighting coefficients. It is a Cartesian product.

[0030] Preferably, in step 3), the temporal feature extraction of the water quality monitoring data and environmental auxiliary data using a temporal convolutional network to obtain the temporal features specifically includes:

[0031] 31) A temporal convolutional network is used to convolve the water quality monitoring data and environmental auxiliary data to obtain preliminary temporal features H. t :

[0032] H t =Conv(X t ,θ),

[0033] In the formula, X t This represents the water quality monitoring data and environmental auxiliary data at the current time t, where θ is the convolution kernel parameter and H is the value of H. t These are the initial temporal features after the convolution operation;

[0034] 32) Apply the attention mechanism to automatically identify time points that have a significant impact on water quality changes, and calculate the attention weight α for each time point. t :

[0035]

[0036] In the formula, T is the preliminary time series feature H t The number of, score(H) t ) is based on preliminary time series characteristics H t The calculated scoring function, score(H) t ) = W·H t +b, where W is the weight matrix and b is the bias vector;

[0037] 33) Based on attention weight α t Finally, the weighted summation yields the fused temporal features H. final :

[0038]

[0039] Preferably, in step 3), fusing the temporal features and spatial features to obtain spatiotemporal fused features specifically involves:

[0040] Z t =α·H final +β·H l ,

[0041] In the formula, α and β are weighting coefficients, and H final It is a temporal feature, H l It is a spatial feature.

[0042] Preferably, in step 4), the isolated forest algorithm is used to remove abnormal data caused by equipment failure or sudden environmental changes, and specifically, it involves:

[0043] 41) For each data point x i Calculate the isolation score s(x) i ):

[0044]

[0045] In the formula, h(x) i ) is the data point x i In a random tree, the isolation depth, c(n), is a constant calculated based on the number of samples n, where n is the size of the dataset, and x... i It is the i-th data point in the dataset, which is a spatiotemporal fusion feature;

[0046] 42) By calculating all data points x i The isolation score s(x) i ), and select the data points x with higher scores. i And then remove them.

[0047] Preferably, in step 5), a variational autoencoder is used to reconstruct the spatiotemporal fusion features in order to analyze the reconstruction error.

[0048] Furthermore, the present invention also provides an intelligent identification system for water quality monitoring interfering substances, characterized in that it includes:

[0049] The data acquisition module is used to collect water quality monitoring data, equipment data, and environmental auxiliary data from the water quality monitoring station.

[0050] The dynamic threshold optimization module is used to determine the baseline threshold of the water quality monitoring data based on the statistical distribution of historical data of the water quality monitoring data, and optimize the baseline threshold based on seasonal changes, watershed characteristics, water quality mutations, equipment status and environmental factors to obtain the dynamic threshold of the water quality monitoring data.

[0051] The spatiotemporal feature fusion module is used to extract temporal features from the water quality monitoring data and environmental auxiliary data using a temporal convolutional network to obtain temporal features, extract spatial features from the water quality monitoring data using a graph neural network, and transform the spatial features of the environmental auxiliary data through spatial interpolation and watershed association to obtain spatial features, and fuse the temporal features and spatial features to obtain spatiotemporal fusion features.

[0052] An abnormal data deletion module is used to remove abnormal data caused by equipment failure or sudden environmental changes based on the spatiotemporal fusion features.

[0053] The reconstruction error analysis module is used to reconstruct the spatiotemporal fusion features to analyze the reconstruction error and identify abnormal patterns caused by external interference based on the reconstruction error.

[0054] The interference substance identification module is used to identify interference substances in water quality monitoring based on the dynamic threshold, spatiotemporal fusion features, abnormal patterns, water quality monitoring data, equipment data, and environmental auxiliary data, using knowledge graph reasoning.

[0055] Furthermore, the present invention also provides an intelligent identification device for water quality monitoring interfering substances, characterized in that it includes:

[0056] One or more processors;

[0057] Memory, used to store one or more programs;

[0058] When the one or more programs are executed by the one or more processors, the one or more processors implement the intelligent identification method for water quality monitoring interference substances as described above.

[0059] Finally, the present invention also provides a computer-readable storage medium having a computer program stored thereon, characterized in that, when the program is executed by a processor, it implements the steps of intelligent identification of water quality monitoring interference substances as described above.

[0060] Compared with the prior art, the intelligent identification method and system for water quality monitoring interference substances of the present invention has one or more of the following beneficial technical effects:

[0061] 1. Unlike traditional methods that typically focus on only one type of water quality indicator, this invention integrates multi-source data and considers the influence of environmental factors, monitoring equipment, and various related parameters, resulting in more accurate identification results.

[0062] 2. Unlike traditional methods that typically use fixed thresholds based on historical data, this invention uses dynamic thresholds, which can adapt to complex water quality changes and make the monitoring results more accurate.

[0063] 3. This invention can achieve intelligent identification of interfering substances and automatically distinguish interfering substances, making water quality monitoring results more accurate. Attached Figure Description

[0064] Figure 1 This is a flowchart of the intelligent identification method for water quality monitoring interference substances according to the present invention.

[0065] Figure 2 This is a schematic diagram of the intelligent identification system for water quality monitoring interference substances of the present invention. Detailed Implementation

[0066] Before detailing any embodiment of the invention, it should be understood that the invention, in its application, is not limited to the details of the construction and arrangement of the components set forth in the following description or illustrated in the following figures. The invention can have other embodiments and can be practiced or carried out in various ways. Furthermore, it should be understood that the wording and terminology used herein are for descriptive purposes and should not be considered limiting. The use of “comprising” or “having” and variations thereof is intended to cover the items set forth below and their equivalents, as well as any additional items. Unless otherwise specified or limited, the terms “installation,” “connection,” “support,” and “linkage,” and variations thereof are used broadly and cover both direct and indirect installation, connection, support, and linking. Moreover, “connection” and “linkage” are not limited to physical or mechanical connections or links.

[0067] Furthermore, firstly, in the disclosure of this invention, the terms "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the above terms should not be construed as limiting this invention. Secondly, the term "a" should be understood as "at least one" or "one or more," that is, in one embodiment, the number of an element can be one, while in another embodiment, the number of the element can be multiple. The term "a" should not be construed as a limitation on the quantity.

[0068] To address the shortcomings of existing technologies, this invention provides an intelligent identification method for water quality interference substances based on multi-source data fusion. Through dynamic threshold optimization and other means, it is applicable to tasks such as data processing, anomaly identification, and interference substance identification in automatic water quality monitoring systems.

[0069] Figure 1 A flowchart of the intelligent identification method for water quality monitoring interference substances according to the present invention is shown. Figure 1 As shown, the intelligent identification method for water quality monitoring interference substances of the present invention includes the following steps:

[0070] I. Data Collection.

[0071] In this invention, water quality monitoring data, equipment data, and environmental auxiliary data from water quality monitoring stations are collected.

[0072] Specifically, water quality monitoring data from water quality monitoring stations are collected in real time, including major monitoring indicators such as ammonia nitrogen and total phosphorus. At the same time, related parameters such as turbidity, oxidation-reduction potential (ORP), water temperature, and pH value are acquired and recorded, along with equipment data, i.e., the equipment detection limits (for example, the detection limit for ammonia nitrogen is 0.2 mg / L, and the detection limit for total phosphorus is 0.02 mg / L).

[0073] Acquire environmental auxiliary data, including rainfall, upstream sewage outlet information, meteorological data, etc., to provide multi-dimensional information support.

[0074] Furthermore, in this invention, the collected data can also be preprocessed, including:

[0075] 1. Outlier correction: Use cubic spline interpolation to fill in missing values ​​in the data.

[0076] 2. Data standardization: Z-score normalization is used to standardize the data so that different data scales can be processed uniformly.

[0077] The data preprocessing methods described above are all commonly used methods in the prior art, and for the sake of simplicity, they will not be described in detail here.

[0078] II. Dynamic threshold optimization.

[0079] Based on the statistical distribution of historical water quality monitoring data, a baseline threshold for the water quality monitoring data is determined, and this baseline threshold is optimized based on seasonal variations, watershed characteristics, sudden changes in water quality, equipment status, and environmental factors to obtain a dynamic threshold for the water quality monitoring data. Specifically, this includes:

[0080] 1. Baseline threshold construction.

[0081] Based on the statistical distribution of historical data, the baseline threshold (τ) for each water quality monitoring data was determined. base This provides a basis for subsequent dynamic adjustments.

[0082] 2. Determine the seasonal adjustment factor SI s and watershed feature weights W basin To take into account the impact of seasonal changes and watershed characteristics on water quality.

[0083]

[0084] In the formula, SI s C is the seasonal adjustment factor for the s-th season (spring, summer, autumn, winter). s,y The average value of water quality monitoring data for the s-th season of year y is given. y represents the average value of the water quality monitoring data for the entire year of year y, and N represents the number of years included in the calculation.

[0085]

[0086] In the formula, F i w is the normalized value of the i-th watershed characteristic factor (such as land use ratio, industrial pollution intensity, etc.); i The weight of the i-th watershed characteristic factor can be determined by methods such as expert weighting, entropy weighting, and principal component analysis; m is the number of selected watershed characteristic factors.

[0087] 3. Construction of dynamic adjustment factors.

[0088] (1) Water quality mutation factor (ΔQ) t ): The gradient of water quality monitoring data is calculated using the sliding window method to identify sudden changes in water quality.

[0089]

[0090] Where, ΔQ t x is the water quality mutation factor at the current time t; t-i and x t-i+1 The values ​​represent water quality monitoring data (e.g., ammonia nitrogen concentration) at time ti and time t-i+1, respectively; Δt represents the time step (e.g., hours); and w represents the sliding window width (e.g., 3–6 hours).

[0091] (2) Equipment State Factor (D) s (t)): Based on equipment maintenance records and quality control data, assess the impact of equipment status on water quality monitoring data.

[0092] D s (t)=1-(ω1·F) err (t)+ω2·M gap (t)+ω3·Q dev (t)),

[0093] Among them, D s (t) is the device state factor at current time t; F err (t) represents the equipment failure rate (e.g., number of alarms in the past 24 hours / total number of alarms); M gap (t) represents the time since the last maintenance of the equipment (e.g., hours / day); Q dev (t) represents the degree of deviation of the quality control index (such as the comparison error with redundant sensors); ω1, ω2 and ω3 are the weights of each sub-factor (which can be determined based on experience or training models).

[0094] (3) Environmental correlation factors (E) c (t)): Analyze the correlation between environmental data such as meteorology and hydrology and water quality monitoring data, and dynamically adjust the monitoring threshold.

[0095] Ec (t)=max j∈EnvVars |Corr Pearson (x t ,e j,t )|,

[0096] Among them, E c (t) represents the environmental correlation factor at the current time t; x t Here is the water quality monitoring data at time t; e j,t Here is the j-th environmental auxiliary data at time t; EnvVars is the total number of environmental auxiliary data; Corr Pearson This is the Pearson correlation coefficient.

[0097] 4. Dynamic Threshold Calculation: The real-time dynamic threshold τ(t) is calculated by weighting the above factors. The formula is as follows:

[0098]

[0099] Among them, the coefficients α(t), β(t), γ(t), and δ(t) can be dynamically adjusted through long short-term memory (LSTM) networks or assigned by experts; It is a Cartesian product.

[0100] III. Integration of spatiotemporal features.

[0101] Temporal features are extracted from the water quality monitoring data and environmental auxiliary data using a temporal convolutional network to obtain temporal features. Spatial features are extracted from the water quality monitoring data using a graph neural network, and spatial features are transformed from the environmental auxiliary data using spatial interpolation and watershed correlation to obtain spatial features. Finally, the temporal and spatial features are fused to obtain spatiotemporal fused features, which specifically include:

[0102] 1. Temporal feature extraction.

[0103] Temporal convolutional networks (TCNs) are used to capture long-term dependencies and identify water quality change trends by learning from historical time-series data.

[0104] Given time series data X = [x1, x2, ..., x...] T ],(X=[x1,x2,…,x T [This refers to the sequence of observations over a continuous time dimension of major water quality monitoring data such as ammonia nitrogen, total phosphorus, turbidity, ORP, and water temperature, as well as environmental auxiliary data such as rainfall and meteorology. After standardization and alignment, these data are input into a TCN network for extracting temporal features. The TCN performs convolution operations on the time steps through multiple convolutional layers to generate higher-level preliminary temporal features H.] t :

[0105] Ht =Conv(X t ,θ),

[0106] Among them, X t This represents time series data at current time t, where θ is the convolution kernel parameter and H is the time series data at current time t. t These are the initial temporal features after the convolution operation.

[0107] With preliminary time series characteristics H t This allows for the application of attention mechanisms to automatically identify time points that significantly impact water quality changes. This is achieved by calculating the attention weight α for each time point. t This is used to adjust the influence of each time step.

[0108] Given initial time series features H = [H1, H2, ..., H T The weight calculation formula for the attention mechanism is:

[0109]

[0110] Obtain the attention weight α at each time point t Key time points can be identified using the following methods:

[0111] (1) Threshold method: Select attention weight α t Time points that are greater than the mean or mean + k × standard deviation (e.g., k = 1);

[0112] (2) Sorting method: Sort all α t Sort from high to low and select the top N% (e.g., 10%) of time points.

[0113] These points are defined as the most sensitive or critical time points to current water quality changes, usually corresponding to critical moments of abnormal changes, sudden changes, or pollution input.

[0114] Among them, score(H t ) is based on preliminary time series characteristics H t The scoring function is typically a fully connected layer:

[0115] score(H t ) = W·H t +b,

[0116] Where W is the weight matrix and b is the bias vector.

[0117] Then, based on the attention weight α t Finally, the weighted summation yields the fused temporal features H. final :

[0118]

[0119] 2. Spatial feature extraction.

[0120] A topology map of water quality monitoring stations is constructed based on water flow direction and distance. This topology map represents the spatial structure of the water quality monitoring system through nodes (monitoring stations) and edges (water flow connections or distances between stations). Spatial propagation features are learned using a graph neural network (GNN). GNN can capture complex dependencies between stations and propagate information through convolutional operations on the graph structure, thereby revealing the mutual influences and spatial relationships between monitoring stations. For example, water pollution at one station may affect downstream stations through water flow; the GNN model can capture this spatial propagation effect, providing a more comprehensive perspective for water quality monitoring.

[0121] (1) Modeling of water flow direction.

[0122] In the river flow diagram, a topology based on the flow path is used to represent the connections between monitoring stations. Each monitoring station i is connected to one or more adjacent stations j, with a certain propagation delay Δt. ij The concentration change of a flowing pollutant over time t can be expressed as:

[0123] C i (t)=∑ j∈N(i) [C j (t-Δt ij )·W ij ]+α i (t),

[0124] Among them, C i (t) represents the water quality concentration at the i-th station at time t, N(i) is the set of stations adjacent to station i, and Δt ij The water quality transmission delay from station j to station i, W ij It is the connection weight, representing the intensity or influence of the water flow, α i (t) is the concentration of the water quality at station i.

[0125] (2) GNN spatial modeling.

[0126] Generative Neural Networks (GNNs) propagate information through graph convolution operations. Assume the graph structure of water quality monitoring stations can be represented as G = (V, E), where V is the set of nodes (monitoring stations) and E is the set of edges (spatial dependencies between stations). In each layer of graph convolution, the features of the nodes... Updated to:

[0127]

[0128] in, It is the feature representation of the i-th node in the l-th layer; c is the set of neighboring nodes of node i; ij is the normalization coefficient between nodes i and j, typically used to control the influence of neighbors; W (l) and b (l) σ is the weight matrix and bias term of the l-th layer; σ is the non-linear activation function (such as ReLU). (l) This matrix is ​​constructed by solving the deviation between the real-time water quality monitoring data value x of each station and the corresponding dynamic threshold τ(t). It reflects the influence of the deviation difference between stations on the mutual relationship in an exponential form. The smaller the deviation difference, the greater the correlation weight between stations.

[0129] Therefore, spatial features H of water quality monitoring data can be obtained through graph neural networks (GNNs). l .

[0130] Although environmental auxiliary data itself lacks spatial structure, it can be transformed into spatial features H through spatial interpolation and watershed correlation. l For example, rainfall can be calculated using Thiessen polygon weighting to output the effective rainfall intensity at each station, and land use can be analyzed using buffer zones to obtain the proportion of agricultural / industrial land.

[0131] (3) Space-time combination.

[0132] Since the extracted temporal features are single-site temporal features and the extracted spatial features are multi-site spatial features, cross-site spatiotemporal correlation can simultaneously capture both temporal and spatial features. Therefore, in this invention, spatial-temporal joint can be performed, that is, for the temporal feature H... final and spatial features H l To perform fusion and obtain the spatiotemporal fusion feature Z t :

[0133] Z t =α·H final +β·H l ,

[0134] In the formula, α and β are weighting coefficients, which can be determined by expert assignment; H final It is a temporal feature, H l It is a spatial feature.

[0135] IV. Deletion of Abnormal Data.

[0136] Equipment malfunctions or sudden environmental changes can lead to data anomalies; therefore, it is necessary to detect and delete abnormal data caused by these malfunctions or changes. In this invention, abnormal data caused by equipment malfunctions or sudden environmental changes is removed based on the aforementioned spatiotemporal fusion features.

[0137] Specifically, the isolated forest algorithm is used to identify outlier data points and remove abnormal data caused by equipment failure or sudden environmental changes. The detection targets are global outliers in the spatiotemporal fusion feature matrix. These outliers are not simply single-point data anomalies, but rather anomaly patterns considered from both temporal and spatial dimensions. In practical applications, there are two typical scenarios: one is the chronic drift of equipment. Taking a pH sensor as an example, its performance may gradually decline and slowly fail within 30 days due to aging, wear, etc., but during this process, the data at a single time point may still appear to be within the normal range. The other is a sudden change in regional environment, such as a sudden rainstorm, which can affect multiple monitoring stations simultaneously, causing synchronous anomalies in the data of each station. Global outlier detection is irreplaceable because the data preprocessing in the conventional first step only completes and corrects single-point data, which can mask such gradual anomalies. Since these anomalies present a "compliant" illusion in single-point data, ordinary detection methods based on single-point data are difficult to detect. Only global outlier detection can capture these potential anomalies from the overall perspective of the spatiotemporal fusion feature matrix.

[0138] The basic idea of ​​the Isolation Forest algorithm is to recursively split the data by randomly selecting features until each data point is isolated. i Calculate its isolation score s(x) i The score can be calculated using the following formula:

[0139]

[0140] Where h(x) i ) is the data point x i In a random tree, the isolation depth, c(n), is a constant calculated based on the number of samples n, where n is the size of the dataset, and x... i Let i be the i-th data in the dataset, that is, the i-th spatiotemporal fusion feature.

[0141] By calculating all data points x i The isolation score s(x) i This allows for the filtering out of high-scoring data points (i.e., outliers) to ensure data quality.

[0142] V. Reconstruction Error Analysis.

[0143] The spatiotemporal fusion features are reconstructed to analyze the reconstruction error and identify abnormal patterns caused by external interference based on the reconstruction error.

[0144] In this invention, a variational autoencoder (VAE) is used to reconstruct the spatiotemporal fusion features, analyze the reconstruction error, and further identify abnormal patterns.

[0145] Suppose the input spatiotemporal fusion features are X = [x1, x2, ..., x n The latent variable z is obtained after VAE encoding, and then the data is reconstructed by the decoder. Reconstruction error ∈ i It can be calculated using the following formula:

[0146]

[0147] Where, ∈ i It is the i-th spatiotemporal fusion feature x i The reconstruction error. If ∈ i If it is greater than a certain threshold, it indicates that the spatiotemporal fusion feature x is... i Anomalies may exist. If the reconstruction error increases significantly, it may be due to some external interference causing anomalies in the monitoring data, thus allowing the identification of abnormal patterns caused by external interference.

[0148] VI. Identification of interfering substances.

[0149] Based on the dynamic threshold, spatiotemporal fusion features, anomaly patterns, water quality monitoring data, equipment data, and environmental auxiliary data, knowledge graph reasoning is used to identify interfering substances in water quality monitoring.

[0150] In this invention, a knowledge base of interfering substances containing over 300 entity relationships is first constructed. This knowledge base is a structured dataset storing original knowledge in the field of water quality interference, including literature, experimental reports, historical cases, and expert experience, and its content covers:

[0151] (1) Material property library: stores the chemical properties of interfering substances (such as the oxidizing threshold of sodium hypochlorite);

[0152] (2) Reaction rule library: Stores descriptions of interference mechanisms (e.g., "Turbidity > 50 NTU leads to inhibition of total phosphorus color development");

[0153] (3) Case event database: Stores process records and handling plans for typical pollution events.

[0154] Then, the knowledge graph transforms the content of the interfering knowledge base into a machine-readable reasoning network through semantic modeling. Its construction is divided into two stages:

[0155] 1. Pre-construction stage.

[0156] The core content of the interfering substance knowledge base was extracted manually to construct an initial spectral framework, including: more than 50 entities (interfering substances / monitoring parameters / equipment types); more than 20 relationships (inhibition / catalysis / enhancement, etc.); and basic rules (such as <oxidant, inhibition, ammonia nitrogen color development>).

[0157] 2. The specific construction stage of the knowledge graph.

[0158] First, entity identification (such as sites, pollutants, enterprises, and risk events) is performed, then relationship construction (such as time dependence, causal influence, and spatial proximity) is carried out, and finally, an RDF or graph database structure, i.e., a knowledge graph, is generated.

[0159] For example, if IF ammonia nitrogen < 0, turbidity < threshold A, and ORP > 450 mV, it indicates oxidant interference (confidence level 0.85); or if IF total phosphorus fluctuation > 30%, water temperature change, and rainfall > 50 mm, it indicates non-point source pollution interference (confidence level 0.78).

[0160] In the knowledge graph reasoning process, the input data includes dynamic thresholds, spatiotemporal fusion features, anomaly patterns, water quality monitoring data, equipment data, and environmental auxiliary data. For example, combining spatiotemporal fusion features and environmental auxiliary data (such as rainfall) to infer possible types of interfering substances involves the following steps:

[0161] (1) Identify key indicators: Based on the spatiotemporal fusion features, extract features closely related to interfering substances, such as ammonia nitrogen, turbidity, ORP, total phosphorus fluctuations, etc.

[0162] (2) Inference engine triggering rules: When these relevant features satisfy certain inference rules, the inference engine triggers the corresponding rules. For example, if ammonia nitrogen is detected to be less than zero and turbidity is below threshold A, while the ORP value is higher than 450mV, the oxidant interference rule is triggered.

[0163] (3) Generate inference results: Output the type of interfering substance and confidence level, such as the main interference type: (oxidant interference, confidence level 0.88, specific substance (sodium hypochlorite / ozone)).

[0164] Figure 2 A schematic diagram of the intelligent identification system for water quality monitoring interference substances of the present invention is shown. Figure 2 As shown, the intelligent identification system for water quality monitoring interference substances of the present invention includes:

[0165] 1. Data acquisition module.

[0166] The data acquisition module is used to collect water quality monitoring data, equipment data, and environmental auxiliary data from the water quality monitoring station.

[0167] 2. Dynamic threshold optimization module.

[0168] The dynamic threshold optimization module is used to determine the baseline threshold of the water quality monitoring data based on the statistical distribution of historical data of the water quality monitoring data, and optimize the baseline threshold based on seasonal changes, watershed characteristics, water quality abrupt changes, equipment status and environmental factors to obtain the dynamic threshold of the water quality monitoring data.

[0169] 3. Spatiotemporal feature fusion module.

[0170] The spatiotemporal feature fusion module is used to extract temporal features from the water quality monitoring data and environmental auxiliary data using a temporal convolutional network to obtain temporal features, extract spatial features from the water quality monitoring data using a graph neural network, and transform the spatial features of the environmental auxiliary data through spatial interpolation and watershed association to obtain spatial features, and fuse the temporal features and spatial features to obtain spatiotemporal fusion features.

[0171] 4. Abnormal data deletion module.

[0172] The abnormal data deletion module is used to remove abnormal data caused by equipment failure or sudden environmental changes based on the spatiotemporal fusion features.

[0173] 5. Reconstruct the error analysis module.

[0174] The reconstruction error analysis module is used to reconstruct the spatiotemporal fusion features to analyze the reconstruction error and identify abnormal patterns caused by external interference based on the reconstruction error.

[0175] 6. Interference substance identification module.

[0176] The interference substance identification module is used to identify interference substances in water quality monitoring based on the dynamic threshold, spatiotemporal fusion features, abnormal patterns, water quality monitoring data, equipment data, and environmental auxiliary data, using knowledge graph reasoning.

[0177] Furthermore, the present invention also provides an intelligent identification device for water quality monitoring interference substances, comprising: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the intelligent identification method for water quality monitoring interference substances as described above.

[0178] Finally, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of intelligent identification of water quality monitoring interference substances as described above.

[0179] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit the scope of protection of the present invention. Those skilled in the art can modify or make equivalent substitutions to the technical solutions of the present invention based on the concept of the present invention, without departing from the essence and scope of the technical solutions of the present invention.

Claims

1. A method for intelligent identification of interfering substances in water quality monitoring, characterized in that, Includes the following steps: 1) Collect water quality monitoring data, equipment data, and environmental auxiliary data from water quality monitoring stations; 2) Based on the statistical distribution of historical water quality monitoring data, determine the baseline threshold for the water quality monitoring data, and optimize the baseline threshold based on seasonal changes, watershed characteristics, sudden changes in water quality, equipment status, and environmental factors to obtain the dynamic threshold for the water quality monitoring data, specifically including: 21) Determine the seasonal adjustment coefficient and watershed feature weights : , In the formula, For the first Seasonal adjustment coefficient for each season, This represents the average value of the water quality monitoring data for the s-th season of year y. This represents the average value of the water quality monitoring data for the entire year of year y. The number of years used in the calculation; , In the formula, For watershed feature weights, Let be the normalized value of the i-th watershed characteristic factor. is the weight of the i-th watershed characteristic factor, and m is the number of selected watershed characteristic factors; 22) Calculate the water quality mutation factor Equipment status factors Environmental factors : , In the formula, The water quality mutation factor at the current time t, and Water quality monitoring data at time ti and time t-i+1, respectively. For time step, The width of the sliding window; In the formula, The device state factor at the current time t. For equipment failure rate, This is the time since the equipment was last maintained. The degree of deviation of the equipment's quality control indicators. , and As weight; , In the formula, The environmental correlation factor at the current time t, The water quality monitoring data is at time t. This is the j-th environmental auxiliary data at time t. The total amount of environmental auxiliary data. Pearson correlation coefficient; 23) Calculate the dynamic threshold : , In the formula, The baseline threshold is α(t), β(t), γ(t), and δ(t) are weighting coefficients. It is a Cartesian product; 3) Temporal features are extracted from the water quality monitoring data and environmental auxiliary data using a temporal convolutional network to obtain temporal features. Spatial features are extracted from the water quality monitoring data using a graph neural network and spatial features are transformed from the environmental auxiliary data using spatial interpolation and watershed association to obtain spatial features. The temporal features and spatial features are then fused to obtain spatiotemporal fusion features. 4) Based on the spatiotemporal fusion features, abnormal data caused by equipment failure or sudden environmental changes are removed; 5) Reconstruct the spatiotemporal fusion features to analyze the reconstruction error and identify abnormal patterns caused by external interference based on the reconstruction error; 6) Based on the dynamic threshold, spatiotemporal fusion features, anomaly patterns, water quality monitoring data, equipment data, and environmental auxiliary data, knowledge graph reasoning is used to identify interfering substances in water quality monitoring.

2. The intelligent identification method for water quality monitoring interference substances according to claim 1, characterized in that, In step 1), the water quality monitoring data of the water quality monitoring station includes ammonia nitrogen, total phosphorus, turbidity, oxidation-reduction potential, water temperature, and pH value. The equipment data is the equipment detection limit. The environmental auxiliary data includes rainfall, upstream sewage outlet information, and meteorological data. The collected water quality monitoring data, equipment data, and environmental auxiliary data of the water quality monitoring station are subjected to outlier correction and data standardization processing.

3. The intelligent identification method for water quality monitoring interfering substances according to claim 1, characterized in that, In step 3), the temporal convolutional network is used to extract temporal features from the water quality monitoring data and environmental auxiliary data to obtain the temporal features, specifically including: 31) A temporal convolutional network is used to convolve the water quality monitoring data and environmental auxiliary data to obtain preliminary temporal features. : , In the formula, This represents the water quality monitoring data and environmental auxiliary data at the current time t. These are the convolution kernel parameters. These are the initial temporal features after the convolution operation; 32) Apply attention mechanisms to automatically identify time points that have a significant impact on water quality changes and calculate the attention weight for each time point. : , In the formula, T represents the preliminary time series characteristics. The number of Based on preliminary time series characteristics The calculated scoring function, Where W is the weight matrix and b is the bias vector; 33) Based on attention weights Finally, the weighted summation yields the fused temporal characteristics. : 。 4. The intelligent identification method for water quality monitoring interference substances according to claim 3, characterized in that, In step 3), the temporal and spatial features are fused to obtain spatiotemporal fused features, specifically as follows: , In the formula, and These are weighting coefficients. It is a temporal characteristic. It is a spatial feature.

5. The intelligent identification method for water quality monitoring interfering substances according to claim 4, characterized in that, In step 4), the isolated forest algorithm is used to remove abnormal data caused by equipment failure or sudden environmental changes, specifically as follows: 41) For each data point Calculate the isolation score : , In the formula, Data points In a random tree, the isolation depth, c(n), is a constant calculated based on the number of samples n, where n is the size of the dataset. It is the i-th data point in the dataset, which is a spatiotemporal fusion feature; 42) By calculating all data points Isolation score Select data points with higher scores And then remove them.

6. The intelligent identification method for water quality monitoring interfering substances according to claim 1, characterized in that, In step 5), the spatiotemporal fusion features are reconstructed using a variational autoencoder to analyze the reconstruction error.

7. A smart identification system for interfering substances in water quality monitoring, characterized in that, include: The data acquisition module is used to collect water quality monitoring data, equipment data, and environmental auxiliary data from the water quality monitoring station. A dynamic threshold optimization module is used to determine a baseline threshold for the water quality monitoring data based on the statistical distribution of historical data, and to optimize the baseline threshold based on seasonal variations, watershed characteristics, sudden changes in water quality, equipment status, and environmental factors to obtain a dynamic threshold for the water quality monitoring data. Specifically, it includes: Determine the seasonal adjustment factor and watershed feature weights : , In the formula, For the first Seasonal adjustment coefficient for each season, This represents the average value of the water quality monitoring data for the s-th season of year y. This represents the average value of the water quality monitoring data for the entire year of year y. The number of years used in the calculation; , In the formula, For watershed feature weights, Let be the normalized value of the i-th watershed characteristic factor. is the weight of the i-th watershed characteristic factor, and m is the number of selected watershed characteristic factors; Calculate water quality mutation factor Equipment status factors Environmental factors : , In the formula, The water quality mutation factor at the current time t, and Water quality monitoring data at time ti and time t-i+1, respectively. For time step, The width of the sliding window; In the formula, The device state factor at the current time t. For equipment failure rate, This is the time since the equipment was last maintained. The degree of deviation of the equipment's quality control indicators. , and As weight; , In the formula, The environmental correlation factor at the current time t. The water quality monitoring data is at time t. This is the j-th environmental auxiliary data at time t. The total amount of environmental auxiliary data. The Pearson correlation coefficient; Calculate dynamic threshold : , In the formula, The baseline threshold is α(t), β(t), γ(t), and δ(t) are weighting coefficients. It is a Cartesian product; The spatiotemporal feature fusion module is used to extract temporal features from the water quality monitoring data and environmental auxiliary data using a temporal convolutional network to obtain temporal features, extract spatial features from the water quality monitoring data using a graph neural network, and transform the spatial features of the environmental auxiliary data through spatial interpolation and watershed association to obtain spatial features, and fuse the temporal features and spatial features to obtain spatiotemporal fusion features. An abnormal data deletion module is used to remove abnormal data caused by equipment failure or sudden environmental changes based on the spatiotemporal fusion features. The reconstruction error analysis module is used to reconstruct the spatiotemporal fusion features to analyze the reconstruction error and identify abnormal patterns caused by external interference based on the reconstruction error. The interference substance identification module is used to identify interference substances in water quality monitoring based on the dynamic threshold, spatiotemporal fusion features, abnormal patterns, water quality monitoring data, equipment data, and environmental auxiliary data, using knowledge graph reasoning.

8. A smart identification device for water quality monitoring interfering substances, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the intelligent identification method for water quality monitoring interference substances as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the step of intelligent identification of water quality monitoring interference substances as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Industrial internet time series data anomaly detection method and device

    CN116522265A

  • Water quality pollution tracing method and terminal

    CN116644889A

  • Water quality index prediction system based on surface water

    CN118533759A