A method and system for predicting water loss in a water distribution network

By combining a graph-based time-series prediction model with physical constraints, multi-scale prediction of leakage levels and leakage risks in water supply networks by region and pipe segment is achieved. This solves the problems of delayed early warning and insufficient positioning accuracy in existing technologies, improves the spatial resolution and physical rationality of prediction, and supports the operation and maintenance decisions of water supply companies.

CN121563712BActive Publication Date: 2026-04-21HANGZHOU LAISON TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-22
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing technologies are insufficient for multi-scale prediction of leakage levels in water supply networks and leakage risks in pipe sections, and lack physical constraints, resulting in delayed leakage warnings and insufficient location accuracy.

Method used

A graph-based time-series prediction model is adopted, which combines the topology of the water supply network and multi-source operation data. Through graph structure feature extraction and time series modeling, mass conservation, energy balance and pressure safety interval constraints are introduced to achieve multi-scale prediction at the zone level and pipe section level.

Benefits of technology

It improves the spatial resolution and temporal response capability of leakage prediction, enhances the physical rationality and robustness of prediction results, improves the interpretability and engineering integration of operation and maintenance decisions, and supports the transformation from post-event statistical analysis to pre-event proactive early warning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121563712B_ABST
    Figure CN121563712B_ABST
Patent Text Reader

Abstract

A method and system for predicting leakage in a water supply network, comprising: modeling network nodes and pipe segments as a graph topology and assigning static attributes to nodes and pipe segments; collecting water supply network operation data and constructing time-varying graph data corresponding to the graph topology; combining the time-varying graph data with static attributes to form spatiotemporal input features; constructing a graph time-series prediction model based on a deep learning framework, extracting graph structure features from the node graph features and pipe segment graph features at each time step to obtain node spatial features and pipe segment spatial features, and outputting a set of spatiotemporal representations of nodes and pipe segments; evaluating and analyzing the leakage level of each DMA or pressure zone; generating a set of spatial distributions of pipe segment leakage risks; constructing a joint loss function to train and update the graph time-series prediction model; inputting real-time collected operation data into the trained graph time-series prediction model to generate online predicted leakage rates for each zone and leakage risk indicators for each pipe segment for leakage prediction and operation and maintenance decisions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of urban water supply and smart water technology, and in particular to a method and system for predicting leakage in water supply networks, specifically for predicting and warning of the leakage level of urban water supply networks by zone and the leakage risk of pipe sections. Background Technology

[0002] Water leakage in water supply networks (WDNs) is a significant issue in urban water resource management. Leakage leads to substantial losses of both raw and finished water, increasing energy consumption for water intake, production, and pressurization. It can also trigger secondary disasters such as contaminant intrusion and ground subsidence. Because water supply networks are mostly buried underground and cover a wide area, even minor leaks are difficult to detect in a short time, complicating the issue of leakage and early warning.

[0003] Current leakage management primarily relies on zonal metering and manual experience. This typically involves establishing regional distribution zones (DMAs) and manually interpreting various indicators. While simple to implement, this method suffers from long update cycles, delayed responses to short-term fluctuations in operating conditions and sudden leakage, and only provides summary indicators at the zonal level, making it difficult to pinpoint specific pipe sections. Similarly, in engineering practice, "static zonal pressure control," "experience-based scheduling," and regular manual inspections also heavily depend on manual experience, resulting in high labor intensity and limited location accuracy.

[0004] With the development of technologies such as Supervisory Control and Data Acquisition (SCADA), remote water meters, and online pressure and flow sensors, leakage detection and location methods based on operational data have been extensively studied. However, these methods mostly focus on the diagnostic problem of "whether leakage exists" or "leakage location," and have limited predictive ability for leakage levels in future periods. Furthermore, they generally lack a multi-scale prediction framework that simultaneously outputs zonal leakage rates and pipe section leakage risks.

[0005] Patent document CN118705555A discloses a deep learning-based method for monitoring leakage in water supply networks. This method interpolates monitoring data into a pressure spatial distribution map and inputs it into a deep network to output whether leakage events occur in the network. While this method achieves automatic leakage identification, it is limited to determining the presence or absence of leakage at the current moment. It neither predicts future leakage levels nor outputs multi-scale leakage indicators for different zones and pipe sections, and it does not incorporate physical constraints such as mass conservation, energy balance, and pressure safety zones during training.

[0006] Patent document CN120197778A discloses a method for predicting urban pipeline network operation based on a physical information graph neural network. This method abstracts the pipeline network into a graph structure and introduces a physical information graph neural network to predict operating parameters such as flow rate and pressure. While this method considers both data and physical mechanisms, it is geared towards general operational state prediction. It does not design multi-scale output structures for zoning and pipe segments specifically for leakage management, nor does it utilize the conservation relationship between the total leakage of a zoning zone and the weighted sum of leakage indices for pipe segments for scale coupling, and it does not construct a joint loss mechanism based on physical constraints for leakage prediction. Summary of the Invention

[0007] The present invention aims to overcome the above-mentioned shortcomings of the prior art and proposes a method and system for predicting leakage in water supply networks.

[0008] The concept of this invention is to map multi-source operational monitoring data such as pressure, flow rate, water level, and water consumption into time-varying graph data based on the topology of the water supply network. Through a graph-based time-series prediction model, multi-scale prediction of zonal leakage levels and pipe segment leakage risks can be achieved simultaneously within the same framework. Furthermore, hydraulic constraints such as mass conservation, energy balance, and pressure safety range are introduced during the model training process to improve the physical consistency of the prediction results and their robustness under changing operating conditions.

[0009] In a first aspect, the present invention proposes a method for predicting leakage in a water supply network, comprising the following steps:

[0010] S1: Model the network nodes and pipe segments as a graph topology and assign static properties to the nodes and pipe segments;

[0011] S2: Collect water supply network operation data at preset time intervals, and construct time-varying graph data according to the sliding time window and the graph topology;

[0012] S3: Preprocess the time-varying graph data and combine it with static attributes to form spatiotemporal input features;

[0013] S4: A graph time series prediction model is constructed based on a deep learning framework. Under the topological constraints of the water supply network, graph structure features are extracted from the node graph features and pipe segment graph features at each time step. By aggregating information from each node and its neighborhood, each pipe segment and its upstream and downstream nodes and adjacent pipe segments, the spatial features of nodes and pipe segments are obtained respectively. The spatial feature sequences of each time step are input into the time series modeling unit for time modeling to extract the dynamic change patterns of the operating state. The output is a set of spatiotemporal representations of nodes and pipe segments containing spatial topological information and temporal dynamic information.

[0014] S5: Conduct a comprehensive assessment and trend analysis of the leakage levels of each DMA or pressure zone;

[0015] S6: Generates the spatial distribution of pipe segment leakage risk and the set of high-risk pipe segments to provide a location basis for inspection and maintenance;

[0016] S7: Construct a joint loss function, and train and update the graph time series prediction model by minimizing the joint loss function;

[0017] S8: Input the real-time collected operation data into the trained graph time series prediction model to generate online the predicted leakage rate of each partition and the leakage risk index of each pipe segment for leakage prediction and operation and maintenance decision-making.

[0018] More specifically, step S1 includes:

[0019] S1-1: Model the nodes of the water supply network as graph nodes, and model the pipes and hydraulic components connecting each node as graph edges to obtain the initial topology of the water supply network.

[0020] S1-2: Assign static properties to each node and pipe segment;

[0021] S1-3: Based on the DMA partitioning or pressure partitioning information provided by the water supply company, each node and pipe segment is labeled with the corresponding partition index to obtain the node partition set and pipe segment partition set, which are used for subsequent partition-level prediction and aggregation.

[0022] More specifically, step S2 includes:

[0023] S2-1: Collect operational monitoring data for each node and each pipe segment at preset time intervals; for any time step and node, collect node pressure, node head and other operational data; for any pipe segment, collect pipe segment flow rate, upstream and downstream pressure difference and other operational data.

