A method for predicting pressure at nodes in urban water supply networks

By constructing a data-driven model using the transformer model framework and attention mechanism, the problem of hydraulic model dependence in urban water supply network node pressure prediction is solved, achieving efficient and accurate node pressure prediction without hydraulic model, especially in large-scale water supply networks.

CN119129798BActive Publication Date: 2025-10-28ZHEJIANG UNIV +2
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411056687.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-02
Publication Date
2025-10-28
Estimated Expiration
2044-08-02

AI Technical Summary

Technical Problem

Existing technologies rely on hydraulic models for predicting node pressure in urban water supply networks, resulting in high modeling costs and difficulty in continuous maintenance. They are unable to effectively predict node pressure at future moments and lack the ability to predict non-sensor locations.

Method used

A data-driven model is constructed using the transformer model framework. By abstracting the spatiotemporal features of sensor data into time and space vectors, and using an attention mechanism to generalize sensor node information to nodes lacking sensors, the topology of the urban water supply network is constructed, reducing the model's time complexity and enhancing its generalization ability.

Benefits of technology

It achieves fully data-driven prediction without the need for a hydraulic model, reduces modeling costs, improves the accuracy and generalization ability of predicting pressure at unknown nodes, and can be effectively applied in large-scale water supply networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119129798B_ABST
    Figure CN119129798B_ABST
Patent Text Reader

Abstract

This invention provides a method for predicting node pressure in an urban water supply network, comprising the following steps: constructing a corresponding water supply network topology by using water-using nodes in the urban water supply network as nodes and connecting pipes as edges; acquiring node pressure data from various sensors in the urban water supply network to construct a dataset; constructing a prediction model based on the transformer model framework and the water supply network topology; training the prediction model using the dataset to obtain a node pressure prediction model for predicting the pressure of sensorless water-using nodes; and inputting the location information and prediction time point of the target water-using node into the node pressure prediction model to obtain the node pressure data of the target water-using node. The method provided by this invention can construct a water supply pressure data prediction model that does not rely on a hydraulic model, predicting the water demand pressure of future water-using nodes, and exhibiting good prediction accuracy in flat water supply areas.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of municipal engineering and urban water supply network technology, specifically relating to a method for predicting the pressure at nodes in an urban water supply network. Background Technology

[0002] Predicting the water demand and pressure at future urban water supply nodes can help urban water supply systems plan water supply scheduling and water plant production schedules in advance to meet future urban water demand.

[0003] The traditional approach involves creating a hydraulic model of the urban water supply network, predicting the water demand at each node, and then feeding the predictions into a calibrated hydraulic model to obtain future demand pressure, thereby scheduling pump and valve operations to meet future water demand. However, creating a hydraulic physical model of the urban water supply network is time-consuming and labor-intensive, requiring detailed GIS information of the network and professional calibration of node water demand / pipeline friction coefficients, resulting in high modeling costs. Furthermore, the network model needs continuous revision as the city develops, requiring ongoing maintenance and management costs.

[0004] With the large-scale deployment of sensors, data-driven modeling based on data has become possible. Data-driven modeling is a modeling method based on data analysis and mining. It does not rely on prior assumptions or theories, but builds models through the characteristics and patterns of the data itself. Currently, there are a variety of data-based methods for predicting urban water supply in time or space: (1) interpolation methods such as Kriging interpolation and inverse distance weighted interpolation; (2) traditional machine learning methods such as multilayer perceptron and BP neural network algorithm; (3) graph machine learning methods, such as graph Chebyshev neural network, graph convolutional neural network and other graph neural network methods. Interpolation methods assume that the pressure is linearly distributed in the pipeline and that spatially similar nodes have similar pressures.

[0005] Patent document CN113704942A discloses a method, device, and computer system for estimating the pressure of unknown nodes in a water supply network. The method includes: defining the topology of the water supply network graph; constructing the graph Laplace matrix of the water supply network; obtaining pressure monitoring point information of the water supply network; obtaining the characteristic graph frequency basis of the water supply network based on the graph Laplace matrix and the pressure monitoring point information; obtaining the pressure monitoring values ​​of the pressure monitoring points of the water supply network at the time to be solved; calculating the characteristic graph frequency coefficients of the water supply network at the time to be solved based on the pressure monitoring values ​​and the characteristic graph frequency basis; and reconstructing the pressure of each node in the water supply network based on the characteristic graph frequency coefficients and the characteristic graph frequency basis to obtain the pressure value of each unknown node in the water supply network at the time to be solved. This method can only estimate the pressure information of non-sensor nodes at a specific time and cannot predict future times. Furthermore, the graph Laplace matrix decomposition process is very time-consuming, making it difficult to apply to large-scale practical water supply networks.

