A sewage pipe network external water invasion quantification and tracing method based on time sequence decoupling and interpretable machine learning
Patent Information
- Application Number
- CN202611059627.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-16
- Publication Date
- 2026-10-27
AI Technical Summary
[0010]本发明的目的是解决现有技术中的难以适配居民用水时序波动、难以区分外水组分类型,以及在复杂工况下易出现误报漏报的问题,而提出的一种基于时序解耦与可解释机器学习的污水管网外水入侵量化溯源方法
本发明通过采用时序分解算法重构动态旱天基线,结合水质水量响应校验规则筛选有效数据,贴合居民生活用水的日度、周度与节假日变化规律,能够改善传统静态基线的僵化适配问题,提升外水入侵总量量化的精准度,有效解耦居民生活污水排放规律与多源环境因子驱动的外水叠加效应。
Smart Images

Figure CN122986329A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of sewage pipe network monitoring technology, and in particular to a quantitative source tracing method for external water intrusion into sewage pipe networks based on temporal decoupling and interpretable machine learning. Background Technology
[0002] Urban sewage pipe networks are the core carriers of urban sewage treatment systems. External water intrusion (including rainwater inflow, groundwater infiltration, and river / seawater backflow) is a key issue restricting sewage collection efficiency and affecting the improvement of sewage treatment plant efficiency. With the development of smart water management technology, quantitative source tracing of external water intrusion based on online monitoring data has become a core technical means for the operation and maintenance of urban drainage pipe networks, damage repair, and treatment of combined sewer overflows.
[0003] Currently, three main technical approaches are used for monitoring external water intrusion in sewage pipe networks: first, the traditional static baseline method, which estimates the total amount of external water based on the minimum nighttime flow and a fixed threshold; second, the single water balance method, which calculates the proportion of external water intrusion solely through flow data; and third, conventional machine learning models, which identify external water by fitting the pipe network's operating status to the monitoring data. These technologies can achieve basic external water quantification under normal operating conditions, providing preliminary data support for pipe network operation and maintenance.
[0004] However, the aforementioned existing technologies still have the following problems in practical application scenarios:
[0005] (1) The baseline for dry weather uses a static threshold setting, which cannot adapt to the temporal fluctuations of residential water use. It is easy to misjudge normal flow changes during holidays and morning and evening peak hours as external water intrusion, resulting in a large deviation in the quantitative results.
[0006] (2) Relying solely on a single water quantity indicator for monitoring lacks water quality tracing and physical decoupling methods, making it impossible to distinguish the composition of rainwater inflow, groundwater infiltration, and river backflow, thus hindering precise remediation.
[0007] (3) The machine learning model is a black box mode with no physical interpretability. It cannot verify the external water driving mechanism. It is prone to false alarms and false alarms under complex working conditions such as coastal tides and high groundwater levels. The diagnostic results cannot be accepted by the engineering operation and maintenance.
[0008] Meanwhile, existing technologies generally lack standardized preprocessing for multi-source heterogeneous data, and sensor noise and missing data will further reduce diagnostic accuracy.
[0009] Therefore, there is an urgent need for a method that can integrate time-series decomposition algorithms and interpretable machine learning techniques, which can not only reconstruct accurate drought emission baselines through dynamic mechanisms, but also utilize multi-source data fusion to mine nonlinear patterns and achieve quantitative attribution and transparent source tracing of external water sources. Summary of the Invention
[0010] The purpose of this invention is to solve the problems in the prior art, such as difficulty in adapting to the temporal fluctuations of residential water use, difficulty in distinguishing the types of external water components, and the tendency to false alarms and missed alarms under complex operating conditions. The invention proposes a quantitative source tracing method for external water intrusion in sewage pipe networks based on temporal decoupling and interpretable machine learning.
[0011] To achieve the above objectives, the present invention adopts the following technical solution: a quantitative source tracing method for external water intrusion into sewage pipe networks based on temporal decoupling and interpretable machine learning, comprising the following steps:
[0012] S1: Collect multi-source hydraulic and water quality data of key nodes in the sewage pipe network, as well as meteorological and water level environmental data of the corresponding areas. Perform unified preprocessing on all multi-source time series data to construct a multi-dimensional feature space containing hydraulic factors, water quality factors and environmental factors.
[0013] S2: Based on the multidimensional feature space, a time-series decomposition algorithm is used to dynamically decouple and reconstruct the dry weather water quality data. After removing abnormal samples, a dynamic dry weather discharge baseline is obtained. The total amount of external water intrusion sequence is calculated by the difference between the measured data and the dynamic dry weather discharge baseline.
[0014] S3: Based on the total external water intrusion sequence, the proportion of total external water intrusion is quantified by combining the mass balance principle, and a dual-source tracer physical mixing model is constructed to decouple the total external water into two components in real time: fast-response inflow and slow-response inflow.
[0015] S4: Based on the environmental factors in the multidimensional feature space, construct an integrated learning regression model to fit the pipeline network operation status, and combine it with an interpretable attribution framework to calculate the contribution of each factor, thereby completing the source tracing and verification of the driving mechanism of the two types of external water components.
[0016] The beneficial effects of the technical solution provided by this invention include at least the following: This invention reconstructs a dynamic dry weather baseline by employing a time-series decomposition algorithm and combines it with water quality and quantity response verification rules to screen effective data. It conforms to the daily, weekly, and holiday variation patterns of residential water use, which can improve the rigidity and adaptability of traditional static baselines, enhance the accuracy of quantifying the total amount of external water intrusion, and effectively decouple the patterns of residential sewage discharge from the superposition effects of external water driven by multiple environmental factors.
[0017] This invention constructs a physical hybrid model with dual tracers of conductivity and temperature, and separates external water components by combining mass balance and energy balance relationships. It distinguishes the response characteristics of different types of external water, which can improve the problem that existing technologies can only quantify the total amount of external water and cannot distinguish its source. It improves the detail of external water component decoupling and provides data support for precise pipeline network repair.
[0018] This invention employs an ensemble learning model to fit the operating status of the pipeline network, combines an interpretable attribution framework to calculate the contribution value of environmental factors, and uses physical rules to determine the external water driving mechanism. This can improve the black-box nature of traditional machine learning models, enhance the credibility of external water source tracing results, and improve the fault diagnosis accuracy of drainage pipeline networks in areas with high groundwater levels and tidal backwater.
[0019] This invention performs unified preprocessing on multi-source heterogeneous time-series data, uses filtering to remove noisy data and fill in missing data, and unifies the data time granularity and quality standards. This can reduce diagnostic errors caused by sensor anomalies and data deviations, and improve the intelligence level of pipeline network operation and maintenance decisions.
[0020] This invention constructs a full-process diagnostic system by integrating physical mechanisms and data-driven methods, adapting to complex working conditions such as coastal tides and high groundwater levels. It can improve the stability of external water diagnosis under extreme working conditions and enhance the practical engineering adaptability of the technical solution. Attached Figure Description
[0021] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a flowchart illustrating the overall process of the method provided in this embodiment of the invention. Figure 2 This is a joint analysis diagram of the external intrusion evidence chain based on the temporal coupling relationship between river water level and sewage ammonia nitrogen concentration, provided for embodiments of the present invention. Detailed Implementation
[0023] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a wastewater network external water intrusion quantitative tracing method based on temporal decoupling and interpretable machine learning proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0024] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0025] The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.
[0026] The following description, in conjunction with the accompanying drawings, details a specific scheme for a quantitative source tracing method for external water intrusion in sewage pipe networks based on temporal decoupling and interpretable machine learning, provided by the present invention.
[0027] Please see Figure 1 and Figure 2 As shown, this invention provides a quantitative source tracing method for external water intrusion in sewage pipe networks based on temporal decoupling and interpretable machine learning, according to an embodiment of the present invention. The present invention aims to reconstruct a dynamic dry weather baseline adapted to water usage patterns through temporal decoupling technology, achieve refined separation of external water components by combining a dual tracer physical model, and complete quantitative source tracing of external water driving mechanisms by combining an interpretable machine learning model. This solves the problems of poor baseline adaptability, difficulty in distinguishing external water sources, and lack of physical basis for model results in traditional methods, thereby improving the accuracy and engineering applicability of external water intrusion diagnosis in sewage pipe networks.
[0028] Includes the following steps: S1: Collect multi-source hydraulic and water quality data of key nodes in the sewage pipe network, as well as meteorological and water level environmental data of the corresponding areas. Perform unified preprocessing on all multi-source time series data to construct a multi-dimensional feature space containing hydraulic factors, water quality factors and environmental factors. Preprocessing in S1 includes: resampling all multi-source time-series data to a uniform time granularity using linear interpolation, constructing a sliding interquartile range filter, and calculating the abnormal noise removal threshold. The calculation formula is as follows: ; ; in, This is the upper limit for anomaly detection. This is the lower limit for outlier detection. The lower quartile distance, The upper quartile distance, The interquartile range (ICR) is used; the sliding ICR filter has a set window length of W. Remove those exceeding [ , The system identifies physically unreliable noise points within a given interval and fills in the missing data using predictions from a time-series decomposition model (Prophet).
[0029] It is worth noting that multi-source hydraulic data refers to time-series data of liquid level, flow velocity, and flow rate collected from online monitoring equipment at key nodes of the sewage pipe network, which is used to intuitively characterize the hydraulic transport status and load change characteristics within the pipe network.
[0030] Multi-source water quality data refers to the conductivity time-series data collected from water quality probes at key nodes of the sewage pipe network, which serves as the core water quality fingerprint indicator to distinguish between domestic sewage, rainwater, groundwater, and river water.
[0031] Meteorological environmental data refers to the instantaneous rainfall intensity, 1-hour cumulative rainfall, and 24-hour cumulative rainfall data collected in real time by meteorological stations in the area corresponding to the pipeline network, which are used to identify rainfall-driven external water inflow behavior.
[0032] Water level environmental data refers to real-time monitoring data of river tide levels and groundwater levels in the area corresponding to the pipeline network, which is used to characterize seepage and backflow behavior caused by external hydraulic head.
[0033] Preprocessing refers to a standardized process for performing time alignment, outlier removal, and missing value imputation on multi-source heterogeneous time-series data to eliminate data heterogeneity and noise interference.
[0034] Multidimensional feature space refers to a standardized input set that integrates three types of factors: hydraulics, water quality, and environment, and covers three feature dimensions: time series, numerical values, and physical properties.
[0035] Linear interpolation is a method that uses a linear function constructed based on the effective monitoring values at adjacent times to estimate data at missing times. It can unify data from different sampling frequencies to the same time granularity.
[0036] The sliding quartile filter is a filtering method that uses a fixed time window to slide through time-series data and identifies and removes physical anomalies based on statistical quartiles.
[0037] The abnormal noise removal threshold is a critical value calculated based on the interquartile range, used to determine whether the monitoring data is invalid noise such as sensor glitches or signal drift.
[0038] The interquartile range (IQR) is the difference between the upper and lower quartiles. It is used to measure the dispersion of time series data and can reduce the interference of extreme outliers on the filtering results.
[0039] External water intrusion is formally known as inflow and infiltration, or simply I / I.
[0040] In one specific implementation, the study area focuses on the sewage pipe network system of the main urban area of Ningbo City, a coastal plain river network city in Zhejiang Province. This area is significantly affected by river tidal backwater and high groundwater levels, resulting in complex and typical types of external water intrusion. Baofengqi and Changtang Sluice Gate were selected as external hydrodynamic monitoring nodes, while Yongfeng North Road and Renmin Road were selected as key water quality monitoring nodes for the sewage pipe network. Online monitoring data for 12 consecutive months were collected. Baofengqi and Changtang Sluice Gate were used for real-time monitoring of hydrodynamic environmental factors such as the highest nighttime water level of the river; Yongfeng North Road and Renmin Road were used for real-time monitoring of water quality factors such as ammonia nitrogen concentration in sewage. An external intrusion evidence chain was constructed by combining the river water level data from Baofengqi and Changtang Sluice Gate with the ammonia nitrogen concentration data from Yongfeng North Road and Renmin Road. The accuracy of the method for tracing external driving factors was verified through time-series dynamic response characteristic comparison and correlation analysis.
[0041] When executing step S1, data from different sampling frequencies, such as liquid level, flow rate, conductivity, and tide level, are first uniformly resampled to a 5-minute granularity for routine municipal pipeline network monitoring to ensure time sequence alignment accuracy. During the sliding interquartile range filtering process, the window length is preferentially set to 12, which can cover the data fluctuation characteristics within 1 hour, removing only outliers exceeding the physical range and retaining valid data with normal fluctuations. For missing data, only short-term data with consecutive missing periods of ≤2 hours are filled in, while long-term missing data are directly marked as invalid periods. When constructing the multidimensional feature space, both original numerical values and first-order rate of change features are retained simultaneously to provide complete data support for subsequent baseline reconstruction and model training.
[0042] S2: Based on the multidimensional feature space, the time-series decomposition algorithm is used to dynamically decouple and reconstruct the dry weather water quality data. After removing abnormal samples, the dynamic dry weather discharge baseline is obtained. The total amount of external water intrusion sequence is calculated by the difference between the measured data and the dynamic dry weather discharge baseline.
[0043] The time series decomposition algorithm in S2 is the Prophet additive time series decomposition model, and the corresponding time series decomposition equation is: ; in, This is a water quality data sequence for dry weather. As a non-periodic trend term, a piecewise linear growth model is used to capture the slow drift of the conductivity baseline in the service area caused by population migration or industrial restructuring, and its rate of change only changes at sparse change points. For daily and weekly periodic seasonal terms, Fourier series was used to fit the intraday "double peak" and weekly variation patterns of wastewater conductivity during dry weather; the Fourier series formula is: ; (In the formula, P is the period, P=1 for daily period and P=7 for weekly period, N is the Fourier order, and an and bn are the fitting coefficients). As a holiday effect term, a pre-defined list of holiday windows is used to simulate sudden changes in water usage patterns during special periods such as Spring Festival and National Day using an indicator function; This is the random error term.
[0044] In S2, anomaly samples are removed using a water quality and quantity response verification mechanism: a sample verification strategy based on the "water quality and quantity response mechanism" is introduced to construct a baseline curve for the daily variation of conductivity during dry weather. This curve represents the conductivity increase effect caused by increased sewage discharge and higher pollutant concentration during peak water usage periods in the morning and evening, and the conductivity decrease pattern caused by reduced residential drainage and groundwater infiltration and dilution during low flow periods at night. Non-steady-state data that do not conform to the water quality fingerprint characteristics of high flow corresponding to high conductivity and low flow corresponding to low conductivity (such as continuous low conductivity caused by rainfall or abnormally high conductivity caused by seawater intrusion) are removed. Parameter fitting is only performed on the dry weather dataset verified by water quality fingerprint using the maximum a posteriori estimation (MAP) method.
[0045] It is worth noting that time series decomposition algorithm refers to the analysis algorithm that decomposes continuous time series data into trend terms, periodic terms, holiday terms, and random error terms, which can isolate the inherent fluctuation patterns of domestic sewage.
[0046] Additive time series decomposition model refers to a time series model that reconstructs a data sequence in the form of linear superposition of components. It is suitable for fitting wastewater quality time series data with stable fluctuation amplitude.
[0047] The non-periodic trend term refers to the component that reflects the long-term, slow drift of wastewater conductivity, which is caused by changes in the population and industrial structure of the service area.
[0048] The periodic seasonal component refers to the component that reflects the daily bi-peak and weekly fluctuation of conductivity, corresponding to the peak water consumption in the morning and evening and the weekend work and rest patterns of residents.
[0049] The holiday effect component refers to the component that reflects the sudden changes in water usage patterns during holidays such as Spring Festival and National Day, and is used to correct baseline deviations during special periods.
[0050] The dynamic dry-day discharge baseline refers to a standard curve of wastewater conductivity that changes dynamically over time and adapts to the patterns of residential water use, which is different from the traditional static threshold baseline.
[0051] The total amount of external water intrusion is a sequence of differences between measured conductivity and dynamic baseline, used to quantitatively characterize the temporal variation of external water intrusion.
[0052] The water quality and quantity response verification mechanism refers to the rules for screening pure dry-day data based on the correspondence between flow rate and conductivity, which can eliminate abnormal samples caused by rainfall and tides.
[0053] Maximum a posteriori estimation is a statistical method used for fitting parameters of time series models, which can improve the fitting accuracy of dynamic baselines under small sample dry weather data.
[0054] In one specific implementation, the Wenjiao Pumping Station in a coastal city and the Jiangbei River Pumping Station are used as research objects. A continuous 72-hour drought period is set as the criterion for determining a dry day. Annual dry day conductivity data are input into the Prophet additive time-series decomposition model. Fourier series fitting is used for the periodic seasonal terms, with a daily period set to P=1 and a weekly period set to P=7, and a Fourier order N=10. A piecewise linear model is used for the trend term, with a change point set every 3 months. The holiday term includes statutory holidays such as Spring Festival and National Day, with a window length of 7 days. A daily conductivity variation baseline curve for dry days is constructed from 0 to 24 hours. Non-steady-state data with high flow and low conductivity, and low flow and high conductivity are removed. Maximum a posteriori estimation is used to fit parameters on the dry day dataset verified by water quality fingerprinting. The final dynamic baseline fitting determination coefficient R² ≥ 0.85. The total external water intrusion sequence is obtained by the difference between the measured conductivity and the dynamic baseline.
[0055] When performing step S2, the criterion of no rainfall for 72 consecutive hours is prioritized as the dry day screening criterion to avoid interference from short-term rainfall. During the time series decomposition, the Fourier order of the periodic seasonal term is preferentially set to 10 to accurately fit the intraday bimodal fluctuation characteristics. The change point density of the trend term is set to one every 3 months to balance long-term drift and fitting stability. When constructing the daily variation baseline curve of conductivity, the morning peak period is 06:00-08:00 and the evening peak period is 18:00-20:00, and the low flow period is 00:00-06:00. Abnormal samples are strictly removed according to the rule that high flow corresponds to high conductivity and low flow corresponds to low conductivity. During the parameter fitting process, maximum a posteriori estimation is used to improve the model's generalization ability under sparse dry day data.
[0056] S3: Based on the total external water intrusion sequence and combined with the mass balance principle, the total external water intrusion ratio is quantified, and a dual-source tracer physical mixing model is constructed to decouple the total external water into two components in real time: fast-response inflow and slow-response inflow.
[0057] The proportion of total external water intrusion in S3 was quantified by combining the difference between the conductivity in the measured data and the dynamic dry-day emission baseline with the principle of pollutant mass balance.
[0058] The dual-source tracer physical hybrid model in S3 uses conductivity from measured data as a mass balance tracer and temperature as an energy balance tracer, and combines the mass balance equations and energy balance equations to achieve real-time decoupling of external water components.
[0059] In S3, the fast-response inflow is rainwater inflow (RDII), and the slow-response infiltration is groundwater or river water infiltration (GWI). Based on the positive and negative directions and magnitudes of the marginal contribution values of each environmental factor, the source of external water driving is determined to be tidal backwater, rainwater inflow, or groundwater infiltration according to the SHAP physical property determination logic.
[0060] It is worth noting that the mass balance principle refers to the physical analysis principle that calculates the proportion of external water intrusion based on the difference in conductivity between sewage and external water, based on the conservation relationship of pollutant concentration.
[0061] The total external water intrusion ratio refers to the ratio of external water volume to the total drainage volume of the pumping station, and is used to quantitatively characterize the severity of external water intrusion into the pipeline network.
[0062] The dual-source tracer physical hybrid model refers to a physical model that uses two tracers with different physical characteristics to separate two types of external water components by solving a set of simultaneous equations.
[0063] Conductivity tracers are mass balance tracers that differentiate wastewater from freshwater based on salinity differences. They are highly sensitive and have a fast response speed.
[0064] Temperature tracers are energy balance tracers that differentiate rainwater, groundwater, and river water based on differences in heat, and can identify sources of external water replenishment.
[0065] Rapid response inflow refers to rain-induced inflow (RDII) with a response time of ≤2 hours and a rapid rise and fall rate.
[0066] Slow-response infiltration refers to groundwater or river water infiltration (GWI) with a response time ≥ 24 hours and a gradual change in external water components.
[0067] In one specific implementation, based on the total external water intrusion sequence, the baseline values for the conductivity of domestic sewage are set at 500-800 μS / cm, and the baseline values for the conductivity of external water are set at 100-300 μS / cm. The proportion of total external water intrusion is calculated using a pollutant mass balance equation. A conductivity-temperature dual-source tracer physical hybrid model is constructed, and a set of mass balance and energy balance equations is established. The response time for rainwater inflow (RDII) is set to ≤2 hours, and the response time for groundwater / river water infiltration (GWI) is set to ≥24 hours. The total external water is decoupled in real time into two components: fast-response inflow and slow-response infiltration. This is combined with the environmental factor SHAP value. To determine the driving source, when the tidal level characteristic's SHAP value is >0 and accounts for more than 50% of the total positive contribution, and the electrical conductivity characteristic's SHAP value is >0, it is determined to be tidal backwater. When the sum of the rainfall-related characteristic's SHAP values is significantly positive, and the electrical conductivity characteristic's SHAP value contributes negatively, it is determined to be rainwater inflow. In dry weather without tidal influence, if the groundwater level characteristic's SHAP value is consistently positive and the electrical conductivity SHAP value is negative, it is determined to be groundwater infiltration. When the tidal level contribution accounts for ≥50%, it is determined to be tidal backwater; when rainfall contributes more, it is determined to be rainwater inflow; and when groundwater level contributes more in dry weather, it is determined to be groundwater infiltration.
[0068] To further verify the model's adaptability under complex conditions, a typical typhoon and rainstorm event was selected for testing. The results show that during the rainstorm period, the RDII component separated by the model rapidly peaks and then declines within 2 hours after the rain peak, accurately reflecting the impact characteristics of surface runoff. In the days following the cessation of rainfall, when the water level of external rivers remained high, the contribution of the GWI component remained above 40%, which is highly consistent with the backwater mechanism of external river levels, proving that this method can effectively identify the dynamic changes of external water sources.
[0069] When performing step S3, the real-time conductivity difference is used instead of the fixed concentration threshold during the mass balance calculation to improve the accuracy of proportional quantification; when solving the simultaneous equations, the calculation step size is set to 5 minutes to ensure the real-time decoupling of components; when distinguishing external water components, 2 hours and 24 hours are used as the response time thresholds to match the physical characteristics of rainwater inflow and groundwater infiltration; when determining the driving source, the contribution threshold is appropriately adjusted based on the tidal cycle and rainfall pattern in the coastal area to improve the accuracy of determination under complex conditions; a new verification of the combined working condition of typhoon and rainstorm with high water level is added to verify the applicability of the model under extreme combined working conditions.
[0070] S4: Based on environmental factors in the multidimensional feature space, an integrated learning regression model is constructed to fit the pipeline network operation status. Combined with an interpretable attribution framework, the contribution of each factor is calculated to complete the source tracing and verification of the driving mechanism of the two types of external water components.
[0071] In S4, the ensemble learning regression model is the Gradient Boosting Decision Tree Regression Model (XGBoost), and the constructed physical perception input vector is: ;in, For a moment The input vector, For instantaneous rainfall intensity, The accumulated rainfall over 1 hour This refers to the cumulative rainfall over 24 hours. For real-time river tide levels, For a moment The absolute value of conductivity, The first-order rate of change of conductivity; the model employs a regularized objective function constraint, the objective function... for: ; The regularization term is: ; Let the prediction error loss function be approximated by a second-order Taylor expansion. The number of leaf nodes. The weight vector of the leaf nodes Norm, (Node splitting threshold) and (Weight smoothing coefficient) is a regularization hyperparameter that controls the complexity of the model.
[0072] The output of the XGBoost gradient boosting decision tree regression model is the liquid level in the pump station's sump.
[0073] The explainable attribution framework in S4 is the Additive Feature Attribution Explanation Framework (SHAP). Based on the framework and combined with game theory principles, the marginal contribution value (SHAPValue) of each environmental factor is calculated.
[0074] The SHAP additive constraint formula is: ; in, The total amount of external water predicted by the model. As the baseline expected value, For the number of features, Features The SHAP value.
[0075] It is worth noting that ensemble learning regression models refer to machine learning models that fit the nonlinear relationship between environmental factors and pipeline network operation status through iterative training of multiple decision trees.
[0076] The gradient boosting decision tree regression model refers to the XGBoost regression model optimized based on the gradient boosting framework, with regularization constraints, which can suppress overfitting due to sensor noise.
[0077] Physical perception input vectors refer to model input features that incorporate hydrological and hydraulic physics laws, which are different from meaningless features driven purely by data.
[0078] The interpretable attribution framework refers to the SHAP interpretability framework based on game theory principles, which calculates feature contribution and analyzes the interpretability analysis framework of model output logic.
[0079] Marginal contribution value (SHAPValue) is the quantitative impact of a single environmental factor on the model output. Positive and negative values represent the driving direction, while the magnitude represents the degree of impact.
[0080] The water level in the pump station's sump is the target variable output by the model, used to reflect the linkage response state between the hydraulic load of the pipeline network and the intrusion of external water.
[0081] In one specific implementation, a physical perception input vector is constructed using instantaneous rainfall intensity, 1-hour cumulative rainfall, 24-hour cumulative rainfall, river tide level, electrical conductivity, and first-order rate of change of electrical conductivity. This vector is then input into an XGBoost gradient boosting decision tree regression model. The model tree depth is set to 6, the learning rate to 0.1, and the regularization parameters γ=1 and λ=1. Parameters are optimized using 5-fold cross-validation. By maximizing the Nash efficiency coefficient (NSE) and the coefficient of determination (R²), and minimizing the root mean square error (RMSE), the model's Nash efficiency coefficient (NSE) is ≥0.90. The pump station's sump level is used as the output quantity to fit the pipeline network's operating status. The SHAP (Explanatory Attribution) framework is used to calculate the SHAP values of each environmental factor. Based on the positive and negative values and magnitude of the contribution, the driving mechanisms of rainwater source inflow (RDII) and groundwater / river water infiltration (GWI) are traced and verified.
[0082] When executing step S4, regularization constraints are added during the training of the XGBoost gradient boosting decision tree model to suppress overfitting due to high-frequency noise, and the tree depth is set to 6 to avoid excessive model complexity; the first-order rate of change of conductivity is retained in the input vector to capture the dynamic fingerprint of alternating fresh and salt water; 5-fold cross-validation is used to improve the model's generalization ability and adapt to combined conditions of extreme rainfall and high tide; when calculating the SHAP value, the additive attribution rule is used to ensure that the contribution is summable, and the physical mechanism is prioritized for verification during source tracing to ensure the engineering credibility of the results.
[0083] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A quantitative source tracing method for external water intrusion into sewage pipe networks based on temporal decoupling and interpretable machine learning, characterized in that, Includes the following steps: S1: Collect multi-source hydraulic and water quality data of key nodes in the sewage pipe network, as well as meteorological and water level environmental data of the corresponding areas. Perform unified preprocessing on all multi-source time series data to construct a multi-dimensional feature space containing hydraulic factors, water quality factors and environmental factors. S2: Based on the multidimensional feature space, a time-series decomposition algorithm is used to dynamically decouple and reconstruct the dry weather water quality data. After removing abnormal samples, a dynamic dry weather discharge baseline is obtained. The total amount of external water intrusion sequence is calculated by the difference between the measured data and the dynamic dry weather discharge baseline. S3: Based on the total external water intrusion sequence, the proportion of total external water intrusion is quantified by combining the mass balance principle, and a dual-source tracer physical mixing model is constructed to decouple the total external water into two components in real time: fast-response inflow and slow-response inflow. S4: Based on the environmental factors in the multidimensional feature space, construct an integrated learning regression model to fit the pipeline network operation status, and combine it with an interpretable attribution framework to calculate the contribution of each factor, thereby completing the source tracing and verification of the driving mechanism of the two types of external water components.
2. The quantitative source tracing method for external water intrusion in sewage pipe networks based on temporal decoupling and interpretable machine learning according to claim 1, characterized in that: The preprocessing described in S1 includes: resampling all multi-source time-series data to a uniform time granularity using linear interpolation, constructing a sliding interquartile range filter, and calculating the abnormal noise removal threshold. The calculation formula is as follows: ; ; in, This is the upper limit for anomaly detection. This is the lower limit for outlier detection. The lower quartile distance, The upper quartile distance, Interquartile range; Remove those exceeding [ , The system identifies physically unreliable noise points within a given interval and uses time-series decomposition model predictions to fill in the missing data.
3. The quantitative source tracing method for external water intrusion in sewage pipe networks based on temporal decoupling and interpretable machine learning according to claim 1, characterized in that: The time series decomposition algorithm described in S2 is an additive time series decomposition model, and the corresponding time series decomposition equation is: ; in, This is a water quality data sequence for dry weather. It is a non-periodic trend term. For daily and weekly periodic seasonal terms, This is a holiday effect term. This is the random error term.
4. The quantitative source tracing method for external water intrusion in sewage pipe networks based on temporal decoupling and interpretable machine learning according to claim 1, characterized in that: In S2, anomaly samples are removed using a water quality and quantity response verification mechanism: a baseline curve for the daily variation of conductivity during dry weather is constructed, and non-steady-state data that do not conform to the water quality fingerprint characteristics of high flow rate corresponding to high conductivity and low flow rate corresponding to low conductivity are removed. Parameter fitting is only performed on the dry weather dataset verified by the water quality fingerprint using the maximum a posteriori estimation method.
5. The quantitative source tracing method for external water intrusion in sewage pipe networks based on temporal decoupling and interpretable machine learning according to claim 1, characterized in that: The total external water intrusion ratio mentioned in S3 is quantified by combining the difference between the conductivity in the measured data and the dynamic dry weather emission baseline with the principle of pollutant mass balance.
6. The quantitative source tracing method for external water intrusion in sewage pipe networks based on temporal decoupling and interpretable machine learning according to claim 1, characterized in that: The dual-source tracer physical hybrid model described in S3 uses the conductivity in the measured data as a mass balance tracer and temperature as an energy balance tracer, and combines the mass balance equation set and the energy balance equation set to achieve real-time decoupling of external water components.
7. The quantitative source tracing method for external water intrusion in sewage pipe networks based on temporal decoupling and interpretable machine learning according to claim 1, characterized in that: The ensemble learning regression model described in S4 is a gradient boosting decision tree regression model, and the constructed physical perception input vector is: ; in, For a moment The input vector, For instantaneous rainfall intensity, The accumulated rainfall over 1 hour This refers to the cumulative rainfall over 24 hours. For real-time river tide levels, For a moment The absolute value of conductivity, This is the first-order rate of change of electrical conductivity; The output of the gradient boosting decision tree regression model is the liquid level in the pump station's water collection tank.
8. The quantitative source tracing method for external water intrusion in sewage pipe networks based on temporal decoupling and interpretable machine learning according to claim 1, characterized in that: The explainable attribution framework described in S4 is an additive feature attribution explanation framework. Based on this framework and combined with game theory principles, the marginal contribution value of each environmental factor is calculated.
9. The quantitative source tracing method for external water intrusion in sewage pipe networks based on temporal decoupling and interpretable machine learning according to claim 1, characterized in that: The fast-response inflow mentioned in S3 is rainwater inflow, and the slow-response infiltration is groundwater or river water infiltration. Based on the positive and negative directions and magnitudes of the marginal contribution values of each environmental factor, the external water driving source is determined to be tidal backwater, rainwater inflow, or groundwater infiltration.