Water supply network GIS data physical attribute filling method based on graph neural network

By constructing a topology map and graph attention neural network model of the water supply network, the problem of missing GIS attributes in the water supply network was solved, and the accuracy of spatial correlation fusion between pipe segments and attribute filling was improved, thus meeting the actual needs of the project.

CN120910175AActive Publication Date: 2025-11-07TIANJIN UNIV

Patent Information

Application Number
CN202511011107.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-22
Publication Date
2025-11-07
Estimated Expiration
2045-07-22

AI Technical Summary

Technical Problem

Existing technologies, when dealing with missing GIS attributes in water supply networks, ignore the spatial correlation characteristics between pipe segments, resulting in inaccurate filling results that do not conform to engineering practices and are difficult to meet the data integrity and accuracy requirements of high-dimensional, strongly correlated pipe networks.

Method used

A graph neural network-based approach is used to construct a topology map of water supply pipe segment connections and combine it with a graph attention neural network model. Through spatial indexing and geometric alignment operations, the spatial and attribute relationships of pipe segments are integrated, and a weighted filling accuracy evaluation index is designed to achieve end-to-end attribute filling.

Benefits of technology

It improves the accuracy and logical consistency of filling missing pipeline attributes, ensures that the filling results meet engineering specifications, and realizes automated and accurate repair of pipeline data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120910175A_ABST
    Figure CN120910175A_ABST
Patent Text Reader

Abstract

The invention discloses a water supply network GIS data physical attribute filling method based on a graph neural network, and the method comprises the following steps: constructing a pipe section connection relation topological graph through a spatial index and geometric alignment operation, extracting pipe section physical attributes, and generating a missing mark; a pipe section attribute filling model is constructed based on a graph attention neural network, a graph attention feature aggregation module is adopted, a Gaussian kernel function is combined to express a multi-hop spatial dependency relationship, a composite attention weight is formed, neighbor effective attribute features are aggregated, and prediction missing attributes are decoded; and designing a weighted filling accuracy rate, and comprehensively evaluating the filling precision of the model through a weighting mode. According to the method, the topological connection relation between the pipe sections is fused into the graph neural network model, and the limitation that a traditional attribute filling method ignores pipe network spatial relevance is broken through; according to the constructed graph neural network attribute filling model, the pipe section space and the attribute association relationship are jointly incorporated into the model through a graph attention feature aggregation module, so that the inference accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of smart water affairs, in particular to a water supply network GIS data physical attribute filling method based on a graph neural network. BACKGROUND

[0002] In the process of digitization in the field of smart water affairs, as a core component of urban infrastructure, the completeness of the physical attribute data (such as pipe diameter, pipe material, interface form, completion date, etc.) of the water supply network directly affects the accuracy of the hydraulic model calibration, leakage detection and operation and maintenance decision. However, due to factors such as non-standard historical data recording, missing construction data, and sensor failure, large-scale missing phenomena often occur in the geographic information system (GIS) attribute data of the pipe network. The current mainstream filling technology has significant limitations: traditional statistical methods (such as mean filling and regression filling) and simple machine learning methods treat the pipe network as independent data points, ignoring the spatial correlation characteristics between pipe segments; clustering algorithms based on undirected graphs (such as k-nearest neighbor algorithm) lack consideration of the impact of neighbor missing and the correlation between attributes, resulting in low accuracy and easy generation of filling results that do not conform to engineering practices. With the expansion and intelligent upgrading of urban pipe networks, there is an urgent need for a new technology that can integrate the spatial and attribute correlation of pipe segments and comprehensively fill missing attributes to solve the technical bottlenecks of traditional methods in handling high-dimensional and strongly correlated pipe network GIS attribute missing, and to meet the requirements of data completeness and accuracy in engineering practical applications. SUMMARY

[0003] To overcome the low accuracy of traditional filling technology in complex missing scenarios, the main purpose of the present application is to provide a water supply network GIS data physical attribute filling method based on a graph neural network, which integrates the pipe segment connection relationship topology graph and the graph attention neural network model, and solves the accuracy problem of pipe network modeling and analysis when handling high-dimensional and strongly correlated pipe network GIS attribute missing.

[0004] To achieve the aforementioned application purposes, the technical solutions adopted by the present application include:

[0005] A water supply network GIS data physical attribute filling method based on a graph neural network, comprising the following steps:

[0006] S1: Construct a pipe segment connection relationship topology graph through spatial indexing and geometric alignment operations, convert the pipe segment connection relationship into an undirected graph network, extract the pipe segment physical attributes, and generate a missing label;

[0007] S2: Construct a pipe segment attribute filling model based on a graph attention neural network, use a graph attention feature aggregation module, combine a Gaussian kernel function to express multi-hop spatial dependence relationships, form a composite attention weight, aggregate neighbor effective attribute features, and decode and predict missing attributes;

[0008] S3: Model performance evaluation, considering the difference in engineering importance of different attributes, designing weighted filling accuracy, and comprehensively evaluating the filling accuracy of the model by weighting.

[0009] The step S1 of constructing the pipe segment connection relationship topology graph comprises the following steps:

[0010] S1-1: Read the pipe network data in Shapefile format, and calculate the geometric center coordinates of each pipe segment as the spatial reference;

[0011] S1-2: Adopt R-tree spatial index and buffer area to quickly search for neighbor pipe segments;

[0012] S1-3: Align the geometric bodies through Snap operation, eliminate data collection errors, detect and verify pipe segment contact points;

[0013] S1-4: For neighbor pipe segments meeting the physical constraint conditions, take the midpoint coordinates as the graph vertices, and create a topology graph with the pipe segment connection relationship as the edge, and the vertex attribute set includes pipe diameter, material, interface form, and completion date.

[0014] The construction method of the R-tree spatial index structure in the step S1-2 is as follows:

[0015] S1-2-1) Data preprocessing: extend the pipe segment geometric body to a buffer area, and the buffer distance d buffer Adaptively adjust according to the pipe network density, for example: d buffer = 0.0005m in dense areas, and d buffer = 0.002m in sparse areas;

[0016] S1-2-2) Index insertion: insert the bounding box of the buffer area into the R-tree index to establish a spatial hierarchical structure;

[0017] S1-2-3) Neighboring query: execute index.nearest on the current pipe segment to quickly return the candidate neighboring pipe segments in the buffer area.

[0018] The Snap operation in the step S1-3 is used for geometric coordinate alignment, and the specific steps are as follows:

[0019] S1-3-1) Coordinate adsorption: adsorb the current pipe segment to the geometric body of the neighboring pipe segment within a tolerance t snap = 0.001m to generate the aligned geometric body;

[0020] S1-3-2) Contact point calculation: perform geometric intersection on the aligned geometric body and the neighboring pipe segment, and if the result is a non-empty point set and meets the physical constraint conditions, it is determined as an effective connection;

[0021] S1-3-3) Abnormal processing: if the contact point is a multi-point set, select the contact point closest to the midpoint of both as the effective connection point.

[0022] The physical constraint condition in step S1-4 is:

[0023]

[0024] In the formula: d u , d v —respectively the distance from the contact point to the midpoint of the current pipe segment and the adjacent pipe segment; l u , l v —respectively the length of the current pipe segment and the adjacent pipe segment.

[0025] The method for extracting the physical properties of the pipe segment in step S1 is:

[0026] Let the original attribute feature of the current node u be wherein is a real number set used to define the model parameter value space, and the attribute feature expression is as follows:

[0027] h u =[pipe diameter code, pipe material code, interface form code, completion date code].

[0028] The method for generating the missing label in step S1 is: let the missing label m u ∈{0,1} 4 , 1 represents missing, and 0 represents existing; the generation is divided into two cases of training phase and reasoning phase, the training phase simulates the missing scene in the real data through random masking to teach the model how to reason when part of the information is missing; in the reasoning phase, the model needs to detect the missing state of each attribute in the input data in actual application, generate a binary vector according to the detection result to identify the missing position; fill the detected missing attribute position with 0, and input the effective attribute feature h′ u of the model, and the calculation formula is as follows:

[0029] h′ u = Wh u ⊙(1-m u );

[0030] In the formula: ⊙—element-wise multiplication, i.e. Hadamard product, which suppresses the influence of missing attributes; —feature projection matrix, which projects the original feature h u to a high-dimensional space, and d′ is the hidden layer dimension.

[0031] The pipe segment attribute filling model is constructed based on the graph attention neural network in step S2, including the following steps:

[0032] S2-1) Weight calculation: Introduce a Gaussian kernel term into the graph attention weight calculation to form a composite attention weight e uv ; Normalize to get dynamic weight a by Softmax function uv ; The specific calculation formula is as follows

[0033]

[0034] In the formula: e uv Gaussian kernel term dynamic weight; LeakyReLU is an improved neural network activation function Attention mechanism parameter vector, which maps the spliced features to scalar attention scores; h′ v Effective attribute features of neighbor node v; || is a vector splicing operation, and the dimension after splicing is 2d′×1; d uv The number of shortest path hops between two nodes Gaussian kernel distance attenuation coefficient; a uv Normalized attention weight Neighbor set of node u; k is taken in turn Each node in the set.

[0035] S2-2) Missing attribute filling:

[0036] S2-2-1) Set the graph attention feature aggregation module, first use the shared weight matrix W g Transform the effective attribute features h′ v of the neighbor nodes, and then aggregate according to the attention weight a uv , Finally, the current node aggregation result z u ; The aggregation result will be used as the unified feature representation of multi-attribute decoding, and its expression is as follows:

[0037]

[0038] In the formula: W g GAT layer shared weight matrix

[0039] S2-2-2) Decode the aggregated feature vector z u , and then fill in the corresponding missing attributes according to the missing label of the current node; The prediction result decoding and filling formula is as follows:

[0040]

[0041] In the formula: Decoded predicted attribute features, consistent with the dimension of the original attribute features Output decoding matrix - output bias vector; m u - missing flag; h u - original attribute feature;

