Industrial wastewater abnormal discharge identification method based on multi-parameter collaborative analysis

By constructing a multi-dimensional dynamic collaborative analysis framework, combined with adaptive data alignment and online incremental learning, the problems of high false alarm rate and insufficient real-time performance in the identification of abnormal industrial wastewater discharge are solved, and high sensitivity and strong robustness in the identification of abnormal industrial wastewater discharge are achieved.

CN121980460APending Publication Date: 2026-05-05GUANGZHOU LIANGSEN INSTR TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU LIANGSEN INSTR TECH CO LTD
Filing Date
2026-01-26
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing technologies for identifying abnormal industrial wastewater discharge suffer from problems such as high false alarm rate, weak anti-interference ability, and insufficient real-time performance. In particular, when faced with multi-parameter heterogeneous dynamic data, it is difficult to effectively distinguish between normal production fluctuations and malicious discharge behavior that is intended to evade supervision.

Method used

A multi-dimensional dynamic collaborative analysis framework is constructed, which combines adaptive data alignment, temporal causal modeling, and online incremental learning. It integrates water quality, water quantity, process status, and temporal context information, and achieves high sensitivity and robust anomaly detection through multi-scale temporal feature extraction and process logic constraints.

Benefits of technology

It significantly improves the ability to identify covert illegal activities such as unauthorized discharge, leakage, and dilution of emissions, achieves second-level response, reduces false alarm rate, adapts to changes in operating conditions, and provides reliable intelligent supervision support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121980460A_ABST
    Figure CN121980460A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of environment monitoring and intelligent analysis, and particularly relates to an industrial wastewater abnormal discharge identification method based on multi-parameter collaborative analysis. The method aims to solve the problems of high false alarm rate, weak anti-interference capability and insufficient real-time performance caused by single threshold judgment, static feature fusion and lack of process logic and time sequence dynamic modeling in the prior art. The method comprises the following steps: synchronously acquiring four types of parameters including water quality, water quantity, process operation state and timestamp, performing adaptive data alignment, fusing short-time mutation and long-time period features through a multi-scale time sequence feature extraction unit, and generating a logic mask in combination with a process logic constraint encoder; an anomaly discrimination engine adopts an unsupervised reconstruction error and supervised fine-tuning dual-path fusion mechanism, and an online incremental learning module realizes dynamic updating of the model. According to the invention, second-level response can be realized, and hidden abnormal behaviors such as secret discharge and leakage discharge can be identified with high sensitivity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of environmental monitoring and intelligent analysis technology, and specifically relates to a method for identifying abnormal industrial wastewater discharge based on multi-parameter collaborative analysis. Background Technology

[0002] With the increasing national emphasis on water ecological environment protection, the supervision of industrial pollution sources is gradually shifting from end-of-pipe treatment to intelligent monitoring throughout the entire process. Real-time and accurate identification of abnormal industrial wastewater discharge has become a key aspect of improving environmental law enforcement efficiency and risk prevention capabilities. Against this backdrop, traditional monitoring models that rely on fixed thresholds for single water quality indicators (such as chemical oxygen demand and ammonia nitrogen concentration) to trigger alarms for exceeding limits are showing systemic flaws, including large blind spots, high false alarm rates, and weak anti-interference capabilities, as they struggle to reflect complex discharge behaviors under the coupling of multiple factors. To overcome these limitations, researchers have recently begun exploring intelligent identification pathways based on multi-parameter collaborative analysis. These models attempt to integrate multi-dimensional information such as water quality, water quantity, process operating status, and time-series characteristics to construct more robust anomaly detection models, aiming to effectively capture concealed illegal activities such as unauthorized discharge, leakage, and excessive emissions under dynamic operating conditions.

[0003] Within this technological evolution, some existing solutions attempt to introduce multi-parameter fusion mechanisms. For example, patent CN118395223B proposes a method for identifying environmentally sensitive areas based on a multi-parameter collaborative input matrix and a joint clustering network. This method enhances feature representation through a reparameterization layer and extracts global collaborative representations to support environmental assessment decisions. In static geological sampling scenarios, this method effectively integrates multi-source environmental data, demonstrating good clustering consistency and spatial correlation modeling capabilities. However, at its core, this solution is based on the assumption of steady-state, discrete sampling points. Its model architecture does not embed a time-series dynamic modeling unit and does not consider the non-stationary characteristics common in industrial emissions, such as sudden flow changes, equipment start-up and shutdown disturbances, and intermittent emissions. More importantly, its objective function focuses on regional sensitivity classification rather than constructing a discrimination boundary for the specific event of "abnormal emissions," thus failing to distinguish between parameter shifts caused by normal production fluctuations and malicious emissions aimed at circumventing regulations. Correspondingly, another patent, CN120338615B, constructs a deep neural network that integrates physical constraints for the collaborative simulation and analysis of driving mechanisms of multiple water quality indicators. While it has made progress in reconstructing the mechanism of water quality evolution, its core task remains within the scope of forward simulation. The training objective is to minimize the reconstruction error of historical data, rather than learning the distribution characteristics of abnormal samples. Furthermore, this scheme does not incorporate key non-water quality process parameters such as flow rate, discharge period, and pump / valve status, resulting in a lack of awareness of typical avoidance strategies such as "low-concentration high-flow dilution discharge" or "abnormal discharge during non-production periods at night." In addition, its inference process relies on batch historical data backtracking, lacking online incremental learning and low-latency response mechanisms, making it difficult to meet the real-time requirements of regulatory platforms for second-level early warnings.

