Gas pipe network fault positioning method based on space-time diagram neural network

Through the gas pipeline fault location method based on the spatiotemporal graph neural network, combined with simulation data generation, edge-end multimodal perception and cloud-side dynamic spatiotemporal graph neural network, the problem of single perception and insufficient positioning accuracy in the gas pipeline leakage detection is solved, and low-cost, high-precision and real-time leakage point positioning is achieved.

CN120332686APending Publication Date: 2025-07-18BEIHANG UNIV +2
View PDF 0 Cites 21 Cited by

Patent Information

Application Number
CN202510566015.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

The existing gas pipeline leakage detection and positioning technology has problems such as single perception dimension, high false alarm rate, insufficient positioning accuracy, slow positioning speed and large generalization errors of small sample training models, and has failed to effectively integrate the spatio-temporal dynamic characteristics and physical constraints of gas pipeline networks.

Method used

The gas pipeline fault location method based on the spatiotemporal graph neural network is adopted, and the monitoring point layout is optimized, edge-end multimodal perception and abnormal detection, cloud-based dynamic spatiotemporal graph neural network modeling and hierarchical positioning is achieved through simulation data generation, and precise positioning of leakage points is achieved through the generation of simulation data.

Benefits of technology

It significantly reduces the hardware deployment cost, realizes abnormal detection and reporting with low latency and low traffic, enhances the generalization ability of the model in complex environments, and ensures long-term and accurate fault location through online learning mechanisms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120332686A_ABST
    Figure CN120332686A_ABST
Patent Text Reader

Abstract

The invention discloses a gas pipe network fault positioning method based on a space-time diagram neural network, and the method employs an edge-cloud collaborative architecture, and achieves the precise detection of leakage points through simulation data generation, multi-modal perception, dynamic space-time modeling and hierarchical positioning. Firstly, simulation modeling is conducted on a pipe network, a multi-working-condition leakage data set is generated, and monitoring point layout is optimized through fuzzy clustering; a multi-modal sensing unit and a lightweight anomaly detection module are deployed at an edge end to realize coarse-grained anomaly detection and data hierarchical transmission; the cloud constructs a dynamic space-time diagram neural network, integrates a pipe network topological structure, multi-source time sequence data and physical constraints, and realizes high-precision positioning of leakage points through a hierarchical positioning strategy; and finally, realizing online evolution of the model through elastic weight solidification and hierarchical parameter updating. According to the method, the space-time diagram neural network and the physical characteristics of the pipe network are deeply fused, and the problems that space-time coupling features are difficult to extract and physical constraints are missing in complex pipe network fault positioning are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the cross - field of industrial Internet of Things and artificial intelligence, and specifically relates to a gas pipeline network fault location method based on spatio - temporal graph neural network. Background Technique

[0002] With the rapid development of the urban gas industry, the construction of urban natural gas pipeline networks has been accelerating. However, affected by factors such as complex underground space, third - party construction damage, and material aging, gas pipeline leakage accidents have been increasing year by year. Traditional leakage detection and location technologies have the following problems: 1. Single perception dimension and high false alarm rate; 2. Insufficient positioning accuracy, unable to meet the needs of excavation and repair, slow positioning speed, and difficult to locate in a timely manner; 3. Although deep learning solutions can model complex features, they require a large amount of real leakage data for training. In actual scenarios, leakage events are sparse and the acquisition cost is high, and the generalization error of small - sample training models is large.

[0003] In view of the above problems, there is an urgent need for a new location method that integrates multi - source perception, spatio - temporal modeling, and physical laws to achieve fast and accurate leakage point location and solve the model generalization bottleneck in small - sample scenarios. The successful application of graph neural networks in power system fault diagnosis shows that a topology - aware deep - learning architecture can effectively model the complex spatial associations of pipeline networks. The spatio - temporal dynamic characteristics of gas pressure wave propagation and the embedding of physical constraints have not been solved in the prior art, and there is no gas pipeline network fault location method using deep graph neural networks. Summary of the Invention

[0004] The purpose of the present invention is to solve the above deficiencies in the prior art, and provide a gas pipeline network fault location method based on spatio - temporal graph neural network to achieve fast and accurate location of gas pipeline network faults and solve the cold - start dilemma of data - driven models.

[0005] The present invention solves its technical problems by adopting the following technical solutions:

[0006] A gas pipeline network fault location method based on spatio - temporal graph neural network includes the following steps:

[0007] Step 1, simulation data generation and monitoring point optimization: Based on a gas pipeline network simulation platform, construct a pipeline network simulation model, import the pipeline network GIS topology data, configure the pipe section and node attribute parameters, inject multi - condition leakage faults, and solve to generate a labeled simulation data set; Based on the simulation data set, use the fuzzy clustering method to divide the pipeline network nodes into K clusters, and select representative nodes in each cluster as monitoring points;