[0006] Patent document CN117610826A discloses a method and system for predicting water demand. The method includes: firstly, preprocessing the historical water demand monitoring sequence obtained from sensors to obtain a water demand time series, and then performing sequence decomposition analysis using a Prophet model. After adding holiday factors, a prediction graph of water demand for days, weeks, months, and trends is obtained. Next, the residual sequence formed by the predicted values ​​and the original sequence is processed using a GRU model to extract nonlinear components. Finally, the prediction values ​​from the two models are added to obtain the final predicted water demand value. This method lacks consideration of graph information, therefore it can only predict future demand for locations with sensors, lacking the ability to predict demand for non-sensor locations. Furthermore, this method does not completely eliminate its reliance on the hydraulic model of the pipe network. Summary of the Invention

[0007] The purpose of this invention is to provide a method for predicting the pressure of nodes in an urban water supply network. This method does not rely on a hydraulic model, but instead constructs a fully data-driven model for predicting water supply pressure data.

[0008] To achieve the objectives of this invention, the following technical solution is provided: a method for predicting the pressure at nodes in an urban water supply network, comprising the following steps:

[0009] The water-using nodes in the urban water supply network are used as nodes, and the connected pipes are used as edges to construct the corresponding water supply network topology. Each edge in the water supply network topology is assigned a corresponding pipe weight. The water-using nodes are labeled with location information and whether or not they are equipped with sensors.

[0010] Obtain node pressure data from each sensor in the urban water supply network, and extract the node pressure data based on a preset time step to obtain the corresponding pressure measurement value. Combine the pressure measurement value with the label of the water-using node to form a dataset.

[0011] A prediction model is constructed based on the transformer model framework and the water supply network topology. The prediction model includes a feature extraction module, a fusion module, an attention operation module, and a prediction module.

[0012] The feature extraction module includes a temporal extraction part and a spatial extraction part. The temporal extraction part generates a corresponding temporal embedding vector based on the sampling time point of the pressure data. The spatial extraction part obtains the connectivity embedding vector of the corresponding node based on the connection relationship between the nodes of the water supply network topology.

[0013] The fusion module is used to concatenate the connectivity embedding vector with the labels of each node in the water supply network topology to obtain the spatial embedding vector of the corresponding node, and to concatenate the spatial embedding vector with the temporal embedding vector to output the spatiotemporal embedding vector.

[0014] The attention operation module is used to perform temporal attention operations and spatial attention operations on the input spatiotemporal embedding vector to obtain the corresponding spatial attention score and spatial attention score, and perform weighted calculation to output the final attention score.

[0015] The prediction module makes predictions based on the input final attention score and outputs the prediction results.

[0016] The prediction model is trained using the dataset to obtain a node pressure prediction model for predicting pressure at sensorless water nodes.

[0017] The location information and predicted time point of the target water-using node are input into the node pressure prediction model to obtain the node pressure data of the target water-using node.

[0018] This invention abstracts sensor data sampling time and sensor location in the pipeline network into spatiotemporal embedding vectors. It uses an attention mechanism to extract spatiotemporal features of nodes from the spatiotemporal embedding vectors. Through a data-driven model, the pressure information of nodes with sensors is generalized to nodes without sensors, so as to achieve the prediction of the final node pressure data.

[0019] Specifically, the pipeline weight is obtained by approximate calculation using the Hayführer-Williams formula.

[0020] Specifically, the time extraction portion is obtained by splicing together the weekly and daily sequences of pipeline pressure changes, which are represented by unique thermal codes respectively.

[0021] Specifically, the spatial extraction part uses the Node2Vec algorithm to analyze the topology of the water supply network to obtain the corresponding connectivity embedding vector.

[0022] Specifically, the concatenation expression in the fusion module is as follows:

[0023]

[0024] in, Represents an m-dimensional vector. Represents an n-dimensional vector.