[0004] However, with the increasing automation of industrial production and the deepening of environmental law enforcement, the structural contradictions in the aforementioned technical solutions at the principle level are becoming increasingly prominent. On the one hand, multi-parameter fusion should enhance the dimensional coverage and contextual awareness of anomaly identification; on the other hand, if the fusion mechanism is not deeply coupled with the dynamic, sudden, and human-intervention-dependent characteristics of industrial wastewater discharge, it is prone to falling into the dilemma of "rich data but redundant information, complex models but unfocused discrimination." Specifically, existing methods often simply concatenate parameters such as water quality and quantity into static feature vectors, ignoring the asynchronous evolution of different parameters over time and their causal transmission paths in abnormal events. For example, an illegal discharge incident may first manifest as a surge in instantaneous flow, followed by a delayed abrupt change in water quality indicators, while normal cleaning operations may also cause similar phenomena, which are difficult to distinguish based solely on parameter amplitude. If the model fails to model such time-series dependence on process logic constraints, its discriminative ability will still be limited to a superficial understanding of "abnormal semantics," regardless of how the feature dimensions are expanded. Furthermore, industrial field data commonly suffers from noise interference, sensor drift, and missing parameters. If the collaborative analysis framework lacks adaptive alignment and confidence weighting mechanisms for multi-source heterogeneous data, the fusion process may introduce false correlations, amplifying the risk of misjudgment. Therefore, while ensuring real-time inference efficiency, how to construct a collaborative analysis model that can deeply integrate multi-dimensional dynamic parameters such as water quality, water quantity, time series, and process context, and accurately characterize the inherent discrimination logic of abnormal discharge events, has become a core bottleneck restricting the current intelligent monitoring technology of industrial wastewater from "data collection" to "intelligent decision-making."

[0005] Therefore, designing a multi-parameter collaborative analysis method for industrial wastewater discharge scenarios, which can not only effectively integrate heterogeneous dynamic parameters, but also construct an anomaly discrimination mechanism with high sensitivity and strong anti-interference ability based on process logic and time-series evolution law, and support online updates and low-latency response, has become a key challenge and a technical problem that needs to be solved by those skilled in the art. Summary of the Invention

[0006] This invention provides a method for identifying abnormal industrial wastewater discharge based on multi-parameter collaborative analysis, aiming to address the systemic shortcomings of existing technologies, such as high false alarm rates, weak anti-interference capabilities, and insufficient real-time performance, caused by single threshold judgment, static feature fusion, and lack of process logic and time-series dynamic modeling. To achieve the above-mentioned objective, this invention constructs a multi-dimensional dynamic collaborative analysis framework that integrates water quality parameters, water quantity parameters, process operating status parameters, and time-series context information. Combined with an adaptive data alignment mechanism, a time-series causal modeling unit, and an online incremental learning engine, it achieves highly sensitive, robust, and low-latency identification of abnormal industrial wastewater discharge events.

[0007] The method includes the following steps: First, four types of heterogeneous dynamic parameters are simultaneously collected from the industrial wastewater discharge monitoring system: water quality parameters, water quantity parameters, process operation status parameters, and timestamp information. Water quality parameters include chemical oxygen demand (COD), ammonia nitrogen concentration, total phosphorus concentration, pH value, and conductivity. Water quantity parameters include instantaneous flow rate and cumulative discharge. Process operation status parameters include production equipment start / stop signals, pump and valve on / off status, and wastewater treatment unit operation mode identifiers. Timestamp information is used to mark the sampling time of each parameter. All parameters are timestamped using a unified time base, and continuous multi-parameter time-series segments are generated through a sliding time window mechanism.

[0008] Furthermore, to address the heterogeneity of multi-source parameters in terms of sampling frequency, dimensional scale, and missing patterns, this invention introduces an adaptive data alignment module. This module performs interpolation and resampling on each parameter sequence based on timestamp information. It uses linear interpolation to upsample water quantity and process status parameters to the sampling frequency of water quality parameters, while simultaneously applying moving median filtering to sensor drift noise in the water quality parameters. For parameter missing cases that persist beyond a preset time threshold, the module infers the confidence interval of the missing parameter based on the process operating status parameters and generates alternative values ​​with confidence weights, ensuring the data integrity and reliability of subsequent analyses.

[0009] In a preferred embodiment of the present invention, the multi-parameter time series segment is input to a multi-scale time series feature extraction unit. This unit consists of a parallel short-time window convolutional branch and a long-time window recurrent branch. The short-time window convolutional branch uses a one-dimensional convolutional kernel to capture high-frequency features of local time series fluctuations, used to identify transient abnormal signals such as sudden increases in flow and sudden changes in water quality; the long-time window recurrent branch uses a gated recurrent unit network to model the process periodicity across hourly timeframes, used to distinguish between normal production fluctuations and abnormal drainage behavior during non-production periods. The output feature vectors of the two branches are weighted and fused through a channel attention mechanism to generate a joint time series representation with multi-scale perception capabilities.

[0010] Furthermore, this invention constructs a process logic constraint encoder to transform prior process rules in the industrial wastewater discharge process into computable logical constraints. These process logic constraints include, but are not limited to: allowing discharge during production equipment operation, prohibiting discharge during non-production periods, allowing water quality parameters to exceed standards in stages during cleaning operations but with flow restrictions, and requiring the discharge outlet to be closed when the wastewater treatment unit is under maintenance. This encoder formalizes these rules into Boolean logic expressions and maps them to a binary mask matrix, applying them to multi-scale temporal representations to suppress false anomaly signals that violate process logic.

[0011] The joint temporal representation and process logic mask are input into the anomaly detection engine. This engine employs a dual-path structure: the main path is an unsupervised anomaly detection module based on reconstruction error, and the auxiliary path is a supervised fine-tuning module based on a small number of labeled samples. The main path learns the multi-parameter evolution pattern under normal operating conditions using a temporal autoencoder, calculating the reconstruction residual of the input segment as the initial anomaly score. The auxiliary path uses historically confirmed anomaly event samples to fine-tune the discrimination boundary online, using a contrastive learning mechanism to narrow the embedding distance between similar anomaly samples and widen the embedding distance between normal and anomaly samples. The outputs of the two paths are dynamically weighted and fused to generate the final anomaly confidence score.

