Fault diagnosis method for sewage treatment failure

By using adaptive multi-scale attention preprocessing and correlation-enhanced improved fault tree model, the problem of insufficient fault diagnosis accuracy in traditional sewage treatment systems is solved, and efficient fault diagnosis and accurate location of sewage treatment systems are achieved.

CN122020406APending Publication Date: 2026-05-12GUANXIAN RUIGUAN RENEWABLE RESOURCES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANXIAN RUIGUAN RENEWABLE RESOURCES CO LTD
Filing Date
2026-01-29
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Traditional fault diagnosis methods in wastewater treatment systems rely on single-scale monitoring data and fail to effectively incorporate the coupling effects between subtrees, resulting in insufficient accuracy in fault probability calculation and making it difficult to meet the needs of efficient fault diagnosis.

Method used

An adaptive multi-scale attention preprocessing technique is adopted to construct a dual-scale feature extraction unit and attention mechanism to capture real-time fluctuations and daily trend features. Combined with an association-enhanced improved fault tree model, the association weights between subtrees are quantified, and the fault probability is corrected hierarchically.

Benefits of technology

It improves the accuracy of fault diagnosis, can accurately identify the core fault source, avoid misjudgment of cascading failures, and provide intelligent operation and maintenance support for sewage treatment systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122020406A_ABST
    Figure CN122020406A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of fault diagnosis, and particularly relates to a fault diagnosis method for sewage treatment failure. The method comprises the following steps: collecting flow monitoring data of a sewage treatment system, extracting real-time fluctuation and day-level trend characteristics through self-adaptive multi-scale attention preprocessing, and screening an effective data set of a focusing fault; constructing three types of fault sub-trees of association, cross-link coupling and independence, and establishing an association weight matrix between the sub-trees to form an association enhanced type improved fault tree model; correcting bottom event and subtree fault probabilities in a layered manner, and obtaining a total fault probability in combination with global association strength; and a threshold value is set to judge a fault, and accurate positioning is realized according to the sub-tree probability and the association weight. According to the invention, the fault probability calculation precision is improved, and accurate fault positioning is realized. A core fault source can be accurately identified, misjudgment of chain failure is avoided, reliable support is provided for intelligent operation and maintenance of a sewage treatment system, and the problem that a traditional method is insufficient in diagnosis precision is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of fault diagnosis technology, and in particular relates to a fault diagnosis method for wastewater treatment failure. Background Technology

[0002] Wastewater treatment systems encompass multiple processes, including influent, biochemical reaction, sedimentation, filtration, and effluent. Monitoring data for each process exhibits multi-dimensional and time-series characteristics. During system operation, the causes of failures are complex and often concealed; an anomaly in a single process can trigger a cascading failure across multiple processes. Traditional fault diagnosis methods often rely on single-scale monitoring data analysis and fail to incorporate the coupling effects between subtrees when calculating fault probabilities. This results in insufficient accuracy in calculating the overall fault probability, making it difficult to meet the practical needs of efficient fault diagnosis in wastewater treatment systems. Summary of the Invention

[0003] In view of the technical problems existing in the background art, the present invention proposes a fault diagnosis method for wastewater treatment failure.

[0004] To achieve the above objectives, the technical solution adopted by the present invention includes the following steps:

[0005] S1. Collect process monitoring data from the wastewater treatment system to form a raw dataset;

[0006] S2. Perform adaptive multi-scale attention preprocessing, construct a dual-scale feature extraction unit and attention mechanism preprocessing, process the original dataset to obtain an effective dataset focusing on key fault features; the dual-scale feature extraction unit captures real-time fluctuation features and daily trend features respectively, and the attention mechanism highlights features with high fault relevance through dynamic weight allocation;

[0007] S3. Based on the effective dataset, construct associated fault subtrees, cross-link coupled fault subtrees, and independent fault subtrees, establish the association weight matrix between subtrees, quantify the mutual influence of fault events in different subtrees, and combine them to obtain the association-enhanced improved fault tree model.

[0008] S4. Based on the association-enhanced improved fault tree model, first deconstruct its top event, subtrees and bottom events, distinguish the internal associations of the bottom events within the subtrees and the external associations between subtrees; correct the basic probability of the bottom event, calculate the subtree fault probability according to the subtree structure, then incorporate the associations between subtrees to correct the subtree probability, and finally combine the top event logic and the global association strength to obtain the total fault probability.

[0009] S5. Set a fault determination threshold for wastewater treatment. If the total fault probability is less than the threshold, no fault is determined. If the total fault probability is greater than or equal to the threshold, a fault is determined. When a fault exists, fault location and diagnosis are performed.

[0010] Preferably, step S2 involves adaptive multi-scale attention preprocessing, constructing a preprocessing model with a dual-scale feature extraction unit and attention mechanism, and processing the original dataset to obtain an effective dataset focusing on key fault features. The specific implementation of this method is as follows:

[0011] A dual-scale feature extraction unit is constructed to extract real-time fluctuation features and daily trend features respectively, and a sliding window is set for real-time fluctuation feature extraction. The sliding window time-domain difference method is used to extract real-time fluctuation features. The calculation formula is as follows: ,in, The mean of the features within the sliding window. Let t be the real-time fluctuation value of the j-th monitoring indicator at the i-th sampling point, k be the sample index within the sliding window, and t be the indicator of the real-time fluctuation. All real-time fluctuation values ​​constitute the real-time fluctuation feature set. ;