[0025] Specifically, the time attention operation embeds information at fixed times to the message passing process of the l-th layer, at time t. j The attention is calculated between other times t∈T, as follows:

[0026]

[0027]

[0028] Where <·,·> represent the inner product operation of vectors; Q t (·),K t (·), and V t (·) represents three ReLU nonlinear transformations; 3D is the dimension of the spatiotemporal pressure embedding vector, and the spatial attention score is obtained after passing through SoftMax. This indicates that node v has a relationship with node v i The importance of Let te represent the i-th spatial embedding vector. t This represents the temporal embedding vector at other times. Indicates t j The temporal embedding vector at time step 1. A pressure vector representing a pressure measurement value.

[0029] Specifically, the spatial attention operation embeds information at fixed times for the message passing process of the l-th layer, and for node v i The attention between the node and other nodes v∈V is calculated as follows:

[0030]

[0031] Where <·,·> represent the inner product operation of vectors; Q s (·),K s (·), and V s (·) represents three ReLU nonlinear transformations; 3D is the dimension of the spatiotemporal pressure embedding vector; the spatial attention score is obtained after SoftMax transformation. This indicates that time t corresponds to node t j The importance of Let te represent the i-th spatial embedding vector. t This represents the temporal embedding vector at other times. Indicates t j The temporal embedding vector at time step 1. A pressure vector representing a pressure measurement value.

[0032] Specifically, the weighted calculation of the attention operation module adopts a gating fusion mechanism, which dynamically determines the spatial attention score and the weight of the spatial attention score of different nodes at different times through parameter m.

[0033] Specifically, during training, a random number of random positions are selected for masking each batch to enhance the model's generalization ability.

[0034] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0035] A fully data-driven model that completely eliminates reliance on hydraulic models is adopted. By using sensors deployed in the pipeline network, the sampling time and the sensor's location characteristics in the pipeline network are abstracted into time and space vectors from both time and space perspectives, reducing the model's time complexity. The measured values ​​can also be located in time and space through the time and space vectors. By randomly masking the pressure values ​​collected by different time and space sensors (random number and random location), the model's ability to generalize and predict unseen data is enhanced. Attached Figure Description

[0036] Figure 1 A flowchart of the method for predicting pressure at urban water supply network nodes provided in this embodiment;

[0037] Figure 2 This is a schematic diagram of the water supply network topology provided in this embodiment;

[0038] Figure 3 This is a schematic diagram of the framework of the prediction model provided in this embodiment;

[0039] Figure 4 This is a spatiotemporal prediction effect diagram provided in this embodiment with a prediction step size of 12. Detailed Implementation

[0040] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0041] like Figure 1 As shown in this embodiment, a method for predicting the pressure at a node in an urban water supply network includes the following steps:

[0042] Define the topology of the water supply network graph: Treat the water-using nodes in the water supply network as nodes in graph theory and the pipes as edges in graph theory. Use graph theory to describe the topology of the water supply network and use the Haizeng-Williams formula to approximate the pipe weights, providing a foundation for the subsequent Node2Vec graph embedding method.

[0043] Define the representation method of the water supply network topology: embed the location information of pressure monitoring points in the water supply network into a spatial vector; embed the sampling time of pressure monitoring points into a time vector.

[0044] The dimensionality of graph matrix representations has become a major obstacle limiting their application in practical pipeline networks. Random walk-based graph representations, while preserving local and global network structure, can significantly reduce the dimensionality of network topology representations and serve as an efficient graph representation method. Due to the regularity of water usage, pressure in pipeline networks exhibits periodic variations. Therefore, incorporating this periodicity into forecasting will help improve forecast accuracy.

[0045] The learning method for defining the topology of the water supply network diagram is as follows: Based on spatiotemporal vectors, a spatiotemporal vector attention mechanism is constructed to transfer sensor node information to nodes lacking sensors, thereby obtaining global future node information.

[0046] In water supply networks, attention mechanisms are an effective method to adaptively capture the correlations and long-range dependencies between nodes. By assigning different weights to different locations, information from multiple known sensor nodes is dynamically fused to the target non-sensor node.

[0047] In this example, the specific construction process is as follows:

[0048] A weighted undirected graph is constructed to represent the topology of the urban water supply network. The water-using nodes of the network are represented as nodes of the graph, and the pipe segments of the network are represented as edges of the graph. The topology graph includes the connection status of the pipes in the water supply network and the weight coefficients of the connecting pipes. The water-using nodes can be divided into nodes with pressure sensors and nodes without pressure sensors.

[0049] The topology is a weighted undirected graph, which consists of three parts: the starting node, the ending node, and the connection weights.

[0050] Connection weight coefficient An approximation is performed using the Hayführer-Williams formula, and the approximation process is as follows:

[0051]

[0052] The final constructed water supply network topology, such as Figure 2 As shown.

[0053] Obtain node pressure data from each sensor in the urban water supply network, and extract the node pressure data based on a preset time step to obtain the corresponding pressure measurement value. Combine the pressure measurement value with the label of the water-using node to form a dataset.

[0054] like Figure 3As shown, a prediction model is constructed based on the transformer model framework and the water supply network topology. The prediction model includes a feature extraction module, a fusion module, an attention operation module, and a prediction module.

[0055] The feature extraction module includes a temporal extraction part and a spatial extraction part. The temporal extraction part generates a corresponding temporal embedding vector based on the sampling time point of the pressure data. The spatial extraction part obtains the connectivity embedding vector of the corresponding node based on the connection relationship between the nodes of the water supply network topology.

[0056] The fusion module is used to concatenate the connectivity embedding vector with the labels of each node in the water supply network topology to obtain the spatial embedding vector of the corresponding node, and to concatenate the spatial embedding vector with the temporal embedding vector to output the spatiotemporal embedding vector.

[0057] The attention operation module is used to perform temporal attention operations and spatial attention operations on the input spatiotemporal embedding vector to obtain the corresponding spatial attention score and spatial attention score, and perform weighted calculation to output the final attention score.

[0058] The prediction module makes predictions based on the input final attention score and outputs the prediction results.

[0059] Furthermore, the feature extraction module embeds the location information of the pressure monitoring points in the water supply network into a spatial vector; and embeds the sampling time of the pressure monitoring points into a time vector;

[0060] A time embedding vector is generated based on the sensor sampling time points: the sensor sampling time is represented as a dual-period system of weekly and daily sequences, which are represented separately using one-hot encoding and then concatenated together.

[0061] The week order refers to the day of the week in which the sensor samples.

[0062] The daily sequence refers to the number of times the sensor samples during the day.

[0063] In the spatial extraction part, the Node2Vec algorithm generates spatial embedding vectors for each water-using node in the pipeline network based on the topological weighted undirected graph. Node2Vec is an algorithmic framework for graph representation learning, aiming to learn continuous feature representations for nodes in the graph for various downstream machine learning tasks. The process of generating spatial vector embeddings based on graph information includes the following:

[0064] Training samples are generated from node to node. First, a biased walk is performed a certain number of times starting from each node. The biased walk moves from one node to the next based on the pipeline weights, with pipelines with larger weights being more likely to be selected as the next walk direction.

[0065] The generated random walk node sequence is treated as text corpus. The SkipGram model learns the feature vectors of the nodes, and negative sampling is used to accelerate the training process. Specifically, for each node in the sequence, the SkipGram model attempts to use the node's vector representation to predict its context nodes in the sequence, i.e., the nodes adjacent to the given node in the random walk sequence. In this way, the node vector representation learned by the model can capture the contextual information of the node, i.e., its neighboring nodes. The goal of the SkipGram model is to maximize the log probability of the occurrence of its context nodes given the vector representation of a given node. This goal is achieved by optimizing the following objective function:

[0066]

[0067] Where V is the node set, and N(v) are the context nodes of node v. P(u|v) is the probability of node u appearing given the vector representation of node v, calculated using the SoftMax function:

[0068]

[0069] The concatenation expression in the fusion module is as follows:

[0070]

[0071] in, Represents an m-dimensional vector. Represents an n-dimensional vector.

[0072] The temporal and spatial embedding vectors are concatenated to obtain the spatiotemporal embedding, which is then concatenated with the node pressure vector at that time to obtain the model input. For nodes without sensors, the pressure vector is assumed to be the average value of the nodes with measurements.

[0073] Specifically, for the spatiotemporal embedding vector of non-sensor nodes, it is the spatial embedding vector. and time vector It is assembled from parts, and the process is as follows:

[0074]

[0075] Specifically, the spatiotemporal pressure embedding vector for a sensor node consists of the spatiotemporal embedding vector STE and the pressure vector. It is assembled from parts, and the process is as follows:

[0076]

[0077] Based on spatiotemporal vectors, a spatiotemporal vector attention mechanism is constructed to transfer sensor node information to non-sensor nodes, thereby obtaining global future node information.

[0078] Compared to traditional attention mechanisms, it is extended to temporal attention and spatial attention to extract spatiotemporal features from spatiotemporal embedding vectors; a gating fusion mechanism is used to divide the weights of temporal and spatial attention; and random masks (number of random masks and random mask positions) are added to enhance the model's generalization ability (the model is shown in the figure).

[0079] Time attention, for moments The node se v Spatial attention extraction embeds information at fixed times to analyze the message passing process at the l-th layer, at time t. j The attention is calculated between other times t∈T, as follows:

[0080]

[0081]

[0082] Where <·,·> represent the inner product operation of vectors; Q t (·),K t (·), and V t (·) represents three ReLU nonlinear transformations; 3D is the dimension of the spatiotemporal pressure embedding vector. The spatial attention score is obtained after SoftMax transformation. This indicates that node v has a relationship with node v i The importance of.

[0083] Spatial attention, for time The node se v Spatial attention extraction, through information embedded at fixed times, focuses on the message passing process at layer l, specifically on node v. i The attention between the node and other nodes v∈V is calculated as follows:

[0084]

[0085] Where <·,·> represent the inner product operation of vectors; Q s (·),K s (·), and V s (·) represents three ReLU nonlinear transformations; 3D is the dimension of the spatiotemporal pressure embedding vector. The spatial attention score is obtained after SoftMax transformation. This indicates that time t corresponds to node t j The importance of.

[0086] In addition, the weighted calculation of the attention operation module adopts a gating fusion mechanism, which dynamically determines the spatial attention score and the weight of the spatial attention score of different nodes at different times through the parameter m.

[0087] For the l-th layer, the temporal and spatial attention of all nodes are represented as and

[0088]

[0089] m=σ(H s W1+H T W2+b)

[0090] m stands for "gate". W1, W2, and b are learnable parameters. ⊙ is the Hadamard product. σ(·) is the sigmoid activation function.

[0091] A prediction model is trained using a dataset to obtain a node pressure prediction model for sensorless water node pressure. More specifically, during training, a random number of random locations are masked for each batch to enhance the model's generalization ability. Specifically, the pressure portion of the STPE in each training batch is masked with a mask value of 0. For nodes without sensors, the pressure portion is unknown, i.e., the pressure portion of the STPE is unknown. By training on nodes with pressure sensors and randomly masking the pressure portion of the training batches, the model's generalization ability is enhanced. The random masking involves selecting a random number of random locations for each batch.

[0092] By inputting the spatiotemporal embedding vectors of non-sensor nodes into the trained model, the prediction results for situations lacking pressure sensors can be obtained; this is the prediction process. The specific process includes:

[0093] Given pressure data from I nodes equipped with sensors, take the historical observations at J time steps as the training data. The training task is to predict the future J * Pressure value at each time step The objective function is:

[0094]

[0095] Here, Θ represents all trainable parameters of the model.

[0096] The location information and predicted time point of the target water-using node are input into the node pressure prediction model to obtain the node pressure data of the target water-using node. More specifically, after obtaining I training models with sensor nodes, pressure prediction is performed by inputting all I+I... * Nodes get:

[0097] Forecasting (X) * )=f Θ (X * ) = Z.

[0098] To better illustrate the technical effectiveness of the method provided in this example, the implementation process of the pressure estimation method for unknown nodes in a water supply network provided in this disclosure is further explained using the creation process of a real, publicly available example pipeline network, L Town, as an example. The example pipeline network used in this embodiment has 782 water usage nodes, 2 water supply points, 1 pressure reducing valve, and 1 booster pump, with a maximum elevation difference of 71.21m between nodes. In this embodiment, the actual sampling data from the original 33 pressure monitoring points in the baseline pipeline network are used in the model.