[0008] Step 2, Edge - side Multimodal Sensing and Anomaly Detection: Deploy multimodal sensing units, lightweight edge computing modules, and LoRaWAN communication modules at monitoring points to synchronously collect data such as pressure, combustible gas concentration, and flow rate, and perform preliminary data pre - processing and anomaly detection, triggering differential data transmission based on communication status classification.

[0009] Step 3, Cloud - side Dynamic Spatiotemporal Graph Neural Network Modeling and Training: The spatiotemporal graph neural network locates the leakage point through spatial topology encoding, temporal dynamic modeling, and physical fusion constraints. Use the simulation data generated in Step 1 to pre - train the network and preliminarily establish the leakage feature mapping relationship.

[0010] Step 4, Leakage Point Hierarchical Location: Coarse location is based on the spatial attention mechanism to screen the set of leak - prone pipe segments; fine location combines the pressure wave propagation model and optimization algorithm on the suspicious pipe segments to achieve progressive location from the pipe segment level to the coordinate level, and finally output the estimated leakage point coordinates and confidence intervals.

[0011] Step 5, Model Online Learning and Evolution: Based on the monitoring point data collected from the real pipeline network, perform transfer learning, dynamically update the network parameters, realize the cross - domain transfer learning from the simulation model to the physical system, and improve the fault location effect of the model in the actual operation of the real pipeline network.

[0012] The beneficial effects of the present invention compared with the prior art are as follows:

[0013] (1) By optimizing the deployment of monitoring points through the fuzzy clustering algorithm and combining edge - side multimodal sensing and the hierarchical triggering mechanism, the present invention not only ensures the complete capture of the pressure wave propagation characteristics of the pipeline network, but also significantly reduces the number of monitoring points, greatly reducing the hardware deployment cost. At the same time, it realizes low - latency and low - flow anomaly detection and reporting, taking into account both cost and real - time performance.

[0014] (2) This method uses the spatiotemporal graph neural network as the basic model to achieve pipeline network fault location. Encoding physical parameters such as pressure wave speed and pipeline resistance coefficient into the neural network and introducing a pressure wave propagation residual constraint term in the spatiotemporal fusion layer enables the model to fuse physical constraints, effectively reducing the model training error and significantly enhancing the generalization ability in complex environments.

[0015] (3) This method designs an online learning and evolution mechanism to solve the problem that traditional static models are difficult to adapt to the dynamic changes of the pipeline network. Using the elastic weight consolidation algorithm to achieve hierarchical parameter update, effectively controlling the growth rate of the positioning error over the running time while ensuring the stability of the model, and ensuring the long - term accurate operation of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a flowchart of a method for gas pipeline network fault location based on a spatiotemporal graph neural network according to the present invention.

[0017] Figure 2 This is the structure diagram of the spatio-temporal graph neural network of the present invention. Detailed implementation manners

[0018] In order to make the objectives, technical solutions and advantages of the present invention more clear and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. In addition, the technical features involved in the various implementation manners of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0019] The present invention relates to a gas pipeline network fault location method based on a spatio-temporal graph neural network, including simulation data generation and monitoring point optimization, edge perception and anomaly detection, dynamic spatio-temporal graph neural network modeling and training, and online learning evolution.

[0020] As Figure 1 shown, a gas pipeline network fault location method based on a spatio-temporal graph neural network of the present invention includes the following steps:

[0021] Step 1: Use a gas pipeline network simulation platform to build a pipeline network simulation model, configure pipeline network attribute parameters, inject various working condition leakage faults, solve the simulation data set, and optimize the layout of monitoring points by using a fuzzy clustering method. The specific implementation is as follows:

[0022] Step 1.1: Build a digital twin model of the pipeline network based on the gas pipeline network simulation platform, convert the gas pipeline network geographic information system (GIS) data into the input of the simulation model, and automatically extract the pipe segment attributes and node attributes. The pipe segment attributes include pipe diameter, material, length, burial depth and service life, and the node attributes include node type (valve / tee / end), initial pressure and connection method. Enable the transient pressure wave calculation module, and set the formula for the wave velocity c as:

[0023] ;

[0024] Among them, is the gas bulk modulus, is the density, is the elastic modulus of the pipe material, is the pipe diameter, is the wall thickness, is the constraint coefficient (take 0.8 for buried pipes).

[0025] Step 1.2: Combine the leakage parameters. The combination rules include different leakage point position distributions, leakage aperture ranges, and leakage times. The position distribution sets leakage points at 10% intervals along the length of the pipe segment. The aperture range is 1 - 50 mm, distributed logarithmically. The start time of the leakage is randomly generated within the simulation period, and the duration follows an exponential distribution. Write an automated script to generate 5000 sets of leakage scenarios. Each set of scenarios includes: GIS coordinates of the leakage points, pipe segment ID, aperture, start and end time tags, as well as time series data of pressure, flow rate, and gas concentration at each node.