[0042] S2-2-3) To extract the predicted bin result, filter out the neighbor nodes in the bin and extract their completion dates:

[0043]

[0044] bin u - predicted bin result; - completion date bin prediction value; θ - weight threshold value; - filtered high-weight neighbor node set; y v - completion date of neighbor v; bin(·) - date bin mapping function;

[0045] Set the mode decision mechanism to take the mode of the dates of the high-weight nodes filtered out in the bin as the filling result of the completion date of the current node The operation formula is as follows:

[0046]

[0047] mode(·) - take the mode of the set, i.e. the highest frequency date;

[0048] S2-3) Model parameter optimization, including the following steps:

[0049] S2-3-1) Design of loss function, the model loss function is as follows:

[0050]

[0051] where: - total number of nodes in the current training batch; - real attribute vector of node u; (·) °2 - element-wise square operation; - matrix Frobenius norm; - vector L2 norm; λ - regularization coefficient, determined by cross-validation;

[0052] S2-3-2) Parameter optimization: calculate the loss function Then get the gradient of each parameter through backpropagation automatic differentiation, and update the parameters and minimize Repeat the forward-backward process until the loss function converges, and σ reaches the optimal value, so that the model balances the topological correlation modeling and the accuracy of missing filling; The update of σ needs to satisfy the non-negative constraint:

[0053]

[0054] wherein: ε - a small positive value;

[0055] The trainable parameters include: feature projection matrix W, attention vector a, Gaussian kernel parameter σ, GAT layer shared weight matrix W g , output decoding matrix V and output bias vector b, which are optimized through end-to-end training.

[0056] The weighted filling accuracy calculation formula in the step S3 is as follows:

[0057]

[0058] wherein: k - attribute index; w k - attribute importance weight; N miss,k - the number of missing samples of attribute k in the test set; - the filling value of attribute k of node u; - the true value of attribute k of node u; τ k - attribute tolerance threshold; - indicator function, 1 if the condition is true, otherwise 0.

[0059] Compared with the prior art, the beneficial effects of the present application are:

[0060] (1) Based on the method of spatial index and geometric alignment, the construction of the topological graph is more efficient, and the topological connection relationship between pipe sections is integrated into the graph neural network model, which breaks through the limitation of traditional attribute filling methods that ignore the spatial correlation of pipe networks.

[0061] (2) The graph neural network attribute filling model constructed by the graph attention feature aggregation module integrates the spatial and attribute correlation of pipe sections into the model, while suppressing the influence of missing attributes of neighbor nodes on the attribute filling of the current node, solving the problem of insufficient robustness of traditional methods in complex missing scenarios, and improving the inference accuracy.

[0062] (3) The attribute filling method realizes end-to-end automatic learning, from the input of water supply network GIS data to the output of physical attribute missing value filling results, and the whole process is automatically realized by the graph attention neural network model to integrate topology construction, feature coding, weight calculation and filling prediction into a unified framework. A piece of water supply network GIS data (which may contain missing attributes) can complete model training and fill its missing attributes, which is more in line with the actual engineering needs of water supply network attribute filling.

[0063] (4) The learning framework realizes multi-attribute collaborative filling, combines attribute coding system and regularization constraint, ensures that the filling result has logical consistency under engineering specification, and avoids generating results that do not conform to engineering conventions. BRIEF DESCRIPTION OF DRAWINGS

[0064] Figure 1 The overall framework diagram of the water supply network physical attribute filling method is shown in the figure.

[0065] Figure 2 The mapping diagram of the pipe section and its topological connection relationship is shown in the figure.

[0066] Figure 3 The principle diagram of the attribute filling algorithm of the graph attention neural network is shown in the figure. DETAILED DESCRIPTION

[0067] The following examples are exemplary descriptions of the main experimental evidence, not limited by the number of evidence to limit the core content and application implementation scope of the disclosed protection. It should be noted that in all these drawings and corresponding descriptions, only the concept, principle and representative experimental evidence of the disclosed embodiment of the present application are exemplarily shown. In the case of complete evidence chain, it is not necessary to show all the specific details and extended details of each embodiment listed in the present application.

[0068] Unless otherwise defined, the technical terms used in the following examples have the same meaning as generally understood by those skilled in the art to which the present application belongs.

[0069] The present application aims to provide a water supply network GIS data physical attribute filling method that combines the water supply pipe section connection relationship topological graph and the graph attention neural network model, and realizes accurate data repair through the following technical innovations:

[0070] (1) Construct the pipe section connection relationship topological graph and extract the pipe section physical attributes and missing features: construct the pipe network topological graph through spatial indexing and geometric alignment operation, convert the pipe section connection relationship into an undirected graph network, and integrate the spatial dependency relationship between pipe sections into the graph neural network; design a multi-attribute standardization coding system (such as one-hot encoding, time binning), to ensure that the filling result conforms to the engineering specification; introduce the missing mark, convert the original attribute feature into an effective attribute feature input model that masks the missing attribute, so that the model can suppress the influence of neighbor node missing attributes on the filling result.