[0024] S2-2: Organize the operational data collected in chronological order into sliding time windows, construct node measurement sequences and pipe segment measurement sequences for each time window, and establish a correspondence with the topology given in step S1 to obtain the time-varying map data within that time window;

[0025] S2-3: Spatiotemporal input feature construction and preprocessing, used to combine running data with static attributes to form spatiotemporal features that can be input into the prediction model.

[0026] More specifically, step S3 includes:

[0027] S3-1: Perform missing value imputation, outlier identification and removal, unit unification and numerical normalization on the running data in the time-varying graph data;

[0028] S3-2: At each time step, for any node and pipe segment, its dynamic measurement values ​​are used to form a node dynamic feature vector, which is then concatenated with the static features to obtain the node graph features and pipe segment graph features.

[0029] S3-3: Stack the node graph features and pipe segment graph features of each time step within the time window in chronological order to obtain the spatiotemporal input feature tensor that characterizes the operating status of the water supply network within the time window.

[0030] More specifically, the graph time-series prediction model described in step S4 includes a graph structure feature extraction module, a time series modeling module, a partition-level output module, and a pipe segment-level output module. The graph structure feature extraction module aggregates information on each node and its neighborhood, and each pipe segment and its upstream and downstream relationships under the constraints of the water supply network topology to obtain the spatial features of each time step. The time series modeling module takes the spatial feature sequence arranged in chronological order as input, models the time dependency relationship, and generates a shared spatiotemporal representation of each node and each pipe segment. The partition-level output module pools or weights the shared spatiotemporal representations belonging to the same DMA or pressure partition to predict partition-level leakage indicators such as leakage rate and non-revenue water ratio of each partition. The pipe segment-level output module predicts pipe segment-level leakage indicators to characterize the leakage risk of each pipe segment in future periods based on the shared spatiotemporal representation of each pipe segment.

[0031] More specifically, step S5 includes:

[0032] S5-1: Pool and aggregate the spatiotemporal representations of the nodes and pipe segments of the partition to obtain the partition comprehensive spatiotemporal representation vector;

[0033] S5-2: Input the comprehensive spatiotemporal representation of the partition into the partition-level output layer, predict the indicators used to characterize the leakage level of the corresponding partition in the future preset time steps, and obtain the partition leakage prediction value by adopting a linear layer or multi-layer sensing mechanism to form the partition-level leakage prediction result.

[0034] More specifically, step S6 includes:

[0035] S6-1: Input the spatiotemporal representation of each pipe segment into the risk output layer to obtain an index that characterizes the leakage risk of each pipe segment in the future prediction period. The leakage risk score and leakage occurrence probability are obtained through one or more nonlinear transformations.

[0036] S6-2: Based on the obtained leakage risk score and probability, generate the leakage risk distribution of the pipe section and output the risk heat map, the list of high-risk pipe sections, or the risk level classification results.

[0037] More specifically, the joint loss function in step S7 includes data errors obtained from the zonal-level leakage index and the pipe segment-level leakage index, multi-scale coupling errors used to constrain the conservation relationship between the total leakage of each zonal and the weighted sum of the leakage indices of each pipe segment within that zonal, and physical constraint residuals calculated based on hydraulic constraints including mass conservation, energy balance, and pressure safety intervals.

[0038] More specifically, step S7 includes:

[0039] S7-1: Establish a mass conservation equation for each node to obtain the mass conservation relationship; establish an energy balance equation for each pipe segment; set allowable pressure ranges for each node;

[0040] S7-2: Substitute the node head, node pressure, pipe flow rate and related leakage equivalents obtained in step S4 into the above equation to calculate the node flow balance residual, pipe energy balance residual and pressure over-limit.

[0041] S7-3: Based on the zone leakage rate annotation data and pipe segment leakage annotation data given in historical data or simulation data, calculate the zone-level leakage prediction error and the pipe segment-level leakage risk prediction error, and construct the zone-pipe segment leakage coupling error to form a data error term;

[0042] The leakage risk indicators of the pipe segments in the zone are weighted and summed according to preset weights to obtain the zone leakage indicators derived from the pipe segment side.

[0043] By using the zone-pipe segment leakage coupling constraint, the total leakage prediction at the zone scale is kept numerically consistent with the leakage risk prediction of each pipe segment within the zone, thereby explicitly linking the results of the two spatial scales during the training process.

[0044] S7-4: The partition-level data error, pipe segment-level data error, multi-scale coupling error, and physical constraint residual terms are weighted and combined according to preset weights to form a joint loss function. This joint loss function is used to train and update the parameters of the graph structure time series prediction model, so that the model can fit historical data while satisfying hydraulic constraints and maintaining the consistency of leakage between the partition scale and the pipe segment scale.

[0045] More specifically, step S8 includes:

[0046] S8-1: During the operation of the water supply network, new operational data are continuously collected, new time windows are constructed on a rolling basis, and S2 to S3 are repeatedly executed to construct the latest spatiotemporal input feature tensor.

[0047] S8-2: Input the latest spatiotemporal input features into the trained prediction model, and perform graph structure feature extraction, time series modeling, and multi-scale output according to steps S4 to S6 to obtain the predicted leakage rate of each partition and the leakage risk score and leakage probability of each pipe segment.

[0048] S8-3: Based on the predicted leakage rate of the zoning area and the leakage risk index of the pipe section, generate a zoning leakage analysis report, a pipe section risk heat map and early warning information, and provide prompts for high-risk zoning areas and high-risk pipe sections to assist in operation management and maintenance decisions.

[0049] Secondly, this invention proposes a system for predicting leakage in water supply networks. This system is used for multi-scale prediction and early warning of the leakage levels and leakage risks of urban water supply networks in different zones and sections. The system includes a data acquisition module, a topology modeling module, a spatiotemporal feature construction module, a time series prediction module, a multi-scale output module, a physical constraint calculation module, a training and inference module, and a human-computer interaction and early warning module. The modules can be connected via wired communication, wireless communication, or both simultaneously to collaboratively realize the entire process of water supply network leakage prediction.

[0050] The data acquisition module is used to interact with the water supply company's existing information system to obtain basic geographic information, hydraulic model information, and operation monitoring data of the water supply network.

[0051] The topology modeling module, based on the data acquisition module, abstracts water plants, pumping stations, water tanks, regulating water tanks, ordinary pipe network nodes, valves and pipes into graph nodes and graph edges, and constructs a water supply network topology model with node attributes and edge attributes, providing a structural foundation for subsequent spatiotemporal modeling.

[0052] The spatiotemporal feature construction module is used to associate the water supply network topology model with the operation monitoring data, construct time-varying map data at preset time intervals, and form spatiotemporal input features that can be called by the time series prediction module.

[0053] The time series prediction module is built on the water supply network topology and is used to aggregate spatial information and model time series of spatiotemporal input features, and extract the spatiotemporal representation of each node and each pipe segment.

[0054] The multi-scale output module maps the spatiotemporal representation of nodes and pipe segments to prediction results at different spatial scales. On the one hand, it outputs the leakage rate prediction of DMA or pressure zone, and on the other hand, it outputs the leakage risk prediction at the pipe segment level, realizing multi-scale leakage prediction from zone to pipe segment.

[0055] The physical constraint calculation module is used to verify the intermediate variables and prediction results output by the time series prediction module based on the hydraulic constraints such as the mass conservation equation, energy balance equation and pressure safety range of the water supply network, and to calculate the corresponding physical constraint residuals.

[0056] The training and inference module constructs a joint loss based on historical data and physical constraint residuals during the training phase to update the parameters of the time series prediction module. During the online phase, it calls the trained model to perform forward inference on the newly collected running data and sends the prediction results to the multi-scale output module and the human-computer interaction and early warning module.