[0026] Step 1.3: Extract the variance of pressure fluctuations at each node , the rate of change of flow rate , and the number of adjacent nodes . Perform Z - score standardization on and , and perform Min - Max normalization on . Use the fuzzy c - means clustering method to input the feature matrix, fuzzy exponent, and maximum number of iterations. Determine the optimal number of clusters K through the elbow method. Calculate the curve of the sum of squared errors within the cluster with respect to K, and select the K corresponding to the inflection point.

[0027] Step 1.4: For each cluster , calculate the weighted Euclidean distance from all nodes to other nodes within the cluster :

[0028] ;

[0029] where is the current node number, is the index of other nodes in cluster , is the variance of pressure fluctuations of node , is the variance of pressure fluctuations of node , is the rate of change of flow rate of node , is the rate of change of flow rate of node , is the number of adjacent nodes of node , is the number of adjacent nodes of node , , , are the weight coefficients of the three features of variance of pressure fluctuations, rate of change of flow rate, and number of adjacent nodes respectively, used to adjust the importance of each feature in distance calculation.

[0030] Select The smallest node is used as the monitoring point to ensure that its pressure fluctuation is correlated with the average of the nodes within the cluster. Randomly select 20% of the undetected nodes as the validation set, calculate their pressure reconstruction error. If the error exceeds the standard, increase the number of cluster classes K and re-cluster until the accuracy requirement is met.

[0031] Step 2: Implement multi-modal perception, lightweight anomaly detection, and data reporting at the edge side, and the specific implementation is as follows:

[0032] Step 2.1: Arrange a multi-modal sensing unit including a MEMS pressure sensor, a combustible gas concentration monitoring sensor, an ultrasonic flowmeter, and a temperature sensor at the monitoring point. The MEMS sensor uses Bosch BMP581, with a measurement range of 0 - 1.6 MPa, an accuracy of ±0.5% FS, a temperature compensation range of -40°C to +85°C, and supports I²C digital output; the combustible gas sensor selects Figaro TGS2611-E00, with a detection range of 0 - 100% LEL, a response time of <10 seconds, and a warm-up time of 5 minutes; the ultrasonic flowmeter uses Siemens Sitrans FUS380, with an accuracy of ±1.0%, a pipe diameter adaptation of DN50 - DN300, and supports the Modbus RTU protocol; the temperature sensor uses a PT100 platinum resistance, with a measurement range of -40°C to +120°C, an accuracy of ±0.5°C, and a three-wire connection to eliminate lead error. In the normal mode, synchronously collect four types of data at a sampling frequency of 1 Hz and store them in a circular buffer (a 32GB eMMC storage chip) in the form of a structured array, covering a 72-hour data cache. When an anomaly is triggered, the sampling frequency is increased to 100 Hz, and continuous collection is carried out for 20 seconds. The data is stored as a high-precision waveform (16-bit ADC quantization), and at the same time, sensor self-checks such as zero calibration and sensitivity verification are started.

[0033] Step 2.2: Use a lightweight edge computing module to calculate the short-time energy entropy of the pressure signal using a sliding window mechanism. Set the window length to 500 ms, that is, 50 sampling points under 100 Hz sampling, and the step size to 100 ms, that is, 10% overlap. Use a Hamming window to suppress spectral leakage. The dynamic threshold update uses the exponential weighted moving average algorithm, forgetting factor , mean estimation and standard deviation estimation The calculation formulas are:

[0034] ;

[0035] ;

[0036] where is the current time step, is the mean value of the short-time energy entropy of the pressure signal within the current sliding window, is the standard deviation of the short-time energy entropy of the pressure signal within the current sliding window.

[0037] Current threshold , and the initial value is based on the statistics of historical data 30 days ago. When the entropy values of three consecutive windows exceed the threshold, a level-three alarm is triggered. As the number of windows increases, yellow, orange, and red alarms are triggered in sequence, and the abnormal mode is started. The dynamic threshold mechanism significantly reduces the false alarm rate.