[0012] Set the daily trend feature aggregation period The daily trend features are extracted using the daily time-aggregated weighted average method. The calculation formula is as follows: ,in For time decay weight, Let j be the daily trend value of the j-th monitoring indicator at the i-th time sampling point. All daily trend values ​​constitute the daily trend feature set. ;

[0013] The normalized mutual information method is used to calculate the mutual information values ​​between the daily trend feature set and the real-time fluctuation feature set and the fault label Y, respectively: ,in, The mutual information value between the j-th daily trend feature or real-time fluctuation feature and the fault label. ;

[0014] Attention weight coefficients are generated based on fault correlation, and the calculation formula is as follows: Set attention weight filtering thresholds to filter out indicators that meet the weight conditions in the daily trend and real-time fluctuation feature sets; take the intersection of the two indicators to obtain the effective dataset.

[0015] As a preferred approach, feature cluster classification of the features in the effective dataset is required before constructing the association-enhanced improved fault tree model. Specifically, this is implemented as follows:

[0016] First, for each feature in the valid dataset, a threshold range is determined based on historical normal operation data. When the feature value does not belong to the threshold range, the feature is determined to be in an abnormal state.

[0017] Granger causality analysis is used to identify the chain reaction that causes anomalies in subsequent processes. ,in For Granger causality, For any two sequential processes, normalized mutual information values ​​are used to calculate the interrelationship of characteristics at different stages. Furthermore, by employing the variance contribution rate, the independence of a single feature from the fault label is calculated. ;

[0018] Clustering was performed using three types of linkage degree, mutual influence degree, and independence degree as cluster centers to obtain three different feature clusters.

[0019] Preferably, step S3 constructs associated fault subtrees, cross-link coupled fault subtrees, and independent fault subtrees based on the effective dataset, establishes an association weight matrix between subtrees, quantifies the mutual influence of fault events in different subtrees, and combines these to obtain the specific implementation of the association-enhanced improved fault tree model as follows:

[0020] For the three different types of clusters with different features, we denote them as three types of event sets and construct three types of fault subtrees with different structures;

[0021] An independent fault subtree is constructed with a single link failure as the top event and single-feature abnormal events in the independent event set as the bottom events; an associated fault subtree is constructed with subsequent link chain failures as the top event, preceding feature abnormal events in the associated event set as the initial bottom events, and intermediate events as fault propagation nodes; and a cross-link coupled fault subtree is constructed with multi-link collaborative failures as the top event and multi-link feature abnormal events in the cross-link coupled event set as the bottom events.

[0022] The direct association weights between all faulty subtrees are calculated based on mutual information, and the indirect association weights between subtrees are calculated by measuring the influence of the subtrees transmitted through intermediate subtrees. The direct association weights and indirect association weights are weighted and summed to obtain the total association weights between subtrees, and then the association weight matrix is ​​obtained.

[0023] The top events of the three types of fault subtrees are used as intermediate events of the overall fault tree. The connection strength between each subtree is determined based on the association weight matrix, and the connection is integrated to form an association-enhanced improved fault tree model.

[0024] Preferably, step S4, based on the association-enhanced improved fault tree model, first deconstructs its top event, subtrees, and bottom events, distinguishing the internal associations of bottom events within subtrees and the external associations between subtrees; corrects the basic probability of the bottom event, calculates the subtree fault probability according to the subtree structure, then incorporates the associations between subtrees to correct the subtree probability, and finally combines the top event logic and the global association strength to obtain the total fault probability. The specific implementation of this step is as follows:

[0025] Perform a probability correction calculation for the association of the bottom event. Calculate the average association strength between the bottom event and other bottom events within the same subtree. Then, correct the probability by combining this with the historical statistical base probability of the bottom event to obtain the actual failure probability of the bottom event. ,in, Let be the base failure probability of the i-th bottom event in the q-th subtree. This represents the average correlation between this base event and other base events within the same subtree;

[0026] The initial failure probability of the subtree is calculated based on the calculation method of the corresponding structural characteristics according to the type of the q-th specific subtree. For independent subtrees, a logical OR gate operation is used: For related subtrees, the propagation probability is superimposed: For cross-stage coupled subtrees, logical AND gate operations are used: ,in, For the q-th subtree, Let mq be the propagation intensity within the subtree, and mq be the number of bottom events in the q-th subtree.

[0027] Based on the correlation weight matrix, the mutual influence between subtrees is quantified, and the initial subtree probabilities are corrected to obtain: ,in, This represents the total number of specific subtrees in the three types of association-enhanced improved fault trees. The elements of the established association weight matrix represent the fault impact weights between subtrees. Summing is performed for all specific subtrees that are not the q-th subtree to quantify the overall failure impact of other subtrees on the q-th subtree;

[0028] Combining the logical relationship between the top event and the three types of subtrees, a global correlation strength is introduced, and a weighted fusion is performed to obtain the total probability: Where Q is the total number of subtrees. The global association strength is calculated from the mean of all elements in the association weight matrix.

[0029] Preferably, in step S5, if the total failure probability is greater than or equal to the judgment threshold, a failure is determined to exist. When a failure exists, the failure location diagnosis process is as follows: identify the subtree type with the highest failure probability from the association-enhanced improved fault tree model, confirm the link where the failure occurred, and locate the subtree with the greatest impact on the global failure based on the association weight matrix between subtrees, thereby achieving fault location.

