A method for reconstructing liquid level data of unmonitored nodes based on liquid level data of monitored nodes
By constructing a spatiotemporal graph convolutional neural network and utilizing the topology and historical data of the drainage network, the liquid level data of unmonitored nodes is reconstructed, which solves the problem of unmonitored node data reconstruction in the existing technology and realizes comprehensive perception and information supervision of the drainage network.
Patent Information
- Application Number
- CN202411492420.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2044-10-24
AI Technical Summary
Existing methods mainly focus on repairing anomalies in monitoring node data, but fail to effectively reconstruct the liquid level data of unmonitored nodes, resulting in the inability to achieve comprehensive data perception and information supervision of the entire drainage network.
Based on the liquid level data of the monitoring nodes, a spatiotemporal graph convolutional neural network is constructed by collecting pipeline network topology data and historical liquid level data. The node-pipeline relationship, elevation, pipe diameter and pipe length information matrix is used for training to reconstruct the liquid level data of the unmonitored nodes.
It is possible to accurately reconstruct the liquid level data of unmonitored nodes with a small number of monitoring nodes, reduce the cost of monitoring equipment, build a drainage information supervision platform, and provide scientific city-level hydraulic analysis capabilities.
Smart Images

Figure CN119357637B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of drainage system data repair, and in particular relates to a method for reconstructing liquid level data of unmonitored nodes based on liquid level data of monitored nodes. Background Art
[0002] Drainage networks are a core component of modern urban infrastructure, and their operational efficiency has a significant impact on urban economic development. Currently, my country's drainage network system framework is largely mature. However, driven by global digitalization, demands for drainage system functionality are increasing, necessitating more intelligent and efficient management of the existing drainage network through intelligent empowerment.
[0003] As sensor data for drainage pipe networks, monitoring data, when scientific, accurate, timely, and reliable, provides an intelligent basis for drainage planning and scheduling, pipe network renovation, and long-term operation and maintenance, ensuring the safety and efficiency of the pipe network. However, the late development of drainage pipe network informatization, the complex monitoring environment, the difficulties in subsequent operation and maintenance, and the high management costs have led to low monitoring density and unstable monitoring data quality. In this context, how to utilize the limited monitoring density to infer information about other unknown nodes in the drainage pipe network system has become a key issue in resolving monitoring challenges and bottlenecks in the development of intelligent pipe networks.
[0004] However, existing methods mainly focus on repairing anomalies in monitoring node data, fail to explore the reconstruction of unmonitored node data, and cannot achieve comprehensive data perception of the entire drainage network and the construction of an information supervision platform. Summary of the Invention
[0005] The purpose of the present invention is to solve the problem that the existing methods cannot reconstruct the data of unmonitored nodes, resulting in the inability to achieve comprehensive data perception of the entire drainage network, and propose a method for reconstructing the liquid level data of unmonitored nodes based on the liquid level data of monitored nodes.
[0006] The technical solution adopted by the present invention to solve the above technical problems is: a method for reconstructing the liquid level data of unmonitored nodes based on the liquid level data of monitored nodes, the method specifically comprising the following steps:
[0007] Step 1: Collect the pipe network topology data of the drainage pipe network system and the historical liquid level data of each monitoring node;
[0008] Step 2: Obtain the node-pipe relationship matrix, pipeline elevation information matrix, node relationship adjacency matrix, pipe diameter information matrix, and pipe length information matrix based on the pipe network topology data; obtain the liquid level data matrix of all nodes based on the historical liquid level data of each monitoring node;
[0009] Step 3: Build a spatiotemporal graph convolutional neural network. The working process of the spatiotemporal graph convolutional neural network is as follows:
[0010] In the spatiotemporal graph convolutional neural network, the input data passes through the input layer, feature extraction unit, information aggregation transmission unit, feature fusion layer, time series recursive unit, dense layer and output layer in sequence; that is,
[0011] The input data is first input to the feature extraction unit through the input layer, and then the output of the feature extraction unit is used as the input of the information aggregation and transmission unit;
[0012] The output of the information aggregation and transmission unit is used as the input of the feature fusion layer, and the output of the feature fusion layer is used as the input of the time series recursive unit;
[0013] The output of the time series recurrent unit is used as the input of the dense layer, and the output of the dense layer is output through the output layer;
[0014] Step 4: Use the node-pipeline relationship matrix, pipeline elevation information matrix, node relationship adjacency matrix, pipe diameter information matrix, pipe length information matrix, and all node liquid level data matrices obtained in step 2 to train the spatiotemporal graph convolutional neural network;
[0015] Step 5. Collect real-time liquid level monitoring data from each monitoring node in the drainage network system, obtain a real-time liquid level data matrix based on the real-time liquid level monitoring data, input the real-time liquid level data matrix and the node-pipe relationship matrix, pipeline elevation information matrix, node relationship adjacency matrix, pipe diameter information matrix, and pipe length information matrix of the drainage network system into the trained spatiotemporal graph convolutional network, and output the liquid level data reconstruction results of the unmonitored nodes through the trained spatiotemporal graph convolutional network.
[0016] Furthermore, the pipe network topology data includes the connection relationship between the inspection well, the pump station forebay and the river outlet and the pipeline, the pipeline diameter, the pipeline length and the pipeline elevation.
[0017] Furthermore, the node-pipeline relationship matrix is:
[0018] Each inspection well, pump station forebay and river outlet is considered a node and numbered:
[0019]
[0020] Among them, G is the node-pipe relationship matrix, n represents the number of nodes in the drainage network system, and m represents the number of pipes in the drainage network system;
[0021]
[0022] Among them, G ij It is the element in the i-th row and j-th column of the node-pipeline relationship matrix G.
[0023] Furthermore, the pipeline elevation information matrix is:
[0024]
[0025] Where H is the pipeline elevation information matrix;
[0026]
[0027] Among them, h j,us_invert represents the upstream invert elevation of pipe j, h j,ds_invert represents the downstream invert elevation of pipe j, H ij is the element in the i-th row and j-th column of the matrix H.
[0028] Furthermore, the node relationship adjacency matrix is:
[0029]
[0030] Among them, A is the node relationship adjacency matrix;
[0031]
[0032] Among them, A ij is the element in the i-th row and j-th column of the node relationship adjacency matrix A.
[0033] Furthermore, the pipe diameter information matrix is:
[0034] Step 1: Set the search depth δ, search all nodes within the search depth range with node i as the root node, and record the set of searched nodes as node dataset N δ , computing node dataset N δ The standard deviation d of the diameter of all pipes formed by the internal node connection std :
[0035]
[0036] Among them, d k is the node dataset N δ The diameter of the kth pipe formed by the internal node connection, d is the node data set N δ The average diameter of all pipes formed by the internal node connection, N is the node data set N δ The total number of pipelines formed by internal node connections;
[0037] Step 2: Node i to node dataset N δ The pipe diameter weight f of internal node j w (d ij )for:
[0038] (1) If there is only one path from node i to node j, then
[0039]
[0040] Among them, α is the weight distribution parameter; d qj is the diameter of the pipe connecting node q and node j; q represents the node one depth level above node j on the path between node i and node j; e is the base of the natural logarithm; η qj is the depth level of the pipeline connecting node q and node j;
[0041] (2) If there are at least two paths from node i to node j, then
[0042]
[0043] Where q represents a node one depth level above node j on any path between node i and node j; d qj represents the diameter of the pipe connecting node q and node j; η qj is the depth level of the pipeline connecting node j to node q; f w (d qj ) is the pipe diameter weight from node q to node j;
[0044]
[0045] Where Q is the set of nodes one depth level above node j on all paths from node i to node j; |Q| is the number of nodes in set Q;
[0046] Step 3: D ij As the element in the i-th row and j-th column of the pipe diameter information matrix D;
[0047] Step 4: After processing each node in the drainage network system using the methods from Step 1 to Step 3, the pipe diameter information matrix D is obtained:
[0048]
[0049] Furthermore, the pipe length information matrix is:
[0050] Step 1: Set the search depth δ, search all nodes within the search depth range with node i as the root node, and record the set of searched nodes as node dataset N δ , computing node dataset N δ The standard deviation of the length of all pipes formed by the internal node connection l std :
[0051]
[0052] Among them, l k is the node dataset N δ The length of the kth pipeline formed by the connection of internal nodes, is the node dataset N δ The average length of all pipes formed by the internal node connection, N node data set N δ The total number of pipelines formed by internal node connections;
[0053] Step 2: Node i to node dataset N δ The pipe length weight f of internal node j w (l ij )for:
[0054] (1) If there is only one path from node i to node j, then
[0055]
[0056] Among them, α is the weight distribution parameter; l qj is the length of the pipe connecting node q and node j; q represents the node one depth level above node j on the path between node i and node j; e is the base of the natural logarithm; η qj is the depth level of the pipeline connecting node q and node j;
[0057] (2) If there are at least two paths from node i to node j, then
[0058]
[0059] Where q represents a node one depth level above node j on any path between node i and node j; d qj represents the length of the pipe connecting node q and node j; η qj is the depth level of the pipe connecting node j to node q;
[0060]
[0061] Where Q is the set of nodes one depth level above node j on all paths from node i to node j; |Q| is the number of nodes in set Q;
[0062] Step 3: L ij As the element in row i and column j of the pipe length information matrix L;
[0063] Step 4: After processing each node in the drainage network system using the methods from step 1 to step 3, the pipe length information matrix L is obtained:
[0064]
[0065] Furthermore, the liquid level data matrix of all nodes is obtained based on the historical liquid level data of each monitoring node, specifically:
[0066] Sort the historical liquid level data monitored by the i-th monitoring node in time series to form X p vector:
[0067] X i =[X i1 ,X i2 …,X iT’ ]
[0068] Among them, X it is the vector X i The t-th monitoring value in , that is, the t-th monitoring value monitored by the i-th monitoring node, T' is the total number of monitoring values, t = 1, 2, ..., T';
[0069] Then the matrix of all node liquid level data is X:
[0070]
[0071] Among them, the superscript T represents the transpose of the matrix;
[0072] In the matrix X, the elements of the rows corresponding to the nodes that are not monitored are set to 0.
[0073] Furthermore, the specific process of step 4 is as follows:
[0074] Step 4.1: According to the number of monitoring nodes M, input the number of monitoring nodes M in : Number of loss calculation monitoring nodes M loss =1:1 ratio, generate monitoring node combination library S;
[0075] That is, for each monitoring node combination in the monitoring node combination library S, the monitoring node is divided into two parts: input monitoring node and loss calculation monitoring node;
[0076] For each monitoring node combination in the monitoring node combination library S, a training sample is generated, specifically:
[0077] For any monitoring node combination in the monitoring node combination library S, only the liquid level data corresponding to the input monitoring node selected by this monitoring node combination is retained in the new liquid level data matrix X′, and the liquid level data of other monitoring nodes are set to 0. A training sample is formed using the node-pipeline relationship matrix, pipeline elevation information matrix, node relationship adjacency matrix, pipe diameter information matrix, pipe length information matrix and the new liquid level data matrix X′;
[0078] Step 42: Slidingly segment each training sample generated in step 41 according to a time window of a specified size to obtain a training sample library;
[0079] Step 43: Initialize the maximum number of training cycles to process and the training sample update frequency of each training cycle to epoch;
[0080] Step 44: Set the number of training cycles p = 1;
[0081] Step 45: Randomly select a monitoring node combination from the monitoring node combination library S;
[0082] Step 46: Initialize e=1;
[0083] Step 47: randomly obtain one training sample from the training sample set corresponding to the monitoring node combination selected in step 45, and use the selected current sample to train the spatiotemporal graph convolutional neural network;
[0084] The loss function calculation method during training is as follows: the spatiotemporal graph convolutional neural network is used to output the predicted results of the liquid level data of the monitoring nodes that are set to 0 in the current sample, and the loss function is calculated based on the predicted results and the actual liquid level data;
[0085] Step 48: Determine whether e=epoch;
[0086] If satisfied, proceed to step 49;
[0087] If not, set e=e+1 and return to step 47;
[0088] Step 49: Determine whether p=process is satisfied;
[0089] If satisfied, the entire training process ends and the trained spatiotemporal graph convolutional neural network is obtained;
[0090] If not satisfied, set p=p+1 and return to step 4 or 5.
[0091] Furthermore, the feature extraction unit includes GNN and fully connected layer, and the specific working process is as follows:
[0092] Take X′ as the input of the fully connected layer, and then take the output f(X′) of X′ after the fully connected layer as the input of GNN:
[0093] X′ D =GNN((W d *D+b d )⊙f(X′)),A)
[0094] X′ L =GNN((W l*L+b l )⊙f(X′)),A)
[0095] X′ H =GNN((W h *H+b h )⊙f(X′)),G)
[0096] Among them, W d 、W l and W h is the weight of GNN, b d 、b l and b h is the bias of GNN, * represents element multiplication, ⊙ represents matrix product, X′ D , X′ L and X′ H is the output of the feature extraction unit.
[0097] The beneficial effects of the present invention are:
[0098] The present invention forms a pipe diameter, pipe length and pipeline elevation information matrix based on the pipe network topology data, and uses a spatiotemporal graph convolutional neural network to perform physically constrained data transmission and aggregation on the liquid level data of the monitoring nodes according to the pipe diameter, pipe length and pipeline elevation information matrix, retaining the spatiotemporal characteristic relationship between the monitored nodes and the unmonitored nodes, and reconstructing the liquid level data of the unmonitored nodes more accurately and effectively.
[0099] The method provided by the present invention can reduce the number of monitoring nodes to be deployed. Only the liquid level data of a small number of monitoring nodes are needed to accurately reconstruct the liquid level data of all unmonitored nodes in the drainage network system. It is not only simple to operate, but also can reduce the cost of monitoring equipment and subsequent operation and maintenance management expenses.
[0100] The method provided by the present invention can achieve comprehensive perception of the drainage network system and build a drainage information supervision platform, so that the safe operation of the entire urban drainage pipeline can be grasped and controlled, provide scientific and advanced city-level hydraulic analysis capabilities, and more comprehensively evaluate the capabilities of the urban drainage network system. BRIEF DESCRIPTION OF THE DRAWINGS
[0101] Figure 1 The present invention is a flowchart of a method for reconstructing liquid level data of unmonitored nodes based on liquid level data of monitored nodes. DETAILED DESCRIPTION
[0102] Specific implementation method 1: Combination Figure 1 This embodiment describes a method for reconstructing liquid level data of unmonitored nodes based on liquid level data of monitored nodes, and the method specifically includes the following steps:
[0103] Step 1: Collect the pipe network topology data of the drainage pipe network system and the historical liquid level data of each monitoring node;
[0104] Step 2: Obtain the node-pipe relationship matrix, pipeline elevation information matrix, node relationship adjacency matrix, pipe diameter information matrix, and pipe length information matrix based on the pipe network topology data; obtain the liquid level data matrix of all nodes based on the historical liquid level data of each monitoring node;
[0105] Step 3: Build a spatiotemporal graph convolutional neural network. The working process of the spatiotemporal graph convolutional neural network is as follows:
[0106] In the spatiotemporal graph convolutional neural network, the input data passes through the input layer, feature extraction unit, information aggregation transmission unit (GNN), feature fusion layer (Conv1D), time series recurrent unit (GRU), dense layer (Dense) and output layer in sequence; that is,
[0107] The input data is first input to the feature extraction unit through the input layer, and then the output of the feature extraction unit is used as the input of the information aggregation and transmission unit;
[0108] The output of the information aggregation and transmission unit is used as the input of the feature fusion layer, and the output of the feature fusion layer is used as the input of the time series recursive unit;
[0109] The output of the time series recurrent unit is used as the input of the dense layer, and the output of the dense layer is output through the output layer;
[0110] Step 4: Use the node-pipeline relationship matrix, pipeline elevation information matrix, node relationship adjacency matrix, pipe diameter information matrix, pipe length information matrix, and all node liquid level data matrices obtained in step 2 to train the spatiotemporal graph convolutional neural network;
[0111] Step 5. Collect the real-time liquid level monitoring data of each monitoring node in the drainage pipe network system, and obtain the real-time liquid level data matrix based on the real-time liquid level monitoring data (the construction method is the same as that of matrix X, that is, the elements of the rows corresponding to the unmonitored nodes are set to 0). The real-time liquid level data matrix and the node-pipe relationship matrix, pipeline elevation information matrix, node relationship adjacency matrix, pipe diameter information matrix and pipe length information matrix of the drainage pipe network system are input into the trained spatiotemporal graph convolutional network. The reconstructed result of the liquid level data of the unmonitored nodes is output through the trained spatiotemporal graph convolutional network, that is, the liquid level data of the unmonitored nodes at the time corresponding to the collected real-time liquid level monitoring data is output.
[0112] Specific embodiment 2: This embodiment differs from specific embodiment 1 in that the pipe network topology data includes the connection relationship between the inspection well, the pump station forebay and the river outlet and the pipeline, the pipeline diameter, the pipeline length and the pipeline elevation.
[0113] Other steps and parameters are the same as those in the first embodiment.
[0114] Specific embodiment three: This embodiment differs from specific embodiment one or two in that the node-pipeline relationship matrix is:
[0115] Treat each inspection well, pump station forebay, and river outlet as a node and number each node (number each node 1, 2, ..., n in sequence, random numbering is sufficient):
[0116]
[0117] Among them, G is the node-pipe relationship matrix, n represents the number of nodes in the drainage network system, and m represents the number of pipes in the drainage network system;
[0118]
[0119] Among them, G ij It is the element in the i-th row and j-th column of the node-pipeline relationship matrix G.
[0120] Other steps and parameters are the same as those in the first or second embodiment.
[0121] Specific embodiment 4: This embodiment differs from any one of specific embodiments 1 to 3 in that the pipeline elevation information matrix is:
[0122]
[0123] Where H is the pipeline elevation information matrix;
[0124]
[0125] Among them, h j,us_invert represents the upstream invert elevation of pipe j, h j,ds_invert represents the downstream invert elevation of pipe j, H ij is the element in the i-th row and j-th column of the matrix H.
[0126] The other steps and parameters are the same as those in the first to third embodiments.
[0127] Specific embodiment 5: This embodiment differs from any one of specific embodiments 1 to 4 in that the node relationship adjacency matrix is:
[0128]
[0129] Among them, A is the node relationship adjacency matrix;
[0130]
[0131] Among them, Aij is the element in the i-th row and j-th column of the node relationship adjacency matrix A.
[0132] The other steps and parameters are the same as those in the first to fourth embodiments.
[0133] Specific embodiment 6: This embodiment differs from any one of specific embodiments 1 to 5 in that the pipe diameter information matrix is:
[0134] Step 1: Set the search depth δ, search all nodes within the search depth range with node i as the root node, and record the set of searched nodes as node dataset N δ , computing node dataset N δ The standard deviation d of the diameter of all pipes formed by the internal node connection std :
[0135]
[0136] Among them, d k is the node dataset N δ The diameter of the kth pipe formed by the internal node connection, d is the node data set N δ The average diameter of all pipes formed by the internal node connection, N is the node data set N δ The total number of pipelines formed by internal node connections;
[0137] Step 2: Node i to node dataset N δ The pipe diameter weight f of internal node j w (d ij )for:
[0138] (1) If there is only one path from node i to node j, then
[0139]
[0140] Wherein, α is the weight distribution parameter (in the present invention, the value is α=0.5); d qj is the diameter of the pipe connecting node q and node j; q represents the node one depth level above node j on the path between node i and node j (q may be node i itself); e is the base of the natural logarithm; η qj is the depth level of the pipeline connecting node q and node j (in this case η qj =1, the pipeline between the root node and the first-level leaf node is considered to be at the first depth level, the pipeline between the second-level leaf node and the third-level leaf node is considered to be at the second depth level, and so on);
[0141] (2) If there are at least two paths from node i to node j, then
[0142]
[0143] Where q represents a node one depth level above node j on any path between node i and node j; d qj represents the diameter of the pipe connecting node q and node j; η qj is the depth level of the pipeline connecting node j to node q; f w (d qj ) is the pipe diameter weight from node q to node j;
[0144]
[0145] Where Q is the set of nodes one depth level above node j on all paths from node i to node j; |Q| is the number of nodes in set Q;
[0146] Step 3: D ij As the element in the i-th row and j-th column of the pipe diameter information matrix D;
[0147] Step 4: After processing each node in the drainage network system using the methods of steps 1 to 3 (i.e., taking each node as the root node), obtain the pipe diameter information matrix D:
[0148]
[0149] The other steps and parameters are the same as those in the first to fifth embodiments.
[0150] The node search method in this embodiment is similar to a tree diagram. The search direction is the flow direction of the liquid. Starting from the root node, all leaf nodes from the 1st level to the δth level are obtained, and all the leaf nodes are combined into a node data set N. δ .
[0151] Specific embodiment 7: This embodiment differs from any one of specific embodiments 1 to 6 in that the pipe length information matrix is:
[0152] Step 1: Set the search depth δ, search all nodes within the search depth range with node i as the root node, and record the set of searched nodes as node dataset N δ , computing node dataset N δ The standard deviation of the length of all pipes formed by the internal node connection l std :
[0153]
[0154] Among them, l k is the node dataset N δThe length of the kth pipeline formed by the connection of internal nodes, is the node dataset N δ The average length of all pipes formed by the internal node connection, N node data set N δ The total number of pipelines formed by internal node connections;
[0155] Step 2: Node i to node dataset N δ The pipe length weight f of internal node j w (l ij )for:
[0156] (1) If there is only one path from node i to node j, then
[0157]
[0158] Wherein, α is the weight distribution parameter (the value in the present invention is α=0.5); l qj is the length of the pipe connecting node q and node j; q represents the node one depth level above node j on the path between node i and node j; e is the base of the natural logarithm; η qj is the depth level of the pipeline connecting node q and node j (in this case η qj =1);
[0159] (2) If there are at least two paths from node i to node j, then
[0160]
[0161] Where q represents a node one depth level above node j on any path between node i and node j; d qj represents the length of the pipe connecting node q and node j; η qj is the depth level of the pipe connecting node j to node q;
[0162]
[0163] Where Q is the set of nodes one depth level above node j on all paths from node i to node j; |Q| is the number of nodes in set Q;
[0164] Step 3: L ij As the element in row i and column j of the pipe length information matrix L;
[0165] Step 4: After processing each node in the drainage pipe network system using the methods of steps 1 to 3 (i.e., taking each node as the root node), obtain the pipe length information matrix L:
[0166]
[0167] The other steps and parameters are the same as those in the first to sixth embodiments.
[0168] Specific embodiment eight: This embodiment differs from any one of specific embodiments one to seven in that the liquid level data matrix of all nodes is obtained based on the historical liquid level data of each monitoring node, specifically:
[0169] Sort the historical liquid level data monitored by the i-th monitoring node in time series to form X p vector:
[0170] X i =[X i1 ,X i2 …,X iT’ ]
[0171] Among them, X it is the vector X i The t-th monitoring value in , that is, the t-th monitoring value monitored by the i-th monitoring node, T' is the total number of monitoring values, t = 1, 2, ..., T';
[0172] Then the matrix of all node liquid level data is X:
[0173]
[0174] Among them, the superscript T represents the transpose of the matrix;
[0175] In the matrix X, the elements of the rows corresponding to the nodes that are not monitored are set to 0.
[0176] The other steps and parameters are the same as those in the first to seventh embodiments.
[0177] Specific embodiment 9: This embodiment differs from any one of specific embodiments 1 to 8 in that the specific process of step 4 is as follows:
[0178] Step 4.1: According to the number of monitoring nodes M, input the number of monitoring nodes M in : Number of loss calculation monitoring nodes M loss =1:1 ratio, generate monitoring node combination library S (where m in ∪M loss =M,M in ∩M loss =0);
[0179] That is, for each monitoring node combination in the monitoring node combination library S, the monitoring nodes are divided into two parts: input monitoring nodes and loss calculation monitoring nodes, and the combination library S includes all possible monitoring node combinations;
[0180] For each monitoring node combination in the monitoring node combination library S, a training sample is generated, specifically:
[0181] For any monitoring node combination in the monitoring node combination library S, only the liquid level data corresponding to the input monitoring node selected by this monitoring node combination is retained in the new liquid level data matrix X′, and the liquid level data of other monitoring nodes are set to 0. A training sample is formed using the node-pipeline relationship matrix, pipeline elevation information matrix, node relationship adjacency matrix, pipe diameter information matrix, pipe length information matrix and the new liquid level data matrix X′;
[0182] Step 42: Slidingly segment each training sample generated in step 41 according to a time window of a specified size to obtain a training sample library;
[0183] For example, for a node with 20 monitoring data, if the time window length is set to 10 monitoring data, the first to the tenth monitoring data are used as a training sample, the second to the eleventh monitoring data are used as a training sample, and so on, the eleventh to the twentieth monitoring data are used as a training sample;
[0184] Step 43: Initialize the maximum number of training cycles to process and the training sample update frequency of each training cycle to epoch;
[0185] Step 44: Set the number of training cycles p = 1;
[0186] Step 45: Randomly select a monitoring node combination from the monitoring node combination library S;
[0187] Step 46: Initialize e=1;
[0188] Step 47: randomly obtain one training sample from the training sample set corresponding to the monitoring node combination selected in step 45, and use the selected current sample to train the spatiotemporal graph convolutional neural network;
[0189] The loss function calculation method during training is as follows: the spatiotemporal graph convolutional neural network is used to output the predicted results of the liquid level data of the monitoring nodes that are set to 0 in the current sample, and the loss function is calculated based on the predicted results and the actual liquid level data;
[0190] It should be noted that the spatiotemporal graph convolutional neural network can reconstruct the liquid level values corresponding to all zero elements in the output liquid level data matrix, but the training process requires the use of the reconstruction results corresponding to the monitoring node data set to 0 and the actual data corresponding to the monitoring nodes set to 0;
[0191] Step 48: Determine whether e=epoch;
[0192] If satisfied, proceed to step 49;
[0193] If not, set e=e+1 and return to step 47;
[0194] Step 49: Determine whether p=process is satisfied;
[0195] If satisfied, the entire training process ends and the trained spatiotemporal graph convolutional neural network is obtained;
[0196] If not satisfied, set p=p+1 and return to step 4 or 5.
[0197] The other steps and parameters are the same as those in Specific Embodiments 1 to 8.
[0198] Specific embodiment 10: This embodiment differs from any one of specific embodiments 1 to 9 in that the feature extraction unit includes a GNN and a fully connected layer. The specific working process is as follows:
[0199] Take X′ as the input of the fully connected layer, and then take the output f(X′) of X′ after the fully connected layer as the input of GNN:
[0200] X′ D =GNN((W d *D+b d )⊙f(X′)),A)
[0201] X′ L =GNN((W l *L+b l )⊙f(X′)),A)
[0202] X′ H =GNN((W h *H+b h )⊙f(X′)),G)
[0203] Among them, W d 、W l and W h is the weight of GNN, b d 、b l and b h is the bias of GNN, * represents element-wise multiplication (Hadamard product), ⊙ represents matrix product, X′ D , X′ L and X′ H is the output of the feature extraction unit.
[0204] The other steps and parameters are the same as those in Specific Embodiments 1 to 9.
[0205] The feature extraction unit uses the pipeline elevation information matrix, the pipe diameter information matrix and the pipe length information matrix to extract feature information that meets the hydraulic change pattern from the liquid level information data of the limited monitoring nodes.
[0206] Example
[0207] Take a drainage network system in City M as an example. The drainage network system consists of 534 nodes (including 532 inspection wells, 1 pump station forebay, and 1 river outlet) and 539 pipe sections. The drainage capacity of the terminal rainwater pump station is 10.72m 3 The system covers a total area of 172ha, with a pipe length of 12,514m and a pipe diameter range of DN300-DN2400. Seven inspection wells are located at the monitoring nodes where sensors are deployed.
[0208] like Figure 1 As shown, it specifically relates to a method for reconstructing global unmonitored node liquid level data based on limited monitored node liquid level monitoring data; the method comprises the following steps:
[0209] Step 1: Collect the drainage network topology data (such as GIS data) and the historical liquid level data of each monitoring node throughout 2020;
[0210] The pipe network topology data includes the connection relationship between the inspection well, the pump station forebay and the river outlet and the pipeline, the pipeline diameter, the pipeline length and the pipeline elevation.
[0211] Step 2: Obtain the node-pipe relationship matrix, pipeline elevation information matrix, node relationship adjacency matrix, pipe diameter information matrix, and pipe length information matrix based on the pipe network topology data; obtain the liquid level data matrix of all nodes based on the historical liquid level data of each monitoring node;
[0212] The node-pipeline relationship matrix is:
[0213] Treat each inspection well, pump station forebay, and river outlet as a node and number each node (number each node 1, 2, ..., n in sequence, random numbering is sufficient):
[0214]
[0215] Among them, G is the node-pipe relationship matrix, n represents the number of nodes in the drainage network system, and m represents the number of pipes in the drainage network system;
[0216]
[0217] Among them, G ij It is the element in the i-th row and j-th column of the node-pipeline relationship matrix G.
[0218] The pipeline elevation information matrix is:
[0219]
[0220] Where H is the pipeline elevation information matrix;
[0221]
[0222] Among them, h j,us_invert represents the upstream invert elevation of pipe j, h j,ds_invert represents the downstream invert elevation of pipe j, H ij is the element in the i-th row and j-th column of the matrix H.
[0223] The node relationship adjacency matrix is:
[0224]
[0225] Among them, A is the node relationship adjacency matrix;
[0226]
[0227] Among them, A ij is the element in the i-th row and j-th column of the node relationship adjacency matrix A.
[0228] The pipe diameter information matrix is:
[0229] Step 1: Set the search depth δ = 15, search all nodes within the search depth range with node i as the root node, and record the set of searched nodes as node data set N δ , computing node dataset N δ The standard deviation d of the diameter of all pipes formed by the internal node connection std :
[0230]
[0231] Among them, d k is the node dataset N δ The diameter of the kth pipe formed by the internal node connection, d is the node data set N δ The average diameter of all pipes formed by the internal node connection, N is the node data set N δ The total number of pipelines formed by internal node connections;
[0232] Step 2: Node i to node dataset N δ The pipe diameter weight f of internal node j w (d ij )for:
[0233] (1) There is only one path from node i to node j, then
[0234]
[0235] Wherein, α is the weight distribution parameter (in the present invention, the value is α=0.5); d qj is the diameter of the pipe connecting node q and node j; q represents the node one depth level above node j on the path between node i and node j (q may be node i itself); e is the base of the natural logarithm; η qj is the depth level of the pipeline connecting node q and node j;
[0236] (2) If there are at least two paths from node i to node j, then
[0237]
[0238] Where q represents a node one depth level above node j on any path between node i and node j, and d qj represents the diameter of the pipe connecting node q and node j, η qj is the depth level of the pipeline connecting node j to node q, f w (d qj ) is the pipe diameter weight from node q to node j;
[0239]
[0240] Where Q is the set of nodes located one depth level above node j on all paths from node i to node j, and |Q| is the number of nodes in set Q;
[0241] Step 3: D ij As the element in the i-th row and j-th column of the pipe diameter information matrix D;
[0242] Step 4: After processing each node in the drainage network system using the methods of steps 1 to 3 (i.e., taking each node as the root node), obtain the pipe diameter information matrix D:
[0243]
[0244] The pipe length information matrix is:
[0245] Step 1: Set the search depth δ = 15, search all nodes within the search depth range with node i as the root node, and record the set of searched nodes as node data set N δ , computing node dataset N δ The standard deviation of the length of all pipes formed by the internal node connection l std :
[0246]
[0247] Among them, l k is the node dataset N δ The length of the jth pipe formed by connecting the internal nodes, is the node dataset N δ The average length of all pipes formed by the internal node connection, N node data set N δ The total number of pipelines formed by internal node connections;
[0248] Step 2: Node i to node dataset N δ The pipe length weight f of internal node j w (l ij )for:
[0249] (1) If there is only one path from node i to node j, then
[0250]
[0251] Wherein, α is the weight distribution parameter (the value in the present invention is α=0.5); l qj is the length of the pipe connecting node q and node j; q represents the node one depth level above node j on the path between node i and node j; e is the base of the natural logarithm; η qj is the depth level of the pipeline connecting node q and node j (in this case η qj =1);
[0252] (2) If there are at least two paths from node i to node j, then
[0253]
[0254] Where q represents a node one depth level above node j on any path between node i and node j, and d qj represents the length of the pipe connecting node q and node j, η qj is the depth level of the pipe connecting node j to node q;
[0255] Where Q is the set of nodes located one depth level above node j on all paths from node i to node j, and |Q| is the number of nodes in set Q;
[0256] Step 3: L ij As the element in row i and column j of the pipe length information matrix L;
[0257] Step 4: After processing each node in the drainage pipe network system using the methods of steps 1 to 3 (i.e., taking each node as the root node), obtain the pipe length information matrix L:
[0258]
[0259] Sort the historical liquid level data monitored by the i-th monitoring node in time series to form X p vector:
[0260] X i =[X i1 ,X i2 …,X iT’ ]
[0261] Among them, X it is the vector X i The t-th monitoring value in , t=1,2,…,T', T' is the total number of monitoring values;
[0262] Then the matrix of all node liquid level data is X:
[0263]
[0264] In the matrix X, the elements of the rows corresponding to the nodes that are not monitored are set to 0.
[0265] Step 3: Build a spatiotemporal graph convolutional neural network. The working process of the spatiotemporal graph convolutional neural network is as follows:
[0266] In the spatiotemporal graph convolutional neural network, the input data passes through the input layer, feature extraction unit, information aggregation transmission unit (GNN), feature fusion layer (Conv1D), time series recurrent unit (GRU), dense layer (Dense) and output layer in sequence; that is,
[0267] The input data is first input to the feature extraction unit through the input layer, and then the output of the feature extraction unit is used as the input of the information aggregation and transmission unit;
[0268] The output of the information aggregation and transmission unit is used as the input of the feature fusion layer, and the output of the feature fusion layer is used as the input of the time series recursive unit;
[0269] The output of the time series recurrent unit is used as the input of the dense layer, and the output of the dense layer is output through the output layer;
[0270] Among them, the feature extraction unit includes GNN and fully connected layer, and the specific working process is as follows:
[0271] Take X′ as the input of the fully connected layer, and then take the output f(X′) of X′ after the fully connected layer as the input of GNN:
[0272] X′ D =GNN((W d *D+b d)⊙f(X′)),A)
[0273] X′ L =GNN((W l *L+b l )⊙f(X′)),A)
[0274] X′ H =GNN((W h *H+b h )⊙f(X′)),G)
[0275] Among them, W d 、W l and W h is the weight of GNN, b d 、b l and b h is the bias of GNN, * represents element-wise multiplication (Hadamard product), ⊙ represents matrix product, X′ D , X′ L and X′ H is the output of the feature extraction unit.
[0276] Step 4: Use the node-pipeline relationship matrix, pipeline elevation information matrix, node relationship matrix, pipe diameter information matrix, pipe length information matrix, and all node liquid level data matrices obtained in step 2 to train the spatiotemporal graph convolutional neural network;
[0277] In step 4, the spatiotemporal graph convolutional network PyGNN is trained using the blunt masking training strategy. The specific training process is as follows:
[0278] Step 4.1: According to the number of monitoring nodes M, input the number of monitoring nodes M in : Number of loss calculation monitoring nodes M loss =1:1 ratio, generate monitoring node combination library S (where M in ∪M loss =M,M in ∩M loss =0);
[0279] That is, for each monitoring node combination in the monitoring node combination library S, the monitoring nodes are divided into two parts: input monitoring nodes and loss calculation monitoring nodes, and the combination library S includes all possible monitoring node combinations;
[0280] For each monitoring node combination in the monitoring node combination library S, a training sample is generated, specifically:
[0281] For any monitoring node combination in the monitoring node combination library S, only the liquid level data corresponding to the input monitoring node selected by this monitoring node combination is retained in the new liquid level data matrix X′, and the liquid level data of other monitoring nodes are set to 0. A training sample is formed using the node-pipeline relationship matrix, pipeline elevation information matrix, node relationship adjacency matrix, pipe diameter information matrix, pipe length information matrix and the new liquid level data matrix X′;
[0282] Since sensors are deployed at 7 monitoring nodes, the ratio of the number of selected monitoring nodes to the number of unselected monitoring nodes cannot be evenly distributed. Therefore, the monitoring nodes are distributed according to a 4:3 ratio, that is, 3 / 7 nodes are selected from the monitoring nodes, and the elements of the corresponding rows of the selected monitoring nodes in the matrix X are set to 0;
[0283] In the present invention, since 3 monitoring nodes need to be randomly selected from 7 monitoring nodes each time, there are 35 possible selections in total, that is, the number of samples included in the training sample library S is 35.
[0284] Step 42: Slidingly segment each training sample generated in step 41 according to a time window of a specified size to obtain a training sample library;
[0285] Step 43: Initialize the maximum number of training cycles to process and the training sample update frequency of each training cycle to epoch;
[0286] Step 44: Set the number of training cycles p = 1;
[0287] Step 45: Randomly select a monitoring node combination from the monitoring node combination library S;
[0288] Step 46: Initialize e=1;
[0289] Step 47: randomly obtain one training sample from the training sample set corresponding to the monitoring node combination selected in step 45, and use the selected current sample to train the spatiotemporal graph convolutional neural network;
[0290] The loss function calculation method during training is as follows: the spatiotemporal graph convolutional neural network is used to output the predicted results of the liquid level data of the monitoring nodes that are set to 0 in the current sample, and the loss function is calculated based on the predicted results and the actual liquid level data;
[0291] It should be noted that the spatiotemporal graph convolutional neural network can reconstruct the liquid level values corresponding to all zero elements in the output liquid level data matrix, but the training process requires the use of the reconstruction results corresponding to the monitoring node data set to 0 and the actual data corresponding to the monitoring nodes set to 0;
[0292] Step 48: Determine whether e=epoch;
[0293] If satisfied, proceed to step 49;
[0294] If not, set e=e+1 and return to step 47;
[0295] Step 49: Determine whether p=process is satisfied;
[0296] If satisfied, the entire training process ends and the trained spatiotemporal graph convolutional neural network is obtained;
[0297] If not satisfied, set p=p+1 and return to step 4 or 5.
[0298] Step 5. Collect real-time liquid level monitoring data from each monitoring node in the drainage network system, obtain a real-time liquid level data matrix based on the real-time liquid level monitoring data, input the real-time liquid level data matrix and the node-pipe relationship matrix, pipeline elevation information matrix, node relationship matrix, pipe diameter information matrix, and pipe length information matrix of the drainage network system into the trained spatiotemporal graph convolutional network, and output the liquid level data reconstruction results of the unmonitored nodes through the trained spatiotemporal graph convolutional network.
[0299] The above examples are merely illustrative of the calculation model and process of the present invention and are not intended to limit the embodiments of the present invention. Persons skilled in the art will readily appreciate that other variations or modifications based on the above description are possible. This list of embodiments is not exhaustive; however, any obvious variations or modifications derived from the technical solution of the present invention remain within the scope of protection of the present invention.
Claims
1. A method for reconstructing liquid level data of unmonitored nodes based on liquid level data of monitored nodes, characterized in that: The method specifically comprises the following steps: Step 1: Collect the pipe network topology data of the drainage pipe network system and the historical liquid level data of each monitoring node; Step 2: Obtain the node-pipe relationship matrix, pipeline elevation information matrix, node relationship adjacency matrix, pipe diameter information matrix, and pipe length information matrix based on the pipe network topology data; obtain the liquid level data matrix of all nodes based on the historical liquid level data of each monitoring node; Step 3: Build a spatiotemporal graph convolutional neural network. The working process of the spatiotemporal graph convolutional neural network is as follows: In the spatiotemporal graph convolutional neural network, the input data passes through the input layer, feature extraction unit, information aggregation transmission unit, feature fusion layer, time series recursive unit, dense layer and output layer in sequence; that is, The input data is first input to the feature extraction unit through the input layer, and then the output of the feature extraction unit is used as the input of the information aggregation and transmission unit; The output of the information aggregation and transmission unit is used as the input of the feature fusion layer, and the output of the feature fusion layer is used as the input of the time series recursive unit; The output of the time series recurrent unit is used as the input of the dense layer, and the output of the dense layer is output through the output layer; Step 4: Use the node-pipeline relationship matrix, pipeline elevation information matrix, node relationship adjacency matrix, pipe diameter information matrix, pipe length information matrix, and all node liquid level data matrices obtained in step 2 to train the spatiotemporal graph convolutional neural network; Step 5. Collect real-time liquid level monitoring data from each monitoring node in the drainage network system, obtain a real-time liquid level data matrix based on the real-time liquid level monitoring data, input the real-time liquid level data matrix and the node-pipe relationship matrix, pipeline elevation information matrix, node relationship adjacency matrix, pipe diameter information matrix, and pipe length information matrix of the drainage network system into the trained spatiotemporal graph convolutional network, and output the liquid level data reconstruction results of the unmonitored nodes through the trained spatiotemporal graph convolutional network.
2. The method of reconstructing the liquid level data of unmonitored nodes based on the liquid level data of monitored nodes according to claim 1, characterized in that: The pipe network topology data includes the connection relationship between the inspection well, the pump station forebay and the river outlet and the pipeline, the pipeline diameter, the pipeline length and the pipeline elevation.
3. The method of reconstructing the liquid level data of unmonitored nodes based on the liquid level data of monitored nodes according to claim 2, characterized in that: The node-pipeline relationship matrix is: Each inspection well, pump station forebay and river outlet is considered a node and numbered: Among them, G is the node-pipe relationship matrix, n represents the number of nodes in the drainage network system, and m represents the number of pipes in the drainage network system; Among them, G ij It is the element in the i-th row and j-th column of the node-pipeline relationship matrix G.
4. The method of reconstructing the liquid level data of unmonitored nodes based on the liquid level data of monitored nodes according to claim 3, characterized in that: The pipeline elevation information matrix is: Where H is the pipeline elevation information matrix; Among them, h j,us_invert represents the upstream invert elevation of pipe j, h j,ds_invert represents the downstream invert elevation of pipe j, H ij is the element in the i-th row and j-th column of the matrix H.
5. The method of reconstructing the liquid level data of unmonitored nodes based on the liquid level data of monitored nodes according to claim 4, characterized in that: The node relationship adjacency matrix is: Among them, A is the node relationship adjacency matrix; Among them, A ij is the element in the i-th row and j-th column of the node relationship adjacency matrix A.
6. The method of reconstructing the liquid level data of unmonitored nodes based on the liquid level data of monitored nodes according to claim 5, characterized in that: The pipe diameter information matrix is: Step 1: Set the search depth δ, search all nodes within the search depth range with node i as the root node, and record the set of searched nodes as node dataset N δ , computing node dataset N δ The standard deviation d of the diameter of all pipes formed by the internal node connection std : Among them, d k is the node dataset N δ The diameter of the kth pipe formed by the connection of the internal nodes, is the node dataset N δ The average diameter of all pipes formed by the internal node connection, N is the node data set N δ The total number of pipelines formed by internal node connections; Step 2: Node i to node dataset N δ The pipe diameter weight f of internal node j w (d ij )for: (1) If there is only one path from node i to node j, then Among them, α is the weight distribution parameter; d qj is the diameter of the pipe connecting node q and node j; q represents the node one depth level above node j on the path between node i and node j; e is the base of the natural logarithm; η qj is the depth level of the pipeline connecting node q and node j; (2) If there are at least two paths from node i to node j, then Where q represents a node one depth level above node j on any path between node i and node j; d qj represents the diameter of the pipe connecting node q and node j; η qj is the depth level of the pipeline connecting node j to node q; f w (d qj ) is the pipe diameter weight from node q to node j; Where Q is the set of nodes one depth level above node j on all paths from node i to node j; |Q| is the number of nodes in set Q; Step 3: D ij As the element in the i-th row and j-th column of the pipe diameter information matrix D; Step 4: After processing each node in the drainage network system using the methods from Step 1 to Step 3, the pipe diameter information matrix D is obtained:
7. The method of reconstructing the liquid level data of unmonitored nodes based on the liquid level data of monitored nodes according to claim 6, characterized in that: The pipe length information matrix is: Step 1: Set the search depth δ, search all nodes within the search depth range with node i as the root node, and record the set of searched nodes as node dataset N δ , computing node dataset N δ The standard deviation of the length of all pipes formed by the internal node connection l std : Among them, l k is the node dataset N δ The length of the kth pipeline formed by the connection of internal nodes, is the node dataset N δ The average length of all pipes formed by the internal node connection, N node data set N δ The total number of pipelines formed by internal node connections; Step 2: Node i to node dataset N δ The pipe length weight f of internal node j w (l ij )for: (1) If there is only one path from node i to node j, then Among them, α is the weight distribution parameter; l qj is the length of the pipe connecting node q and node j; q represents the node one depth level above node j on the path between node i and node j; e is the base of the natural logarithm; η qj is the depth level of the pipeline connecting node q and node j; (2) If there are at least two paths from node i to node j, then Where q represents a node one depth level above node j on any path between node i and node j; d qj represents the length of the pipe connecting node q and node j; η qj is the depth level of the pipe connecting node j to node q; Where Q is the set of nodes one depth level above node j on all paths from node i to node j; |Q| is the number of nodes in set Q; Step 3: L ij As the element in row i and column j of the pipe length information matrix L; Step 4: After processing each node in the drainage pipe network system using the methods of steps 1 to 3, the pipe length information matrix L is obtained:
8. The method of reconstructing the liquid level data of unmonitored nodes based on the liquid level data of monitored nodes according to claim 7, characterized in that: The liquid level data matrix of all nodes is obtained based on the historical liquid level data of each monitoring node, specifically: Sort the historical liquid level data monitored by the i-th monitoring node in time series to form X p vector: X i =[X i1 ,X i2 …,X iT’ ] Among them, X it is the vector X i The t-th monitoring value in , that is, the t-th monitoring value monitored by the i-th monitoring node, T' is the total number of monitoring values, t = 1, 2, ..., T'; Then the matrix of all node liquid level data is X: Among them, the superscript T represents the transpose of the matrix; In the matrix X, the elements of the rows corresponding to the nodes that are not monitored are set to 0.
9. The method of reconstructing the liquid level data of unmonitored nodes based on the liquid level data of monitored nodes according to claim 8, characterized in that: The specific process of step 4 is as follows: Step 4.1: According to the number of monitoring nodes M, input the number of monitoring nodes M in : Number of loss calculation monitoring nodes M loss =1:1 ratio, generate monitoring node combination library S; That is, for each monitoring node combination in the monitoring node combination library S, the monitoring node is divided into two parts: input monitoring node and loss calculation monitoring node; For each monitoring node combination in the monitoring node combination library S, a training sample is generated, specifically: For any monitoring node combination in the monitoring node combination library S, only the liquid level data corresponding to the input monitoring node selected by the arbitrary monitoring node combination is retained in the new liquid level data matrix X′, and the liquid level data of other monitoring nodes are set to 0. A training sample is formed using the node-pipeline relationship matrix, pipeline elevation information matrix, node relationship adjacency matrix, pipe diameter information matrix, pipe length information matrix and the new liquid level data matrix X′; Step 42: Slidingly segment each training sample generated in step 41 according to a time window of a specified size to obtain a training sample library; Step 43: Initialize the maximum number of training cycles to process and the training sample update frequency of each training cycle to epoch; Step 44: Set the number of training cycles p = 1; Step 45: Randomly select a monitoring node combination from the monitoring node combination library S; Step 46: Initialize e=1; Step 47: randomly obtain one training sample from the training sample set corresponding to the monitoring node combination selected in step 45, and use the selected current sample to train the spatiotemporal graph convolutional neural network; The loss function calculation method during training is as follows: the spatiotemporal graph convolutional neural network is used to output the predicted results of the liquid level data of the monitoring nodes that are set to 0 in the current sample, and the loss function is calculated based on the predicted results and the actual liquid level data; Step 48: Determine whether e=epoch; If satisfied, proceed to step 49; If not, set e=e+1 and return to step 47; Step 49: Determine whether p=process is satisfied; If satisfied, the entire training process ends and the trained spatiotemporal graph convolutional neural network is obtained; If not satisfied, set p=p+1 and return to step 4 or 5.
10. The method of reconstructing the liquid level data of unmonitored nodes based on the liquid level data of monitored nodes according to claim 9, characterized in that: The feature extraction unit includes GNN and fully connected layer, and the specific working process is as follows: Take X′ as the input of the fully connected layer, and then take the output f(X′) of X′ after the fully connected layer as the input of GNN: X′ D =GNN((W d *D+b d )⊙f(X′)),A) X′ L =GNN((W l *L+b l )⊙f(X′)),A) X′ H =GNN((W h *H+b h )⊙f(X′)),G) Among them, W d 、W l and W h is the weight of GNN, b d 、b l and b h is the bias of GNN, * represents element multiplication, ⊙ represents matrix product, X′ D , X′ L and X′ H is the output of the feature extraction unit.
Citation Information
Patent Citations
Aluminum electrolysis anode effect monitoring method based on adaptive space-time diagram convolutional neural network
CN116484275A
Short wave prediction method based on space-time diagram neural network
CN116961805A