[0038] Step 2.3: The LoRaWAN communication module realizes hierarchical data transmission and communication guarantee. Under normal conditions, a JSON message is generated every ten minutes, and the data is encapsulated. The data structure includes node id, time, pressure statistics (mean, variance, extreme value), combustible gas concentration, temperature statistics, etc. At this time, LoRaWAN works in Class A mode, the spreading factor is set to 7, the packet size is less than or equal to 51 bytes, and CBOR compression encoding is used. In the abnormal state, emergency transmission is performed, and the waveform is encapsulated in binary little-endian format, including a flag bit, pressure data, gas concentration data, and CRC check value. At this time, LoRaWAN switches to Class C mode for continuous reception, the spreading factor is set to 9 to improve the anti-interference ability, fragmentation transmission is enabled (128 bytes per frame), and one frame is sent every 20 ms. It takes a total of 3.2 seconds to complete the upload of a 20-second waveform. The ACK confirmation mechanism is adopted, and when the receive failure instruction is received, the corresponding piece of data is retransmitted. The hierarchical data transmission and ACK confirmation mechanisms ensure a high delivery rate of abnormal data packets and a low retransmission delay for lost packets, meeting the real-time requirements. The power consumption is extremely low in the normal mode, and the battery life is long.

[0039] Step 3: Perform cloud dynamic spatio-temporal graph neural network modeling and training. The architecture of the spatio-temporal graph neural network is as Figure 2 shown. The leakage point is located by spatial topology coding, temporal dynamic modeling, and physical fusion constraints. The network is pre-trained using the simulation data generated in Step 1 to initially establish the leakage feature mapping relationship. The specific implementation is as follows:

[0040] Step 3.1: Spatial topology data processing First, topological structure coding is performed to abstract the pipe network into a graph structure , where the node represents the pipe connection point (valve, tee, etc.), the edge represents the pipe segment connection relationship, and an adjacency matrix is constructed. If there is a physical connection between node and node ( ), then the corresponding element in the adjacency matrix , otherwise it is 0. Secondly, node attribute encoding is performed. Categorical features such as material type and connection type use One-hot encoding to expand the data dimension to 8 dimensions. Numerical features such as pipe diameter, service life, and burial depth use Min-Max normalization , where is the original feature value, is the minimum value of this feature among all nodes, is the maximum value of this feature among all nodes. Finally, the two categorical features are combined into a node attribute matrix , where is the set of real numbers, is the total number of nodes.

[0041] Next, process the time series sensor data. Align the timestamps of multi-sensor data with the pressure signal as the reference using the Dynamic Time Warping (DTW) algorithm, with a maximum time delay compensation of ±50 ms. Short-term missing values (<1 s) are filled using cubic spline interpolation, and long-term missing values (>1 s) are marked as invalid segments and masked during training. Z-score normalization is performed independently for each sensor .

[0042] Pipe resistance coefficient Adopts the following calculation formula:

[0043] ;

[0044] Among them, the Reynolds number , where is the fluid density, is the average velocity of the fluid in the pipe, is the pipe diameter, is the kinematic viscosity coefficient of the fluid.

[0045] Attenuation factor , where is the pressure at the starting end of the pipe, is the pressure at the termination end of the pipe, is the pipe length, is an empirical coefficient related to the compressibility of the fluid.

[0046] Step 3.2: Perform spatial feature extraction. Map the node attributes to a high-dimensional space through trainable weights , which is composed of node attribute vectors . Define 8 attention heads, and each head calculates the edge attention coefficient:

[0047] ; Among them, is the attention head number, , are the indices of adjacent nodes in the pipeline diagram, is the physical feature encoder MLP network, is the length of the pipe segment between nodes m and n, is the attenuation factor of the pipe segment between nodes m and n, || is the vector concatenation operation, is the th trainable weight vector of the attention head.

[0048] Normalized attention weights:

[0049] ;

[0050] where, is the normalized attention weight between nodes m and n in the th attention head, is the index of the neighbor node of node , is the neighbor node set of node .

[0051] Finally, feature aggregation and output are performed, and the output of each attention head is the weighted sum of node features:

[0052] ; where, is the initial feature vector of node n, is the normalized attention weight of the th attention head, is the output feature matrix of the th attention head.

[0053] Concatenate the outputs of heads along the feature dimension:

[0054] ;

[0055] where, is the output feature dimension of each head, is the set of real numbers. Project the concatenated high-dimensional features to the target dimension d = 256 through the trainable weight :

[0056] ; Generate the dynamic adjacency matrix , where , represents the leakage propagation intensity between nodes i and j, that is, take the average of the multi-head attention weights, reflecting the comprehensive correlation strength between nodes.

[0057] Step 3.3: Perform temporal dynamic modeling. For the dilated causal convolution design, millisecond-level mutations are captured in the underlying network part. The convolution kernel size K = 5, the dilation coefficient d = 1, the number of output channels is 64, the stride is 1, and the padding is 4 to ensure that the temporal length remains unchanged. The activation function uses GELU, and layer normalization (LayerNorm) is used for normalization. The high-level network models hourly drifts, and the dilation coefficient increases exponentially according to exponential growth, where is the number of layers, and the maximum corresponds to . Four layers are stacked, and the dilation coefficient of each layer increases exponentially to expand the receptive field to capture long-term temporal dependencies. The formula for dilated convolution is:

[0058] ;

[0059] where, is the current time step, is the output feature at time t, is the value of the input signal at time step , and is the weight parameter at the k-th position.

[0060] Variable convolution is used for temporal alignment to compensate for clock deviations, and a dynamic time offset is introduced into the convolution kernel and generated through learnable parameters:

[0061] ; where, is the trainable weight matrix, and is the maximum allowable deviation.

[0062] The time delay difference between multiple sensors is calculated using the following formula:

[0063] ;

[0064] where, is the time delay difference between sensors p and q, is the high-level temporal feature of sensor p at time step t, is the high-level temporal feature of sensor q at time step , and is the cross-correlation function.

[0065] Based on the high-level features of TCN, the cross-correlation coefficient is calculated, and the peak value is the time difference of arrival (TDOA).

[0066] Step 3.4: Perform spatio-temporal fusion and physical constraint injection in the spatio-temporal fusion layer. Concatenate the spatial feature and the temporal feature to obtain the combined features .

[0067] Based on the dynamic adjacency matrix perform message passing:

[0068] ;

[0069] wherein is the GELU activation function, is the node feature matrix of the -th layer, is the trainable weight matrix. Stack 3 layers of graph convolution, and gradually fuse high-order spatial dependence relationships through multi-layer transmission.

[0070] Calculate the pressure propagation residual after each layer of graph convolution:

[0071] ;

[0072] wherein is the pressure propagation residual of node in the -th layer, is the pressure prediction value of nodes i, j in the -th layer, is the attenuation factor, is the pipe segment length, is the set of neighbor nodes of node i.

[0073] Add the sum of squared residuals to the loss function:

[0074] ;

[0075] wherein is the total number of graph convolution layers, is the residual of node in the -th layer. By minimizing the sum of squared residuals, embed the physical laws into the model training process.

[0076] Step 3.5. Use the simulation data generated in Step 1 to train the network model.

[0077] The optimization objective total loss function is:

[0078] ;

[0079] wherein is the aggregation of all trainable parameters of the model, is the L2 regularization term to prevent overfitting.

[0080] The coordinate prediction loss is the Huber loss The L2 regularization coefficient is 0.01 to prevent overfitting. The training hyperparameter setting strategy includes: selecting the AdamW optimizer, with an initial learning rate of 3e-4 and a weight decay of 0.01; for the learning rate scheduler, choosing cosine annealing with a period of 50 epochs and a minimum learning rate of 1e-6; setting the batch size = 32 and the sequence length = 512; the early stopping mechanism terminates the training when the validation set loss does not decrease for 10 consecutive epochs. Retrain by adjusting the hyperparameters according to the training effect, and finally obtain the optimal model.

[0081] Step 4: Perform hierarchical localization of the leakage point, and finally output the estimated leakage point coordinates and the confidence interval. The specific implementation is as follows:

[0082] Step 4.1: In the rough localization stage, sort all non-zero edge weights in the dynamic adjacency matrix output by the multi-head graph attention network in descending order, select the top 10% of the high-weight edges to form a candidate edge set , and set the threshold according to quantile truncation . Construct a binary adjacency matrix based on rules , and the construction rule is: when , , otherwise 0. Identify connected regions based on breadth-first search (BFS), and merge subgraphs that meet the spatial proximity condition (the pipe segment spacing , is the average pipe segment length of the pipe network). After merging, generate the final pipe segment set , and each subgraph contains no more than 5 consecutive pipe segments.

[0083] Step 4.2: In the fine localization stage, fuse the physical model for coordinate optimization. Based on the sensor time delay difference observations extracted by the temporal convolutional network :

[0084] ;

[0085] where, is the temporal feature vector of node i at time t, is the search range of the time offset.

[0086] Compensate for the clock deviation as:

[0087] ;

[0088] where, is the clock calibration parameter of node i, obtained through GPS synchronization or the NTP protocol. Combining the theoretical time delay generated by the Dijkstra algorithm, build a nonlinear objective optimization function:

[0089] ;

[0090] where S is the set of sensor pairs participating in the optimization, x is the coordinate of the leakage point, is the geodesic distance along the pipeline, is the coordinate of the midpoint of the roughly located pipe segment, is the regularization coefficient to suppress the coordinate deviation from the prior region.

[0091] The Levenberg-Marquardt algorithm is used to iteratively solve the leakage point coordinate x. The coordinate update amount in the iterative formula is:

[0092] ;

[0093] where is the damping factor, is the Jacobian matrix, is the residual vector, diag represents the diagonal matrix, and the superscript T represents the transpose of the matrix. The convergence condition is the residual change rate or the number of iterations or the coordinate movement distance .