[0057] More specifically, the data acquisition module establishes data interfaces with the GIS system, SCADA system, zone metering system, and remote water metering system. Through the GIS system, it acquires the location coordinates, elevation, and connection relationships of water plants, pumping stations, water tanks, regulating tanks, ordinary pipe network nodes, and valves; through the hydraulic model, it acquires static parameters such as pipe diameter, pipe length, material, roughness coefficient, and design flow rate. Through the SCADA system and zone metering system, it collects dynamic data such as node pressure, node water level, pipe segment flow rate, zone inflow and outflow, and zone water consumption at preset time intervals; and through configuration files, it acquires DMA partitioning and pressure management zone partitioning information. The data acquisition module performs time alignment and basic cleaning on data from different systems, removing obviously erroneous or missing data points, and performs unit unification and format conversion to generate a consistent raw dataset.

[0058] The time series prediction module includes a graph structure feature extraction unit and a time series modeling unit. The graph structure feature extraction unit uses the water supply network topology as a constraint, and aggregates information on nodes and their neighborhoods, pipe segments and their upstream and downstream relationships at each time step to extract intermediate features that reflect spatial topological relationships. The time series modeling unit models the intermediate features of multiple consecutive time steps, captures the dynamic impact of water demand fluctuations, pump station operation adjustments and valve condition changes on pressure and flow, and outputs the spatiotemporal representation vectors of each node and each pipe segment.

[0059] Based on the spatiotemporal representation vector, the multi-scale output module aggregates nodes and pipe segments according to DMA or pressure zoning, inputs them into the zoning-level prediction head, and generates indicators such as zoning leakage rate and non-revenue water ratio for a future period. On the other hand, it inputs the spatiotemporal representation of each pipe segment into the risk prediction head and outputs the leakage risk score and / or leakage occurrence probability of each pipe segment within a preset prediction period, forming a pipe segment-level leakage risk distribution, which can be used to generate leakage risk heat maps and high-risk pipe segment ranking lists.

[0060] Based on the hydraulic principles of water supply networks, the physical constraint calculation module establishes a mass conservation relationship for each node, with inflow, outflow, node demand, and equivalent leakage as variables. For each pipe segment, it establishes an energy balance relationship with upstream and downstream head difference and friction loss as variables. Minimum service pressure and maximum safe pressure are set for each node. During model training, the training and inference module combines the zone-level leakage prediction error, pipe segment-level leakage risk prediction error, and the mass conservation residual, energy balance residual, and pressure over-limit penalty provided by the physical constraint calculation module to form a joint loss. Through iterative optimization, the time-series prediction module fits historical data while satisfying hydraulic constraints as much as possible, thus obtaining a water supply network leakage prediction model with strong physical rationality and good robustness under changing operating conditions and data disturbances.

[0061] Thirdly, the present invention also provides a computer device for implementing the above-described method for predicting leakage in water supply networks, and a computer-readable storage medium.

[0062] The innovation of this invention is:

[0063] (1) A multi-scale graph structure spatiotemporal modeling framework for leakage prediction tasks is proposed, which simultaneously completes the prediction of zonal leakage indicators and pipe segment leakage risks in a unified graph structure and time series modeling network. Unlike time series prediction methods that only perform water balance analysis at the DMA scale or only target a single monitoring point, this invention uses the water supply network topology as a constraint, abstracting water plants, pumping stations, water tanks, regulating tanks, ordinary nodes, valves, and pipe segments into graph nodes and edges with static attributes and dynamic monitoring values. Time-varying graph data is constructed within a sliding time window, and shared spatiotemporal representations of nodes and pipe segments are obtained through graph structure feature extraction and time series modeling units. Then, zonal-level output heads and pipe segment-level output heads are set on the same spatiotemporal representation. Through this multi-task modeling method with shared representation, the predictions at the zonal scale and pipe segment scale are mutually constrained and complementary, maintaining the stability of the overall leakage trend of the zonal area and improving the sensitivity of local risk identification of the pipe segment, which is significantly better than the conventional approach of simply training the zonal model and the pipe segment model separately. In addition, during the training process, a partition-pipe segment coupling loss term is constructed by the leakage conservation relationship between the total leakage prediction value of the partition and the leakage risk index of each pipe segment in the partition. This makes the prediction results of the partition scale and the pipe segment scale consistent in numerical terms, thereby further improving the stability and reliability of multi-scale prediction.

[0064] (2) A joint loss design for physical constraints in water supply networks is constructed, which explicitly embeds mass conservation constraints, energy balance constraints, and pressure safety interval constraints into the training process of the deep time series model, thereby achieving a tight coupling between data-driven and hydraulic mechanism constraints. Unlike the practice of training only based on data fitting errors or using hydraulic calculations only as a post-processing verification step, this invention simultaneously substitutes the nodal head, nodal pressure, pipe segment flow, and equivalent flow related to leakage output by the model into the nodal mass conservation equation, pipe segment energy balance equation, and service pressure constraints, constructing physical constraint residual terms such as nodal flow balance residual, pipe segment energy balance residual, and pressure over-limit, and combining them with the zonal-level leakage prediction error, pipe segment-level leakage risk prediction error, and zonal-pipe segment leakage consistency constraint according to preset weights to form a unified joint loss function, so that physical constraints and multi-scale structures work together on the same set of prediction variables, forming a dedicated training mechanism for water supply network leakage prediction tasks. During parameter updates, data errors and physical residuals participate in gradient backpropagation, which allows the model to be "pulled back" to the solution space that satisfies basic hydraulic laws while learning historical data patterns. This ensures that the model can maintain good physical rationality and engineering robustness even when demand fluctuates significantly, boundary conditions are adjusted, or monitoring data is noisy or missing.

[0065] (3) In view of the characteristics of the existing information systems of water supply enterprises, an integrated system implementation scheme is proposed, which includes multi-source data access, spatiotemporal feature construction, model training and online inference to multi-scale visualization early warning, so that the leakage prediction model has an engineering application form that can be deployed. The present invention designs functional units such as data acquisition module, topology modeling module, spatiotemporal feature construction module, time series prediction module, multi-scale output module, physical constraint calculation module and training and inference module at the system level. By establishing standardized data interfaces with GIS system, SCADA system, zonal metering system and remote water meter system, it automatically completes the access and cleaning of basic geographic information, hydraulic model information and operation monitoring data. On this basis, spatiotemporal input features suitable for model training and online inference are formed, and the prediction results and risk indicators are output to the human-computer interaction and early warning module, driving the hierarchical and zonal leakage analysis interface, zonal map and pipe section risk heat map and other visualization components to update in a coordinated manner. Through the above modular structure design, the leakage prediction function is smoothly integrated into the existing smart water platform, reducing the difficulty of engineering implementation and improving the understandability and usability of the prediction results.

[0066] (4) Within the same framework, this invention balances prediction accuracy, physical interpretability, and operational availability to form a comprehensive solution for water supply network leakage problems. This invention fully utilizes the water supply network topology and multi-source monitoring data through graph-structured spatiotemporal modeling, establishing connections at the node, pipe segment, and zone levels; it suppresses physically unreasonable numerical divergences through physical constraint joint loss, improving the reliability of prediction results under varying operating conditions; and it provides directly usable decision-making basis for inspection route planning, zone pressure testing, local sound detection, and asset management through multi-scale output and visualization. Compared with technical solutions that only focus on a single scale, a single indicator, or only remain at the offline algorithm verification stage, this invention achieves synergistic innovation at the three levels of algorithm structure, constraint method, and system implementation, effectively supporting water supply enterprises in shifting from "post-event statistical analysis" to "pre-event proactive early warning" leakage management models.

[0067] The beneficial effects of this invention are as follows:

[0068] (1) Improved spatial resolution and temporal response capability of leakage prediction. Based on the multi-scale graph structure spatiotemporal modeling framework, the spatiotemporal representations of nodes and pipe segments are shared in the same network, and the zoning-level leakage index and pipe segment-level leakage risk are output respectively, so that the prediction results at the zoning scale and pipe segment scale are structurally mutually constrained. Thus, on the one hand, stable leakage trend prediction can be obtained at the DMA or pressure zoning level, supporting the overall water balance analysis at the daily / weekly scale; on the other hand, a risk distribution refined to a single pipe segment can be formed at the pipe segment level, realizing the early locking of potential leakage points. Compared with the scheme that only gives the total loss difference of the zoning or the trend of a single point, the present invention significantly improves the spatial accuracy of leakage analysis and the response speed to short-term anomalies without increasing the deployment of additional sensors, which is conducive to the early detection of high-risk areas and pipe segments. At the same time, through the zoning-pipe segment leakage coupling constraint, even if the pipe segment-level leakage label data is relatively scarce, the model can use the zoning-level leakage label and the pipe network topology to reverse the risk distribution of the pipe segment, mitigating the impact of insufficient pipe segment-side labels on the prediction accuracy.

[0069] (2) Enhance the physical rationality of the prediction results and their robustness under complex operating conditions. By explicitly introducing hydraulic constraints such as mass conservation, energy balance, and pressure safety range into the training process, this invention jointly constrains the flow balance of nodes, head loss of pipe sections, and upper and lower limits of node pressure at the loss function level, so that the model always searches around the solution space that satisfies the basic hydraulic laws when optimizing parameters. When water supply demand fluctuates drastically, pump station operating conditions are adjusted, or there is sensor noise or missing data, the physical constraint residual term can play a "corrective" role in the prediction results driven by pure data, suppressing abnormal outputs that obviously violate head balance or pressure safety range. Compared with black-box models that rely solely on historical data fitting, this invention has better numerical stability and engineering credibility under complex boundary conditions.

[0070] (3) Enhance the interpretability of leakage analysis results and support capabilities for operation and maintenance decisions. Based on graph-structured spatiotemporal modeling, this invention closely integrates the water supply network topology with multi-source monitoring data, so that the prediction results naturally carry the topological relationships and upstream and downstream influence chains between "nodes-pipe segments-zones". The zone leakage index and pipe segment risk score generated by the multi-scale output module can be displayed in the visualization interface in the form of zone map, pipe segment risk heat map, risk ranking list, etc., which makes it easy for operation and maintenance personnel to intuitively understand "the impact of increased leakage in a certain area on the surrounding pressure fluctuations" and "the spatial clustering characteristics of high-risk pipe segments". Compared with the scheme that only outputs a single numerical index, this invention is beneficial to support operation and maintenance decisions such as inspection route planning, zone pressure test scheme formulation, local sound detection point deployment, and medium- and long-term renovation and upgrading plans.

[0071] (4) Possesses excellent engineering integration and application value. Through data interfaces and modular system architecture designed for existing GIS, SCADA systems, zone metering, and remote water meter systems, this invention can access the basic data and real-time monitoring data of water supply enterprises without changing existing business processes, realizing an integrated closed loop from data access, spatiotemporal feature construction, model training to online inference and early warning display. The system can automatically generate zone leakage analysis reports, pipe section risk heat maps, and abnormal alarm lists, reducing the workload of manual summarization and experience-based judgment, and enabling leakage management to gradually shift from "post-event statistics and manual investigation" to "pre-event prediction and key inspections". Compared with technical solutions that only rely on offline algorithm verification or require a lot of manual intervention, this invention is easier to deploy and form a continuously operating leakage management tool in existing smart water platforms, which is conducive to reducing non-revenue water levels and operation and maintenance costs in the long term. Attached Figure Description

[0072] Figure 1 This is a schematic diagram of the overall structure of the water supply network leakage prediction system of the present invention.

[0073] Figure 2 This is a flowchart illustrating the method for predicting leakage in water supply networks according to the present invention.

[0074] Figure 3 This is a schematic diagram of the process of water supply network topology modeling and attribute acquisition in this invention.

[0075] Figure 4 This is a schematic diagram of the spatiotemporal input feature construction and preprocessing process of the present invention.

[0076] Figure 5 This is a schematic diagram of the time-series prediction network structure based on graph structure according to the present invention.

[0077] Figure 6 This is a schematic diagram of the multi-scale output structure for the partition-level leakage prediction and pipe section-level leakage risk prediction of the present invention.

[0078] Figure 7 This is a schematic diagram illustrating the relationship between hydraulic physical constraints and joint losses in this invention.

[0079] Figure 8 This is a schematic diagram of the computer equipment structure used in this invention to implement a method for predicting leakage in water supply networks.

[0080] Figure 9 This is a schematic diagram of the interface of the hierarchical and partitioned leakage analysis visualization platform implemented in a practical system according to the present invention.

[0081] Figure 10 This is a schematic diagram of the water supply network zoning map and zoning leakage statistics display interface implemented in the actual system according to the present invention.

[0082] Figure 11 This is a schematic diagram of the leakage anomaly alarm record list interface implemented in an actual system according to the present invention.

[0083] Figure 12 This is a schematic diagram of the integrated dashboard interface for leakage statistics and ranking implemented in a real system according to the present invention. Detailed Implementation

[0084] To make the technical solution of the present invention clearer and more complete, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. These embodiments are for illustrative purposes only and are not intended to limit the present invention. Based on the embodiments disclosed in this invention, any other equivalent modifications or substitutions made by those skilled in the art without creative effort fall within the protection scope of this invention.

[0085] Example 1

[0086] This embodiment provides a method for predicting leakage in water supply networks, see attached document. Figure 2 This method is executed on the processor by the system's software program and includes the following steps:

[0087] S1: Pipeline topology modeling and attribute acquisition, used to perform graph structure modeling of the target water supply network and assign static attributes to nodes and pipe segments.

[0088] More specifically, step S1 includes:

[0089] S1-1: Obtain the basic geographic information and hydraulic model of the water supply network. Model water plants, pumping stations, water tanks, regulating tanks, ordinary nodes, valves, and important user access points as graph nodes, and model the pipes connecting each node and their hydraulic components as graph edges to obtain the initial topology of the water supply network. .in, For a set of nodes, Indicates the number of nodes; For pipe segment collection, This indicates the number of pipe segments, with each segment denoted as . .

[0090] S1-2: Assign static attributes to each node and pipe segment, including but not limited to node elevation, node type, DMA number, pipe diameter, pipe length, material, pipe age, roughness coefficient, valve type and control method, etc.

[0091] For any node Its static attributes combine to form the node's static feature vector:

[0092]

[0093] For any pipe section Its static attributes combine to form the static feature vector of the pipe segment:

[0094]

[0095] S1-3: Based on the DMA or pressure zoning information provided by the water supply company, mark each node and pipe segment as the corresponding zoning index. , thus obtaining the node partition set and pipe section zoning set This is used for subsequent partition-level prediction and aggregation.

[0096] S2: Operational data acquisition and time series construction, used to collect operational data of the water supply network and construct time-varying graph data according to time windows.

[0097] More specifically, step S2 includes:

[0098] S2-1: Within a preset time interval The system collects operational monitoring data from the SCADA system, zone metering, remote water meters, and online pressure and flow sensors for each node and pipe section.

[0099] For any time step With nodes Pressure on data acquisition nodes Node head Other operating volumes;

[0100] For any pipe section Collect pipe section flow upstream and downstream pressure difference And other operational volumes.

[0101] S2-2: The runtime data collected in chronological order is divided into a sliding time window of length T. Organize the data, construct node measurement sequences and pipe segment measurement sequences for each time window, and compare them with the topology given in step S1. Establish the correspondence to obtain the time-varying plot data within this time window;

[0102] S2-3: Spatiotemporal input feature construction and preprocessing, used to combine running data with static attributes to form spatiotemporal features that can be input into the prediction model.

