Water supply data real-time acquisition and analysis method, device, equipment and medium
By constructing a dynamic topology diagram and machine learning model of the water supply pipeline network, the problem of insufficient multi-source data fusion analysis in the water supply system is solved, and the overall balance state quantification and early risk warning of the water supply system are realized, which improves the management efficiency and reliability of the water supply system.
Patent Information
- Application Number
- CN202510959250.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-11
- Publication Date
- 2025-09-02
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing water supply system monitoring methods lack the ability to integrate multi-source data, and it is difficult to adapt to the dynamic changes of the water supply network, resulting in the inability to accurately identify local leakage and the overall balance state of the system, resulting in insufficient lag response and risk warning.
By obtaining multi-source monitoring data of the water supply pipeline network, performing spatiotemporal alignment and spatial interpolation, building a dynamic topology map, combining the principles of fluid mechanics to calculate stability parameters, and using pre-trained machine learning models to generate system balance metric quantification indicators, realizing the quantification of the overall balance state of the water supply system and early risk warning.
It realizes dynamic adaptive modeling of multi-source real-time data of the water supply system, accurately quantifies the overall balance state, can timely identify potential risks, reduce fault response time, and improve the management efficiency and reliability of the water supply system.
Smart Images

Figure CN120579461A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of water supply data analysis, and in particular relates to a method, device, equipment and medium for real-time collection and analysis of water supply data. Background Art
[0002] With the development of smart water management technologies, IoT-based real-time data collection has emerged in the field of water supply system monitoring. By deploying pressure sensors, flow meters, and other devices at key nodes in the pipeline network, remote monitoring of parameters such as water supply volume and pipeline pressure has been achieved. This has given rise to traditional monitoring methods that rely primarily on threshold alarms. Traditionally, the assessment of water supply system operating status relies primarily on the independent analysis of a single type of sensor data (such as pressure data alone). When a parameter exceeds a preset fixed threshold, an alarm is triggered. Staff then use their experience to determine whether the system is out of balance.
[0003] However, the current monitoring methods have obvious limitations. Due to the wide spatial distribution of the water supply network and the dynamic changes in water use patterns over time, the traditional fixed threshold method is difficult to adapt to the actual demand changes in different regions and different time periods. For example, pressure fluctuations during the peak water use period in summer may be misjudged as a fault, while real local leaks are ignored because they do not reach the global threshold. More importantly, the overall balance of the system is affected by the synergy of multiple variables, but existing technologies lack the ability to integrate and analyze multi-source data such as pressure, flow, and water quality. Especially when data collection is time-asynchronous and partially missing, it is impossible to construct quantitative indicators that reflect the overall stability of the system. This leads to a serious lag in the identification of hidden imbalances in the pipeline network (such as persistent water pressure in some areas but no single-point alarm is triggered). Staff can often only respond passively after user complaints, making it difficult to achieve early risk warnings and proactive regulation. Summary of the Invention
[0004] Based on this, it is necessary to provide a real-time water supply data collection and analysis method, device, equipment and medium to address the above technical problems. It can accurately quantify the overall balance state of the water supply system through dynamic adaptive modeling that integrates multi-source real-time data to achieve early risk warning.
[0005] In a first aspect, the present application provides a method for real-time collection and analysis of water supply data, comprising:
[0006] Acquire multi-source monitoring data of the water supply network, perform spatiotemporal alignment and spatial interpolation on the multi-source monitoring data, and obtain a water supply dataset;
[0007] According to the topological structure of the water supply network, the water supply dataset is mapped into a dynamic topological graph, where the dynamic topological graph contains node attributes, edge attributes, and real-time pressure and flow data;
[0008] According to the dynamic topology diagram, the stability parameters of each node are calculated based on the principles of fluid mechanics;
[0009] The dynamic topology map and stability parameters are input into the pre-trained machine learning model to generate quantitative indicators of system balance, which are used to characterize the operational stability of the water supply network.
[0010] In one embodiment, multi-source monitoring data of a water supply network is obtained, and spatiotemporal alignment and spatial interpolation are performed on the multi-source monitoring data to obtain a water supply dataset, including:
[0011] Perform integrity check on multi-source monitoring data to obtain data missing nodes, where multi-source monitoring data includes original pressure data, original flow data, and original water consumption data;
[0012] Obtain the historical pressure values and flow fluctuation patterns of the topologically adjacent nodes of the data-missing nodes in the same time period;
[0013] Based on historical pressure values and flow fluctuation patterns, a spatial correlation weight matrix is constructed using the spatiotemporal kriging algorithm, and missing data estimates are generated through weighted calculations.
[0014] Acquire meteorological temperature data and perform physical compensation calculations on the flow values of open-air pipelines in the multi-source monitoring data based on a preset fluid thermal expansion coefficient to obtain physical compensation data. Open-air pipelines are pipelines in the water supply network that are not buried underground.
[0015] The missing data estimates and physical compensation data were integrated into the multi-source monitoring data to obtain the water supply dataset.
[0016] In one embodiment, mapping a water supply dataset into a dynamic topology graph based on the topology of a water supply network includes:
[0017] By parsing the GIS database of the water supply network, the topological connection relationship between nodes is extracted to obtain the topological structure, where the nodes in the topological structure correspond to pipeline intersections or monitoring equipment locations, and the edges correspond to physical pipeline segments.
[0018] Map the real-time pressure data in the water supply dataset as node attributes, and map the real-time flow data in the water supply dataset as attributes of the associated edges;
[0019] Extract node attribute sets from the pipeline network asset database, including pipe diameter, elevation, and valve open / close status;
[0020] Extract edge attribute sets from the pipe network asset database, including pipe length, pipe diameter, and roughness coefficient;
[0021] The graph structure data of the dynamic topology graph is constructed by integrating the topology structure, node attribute set, edge attribute set, real-time pressure data and real-time flow data.
[0022] In one embodiment, the stability parameters of each node are calculated based on the dynamic topology graph and the principles of fluid mechanics, including:
[0023] Based on the difference in altitude between each target node and its adjacent nodes, the pressure maintenance capacity parameter of each target node relative to its adjacent nodes is calculated according to real-time pressure data;
[0024] Extract the real-time flow rate and pipe diameter of all edges connected to the target node based on the edge attribute set;
[0025] Determine the flow direction based on the topological attributes of the target node in the edge and calculate the deviation rate between the total inflow and the total outflow;
[0026] When the deviation rate exceeds the preset threshold, the historical operating condition database is called to obtain an alternative flow value that matches the current meteorological conditions and water use pattern, and the deviation rate is recalculated based on the alternative flow value;
[0027] The pressure maintenance capacity parameter and the deviation rate are integrated to generate the stability parameter through a nonlinear mapping function.
[0028] In one embodiment, the method for training a machine learning model includes:
[0029] Obtain a sample set of historical water supply network dynamic topology diagrams and corresponding system balance status labels;
[0030] A hierarchical graph neural network model is constructed. The first layer is trained using a physical constraint loss function to learn the fluid dynamics characteristics of the pipeline network, and the second layer is trained using a spatiotemporal attention mechanism to capture the sudden changes in regional water use patterns.
[0031] A fault sample weighting strategy is used to optimize the parameters of the hierarchical graph neural network model, assigning triple loss weights to pipe burst and sustained low pressure event samples;
[0032] The topology of the water supply network is adapted based on the transfer learning algorithm to obtain a trained machine learning model.
[0033] In a second aspect, the present application also provides a device for real-time collection and analysis of water supply data, comprising:
[0034] The data preprocessing module is used to obtain multi-source monitoring data of the water supply network and perform spatiotemporal alignment and spatial interpolation on the multi-source monitoring data to obtain a water supply dataset;
[0035] A topology construction module is used to map the water supply dataset into a dynamic topology graph based on the topological structure of the water supply network, where the dynamic topology graph contains node attributes, edge attributes, and real-time pressure and flow data;
[0036] The node stability calculation module is used to calculate the stability parameters of each node based on the dynamic topology diagram and the principles of fluid mechanics;
[0037] The balance analysis module is used to input the dynamic topology map and stability parameters into the pre-trained machine learning model to generate quantitative indicators of system balance. The quantitative indicators of system balance are used to characterize the operational stability of the water supply network.
[0038] In a third aspect, the present application also provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned method for real-time collection and analysis of water supply data when executing the computer program.
[0039] In a fourth aspect, the present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned method for real-time collection and analysis of water supply data is implemented.
[0040] The above-mentioned real-time water supply data collection and analysis method, device, equipment and medium obtain multi-source monitoring data of the water supply network and perform spatiotemporal alignment and interpolation to form a complete water supply data set. The water supply data set is mapped into a dynamic topological graph containing node attributes, edge attributes, and real-time pressure and flow data using the topological structure of the water supply network. Based on the principles of fluid mechanics, the stability parameters of each node are calculated, and the dynamic topological graph and stability parameters are input into a pre-trained machine learning model to generate a system balance quantification indicator for characterizing the operational stability of the water supply network. Through the above-mentioned technical solution, dynamic adaptive modeling of multi-source real-time data can be achieved, thereby accurately quantifying the overall balance state of the water supply system and realizing early risk warning, effectively solving the technical problems in existing technologies such as the difficulty in adapting to dynamic changes, the lack of multi-source data fusion analysis, and the inability to quantify the overall stability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0042] Figure 1 A flow chart of a method for real-time collection and analysis of water supply data provided by an embodiment of the present invention;
[0043] Figure 2 A schematic structural diagram of a device for real-time collection and analysis of water supply data provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0045] First, a brief introduction is given to the terms involved in the embodiments of this application.
[0046] The water supply network is a critical infrastructure for transporting and distributing water resources in urban and industrial areas. It comprises a series of pipelines, valves, pumping stations, water towers, and monitoring equipment, transporting water from the source or treatment plant to each user. The design and operation of the water supply network must comprehensively consider the temporal and spatial variations in water pressure, flow, water quality, and user demand to ensure a stable supply and efficient distribution of water resources. With the development of smart water technology, intelligent monitoring and management of the water supply network has become a key approach to improving the safety and reliability of water supply systems.
[0047] Machine learning, a core branch of artificial intelligence, refers to the technology by which computer systems automatically learn patterns and patterns from data through algorithms, improving performance and making predictions or decisions without explicit programming. Essentially, it allows machines to leverage experience (data) to optimize task performance. It is broadly categorized into supervised learning (predictions based on labeled data), unsupervised learning (exploring the inherent structure of unlabeled data), and reinforcement learning (optimizing strategies through interactive feedback from the environment).
[0048] Spatio-Temporal Kriging is a geostatistical method for interpolating spatiotemporal data. It is used to estimate and predict data with temporal and spatial correlation. It builds on the traditional Kriging method by extending the spatial domain to the spatiotemporal domain, while also accounting for the temporal and spatial correlation of data. Spatio-Temporal Kriging is widely used in fields such as meteorology, environmental science, and water resources management, such as air quality monitoring, rainwater modeling, and groundwater modeling, and effectively addresses the interpolation and prediction of spatiotemporal data.
[0049] Based on the above explanations, the implementation environment of a method for real-time water supply data collection and analysis provided in an embodiment of the present application is described. Schematically, the implementation environment includes: a sensor, a terminal, and a processor. The sensor can be connected to the terminal via a signal acquisition module, the terminal communicates with the processor via a data bus, and the processor integrates a storage module and an algorithm calculation unit. The sensor can include a pressure sensor, an electromagnetic flowmeter, a smart water meter, a multispectral water quality sensor, a pipe wall temperature sensor, etc. The processor can be a central processing unit, an artificial intelligence chip, or a multi-core processor, without limitation here.
[0050] In combination with the above explanations of terms and implementation environments, the application scenarios of the embodiments of this application are explained. The real-time water supply data collection and analysis method provided in the embodiments of this application can be applied to, but not limited to, the following scenarios:
[0051] In the field of urban water supply network monitoring, the real-time collection and analysis method of water supply data of this application can effectively improve the operation and management level of the water supply system. By deploying a variety of sensors at key nodes of the pipeline network, such as pressure sensors, flow meters and water quality sensors, the pipeline network operation data is collected in real time. After time-space alignment and spatial interpolation processing, these data form a complete water supply data set, and are further mapped into a dynamic topology map, which intuitively reflects the operation status of the pipeline network. Based on the dynamic topology map and stability parameters, the pre-trained machine learning model is used to generate quantitative indicators of system balance, which can evaluate the overall stability of the pipeline network in real time. This method can help urban water supply management departments to promptly detect potential pipeline problems, such as local leaks or pressure anomalies, so as to take measures in advance to avoid the impact of water supply interruptions or water quality problems on residents' lives.
[0052] In industrial water systems, the real-time water supply data collection and analysis method of this application can accurately quantify the overall balance state of the industrial water supply system by integrating multi-source monitoring data. By analyzing the dynamic topology of the water supply network and combining the stability parameters calculated by fluid mechanics principles, the system can monitor the pressure, flow and water quality changes of industrial water in real time, and quickly identify potential water supply risks through quantitative indicators generated by machine learning models. This enables industrial users to adjust water use strategies in a timely manner during the production process, optimize water supply scheduling, ensure a stable supply of production water, reduce the risk of production interruptions due to water supply problems, and improve the continuity and efficiency of industrial production.
[0053] In the integrated application of the smart water platform, the real-time collection and analysis method of water supply data of this application collects multi-source monitoring data of the water supply network in real time and performs spatiotemporal alignment processing. This method can generate accurate dynamic topology maps and quantitative indicators of system balance, and seamlessly integrate them into the smart water platform. Water management personnel can intuitively monitor the operating status of the entire water supply system through the platform and realize intelligent management of the water supply network. This method not only improves the management efficiency of the water supply system, but also reduces maintenance costs and user complaints caused by network failures through early risk warning functions, improves the quality and reliability of water services, and promotes the development of smart water services.
[0054] In an exemplary embodiment, Figure 1 As shown, a method for real-time collection and analysis of water supply data is provided. This embodiment uses the method applied to a terminal in the aforementioned implementation environment as an example for illustration. It is understandable that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps 101 to 104:
[0055] Step 101: Acquire multi-source monitoring data of the water supply network, and perform spatiotemporal alignment and spatial interpolation on the multi-source monitoring data to obtain a water supply dataset.
[0056] Specifically, multi-source monitoring data can be various types of sensors deployed in the water supply network, including but not limited to pressure sensors, flow meters, water quality sensors, and liquid level sensors. These sensors can be installed at key nodes in the water supply network, such as pump stations, valves, and user terminals, to collect parameters such as pressure, flow, water quality, and liquid level in real time during the operation of the network. Since the sampling frequencies and timestamps of different sensors may be inconsistent, and the spatial distribution of sensors may also be uneven, it is necessary to perform spatiotemporal alignment and spatial interpolation processing on these multi-source monitoring data. For example, spatiotemporal alignment can be achieved through a time synchronization algorithm, such as using timestamp calibration technology to unify the data collected by different sensors to the same time base, thereby ensuring the consistency of the data in the time dimension. For spatial interpolation, the Kriging algorithm or spline interpolation method can be used to fill the blank areas between sensor collection points to generate a complete water supply dataset. Through this processing step, the resulting water supply dataset can comprehensively and accurately reflect the real-time operating status of the water supply network, providing a reliable data foundation for subsequent analysis and modeling.
[0057] Step 102 : Mapping the water supply dataset into a dynamic topology graph according to the topology of the water supply network, wherein the dynamic topology graph includes node attributes, edge attributes, and real-time pressure and flow data.
[0058] Specifically, the topology of a water supply network refers to the spatial layout and connectivity between each node in the network (such as water sources, pumping stations, user terminals, valves, etc.) and the pipelines connecting these nodes. A dynamic topology map, based on the physical layout of the water supply network, represents each node and connected pipeline as nodes and edges in the map. During the mapping process, the dynamic topology map not only contains the basic attributes of the nodes and edges, but also integrates real-time monitoring data such as pressure and flow. For example, node attributes may include node type, location coordinates, and the number of connected pipelines, while edge attributes may include information such as pipeline length, diameter, and material. Real-time pressure and flow data is collected by sensors and dynamically updated to the topology map after spatiotemporal alignment and spatial interpolation. By mapping the water supply dataset onto the dynamic topology map, this method can intuitively display the overall structure and real-time operating status of the water supply network, providing a visual foundation for subsequent analysis and modeling. For example, the dynamic topology map allows technicians to quickly identify areas of abnormal pressure or flow fluctuations in the network, allowing them to take timely measures for adjustment and optimization.
[0059] Step 103 : Calculate the stability parameters of each node based on the dynamic topology diagram and the principles of fluid mechanics.
[0060] Specifically, the principles of fluid mechanics provide a theoretical basis for analyzing water flow in water supply networks. By combining node and edge attributes in a dynamic topology graph with real-time pressure and flow data, parameters such as pressure stability and flow stability can be calculated for each node. For example, pressure stability can be assessed by analyzing the range, frequency, and duration of pressure fluctuations at a node, while flow stability can be determined by calculating the rate of change, frequency, and duration of flow. These stability parameters quantify the operating status of each node, providing key indicators for subsequent system balance assessments. For example, by calculating the pressure stability and flow stability parameters of a pumping station node in a water supply network, it is possible to determine whether the pumping station can stably supply water downstream under current operating conditions. If large pressure fluctuations or unstable flow are detected, the pumping station's operating parameters can be adjusted promptly to ensure water supply stability. By incorporating the principles of fluid mechanics, this method can more accurately assess the operational stability of each node in the water supply network, unlike traditional assessment methods that rely solely on single parameter thresholds, thus providing a scientific basis for the refined management of water supply systems.
[0061] In step 104, the dynamic topology map and the stability parameters are input into a pre-trained machine learning model to generate a quantitative index of system balance, which is used to characterize the operational stability of the water supply network.
[0062] Specifically, by learning from extensive historical data and expert experience, machine learning models can identify the complex relationships between various parameters in the water supply network and output a quantitative indicator that comprehensively reflects the stability of the water supply network's operation. For example, this quantitative indicator can be a value between 0 and 1, with higher values indicating more stable network operation. Machine learning models can be implemented using a variety of algorithms, such as support vector machines (SVMs), neural networks, and random forests. During model training, historical monitoring data and known network operating conditions can be used as training samples. Model parameters are then adjusted through optimization algorithms to improve the model's prediction accuracy. By inputting dynamic topology maps and stability parameters into the machine learning model, this method can comprehensively consider multi-source data and multiple stability parameters, avoiding the limitations of traditional fixed threshold methods and enabling dynamic assessment of the overall balance state of the water supply network. Furthermore, when the quantitative indicator of system balance falls below a preset threshold, an early warning mechanism can be triggered, alerting management personnel to promptly inspect and address potential network issues, thereby preventing further deterioration. This quantitative indicator not only reflects the network's operational status in real time but can also be used to guide optimized scheduling and maintenance decisions for the water supply network.
[0063] The above-mentioned real-time water supply data collection and analysis method obtains multi-source monitoring data from the water supply network and performs spatiotemporal alignment and interpolation to form a complete water supply data set. Utilizing the topological structure of the water supply network, the water supply data set is mapped into a dynamic topological graph containing node attributes, edge attributes, and real-time pressure and flow data. Based on the principles of fluid mechanics, the stability parameters of each node are calculated. The dynamic topological graph and stability parameters are then input into a pre-trained machine learning model to generate a quantitative indicator of the system balance used to characterize the operational stability of the water supply network. Through the above-mentioned technical solution, dynamic adaptive modeling of multi-source real-time data can be achieved, thereby accurately quantifying the overall balance state of the water supply system and achieving early risk warnings. This effectively solves the technical problems of existing technologies, such as the difficulty in adapting to dynamic changes, the lack of multi-source data fusion analysis, and the inability to quantify the overall stability of the system.
[0064] In one embodiment, multi-source monitoring data of a water supply network is obtained, and spatiotemporal alignment and spatial interpolation are performed on the multi-source monitoring data to obtain a water supply dataset, including:
[0065] Perform integrity check on multi-source monitoring data to obtain data missing nodes, where multi-source monitoring data includes original pressure data, original flow data, and original water consumption data;
[0066] Obtain the historical pressure values and flow fluctuation patterns of the topologically adjacent nodes of the data-missing node in the same time period.
[0067] Specifically, multi-source monitoring data includes raw pressure data, raw flow data, and raw water consumption data. This data is collected in real time by various sensors distributed throughout the water supply network. The purpose of integrity testing is to identify whether there are missing nodes in the data, that is, when certain sensors fail to collect data properly or when data is lost during transmission. For example, by checking the time series continuity of the data, it is possible to detect the absence of pressure or flow data within a specific time period. The results of the integrity test determine the specific node locations where the data is missing, providing a basis for further data processing.
[0068] Based on the historical pressure values and flow fluctuation patterns, a spatial correlation weight matrix was constructed using the spatiotemporal Kriging algorithm, and missing data estimates were generated through weighted calculations.
[0069] Specifically, based on the topology of the water supply network, the adjacent nodes of each missing data node are identified. The pressure values and flow fluctuation patterns of these adjacent nodes within the same time period are then extracted from the historical database. For example, if pressure data for a node is missing, the pressure change trend and fluctuation range of its adjacent nodes within a similar time period can be found. Flow fluctuation patterns can be obtained by analyzing the temporal changes in the flow data of adjacent nodes. This historical data provides a reference for subsequent missing data estimation.
[0070] Meteorological temperature data is obtained, and physical compensation calculations are performed on the flow values of open-air pipelines in the multi-source monitoring data based on a preset fluid thermal expansion coefficient to obtain physical compensation data, wherein the open-air pipelines are pipelines that are not buried in the water supply network.
[0071] Specifically, open-air pipelines are affected by solar radiation, and the pipe wall temperature is significantly higher than that of buried pipe sections (the measured temperature difference can reach 25°C), causing the water volume to expand. If not compensated, the volume flow rate measured by the electromagnetic flowmeter will be inflated, leading to misjudgment of water consumption (such as misdiagnosing thermal expansion effects as pipeline leaks). Based on the principle of fluid thermal expansion, when the temperature change exceeds a preset threshold, the flow correction formula for the open-air pipe section is:
[0072] Q cal =Q raw ·[1+β(T env -T ref )]
[0073] Among them, Q cal is the physical compensation data, that is, the calibrated flow value after compensation, Q raw is the original reading of the flow sensor, β is the thermal expansion coefficient of water, T env is the real-time ambient temperature, T refFor calibration temperature (usually 20 degrees Celsius), this formula can eliminate the systematic error in volume flow measurement caused by ambient temperature changes. Through a compensation mechanism driven by physical mechanisms, it effectively solves the problem of periodic data distortion caused by day and night temperature differences in open-air pipe sections in the water supply system, avoiding the misjudgment of thermal expansion effects as real leakage or sudden changes in water consumption.
[0074] The missing data estimates and physical compensation data were integrated into the multi-source monitoring data to obtain the water supply dataset.
[0075] Specifically, the above technical solution not only fills the data missing areas through integrity verification, historical data reference, spatiotemporal Kriging algorithm estimation and physical compensation calculation, but also corrects the impact of environmental factors on measurement results, ensuring the integrity and accuracy of the water supply dataset, providing reliable data support for the refined management and analysis of the water supply network, and improving the operational stability and management efficiency of the water supply system.
[0076] In one embodiment, mapping a water supply dataset into a dynamic topology graph based on the topology of a water supply network includes:
[0077] By parsing the GIS database of the water supply network, the topological connection relationship between nodes is extracted to obtain the topological structure, where the nodes in the topological structure correspond to pipeline intersections or monitoring equipment locations, and the edges correspond to physical pipeline segments.
[0078] Specifically, the GIS database stores the geographic information and layout of the water supply network, including the location and direction of the pipelines, and the distribution of nodes. This data is usually stored in the form of geographic coordinates, which can accurately describe the spatial position relationship between each node and pipeline segment. By parsing this information, the connection relationship between each node can be determined, that is, which nodes are connected by pipelines. In the topology structure, nodes correspond to the intersection points of pipelines or the locations of monitoring equipment, while edges correspond to physical pipeline segments. For example, a typical water supply network may contain multiple water sources, multiple user terminals, and multiple valve locations. These locations are marked as nodes in the GIS database, and the pipelines connecting these nodes are marked as edges. The parsing process can be implemented using geographic information processing software or a custom parsing algorithm, resulting in a topological structure diagram containing nodes and edges. This topological structure diagram not only reflects the physical connection relationship of the pipeline network but also provides a basic framework for the subsequent construction of dynamic topology diagrams.
[0079] The real-time pressure data in the water supply dataset is mapped as node attributes, and the real-time flow data in the water supply dataset is mapped as attributes of the associated edges.
[0080] Specifically, the real-time pressure data in the water supply dataset reflects the pressure status at each monitoring point in the water supply network. This pressure data is acquired in real time by a data acquisition system and stored in a database. To map this pressure data to nodes in the topology, each sensor's collected pressure data is associated with the corresponding node based on the sensor's location information. For example, if the pressure at a monitoring point is 0.4 MPa, this pressure value is mapped to the corresponding node and becomes one of that node's attributes. Similarly, the real-time flow data in the water supply dataset reflects the flow rate of water in the pipeline. This flow data is also acquired in real time by the data acquisition system. To map this flow data to edge attributes in the topology, the flow data collected by each flow meter is associated with the corresponding pipeline segment based on the meter's location information. For example, if the flow rate of a pipeline segment is 100 cubic meters per hour, this flow value is mapped to the corresponding edge attribute. In this way, real-time pressure and flow data are integrated into the topology, enabling the dynamic topology map to reflect the operating status of the water supply network in real time. This mapping process can be implemented using data processing software or a customized data mapping algorithm to ensure data accuracy and real-time performance.
[0081] Extract the node attribute set of the node from the pipeline network asset database, including pipe diameter, altitude, and valve opening and closing status.
[0082] Extract edge attribute sets from the pipe network asset database, including pipe length, pipe diameter, and roughness coefficient.
[0083] Specifically, the network asset database stores detailed attribute information of each node in the water supply network. This information is usually recorded during the construction and maintenance of the network and stored in the database. For example, for a pipeline intersection, its node attribute set may include the diameter of the pipe at the intersection, the altitude of the node, and the open or closed state of the valve at the node (such as fully open or half open); for a section of pipeline, its edge attribute set may include the length of the pipeline section (such as 1000 meters), the diameter (such as DN200 mm), and the roughness coefficient of the pipeline (such as 0.012). By extracting these node attribute sets and edge attribute sets from the network asset database and associating them with the nodes and edges in the topological structure, it is possible to provide richer node information for the dynamic topological map, thereby more comprehensively reflecting the operating characteristics of the water supply network.
[0084] The graph structure data of the dynamic topology graph is constructed by integrating the topology structure, node attribute set, edge attribute set, real-time pressure data and real-time flow data.
[0085] Specifically, the graph structure data of the dynamic topology is constructed by integrating topological connectivity, node attribute sets, edge attribute sets, and real-time pressure and flow data. For example, an adjacency matrix can be used to store node connectivity, and an attribute matrix can be used to store multivariate parameters. An incremental update interface is designed: when new monitoring data is received every 5 seconds, only the changed values are updated rather than the entire graph being reconstructed. This dynamic topology forms a digital mirror of the pipeline network operation, supporting real-time queries on the pressure at any node and the flow status of its associated edges.
[0086] In one embodiment, the stability parameters of each node are calculated based on the dynamic topology graph and the principles of fluid mechanics, including:
[0087] Based on the difference in altitude between each target node and its adjacent nodes, the pressure maintenance capacity parameter of each target node relative to its adjacent nodes is calculated according to real-time pressure data;
[0088] Extract the real-time flow rate and pipe diameter of all edges connected to the target node based on the edge attribute set;
[0089] Determine the flow direction based on the topological attributes of the target node in the edge and calculate the deviation rate between the total inflow and the total outflow;
[0090] When the deviation rate exceeds the preset threshold, the historical operating condition database is called to obtain an alternative flow value that matches the current meteorological conditions and water use pattern, and the deviation rate is recalculated based on the alternative flow value;
[0091] The pressure maintenance capacity parameter and the deviation rate are integrated to generate the stability parameter through a nonlinear mapping function.
[0092] Specifically, the nodes in the water supply network (such as pipeline intersections, monitoring points, etc.) need to maintain a certain pressure to ensure the normal delivery of water. Due to the different altitudes of the nodes, the pressure maintenance capacity will be affected by the gravity head. Therefore, by analyzing the altitude difference and real-time pressure data between the target node and its adjacent nodes, the pressure maintenance capacity of the target node can be evaluated. For example, the pressure maintenance capacity parameter can be calculated based on Bernoulli's law of conservation of energy to reflect the compressive toughness of the node in the fluctuation of the pipeline network. For the target node and its adjacent nodes, the relative pressure potential energy difference is calculated based on the real-time pressure data and altitude. The specific formula is as follows:
[0093]
[0094] Among them, α v is the pressure maintenance capability parameter, P v 、H v are the real-time pressure value and altitude of the target node, P u 、H uare the real-time pressure value and altitude of the adjacent nodes, ρ is the water density, g is the acceleration of gravity, and N is the number of adjacent nodes. This formula can quantify the ability of the target node to maintain pressure stability. For example, when α v When >1.2, it indicates that the target node has the ability to maintain a significant high-voltage difference.
[0095] Furthermore, flow is one of the key parameters for evaluating the operating status of a water supply network. By extracting the real-time flow values and pipe diameters of all edges (pipe segments) connected to the target node, the flow in and out of the target node can be analyzed, and its flow balance state can be evaluated. The real-time flow values and pipe diameters of all edges connected to the target node are extracted from the edge attribute set of the dynamic topology graph. These data can be obtained from the real-time monitoring system and stored in the edge attributes of the dynamic topology graph. The nodes in the water supply network need to maintain a balance of flow, that is, the flow flowing into the node should be equal to the flow flowing out of the node. Therefore, by calculating the deviation rate between the total inflow and the total outflow, the flow balance state of the target node can be evaluated. For example, the flow direction of each edge is determined based on the topological attributes in the dynamic topology graph. The topological attributes define the direction of water flow in the pipeline and are usually determined by the design and operating status of the pipeline network. For example, if the target node is a water diversion point, the flow direction of the flow flowing into the node is from the upstream pipeline to the target node; the flow direction of the flow flowing out of the node is from the target node to the downstream pipeline. Add the real-time flow values of all edges flowing into the target node to get the total inflow; add the real-time flow values of all edges flowing out of the target node to get the total outflow. Calculate the deviation rate between the total inflow and total outflow to evaluate the flow balance status of the target node. The calculation formula for the deviation rate is as follows:
[0096]
[0097] Where γ is the deviation rate. When the deviation rate exceeds the preset threshold, it indicates that the flow balance is abnormal. At this time, the historical operating condition database is called to match the current meteorological conditions (temperature, humidity) and water usage patterns (such as holiday peaks) to obtain the historical flow replacement value for the same node and the same period. The stability parameter is generated by fusing the parameters through the following nonlinear mapping function:
[0098]
[0099] Here, σ is the stability parameter, and k1 and k2 are preset weight coefficients. This function takes the pressure maintenance capacity parameter and the deviation rate as input and outputs a parameter value that comprehensively reflects the stability of the target node. A higher value of this parameter indicates that the target node is more stable under the current operating conditions. For example, if the target node has a high pressure maintenance capacity and a low deviation rate, its stability parameter value will be high, indicating that the node is relatively stable under the current operating conditions.
[0100] In one embodiment, the method for training a machine learning model includes:
[0101] Obtain a sample set of historical water supply network dynamic topology diagrams and corresponding system balance status labels.
[0102] Specifically, a sample set of historical water supply network dynamic topology diagrams and corresponding system balance state labels are obtained. These sample sets are derived from monitoring data accumulated during the long-term operation of the water supply network, covering the network operation status under different working conditions, including normal operation, pipe burst events, and continuous low-pressure events. The system balance state label is based on the actual operation of the network in the historical data, annotated by experts or generated through preset rules, to indicate whether the system balance state of each sample is normal, slightly unbalanced, or severely unbalanced. These data provide rich learning materials for model training, enabling the model to learn the mapping relationship between the network characteristics under different working conditions and the system balance state.
[0103] A hierarchical graph neural network model is constructed. The first layer is trained through the physical constraint loss function to learn the fluid dynamic characteristics of the pipeline network, and the second layer is trained through the spatiotemporal attention mechanism to capture the mutation characteristics of regional water use patterns.
[0104] Specifically, the first-level physical constraint loss function is based on the basic principles of fluid mechanics, such as the continuity equation and the Bernoulli equation, to ensure that the pipeline network fluid dynamics characteristics learned by the model conform to the laws of physics. This enables the model to accurately capture the propagation and change patterns of physical quantities such as pressure and flow in the pipeline network. The second-level spatiotemporal attention mechanism focuses on the dynamic changes in regional water use patterns, especially the sudden changes that may occur in water use patterns during peak water use periods and weather changes. By introducing the attention mechanism, the model can automatically focus on these key changes, thereby more accurately capturing potential factors that may lead to system imbalance. This layered design not only fully utilizes physical knowledge, but also combines data-driven spatiotemporal feature learning to provide the model with more comprehensive learning capabilities.
[0105] The fault sample weighting strategy is adopted to optimize the parameters of the hierarchical graph neural network model, and triple loss weights are assigned to pipe burst and continuous low pressure event samples.
[0106] Specifically, during model training, samples labeled as burst pipes or sustained low pressure events are given three times the weight of normal samples when calculating the loss function. This allows the model to focus more on learning these critical fault events, as these events have a significant impact on the normal operation of the water supply system and may be relatively rare in actual data. By assigning higher weights, the model will work harder to learn the characteristics of these fault samples during training, thereby improving the prediction accuracy of these important events. This approach effectively addresses the data imbalance problem, enabling the model to maintain good generalization capabilities when faced with different types of samples.
[0107] The topology of the water supply network is adapted based on the transfer learning algorithm to obtain a trained machine learning model.
[0108] Specifically, the transfer learning algorithm allows the model to transfer the knowledge learned from one water supply network topology to another topology with similar characteristics but possibly different features. For example, if a model has been trained on a city’s water supply network data, when it needs to be applied to another city’s water supply network, the transfer learning algorithm can quickly adapt to the new topology by fine-tuning the model parameters without having to start training from scratch. The above technical solution uses a layered graph neural network model and a transfer learning algorithm to accurately predict the equilibrium state of the water supply network system. It not only improves the model’s ability to predict key fault events, but also enhances the model’s adaptability and generalization capabilities through transfer learning, enabling it to quickly adapt to water supply networks with different topologies, providing strong technical support for the intelligent management and fault warning of water supply networks, and significantly improving the operating efficiency and reliability of the water supply system.
[0109] In summary, the real-time collection and analysis method of water supply data provided by this application obtains multi-source monitoring data collected by pressure sensors, flow meters and smart water meters in the water supply network, and generates a standardized water supply data set through spatiotemporal alignment and spatial interpolation processing; based on the GIS topological structure of the pipe network, the data set is mapped into a dynamic topological map that integrates static attributes (pipe diameter, elevation) and dynamic parameters (real-time pressure, flow); and then the stability parameters of each node are calculated according to the principles of fluid mechanics, wherein the pressure maintenance capacity is quantified by the Bernoulli equation, and abnormal data is corrected by combining flow continuity verification and historical operating condition substitution mechanism; the dynamic topological map and stability parameters are input into the pre-trained machine learning model, and the topological correlation features and pressure propagation paths are mined through the graph neural network to generate a quantitative indicator that characterizes the overall equilibrium state of the system, and based on this indicator, hierarchical warning and imbalance point positioning are realized. This technical solution can accurately quantify the overall equilibrium state of the water supply system and realize early risk warning through dynamic adaptive modeling that integrates multi-source real-time data, effectively identify potential risks in the pipe network, and take measures in advance to avoid water supply interruption or water quality problems that affect users. In addition, this method has good adaptability and generalization capabilities, and can quickly adapt to water supply networks with different topologies, significantly improving the operating efficiency and reliability of the water supply system.
[0110] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0111] Based on the same inventive concept, embodiments of the present application further provide a device 10 for real-time water supply data collection and analysis, for implementing the aforementioned method for real-time water supply data collection and analysis. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more embodiments of the device 10 for real-time water supply data collection and analysis provided below can be found in the aforementioned definition of the method for real-time water supply data collection and analysis, and will not be further elaborated here.
[0112] In an exemplary embodiment, Figure 2 As shown, a device 10 for real-time collection and analysis of water supply data is provided, comprising:
[0113] The data preprocessing module 11 is used to obtain multi-source monitoring data of the water supply network and perform spatiotemporal alignment and spatial interpolation on the multi-source monitoring data to obtain a water supply dataset;
[0114] A topology construction module 12 is used to map the water supply dataset into a dynamic topology graph according to the topological structure of the water supply network, wherein the dynamic topology graph includes node attributes, edge attributes, and real-time pressure and flow data;
[0115] The node stability calculation module 13 is used to calculate the stability parameters of each node based on the dynamic topology diagram and the principle of fluid mechanics;
[0116] The balance analysis module 14 is used to input the dynamic topology map and stability parameters into the pre-trained machine learning model to generate a system balance quantification indicator, which is used to characterize the operational stability of the water supply network.
[0117] In one embodiment, the data preprocessing module 11 includes:
[0118] A data integrity check unit is used to perform integrity check on multi-source monitoring data to obtain data missing nodes, wherein the multi-source monitoring data includes original pressure data, original flow data and original water consumption data;
[0119] A historical data acquisition unit, used to obtain historical pressure values and flow fluctuation patterns of topologically adjacent nodes of the data-missing node in the same time period;
[0120] The spatiotemporal interpolation unit is used to construct a spatial correlation weight matrix based on historical pressure values and flow fluctuation patterns through the spatiotemporal kriging algorithm, and generate missing data estimates through weighted calculations;
[0121] A physical compensation unit is used to obtain meteorological temperature data and perform physical compensation calculations on the flow values of open-air pipelines in the multi-source monitoring data based on a preset fluid thermal expansion coefficient to obtain physical compensation data, wherein the open-air pipelines are pipelines in the water supply network that are not buried underground;
[0122] The dataset generation unit is used to integrate missing data estimation values and physical compensation data into multi-source monitoring data to obtain a water supply dataset.
[0123] In one embodiment, the topology building module 12 includes:
[0124] A topology parsing unit is used to extract the topological connection relationship between nodes by parsing the GIS database of the water supply network to obtain a topological structure, where the nodes in the topological structure correspond to pipeline intersections or monitoring equipment locations, and the edges correspond to physical pipeline segments;
[0125] A real-time data mapping unit, configured to map the real-time pressure data in the water supply dataset into node attributes, and to map the real-time flow data in the water supply dataset into attributes of associated edges;
[0126] A node attribute extraction unit is used to extract the node attribute set of the node from the pipeline network asset database, including pipe diameter, altitude, and valve opening and closing status;
[0127] An edge attribute extraction unit is used to extract edge attribute sets of edges from the pipe network asset database, including pipe length, pipe diameter and roughness coefficient;
[0128] The graph structure construction unit is used to integrate the topological structure, node attribute set, edge attribute set, real-time pressure data and real-time flow data to construct the graph structure data of the dynamic topological graph.
[0129] In one embodiment, the node stability calculation module 13 includes:
[0130] a pressure maintenance calculation unit, configured to calculate a pressure maintenance capability parameter of each target node relative to its adjacent nodes based on the difference in altitude between each target node and its adjacent nodes and according to real-time pressure data;
[0131] A flow data extraction unit, used to extract the real-time flow values and pipe diameters of all edges connected to the target node based on the edge attribute set;
[0132] A deviation rate calculation unit is used to determine the flow direction according to the topological attributes of the target node in the edge and calculate the deviation rate between the total inflow and the total outflow;
[0133] A historical substitution unit is used to call the historical operating condition database when the deviation rate exceeds a preset threshold, obtain an alternative flow value that matches the current meteorological conditions and water use pattern, and recalculate the deviation rate based on the alternative flow value;
[0134] The parameter fusion unit is used to fuse the pressure maintenance capability parameter and the deviation rate and generate the stability parameter through a nonlinear mapping function.
[0135] In one embodiment, the training method of the machine learning model in the real-time water supply data collection and analysis device 10 includes:
[0136] Obtain a sample set of historical water supply network dynamic topology diagrams and corresponding system balance status labels;
[0137] A hierarchical graph neural network model is constructed. The first layer is trained using a physical constraint loss function to learn the fluid dynamics characteristics of the pipeline network, and the second layer is trained using a spatiotemporal attention mechanism to capture the sudden changes in regional water use patterns.
[0138] A fault sample weighting strategy is used to optimize the parameters of the hierarchical graph neural network model, assigning triple loss weights to pipe burst and sustained low pressure event samples;
[0139] The topology of the water supply network is adapted based on the transfer learning algorithm to obtain a trained machine learning model.
[0140] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method for real-time collection and analysis of water supply data as described above are implemented.
[0141] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0142] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the components described as separate parts may or may not be physically separated, and the parts displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the disclosed solution. A person of ordinary skill in the art can understand and implement it without expending creative work.
[0143] The above-described embodiments merely represent several implementation methods of the embodiments of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that a person skilled in the art may make various modifications and improvements without departing from the concept of the embodiments of the present application, and these modifications and improvements fall within the scope of protection of the embodiments of the present application.
Claims
1. A method for real-time collection and analysis of water supply data, characterized in that: The method comprises: Acquire multi-source monitoring data of the water supply network, and perform spatiotemporal alignment and spatial interpolation on the multi-source monitoring data to obtain a water supply dataset; According to the topological structure of the water supply network, the water supply dataset is mapped into a dynamic topological graph, wherein the dynamic topological graph includes node attributes, edge attributes, and real-time pressure and flow data; According to the dynamic topology graph, the stability parameter of each node is calculated based on the principle of fluid mechanics; The dynamic topology map and the stability parameters are input into a pre-trained machine learning model to generate a system balance quantification indicator, which is used to characterize the operational stability of the water supply network.
2. The method according to claim 1, characterized in that The step of obtaining multi-source monitoring data of the water supply network and performing spatiotemporal alignment and spatial interpolation on the multi-source monitoring data to obtain a water supply dataset includes: Performing integrity check on the multi-source monitoring data to obtain data missing nodes, wherein the multi-source monitoring data includes original pressure data, original flow data, and original water consumption data; Obtaining historical pressure values and flow fluctuation patterns of topologically adjacent nodes of the data-missing node in the same time period; Based on the historical pressure values and the flow fluctuation pattern, a spatial correlation weight matrix is constructed by a spatiotemporal kriging algorithm, and an estimated value of missing data is generated by weighted calculation; Acquire meteorological temperature data, and perform physical compensation calculation on the flow value of the open-air pipeline in the multi-source monitoring data based on a preset fluid thermal expansion coefficient to obtain physical compensation data, wherein the open-air pipeline is a pipeline in the water supply network that is not buried underground; The missing data estimation value and the physical compensation data are integrated into the multi-source monitoring data to obtain the water supply dataset.
3. The method according to claim 1, characterized in that Mapping the water supply data set into a dynamic topology graph according to the topological structure of the water supply network includes: The topological structure is obtained by parsing the GIS database of the water supply network to extract the topological connection relationship between nodes, wherein the nodes in the topological structure correspond to pipeline intersections or monitoring equipment locations, and the edges correspond to physical pipeline segments; Mapping the real-time pressure data in the water supply dataset into node attributes, and mapping the real-time flow data in the water supply dataset into attributes of associated edges; Extracting a node attribute set of the node from the pipeline network asset database, including pipe diameter, altitude, and valve opening / closing status; Extracting an edge attribute set of the edge from the pipe network asset database, including pipe length, pipe diameter, and roughness coefficient; The topological structure, the node attribute set, the edge attribute set, the real-time pressure data and the real-time flow data are integrated to construct the graph structure data of the dynamic topological graph.
4. The method according to claim 3, characterized in that Calculating the stability parameters of each node based on the dynamic topology diagram and the principles of fluid mechanics includes: Based on the difference in altitude between each target node and its adjacent nodes, calculating the pressure maintenance capacity parameter of each target node relative to its adjacent nodes according to the real-time pressure data; Extracting the real-time flow values and the pipe diameters of all the edges connected to the target node based on the edge attribute set; Determine the flow direction according to the topological attributes of the target node in the edge, and calculate the deviation rate between the total inflow and the total outflow; When the deviation rate exceeds a preset threshold, calling a historical operating condition database to obtain an alternative flow value that matches the current meteorological conditions and water usage pattern, and recalculating the deviation rate based on the alternative flow value; The pressure maintenance capability parameter and the deviation rate are integrated to generate the stability parameter through a nonlinear mapping function.
5. The method according to claim 1, characterized in that The training method of the machine learning model includes: Obtain a sample set of historical water supply network dynamic topology diagrams and corresponding system balance status labels; A hierarchical graph neural network model is constructed. The first layer is trained using a physical constraint loss function to learn the fluid dynamics characteristics of the pipeline network, and the second layer is trained using a spatiotemporal attention mechanism to capture the sudden changes in regional water use patterns. A fault sample weighting strategy is used to optimize the parameters of the hierarchical graph neural network model, assigning triple loss weights to pipe burst and continuous low pressure event samples; The topological structure of the water supply network is adapted based on a transfer learning algorithm to obtain a trained machine learning model.
6. A real-time water supply data collection and analysis device, characterized in that: The device comprises: A data preprocessing module is used to obtain multi-source monitoring data of the water supply network and perform spatiotemporal alignment and spatial interpolation on the multi-source monitoring data to obtain a water supply dataset; A topology construction module, configured to map the water supply dataset into a dynamic topology graph according to the topology of the water supply network, wherein the dynamic topology graph includes node attributes, edge attributes, and real-time pressure and flow data; A node stability calculation module, configured to calculate the stability parameters of each node based on the dynamic topology diagram and the principles of fluid mechanics; A balance analysis module is used to input the dynamic topology map and the stability parameters into a pre-trained machine learning model to generate a system balance quantification indicator, which is used to characterize the operational stability of the water supply network.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Cited By
Topology verification method, device, equipment and medium for water supply network
CN120805371A
Coiled tubing operation information intelligent monitoring method and system
CN121093295A
Self-adaptive adjustment control method and system for parameters of water pump controller
CN121165434A
A water pump controller parameter self-adaptive adjustment control method and system
CN121165434B
Underground pipeline three-dimensional visualization and real-time sensing system based on AR-GIS fusion
CN121236255A