[0030] Compared with existing technologies, the advantages and positive effects of this invention lie in its adoption of adaptive multi-scale attention preprocessing, which can simultaneously capture real-time fluctuations and daily trend characteristics of wastewater treatment systems. By focusing on key fault features through an attention mechanism, it effectively reduces noise interference. This invention constructs an association-enhanced improved fault tree model, breaking through the traditional assumption of independent events at the base of the fault tree. It establishes three types of differentiated fault subtrees and quantifies the association weights between subtrees, hierarchically correcting fault probabilities and significantly improving computational accuracy. Simultaneously, by combining subtree fault probabilities with the association weight matrix, it achieves precise fault location, accurately identifying core fault sources and avoiding misjudgments of cascading failures. This provides reliable support for intelligent operation and maintenance of wastewater treatment systems and solves the pain point of insufficient diagnostic accuracy in traditional methods. Attached Figure Description

[0031] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0032] Figure 1 This is a flowchart illustrating a fault diagnosis method for wastewater treatment failure. Detailed Implementation

[0033] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described below in conjunction with the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0034] Numerous specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways than those described herein, and therefore the invention is not limited to the specific embodiments disclosed in the following specification.

[0035] In practice, wastewater treatment systems typically consist of multiple process stages, including influent regulation, biochemical reaction, secondary sedimentation, advanced treatment, and effluent treatment. These stages are highly coupled through hydraulics, mass transfer, and control logic. To ensure stable effluent quality, wastewater treatment systems usually deploy numerous online monitoring instruments at key stages to collect real-time data on multi-dimensional operating parameters such as flow rate, dissolved oxygen, COD, ammonia nitrogen, sludge concentration, reflux ratio, and liquid level.

[0036] However, during long-term operation, wastewater treatment systems are prone to operational failures due to factors such as fluctuations in influent water quality, equipment aging, control parameter mismatch, or abnormalities in local structures. These failures are usually not directly caused by a single abnormal monitoring indicator, but rather exhibit complex characteristics of multi-scale feature superposition, multi-stage transmission amplification, and multi-factor synergistic failure. In existing technologies, most fault diagnosis methods are based solely on single-timescale data or simple threshold judgments, making it difficult to identify the coupling relationship between short-term fluctuations and long-term trends. Furthermore, traditional fault tree analysis methods typically assume that basic events are independent, failing to characterize the correlation and propagation effects between failures in different process stages. This leads to significant deviations between the fault probability assessment results and the actual operating conditions, making it difficult to provide accurate and reliable diagnostic basis for maintenance personnel. Based on these problems, this embodiment proposes a fault diagnosis method for wastewater treatment failures. Through the collaborative construction of multi-scale attention feature extraction and a correlation-enhanced improved fault tree model, it achieves accurate quantitative assessment and fault location of wastewater treatment system failure risks. Specific implementation steps are as follows: Figure 1 As shown, by collecting monitoring data from the entire process of the wastewater treatment system and performing adaptive multi-scale attention preprocessing on the data, key features highly correlated with failure are highlighted. On this basis, multi-type fault subtrees that distinguish different failure mechanisms are constructed, and correlation weights between subtrees are introduced to form a correlation-enhanced improved fault tree model. Finally, through hierarchical probability correction and global correlation fusion, a total failure probability that is more in line with the actual operating state is obtained, realizing intelligent diagnosis and location of wastewater treatment failures.

[0037] First, process monitoring data of the wastewater treatment system is collected to form a raw dataset. Specifically, the process monitoring data includes, but is not limited to, monitoring data such as flow rate, water level, dissolved oxygen, COD, ammonia nitrogen, pH value, sludge concentration, and equipment operating status, collected in real time at key locations such as the influent, biochemical reaction tank, secondary sedimentation tank, advanced treatment unit, and effluent outlet. The data is then aligned according to a unified timestamp to form a complete raw dataset.

[0038] To simultaneously characterize short-term abnormal fluctuations and long-term operational trends, and automatically focus on fault-sensitive features, an adaptive multi-scale attention preprocessing scheme is adopted to perform deep feature reconstruction on the original dataset. In the next step, adaptive multi-scale attention preprocessing is performed, constructing a dual-scale feature extraction unit and an attention mechanism to preprocess the original dataset, obtaining an effective dataset focusing on key fault features. The dual-scale feature extraction unit captures real-time fluctuation features and daily trend features respectively, and the attention mechanism highlights features with high fault relevance through dynamic weight allocation. This is implemented by constructing a dual-scale feature extraction unit to extract real-time fluctuation features and daily trend features respectively, and setting a sliding window for real-time fluctuation feature extraction. The sliding window time-domain difference method is used to extract real-time fluctuation features. The calculation formula is as follows: ,in, The mean of the features within the sliding window. Let t be the real-time fluctuation value of the j-th monitoring indicator at the i-th sampling point, k be the sample index within the sliding window, and t be the indicator of the real-time fluctuation. All real-time fluctuation values ​​constitute the real-time fluctuation feature set. Set the daily trend feature aggregation period. The daily trend features are extracted using the daily time-aggregated weighted average method. The calculation formula is as follows: ,in For time decay weight, Let j be the daily trend value of the j-th monitoring indicator at the i-th time sampling point. All daily trend values ​​constitute the daily trend feature set. The normalized mutual information method is used to calculate the mutual information values ​​between the daily trend feature set and the real-time fluctuation feature set and the fault label Y, respectively. ,in, The mutual information value between the j-th daily trend feature or real-time fluctuation feature and the fault label. Attention weight coefficients are generated based on fault correlation, and the calculation formula is as follows: Attention weight screening thresholds are set to filter indicators that meet the weight conditions in the daily trend and real-time fluctuation feature sets respectively; the intersection of the two indicators is taken to obtain the effective dataset. In this embodiment, a dual-scale feature extraction unit is first constructed to model the variation law of the same monitoring indicator at different time scales in parallel. Specifically, for real-time fluctuation features, a fixed-length sliding window is set, and the continuous sampling data within the window is subjected to time-domain difference processing. By characterizing the deviation of the current sampling point from the window mean, it reflects short-term abnormal features such as transient disturbances of equipment, sudden changes in operating conditions, or control anomalies; all the difference results obtained by the sliding window processing constitute the real-time fluctuation feature set, which is used to characterize the high-frequency dynamic behavior of the sewage treatment system. At the same time, for daily trend features, a feature aggregation period with natural days or operating cycles as units is set. By introducing a weighted average method with time decay weight, the variation trend of the same monitoring indicator on a longer time scale is extracted to reflect low-frequency evolution features such as slow degradation of system performance, changes in biochemical reaction efficiency, or long-term load shift; all features obtained by daily aggregation constitute the daily trend feature set. After completing dual-scale feature extraction, to avoid information redundancy caused by inconsistent contributions of features at different scales to the fault, a normalized mutual information method is introduced. This method calculates the correlation between each feature and the fault label in both the real-time fluctuation feature set and the daily trend feature set, quantifying the ability of each feature to discriminate wastewater treatment failures from an information theory perspective. Based on this, corresponding attention weight coefficients are generated according to the correlation strength between features and faults, giving higher weights to features highly correlated with failures. Furthermore, by setting attention weight screening thresholds, feature indicators meeting the weight requirements are selected from both the real-time fluctuation feature set and the daily trend feature set, and the intersection of the two types of features is taken as the final effective dataset. Through this approach, adaptive focusing on multi-scale fault-sensitive features is achieved, effectively reducing noise interference and improving the stability and accuracy of subsequent fault diagnosis models.