[0071] (2) Construct the pipe section attribute filling model based on the graph attention neural network: propose a dynamic weighting model that combines the Gaussian kernel function and the attention mechanism, to adaptively adjust the neighbor node influence weight; establish a single-layer graph attention feature aggregation module to aggregate the effective attributes of neighbor nodes, and finally obtain the filling result of the comprehensive pipe section spatial and attribute correlation; realize multi-attribute collaborative filling of pipe diameter, pipe material, etc., and enhance the data logical consistency.

[0072] (3) Model performance evaluation: Considering the importance of the physical properties of the pipe section in engineering, the weighted imputation accuracy (WIA) evaluation index is set to evaluate the prediction accuracy of the model. By introducing attribute importance weight and tolerance threshold, the imputation accuracy of pipe diameter, pipe material, interface form and completion date and other attributes is quantified scientifically to ensure that the model output results meet the actual needs of engineering.

[0073] Example 1:

[0074] The present application provides a water supply network GIS data physical attribute imputation method based on graph neural network. By integrating spatial topological relationship and deep learning technology, the technical bottleneck of traditional methods in handling missing pipe network attributes is solved, and the overall framework is as shown in Figure 1 The water supply network physical attribute imputation method described in the present application is further described below in conjunction with the drawings and through specific embodiments:

[0075] Step 1: Build pipe section connection relationship topology graph and extract pipe section physical attributes and missing features

[0076] (1) Construction of pipe section connection relationship topology graph

[0077] Read the pipe network geographic information data in Shapefile format, calculate the geometric center coordinates of each pipe section to establish a spatial feature reference; use R-tree spatial index structure combined with buffer area to realize fast retrieval of neighbor pipe sections; align the geometric bodies through Snap operation to eliminate data collection errors, detect accurate contact points between pipe sections and perform validity verification; for neighbor pipe sections that meet the physical constraint conditions, create a pipe section connection relationship topology graph with the midpoint coordinates as the graph vertices; the vertex attribute set includes pipe diameter, material, interface form, completion date, etc. Figure 2 The mapping of pipe section and its topological connection relationship is shown.

[0078] The construction method of the R-tree spatial index structure is as follows:

[0079] 1) Data preprocessing: extend the pipe section geometric body to a buffer area, with a buffer distance d buffer Adaptively adjust according to the pipe network density (e.g., d buffer = 0.0005m in dense areas, d buffer = 0.002m in sparse areas);

[0080] 2) Index insertion: insert the bounding box of the buffer area into the R-tree index to establish a spatial hierarchical structure;

[0081] 3) Neighboring query: perform the index.nearest operation on the current pipe section to return the candidate neighboring pipe sections (default upper limit 20) within its buffer area, avoiding full traversal.

[0082] The Snap operation is used for geometric coordinate alignment, and the specific steps are as follows:

[0083] 1) Coordinate suction: Suction the end point of the current pipe segment geometry (G1) to the geometry of the adjacent pipe segment (G2) with a suction tolerance

[0084] t snap = 0.001m, to generate the aligned geometry G'1 = snap(G1, G2, t snap );

[0085] 2) Contact point calculation: Perform geometric intersection on G'1 and G2, and if the result is a non-empty point set and meets the physical constraint condition, it is determined as an effective connection;

[0086] 3) Abnormal handling: If the contact point is a multi-point set, select the contact point closest to the midpoint of both sides as the effective connection point.

[0087] The physical constraint condition is:

[0088]

[0089] In the formula: d u , d v —The distance from the contact point to the midpoint of the current pipe segment and the adjacent pipe segment, respectively; l u , l v —The length of the current pipe segment and the adjacent pipe segment, respectively.

[0090] (2) Attribute feature extraction

[0091] Let the original attribute feature (including possible missing values) of the current node u be ( is a real set used to define the numerical value space of the model parameters), and the attribute feature expression is as follows:

[0092] h u = [pipe diameter code, pipe material code, interface form code, completion date code]

[0093] The specific coding method of each attribute is as follows:

[0094] 1) Pipe diameter coding

[0095] According to the national standard, the continuous pipe diameter value is divided into 11 standard sizes (DN100-DN1400), and the non-standard size is matched as close as possible. Hot coding is used, for example, DN300 corresponds to the coding vector [0, 0, 1, 0, …, 0], and the dimension is 11.

[0096] 2) Pipe material and interface form coding

[0097] Both pipe and interface are categorical attributes, so the category in them can be directly one-hot encoded, and the number of categories is the dimension of the encoding vector.

[0098] 3) Completion date encoding

[0099] The completion date is divided into multiple time windows according to the "project name" and other information of each pipe segment in the pipe network data, and then one-hot encoded.

[0100] (3) Missing marker generation

[0101] Let the missing marker m u ∈{0,1} 4 , 1 represents missing, and 0 represents existing. The missing marker is a 4-dimensional binary vector, for example, [1, 0, 0, 1] represents missing pipe diameter and date. Its generation is divided into two cases: training phase and inference phase:

[0102] 1) Training phase: artificial simulation of missing