[0012] As a key innovation of this invention, the anomaly detection engine integrates an online incremental learning mechanism. Whenever the monitoring platform confirms a new anomaly or corrects a false alarm, the system automatically triggers a local update process for the model parameters. This process only performs gradient backpropagation on the network weights within the affected time window, avoiding the computational overhead of retraining the entire model. Simultaneously, the system maintains a sliding experience replay buffer, retaining feature-label pairs from the most recent N time windows for periodically calibrating the model's discrimination threshold, ensuring its adaptation to parameter drift caused by seasonal operating conditions and equipment aging.

[0013] Furthermore, this invention defines the following rules for determining abnormal emission events: when the anomaly confidence score continuously exceeds a first threshold for a first time duration, or exceeds a second threshold (the second threshold is higher than the first threshold) on a single occasion, a Level 1 warning is triggered; if the process logic mask indicates a violation, the warning is upgraded to a Level 2 warning and a structured event report is generated. The structured event report includes the anomaly start time, duration, dominant anomaly parameters, associated process status, confidence score, and a snapshot of the original data, for environmental enforcement departments to verify and collect evidence.

[0014] The method employs a central coordinating controller to uniformly schedule the execution timing of each functional module. The central coordinating controller receives raw streaming data from the data acquisition layer and sequentially invokes the adaptive data alignment module, the multi-scale temporal feature extraction unit, the process logic constraint encoder, and the anomaly detection engine to complete the end-to-end anomaly identification process. The entire processing chain adopts a pipelined parallel architecture, ensuring that the end-to-end latency from data input to early warning output does not exceed five seconds, meeting real-time monitoring requirements.

[0015] In another preferred embodiment of the present invention, the short-term window convolutional branch in the multi-scale temporal feature extraction unit adopts a three-layer one-dimensional convolutional stacked structure, with each layer having a kernel size of 3, a stride of 1, and a modified linear unit as the activation function; the long-term window recurrent branch adopts a bidirectional gated recurrent unit, with a hidden layer dimension of 128, and the forward and backward outputs are concatenated and then reduced to 64 dimensions by a fully connected layer. The channel attention mechanism generates channel weights through global average pooling, and outputs normalized weight coefficients through two fully connected layers and a sigmoid function.

[0016] The process logic constraint encoder converts a preset process rule library into an executable logic decision tree through a rule parser. The rule parser reads rule entries from the configuration file. Each rule contains a set of preconditions and a conclusion action. The preconditions consist of parameter names, comparison operators, and thresholds. During runtime, the encoder traverses all rules, matching each rule for the current multi-parameter time-series segment, generating a binary mask aligned with the feature dimensions. Positions that violate any rule are marked as 0, and the rest as 1.

[0017] The temporal autoencoder in the anomaly detection engine consists of an encoder and a decoder. The encoder contains two layers of gated recurrent units, and the decoder employs a hybrid structure of deconvolution and recurrent units to reconstruct the multi-parameter temporal segments of the input. The reconstruction residual is defined as the mean square error between the input and the reconstructed output, and after exponential smoothing filtering, it is used as the initial anomaly score. The supervised fine-tuning module adopts a Siamese network structure, with its loss function being a triplet loss. The anchor point is the current input segment, positive samples are historical segments of similar anomaly events, and negative samples are segments of normal operating conditions.

[0018] The online incremental learning mechanism receives external confirmation signals through an event feedback interface. When an anomaly confirmation signal is received, the system adds the data of the current segment and the M time windows before and after it to the experience replay buffer and initiates the fine-tuning process. When a false alarm correction signal is received, the system marks the segment as a normal sample and adjusts the discrimination threshold to be lower than the current score. The buffer adopts a first-in, first-out strategy with a fixed capacity of K time windows to ensure that the model only learns recent effective experience.

[0019] The method described in this invention deeply integrates four-dimensional dynamic parameters—water quality, water quantity, process status, and temporal context—to explicitly model the temporal evolution and process logic constraints in the industrial wastewater discharge process. This fundamentally solves the problem of misfocus caused by static feature splicing and isolated threshold determination in traditional methods. An adaptive data alignment mechanism effectively addresses the heterogeneity and incompleteness of on-site data; a multi-scale temporal feature extraction unit accurately captures transient changes and long-term periodic patterns; a process logic constraint encoder filters out non-violation fluctuations; an anomaly detection engine combines unsupervised reconstruction and supervised fine-tuning to achieve high-precision detection; and an online incremental learning mechanism ensures the model continuously adapts to evolving operating conditions. The entire method, while ensuring sub-second response times, significantly improves the ability to identify concealed illegal activities such as unauthorized discharge, leakage, diluted discharge, and out-of-time discharge, providing reliable technical support for intelligent supervision of industrial pollution sources. Attached Figure Description

[0020] Figure 1 This is a schematic diagram of the overall process of the industrial wastewater abnormal discharge identification method based on multi-parameter collaborative analysis described in this invention.

[0021] Figure 2 This is a schematic diagram of the structure of the multi-scale temporal feature extraction unit in this invention.

[0022] Figure 3 This is a schematic diagram illustrating the working principle of the process logic constraint encoder in this invention.

[0023] Figure 4 This is a schematic diagram of the dual-path architecture and online incremental learning mechanism of the anomaly detection engine in this invention. Detailed Implementation