[0039] To overcome the traditional fault tree independence assumption and accurately describe the coupling and propagation relationships of faults in multiple stages, this invention requires feature cluster classification of features in the effective dataset before constructing the correlation-enhanced improved fault tree model. This is achieved as follows: First, for each feature in the effective dataset, a threshold range is determined based on historical normal operation data. When a feature value does not belong to the threshold range, the feature is determined to be in an abnormal state. Then, Granger causality values ​​are used to identify the chain correlation between preceding process stages and subsequent stage feature anomalies. ,in For Granger causality, For any two sequential processes, normalized mutual information values ​​are used to calculate the interrelationship of characteristics at different stages. Furthermore, by employing the variance contribution rate, the independence of a single feature from the fault label is calculated.Clustering was performed using three types of linkage, mutual influence, and independence as cluster centers to obtain three different feature clusters. Specifically, for each monitoring feature in the effective dataset, historical normal operation data of the corresponding process in the long-term stable operation phase were retrieved, and the value distribution range under fault-free conditions was statistically analyzed. The normal threshold range of the feature was determined using statistical methods such as mean, standard deviation, or quantiles. When the feature value at the current moment or within the analysis period exceeds the threshold range, the feature is determined to be in an abnormal state; otherwise, it is considered to be in a normal state. This step transforms continuous monitoring data into feature state information with clear anomaly indications, laying the foundation for subsequent correlation analysis. Based on the identification of abnormal features, Granger causality analysis was introduced to characterize the fault propagation relationship between different process flows. Granger causality values ​​are used to determine whether one time series has statistical predictive power for another time series. If the historical information of the preceding process features can significantly improve the prediction accuracy of the following process features, then the preceding process is considered to have a Granger causal relationship with the following process. By calculating the Granger causality value between any pair of preceding and succeeding process features, the chain propagation strength of anomalies in the process flow is quantified, thereby identifying the chain correlation degree where anomalies in subsequent processes are caused by preceding processes. Simultaneously, to comprehensively characterize the mutual influence relationships between different process features, a normalized mutual information method is used to calculate the mutual influence correlation degree between any two features. This method does not rely on linear assumptions and can effectively reflect nonlinear coupling relationships. Furthermore, to distinguish the independent contribution of a single feature to system failure, a variance contribution rate index is introduced. By analyzing the proportion of the feature's change in its explanatory power for fault labels, its independence level is quantified. After obtaining the chain correlation degree, mutual influence correlation degree, and independence index for each feature, each monitored feature is treated as an independent sample, and its corresponding chain correlation degree, mutual influence correlation degree, and independence degree are constructed into a three-dimensional feature vector to describe the comprehensive attributes of the feature in terms of fault propagation, interactive coupling, and independent contribution. To eliminate the influence of differences in the value ranges of different indicators on the clustering results, the three-dimensional feature vector is normalized to ensure that all indicators are in a unified dimensional space. Subsequently, a distance-based clustering algorithm is introduced, using the distribution characteristics of the three types of indicators in the feature space as the basis for clustering. Three cluster centers are initialized, corresponding to features dominated by linkage, mutual influence, and independent contribution, respectively. The distance relationship between each feature and the cluster centers is iteratively calculated, and features are classified according to the minimum distance principle. During the iteration process, the positions of the cluster centers are dynamically updated to gradually stabilize the clustering results. When the clustering process meets the convergence condition, three types of feature clusters are formed: features with significantly dominant linkage are assigned to the linkage feature cluster; features with dominant mutual influence are assigned to the cross-link coupling feature cluster; and features with high independence are assigned to the independent feature cluster.This technology enables the structured differentiation of characteristic failure mechanisms, providing a clear basis for subsequent modeling of differentiated fault subtrees.