[0103] Simulate the missing scenario in real data by random masking to teach the model how to reason when some information is missing. Mainly, according to the preset proportion, randomly mask part of the attributes of the training set samples, so that the model learns to use the non-missing attributes and topological relationships to fill in the missing values.

[0104] 2) Inference phase: automatic detection of real missing

[0105] This phase is used to handle natural missing in actual business data. The model needs to detect the missing state of each attribute in the input data in actual application, and generate a binary vector according to the detection result to identify the missing position.

[0106] This step not only completes the detection of attribute values that are empty (NaN), but also includes the detection of outliers. Outliers are values that are outside the reasonable range, such as pipe diameter of 0 or negative, missing any part of the completion date, and other attribute values that are not within the design data range, which are marked as missing.

[0107] Fill the detected missing attribute position with 0 to avoid inconsistent input dimensions. Therefore, we need to filter the missing for each node and retain the valid features. Therefore, the valid attribute features h′ u The calculation formula is as follows:

[0108] h′ u =Wh u ⊙(1-m u )

[0109] In the formula: ⊙ - element-wise multiplication (Hadamard product), suppress the influence of missing attributes; Feature projection matrix, which projects the original feature hx to high dimensional space (d' is the hidden layer dimension).

[0110] Second step: building pipe segment attribute filling model based on graph attention neural network

[0111] In the water supply network attribute filling task, the topological connection relationship between pipe segments can more effectively reflect the attribute correlation than the simple spatial distance. Therefore, the shortest path jump number is used to quantify the topological distance: the distance of directly connected pipe segments is defined as 1, and the distance of pipe segments connected through an intermediate pipe segment is defined as 2. Based on the pre-computed jump distance, the method designs a single-layer graph attention network structure, which expresses the multi-hop spatial dependence relationship through a Gaussian kernel function, and can perceive the remote topological association without stacking multiple layers of network. The principle diagram of the algorithm is shown in Figure 3 .

[0112] (1) Weight calculation

[0113] To fuse the spatial and attribute correlation, the Gaussian kernel term is introduced into the graph attention weight calculation to form a composite attention weight. The weight is normalized by the Softmax function to generate a dynamic weight that captures the attribute similarity and multi-hop topological association strength. The specific calculation formula is as follows

[0114]

[0115] In the formula: e nv Dynamic weight containing Gaussian kernel term; LeakyReLU - an improved neural network activation function; Attention mechanism parameter vector, which maps the concatenated features to a scalar attention score; h′ v Effective attribute feature of neighbor node v; || - vector concatenation operation, the dimension after concatenation is 2d' x 1; d uv Shortest path jump number between two nodes; Gaussian kernel distance decay coefficient (scalar); a uv Normalized attention weight; Neighbor set of node u; k - each node in is taken in turn.

[0116] (2) Missing attribute filling module

[0117] 1) Graph attention feature aggregation module

[0118] A single-layer graph attention neural network (GAT) is used to aggregate the effective attribute features of neighbor nodes by setting a graph attention feature aggregation module. The effective attribute features h′ g of neighbor nodes are aggregated through a shared weight matrix W vTransform, and then according to the attention weight α uv Weighted aggregation, get the current node aggregation result z u The aggregation result will be used as a unified feature representation for multi-attribute decoding, whose expression is as follows:

[0119]

[0120] In the formula: W g The GAT layer shares the weight matrix.

[0121] 2) Missing attribute prediction result decoding

[0122] Then the neighbor node aggregation feature vector calculated above is decoded and converted into the original attribute feature form, and then the corresponding missing attributes are filled according to the missing label of the current node. The prediction result decoding and filling formula is as follows:

[0123]

[0124] In the formula: The decoded predicted attribute feature is consistent with the original attribute feature dimension; The output decoding matrix; The output bias vector; m u The missing label; h u The original attribute feature.

[0125] 3) Special processing module for completion date:

[0126] Previously, in order to simplify the calculation, the completion date was binned, so special processing is needed when outputting the prediction result to make the result in the form of completion date rather than binned result. First, extract the predicted binned result, filter out the neighbor nodes within the bin and extract their completion dates:

[0127]

[0128] In the formula: bin u The predicted binned result; The completion date binned prediction value; θ - The weight threshold value; The filtered high-weight neighbor node set; y v The completion date of neighbor v; bin(·) - Date binning mapping function.

[0129] Finally, set the mode decision mechanism to take the mode of the dates of the high-weight nodes filtered out within the bin as the filling result of the completion date of the current node The operation formula is as follows:

[0130]

[0131] mode(·) —— take the mode (the most frequent date).

[0132] (3) Model parameter optimization strategy

[0133] The trainable parameters include: feature projection matrix W, attention vector a, Gaussian kernel parameter σ, GAT layer shared weight matrix W g , output decoding matrix V and output bias vector b, which are optimized through end-to-end training.

[0134] 1) Design of loss function

[0135] While considering the loss constraint of missing position filling, regularization constraint is added to prevent model overfitting and improve model generalization ability. The model loss function is as follows:

[0136]