[0024] This invention provides a method for identifying abnormal industrial wastewater discharge based on multi-parameter collaborative analysis. Its core lies in constructing a multi-dimensional dynamic collaborative analysis framework that integrates water quality parameters, water quantity parameters, process operating status parameters, and time series context information. The following detailed description, in conjunction with specific embodiments, will illustrate the technical solution of this invention in detail, ensuring that those skilled in the art can fully reproduce the method based on this description.

[0025] like Figure 1 As shown, a method for identifying abnormal industrial wastewater discharge based on multi-parameter collaborative analysis includes the following steps: Water quality parameters, water quantity parameters, process operation status parameters and timestamp information are collected synchronously from the industrial wastewater discharge monitoring system, and timestamps are aligned with a unified time base. Continuous multi-parameter time series segments are generated through a sliding time window mechanism. The multi-parameter time series segments are input into the adaptive data alignment module. Based on the timestamp information, the parameter sequences are interpolated and resampled, and the water quality parameters are noise filtered. For the case of missing parameters that have been continuously exceeding the preset time threshold, the confidence interval of the missing parameters is inferred based on the process operation status parameters, and a replacement value with confidence weight is generated to obtain the aligned time series data. The aligned temporal data is input into the multi-scale temporal feature extraction unit. Local high-frequency temporal features and long-term periodic temporal features are extracted by parallel short-term window convolutional branches and long-term window cyclic branches, respectively. The features are then weighted and fused through a channel attention mechanism to generate a joint temporal representation. The joint temporal representation is input into the process logic constraint encoder, which transforms the preset industrial wastewater discharge process rules into computable logical constraints and generates a binary mask matrix aligned with the dimensions of the joint temporal representation. The positions that violate the process rules are marked as the first value, and the remaining positions are marked as the second value. The joint temporal representation and the binary mask matrix are input into the anomaly discrimination engine. The anomaly discrimination engine calculates the anomaly confidence score through a dual-path structure. The main path calculates the reconstruction residual as the initial anomaly score through a temporal autoencoder, while the auxiliary path adjusts the discrimination boundary based on a supervised fine-tuning module and outputs the fine-tuned anomaly score. The outputs of the two paths are fused by dynamic weights to generate the final anomaly confidence score. Based on the comparison between the anomaly confidence score and the preset threshold, and combined with the violation status indicated by the binary mask matrix, it is determined whether an abnormal emission warning is triggered and a corresponding event report is generated.

[0026] The operations performed by the adaptive data alignment module specifically include: The sampling frequency of water quantity parameters and process operation status parameters is upsampled to water quality parameters using linear interpolation. A sliding median filter is used to smooth water quality parameters in order to suppress sensor drift noise; When a parameter is determined to have no valid sample value within 30 consecutive seconds, a reasonable confidence interval for the missing parameter is inferred based on the current process operation status parameters, and a replacement value with confidence weight is generated. The confidence weight is determined by the relative width of the confidence interval.

[0027] In some embodiments, in the multi-scale temporal feature extraction unit: The short-term window convolution branch adopts a three-layer one-dimensional convolution stacked structure, with each layer having a kernel size of 3, a stride of 1, and an activation function of rectified linear unit, used to process the time series data of the most recent sixty seconds to capture local high-frequency fluctuation features. The long-term window cyclic branch adopts a bidirectional gated cyclic unit network with a hidden layer dimension of 128. It is used to process the time series data of the most recent 7,200 seconds to model the process periodicity pattern across hours. The forward and backward outputs are concatenated and then reduced to 64 dimensions by a fully connected layer. The channel attention mechanism obtains channel statistics by performing global average pooling on the feature vector of each channel, and then generates normalized channel weight coefficients through two fully connected layers and the Sigmoid function. The feature vectors output by the short-term window convolutional branch and the long-term window cyclic branch are weighted and summed according to the weight coefficients to generate a 128-dimensional joint temporal representation.

[0028] In some embodiments, the operations performed by the process logic constraint encoder specifically include: The process rule entries in the configuration file are read by the rule parser. Each rule contains a set of prerequisites and a conclusion action. The prerequisites consist of parameter names, comparison operators and thresholds. During runtime, all rules are traversed, and each rule of the current multi-parameter time series segment is matched one by one. If the data at a certain time step violates any rule, a binary mask value of 0 is generated at the corresponding position; otherwise, a value of 1 is generated.

[0029] In some embodiments, in the anomaly detection engine: The encoder of the temporal autoencoder contains two layers of gated recurrent units, and the decoder adopts a hybrid structure of deconvolution and recurrent units. The reconstruction residual is defined as the mean square error between the input multi-parameter temporal segment and its reconstructed output. The reconstruction residual is used as the initial anomaly score after being exponentially smoothed. The supervised fine-tuning module adopts a twin network structure and shares the encoder part of the temporal autoencoder. Its loss function is the triplet loss. It adjusts the discrimination boundary by bringing the embedding distance of similar abnormal samples closer together and pushing the embedding distance of normal and abnormal samples further apart. In dynamic weight fusion, the weight value is obtained by calculating the average cosine similarity between the current data segment and the normal samples in the sliding experience replay buffer, and then mapped to the [0,1] interval by the Sigmoid function. The final anomaly confidence score is the product of the weight value and the initial anomaly score plus a subtraction of the product of the weight value and the fine-tuned anomaly score.

[0030] In some embodiments, the anomaly detection engine integrates an online incremental learning mechanism, the operations performed by which the online incremental learning mechanism include: The system receives external confirmation signals through the event feedback interface. When an abnormal confirmation signal is received, the data of the current time window and the five time windows before and after it are added to the experience playback buffer, and the gradient backpropagation fine-tuning process for the autoencoder decoder part and the fully connected projection layer of the twin network is started. When a false alarm correction signal is received, the corresponding data segment is marked as a normal sample and added to the empirical replay buffer, and the discrimination threshold is adjusted to be 0.1 units lower than the current anomaly confidence score; The experience replay buffer adopts a first-in-first-out strategy, with a fixed capacity of one thousand time windows, and is used to periodically calibrate the discrimination threshold. The calibration cycle is twenty-four hours. The 99th percentile of the abnormal confidence score of normal samples in the buffer is used as the first threshold, and the 99.9th percentile is used as the second threshold.