[0103] S3: Used to generate the spatiotemporal input features required for the graph time series prediction model based on S2-3.

[0104] More specifically, step S3 includes:

[0105] S3-1: Perform missing value imputation, outlier identification and removal, unit unification and numerical normalization on the running data in the time-varying graph data to improve data quality and comparability;

[0106] S3-2: At each time step For any node The dynamic measurement values ​​are used to form the node dynamic feature vector:

[0107]

[0108] in, For nodes At any moment Total inflow, For nodes At any moment Total outflow rate. And compared with static characteristics. By concatenating the nodes, we obtain the node graph features:

[0109]

[0110] For any pipe section The dynamic measurement values ​​are used to form a dynamic feature vector of the pipe segment:

[0111]

[0112] and static features By splicing the images together, we obtain the pipe segment diagram features:

[0113]

[0114] S3-3: Set the time window The node graph features and pipe segment graph features of each time step are stacked in chronological order to obtain the spatiotemporal input feature tensor representing the operating status of the water supply network within that time window:

[0115]

[0116] S4: Graph-based temporal modeling is used to extract spatiotemporal features from the topology of water supply networks and generate spatiotemporal representations of nodes and pipe segments.

[0117] More specifically, step S4 includes:

[0118] S4-1: Input the graph features obtained in step S3 into the graph structure feature extraction unit, and aggregate the information of each node and its neighborhood, each pipe segment and its upstream and downstream relationships to obtain the spatial features of each time step.

[0119] For any time step With nodes Let the first Layer node characteristics are Information aggregation can then be represented as:

[0120]

[0121] in, For nodes The neighborhood, For the first Layer adjacency weight, For trainable weight matrix, This is the activation function. Similarly, information from adjacent pipe segments or upstream and downstream nodes can be aggregated to obtain the spatial features of the pipe segments. After extracting the L-layer graph structure features, the node spatial features are obtained. Spatial characteristics of pipe sections .

[0122] S4-2: Input the spatial feature sequences of each time step into the time series modeling unit, and use one or more of the following to perform time modeling: one-dimensional convolutional network (1D-CNN), recurrent neural network (RNN), long short-term memory network (LSTM), gated recurrent unit (GRU), and attention-based structure to extract the dynamic change pattern of the running state.

[0123] For nodes, the time modeling process can be abstractly represented as:

[0124]

[0125] For a pipe segment, the time modeling process can be represented as:

[0126]

[0127] in, and For the corresponding time series model, and This is the final spacetime representation.

[0128] S4-3: Output a set of spatiotemporal representations of nodes and pipe segments containing spatial topology information and temporal dynamic information.

[0129]

[0130] Used for subsequent multi-scale prediction.

[0131] S5: Zone-level leakage prediction, used to predict the leakage level of each zone in future time periods based on the spatiotemporal representation of nodes and pipe segments.

[0132] More specifically, step S5 includes:

[0133] S5-1: For any partition The spatiotemporal representations of nodes and pipe segments belonging to this partition are pooled and aggregated to obtain the partition's comprehensive spatiotemporal representation vector. The polymerization process can be represented as:

[0134]

[0135] in, It can be a summation, an average, or a weighted sum based on attention weights.

[0136] S5-2: Integrate the spatiotemporal representation of the partitions The input partition-level output layer predicts the indicators used to characterize the leakage level of the corresponding partition in the future preset time steps. The indicators include leakage rate, non-revenue water ratio and other indicators characterizing the leakage level.

[0137] For example, linear or multi-layer sensing mechanisms can be used to obtain partitioned leakage prediction values, forming partitioned leakage prediction results. :

[0138]

[0139] To ensure consistency between the zone-level leakage index and the leakage risk of each pipe segment within the zone, this invention also constructs a zone-pipe segment leakage coupling constraint based on the output of steps S5 and S6 during the training phase, as detailed in step S7.

[0140] S6: Pipe segment level leakage risk prediction, used to predict the leakage risk of each pipe segment in future time periods based on the spatiotemporal representation of the pipe segment.

[0141] More specifically, step S6 includes:

[0142] S6-1: Spatiotemporal representation of each pipe segment Input the risk to the output layer to obtain an index that characterizes the leakage risk of each pipe segment in the future prediction period.

[0143] Leakage risk scores can be obtained through one or more nonlinear transformations. and the probability of leakage :

[0144]

[0145] in, This is the sigmoid function.

[0146] S6-2: Based on the obtained leakage risk score and probability, generate the leakage risk distribution of the pipeline segment. The output can be a risk heat map, a list of high-risk pipeline segments, or a risk level classification result, which can be used to guide operation and maintenance decisions such as inspection route planning, zone pressure testing, and local sound detection.

[0147] S7: Physical Constraint Construction and Joint Loss Training, used to introduce hydraulic physical constraints into the model training process and construct a joint loss function.

[0148] More specifically, step S7 includes:

[0149] S7-1: (1) Establish the mass conservation equation for each node.

[0150] For any node ,set up Adjacent nodes Inflow node Traffic, For nodes Flow to adjacent nodes Traffic, For node demand, For the equivalent flow rate associated with leakage, the mass conservation law can be expressed as:

[0151]

[0152] in, For nodes The inflow neighborhood, For nodes The outflow neighborhood.

[0153] (2) Establish an energy balance equation for each pipe segment.

[0154] For any pipe section ,set up , For upstream and downstream nodes, In order to traffic Given the relevant loss function along the path, the energy balance relationship can be expressed as:

[0155]

[0156] (3) Set an allowable range for node pressure.

[0157] For any node ,set up For node pressure, and Let the minimum service pressure and the maximum allowable pressure be respectively, then the pressure constraint is:

[0158]

[0159] S7-2: The node head obtained in steps S4 to S6 Node pressure Pipeline flow rate and related leakage equivalent quantity Substitute into the above equation to calculate the node flow balance residual. Pipeline section energy balance residual and pressure exceeding the limit .

[0160] The mass conservation residual can be expressed as:

[0161]

[0162] The energy balance residual can be expressed as:

[0163]

[0164] Pressure exceeding the limit can be defined as:

[0165]

[0166] The physical constraint loss term can be expressed as:

[0167]

[0168] S7-3: Partition leakage rate annotation data based on historical or simulation data. Pipeline section leakage labeling data The prediction error of leakage at the zonal level and the prediction error of leakage risk at the pipe segment level are calculated, and the zonal-pipe segment leakage coupling error is constructed to form a data error term.

[0169] Specifically, the partition-level data error can be expressed as:

[0170]

[0171] in, The partition obtained in step S5 The predicted leakage value.

[0172] Pipeline segment level data errors can be expressed using cross-entropy or squared error as follows:

[0173]

[0174] in, The default loss function is... The pipe segment obtained in step S6 The probability of leakage occurring, For the corresponding labeled data.

[0175] Furthermore, in order to establish consistent constraints across different spatial scales, for any partition The leakage risk indicators of the pipe segments belonging to this zone are weighted and summed according to preset weights to obtain the zone leakage index derived from the pipe segment side:

[0176]

[0177] in, For partitioning The collection of pipe sections inside, Weighting coefficients related to pipe segment length, pipe diameter, or importance. This is a monotonic mapping function for the probability of leakage in the pipe section.

[0178] Define the partition-segment leakage consistency residual as:

[0179]

[0180] The multi-scale coupling loss can then be expressed as:

[0181]

[0182] By using the above-mentioned zone-segment leakage coupling constraint, the total leakage prediction at the zone scale is kept numerically consistent with the leakage risk prediction of each segment within the zone, thereby explicitly linking the results of the two spatial scales during the training process.

[0183] S7-4: The partition-level data error, segment-level data error, multi-scale coupling error, and physical constraint residual term are weighted and combined according to preset weights to form a joint loss function, specifically:

[0184]

[0185] in, This refers to the error weighting coefficient at the pipe section level. This represents the weighting coefficient for spatial scale coupling error.