[0137] In the formula: — Total number of nodes in the current training batch; — Real attribute vector of node u; (·) °2 — Element-wise square operation; — Matrix Frobenius norm; — Vector L2 norm; λ — Regularization coefficient (hyperparameter), determined by cross-validation.

[0138] 2) Parameter optimization process

[0139] First, calculate the loss function Then calculate the gradient of the loss function with respect to each parameter through backpropagation automatic differentiation, and update the parameters using the Adam optimizer to minimize the loss function. Repeat the forward-backward process until the loss function converges and σ reaches the optimal value, so that the model balances the topological correlation modeling and the accuracy of missing filling. The update of σ needs to satisfy the non-negative constraint:

[0140]

[0141] In the formula: ε — A very small positive value.

[0142] Third step: Model performance evaluation

[0143] Considering the difference in engineering importance of different attributes, a weighted imputation accuracy (Weighted imputation Accuracy, WIA) is designed to comprehensively evaluate the filling accuracy of the model through weighted method. The average WIA value output in the general model training process is greater than 0.85, and the model is considered to have high accuracy. The WIA calculation formula is as follows:

[0144]

[0145] where: k - attribute index (e.g. 1 = pipe diameter, 2 = pipe material, 3 = joint type, 4 = completion date); w k - attribute importance weight; N miss,k - number of missing samples of attribute k in test set; - imputed value of attribute k for node u; - true value of attribute k for node u; τ k - attribute tolerance threshold; - indicator function (1 if condition is true, 0 otherwise).

[0146] Example 2: Application Case

[0147] (1) Construction of water supply network connection relationship topology graph

[0148] This example uses a water supply network containing 10 pipe segments as input data, and the pipe segment geometric information and connection relationship are shown in Table 1. The example network graph and the generated connection relationship topology graph are shown in Figure 1. The following describes the construction process of the network connection relationship topology graph in steps. Figure 2

[0149] Table 1: Example pipe segment geometric information and connection relationship table

[0150]

[0151] 1) Geometric center calculation

[0152] The spatial feature reference is established by calculating the geometric center of each pipe segment: P1:(5.0,0.0), P2:(15.0,2.5), P3:(17.5,10.0), P4:(10.0,12.5), P5:(2.5,5.0), P6:(22.5,7.5), P7:(27.5,7.5), P8:(32.5,2.5), P9:(7.5,12.5), P10:(12.5,15.0).

[0153] 2) Spatial index construction

[0154] An R-tree spatial index structure is used to create a buffer area (dense area buffer distance 0.0005m, sparse area 0.0002m) for each pipe segment, establishing a spatial hierarchical retrieval structure.

[0155] 3) Adjacent pipe segment detection

[0156] ​Perform index.nearest operation on each pipe segment to detect adjacent pipe segments (default upper limit 20): P1 end point (10, 0) is adjacent to P2 start point (10, 0); P2 end point (20, 5) is adjacent to P3 start point (20, 5) and P6 start point (20, 5); P3 end point (15, 15) is adjacent to P4 start point (15, 15) and P10 start point (15, 15), and other connection relationship detection.

[0157] 4) Geometric alignment verification

[0158] Align geometries by Snap operation (tolerance 0.001 m) and verify physical constraint conditions. For example: contact point (10, 0):

[0159] P1 midpoint distance satisfies

[0160] P2 midpoint distance satisfies

[0161] 5) Topology graph generation

[0162] Construct undirected graph G = (V, E):

[0163] Vertex set V = {P1, P2, P3, P4, P5, P6, P7, P8, P9, P10}

[0164] Edge set G = {(P1, P2), (P2, P3), (P2, P6), (P3, P4), (P3, P6), (P3, P10),

[0165] (P4, P10), (P4, P5), (P4, P9), (P5, P1), (P6, P7), (P7, P8), (P9, P10), (P9, P5)} (2) Attribute encoding and missing marker generation

[0166] The physical attributes of the example pipe segments (including missing attributes) are shown in Table 2.

[0167] Table 2: Example pipe segment attribute table

[0168]

[0169] The example pipe segments are encoded according to the following encoding rules, and the attribute encoding and missing marker results are shown in Table 3. Pipe diameter: one-hot encoding (DN100: [1, 0], DN300: [1, 0]).

[0170] Pipe material: one-hot encoding (ductile cast iron: [1, 0, 0], PVC: [0, 1, 0], cast iron: [0, 0, 1]).

[0171] Interface form: one-hot encoding (punching: [1, 0, 0], bonding: [0, 1, 0], rubber ring insertion: [0, 0, 1]).

[0172] Completion date: binning encoding (2000-2004: [1, 0, 0], 2005-2009: [0, 1, 0], 2010-2019: [0, 0, 1]).

[0173] Table 3 Example Pipe Segment Property Corresponding Encoding Table

[0174]

[0175] (3) Construction of attribute prediction model

[0176] 1) Model training sample

[0177] During the training process, 30% of the graph vertices in the network were randomly selected, and 1-3 attributes in each graph vertex were masked. Therefore, the 10 graph vertices in the example can form 329280 possible mask combinations, and the model training samples are sufficient and consistent with the actual missing conditions.