[0031] In some embodiments, the rules for determining whether an abnormal emission warning has been triggered are as follows: A Level 1 warning is triggered when the abnormal confidence score exceeds the first threshold for sixty consecutive seconds, or exceeds the second threshold in a single instance. If a Level 1 warning is triggered and the binary mask matrix indicates a violation at the corresponding time step, the warning will be upgraded to Level 2. After an alert is triggered, a structured event report is generated. The structured event report includes the start time of the anomaly, the duration, the dominant anomaly parameter, the associated process status, the confidence score, and a snapshot of the original data.

[0032] In some embodiments, water quality parameters include chemical oxygen demand, ammonia nitrogen concentration, total phosphorus concentration, pH value, and conductivity; water quantity parameters include instantaneous flow rate and cumulative discharge; and process operation status parameters include production equipment start / stop signals, pump and valve on / off status, and wastewater treatment unit operation mode identifiers.

[0033] In some embodiments, the sliding time window mechanism has a window length of 360 seconds and a sliding step size of 10 seconds.

[0034] In some embodiments, the method uses a central coordinating controller to uniformly schedule the execution timing of each functional module. The central coordinating controller sequentially calls the adaptive data alignment module, the multi-scale time-series feature extraction unit, the process logic constraint encoder, and the anomaly detection engine. Data is transferred between modules using a shared memory queue and processed using a pipelined parallel architecture, so that the end-to-end delay from data input to warning output does not exceed five seconds.

[0035] In this embodiment, four types of heterogeneous dynamic parameters are first synchronously collected from the industrial wastewater discharge monitoring system, including water quality parameters, water quantity parameters, process operation status parameters, and timestamp information. Water quality parameters include chemical oxygen demand (COD), ammonia nitrogen concentration (NH3-N), total phosphorus concentration (TP), pH value, and conductivity; water quantity parameters include instantaneous flow rate and cumulative discharge; process operation status parameters include production equipment start / stop signals, pump and valve on / off status, and wastewater treatment unit operation mode identifiers; timestamp information is used to mark the sampling time of each parameter. All parameters are timestamped using a unified time base, and continuous multi-parameter time-series segments are generated through a sliding time window mechanism. The sliding time window length is set to 360 seconds, and the sliding step size is 10 seconds, thus forming a multi-parameter time-series segment stream updated every 10 seconds.

[0036] Furthermore, to address the significant heterogeneity of the four types of parameters in terms of sampling frequency, dimensional scale, and missing patterns, an adaptive data alignment module is introduced. This module first performs interpolation and resampling processing on each parameter sequence based on timestamp information. Specifically, the original sampling frequency of water quantity parameters and process operating status parameters is usually lower than that of water quality parameters. Therefore, linear interpolation is used to upsample them to the sampling frequency of water quality parameters, i.e., once per second. For sensor drift noise present in water quality parameters, a sliding median filter is used for smoothing, with a sliding window width of five seconds to effectively suppress spike noise without losing abrupt changes. When a parameter has no valid sample value for 30 consecutive seconds, it is determined to be a persistent missing condition. In this case, the adaptive data alignment module infers a reasonable confidence interval for the missing parameter based on the current process operating status parameters. For example, if the production equipment is shut down and the pumps and valves are closed, the instantaneous flow rate is inferred to be close to zero, and its confidence interval is set to [0, 0.5] m³ / h; if the wastewater treatment unit is in cleaning mode, the COD concentration is inferred to be likely to increase in stages, and its confidence interval is determined based on the statistical distribution during historical cleaning operations. Subsequently, surrogate values ​​with confidence weights are generated. These weights are determined by the relative width of the confidence interval and are used for weighted calculations in subsequent analyses, thereby ensuring data integrity and reliability. Prior to this, a process state-parameter distribution mapping table is pre-constructed, recording the mean μ and standard deviation σ of each parameter under historical normal operating conditions for each process state; when parameter X is missing, the corresponding (μ) value for the current process state is queried. x , σ x The confidence interval is set to [μ]. x - kσ x , μ x + kσ x ], k is the confidence coefficient, which defaults to 2; if there is no historical data, a rule-based default range is used, such as [0, ] for traffic in the shutdown state. [×0.1], where The rated maximum flow rate of the equipment.

[0037] like Figure 2 As shown, in a preferred embodiment of the present invention, multi-parameter time-series segments after adaptive data alignment are input to a multi-scale time-series feature extraction unit. This unit consists of a parallel short-term window convolutional branch and a long-term window recurrent branch. The short-term window convolutional branch adopts a three-layer one-dimensional convolutional stacked structure, with each layer having a kernel size of 3, a stride of 1, and an activation function of Corrected Linear Unit (ReLU). This branch operates on the time-series data of the most recent sixty seconds, aiming to capture local high-frequency fluctuation features, such as a sudden increase in instantaneous flow rate exceeding three times the normal mean standard deviation within five seconds, or a sudden drop in pH value of two units within ten seconds, and other transient abnormal signals. The long-term window recurrent branch processes the time-series data of the most recent seven thousand two hundred seconds (i.e., two hours), using a bidirectional gated recurrent unit (BiGRU) network with a hidden layer dimension of 128. The forward and backward outputs are concatenated at the time step and then dimensionality-reduced through a fully connected layer with an output dimension of 64 to model the process periodicity across the hour level. For example, in continuous production mode, COD concentration exhibits a regular fluctuation every eight hours; while during non-production periods, there should be no drainage under normal circumstances. The feature vectors output from the two branches are each 64-dimensional, and are then input into a channel attention mechanism. This mechanism first performs global average pooling on the feature vector of each channel to obtain channel statistics, and then uses two fully connected layers (16-dimensional intermediate layer and 64-dimensional output layer) and a sigmoid function to generate normalized channel weight coefficients. Finally, the feature vectors from the two branches are weighted and summed to generate a 128-dimensional joint temporal representation.