[0094] Step 4.3. In the confidence evaluation stage, the parameter uncertainty is estimated based on the inverse of the Hessian matrix, and the covariance matrix is calculated, where is the Jacobian matrix of the residual with respect to the coordinate, is the residual variance.

[0095] Perform singular value decomposition on the covariance matrix where , the characteristic diagonal matrix satisfies λ1≥λ2>0, is the matrix of eigenvectors, is the largest eigenvalue corresponding eigenvector, representing the direction of the major axis of the ellipse; is the largest eigenvalue corresponding eigenvector, representing the direction of the minor axis of the ellipse. Finally, the confidence ellipse parameters are obtained: major axis , minor axis , rotation angle , represents the critical value of the chi-square distribution with 2 degrees of freedom at the 95% confidence level, , is eigenvalue of, representing the variances of the coordinates in the major axis and minor axis directions, is the eigenvector corresponding to the largest eigenvalue, representing the rotation direction of the ellipse.

[0096] The elliptical coverage range is:

[0097] ;

[0098] Among them, , , is the offset of the coordinate point (x, y) relative to the optimal solution.

[0099] Start parallel optimization threads for the multi-subgraph scenario, select the solution with the smallest residual as the final positioning result, and store the remaining hypotheses in the log for the operation and maintenance personnel to review, ensuring that the area of the positioning error ellipse is less than .

[0100] Step 5. Deploy the model and perform online learning and evolution, the specific implementation is as follows:

[0101] Step 5.1. Perform elastic weight consolidation transfer learning, based on the pre-trained model parameters Calculate the Fisher information matrix , by traversing the simulation dataset Calculate the expectation of the square of the loss function gradient, The diagonal elements are:

[0102] ;

[0103] Among them, is the information content of the parameter , measuring the importance of the parameter to the historical knowledge, the larger the value, the more critical the impact of the parameter on the model performance. is the output sample under the parameter of the loss function.

[0104] Add the Fisher diagonal elements as a regularization term to the online learning loss function:

[0105] ; Among them, is the Hbuer loss function of the new task, is the predicted output of the model for the new data, is the true label of the new data, controls the transfer intensity, selected by cross-validation, is the th parameter in the current model training process, is the initial value of the corresponding th parameter in the pre-trained model.

[0106] Step 5.2: Dynamically update the hierarchical parameters during the online learning stage. Freeze the graph attention layer of GAT and the dilated convolutional layer of TCN, and only open the fully connected layer and the residual connection parameters for fine-tuning to ensure that the model retains the ability to extract spatial topology and temporal features. There are two incremental learning trigger mechanisms: data volume trigger and data accumulation time trigger. Define a sliding time window to count the number of new samples within the window. When the data volume reaches 10% of the pre-training volume, an update is triggered. If the cumulative time reaches a specified length (e.g., 7 days), incremental learning will also be forced to start. The dataset for incremental learning is obtained by merging new data with historical key sample buffer data, and the optimization algorithm uses SGD to update the adjustable parameters , the initial learning rate , the momentum coefficient , the batch size . Only apply elastic weight regularization to the fully connected layer and the residual connection parameters.

[0107] Step 5.3: Include adaptive detection and calibration. When a model degradation event is detected, unfreeze the parameter status of the GAT and TCN layers, start the full network parameter fine-tuning mode, and use a cosine annealing learning rate scheduler to retrain the model until the localization error in the validation set is restored within the preset threshold.

[0108] The degradation detection conditions include confidence ellipse area detection and cross-segment determination: the former calculates the 95% confidence ellipse area of the localization result , when it is triggered continuously for 3 times by time; the latter determines that the model fails when the major axis of the ellipse crosses more than 2 adjacent segments.

[0109] During full network fine-tuning, first unfreeze the GAT and TCN layers, and open 95% of all parameters. Use a cosine annealing strategy to dynamically adjust the learning rate:

[0110] ;

[0111] where is the learning rate of the current training epoch, and are the maximum and minimum values of the learning rate respectively, is the current training epoch, is the total number of training epochs. When the mean absolute error of the validation set or the number of training epochs exceeds 100, terminate the network fine-tuning. After fine-tuning, refreeze the underlying parameters of GAT and TCN, recalculate the Fisher information quantity based on the latest parameters, and update the elastic weight constraint term.