[0178] 2) Model parameters and evaluation

[0179] After 300 rounds of training, the initial loss of the model decreased from 0.0435 to 0.0070, and the learning rate decreased from the initial 0.01 to 0.0005. The optimized σ is 0.000183, indicating that the model gives higher weight to directly connected pipe segments (hop count = 1). The WIA of each round of training prediction results is calculated, and the w k for each attribute is set to 0.25, and the final average WIA is 0.91, with a high accuracy (> 0.85), and the model training is complete.

[0180] (4) Model application

[0181] The model trained by the above method can be directly applied to the water supply network, i.e. to predict and fill in the missing attributes of pipe segments P3, P6 and P8. The original attribute features and missing labels input into the model are:

[0182] h P3 = [0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0]

[0183] m P3 = [1, 1, 0, 0]

[0184] h P6 = [1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0]

[0185] m P3 = [0, 0, 0, 1]

[0186] h P8 =[1,0,0,1,0,0,0,0,0,1,0]

[0187] m P3 =[0,0,1,0]

[0188] go through Figure 3 The computational process shown outputs the decoded prediction vector:

[0189]

[0190] The prediction results show that P3 has a pipe diameter of 300mm and is made of ductile iron, P6 has a date of 2013-5-6, and P8 has an adhesive joint. The model has completed the filling of the missing attributes of this pipeline network.

[0191] The above embodiments only describe a portion of the specific implementation methods of the present invention in detail, and are not limited to the embodiments disclosed herein. Furthermore, the substantive content protected by the present invention is not limited thereto. Any other modifications, equivalent substitutions, improvements, etc., made based on the principles and techniques of the present invention without departing from its design scope are all within the protection scope of the present invention.

Claims

1. A method for filling in physical properties of water supply network GIS data based on a graph neural network, characterized in that, The method comprises the following steps: S1: constructing a pipe segment connection relationship topology graph through a spatial index and a geometric alignment operation, converting the pipe segment connection relationship into an undirected graph network and extracting pipe segment physical attributes, and generating a missing label; S2: constructing a pipe segment attribute filling model based on a graph attention neural network, using a graph attention feature aggregation module, combining a Gaussian kernel function to express a multi-hop spatial dependence relationship, forming a composite attention weight, aggregating neighbor effective attribute features, and decoding and predicting missing attributes; S3: model performance evaluation, considering the differences in engineering importance of different attributes, designing a weighted filling accuracy, and comprehensively evaluating the filling precision of the model by a weighted method.

2. The method of claim 1, wherein, The step S1 of constructing the pipe segment connection relationship topology graph comprises the following steps: S1-1: reading pipe network data in a Shapefile format, and calculating geometric center coordinates of each pipe segment as a spatial reference; S1-2: using an R-tree spatial index to quickly retrieve neighbor pipe segments in a buffer area; S1-3: aligning geometric bodies through a Snap operation, eliminating data collection errors, and detecting and verifying pipe segment contact points; S1-4: for neighbor pipe segments meeting physical constraint conditions, creating a topology graph with the midpoint coordinates as graph vertices and the pipe segment connection relationship as edges, and the vertex attribute set including pipe diameter, material, interface form, and completion date.

3. The method of claim 2, wherein, The construction method of the R-tree spatial index structure in the step S1-2 is as follows: S1-2-1) Data preprocessing: extend the pipe segment geometry to a buffer area, buffer distance d buffer According to the pipe network density adaptive adjustment, such as: dense area d buffer = 0.0005m, sparse area d buffer = 0.002m; S1-2-2) Index insertion: inserting the boundary box of the buffer area into the R-tree index to establish a spatial hierarchical structure; S1-2-3) Nearest neighbor query: executing index.nearest on the current pipe segment to quickly return candidate neighboring pipe segments in the buffer area.

4. The method of claim 2, wherein, The Snap operation in the step S1-3 is used for geometric coordinate alignment, and the specific steps are as follows: S1-3-1) Coordinate absorption: Absorb the current pipe segment to the geometry of the adjacent pipe segment within a tolerance t snap = 0.001 m, generating the aligned geometry; S1-3-2) Contact point calculation: performing geometric intersection on the aligned geometric bodies and neighboring pipe segments, and if the result is a non-empty point set and meets the physical constraint conditions, it is determined as an effective connection; S1-3-3) Abnormality processing: if the contact points are a multi-point set, the contact point closest to the midpoint of both sides is selected as the effective connection point.

5. The method of claim 2, wherein, The physical constraint conditions in the step S1-4 are as follows: where: d u , d v — are the distances from the contact point to the midpoints of the current and adjacent pipe segments, respectively; l u , l v — are the lengths of the current and adjacent pipe segments, respectively.

6. The method of claim 1, wherein, The method for extracting pipe segment physical attributes in the step S1 is as follows: Let the original attribute feature of the current node u be where is a real set used to define the model parameter value space, and the attribute feature expression is as follows: h u = [pipe diameter code, pipe material code, interface form code, completion date code].