[0038] like Figure 3 and Figure 4As shown, this invention further constructs a process logic constraint encoder to transform prior process rules in the industrial wastewater discharge process into computable logical constraints. In a specific embodiment, the preset process rule library includes the following rules: Rule 1, discharge is allowed during production equipment operation; Rule 2, discharge is prohibited during non-production periods; Rule 3, water quality parameters are allowed to exceed standards in stages during cleaning operations, but the instantaneous flow rate must not exceed 5 m³ / h; Rule 4, the discharge outlet should be closed when the wastewater treatment unit is under maintenance. The process logic constraint encoder reads the above rule entries in the configuration file through a rule parser. Each rule is parsed into a set of preconditions and a conclusion action. For example, the preconditions of Rule 2 are "the production equipment start / stop signal is 'stop'" and "the current time is not within the scheduling plan", and the conclusion action is "the instantaneous flow rate should be 0". During runtime, the encoder traverses all rules and matches each rule in the current multi-parameter time sequence segment. If the data at a certain time step violates any rule, a binary mask value of 0 is generated at the corresponding position; otherwise, it is 1. The dimension of this binary mask matrix is ​​aligned with the channel dimension of the joint timing representation, and is used to subsequently suppress false anomaly signals that violate process logic.

[0039] The joint temporal representation and process logic mask are input together into the anomaly detection engine. This engine employs a dual-path structure. The main path is an unsupervised anomaly detection module based on reconstruction error, with a temporal autoencoder at its core. The encoder portion of this autoencoder contains two layers of gated recurrent units (GRUs), each with 64 hidden units. The decoder portion uses a hybrid structure of deconvolution and recurrent units. First, a one-dimensional deconvolution layer expands the low-dimensional hidden state to a high-dimensional temporal dimension, then a GRU layer refines the reconstruction details, finally outputting a multi-parameter temporal reconstruction result consistent with the input dimension. The reconstruction residual is defined as the input multi-parameter temporal segment. Rather than rebuilding output Mean square error between: The residual was processed by exponential smoothing filter with a smoothing coefficient of 0.9, which was used as the initial anomaly score. The auxiliary path is a supervised fine-tuning module based on a small number of labeled samples, employing a Siamese network structure. This network shares the encoder portion of the main path's autoencoder, mapping input segments to the embedding space. Its training objective is triplet loss. in, Anchor point (current input segment), Positive samples (historical fragments of similar abnormal events). This is a negative sample (normal operating condition segment). For encoder mapping functions,α The boundary margin is set to 1.0. This mechanism brings anomalous samples of the same type closer together and widens the embedding distance between normal and anomalous samples. The secondary path outputs a fine-tuned anomaly score. .

[0040] The scores from the two paths are dynamically weighted and fused to generate the final anomaly confidence score. The dynamic weights are determined by the similarity between the current data segment and the most recent normal operating condition; the higher the similarity, the greater the weight of the main path; conversely, the lower the similarity, the greater the weight of the secondary path. The specific fusion formula is as follows: Among them, weight The average cosine similarity between the current segment and the normal samples in the sliding experience replay buffer is obtained and mapped to the [0,1] interval by the Sigmoid function.

[0041] As a key innovation of this invention, the anomaly detection engine integrates an online incremental learning mechanism. This mechanism receives external confirmation signals through an event feedback interface. When the environmental monitoring platform confirms a new anomaly, the system adds data from the current time window and five time windows before and after it (a total of eleven windows) to the experience replay buffer and initiates a fine-tuning process. Gradient backpropagation is performed only on the autoencoder decoder part and the fully connected projection layer of the Siamese network, with a learning rate of 0.001. When a false alarm correction signal is received, the system marks the segment as a normal sample and adjusts the detection threshold to be 0.1 units lower than the current score. The experience replay buffer adopts a first-in, first-out strategy, with a fixed capacity of one thousand time windows to ensure that the model only learns recent effective experience and is used for periodic calibration of the detection threshold. The calibration period is set to twenty-four hours, and the 99th percentile of the score of normal samples in the buffer is used as the first threshold, and the 99.9th percentile as the second threshold.

[0042] Furthermore, the present invention defines the following rules for determining abnormal emission events: when the abnormality confidence score is... A Level 1 warning is triggered when the first threshold is exceeded continuously for 60 seconds, or when the second threshold is exceeded once (the second threshold is higher than the first threshold). If the process logic mask indicates a violation at the corresponding time step (i.e., the mask value is 0), the warning is upgraded to Level 2, and a structured event report is generated. The structured event report includes the anomaly start time, duration, dominant anomaly parameters (determined by calculating the contribution of each parameter to the reconstructed residuals), associated process status, confidence score, and a snapshot of the original data, for environmental enforcement agencies to verify and collect evidence.

[0043] The entire method utilizes a central coordinating controller to uniformly schedule the execution timing of each functional module. Deployed on edge computing nodes, the central coordinating controller receives raw streaming data from the data acquisition layer and sequentially invokes the adaptive data alignment module, the multi-scale temporal feature extraction unit, the process logic constraint encoder, and the anomaly detection engine to complete the end-to-end anomaly identification process. Data transfer between modules is achieved using a shared memory queue, avoiding I / O bottlenecks. The entire processing chain employs a pipelined parallel architecture; that is, while the nth time window is being processed in the anomaly detection engine, the (n+1)th time window has already been calculated in the multi-scale temporal feature extraction unit. In actual testing, on an industrial server equipped with an Intel Xeon E-2278GE processor and 32GB of memory, the end-to-end latency from data input to warning output does not exceed five seconds, meeting real-time monitoring requirements.