[0112] In summary, a gas pipeline network fault location method based on a spatio-temporal graph neural network disclosed by the present invention first constructs a digital twin model through a gas pipeline network simulation platform, optimizes the layout of monitoring points using fuzzy clustering, and generates a multi-condition leakage simulation data set; secondly, a multi-modal perception unit is deployed at the edge, and lightweight anomaly detection and hierarchical data transmission are realized in combination with a dynamic threshold mechanism; a dynamic spatio-temporal graph neural network is constructed based on the pipeline network topology, and feature extraction is performed by integrating the physical constraints of pressure wave propagation and the spatio-temporal attention mechanism; a hierarchical location strategy is adopted, candidate pipeline segments are screened through rough location and the leakage coordinates are optimized by integrating a physical model, and the location reliability is evaluated by combining a confidence ellipse; finally, online evolution of the model is realized through elastic weight consolidation and hierarchical parameter update. The present invention solves the problems of low location accuracy and poor real-time performance of traditional methods due to the complex pipeline network topology and coupled physical characteristics, and realizes high-precision and low-latency leakage location through the deep integration of spatio-temporal features and physical laws, edge-cloud collaborative computing and an adaptive learning mechanism, significantly improving the generalization ability and operation and maintenance efficiency under complex conditions.

[0113] The content not detailed in the description of the present invention belongs to the prior art well-known to those skilled in the art.

[0114] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.

Claims

1. A gas pipeline network fault location method based on spatio-temporal graph neural network, characterized in that, It includes the following steps: Step 1: Build a pipeline network simulation model based on the gas pipeline network simulation platform, import the pipeline network GIS topology data, configure the pipe segment and node attribute parameters, inject multi-condition leakage faults, and solve to generate a labeled simulation data set; Based on the simulation data set, use the fuzzy clustering method to divide the pipeline network nodes into K clusters, and select representative nodes in each cluster as monitoring points; Step 2: Deploy multi-modal sensing units, lightweight edge computing modules, and LoRaWAN communication modules at the monitoring points, synchronously collect pressure, combustible gas concentration, and flow data, and perform preliminary data preprocessing and anomaly detection, and trigger differential data transmission based on the communication status classification; Step 3: The spatio-temporal graph neural network locates the leakage point through spatial topology coding, temporal dynamic modeling, and physical fusion constraints, pre-trains the network using the simulation data of the simulation data set generated in Step 1, and initially establishes a leakage feature mapping relationship; Step 4: Coarse positioning filters the set of pipe segments that may leak based on the spatial attention mechanism; fine positioning combines the pressure wave propagation model and the optimization algorithm on the suspicious pipe segments to achieve progressive positioning from the pipe segment level to the coordinate level, and finally outputs the leakage point coordinate estimation value and the confidence interval; Step 5: Perform transfer learning based on the monitoring point data collected from the real pipeline network, dynamically update the network parameters, realize the cross-domain transfer learning of the simulation model to the physical system, and improve the fault location effect of the simulation model in the actual operation of the real pipeline network.

2. The gas pipeline network fault location method based on spatio-temporal graph neural network according to claim 1, wherein, The said Step 1 includes: Step 1.1: Build a digital twin model of the pipeline network based on the gas pipeline network simulation platform, import the GIS topology coordinates, pipe diameter, material, diameter, service life attributes of the pipeline, configure the initial pressure and connection type of the node, and enable the pressure wave calculation; Step 1.2: Inject multi-condition leakage faults; Step 1.3: Through the fuzzy clustering algorithm, using the node pressure fluctuation variance and flow change degree as feature vectors, divide the nodes into K clusters; Step 1.4: In each cluster, select the node with the smallest average Euclidean distance from other nodes as the monitoring point to represent the cluster and form a compressive sensing network.

3. The gas pipeline network fault location method based on a spatio-temporal graph neural network according to claim 1, wherein The said Step 2 includes: Step 2.1: Arrange a multi-modal sensing unit including a MEMS pressure sensor, a combustible gas concentration monitoring sensor, an ultrasonic flowmeter, and a temperature sensor at the monitoring point; in the normal monitoring mode, use a sampling frequency of 1Hz, and the data is temporarily stored in the local memory in a circular buffer; in the abnormal mode, the sampling frequency is increased to 100Hz, and 20 seconds of high-frequency waveform data is continuously collected.

4. The gas pipeline network fault location method based on a spatio-temporal graph neural network according to claim 3, characterized in that, The said Step 2 also includes: Step 2.2: The lightweight edge computing module calculates the short-time energy entropy of the pressure signal using the sliding window mechanism, and the dynamic threshold uses the adaptive update algorithm. When the entropy values of 3 consecutive windows exceed the threshold, it is determined as abnormal and switched to the abnormal mode; Step 2.3: The LoRaWAN communication module uploads JSON format statistical messages every 10 minutes in the normal state, uploads 20 seconds of original waveform data at a frequency of 10Hz in the abnormal state, and sends an abnormal alarm to the cloud.