7. The method of claim 1, wherein, The method for generating the deletion marker in step S1 is: let deletion marker m u ∈ {0, 1} 4 1 represents deletion, and 0 represents existence; The generation part is divided into two cases of training stage and inference stage. The training stage simulates the missing scene in the real data through random masking, and teaches the model how to reason when part of the information is missing. In the inference stage, the model needs to detect the missing state of each attribute in the input data in actual application, generate a binary vector according to the detection result, and identify the missing position. The missing attribute position detected is filled with 0, and the effective attribute feature h' of the input model is input into the model u The calculation formula is as follows: h' u = Wh u ⊙(1-m u ); In the formula: ⊙—element-wise multiplication, that is, Hadamard product, suppresses the influence of missing attributes; —Feature projection matrix, projecting the original features h u to a high-dimensional space, and d' is the dimension of the hidden layer.

8. The method of claim 1, wherein, The step S2 of constructing a pipe segment attribute filling model based on a graph attention neural network comprises the following steps: S2-1) Weight calculation: Introduce a Gaussian kernel term into the graph attention weight calculation to form a composite attention weight e uv ; The dynamic weight a is obtained by normalization through the Softmax function uv ; The specific calculation formula is as follows In the formula: e uv —Dynamic weights with Gaussian kernel terms; LeakyReLU—an improved neural network activation function; —Attention mechanism parameter vector, which maps the concatenated features to scalar attention scores; h′ v —Effective attribute features of neighbor node v; || —Vector concatenation operation, the concatenated dimension is 2d′×1; d uv —The number of hops in the shortest path between two nodes; —Gaussian kernel distance attenuation coefficient; α uv —Normalized attention weights; The set of neighbors of node u; k — to check in turn Each node in the process. S2-2) Missing attribute filling: S2-2-1) Set up the graph attention feature aggregation module, first use the shared weight matrix W g Effective attribute features h′ of neighbor nodes v Transform, and then according to the attention weight α uv Weighted aggregation, and finally get the current node aggregation result z u ; The aggregation result will be used as the unified feature representation of multi-attribute decoding, and its expression is as follows: In the formula, W g — GAT layer shares weight matrix; S2-2-2) decoding the aggregated feature vector z u The decoding and filling of the missing attributes are performed according to the current node missing flag. The prediction result decoding and filling formula is as follows: In the formula: - the decoded prediction attribute feature, consistent with the original attribute feature dimension; - the output decoding matrix; - the output bias vector;m u - the missing flag;h u - the original attribute feature; S2-2-3) To extract the predicted binned results, filter out the neighbor nodes in the bin and extract their completion dates: where: bin u — predicted binning result; — binning prediction value for completion date; θ — weight threshold value; — filtered set of high-weight neighbor nodes; y v — completion date of neighbor v; bin(·) — date binning mapping function; A mode decision mechanism is set to take the mode of the dates of the high-weight nodes screened out in the bins as the filling result of the completion date of the current node The operation formula is as follows: Where: mode(·) is the mode of the set, that is, the highest frequency date; S2-3) Model parameter optimization, comprising the following steps: S2-3-1) Loss function design, the model loss function is as follows: where |v| — total number of nodes in the current training batch; — true attribute vector of node u;(·) °2 — element-wise square operation; — matrix Frobenius norm; — vector L2 norm; λ — regularization coefficient, determined by cross-validation; S2-3-2) Parameter optimization: calculate the loss function The gradient of each parameter is obtained by automatic differentiation through back propagation, and the parameters are updated by the Adam optimizer to minimize The forward-backward process is repeated until the loss function converges, and the optimal value of σ is reached, so that the model balances the accuracy of topological correlation modeling and missing data filling. The update of σ needs to satisfy the non-negative constraint: Where: ε is a very small positive value; Trainable parameters Comprise: feature projection matrix W, attention vector a, Gaussian kernel parameter σ, GAT layer shared weight matrix W g , output decoding matrix V and output bias vector b, optimized by end-to-end training.

9. The method of claim 1, wherein, The weighted filling accuracy calculation formula in the step S3 is as follows: where: k - attribute index; w k - attribute importance weight; N miss,k - number of missing samples of attribute k in the test set; - imputed value of attribute k for node u; - true value of attribute k for node u; τ k - attribute tolerance threshold; - indicator function, 1 if condition is true, 0 otherwise.

Citation Information

Patent Citations

  • Heterogeneous network attribute completion method based on graph neural network and attention mechanism

    CN115130663A

  • Heterogeneous graph neural network attribute completion method

    CN115587626A

  • Building photovoltaic data completion method based on WGAN and whale optimization algorithm

    CN115688982A

  • Network entity identification method based on different illustration graph learning

    CN118540234A

  • DWGAT-based space domain logging data missing value filling method

    CN118606637A

Cited By

  • Coiled tubing operation information intelligent monitoring method and system

    CN121093295A

  • Pipeline topological relation construction method based on graph neural network

    CN121580834A

  • Pipeline network spatial topological relation analysis method and system based on graph neural network

    CN122113322A

  • Pipeline network space topology relationship analysis method and system based on graph neural network

    CN122113322B