[0044] To verify the effectiveness of the present invention, the following embodiments were designed and compared with comparative examples for testing.

[0045] In one specific embodiment, a fine chemical enterprise within a chemical industrial park was selected as a pilot project. This enterprise has two production lines, producing dye intermediates and pharmaceutical intermediates respectively. Its wastewater discharge outlet is equipped with online monitoring equipment, sampling once per second. Process operation status signals are pushed in real-time by the DCS system. The method of this invention is deployed in the edge computing gateway at the enterprise's main wastewater discharge outlet. During a three-month operation period, the system recorded twelve confirmed abnormal discharge events verified on-site by the environmental protection department, including three instances of unauthorized discharge during non-production periods, four instances of excessive discharge during cleaning operations, two instances of leakage due to equipment malfunction, and three instances of dilution discharge (reducing COD concentration by mixing in clean water while maintaining a constant flow rate).

[0046] As a comparative example, a traditional single threshold method was used. This method sets fixed upper limit thresholds for COD, ammonia nitrogen, and instantaneous flow rate, triggering an alarm when any parameter exceeds the limit. Meanwhile, another comparative example uses an isolated forest algorithm with static feature fusion. This algorithm concatenates statistical features such as the average, maximum, minimum, and standard deviation every ten minutes into a vector, which is then input into the isolated forest model for anomaly detection.

[0047] The test results are shown in the table below: The data shows that the method of this invention, while maintaining low latency, accurately detected all twelve real abnormal events, especially demonstrating 100% detection capability for dilution emission behavior, which is difficult to identify by traditional methods. There were only 8 false alarms, mainly due to unknown operating conditions during the commissioning of new equipment, which were automatically corrected within a week by the online incremental learning mechanism. In contrast, the single threshold method, unable to distinguish between cleaning operations and illegal discharges, resulted in numerous false alarms and completely failed to identify dilution emissions; while the static isolated forest method showed some effectiveness, it lacked time-series dynamic modeling and process logic constraints, resulting in slow response to transient anomalies and limited ability to identify complex and concealed behaviors.

[0048] In summary, the method described in this invention, by deeply integrating four-dimensional dynamic parameters of water quality, water quantity, process status, and temporal context, explicitly models the temporal evolution patterns and process logic constraints in the industrial wastewater discharge process. This fundamentally solves the problem of misfocus caused by static feature splicing and isolated threshold determination in traditional methods. An adaptive data alignment mechanism effectively addresses the heterogeneity and incompleteness of on-site data; a multi-scale temporal feature extraction unit accurately captures transient changes and long-term periodic patterns; a process logic constraint encoder filters out non-violation fluctuations; an anomaly detection engine combines unsupervised reconstruction and supervised fine-tuning to achieve high-precision detection; and an online incremental learning mechanism ensures the model continuously adapts to evolving operating conditions. The entire method, while ensuring sub-second response times, significantly improves the ability to identify concealed illegal activities such as unauthorized discharge, leakage, diluted discharge, and out-of-time discharge, providing reliable technical support for intelligent supervision of industrial pollution sources.

Claims

1. A method for identifying abnormal industrial wastewater discharge based on multi-parameter collaborative analysis, characterized in that, Includes the following steps: Water quality parameters, water quantity parameters, process operation status parameters and timestamp information are collected synchronously from the industrial wastewater discharge monitoring system, and timestamps are aligned with a unified time base. Continuous multi-parameter time series segments are generated through a sliding time window mechanism. The multi-parameter time series segment is input into the adaptive data alignment module. Based on the timestamp information, the parameter sequences are interpolated and resampled. The water quality parameters are noise filtered. For the case of missing parameters that have been continuously exceeding the preset time threshold, the confidence interval of the missing parameters is inferred based on the process operation status parameters and a replacement value with confidence weight is generated to obtain the aligned time series data. The aligned time series data is input into a multi-scale time series feature extraction unit. Local high-frequency time series features and long-term periodic time series features are extracted by parallel short-term window convolutional branches and long-term window cyclic branches, respectively. The features are then weighted and fused through a channel attention mechanism to generate a joint time series representation. The joint temporal representation is input into the process logic constraint encoder, which transforms the preset industrial wastewater discharge process rules into computable logical constraints and generates a binary mask matrix aligned with the dimension of the joint temporal representation. The positions that violate the process rules are marked as the first value, and the remaining positions are marked as the second value. The joint temporal representation and the binary mask matrix are input into the anomaly discrimination engine. The anomaly discrimination engine calculates the anomaly confidence score through a dual-path structure. The main path calculates the reconstruction residual as the initial anomaly score through a temporal autoencoder. The auxiliary path adjusts the discrimination boundary based on a supervised fine-tuning module and outputs the fine-tuned anomaly score. The outputs of the two paths are fused by dynamic weights to generate the final anomaly confidence score. Based on the comparison result between the abnormal confidence score and the preset threshold, and combined with the violation status indicated by the binary mask matrix, it is determined whether to trigger an abnormal emission warning and generate a corresponding event report.

2. The method for identifying abnormal industrial wastewater discharge according to claim 1, characterized in that, The operations performed by the adaptive data alignment module specifically include: The sampling frequency of water quantity parameters and process operation status parameters is upsampled to water quality parameters using linear interpolation. A sliding median filter is used to smooth water quality parameters in order to suppress sensor drift noise; When it is determined that a certain parameter has no valid sample value within 30 consecutive seconds, a reasonable confidence interval for the missing parameter is inferred based on the current process operation status parameters, and a replacement value with confidence weight is generated. The confidence weight is determined by the relative width of the confidence interval.