[0099] A weighted undirected graph of the water supply network is constructed, including pipe segment numbers, starting nodes, ending nodes, and weights, as shown in Table 1 (905 rows in total, partial excerpt). Based on the constructed weighted undirected graph, the Node2Vec algorithm is used to represent its sensor nodes as connectivity embedding vectors with an embedding dimension of 256, as shown in Table 2 (33 rows in total, partial excerpt). The connectivity embedding and node elevation are concatenated to obtain the node space embedding vector, as shown in Table 3 (33 rows in total, partial excerpt).

[0100] Table 1

[0101] Pipeline section number starting node Termination Node Weight 1 62 61 0.240 … … … 16 16 18 0.063 … … … 111 116 125 0.049 … … … 905 342 782 0.068

[0102] Table 2

[0103] Node number Connectivity Embedded 1 -0.54878485,0.37317982,…,-0.34001064 … 16 -0.07466959,-0.26584777,…,0.45116132 … 33 -0.014847224,0.5691468,…,0.11146935

[0104] Table 3

[0105] Node number Spatial embedding vector (2256 elements in total, partial data extracted) 1 73.2105,-0.54878485,0.37317982,…,-0.34001064 … 16 28.5315,-0.07466959,-0.26584777,…,0.45116132 … 33 26.1136,-0.014847224,0.5691468,…,0.11146935

[0106] The sensor sampling time at 00:45 on Friday (assuming data is uploaded every 15 minutes) can be represented as "week order: 5; day order: 3". By representing "5" and "3" as one-hot encoded vectors [0,0,0,0,1,0,0] (7 bits in total, the 5th bit is 1) and [0,0,1,,…,0] (48 bits in total, the 3rd bit is 1), the two one-hot encoded vectors are concatenated together [0,0,0,0,1,0,0,0,0,1,,…,0]. The dimensions are then transformed into 256 dimensions, the same as the spatial embedding vector, through a fully connected layer, thus obtaining the temporal embedding vector at that moment.

[0107] The pressure measurements are also converted to the same 256 dimensions through a fully connected layer.

[0108] Assuming that 11 out of 33 sensor nodes lack sensors and 22 are equipped with sensors, three types of test samples are generated for testing in this embodiment. For nodes lacking sensors, their spatiotemporal embedding vector is the concatenation of the time embedding vector and the spatial embedding vector; for nodes equipped with sensors, their spatiotemporal pressure embedding vector is the concatenation of the time embedding vector, the spatial embedding vector, and the pressure measurement vector.

[0109] The spatiotemporal pressure embedding vectors of the input sensor nodes are used to train the water demand pressure prediction model. The model employs two encoder and decoder layers, is trained using the ADAM optimizer, and incorporates an early stopping mechanism activated after 30 durations. This early stopping mechanism depends on the validation loss; training stops if no improvement is observed after 10 consecutive batches. The learning rate is 0.03, and the batch size is 32.

[0110] By inputting the spatiotemporal embedding vectors of non-sensor nodes into the trained model, we can obtain the future water pressure situation in the absence of sensor nodes.

[0111] like Figure 4 As shown, the horizontal axis represents the index number of available sensors in the entire pipeline system, aiming to comprehensively evaluate the model performance through a K-fold cross-validation strategy (K=3 here).

[0112] according to Figure 4 (a), Figure 4 (b) and Figure 4 (c) shows that the sensors are evenly divided into three subsets. The black blocks represent the locations of the sensors selected for training data, while the red blocks indicate the locations of the sensors used to test the model's performance. The vertical axis reflects the model's predictive ability, specifically the absolute average error between the spatiotemporal prediction and the measured value for an unknown node at a future time. The error value is expressed in meters (water heads).

[0113] This involves accurately predicting the pressure values ​​of unknown nodes under normal hydraulic conditions using a limited number of pressure monitoring values ​​within the pipeline network. However, significant errors remain for areas with special hydraulic conditions controlled by pressure-reducing valves or booster pumps.

[0114] Those skilled in the art will understand that the features described in the various embodiments and / or claims of this disclosure can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure can be combined and / or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.

[0115] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.

Claims