[0186] The final joint loss function is:

[0187]

[0188] in, These are the physical constraint weighting coefficients. This joint loss function is used to train and update the parameters of the graph-structured time-series prediction model, enabling the model to fit historical data while satisfying hydraulic constraints and maintaining consistency in leakage between the partition scale and the pipe segment scale.

[0189] S8: Online prediction and result output, used to call the trained model during the actual operation of the water supply network, predict new data and output results.

[0190] More specifically, step S8 includes:

[0191] S8-1: Continuously collect new operational data during the operation of the water supply network and continuously construct new time windows. And repeat steps S2 to S3 to construct the latest spatiotemporal input feature tensor. .

[0192] S8-2: Input the latest spatiotemporal input features into the prediction model trained in step S7, and perform graph structure feature extraction, time series modeling, and multi-scale output according to steps S4 to S6 to obtain the predicted leakage rate for each partition. and leakage risk scores for each pipe section and leakage probability .

[0193] S8-3: Based on the predicted leakage rate of the zoning area and the leakage risk index of the pipe section, generate a zoning leakage analysis report, a pipe section risk heat map and early warning information, and provide prompts for high-risk zoning areas and high-risk pipe sections to assist in operation management and maintenance decisions.

[0194] Example 1 enables multi-scale dynamic prediction of leakage levels and leakage risks in water supply networks.

[0195] Example 2

[0196] As attached Figure 1 This embodiment provides a system for predicting leakage in water supply networks. This system can be deployed on the smart water management platform of water supply companies to predict and provide early warnings of leakage levels and leakage risks in different zones and sections of urban water supply networks.

[0197] like Figure 1 As shown, the system establishes data connections with GIS, SCADA, zonal metering, and remote water meter systems. The system may include: a data acquisition module, a topology modeling module, a spatiotemporal feature construction module, a time series prediction module, a multi-scale output module, a physical constraint calculation module, a training and inference module, and a human-computer interaction and early warning module.

[0198] (1) Data acquisition module

[0199] The data acquisition module is used to obtain static and dynamic operational data related to the water supply network from external information systems.

[0200] Static data may include: the location, elevation, and connection relationships of water plants, pumping stations, water tanks, regulating tanks, ordinary pipeline network nodes and valves, as well as the pipe diameter, length, material, roughness coefficient, and age of pipe sections.

[0201] Dynamic data may include: node pressure, node water level, pipe flow rate, zone inflow and outflow, zone water consumption, and other operational monitoring data.

[0202] The data acquisition module performs time alignment, unit unification, and basic cleaning on multi-source data from GIS systems, SCADA systems, regional metering systems, and remote water meter systems, removing obviously erroneous or missing data to generate a structured raw dataset.

[0203] (2) Topology modeling module

[0204] Please see the appendix Figure 3 The topology modeling module is used to perform graph structure modeling of the target water supply network based on the basic data and assign static attributes.

[0205] The topology modeling module models water plants, pumping stations, water tanks, regulating tanks, ordinary nodes, and valves as graph nodes, forming a set of nodes. The pipes and hydraulic components connecting each node are modeled as graph edges, forming a set of pipe segments. The topology of the water supply network is obtained. .

[0206] For each node, static features including elevation, node type, and DMA number are constructed; for each pipe segment, static features including pipe diameter, pipe length, material, roughness coefficient, and pipe age are constructed.

[0207] Based on the DMA or pressure zoning information provided by the water supply company, each node and each pipe segment is labeled with its respective zoning, resulting in a set of node zoning and a set of pipe segment zoning, which are used for subsequent zoning-level aggregation and multi-scale prediction.

[0208] (3) Spatiotemporal feature construction module

[0209] Please see the appendix Figure 4 The spatiotemporal feature construction module is used to combine the topology with the running data to form spatiotemporal input features that can be called by the time series prediction module.

[0210] At each time step For any node Dynamic parameters such as pressure, head, inflow rate, and outflow rate are combined with static node features to form a node diagram feature; for any pipe section Dynamic quantities such as flow rate and pressure difference are combined with static characteristics of the pipe segment to form a pipe segment diagram feature.

[0211] In length Within the sliding time window, continuous The node graph features and pipe segment graph features at each time step are stacked in chronological order to obtain the spatiotemporal input feature tensor representing the operating state of the pipeline network. .

[0212] (4) Time series prediction module

[0213] Please see the appendix Figure 5 The time series prediction module includes a graph structure feature extraction unit and a time series modeling unit.

[0214] The graph structure feature extraction unit in the water supply network topology The information aggregation of nodes and their neighborhoods, pipe segments and their upstream and downstream relationships can be performed by graph convolution or message passing to obtain the spatial features of each time step.

[0215] The time series modeling unit models the spatial feature sequence of continuous time steps. It can use one-dimensional convolutional networks, recurrent neural networks, long short-term memory networks, gated recurrent units, or attention-based structures to output the spatiotemporal representation set of each node and the spatiotemporal representation set of each pipe segment for subsequent multi-scale output and physical constraint calculation.

[0216] (5) Multi-scale output module

[0217] Please see the appendix Figure 6The multi-scale output module takes the spatiotemporal representation of nodes and pipe segments as input and outputs prediction results at different spatial scales.

[0218] At the zonal scale, the spatiotemporal representations of nodes and pipe segments within the same zonal are pooled or weighted and aggregated according to a preset method to obtain a zonal comprehensive representation. The zonal-level output layer calculates indicators such as the zonal leakage rate and the proportion of non-revenue water for future prediction periods to form zonal-level leakage prediction results.

[0219] At the pipe segment scale, the spatiotemporal representation of each pipe segment is input into the risk output layer to obtain the leakage risk score and leakage occurrence probability, forming a pipe segment-level leakage risk distribution, which can be used to generate a list of high-risk pipe segments and risk level classification results.

[0220] During the training phase, the multi-scale output module can also construct a partition-pipe segment leakage coupling constraint based on the weighted sum of the partition-side predicted value and the leakage risk of each pipe segment within the partition. The corresponding multi-scale coupling loss term has been given in the invention content section and will not be elaborated here.

[0221] (6) Physical constraint calculation module

[0222] Please see the appendix Figure 7 The physical constraint calculation module verifies the conservation of node mass, the energy balance of pipe sections, and the safe pressure range of nodes based on the hydraulic principles of water supply networks.

[0223] This module substitutes the nodal head, nodal pressure, pipe flow rate, and leakage equivalents output by the time-series prediction module into the mass conservation equation, energy balance equation, and pressure range constraints to calculate the mass conservation residual, energy balance residual, and pressure exceedance, and based on these, constructs the physical constraint loss. The specific expressions for the above equations and losses have been given in detail in the invention description using formulas, and will not be repeated here.

[0224] (7) Training and Reasoning Module

[0225] In the offline phase, the training and inference modules construct a joint loss function based on historical monitoring data, zonal leakage rates, and pipe segment leakage labels to train the time series prediction module. In the online phase, the trained model is invoked to perform forward inference on newly collected data.

[0226] During the training phase, the joint loss function includes partition-level data error. Pipeline segment level data error Multi-scale coupling loss and physical constraint loss The combination of each part is clearly defined in the invention description, and the training and inference modules minimize the joint loss. Update the model parameters.

[0227] During the online phase, the training and inference module receives the latest spatiotemporal input features, outputs the partition-level leakage prediction results and the pipe section-level leakage risk indicators, and sends the results to the human-computer interaction and early warning module.

[0228] (8) Human-computer interaction and early warning interface

[0229] like Figures 9-12 As shown, the human-computer interaction and early warning interface is used to graphically display the system's multi-scale prediction results and alarm information, including a hierarchical and zonal leakage analysis dashboard, a zonal map and zonal leakage statistics interface, a list of leakage anomaly alarm records, and a comprehensive dashboard for leakage statistics and ranking. Maintenance personnel can query historical data, filter high-risk zones and segments, and view alarm processing status within the interface.