[0040] Then, based on the effective dataset, associated fault subtrees, cross-link coupled fault subtrees, and independent fault subtrees are constructed. A correlation weight matrix between subtrees is established to quantify the mutual influence of fault events in different subtrees, resulting in an enhanced correlation fault tree model. Fault tree analysis is a logical modeling method that aims to analyze system failure. It typically uses the system's top event as the starting point, decomposing it layer by layer through logical gate structures to reveal intermediate and bottom events that lead to system failure, thus forming a tree-like structure model from cause to effect. Fault trees describe the impact of various combinations of bottom events on system failure through logical relationships such as AND and OR gates. They have advantages such as intuitive structure, clear logic, and ease of qualitative and quantitative analysis, and have been widely used in reliability analysis and fault diagnosis of complex engineering systems. In quantitative analysis, traditional fault trees typically assume the independence of bottom events, calculating the failure probability of the system's top event based on the occurrence probability of bottom events, thereby assessing the system's operational risk. However, in complex systems involving multiple processes and stages, such as wastewater treatment, significant temporal dependencies and causal transmission relationships exist between different process units. Anomalies in a single stage often trigger cascading failures in subsequent stages through hydraulic conditions, material transfer, or control strategies. Traditional fault tree models struggle to accurately characterize these interconnected effects, easily leading to biased failure probability assessments. Therefore, this invention proposes an enhanced fault tree model based on correlation. Building upon the structured and interpretable advantages of traditional fault trees, this model introduces a subtree correlation weighting mechanism. By quantifying the direct and indirect influence relationships between different fault subtrees, it overcomes the assumption of independence between underlying events and subtrees. Furthermore, this invention categorizes fault subtrees into three types: correlated, cross-stage coupled, and independent, employing differentiated probability calculation methods for each, better reflecting the actual failure mechanisms of wastewater treatment systems. By introducing a correlation correction and global correlation strength fusion mechanism, the enhanced fault tree model comprehensively reflects the risk of multi-stage collaborative failures at the system level, making fault diagnosis results more accurate and stable, and providing more engineering-applicable technical support for intelligent operation and maintenance and risk early warning of wastewater treatment systems.

[0041] The implementation involves constructing three types of fault subtrees with differentiated structures for three different feature clusters, denoted as three event sets. Independent fault subtrees are constructed with single-stage failure as the top event and single-feature abnormal events in the independent event set as the bottom events. Associated fault subtrees are constructed with subsequent chain failures as the top event, preceding feature abnormal events in the associated event set as the initial bottom events, and intermediate events as fault propagation nodes. Cross-stage coupled fault subtrees are constructed with multi-stage collaborative failures as the top event and multi-stage feature abnormal events in the cross-stage coupled event set as the bottom events. Direct association weights between all fault subtrees are calculated based on mutual information, and indirect association weights are calculated by measuring the influence transmitted through intermediate subtrees. The direct and indirect association weights are weighted and summed to obtain the total association weight between subtrees, thus obtaining the association weight matrix. The top events of the three types of fault subtrees are used as intermediate events in the overall fault tree. The connection strength between each subtree is determined based on the association weight matrix, and these are integrated to form an enhanced association fault tree model. Specifically, after completing the clustering analysis of the monitored features in the effective dataset, the resulting three feature clusters are regarded as three event sets to characterize failure modes under different mechanisms in the wastewater treatment system. Since different feature clusters differ significantly in fault triggering methods, propagation paths, and collaborative relationships, this invention constructs structurally differentiated fault subtrees for each of the three event sets to avoid weakening or confusing the failure mechanisms due to a uniform structure. For independent event sets, their features typically correspond to a single process step or a single equipment status anomaly, and are less affected by other steps. Therefore, a single-step failure is used as the top event of this type of fault subtree, and each feature anomaly event in the independent event set is directly used as the bottom event, connected by a logical OR gate to construct an independent fault subtree. This structure can intuitively reflect the direct impact of a single-point anomaly on local failures. For correlated event sets, their features exhibit obvious causal transmission characteristics between preceding and following processes. To accurately describe the fault propagation process, a cascading failure of subsequent stages is used as the top event. Characteristic anomaly events located in preceding processes within the associated event set are set as initial bottom events. Intermediate events are introduced between the bottom and top events as fault propagation nodes to represent the transmission process of anomalies between processes, thus constructing an associated fault subtree. For cross-stage coupled event sets, the characteristics often require multiple process stages to simultaneously fail to trigger a systemic failure. Therefore, multi-stage collaborative failure is used as the top event, and multiple characteristic anomaly events in the cross-stage coupled event set are collectively used as bottom events, connected by logical AND gates to construct a cross-stage coupled fault subtree. This differentiated modeling approach allows different failure mechanisms to be clearly expressed at the structural level. After constructing the three types of fault subtrees, to overcome the assumption of independence between subtrees in traditional fault trees, an inter-subtree association weight modeling mechanism is introduced to quantify the degree of mutual influence between different fault subtrees. This process is based on information theory methods, taking into account both direct association and indirect transmission effects.First, calculate the direct association weight between any two faulty subtrees based on mutual information. , ,in, For two subtrees The probability of failure, The maximum value across all subtrees is used here as a normalization factor. Specifically, the top event of each faulty subtree is taken as a representative variable. By calculating the mutual information value between the states of the top events of different subtrees, the statistical correlation between the two types of failure modes is quantified. The larger the mutual information value, the more likely the two types of faulty subtrees are to co-occur or influence each other during operation, and the higher their direct correlation. Secondly, to characterize the indirect correlation effect of fault impact transmitted through third-party subtrees, an indirect correlation weight calculation mechanism is further introduced. Specifically, for any two target subtrees, the correlation paths formed through other intermediate subtrees are analyzed. Based on the weighted sum of the direct correlation weights in the paths, the indirect correlation weights between subtrees are obtained, thus reflecting the multi-path propagation impact under complex process conditions. Where z represents an intermediate subtree and Z is the total number of intermediate subtrees. Then, the direct and indirect association weights are weighted and summed according to a preset ratio to obtain the total association weight between subtrees. By calculating the total association weight for each pair of faulty subtrees, a complete subtree association weight matrix is ​​finally constructed. This matrix provides a crucial quantitative basis for subsequent association-enhanced fault probability calculations. After obtaining the three types of faulty subtrees and their corresponding association weight matrices, the top events of the three types of faulty subtrees are unified as intermediate events of the overall fault tree. At the system level, each subtree is structurally integrated to construct an association-enhanced improved fault tree model. During model integration, the original logical structure and calculation rules within each type of faulty subtree are first preserved to ensure that different failure mechanisms are accurately characterized at the subtree level. Then, based on the numerical values ​​of each element in the subtree association weight matrix, the connection strength between different subtrees is determined. Subtrees with larger association weights establish stronger associations in the overall fault tree, reflecting the significant impact of one type of failure mode on another; subtrees with smaller association weights maintain weak associations or approximately independent relationships. By employing the above method, multiple previously isolated fault subtrees are organically integrated into a holistic fault tree model with enhanced correlation characteristics. This model not only describes the impact of a single fault path on system failure but also comprehensively reflects the coupling effect between multiple failure modes at the system level. This makes the calculation of the failure probability of the top event more closely resemble the actual operating state of the wastewater treatment system, thereby significantly improving the accuracy and engineering applicability of fault diagnosis.