1. A method for predicting pressure at nodes in an urban water supply network, characterized in that, Includes the following steps: The water-using nodes in the urban water supply network are used as nodes, and the connected pipes are used as edges to construct the corresponding water supply network topology. Each edge in the water supply network topology is assigned a corresponding pipe weight. The water-using nodes are labeled with location information and whether or not they are equipped with sensors. Obtain node pressure data from each sensor in the urban water supply network, and extract the node pressure data based on a preset time step to obtain the corresponding pressure measurement value. Combine the pressure measurement value with the label of the water-using node to form a dataset. A prediction model is constructed based on the transformer model framework and the water supply network topology. The prediction model includes a feature extraction module, a fusion module, an attention operation module, and a prediction module. The feature extraction module includes a time extraction part and a spatial extraction part. The time extraction part generates a corresponding time embedding vector based on the sampling time point of the pressure data. The spatial extraction part obtains the connectivity embedding vector of the corresponding node based on the connection relationship between each node of the water supply network topology. The time extraction part is obtained by splicing together the weekly and daily order of the network pressure change using unique thermal encoding. The fusion module is used to concatenate the connectivity embedding vector with the labels of each node in the water supply network topology to obtain the spatial embedding vector of the corresponding node, and to concatenate the spatial embedding vector with the temporal embedding vector to output the spatiotemporal embedding vector. The attention operation module is used to perform temporal attention operations and spatial attention operations on the input spatiotemporal embedding vector to obtain the corresponding temporal attention score and spatial attention score, perform weighted calculation, and output the final attention score. The prediction module makes predictions based on the input final attention score and outputs the prediction results. The prediction model is trained using the dataset to obtain a node pressure prediction model for predicting pressure at sensorless water nodes. The location information and predicted time point of the target water-using node are input into the node pressure prediction model to obtain the node pressure data of the target water-using node.

2. The method for predicting pressure at nodes in an urban water supply network according to claim 1, characterized in that, The pipeline weights are obtained by approximate calculation using the Hayführer-Williams formula.

3. The method for predicting pressure at nodes in an urban water supply network according to claim 1, characterized in that, The spatial extraction part uses the Node2Vec algorithm to analyze the topology of the water supply network to obtain the corresponding connectivity embedding vector.

4. The method for predicting pressure at nodes in an urban water supply network according to claim 1, characterized in that, The concatenation expression in the fusion module is as follows: ;in, Represents an m-dimensional vector. Represents an n-dimensional vector.

5. The method for predicting pressure at nodes in an urban water supply network according to claim 1, characterized in that, The time attention operation embeds information at fixed moments, for the first... Layer message passing process, at any time Other moments The attention interval is calculated as follows: ; ; ;in, This is the inner product operation for vectors; , and These are three ReLU nonlinear transformations; The dimension of the spatiotemporal pressure embedding vector is used to obtain the temporal attention score after passing through SoftMax. , indicating time For nodes The importance of Indicates the A spatial embedding vector, This represents the temporal embedding vector at other times. express The temporal embedding vector at time step 1. A pressure vector representing a pressure measurement value.

6. The method for predicting pressure at nodes in an urban water supply network according to claim 1, characterized in that, The spatial attention operation embeds information at fixed times, for the first... Layer message passing process, for nodes Other nodes The attention interval is calculated as follows: ; ; ;in, This is the inner product operation for vectors; , and These are three ReLU nonlinear transformations; The spatial attention score is obtained after passing through the spatiotemporal pressure embedding vector and applying SoftMax. , indicating the node For nodes The importance of Indicates the A spatial embedding vector, This represents the temporal embedding vector at other times. express The temporal embedding vector at time step 1. The pressure vector indicating the pressure measurement value.

7. The method for predicting pressure at nodes in an urban water supply network according to claim 1, characterized in that, The weighted calculation of the attention operation module adopts a gating fusion mechanism, which dynamically determines the spatial attention score and the weight of the spatial attention score of different nodes at different times through parameters.

8. The method for predicting pressure at nodes in an urban water supply network according to claim 1, characterized in that, During training, a random number of random positions are selected for masking each batch to enhance the model's generalization ability.

Citation Information

Patent Citations

  • Pressure estimation method and device for unknown nodes of water supply network, and computer system

    CN113704942A

  • Water demand prediction method and system

    CN117610826A

  • Method, system and device for training and predicting pressure prediction model and storage medium

    CN115204502A

  • Water supply network leakage detection method based on Transform model, medium and terminal

    CN118296327A