[0230] The modules mentioned above can be deployed on the same server or distributed across multiple servers and communicate via a network.

[0231] Example 3

[0232] Based on Examples 1 and 2, this embodiment provides an engineering application example of the present invention in a city water supply company to illustrate the actual deployment and usage of the present invention.

[0233] The water supply network in the main urban area of ​​a certain city includes several DMA zones and pressure zones. The monitoring system is equipped with inlet and outlet water metering points for each zone, pressure and flow monitoring points at the pump station outlets, online pressure gauges and flow meters for some key pipe sections, as well as remote water meter data for large users and key residential areas.

[0234] In this embodiment, the system deployment and operation process may include the following:

[0235] (1) Data and topology initialization

[0236] Using existing GIS pipeline network data and hydraulic models, topological modeling is performed on nodes and pipe segments within the main urban area's pipeline network. A node set V and a pipe segment set E are established, and the nodes and pipe segments are labeled according to the existing DMA (Digital Domain Name) partitioning. Parameters such as pipe diameter, pipe length, material, roughness coefficient, and pipe age are entered into a static attribute library to form the static data foundation for modeling.

[0237] (2) Model configuration

[0238] The sampling interval can be set to 15 minutes, the time window length T is 96 (corresponding to 24 hours of historical data), and the prediction time range is the zonal leakage index within the next 24 hours and the pipe section leakage risk within the next few hours.

[0239] The graph structure feature extraction unit can use several layers of graph convolutional networks, the time series modeling unit can use multi-layer LSTM or other recurrent network structures, the partition-level output head uses a regression network to output the partition leakage rate and non-revenue water ratio, and the pipe section-level output head uses a scoring or classification network to output the leakage risk score and leakage occurrence probability.

[0240] (3) Training and verification

[0241] The operational data from several consecutive months were selected as the training set. The leakage assessment results of the enterprise, manual inspection records or hydraulic simulation results were used as leakage labels for the zones and some pipe sections. The model was trained using steps S1 to S7 given in Example 2.

[0242] During training, by adjusting the weights of partition-level error, pipe segment-level error, multi-scale coupling loss, and physical constraint loss, the model achieves a balance between partition prediction accuracy, pipe segment risk identification capability, and physical rationality. A subset of data from different time periods can be reserved as a validation set to evaluate the model's generalization performance under various operating conditions.

[0243] (4) Online operation and visualization

[0244] After the model is trained, it is deployed in the water supply company's data center or cloud server and connected to the real-time monitoring data stream. The system updates the input data according to the sampling interval, executes steps S2 to S8 in Example 2, and continuously outputs:

[0245] 1. Leakage rate prediction curves and non-revenue water statistics at the zoning level are used to generate hierarchical zoning leakage analysis dashboards and zoning statistical charts (corresponding appendices). Figure 9 Appendix Figure 10 );

[0246] 2. A heat map of leakage risk and a list of high-risk pipe sections at the pipe segment level, used to assist in scheduling detailed inspections and local pressure tests (see attached diagram). Figure 10 Appendix Figure 11 );

[0247] 3. Ranking and trend dashboards of leakage indicators for each zone and pipe section within a set statistical period, used to analyze long-term trends and formulate renovation plans (see attached document). Figure 12 ).

[0248] When the predicted leakage risk of a certain zone or pipe section exceeds a preset threshold, the system automatically generates an alarm record, highlights it in the leakage alarm list interface, and pushes the alarm information to relevant maintenance personnel. Maintenance personnel can prioritize inspections, sound detection, or local repairs of high-risk areas and high-risk pipe sections based on zone ranking and pipe section risk distribution.

[0249] Field application results show that the method and system described in this invention can detect some hidden leaks in advance, reduce the level of non-revenue water, and provide quantitative basis for formulating medium- and long-term pipeline network renovation and upgrading plans, without significantly increasing the number of field sensors, compared with the traditional method that relies solely on monthly water balance and experience-based inspections.

[0250] It should be noted that the various technical features in the above embodiments can be combined or separated in any way to form new implementation methods, provided that they do not contradict each other, and all such combinations should be considered to fall within the protection scope of this invention.

[0251] Example 4

[0252] This embodiment provides a computer device for implementing the above-described method for predicting leakage in water supply networks. The computer device includes at least one processor, a memory, and a communication interface. The memory stores a computer program that can run on the processor. When the processor executes the computer program, it is configured to: acquire basic geographic information, hydraulic model information, and operation monitoring data of the water supply network from the GIS system, SCADA system, regional metering system, and remote water meter system through the communication interface; perform topological modeling and attribute acquisition of the water supply network based on the basic geographic information and hydraulic model information, and construct time-varying graph data and spatiotemporal input features; extract graph structure features and perform time series modeling on the topological structure of the water supply network to generate spatiotemporal representations of nodes and pipe segments; output zonal-level leakage prediction results and pipe segment-level leakage risk indicators based on the spatiotemporal representations; and construct a joint loss function based on hydraulic constraints such as the mass conservation equation, energy balance equation, and pressure safety range to train or update the prediction model, and output the obtained leakage prediction results and risk indicators to the human-computer interaction and early warning module for assisting operation management and maintenance decisions, thereby realizing the water supply network leakage prediction method described in Example 1.

[0253] Example 5

[0254] This embodiment provides a computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program causes the processor to perform the method for predicting water supply network leakage of Embodiment 1. The computer-readable storage medium can be any of the media capable of storing program code, such as a read-only memory, a disk, an optical disk, a memory card, flash memory, or a solid-state drive.

Claims

1. A method for predicting leakage in a water supply network, comprising the following steps: S1: Model the network nodes and pipe segments as a graph topology and assign static properties to the nodes and pipe segments; S2: Collect water supply network operation data at preset time intervals, and construct time-varying graph data according to the sliding time window and the graph topology; S3: Preprocess the time-varying graph data and combine it with static attributes to form spatiotemporal input features; S4: Based on the deep learning framework, a graph time series prediction model is constructed. Under the topological constraints of the water supply network, the graph structure features of the nodes and pipe segments at each time step are extracted. By aggregating information of each node and its neighborhood, each pipe segment and its upstream and downstream nodes and adjacent pipe segments, the spatial features of the nodes and pipe segments are obtained respectively. The spatial feature sequences of each time step are input into the time series modeling unit to perform time modeling and extract the dynamic change patterns of the operating state; the output is a set of spatiotemporal representations of nodes and pipe segments containing spatial topology information and temporal dynamic information. S5: Conduct a comprehensive assessment and trend analysis of the leakage levels of each DMA or pressure zone; S6: Generates the spatial distribution of pipe segment leakage risk and the set of high-risk pipe segments to provide a location basis for inspection and maintenance; S7: Construct a joint loss function, and train and update the graph time series prediction model by minimizing the joint loss function; S8: Input the real-time collected operation data into the trained graph time series prediction model to generate online the predicted leakage rate of each partition and the leakage risk index of each pipe segment for leakage prediction and operation and maintenance decision-making.

2. The method for predicting leakage in a water supply network as described in claim 1, characterized in that, Step S1 includes: S1-1: Model the nodes of the water supply network as graph nodes, and model the pipes and hydraulic components connecting each node as graph edges to obtain the initial topology of the water supply network. S1-2: Assign static properties to each node and pipe segment; S1-3: Based on the DMA partitioning or pressure partitioning information provided by the water supply company, each node and pipe segment is labeled with the corresponding partition index to obtain the node partition set and pipe segment partition set, which are used for subsequent partition-level prediction and aggregation.