3. The method for identifying abnormal industrial wastewater discharge according to claim 1, characterized in that, In the multi-scale temporal feature extraction unit: The short-time window convolution branch adopts a three-layer one-dimensional convolution stacked structure, with each layer having a kernel size of 3, a stride of 1, and an activation function of modified linear unit, used to process the time series data of the most recent sixty seconds to capture local high-frequency fluctuation features. The long-term window cyclic branch adopts a bidirectional gated cyclic unit network with a hidden layer dimension of 128. It is used to process the time series data of the most recent 7,200 seconds to model the process periodicity pattern across hours. The forward and backward outputs are concatenated and then reduced to 64 dimensions by a fully connected layer. The channel attention mechanism obtains channel statistics by performing global average pooling on the feature vector of each channel, and then generates normalized channel weight coefficients through two fully connected layers and the Sigmoid function. The feature vectors output by the short-term window convolutional branch and the long-term window cyclic branch are weighted and summed according to the weight coefficients to generate a 128-dimensional joint temporal representation.

4. The method for identifying abnormal industrial wastewater discharge according to claim 1, characterized in that, The operations performed by the process logic constraint encoder specifically include: The process rule entries in the configuration file are read by the rule parser. Each rule contains a set of prerequisites and a conclusion action. The prerequisites consist of parameter names, comparison operators and thresholds. During runtime, all rules are traversed, and each rule of the current multi-parameter time series segment is matched one by one. If the data at a certain time step violates any rule, a binary mask value of 0 is generated at the corresponding position; otherwise, a value of 1 is generated.

5. The method for identifying abnormal industrial wastewater discharge according to claim 1, characterized in that, In the anomaly detection engine: The encoder of the time-series autoencoder contains two layers of gated recurrent units, and the decoder adopts a hybrid structure of deconvolution and recurrent units. The reconstruction residual is defined as the mean square error between the input multi-parameter time segment and its reconstructed output. The reconstruction residual is used as the initial anomaly score after being exponentially smoothed. The supervised fine-tuning module adopts a twin network structure and shares the encoder part of the temporal autoencoder. Its loss function is a triplet loss, which adjusts the discrimination boundary by bringing the embedding distance of similar abnormal samples closer together and pushing the embedding distance of normal and abnormal samples further apart. In the dynamic weight fusion, the weight value is obtained by calculating the average cosine similarity between the current data segment and the normal samples in the sliding experience replay buffer, and then mapped to the [0,1] interval by the Sigmoid function. The final anomaly confidence score is the product of the weight value and the initial anomaly score plus a subtraction of the product of the weight value and the fine-tuned anomaly score.

6. The method for identifying abnormal industrial wastewater discharge according to claim 1 or 5, characterized in that, The anomaly detection engine integrates an online incremental learning mechanism, the operations performed by which the online incremental learning mechanism includes: The system receives external confirmation signals through the event feedback interface. When an abnormal confirmation signal is received, the data of the current time window and the five time windows before and after it are added to the experience playback buffer, and the gradient backpropagation fine-tuning process for the autoencoder decoder part and the fully connected projection layer of the twin network is started. When a false alarm correction signal is received, the corresponding data segment is marked as a normal sample and added to the empirical replay buffer, and the discrimination threshold is adjusted to be 0.1 units lower than the current anomaly confidence score; The experience playback buffer adopts a first-in-first-out strategy, with a fixed capacity of one thousand time windows, and is used to periodically calibrate the discrimination threshold. The calibration cycle is twenty-four hours. The 99th percentile of the abnormal confidence score of normal samples in the buffer is used as the first threshold, and the 99.9th percentile is used as the second threshold.

7. The method for identifying abnormal industrial wastewater discharge according to claim 1, characterized in that, The specific rules for determining whether an abnormal emission warning has been triggered are as follows: A Level 1 warning is triggered when the abnormal confidence score exceeds the first threshold for sixty consecutive seconds, or exceeds the second threshold once. If a Level 1 warning is triggered and the binary mask matrix indicates a violation at the corresponding time step, the warning is upgraded to Level 2. After an alert is triggered, a structured event report is generated, which includes the anomaly start time, duration, dominant anomaly parameters, associated process status, confidence score, and original data snapshot.

8. The method for identifying abnormal industrial wastewater discharge according to claim 1, characterized in that, The water quality parameters include chemical oxygen demand, ammonia nitrogen concentration, total phosphorus concentration, pH value, and conductivity; the water quantity parameters include instantaneous flow rate and cumulative discharge; the process operation status parameters include production equipment start / stop signals, pump and valve on / off status, and wastewater treatment unit operation mode identifiers.

9. The method for identifying abnormal industrial wastewater discharge according to claim 1, characterized in that, The sliding time window mechanism has a window length of 360 seconds and a sliding step size of 10 seconds.

10. The method for identifying abnormal industrial wastewater discharge according to claim 1, characterized in that, The method uses a central coordinating controller to uniformly schedule the execution timing of each functional module. The central coordinating controller sequentially calls the adaptive data alignment module, the multi-scale time series feature extraction unit, the process logic constraint encoder, and the anomaly detection engine. Data is transferred between modules using a shared memory queue and processed using a pipelined parallel architecture, so that the end-to-end delay from data input to early warning output does not exceed five seconds.

Citation Information

Patent Citations

  • Environmental Survey Data Processing Method for Geological and Mineral Exploration

    CN118395223B

  • Collaborative simulation method of multiple water quality indicators based on physical information deep neural network

    CN120338615B