Anomaly diagnosis method for double-membrane process water plant and storage medium
By constructing a directed causal graph and performing reinforcement learning, the problem of rapid localization and link-level explainable tracing of anomalies throughout the entire process of a dual-membrane process water plant was solved, achieving efficient anomaly diagnosis and root cause coverage, and improving the stability and reliability of water plant operation and maintenance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JINKE ZHISHUI (WUHAN) TECHNOLOGY CO LTD
- Filing Date
- 2026-01-14
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies are insufficient for rapid location of anomalies throughout the entire process and for traceable root causes at the link level in dual-membrane water plants. They lack a link-level anomaly diagnosis framework that covers the entire ultrafiltration and reverse osmosis process and are unable to provide stable and reliable anomaly input signals while keeping the false alarm rate under control.
By collecting multi-source sensor data, performing time alignment and preprocessing, a directed causal graph is constructed and reinforcement learning is performed. The edge weights are updated using the misaligned mutual information causality measure within the sliding time window and the joint model, forming a directed causal graph. Combined with reinforcement learning training, a strategy for searching upstream from the abnormal water production node on the directed causal graph is obtained, and abnormal links and node abnormal information are output.
It enables rapid location of anomalies throughout the entire process of a dual-membrane water plant and traceable and interpretable sources at the chain level, improving the physical interpretability and accuracy of diagnostic results, avoiding the time-consuming and laborious nature of manual diagnosis and the risk of misjudgment and omission, and ensuring a stable and continuous supply of high-quality water.
Smart Images