[0042] To improve the accuracy of fault probability calculation and avoid the distortion of overall assessment results by local anomalies, a probability calculation scheme combining hierarchical correction and global fusion is adopted. Based on the correlation-enhanced improved fault tree model, its top event, subtrees, and bottom events are first deconstructed, distinguishing the internal correlations of bottom events within subtrees and the external correlations between subtrees. The basic probability of the bottom event is corrected, the subtree fault probability is calculated according to the subtree structure, and then the subtree probability is corrected by incorporating the correlations between subtrees. Finally, the total fault probability is obtained by combining the top event logic and the global correlation strength. This is implemented by first deconstructing the correlation-enhanced improved fault tree model, distinguishing the hierarchical relationships of the top event, subtrees, and bottom events, and introducing a bottom event correlation correction mechanism within the subtrees. Specifically, each bottom event is taken as the analysis object, and the correlation strength between it and other bottom events within the same subtree is calculated. This correlation strength is then averaged to characterize the collaborative failure environment of the bottom event in the current subtree. Subsequently, this average correlation degree is fused and corrected with the basic fault probability of the bottom event obtained based on historical statistics to obtain the actual fault probability of the bottom event. This correction process ensures that the probability of a bottom event is no longer a static constant, but rather dynamically reflects the degree of interaction between features within a subtree. Specifically, it involves calculating the corrected probability of bottom event association by calculating the average association strength between a bottom event and other bottom events within the same subtree, and then correcting this value using the historical statistical base probability of the bottom event to obtain the actual failure probability of the bottom event. ,in, Let be the base failure probability of the i-th bottom event in the q-th subtree. This represents the average correlation between the base event and other base events within the same subtree. For the first time, the correlation within a subtree is explicitly introduced as a probability correction factor at the base event level, breaking through the implicit assumption of base event independence in traditional fault trees and enabling the base event probability to adaptively adjust with changes in the system's operating state.

[0043] Then, for the first time, the internal correlation degree of subtrees is explicitly introduced as a probability correction factor at the bottom event level, breaking through the implicit assumption of the independence of bottom events in traditional fault trees. This allows the probability of bottom events to adaptively adjust with changes in the system's operating state. For independent fault subtrees, their bottom events usually correspond to anomalies in a single process link or equipment state, and the occurrence of any bottom event may trigger subtree failure. Therefore, when calculating the initial failure probability of independent subtrees, a logical OR gate operation is used to combine the actual failure probabilities of all bottom events to reflect the characteristics of single-point triggered failures. For correlated fault subtrees, the core feature is that the failure propagates step by step along the process flow. To this end, this invention introduces a propagation probability superposition mechanism, introducing a subtree internal propagation strength parameter on the basis of the bottom event probability to characterize the ability of anomalies to be transmitted from preceding links to subsequent links, so that the subtree failure probability can reflect the process directionality and propagation amplification effect. For cross-link coupled fault subtrees, their failure is usually triggered by the simultaneous anomalies of multiple links. Therefore, a logical AND gate operation is used to significantly increase the subtree failure probability only when multiple bottom events occur together. Specifically, based on the type of the q-th specific subtree, the calculation method for the corresponding structural characteristics is adapted to calculate the initial failure probability of the subtree. For independent subtrees, a logical OR gate operation is used: For related subtrees, the propagation probability is superimposed: For cross-stage coupled subtrees, logical AND gate operations are used: ,in, For the q-th subtree, Let mq be the propagation intensity within the subtree, and mq be the number of bottom events in the q-th subtree.

[0044] Furthermore, utilizing the aforementioned subtree association weight matrix, the impact of other subtrees on the failure risk of any target subtree is comprehensively considered. Specifically, by weighted summation of corresponding elements in the association weight matrix, the overall influence of all other subtrees on the target subtree is quantified, and the initial failure probability of that subtree is corrected accordingly. This correction mechanism ensures that the probability of a certain failure mode depends not only on its own underlying event state but also on the interconnected effects of changes in other failure modes, thereby creating a risk coupling amplification or risk transmission suppression effect at the system level. Specifically, based on the association weight matrix, the mutual influence between subtrees is quantified, and the initial subtree probability is corrected to obtain: ,in, This represents the total number of specific subtrees in the three types of association-enhanced improved fault trees. The elements of the established association weight matrix represent the fault impact weights between subtrees. Summing is performed on all specific subtrees other than the q-th subtree to quantify the overall fault impact of other subtrees on the q-th subtree.