3. The method for predicting leakage in a water supply network as described in claim 1, characterized in that, Step S2 includes: S2-1: Collect operational monitoring data for each node and each pipe segment at preset time intervals; for any time step and node, collect node pressure, node head and other operational data; for any pipe segment, collect pipe segment flow rate, upstream and downstream pressure difference and other operational data. S2-2: Organize the operational data collected in chronological order into sliding time windows, construct node measurement sequences and pipe segment measurement sequences for each time window, and establish a correspondence with the topology given in step S1 to obtain the time-varying map data within that time window; S2-3: Spatiotemporal input feature construction and preprocessing, used to combine running data with static attributes to form spatiotemporal features that can be input into the prediction model.

4. The method for predicting leakage in a water supply network as described in claim 1, characterized in that, Step S3 includes: S3-1: Perform missing value imputation, outlier identification and removal, unit unification and numerical normalization on the running data in the time-varying graph data; S3-2: At each time step, for any node and pipe segment, its dynamic measurement values ​​are used to form a node dynamic feature vector, which is then concatenated with the static features to obtain the node graph features and pipe segment graph features. S3-3: Stack the node graph features and pipe segment graph features of each time step within the time window in chronological order to obtain the spatiotemporal input feature tensor that characterizes the operating status of the water supply network within the time window.

5. The method for predicting leakage in a water supply network as described in claim 1, characterized in that, The graph time series prediction model described in step S4 includes a graph structure feature extraction module, a time series modeling module, a partition-level output module, and a pipe segment-level output module. The graph structure feature extraction module aggregates information on each node and its neighborhood, and each pipe segment and its upstream and downstream relationships under the topological constraints of the water supply network to obtain the spatial features of each time step. The time series modeling module takes the spatial feature sequence arranged in chronological order as input, models the time dependency relationship, and generates a shared spatiotemporal representation of each node and each pipe segment. The partition-level output module pools or weights the shared spatiotemporal representations belonging to the same DMA or pressure partition to predict the partition-level leakage rate and non-revenue water ratio of each partition; the pipe-segment-level output module predicts the pipe-segment-level leakage index based on the shared spatiotemporal representation of each pipe segment to characterize the leakage risk of each pipe segment in the future period.

6. The method for predicting leakage in a water supply network as described in claim 1, characterized in that, Step S5 includes: S5-1: Pool and aggregate the spatiotemporal representations of the nodes and pipe segments of the partition to obtain the partition comprehensive spatiotemporal representation vector; S5-2: Input the partition integrated spatiotemporal representation vector into the partition-level output layer, predict the indicators used to characterize the leakage level of the corresponding partition in the future preset time steps, and obtain the partition leakage rate prediction value by using a linear layer or multi-layer sensing mechanism to form the partition-level leakage prediction result.

7. The method for predicting leakage in a water supply network as described in claim 1, characterized in that, Step S6 includes: S6-1: Input the spatiotemporal representation of each pipe segment into the risk output layer to obtain an index that characterizes the leakage risk of each pipe segment in the future prediction period. The leakage risk score and leakage occurrence probability are obtained through one or more nonlinear transformations. S6-2: Based on the obtained leakage risk score and probability, generate the leakage risk distribution of the pipe section and output the risk heat map, the list of high-risk pipe sections, or the risk level classification results.

8. The method for predicting leakage in a water supply network as described in claim 1, characterized in that, The joint loss function in step S7 includes data errors obtained from the zonal-level leakage index and the pipe segment-level leakage index, multi-scale coupling errors used to constrain the conservation relationship between the total leakage of each zonal and the weighted sum of the leakage indices of each pipe segment within that zonal, and physical constraint residuals calculated based on hydraulic constraints including mass conservation, energy balance, and pressure safety intervals.

9. The method for predicting leakage in a water supply network as described in claim 8, characterized in that, Step S7 includes: S7-1: Establish a mass conservation equation for each node to obtain the mass conservation relationship; establish an energy balance equation for each pipe segment; set allowable pressure ranges for each node; S7-2: Substitute the node head, node pressure, pipe flow rate and related leakage equivalents obtained in step S4 into the above equation to calculate the node flow balance residual, pipe energy balance residual and pressure over-limit. S7-3: Based on the zone leakage rate annotation data and pipe segment leakage annotation data given in historical data or simulation data, calculate the zone-level leakage prediction error and the pipe segment-level leakage risk prediction error, and construct the zone-pipe segment leakage coupling error to form a data error term; The leakage risk indicators of the pipe segments in the zone are weighted and summed according to preset weights to obtain the zone leakage indicators derived from the pipe segment side. By using the zone-segment leakage coupling constraint, the total leakage prediction at the zone scale is numerically consistent with the leakage risk prediction of each segment within the zone, thereby explicitly linking the results of the two spatial scales during the training process. S7-4: The partition-level data error, pipe segment-level data error, multi-scale coupling error, and physical constraint residual term are weighted and combined according to preset weights to form a joint loss function. This joint loss function is used to train and update the parameters of the graph structure time series prediction model, so that the model can meet hydraulic constraints while fitting historical data, and maintain the consistency of leakage between the partition scale and the pipe segment scale.

10. The method for predicting leakage in a water supply network as described in claim 1, characterized in that, Step S8 includes: S8-1: During the operation of the water supply network, new operational data are continuously collected, new time windows are constructed on a rolling basis, and S2 to S3 are repeatedly executed to construct the latest spatiotemporal input feature tensor. S8-2: Input the latest spatiotemporal input features into the trained prediction model, and perform graph structure feature extraction, time series modeling, and multi-scale output according to steps S4 to S6 to obtain the predicted leakage rate of each partition and the leakage risk score and leakage probability of each pipe segment. S8-3: Based on the predicted leakage rate of the zoning area and the leakage risk index of the pipe section, generate a zoning leakage analysis report, a pipe section risk heat map and early warning information, and provide prompts for high-risk zoning areas and high-risk pipe sections to assist in operation management and maintenance decisions.

11. A system for implementing the method for predicting leakage in a water supply network as described in claim 1, characterized in that, include: The data acquisition module is used to interact with the existing information system of the water supply company to obtain basic geographic information, hydraulic model information and operation monitoring data of the water supply network; The topology modeling module, based on the data acquisition module, abstracts water plants, pumping stations, water tanks, regulating water tanks, ordinary pipe network nodes, valves and pipes into graph nodes and graph edges, and constructs a water supply network topology model with node attributes and edge attributes, providing a structural foundation for subsequent spatiotemporal modeling; The spatiotemporal feature construction module is used to associate the water supply network topology model with the operation monitoring data, construct time-varying map data at preset time intervals, and form spatiotemporal input features that can be called by the time series prediction module. The time series prediction module is built on the water supply network topology and is used to aggregate spatial information and model time series of spatiotemporal input features, and extract the spatiotemporal representation of each node and each pipe segment. The multi-scale output module maps the spatiotemporal representation of nodes and pipe segments to prediction results at different spatial scales. On the one hand, it outputs the leakage rate prediction of DMA or pressure zone, and on the other hand, it outputs the leakage risk prediction at the pipe segment level, realizing multi-scale leakage prediction from zone to pipe segment. The physical constraint calculation module is used to verify the intermediate variables and prediction results output by the time series prediction module based on the mass conservation equation, energy balance equation and hydraulic constraints of the pressure safety zone of the water supply network, and to calculate the corresponding physical constraint residuals. The training and inference module constructs a joint loss based on historical data and physical constraint residuals during the training phase to update the parameters of the time series prediction module. During the online phase, it calls the trained model to perform forward inference on the newly collected running data and sends the prediction results to the multi-scale output module and the human-computer interaction and early warning module.

Citation Information

Patent Citations

  • Water supply network leakage monitoring method and device based on deep learning model

    CN118705555A

  • Urban pipe network operation intelligent prediction method based on physical information graph neural network

    CN120197778A

  • Water supply network leakage locating method based on lightweight gradient elevator algorithm

    CN121112202A

  • Intelligent water service pipe network monitoring method based on Internet of Things fusion

    CN121258242A