Figure CN122153274A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent operation and maintenance technology for water plants, and in particular to an anomaly diagnosis method and storage medium for water plants using dual-membrane processes. Background Technology
[0002] With the continuous improvement of urban water supply quality standards, the number of deep-treatment water plants adopting the "ultrafiltration-reverse osmosis" dual-membrane combination process is rapidly increasing. The dual-membrane process removes turbidity and suspended solids through ultrafiltration, followed by further removal of dissolved salts and organic matter through reverse osmosis, achieving high-quality water supply with low turbidity and low conductivity. To ensure long-term stable operation, water plants deploy numerous online sensors at locations such as raw water, pretreatment, ultrafiltration, reverse osmosis, and clear water tanks. These sensors are used in conjunction with a SCADA (Supervisory Control and Data Acquisition) system to automatically monitor and regulate pumps, valves, and various process parameters.
[0003] Dual-membrane water treatment plants are characterized by multiple treatment units, long process chains, strong variable coupling, and time-varying operating conditions. Fluctuations in influent water quality and temperature, membrane fouling evolution and cleaning operations, changes in pump and valve operating conditions, and adjustments to control strategies can all trigger abnormal phenomena such as increased transmembrane pressure differences, decreased membrane flux, increased permeate conductivity, or decreased permeate flow. These anomalies often propagate step by step along the process chain, with significant time lags and cumulative effects between their manifestations and root causes. Diagnosing these anomalies solely based on operator experience is not only time-consuming and labor-intensive but also prone to misdiagnosis or missed diagnosis.
[0004] Existing anomaly monitoring and diagnosis methods mainly include multivariate statistical process monitoring, mechanism and knowledge-driven diagnosis, and data-driven methods such as deep learning. MSPC (Multivariate Statistical Process Control) methods based on PCA (Principal Component Analysis) and PLS (Partial Least Squares) are widely used for anomaly detection in continuous processes. They can identify deviations from normal operating conditions using statistics such as T² (T-squared Hotelling's T² statistic) and SPE (Squared Prediction Error). However, they primarily characterize linear correlation structures and lack adaptability to the nonlinearity, strong coupling, and operating condition drift commonly found in two-film processes. Furthermore, they struggle to provide causal explanations consistent with the physical process flow. Diagnostic methods based on mechanistic models such as mass balance and energy balance, combined with expert experience, offer physical interpretability. However, constructing high-precision mechanistic models is costly and difficult to maintain, and their generalization ability to multi-source disturbances and novel anomalies is limited.
[0005] In summary, for the typical multi-source heterogeneous data scenario of dual-membrane water plants, existing technologies still suffer from the following common problems: a lack of a link-level anomaly diagnosis framework covering the entire ultrafiltration and reverse osmosis process, making it difficult to clearly depict the propagation path of anomalies between units; and a lack of a systematic data quality control and anomaly characterization mechanism oriented towards time windows, making it difficult to provide stable and reliable anomaly input signals while keeping false alarm rates under control. Therefore, there are technical challenges in achieving rapid anomaly localization and interpretable link-level root cause tracing throughout the entire dual-membrane water plant process. Summary of the Invention
[0006] In order to solve the above-mentioned technical problems, or at least partially solve the above-mentioned technical problems, this application provides an anomaly diagnosis method and storage medium for dual-membrane process water plants.
[0007] This application provides an anomaly diagnosis method for dual-membrane process water plants, including: Collect multi-source sensor operation data related to influent, treatment units at all levels and product water in a dual-membrane process water plant, perform time alignment and preprocessing on the operation data to form a multivariate time series; Within a preset time window, effective data filtering and anomaly characterization are performed on each monitoring variable constituting the multivariate time series to obtain a time window-level anomaly score for each monitoring variable. Under the prior constraints of the process flow, an initial directed graph is constructed according to the process flow, and the monitored variables are classified. The misaligned mutual information causality measure within the sliding time window is used to supplement and filter the directed edges of the initial directed graph, and the edge weights of the initial directed graph are updated through a joint model to obtain a directed causal graph for characterizing the dual-film process structure, wherein the monitored variables are nodes in the directed causal graph. The directed causal graph and the time window-level anomaly scores of each node in the directed causal graph are constructed into a reinforcement learning environment. Through reinforcement learning training, a strategy for searching upstream from the water production state anomaly node on the directed causal graph is obtained. When an anomaly is detected in the water production state variable, the strategy is invoked to search for an abnormal link from the downstream abnormal node to the upstream root cause node on the directed causal graph, and a diagnostic result containing the abnormal link and node anomaly information is output.
[0008] Optionally, the time alignment and preprocessing includes: resampling monitoring variables with different sampling intervals to a unified time step, interpolating and filling missing data in the monitoring variables, and removing or correcting erroneous data points in the monitoring variables according to the multi-source sensor operation monitoring standard, so as to obtain a continuous multivariate time series that can be used for anomaly detection.
[0009] Optionally, the step of effectively filtering the monitoring variables constituting the multivariate time series within a preset time window includes: According to the preset length, the time series corresponding to each monitoring variable is divided into sliding segments; for each divided time window, the statistical characteristics of the data within the window are calculated, and it is determined whether the fluctuation range of the data within the time window is within the preset allowable range; if the data within the time window satisfies the fluctuation constraint and the proportion of valid data points within the window exceeds the preset threshold, then the time window is determined as a valid time window, and the corresponding local baseline is determined based on the data within the valid time window.
[0010] Optionally, the time window-level anomaly score is obtained by aggregating and weighting the engineering anomaly score and statistical anomaly score corresponding to each data point within each time window. The engineering anomaly score is determined based on the upper limit, lower limit, or one-sided limit of each monitored variable. The statistical anomaly score is obtained based on the standardized deviation of the measured value relative to the local baseline.
[0011] Optionally, the method further includes: An empirical distribution is constructed using time window-level anomaly scores under historical normal operating conditions. The corresponding quantile value is selected as the anomaly detection control limit according to the preset target false alarm rate. If the anomaly score of the current time window exceeds the control limit, the current time window is determined to be an abnormal time window.
[0012] Optionally, the method further includes: Variables reflecting raw water quality and environmental conditions are defined as influent condition variables, adjustable operating parameters are defined as control parameter variables, process operating characteristics are defined as intermediate state variables, and terminal indicators are defined as product water state variables. The initial directed graph is constructed based on the influent condition variables, the control parameter variables, the intermediate state variables, and the product water state variables.
[0013] Optionally, the method further includes: Based on the dual-membrane process flow and human experience, a directed initial graph is constructed between the influent condition variables, control parameter variables, intermediate state variables and product water state variables, and the direction of the directed edges in the graph is predefined. The multivariate time series of each of the monitored variables are standardized. Within a given time lag range, the time series of node pairs belonging to the candidate edges in the directed initial graph are misaligned and aligned. Causality metrics under different time lags are calculated. The optimal lag and initial causal strength of the edge are determined by the time lag corresponding to when the causal metric reaches its maximum value. When the initial causal strength exceeds a preset threshold and the direction of the edge satisfies the prior constraints of the process, the directed edge is retained, resulting in a sparse directed graph structure. Using the sparse directed graph as the topology of a graph neural network, a model combining graph attention and temporal recursive units is adopted to train on historical operating data. The edge weights obtained from the training are used to update and filter the causal strength of the retained directed edges, thereby obtaining the directed causal graph that represents the causal relationship between variables in the dual-film process.
[0014] Optionally, constructing a reinforcement learning environment from the directed causal graph and the time-window-level anomaly scores of each node in the directed causal graph includes: Each node in the directed causal graph is taken as a state node in the environment. The directed edges between nodes and their corresponding edge weights are taken as the optional transition paths and the strength of the transition paths in the environment, respectively. The time window-level anomaly scores of each node under the target time window are taken as state features and incorporated into the input to construct a Markov decision process. The state features are composed of the current node, the set of visited nodes, the anomaly score vector of global nodes, and the edge weight vector.
[0015] Optionally, constructing a reinforcement learning environment from the directed causal graph and the time-window-level anomaly scores of each node in the directed causal graph includes: Each node in the directed causal graph is taken as a state node in the environment. The directed edges between nodes and their corresponding edge weights are taken as the optional transition paths and the strength of the transition paths in the environment, respectively. The time window-level anomaly scores of each node under the target time window are taken as state features and incorporated into the input to construct a Markov decision process. The state features are composed of the current node, the set of visited nodes, the anomaly score vector of global nodes, and the edge weight vector.
[0016] Optionally, the reinforcement learning policy network is obtained by offline training on historical anomalous events or constructed simulated anomalous scenarios. The policy network adopts a graph neural network structure, taking the node features and edge weights of a directed causal graph as input. During training, the parameters of the graph neural network are iteratively updated on the graph structure using a proximal policy optimization algorithm until convergence is achieved under the constraint of the reward function, thus obtaining a stable policy network for performing root cause path search on the directed causal graph.
[0017] This application provides an anomaly diagnosis system for dual-membrane process water plants, including: The data acquisition module is used to collect multi-source sensor operation data related to influent, treatment units at all levels and product water in the dual-membrane process water plant, and to perform time alignment and preprocessing on the operation data to form a multivariate time series. The data anomaly characterization module is used to perform effective data filtering and anomaly characterization on each monitoring variable constituting the multivariate time series within a preset time window, and obtain the time window-level anomaly score of each monitoring variable. The directed causal structure learning module is used to construct an initial directed graph according to the process flow under the prior constraints of the process flow, classify the monitored variables, supplement and filter the directed edges of the initial directed graph using the misaligned mutual information causality measure within a sliding time window, and update the edge weights of the initial directed graph through a joint model to obtain a directed causal graph for characterizing the dual-film process structure, wherein the monitored variables are nodes in the directed causal graph. The reinforcement learning root cause tracking module is used to construct a reinforcement learning environment from the directed causal graph and the time window-level anomaly scores of each node in the directed causal graph. Through reinforcement learning training, a strategy for searching upstream from the abnormal node of the water production state on the directed causal graph is obtained. When an anomaly of the water production state variable is detected, the strategy is invoked to search for the abnormal link from the downstream abnormal node to the upstream root cause node on the directed causal graph, and a diagnostic result containing the abnormal link and node anomaly information is output. The results display module is used to visually display the dual-membrane process flow, abnormal status of each node, and abnormal links, and supports operation and maintenance personnel to view and annotate the diagnostic results.
[0018] This application provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the anomaly diagnosis method for a dual-membrane process water plant.
[0019] This application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the anomaly diagnosis method for dual-membrane process water plants.
[0020] By adopting the above technical solution, the beneficial effects of this application are as follows: through standardized preprocessing of multi-source sensor data and time-window-level anomaly quantification, stable and reliable anomaly input signals are obtained under the constraint of preset false alarm rate, effectively solving the problem of inconsistent data quality in dual-membrane process water plants; the directed causal graph constructed by process flow prior constraints and joint model optimization not only conforms to the actual process logic of "influent - treatment - product water" but also accurately depicts the statistical correlation and temporal dependence between variables, significantly improving the physical interpretability of diagnostic results; through the root cause search strategy trained by reinforcement learning, the complete link from the product water anomaly node to the upstream root cause node can be efficiently traced on the complex causal graph, taking into account both anomaly coverage and path simplicity, avoiding the time-consuming and laborious manual diagnosis and the possibility of misjudgment and omission; ultimately, it realizes rapid location of anomalies in the entire dual-membrane process, link-level interpretable tracing, high root cause coverage accuracy and reasonable path length, providing strong support for intelligent operation and maintenance decisions of water plants and ensuring the stable and continuous supply of high-quality water. Attached Figure Description
[0021] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0022] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a flowchart illustrating an anomaly diagnosis method for a dual-membrane process water plant as described in an embodiment of this application. Figure 2 This is a schematic diagram of the structure of an anomaly diagnosis system for a dual-membrane process water plant, as described in an embodiment of this application. Detailed Implementation
[0024] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0025] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.
[0026] Therefore, this application proposes an anomaly diagnosis method for dual-membrane process water plants. Figure 1 This is one of the flowcharts illustrating an anomaly diagnosis method for a dual-membrane process water plant according to an embodiment of this application; this application can be applied to actual dual-membrane process water plants. The following explanation uses a dual-membrane process water plant as an example, which has approximately 214 online sensors deployed, such as... Figure 1 As shown, the anomaly diagnosis method for dual-membrane process water plants includes: S101. Collect multi-source sensor operation data related to influent, treatment units at all levels and product water in the dual-membrane process water plant, perform time alignment and preprocessing on the operation data to form a multivariate time series.
[0027] Specifically, all historical operating data and corresponding operating monitoring standards from the multi-source sensors are exported through the SCADA system. The original 1-second sampling data is then standardized to a 4-second sampling interval using interpolation and downsampling methods. The monitored variables over time The measured value is This yielded a multi-source time series dataset. Simultaneously, the upper limit thresholds for each sensor were imported according to the water plant's operating procedures. and lower threshold .
[0028] In this embodiment, by collecting multi-source sensor operation data from the entire process of a dual-membrane process water plant and performing preprocessing tasks such as time alignment, resampling, missing data interpolation and imputation, and erroneous data removal / correction, the raw data with different sampling intervals and varying quality can be standardized into a continuous and uniform multivariate time series. This process effectively solves the industry pain points of heterogeneous, incomplete, and inaccurate dual-membrane process data, providing a high-quality and reliable basic data source for subsequent anomaly screening, causal modeling, and root cause search, ensuring the reliability and stability of the entire diagnostic process.
[0029] S102. Within a preset time window, perform effective data screening and anomaly characterization on each monitoring variable that constitutes the multivariate time series, and obtain the time window-level anomaly score for each monitoring variable.
[0030] Specifically, at the level of data anomaly representation, the time series corresponding to each monitored variable is divided into sliding segments according to a preset length; for each segmented time window, the statistical characteristics of the data within the window are calculated, and it is determined whether the fluctuation range of the data within the time window is within a preset allowable range; if the data within the time window satisfies the fluctuation constraint and the proportion of valid data points within the window exceeds a preset threshold, then the time window is determined as a valid time window, and the corresponding local baseline is determined based on the data within the valid time window.
[0031] For example, using a 40-minute detection window, a sliding segmentation is performed on the time series of each sensor. Let there be a total of [number] sensors within a certain window. There are 1 sampling points, and the corresponding observation value is denoted as . First, the window mean is calculated using formulas (1) and (2). and standard deviation : (1) (2) The coefficient of variation is constructed according to the following formula (3): (3) in, To prevent extremely small positive numbers with a denominator of zero, a relative fluctuation tolerance coefficient is set based on the variable category. Ultrafiltration class variables take =30%, reverse osmosis variables are taken as... =20%, water quality variables are taken as... =10%, and data points that satisfy the following formula (4) are considered valid points: (4) Let the number of valid points be . The proportion of valid data points in this time window can be expressed by the following formula (5): (5) When both conditions are met Not exceeding the preset upper limit ,and When this happens, the window is defined as a stable window, where, The value is adaptively determined based on historical normal operating condition data, and is taken as the 95th percentile, for the set of effective points within the stable window. The local baseline mean and standard deviation are re-estimated using the following formulas (6) and (7) to serve as the reference baseline for subsequent statistical anomaly scores: (6) (7).
[0032] Specifically, for each data point within the stable window The project anomaly score and the statistical anomaly score are constructed by aggregating and weighting the project anomaly score and the statistical anomaly score corresponding to each data point in each time window to obtain the time window level anomaly score.
[0033] For example, for each data point within the stable window The engineering anomaly score and statistical anomaly score are constructed. The engineering anomaly score can be defined in segments according to the operation monitoring standard using the following formula (8): (8) in, To control the coefficients of the normalization scale, used to determine the relative exceedance range corresponding to the engineering anomaly score reaching the saturation value of 1, the operating state variables such as pressure and flow rate are taken as 0.3, the key membrane operation variables such as transmembrane pressure difference and membrane flux are taken as 0.2, and the water quality indicators such as turbidity and conductivity are taken as 0.1; the statistical anomaly score is based on the standardized deviation of the local baseline, and the standardized residual is first calculated using the following formula (8): (9) Then, the linear function is mapped to the interval [0,1] using the following formula (10). (10) in, To control the sensitivity coefficient for statistical outlier scores, it can be set based on the distribution of standardized residuals under historical normal operating conditions, ensuring that the coefficient remains within the normal fluctuation range. Approaching 0, the point-level comprehensive anomaly score is then obtained by weighted summation using the following formula (11): (11) in, At the window level, the time window-level comprehensive anomaly score is obtained by averaging the point-level scores within the window using the following formula (12). : (12) Specifically, an empirical distribution is constructed using time window-level anomaly scores under historical normal operating conditions. The corresponding quantile value is selected as the anomaly detection control limit according to the preset target false alarm rate. If the anomaly score of the current time window exceeds the control limit, the current time window is determined to be an abnormal time window.
[0034] For example, building using historical normal operation data Based on the empirical distribution and the preset false alarm rate Selecting quantiles As a time window level control limit for this sensor, if the current window score The window is marked as an abnormal window, thus forming an abnormal marking sequence with a resolution of 40 min.
[0035] In this embodiment, effective data filtering and anomaly characterization are performed on each monitored variable in the multivariate time series within a preset time window. By distinguishing stable and effective time windows, constructing engineering anomaly scores (aligning with operational standards) and statistical anomaly scores (aligning with recent baselines), and weighting and aggregating them, the final time window-level anomaly score can reflect the degree of deviation of the monitored variables from operational norms and normal levels. Furthermore, it can adaptively set control limits using historical normal data, achieving a controllable false alarm rate. This step effectively suppresses data noise interference, making the anomaly signals clearer and more continuous, providing accurate anomaly quantification basis for subsequent anomaly state labeling of causal graph nodes and the construction of reinforcement learning environments.
[0036] S103. Under the prior constraints of the process flow, an initial directed graph is constructed according to the process flow, and the monitored variables are classified. The misaligned mutual information causality measure within the sliding time window is used to supplement and filter the directed edges of the initial directed graph. The edge weights of the initial directed graph are updated through a joint model to obtain a directed causal graph used to characterize the dual-film process structure.
[0037] In this context, the monitored variables are represented as nodes in the directed causal graph.
[0038] Specifically, at the level of causal structure learning and graph neural network modeling, variables reflecting raw water quality and environmental conditions are defined as influent condition variables, adjustable operating parameters are defined as control parameter variables, process operating characteristics are defined as intermediate state variables, and terminal indicators are defined as product water state variables; based on influent condition variables, control parameter variables, intermediate state variables, and product water state variables, an initial directed graph is constructed.
[0039] For example, in the causal structure learning and graph neural network modeling level, all monitored variables are first standardized by Z-Score over the entire time period, and the original sequence is then processed by the following formula (13). Convert to : (13) in, and These represent the global mean and standard deviation of the variable under historical normal operating conditions. Based on the dual-membrane process flow, the variables are divided into influent condition variables, control parameter variables, intermediate state variables, and product water state variables. An initial directed graph is constructed based on process priors, depicting the flow from raw water through pretreatment, ultrafiltration, reverse osmosis, to the clear water tank and external water supply. The direction of the edge is defined as pointing from the upstream processing unit to the downstream processing unit.
[0040] Specifically, based on the dual-membrane process flow and human experience, a directed initial graph is constructed connecting influent condition variables, control parameter variables, intermediate state variables, and product water state variables, with the direction of the directed edges in the graph pre-defined. The multivariate time series of each monitored variable are standardized. Within a given time lag range, the time series of node pairs belonging to candidate edges in the directed initial graph are misaligned. Causality metrics under different time lags are calculated, and the optimal lag and initial causal strength of an edge are determined by the time lag corresponding to the maximum value of the causal metric. When the initial causal strength exceeds a preset threshold and the edge direction satisfies the process prior constraints, the directed edge is retained, resulting in a sparse directed graph structure. The sparse directed graph is used as the topology of a graph neural network. A model combining graph attention and temporal recursive units is used to train the network on historical operating data. The edge weights obtained from the training are used to update and filter the causal strength of the retained directed edges, thereby obtaining a directed causal graph representing the causal relationship between the dual-membrane process variables.
[0041] For example, on the initial causal graph, for a given maximum time lag... Candidate node pairs within the range For standardized time series , Misalignment is performed, and time-series mutual information is used to calculate different time lags. Causality measurement After obtaining the causality measurement curve, the following formulas (14) and (15) are used to... Consider the initial causal strength of this edge: (14) (15) Based on this, a directed graph will be formed. As a topology for graph neural networks, a GAT-LSTM (Graph Attention Networks-Long Short-Term Memory networks) model is constructed, which combines graph attention and long short-term memory units. Let the features of each node at a given time in the graph be denoted as... Calculate nodes through graph attention mechanism Its adjacent nodes Attention coefficient between And perform neighborhood feature aggregation according to the following formula (16), (16) in, The activation function is nonlinear, and W represents the trainable weights. The aggregated node feature sequence is then input into an LSTM unit to learn dynamic dependencies over time. In this embodiment, the features of nodes corresponding to the influent condition variables, control parameter variables, and intermediate state variables are used as model input, and the features of nodes corresponding to the product water state variables are used as reconstruction output. A loss function is constructed primarily based on the mean square error between the predicted and measured values of the product water state variables. The GAT-LSTM model is trained on historical operating data. The graph attention weights and network parameters are updated by minimizing the loss. After training convergence, the obtained stable attention coefficients or edge weights are used as the final values of the causal strength of each edge in the directed causal graph, thereby obtaining a directed causal graph that conforms to process logic and reflects statistical and temporal correlations.
[0042] Specifically, at the root cause tracking level of reinforcement learning, the aforementioned directed causal graph and the anomaly scores of each time window node are used as the environment to construct a Markov decision process on a graph structure. Suppose that at the moment of diagnosing a certain anomaly, the terminal node of the current candidate root cause path is taken as... The system state can be represented by the following formula (17): (17) in This is the set of currently visited nodes. This represents the time window-level anomaly score vector for each node. Let be the edge weight vector in the graph. Optional actions include starting from the current node. Select an upstream neighbor node Continue expanding the path, or choose the stop action to end the search. For a complete path... Corresponding edge set The comprehensive reward function is constructed using the following formula (18) for the set of abnormal scores and their corresponding sets: (18) in, These are non-negative weighting coefficients, and the definitions of each sub-item are as follows: (1) Anomaly Explanation Coverage Bonus Let the time window-level anomaly score vector for all nodes in the graph be within the time window corresponding to the target diagnosis time. The set of abnormal nodes is .path The coverage of the explanation of global outliers is defined by the following formula (19): (19) in, For nodes Abnormal scores, To prevent extremely small positive numbers with a denominator of zero. This reflects how much "abnormal weight" the path covers.
[0043] (2) Path average anomaly intensity reward To encourage paths to pass through nodes with higher anomalies, the following formula (20) is used: (20) in For the first in the path The anomaly score for each node. The higher this score, the more "obvious" the abnormal nodes traversed in the overall path.
[0044] (3) Structural consistency reward Record the edges of the causal graph. The causal strength or attention weight is The average of the edges on the path is obtained by using the following formula (21). (twenty one) in, This is the normalized edge weight for outgoing edges from the same node, with a value range of [0,1]. This term reflects whether the path extends along the "more reliable" high-weight edges in the causal graph.
[0045] (4) Path length penalty To avoid excessively long paths and overly convoluted search results, a normalized path length penalty is introduced, expressed as the following formula (22): (twenty two) in, This represents the current path length. This represents the maximum allowed path length. The longer the path, the more... The larger the value, the higher the overall reward. Punishment shall be imposed.
[0046] (5) Time-cause-penalty item During the causal structure learning phase, each edge has been preserved. Estimating the optimal time lag Suppose that during the abnormal time corresponding to the diagnostic target time window, the node... The abnormal dominant time is Then the average time deviation of the path can be defined by the following formula (23): (twenty three) in, Similarly, to prevent extremely small positive numbers with a denominator of zero, if the actual order of anomalies at each node on the path matches the optimal lag relationship, then... Smaller; if it seriously violates the causal order, then Significantly increased, through comprehensive rewards Punishment shall be imposed.
[0047] In this embodiment, under the prior constraints of the process flow, the monitored variables are classified and an initial directed graph is constructed. Directed edges are then filtered using a misaligned mutual information causality measure within a sliding time window. Finally, the edge weights are adaptively updated through a joint model. The resulting directed causal graph directly maps the monitored variables to nodes, strictly adhering to the actual process logic of "influent—treatment—product water" while also characterizing the statistical associations and temporal causal dependencies between variables. This design ensures that the characterization of anomaly propagation paths is highly consistent with the engineering mechanism, completely solving the problem of poor interpretability caused by the "black box" nature of traditional models. It provides a structured analytical framework that fits the actual process for subsequent root cause tracing.
[0048] S104. Construct a reinforcement learning environment by using the directed causal graph and the time window-level anomaly scores of each node in the directed causal graph. Train the reinforcement learning to obtain a strategy for searching upstream from the nodes with abnormal water production status on the directed causal graph.
[0049] Specifically, the policy network trained through reinforcement learning searches upstream from nodes with anomalous water production status on a directed causal graph. The policy network employs a graph neural network structure, taking the structural information and anomalous features of the current node and its neighborhood in the directed causal graph as input. This includes the node features of the current node, the anomalous scores and corresponding edge weights of neighboring nodes, and the mask vectors of visited nodes. Through a combination of graph attention units and fully connected layers, the output is a policy probability distribution for each selectable action. These selectable actions include choosing any upstream neighbor to continue extending the path and choosing a termination action. To ensure the policy can balance multiple constraints such as global anomaly interpretability, path length, and temporal causal consistency, the output of the policy network is normalized using a Softmax function, corresponding to a stochastic policy in a Markov decision process.
[0050] During the training phase, the reinforcement learning environment is sampled offline multiple times based on real abnormal events recorded in historical operational data and simulated abnormal scenarios constructed on a directed causal graph. Specifically, using the abnormal nodes of water production status at historical or simulated abnormal moments as initial nodes, the network repeatedly interacts with the environment on the directed causal graph according to the current policy, generating multiple candidate path trajectories from downstream to upstream. For each path, the cumulative reward is calculated according to the aforementioned comprehensive reward function, and the parameters of the graph neural network policy are iteratively updated using the PPO policy gradient algorithm combined with advantage function estimation, thereby increasing the probability of obtaining high-reward paths. Through training on multiple rounds of abnormal events and multiple batches of path trajectories, when the cumulative path reward tends to stabilize during the increase of training rounds and the magnitude of policy parameter changes converges, the policy network is considered to have converged to a stable policy for root cause path search under the set reward structure.
[0051] In this embodiment, a reinforcement learning environment is constructed by integrating a directed causal graph with the time-window-level anomaly scores of each node. Through training, a strategy for searching upstream from nodes with anomalies in the water production state is obtained. Essentially, this transforms the root cause tracing problem into intelligent path search on a graph structure. This strategy, by comprehensively considering multiple objectives such as anomaly explanation coverage, node anomaly strength, and causal structure consistency, effectively overcomes the limitations of low efficiency and high subjectivity in manual path search. It quickly identifies potential root cause paths in high-dimensional and complex process variable relationships, laying the core algorithmic foundation for rapid response in the subsequent online diagnostic phase.
[0052] S105. When an anomaly is detected in the water production state variable, the strategy is invoked to search for the abnormal link from the downstream abnormal node to the upstream root cause node on the directed cause-effect graph, and the diagnostic results containing the abnormal link and node anomaly information are output.
[0053] The simulated environment is a realistic user environment constructed based on the username of the target session.
[0054] Specifically, during the online diagnostic phase, when the time window-level anomaly score of permeate state variables such as total permeate conductivity exceeds the control limit, the node corresponding to the first permeate state variable exceeding the limit is used as the starting node. The current directed causal graph structure, the time window-level anomaly score of each node, and the edge causal weights are input into the trained graph neural network strategy. At each decision step, the strategy network outputs the strategy probabilities of each selectable upstream node and the termination action based on the current state. In this embodiment, the action with the highest probability or sampling based on the strategy distribution can be selected as the actual action. The search proceeds upstream on the graph step by step, ending when the preset maximum path length is reached, no available upstream node is found, or the strategy outputs a termination action. The resulting ordered sequence of one or more nodes represents the anomaly link tracing back from the downstream permeate anomaly node to the upstream root cause node, and can simultaneously output the anomaly score, corresponding time information, and edge causal weights of each node on the link. This diagnostic link can reveal abnormal propagation processes such as "increased turbidity of raw water or ultrafiltration feed water → changes in ultrafiltration membrane flux and increased transmembrane pressure difference → changes in reverse osmosis feed water conductivity → increased reverse osmosis permeate conductivity", which is consistent with the engineering experience of operators, thereby achieving link-level explainable root cause diagnosis of anomalies in dual-membrane process water plants.
[0055] In this embodiment, when an anomaly in the permeate state variable is detected, a pre-trained strategy is invoked to search for anomaly links on the directed causal graph and output the results. This achieves reverse tracing of anomalies throughout the dual-membrane process, "from result to cause." The output anomaly links not only clearly identify the root cause node and the anomaly propagation path but also include node anomaly scores, time information, and causal weights. This allows maintenance personnel to intuitively grasp the source, propagation process, and key influencing factors of the anomaly, completely changing the traditional time-consuming, labor-intensive, and misjudgment-prone situation of manual diagnosis. It provides directly implementable decision support for quickly developing targeted response measures and ensuring the stable operation of the water plant.
[0056] In the above scheme, by standardizing the preprocessing of multi-source sensor data and quantifying anomalies at the time window level, stable and reliable anomaly input signals are obtained under the constraint of a preset false alarm rate, effectively solving the problem of inconsistent data quality in dual-membrane process water plants. The directed causal graph constructed by prior constraints of the process flow and joint model optimization not only conforms to the actual process logic of "influent—treatment—product water" but also accurately depicts the statistical correlations and temporal dependencies between variables, significantly improving the physical interpretability of diagnostic results. Through a root cause search strategy trained by reinforcement learning, the complete link from the product water anomaly node to the upstream root cause node can be efficiently traced on the complex causal graph, balancing anomaly coverage and path simplicity, avoiding the time-consuming and laborious manual diagnosis and the risk of misjudgment or omission. Ultimately, it achieves rapid location of anomalies throughout the dual-membrane process, link-level interpretable tracing, high root cause coverage accuracy, and reasonable path length, providing strong support for intelligent operation and maintenance decisions of water plants and ensuring the stable and continuous supply of high-quality water.
[0057] In one specific embodiment, in 15 historical anomaly events at a dual-membrane water plant, the method of this application provided anomaly links covering the root cause units diagnosed manually in 14 of the events, and the root cause path length did not exceed 8 nodes; on normal operating data, the false alarm rate at the time window level was controlled at approximately 1%. The results show that the method of this invention can accurately track the anomaly propagation path and locate the upstream root cause unit while ensuring a controllable false alarm rate.
[0058] Furthermore, validation results on two years of operational data from the dual-membrane water plant show that the time-window-level comprehensive anomaly score constructed by the method of this invention exhibits a unimodal distribution on the normal operating condition dataset. Using the 99th percentile of the normal data as the control limit, the time-window-level false alarm rate on the normal operating condition test set is approximately 1.0%. In the directed causal structure learning stage, after training the initial causal graph using the GAT-LSTM model, the high-weight edges in the resulting directed causal graph are mainly concentrated in the main process of "raw water—pretreatment—ultrafiltration—reverse osmosis—permeate" and branches related to key control parameters. The direction of the edges is basically consistent with the process influence direction summarized by the operators, indicating that the learned causal structure can better reflect the actual process logic of the dual-membrane process. At the same time, in the task of reconstructing the permeate variables, the determination coefficient R2 of the GAT-LSTM model on the test set remains above 0.9, and the training loss converges to a small and stable value after 500 iterations, indicating that the introduction of graph structure and temporal dependence significantly improves the model's ability to represent process dynamics. In the root cause tracking stage of reinforcement learning, based on the constructed comprehensive reward function, the cumulative reward of the path generally increases with the training rounds and tends to stabilize after 2000 iterations. At this time, the average length of the root cause path output by the policy network converges from the initial 10-15 nodes to about 6-8 nodes, while the coverage of the total number of anomalies remains above 90%, indicating that the learned policy can cover most of the anomaly contributing nodes in a shorter path, taking into account both diagnostic accuracy and path simplicity.
[0059] It should be noted that this embodiment is only used to illustrate the technical solution and application effect of this application. This application is not limited to the specific water plant scenario mentioned above. For other water plants that adopt similar dual-membrane process flow and online monitoring system, the abnormality diagnosis can also be performed according to the method of this application.
[0060] This application also provides an anomaly diagnosis system for dual-membrane process water plants. Figure 2 This is a schematic diagram of an anomaly diagnosis system for a dual-membrane process water plant according to an embodiment of this application. The anomaly diagnosis system 200 for a dual-membrane process water plant includes: Data acquisition module 201 is used to collect multi-source sensor operation data related to influent, treatment units at all levels and product water in the dual-membrane process water plant, and to perform time alignment and preprocessing on the operation data to form a multivariate time series. The data anomaly characterization module 202 is used to effectively filter and characterize the data of each monitoring variable that constitutes the multivariate time series within a preset time window, and obtain the time window-level anomaly score of each monitoring variable. The directed causal structure learning module 203 is used to construct an initial directed graph according to the process flow under the prior constraints of the process flow, classify the monitored variables, supplement and filter the directed edges of the initial directed graph using the misaligned mutual information causality measure within the sliding time window, and update the edge weights of the initial directed graph through the joint model to obtain a directed causal graph that characterizes the dual-film process structure, wherein the monitored variables are nodes in the directed causal graph. The reinforcement learning root cause tracking module 204 is used to construct a reinforcement learning environment from the directed causal graph and the time window-level anomaly scores of each node in the directed causal graph. Through reinforcement learning training, a strategy for searching upstream from the abnormal node of the water production state on the directed causal graph is obtained. When an anomaly of the water production state variable is detected, the strategy is invoked to search for the abnormal link from the downstream abnormal node to the upstream root cause node on the directed causal graph, and a diagnostic result containing the abnormal link and node anomaly information is output. The results display module 205 is used to visually display the dual-membrane process flow, abnormal status of each node and abnormal link, and supports operation and maintenance personnel to view and annotate the diagnostic results.
[0061] In one specific embodiment, the reinforcement learning root cause tracing module 204 includes an environment modeling submodule, a reward construction submodule, a policy training submodule, and an online inference submodule, wherein: the environment modeling submodule is used to encapsulate the directed causal graph, the time window-level anomaly scores of each node, and the edge weights into a graph-structured reinforcement learning environment; the reward construction submodule is used to construct a comprehensive reward function based on anomaly explanation coverage, average path anomaly intensity, causal structure consistency, path length penalty, and time causal consistency penalty; the policy training submodule is used to train the graph neural network-based policy network offline using a proximal policy optimization algorithm under historical anomaly data and / or simulated anomaly scenarios to obtain a stable policy for root cause path search; the online inference submodule is used to call the trained policy network to perform root cause path search on the directed causal graph when anomalies in the water production state variables are detected, and output diagnostic results containing anomaly links and root cause nodes.
[0062] In the above scheme, by standardizing the preprocessing of multi-source sensor data and quantifying anomalies at the time window level, stable and reliable anomaly input signals are obtained under the constraint of a preset false alarm rate, effectively solving the problem of inconsistent data quality in dual-membrane process water plants. The directed causal graph constructed by prior constraints of the process flow and joint model optimization not only conforms to the actual process logic of "influent—treatment—product water" but also accurately depicts the statistical correlations and temporal dependencies between variables, significantly improving the physical interpretability of diagnostic results. Through a root cause search strategy trained by reinforcement learning, the complete link from the product water anomaly node to the upstream root cause node can be efficiently traced on the complex causal graph, balancing anomaly coverage and path simplicity, avoiding the time-consuming and laborious manual diagnosis and the risk of misjudgment or omission. Ultimately, it achieves rapid location of anomalies throughout the dual-membrane process, link-level interpretable tracing, high root cause coverage accuracy, and reasonable path length, providing strong support for intelligent operation and maintenance decisions of water plants and ensuring the stable and continuous supply of high-quality water.
[0063] This embodiment also provides a computer-readable storage medium (including but not limited to disk storage, compact disc read-only memory (CD-ROM), optical storage, etc.) storing computer program code. When the computer program code is run on a computer, the computer executes the above-mentioned related method steps to implement the anomaly diagnosis method for dual-membrane process water plants provided in the above embodiment.
[0064] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement the anomaly diagnosis method for dual-membrane process water plants provided in the above embodiment.
[0065] The beneficial effects of the above embodiments can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.
[0066] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0067] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An anomaly diagnosis method for dual-membrane process water plants, characterized in that, include: Collect multi-source sensor operation data related to influent, treatment units at all levels and product water in a dual-membrane process water plant, perform time alignment and preprocessing on the operation data to form a multivariate time series; Within a preset time window, effective data filtering and anomaly characterization are performed on each monitoring variable constituting the multivariate time series to obtain a time window-level anomaly score for each monitoring variable. Under the prior constraints of the process flow, an initial directed graph is constructed according to the process flow, and the monitored variables are classified. The misaligned mutual information causality measure within the sliding time window is used to supplement and filter the directed edges of the initial directed graph, and the edge weights of the initial directed graph are updated through a joint model to obtain a directed causal graph for characterizing the dual-film process structure, wherein the monitored variables are nodes in the directed causal graph. The directed causal graph and the time window-level anomaly scores of each node in the directed causal graph are constructed into a reinforcement learning environment. Through reinforcement learning training, a strategy for searching upstream from the water production state anomaly node on the directed causal graph is obtained. When an anomaly is detected in the water production state variable, the strategy is invoked to search for an abnormal link from the downstream abnormal node to the upstream root cause node on the directed causal graph, and a diagnostic result containing the abnormal link and node anomaly information is output.
2. The method according to claim 1, characterized in that, The time alignment and preprocessing include: resampling monitoring variables with different sampling intervals to a unified time step, interpolating and filling missing data in the monitoring variables, and removing or correcting erroneous data points in the monitoring variables according to the multi-source sensor operation monitoring standard, so as to obtain a continuous multivariate time series that can be used for anomaly detection.
3. The method according to claim 1, characterized in that, The step of effectively filtering the monitoring variables constituting the multivariate time series within a preset time window includes: According to the preset length, the time series corresponding to each monitoring variable is divided into sliding segments; for each divided time window, the statistical characteristics of the data within the window are calculated, and it is determined whether the fluctuation range of the data within the time window is within the preset allowable range; if the data within the time window satisfies the fluctuation constraint and the proportion of valid data points within the window exceeds the preset threshold, then the time window is determined as a valid time window, and the corresponding local baseline is determined based on the data within the valid time window.
4. The method according to claim 1, characterized in that, The time window-level anomaly score is obtained by aggregating and weighting the engineering anomaly score and statistical anomaly score corresponding to each data point within each time window. The engineering anomaly score is determined based on the upper limit, lower limit, or one-sided limit of each monitored variable. The statistical anomaly score is obtained based on the standardized deviation of the measured value relative to the local baseline.
5. The method according to claim 1, characterized in that, The method further includes: An empirical distribution is constructed using time window-level anomaly scores under historical normal operating conditions. The corresponding quantile value is selected as the anomaly detection control limit according to the preset target false alarm rate. If the anomaly score of the current time window exceeds the control limit, the current time window is determined to be an abnormal time window.
6. The method according to claim 1, characterized in that, The method further includes: Variables reflecting raw water quality and environmental conditions are defined as influent condition variables, adjustable operating parameters are defined as control parameter variables, process operating characteristics are defined as intermediate state variables, and terminal indicators are defined as product water state variables. The initial directed graph is constructed based on the influent condition variables, the control parameter variables, the intermediate state variables, and the product water state variables.
7. The method according to claim 1, characterized in that, The method further includes: Based on the dual-membrane process flow and human experience, a directed initial graph is constructed between the influent condition variables, control parameter variables, intermediate state variables and product water state variables, and the direction of the directed edges in the graph is predefined. The multivariate time series of each of the monitored variables are standardized. Within a given time lag range, the time series of node pairs belonging to the candidate edges in the directed initial graph are misaligned and aligned. Causality metrics under different time lags are calculated. The optimal lag and initial causal strength of the edge are determined by the time lag corresponding to when the causal metric reaches its maximum value. When the initial causal strength exceeds a preset threshold and the direction of the edge satisfies the prior constraints of the process, the directed edge is retained, resulting in a sparse directed graph structure. Using the sparse directed graph as the topology of a graph neural network, a model combining graph attention and temporal recursive units is adopted to train on historical operating data. The edge weights obtained from the training are used to update and filter the causal strength of the retained directed edges, thereby obtaining the directed causal graph that represents the causal relationship between variables in the dual-film process.
8. The method according to claim 1, characterized in that, The step of constructing a reinforcement learning environment from the directed causal graph and the time-window-level anomaly scores of each node in the directed causal graph includes: Each node in the directed causal graph is taken as a state node in the environment. The directed edges between nodes and their corresponding edge weights are taken as the optional transition paths and the strength of the transition paths in the environment, respectively. The time window-level anomaly scores of each node under the target time window are taken as state features and incorporated into the input to construct a Markov decision process. The state features are composed of the current node, the set of visited nodes, the anomaly score vector of global nodes, and the edge weight vector.
9. The method according to claim 1, characterized in that, The reward function of the reinforcement learning includes at least: an anomaly explanation coverage reward reflecting the proportion of the candidate anomaly link to explain the global anomaly, an average anomaly strength reward reflecting the degree of anomaly of the nodes on the link, a structural consistency reward reflecting the extent of the link's expansion along the high causal weight edge, a path length penalty term for penalizing excessively long links, and a time causality penalty term for penalizing anomaly time order inconsistency with the optimal lag.
10. The method according to any one of claims 8 and 9, characterized in that, The reinforcement learning policy network is obtained through offline training on historical anomalous events or constructed simulated anomalous scenarios. The policy network adopts a graph neural network structure, taking the node features and edge weights of a directed causal graph as input. During training, the parameters of the graph neural network are iteratively updated on the graph structure using a proximal policy optimization algorithm until convergence is achieved under the constraint of the reward function, resulting in a stable policy network for performing root cause path search on the directed causal graph.
11. An anomaly diagnosis system for dual-membrane process water plants, characterized in that, include: The data acquisition module is used to collect multi-source sensor operation data related to influent, treatment units at all levels and product water in the dual-membrane process water plant, and to perform time alignment and preprocessing on the operation data to form a multivariate time series. The data anomaly characterization module is used to perform effective data filtering and anomaly characterization on each monitoring variable constituting the multivariate time series within a preset time window, and obtain the time window-level anomaly score of each monitoring variable. The directed causal structure learning module is used to construct an initial directed graph according to the process flow under the prior constraints of the process flow, classify the monitored variables, supplement and filter the directed edges of the initial directed graph using the misaligned mutual information causality measure within a sliding time window, and update the edge weights of the initial directed graph through a joint model to obtain a directed causal graph for characterizing the dual-film process structure, wherein the monitored variables are nodes in the directed causal graph. The reinforcement learning root cause tracking module is used to construct a reinforcement learning environment from the directed causal graph and the time window-level anomaly scores of each node in the directed causal graph. Through reinforcement learning training, a strategy for searching upstream from the abnormal node of the water production state on the directed causal graph is obtained. When an anomaly of the water production state variable is detected, the strategy is invoked to search for the abnormal link from the downstream abnormal node to the upstream root cause node on the directed causal graph, and a diagnostic result containing the abnormal link and node anomaly information is output. The results display module is used to visually display the dual-membrane process flow, abnormal status of each node, and abnormal links, and supports operation and maintenance personnel to view and annotate the diagnostic results.
12. The system according to claim 11, characterized in that, The reinforcement learning root cause tracing module includes an environment modeling submodule, a reward construction submodule, a policy training submodule, and an online inference submodule. Specifically: the environment modeling submodule encapsulates the directed causal graph, the time window-level anomaly scores of each node, and the edge weights into a graph-structured reinforcement learning environment; the reward construction submodule constructs a comprehensive reward function based on anomaly explanation coverage, average path anomaly strength, causal structure consistency, path length penalty, and time causal consistency penalty; the policy training submodule trains a graph neural network-based policy network offline using a proximal policy optimization algorithm on historical anomaly data and / or simulated anomaly scenarios to obtain a stable policy for root cause path search; and the online inference submodule, upon detecting anomalies in the water production state variables, invokes the trained policy network to perform root cause path search on the directed causal graph and outputs diagnostic results containing anomaly links and root cause nodes.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the processor performs the steps of the anomaly diagnosis method for a dual-membrane process water plant as described in any one of claims 1 to 10.