5. A gas pipeline network fault location method based on a spatio-temporal graph neural network according to claim 1, characterized in that, The said Step 3 includes: Step 3.1: Set the inputs of the spatio-temporal graph neural network, including spatial topological data, temporal sensing data, and physical parameters. The spatial topological data includes the pipe network topology and node attributes, which are processed by one-hot encoding and numerical normalization. The temporal sensing data contains multi-sensor temporal signals, which are processed by time alignment and missing value handling. The physical parameters include the pressure wave velocity, pipe resistance coefficient, and attenuation factor. Step 3.2: Use a multi-head attention network for spatial feature extraction, and linearly map the node attribute vectors through trainable weights, define the calculation of edge attention coefficients, normalize the attention weights, and output the spatial feature matrix and the dynamic adjacency matrix.

6. The gas pipeline network fault location method based on a spatio-temporal graph neural network according to claim 5, characterized in that, Step 3 also includes: Step 3.3: Temporal dynamic modeling is implemented using a temporal convolutional network and dilated convolution. Causal convolution is used at the bottom layer to capture the sudden change of the pressure wave front, and long-term temporal pressure drift is modeled at the high layer. The time deviation of the sensor is compensated by dilated convolution, and the time difference of arrival (TDOA) of the pressure wave is extracted to output the temporal feature matrix. Step 3.4: The spatio-temporal fusion layer fuses the spatial and temporal features and injects physical constraints. The spatial feature matrix and the temporal feature matrix are paired along the node degree to generate the spatio-temporal joint feature matrix. Graph convolution operations are performed based on the dynamic adjacency matrix, and the pressure wave propagation residual term is introduced after each layer of convolution. The sum of the squared residuals is added to the loss function for regularization constraints. Step 3.5: Using the simulation data generated in Step 1, with the leakage point coordinates as the supervision signal, construct an optimization objective function, set hyperparameters such as the optimizer and learning rate, and perform model training, testing, and tuning to preliminarily establish the correlation relationship of leakage feature mapping.

7. A gas pipeline network fault location method based on a spatio-temporal graph neural network according to claim 1, characterized in that, Step 4 includes: Step 4.1: In the rough positioning stage, extract the edge attention weight matrix output by the multi-head graph attention network, form a subgraph for the edges with the top 10% of the weight values, and extract the connected regions as the set of suspicious leakage pipe segments. Step 4.2: In the fine positioning stage, on the suspicious pipe segments, using the sensor time delay difference extracted by dilated convolution as the observation value, generate a theoretical time delay table based on the Dijkstra algorithm, construct a non-linear optimization problem, and use the Levenberg-Marquardt algorithm to iteratively solve the leakage coordinates. Step 4.3: Calculate the Hessian matrix based on the optimization results, construct a confidence ellipse with a 95% confidence level through singular value decomposition, and use the coordinate interval covered by the ellipse as the final positioning result of the leakage point. At the same time, output the coordinate interval description including the spatial error range.

8. A gas pipeline network fault location method based on a spatio-temporal graph neural network according to claim 1, characterized in that, Step 5 includes: Step 5.1: Calculate the Fisher information matrix based on the pre-trained model parameters, identify the curing priority of the key parameters, and add the diagonal elements of the Fisher matrix as a regularization term to the loss function to constrain the update amplitude of the important parameters.

9. A gas pipeline network fault location method based on a spatio-temporal graph neural network according to claim 8, characterized in that, Step 5 also includes: Step 5.2: In the online learning stage, the hierarchical parameters are dynamically updated. Freeze the convolution kernel weights of the graph attention network and the temporal convolutional network, and only open the fully connected layer and residual connection parameters for fine-tuning. Adopt a sliding window mechanism to count the cumulative amount of real-time data. When the new data volume reaches 10% of the pre-trained data scale or the cumulative time exceeds 7 days, trigger the incremental learning process and use the elastic weight consolidation algorithm to update the adjustable parameters.

10. A gas pipeline network fault location method based on a spatio-temporal graph neural network according to claim 9, characterized in that, Step 5 also includes: Step 5.3: Perform adaptive module calibration and calculate the 95% confidence ellipse area of the positioning result in real time. When the threshold is exceeded for three consecutive times or the major axis of the ellipse spans more than two adjacent pipe segments, it is determined as a model degradation event. The parameter freezing state of the graph attention network and the temporal convolutional network is released, the full network parameter fine-tuning mode is started, and the model is retrained using the cosine annealing learning rate scheduler until the verification set positioning error is restored to within the preset threshold.

Citation Information

Cited By

  • Multi-source sensor oil tank data monitoring and abnormity early warning method and system

    CN120820202A

  • CFD-based long-distance slag conveying numerical value adaptive control method

    CN120848209A

  • Pipe network three-dimensional modeling method and system for gas pipe network simulation

    CN120850511A

  • AI chip test parameter adaptive optimization method based on deep learning

    CN120872714A

  • Centralized heating network management monitoring method and system based on artificial intelligence

    CN120892872A