[0045] Finally, the failure probabilities of all subtrees are combined according to the logical structure of the top event, and the combined result is weighted and adjusted using a global correlation strength parameter. When the correlation between subtrees is high, the global correlation strength increases, thereby amplifying the system-level failure risk; when the correlation between subtrees is weak, the global correlation strength decreases, making the system risk assessment result more conservative and stable. Specifically, combining the logical correlation between the top event and the three types of subtrees, a global correlation strength is introduced, and a weighted fusion is performed to obtain the total probability: Where Q is the total number of subtrees. The global association strength is calculated from the mean of all elements in the association weight matrix, and its value ranges from [0,1].

[0046] Finally, a fault determination threshold for wastewater treatment is set. If the total fault probability is less than the threshold, no fault is determined; if the total fault probability is greater than or equal to the threshold, a fault is determined. When a fault exists, fault location and diagnosis are performed. The fault location and diagnosis process involves identifying the subtree type with the highest fault probability from the association-enhanced improved fault tree model, confirming the stage where the fault occurred, and locating the subtree with the greatest impact on the overall fault based on the association weight matrix between subtrees. Specifically, the fault probability after association correction for each type of fault subtree is used as the initial criterion to sort and analyze all subtrees. By comparing the fault probabilities of different subtrees, the subtree type with the highest fault probability at the current moment or within the analysis period is identified as the candidate fault subtree most likely to cause system failure. Since each type of subtree corresponds to a specific process stage or failure mechanism during the construction phase, the specific stage or equipment range where the fault occurred can be preliminarily confirmed directly based on the monitoring characteristics and process location covered by the subtree. After initial location analysis, to avoid relying solely on the probability of a single subtree and neglecting its true impact on the overall system, this invention further introduces a subtree correlation weight matrix for refined diagnosis. Specifically, by analyzing the weight distribution of the target subtree in the corresponding rows or columns of the correlation weight matrix, the comprehensive influence of the target subtree on the failure probabilities of other subtrees is calculated, thereby quantifying the failure amplification effect of the subtree at the system level. If a subtree has a slightly lower failure probability but a high correlation influence weight on multiple other subtrees, it indicates that the subtree plays a key driving role in system failure and should be prioritized as a failure source. Furthermore, by comprehensively considering the subtree's own failure probability and its influence strength in the correlation weight matrix, each subtree is comprehensively scored, and the subtree with the highest comprehensive score is selected as the core failure subtree with the greatest impact on the overall failure. The corresponding process link, equipment unit, or operating parameter of this subtree is then determined as the final failure location result. Through the above multi-level, two-dimensional location mechanism, this invention achieves a closed-loop diagnostic process from failure probability identification to precise failure source location. This method not only maintains accurate location in the case of multiple concurrent faults or complex fault propagation, but also effectively avoids misjudging the affected links in a chain as the root cause of the fault, significantly improving the engineering practical value and decision-making guidance capability of fault diagnosis in wastewater treatment systems.

[0047] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments for application in other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A fault diagnosis method for wastewater treatment failure, characterized in that, Includes the following steps: S1. Collect process monitoring data from the wastewater treatment system to form a raw dataset; S2. Perform adaptive multi-scale attention preprocessing, construct a dual-scale feature extraction unit and attention mechanism preprocessing, process the original dataset to obtain an effective dataset focusing on key fault features; the dual-scale feature extraction unit captures real-time fluctuation features and daily trend features respectively, and the attention mechanism highlights features with high fault relevance through dynamic weight allocation; S3. Based on the effective dataset, construct associated fault subtrees, cross-link coupled fault subtrees, and independent fault subtrees, establish the association weight matrix between subtrees, quantify the mutual influence of fault events in different subtrees, and combine them to obtain the association-enhanced improved fault tree model. S4. Based on the association-enhanced improved fault tree model, first deconstruct its top event, subtrees and bottom events, distinguish the internal associations of the bottom events within the subtrees and the external associations between subtrees; correct the basic probability of the bottom event, calculate the subtree fault probability according to the subtree structure, then incorporate the associations between subtrees to correct the subtree probability, and finally combine the top event logic and the global association strength to obtain the total fault probability. S5. Set a fault determination threshold for wastewater treatment. If the total fault probability is less than the threshold, no fault is determined. If the total fault probability is greater than or equal to the threshold, a fault is determined. When a fault exists, fault location and diagnosis are performed.

2. The fault diagnosis method for wastewater treatment failure according to claim 1, characterized in that, Step S2 involves adaptive multi-scale attention preprocessing, constructing a preprocessing model with a dual-scale feature extraction unit and attention mechanism, and processing the original dataset to obtain an effective dataset focusing on key fault features. The specific implementation of this process is as follows: Construct a dual-scale feature extraction unit to extract real-time fluctuation features and daily trend features respectively, and set a sliding window for real-time fluctuation feature extraction. The sliding window time-domain difference method is used to extract real-time fluctuation features. The calculation formula is as follows: ,in, The mean of the features within the sliding window. Let be the real-time fluctuation value of the j-th monitoring indicator at the i-th sampling point, k be the sample index within the sliding window, and t be the indicator of the real-time fluctuation. All real-time fluctuation values ​​constitute the real-time fluctuation feature set. ; Set the daily trend feature aggregation period The daily trend features are extracted using the daily time-aggregated weighted average method. The calculation formula is as follows: ,in For time decay weight, Let j be the daily trend value of the j-th monitoring indicator at the i-th time sampling point. All daily trend values ​​constitute the daily trend feature set. ; The normalized mutual information method is used to calculate the mutual information values ​​between the daily trend feature set and the real-time fluctuation feature set and the fault label Y, respectively: ,in, The mutual information value between the j-th daily trend feature or real-time fluctuation feature and the fault label. ; Attention weight coefficients are generated based on fault correlation, and the calculation formula is as follows: Set attention weight filtering thresholds to filter out indicators that meet the weight conditions in the daily trend and real-time fluctuation feature sets; take the intersection of the two indicators to obtain the effective dataset.

3. The fault diagnosis method for wastewater treatment failure according to claim 1, characterized in that, Before constructing the association-enhanced improved fault tree model, feature cluster classification of the features in the effective dataset is required. The specific implementation is as follows: First, for each feature in the valid dataset, a threshold range is determined based on historical normal operation data. When the feature value does not belong to the threshold range, the feature is determined to be in an abnormal state. Granger causality analysis is used to identify the degree of linkage between preceding processes and subsequent processes, leading to anomalous characteristics. ,in For Granger causality, For any two sequential processes, normalized mutual information values ​​are used to calculate the interrelationship of characteristics at different stages. Furthermore, by employing the variance contribution rate, the independence of a single feature from the fault label is calculated. ; Clustering was performed using three types of linkage degree, mutual influence degree, and independence degree as cluster centers to obtain three different feature clusters.

4. The fault diagnosis method for wastewater treatment failure according to claim 1, characterized in that, Step S3 involves constructing associated fault subtrees, cross-link coupled fault subtrees, and independent fault subtrees based on the effective dataset, establishing an association weight matrix between subtrees, quantifying the mutual influence of fault events in different subtrees, and combining these to obtain the specific implementation of the association-enhanced improved fault tree model: For the three different types of clusters with different features, we denote them as three types of event sets and construct three types of fault subtrees with different structures; An independent fault subtree is constructed by taking the failure of a single link as the top event and the single-feature abnormal event in the independent event set as the bottom event; Using subsequent chain failures as the top event, the preceding characteristic abnormal events of the associated event set as the initial bottom events, and intermediate events as fault propagation nodes to construct an associated fault subtree; A cross-stage coupled fault subtree is constructed with multi-stage collaborative failure as the top event and multi-stage characteristic abnormal events in the cross-stage coupled event set as the bottom events. The direct association weights between all faulty subtrees are calculated based on mutual information, and the indirect association weights between subtrees are calculated by measuring the influence of the subtrees transmitted through intermediate subtrees. The direct association weights and indirect association weights are weighted and summed to obtain the total association weights between subtrees, and then the association weight matrix is ​​obtained. The top events of the three types of fault subtrees are used as intermediate events of the overall fault tree. The connection strength between each subtree is determined based on the association weight matrix, and the connection is integrated to form an association-enhanced improved fault tree model.

5. The fault diagnosis method for wastewater treatment failure according to claim 1, characterized in that, Step S4, based on the association-enhanced improved fault tree model, first deconstructs its top event, subtrees, and bottom events, distinguishing the internal associations of bottom events within subtrees and the external associations between subtrees; it corrects the basic probability of the bottom event, calculates the subtree fault probability according to the subtree structure, then incorporates the associations between subtrees to correct the subtree probability, and finally combines the top event logic and the global association strength to obtain the total fault probability. The specific implementation of this step is as follows: Perform a probability correction calculation for the association of the bottom event. Calculate the average association strength between the bottom event and other bottom events within the same subtree. Then, correct the probability by combining this with the historical statistical base probability of the bottom event to obtain the actual failure probability of the bottom event. ,in, Let be the base failure probability of the i-th bottom event in the q-th subtree. This represents the average correlation between this base event and other base events within the same subtree; The initial failure probability of the subtree is calculated based on the calculation method of the corresponding structural characteristics according to the type of the q-th specific subtree. For independent subtrees, a logical OR gate operation is used: For related subtrees, the propagation probability is superimposed: For cross-stage coupled subtrees, logical AND gate operations are used: ,in, For the q-th subtree, Let mq be the propagation intensity within the subtree, and mq be the number of bottom events in the q-th subtree. Based on the correlation weight matrix, the mutual influence between subtrees is quantified, and the initial subtree probabilities are corrected to obtain: ,in, This represents the total number of specific subtrees in the three types of association-enhanced improved fault trees. The elements of the established association weight matrix represent the fault impact weights between subtrees. Summing is performed for all specific subtrees that are not the q-th subtree to quantify the overall failure impact of other subtrees on the q-th subtree; Combining the logical relationship between the top event and the three types of subtrees, a global correlation strength is introduced, and a weighted fusion is performed to obtain the total probability: Where Q is the total number of subtrees. The global association strength is calculated from the mean of all elements in the association weight matrix.

6. The fault diagnosis method for wastewater treatment failure according to claim 1, characterized in that, In step S5, if the total failure probability is greater than or equal to the judgment threshold, a failure is determined to exist. When a failure exists, the failure location diagnosis process is as follows: identify the subtree type with the highest failure probability from the association-enhanced improved fault tree model, confirm the link where the failure occurred, and locate the subtree with the greatest impact on the global failure based on the association weight matrix between subtrees, thereby achieving fault location.