Gas pipeline leakage identification and positioning method and system based on machine learning

By integrating multimodal data and spatiotemporal graph convolutional networks, combined with Bayesian inference and negative pressure wave physical models, the problem of insufficient accuracy in gas pipeline leak identification was solved, achieving efficient leak identification and location, and reducing the risk of false alarms and missed alarms.

CN121993748APending Publication Date: 2026-05-08YANGTZE UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
YANGTZE UNIVERSITY
Filing Date
2026-03-23
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing methods for identifying gas pipeline leaks suffer from insufficient accuracy, are prone to false alarms and missed alarms, and fail to fully utilize multimodal information and spatiotemporal correlation, making it difficult to achieve efficient leak location.

Method used

By acquiring time-series data on pressure, flow, and acoustic vibration from multiple sensor nodes, a time-scale map is generated using continuous wavelet transform. Topological characteristics are calculated, and a spatiotemporal graph model is constructed. Combined with Bayesian inference and a negative pressure wave physical model, a spatiotemporal graph convolutional network is used for processing to determine the leak location and make decisions based on asymmetric expected risks.

Benefits of technology

It improves the accuracy and reliability of gas pipeline leak detection, enhances the distinction between signals and noise, enables in-depth detection of leak signals, and reduces the risk of false alarms and missed alarms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121993748A_ABST
    Figure CN121993748A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of gas pipeline leakage identification, and discloses a gas pipeline leakage identification and positioning method and system based on machine learning, and the method comprises the steps: obtaining pressure, flow and acoustic vibration time sequence data; a time-scale map is generated, and topological structure features are calculated; the topological structure features, the pressure time sequence features and the flow time sequence features serve as multi-modal input and are processed through a space-time diagram convolutional network, and the pipeline leakage recognition probability and initial leakage position probability distribution are output; the confidence coefficient of the likelihood function is determined, and posterior probability distribution of the leakage position is obtained through Bayesian reasoning updating; determining a fuzzy threshold value, and calculating and determining asymmetric expected risks of a leakage state and a normal state; and if the absolute value of the asymmetrical expected risk difference value of the two states is lower than a fuzzy threshold value, judging the current state as a to-be-confirmed state, otherwise, judging the current state as a leakage state or a normal state according to an expected risk minimum principle. According to the invention, the gas pipeline leakage identification precision can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of gas pipeline leak detection technology, specifically to a method and system for gas pipeline leak detection and location based on machine learning. Background Technology

[0002] As a clean energy source, natural gas relies on a vast pipeline network for its long-distance transmission. However, gas leaks occur frequently due to factors such as pipeline corrosion, third-party sabotage, or material aging. Leaks not only cause significant economic losses and energy waste but also have the potential to trigger serious safety accidents such as fires and explosions, posing a serious threat to public life, property, and the ecological environment.

[0003] Existing pipeline leak detection methods are mainly divided into direct detection methods and indirect detection methods. While direct detection methods (such as manual inspection) provide intuitive results, they suffer from inherent drawbacks such as long inspection cycles, poor real-time performance, high labor costs, and difficulty in achieving full coverage. In contrast, indirect detection methods infer leaks by analyzing changes in fluid dynamic parameters such as pressure, flow rate, and acoustic waves within the pipeline, offering better real-time performance and coverage potential.

[0004] In data-driven indirect detection methods, physical modeling identifies characteristic waves caused by leaks by establishing fluid dynamics equations. However, these methods require extremely high accuracy in the pipeline model and are easily affected by background noise from normal operations such as valve opening and closing, and compressor start-up and shutdown, resulting in weak detection capabilities for minor leaks and a relatively high false alarm rate. Machine learning methods improve the accuracy of identification to some extent by learning leakage patterns from historical data. Nevertheless, existing machine learning methods still have many limitations: First, they mostly rely on single signals such as pressure or flow rate, failing to fully utilize the complementary advantages of multimodal information; second, most models ignore the spatiotemporal correlation of signal propagation in the pipeline network topology, making it difficult to capture the global evolution of leak events; third, in the localization stage, the effectiveness of data-driven models is easily affected by imbalanced training samples; finally, traditional fixed threshold alarm strategies cannot adapt to changing operating conditions, lack assessment of the asymmetric risks caused by false alarms and missed alarms, and the level of intelligent decision-making needs to be improved. Summary of the Invention

[0005] This invention provides a method and system for identifying and locating gas pipeline leaks based on machine learning to solve the problems of insufficient accuracy in identifying gas pipeline leaks in the prior art, which easily leads to false alarms and missed alarms.

[0006] In a first aspect, the gas pipeline leak identification and location method based on machine learning of the present invention includes the following steps: Acquire pressure, flow rate, and acoustic vibration time-series data from multiple sensor nodes deployed along the gas pipeline; perform continuous wavelet transform on the acoustic vibration time-series data to generate a time-scale map, and calculate the continuous homology Betti number sequence of the time-scale map to obtain topological characteristics; The pipeline network is constructed as a spatiotemporal graph model, and the topological features, pressure time series features, and flow time series features are used as multimodal inputs. The model is then processed through a spatiotemporal graph convolutional network to output the pipeline leak identification probability and the preliminary leak location probability distribution. The initial probability distribution of the leak location is used as the prior probability for Bayesian inference, and the Shannon entropy is calculated. Based on the Shannon entropy, the confidence level of the likelihood function of the physical model of negative pressure wave propagation is determined. Combining the prior probability and the likelihood function, the posterior probability distribution of the leak location is updated through Bayesian inference. Based on the pipeline leakage identification probability, a fuzzy threshold is determined, and the asymmetric expected risk of being judged as a leakage state and a normal state is calculated respectively. If the absolute value of the difference between the asymmetric expected risks of the two states is lower than the fuzzy threshold, the current state is judged as pending confirmation; otherwise, according to the principle of minimizing expected risk, the current state is judged as a leakage state or a normal state.

[0007] Preferably, the step of generating a time-scale map by performing continuous wavelet transform on the acoustic vibration time-series data and calculating the continuous homology Betti number sequence of the time-scale map to obtain topological features includes: A continuous wavelet transform is performed on the acoustic vibration time-series data of each sensor node to obtain a time-scale map; the time-scale map is then grayscaled and binarized to generate a binary image; the binary image is converted into a cubic complex, and the 0th-order Betti number is calculated using the continuous homology algorithm. Sequences and 1st-order Betti numbers The sequence serves as a topological feature.

[0008] Preferably, the step of constructing the pipeline network as a spatiotemporal graph model and using topological features, pressure time-series features, and flow time-series features as multimodal inputs, and processing them through a spatiotemporal graph convolutional network, includes: Each sensor node is defined as a node in the spatiotemporal graph model, and the physical pipe segments connecting adjacent nodes are defined as edges in the spatiotemporal graph model to construct the spatiotemporal graph model. The topological features, pressure time series features, and flow time series features of each node are concatenated along the feature dimension to form a multimodal input feature matrix for the node. The spatiotemporal graph convolutional network is composed of stacked spatiotemporal convolutional blocks, and each spatiotemporal convolutional block contains a layer of graph convolutional network for spatial feature extraction and a layer of gated recurrent unit for temporal feature extraction.

[0009] Preferably, the Shannon entropy is calculated using the following formula: ;in, For Shannon entropy, Let be the probability of a leak occurring in the i-th pipe segment.

[0010] Preferably, the confidence level of the likelihood function for determining the physical model of negative pressure wave propagation based on Shannon entropy includes: Confidence of the likelihood function Calculated using the following formula: ; in, The average leakage information entropy reference value is obtained based on historical data statistics, and k is a preset positive parameter. For Shannon entropy.

[0011] Preferably, the step of combining the prior probability and the likelihood function to update the posterior probability distribution of the leakage location through Bayesian inference includes: For each possible leak location Based on the physical model of negative pressure wave propagation, the theoretical arrival time of the negative pressure wave at each sensor is calculated and compared with the actual monitored arrival time to obtain the likelihood function value. ; Posterior probability distribution of leak location Calculated using the following formula: ; in, This is a preliminary probability distribution of the leak location. represents the confidence level of the likelihood function.

[0012] Preferably, determining the fuzzy threshold based on the pipeline leak identification probability includes: Fuzzy threshold Calculated using the following formula: ; in, The preset benchmark risk difference threshold, These are preset positive parameters. This determines the probability of identifying pipeline leaks.

[0013] Preferably, the calculation of the asymmetric expected risk, which is determined to be in a leakage state and a normal state, includes: Set the cost of underreporting risk as The cost of false alarm risk is ,and ; The asymmetric expected risk identified as a leakage state is calculated using the following formula. : ; The following formula is used to calculate the asymmetric expected risk that is determined to be in a normal state. : ; in, This determines the probability of identifying pipeline leaks.

[0014] Preferably, the acoustic vibration time series data of each sensor node is subjected to continuous wavelet transform using Morlet mother wavelet to obtain a time-scale map.

[0015] Secondly, the gas pipeline leak identification and location system based on machine learning of the present invention includes a memory and a processor. The memory stores computer instructions, and when the processor executes the computer instructions, it implements the above-mentioned gas pipeline leak identification and location method based on machine learning.

[0016] The beneficial effects of this invention are as follows: By fusing multimodal data of pressure, flow rate, and acoustic vibration, and employing continuous cohomology theory to extract topological features from acoustic signals, this invention can detect the deep essence of leakage signals and enhance the distinction between signals and noise. It utilizes spatiotemporal graph convolutional networks to perform integrated modeling of the pipeline network's topology and signal propagation process, uncovering the spatiotemporal correlations between multi-sensor data. The preliminary results of the data-driven model are fused with the negative pressure wave physical model within a Bayesian framework, achieving complementary advantages between machine learning and physical mechanisms. By employing decision criteria based on asymmetric expected risk, alarm decisions can represent the different consequences of missed and false alarms, thereby improving reliability and practicality. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating the machine learning-based gas pipeline leak identification and location method provided in an embodiment of the present invention. Detailed Implementation

[0018] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.

[0019] like Figure 1 As shown, an embodiment of the machine learning-based gas pipeline leak identification and location method provided by the present invention includes the following steps: S1. Acquire pressure, flow rate and acoustic vibration time-series data of multiple sensor nodes deployed along the gas pipeline; perform continuous wavelet transform on the acoustic vibration time-series data to generate a time-scale map, and calculate the continuous homology Betti number sequence of the time-scale map to obtain topological features.

[0020] Specifically, high-frequency fiber optic acoustic sensors, pressure transmitters, and ultrasonic flow meters are installed every 500 meters along the gas pipeline or at valve chamber locations. Acoustic vibration signals are acquired at a sampling frequency of 1 kHz, and pressure and flow data are acquired at a sampling frequency of 1 Hz. The acquired raw data is then preprocessed, for example, by using a bandpass filter to remove operating noise from the acoustic vibration signals, and by normalizing all data using the Z-score method to form a time-series dataset with a uniform scale.

[0021] Morlet wavelet is selected as the mother wavelet. A continuous wavelet transform is performed on the acoustic vibration time-series data segment with 1024 sampling points acquired by each sensor node to generate a two-dimensional time-scale map representing the distribution of signal energy on both time and frequency scales. The pixel grayscale values ​​of this time-scale map are used as a filtering function to construct a cubic complex. By scanning the grayscale threshold from low to high, the topological invariants of this complex at different thresholds are calculated, i.e., the zero-dimensional Betti number (…). (representing the number of connected components) and the one-dimensional Betti number ( (This represents the number of annular holes). Finally, the generation and disappearance thresholds of these topological features are recorded to form a persistence graph, and the lifetime of all feature points in the persistence graph (i.e., the disappearance threshold minus the generation threshold) is used as a topological feature sequence to represent the stability of the internal structure of the leakage signal.

[0022] In an optional embodiment, the step of generating a time-scale map by performing continuous wavelet transform on the acoustic vibration time-series data and calculating the continuous homology Betti number sequence of the time-scale map to obtain topological features includes: performing continuous wavelet transform on the acoustic vibration time-series data of each sensor node using the Morlet mother wavelet to obtain a time-scale map; performing grayscale and binarization processing on the time-scale map to generate a binary image; converting the binary image into a cubic complex and calculating the 0th-order Betti number using the continuous homology algorithm. Sequences and 1st-order Betti numbers The sequence serves as a topological feature.

[0023] For example, consider acoustic vibration data collected by a sensor for 10 seconds at a sampling frequency of 1024Hz. This data is a one-dimensional time series containing 10240 data points. A continuous wavelet transform is performed on this time series using the Morlet mother wavelet to generate a... The time-scale spectrum is represented by a horizontal axis representing time and a vertical axis representing scale (the reciprocal of frequency). The color intensity represents the amplitude of the wavelet coefficients at that time and scale.

[0024] Then, the generated time-scale map is converted into a grayscale image. A threshold, such as 128, is set, and the grayscale image is binarized. Pixels with values ​​greater than 128 are set to 1 (white), and those less than or equal to 128 are set to 0 (black), resulting in a binary image. This binary image is then considered as a cubic complex, where white pixels are the components. The continuous cohomology algorithm is applied to analyze the topology of this complex, tracking the generation and disappearance of connected components (0th-order Betti number) and annular holes (1st-order Betti number) under different filtering thresholds, thus obtaining two numerical sequences, such as... The sequence is (5, 4, 2, 1) and The sequence is (0, 1, 3, 1, 0), and these two sequences together constitute the topological structure characteristics of this vibration signal segment.

[0025] S2 constructs the pipeline network as a spatiotemporal graph model, and uses topological features, pressure time series features, and flow time series features as multimodal inputs. It processes these features through a spatiotemporal graph convolutional network to output the pipeline leak identification probability and the initial leak location probability distribution.

[0026] Specifically, the gas pipeline network is constructed as a spatiotemporal graph model. Each sensor node is defined as a node in the spatiotemporal graph model, and the physical pipeline segments connecting adjacent nodes are defined as edges in the spatiotemporal graph model, with the edge weight set to the length of the pipeline segment. At each time step, the topological feature sequence corresponding to the node, the pressure time-series features of the past 60 seconds, and the flow time-series features are concatenated to form the node's multimodal feature vector. Then, a graph neural network composed of multiple stacked spatiotemporal convolutional modules is constructed. Within each module, a one-dimensional convolutional network is first used to extract the changes in the features of each node along the time axis, and then a graph convolutional network is used to aggregate the feature information of spatially adjacent nodes along the edges of the graph. Finally, the network outputs a scalar value between 0 and 1 through a global pooling layer and a sigmoid activation function, representing the probability of a leak in the entire pipeline network; simultaneously, a Softmax layer for all nodes or pipeline segments outputs a probability distribution vector, representing the initial probability of a leak occurring at each location.

[0027] In an optional embodiment, the step of constructing the pipeline network as a spatiotemporal graph model and using topological features, pressure time-series features, and flow time-series features as multimodal inputs, and processing them through a spatiotemporal graph convolutional network, includes: Each sensor node is defined as a node in the spatiotemporal graph model, and the physical pipe segments connecting adjacent nodes are defined as edges in the spatiotemporal graph model to construct the spatiotemporal graph model. The topological features, pressure time series features, and flow time series features of each node are concatenated along the feature dimension to form a multimodal input feature matrix for the node. The spatiotemporal graph convolutional network is composed of stacked spatiotemporal convolutional blocks, and each spatiotemporal convolutional block contains a layer of graph convolutional network for spatial feature extraction and a layer of gated recurrent unit for temporal feature extraction.

[0028] For example, suppose a gas pipeline network contains 20 sensor nodes, denoted as node 1 to node 20. Based on the physical connections of the pipeline, construct a graph containing the 20 nodes and their corresponding connecting edges. The connection relationships can be represented by a... The adjacency matrix is ​​used to represent the features. Within a certain time step, such as 1 minute, the multimodal features of each node are extracted. Taking node 5 as an example, assume its topological feature is a sequence of Betti numbers of length 20, while its pressure reading is 0.3 MPa and its flow rate reading is 50 cubic meters per hour. Concatenating these three values ​​forms a feature vector of length 22.

[0029] The feature vectors of 20 nodes from the past 60 minutes are combined to form a... A multimodal input feature tensor is used. This tensor is then fed into a spatiotemporal graph convolutional network. In the network, the graph convolutional layers utilize an adjacency matrix to aggregate features from neighboring nodes at each time step. For example, the features of node 5 are weighted and fused with the features of its connected nodes 4 and 6 to detect the spatial diffusion pattern of the leakage signal. Subsequently, gated recurrent unit layers process the fused feature sequence temporally to learn the evolution of pressure, flow, and vibration topological features over time. By stacking multiple spatiotemporal convolutional blocks, the model can learn deep spatiotemporal relationships.

[0030] S3, take the initial probability distribution of the leak location as the prior probability of Bayesian inference and calculate the Shannon entropy; determine the confidence level of the likelihood function of the negative pressure wave propagation physical model based on the Shannon entropy, and combine the prior probability and the likelihood function to update the posterior probability distribution of the leak location through Bayesian inference.

[0031] Specifically, the initial leakage location probability distribution output by the spatiotemporal graph convolutional network is used as the prior probability P(L) of the leakage location L. Then, the Shannon entropy H of this distribution is calculated; a higher Shannon entropy H indicates greater uncertainty in the model output. In an optional embodiment, the Shannon entropy is calculated using the following formula: ;in, For Shannon entropy, Let be the probability of a leak occurring in the i-th pipe segment.

[0032] For example, suppose the initial leak location probability distribution P output by the spatiotemporal graph convolutional network covers 100 pipe segments. If the model is certain that the leak occurred in pipe segment number 10, assume the distribution is P = 0.001, ..., 0.9, ..., 0.001, where the 10th element is 0.9. Calculating the Shannon entropy H(P) of this distribution yields a very low value, for example, H(P) = 0.8, indicating that the uncertainty of this probability distribution is low and the information content is highly concentrated.

[0033] In an optional embodiment, determining the confidence level of the likelihood function of the physical model of negative pressure wave propagation based on Shannon entropy includes: Confidence of the likelihood function Calculated using the following formula: ; in, The average leakage information entropy reference value is obtained based on historical data statistics, and k is a preset positive parameter. For Shannon entropy.

[0034] Specifically, based on statistics of historical leakage events, the average leakage information entropy is 3.5, therefore, let... Let the value be 3.5, and set k to 2. Substitute H(P) = 0.8 into the above formula to calculate... The value is very close to 1. This indicates a high degree of confidence in the likelihood function of the physical model when the results of the data-driven model are certain. Conversely, if the P distribution is very uniform and H(P) is high, then the calculated... The value will be close to 0.

[0035] In an optional embodiment, the step of combining the prior probability and the likelihood function to update the posterior probability distribution of the leakage location through Bayesian inference includes: A physical model for negative pressure wave propagation is established based on the negative pressure wave method. An observation vector O is constructed based on the arrival time difference of the negative pressure waves detected by each sensor. For each possible leak location... Based on the physical model of negative pressure wave propagation, the theoretical arrival time of the negative pressure wave at each sensor is calculated and compared with the actual monitored arrival time to obtain the likelihood function value. .

[0036] Posterior probability distribution of leak location Calculated using the following formula: ; in, This is a preliminary probability distribution of the leak location. represents the confidence level of the likelihood function.

[0037] For example, consider a 1000-meter-long pipe with sensors A and B at its two ends. First, divide this pipe into 1000 possible leak locations. Each position represents 1 meter. Then, calculate the distance at each position. The likelihood function value. Assuming the propagation speed of the negative pressure wave in the gas is 350 m / s, if the leak occurs at a location 200 meters from point A... Theoretically, the negative pressure wave would take approximately 0.57 seconds to reach point A and approximately 2.29 seconds to reach point B. The difference can be calculated by comparing this theoretical time with the arrival time detected from actual data. The smaller the difference, the more likely the wave is to travel to point B. likelihood function value The higher the value, for example, 0.95. This process is repeated for all 1000 possible leak locations.

[0038] The initial probability distribution output by the spatiotemporal graph network is used as the prior probability. Assuming a location of 200 meters... Its prior probability The confidence level is 0.6. Meanwhile, it is assumed that the calculated confidence level... The posterior probability is 0.9. The posterior probability of all 1000 locations is calculated, and all results are normalized to a sum of 1, thus obtaining the posterior probability distribution of the leak locations. This posterior probability distribution integrates the initial data-driven judgment and the validation of the physical model.

[0039] S4. Based on the pipeline leakage identification probability, a fuzzy threshold is determined, and the asymmetric expected risk of being judged as a leakage state and a normal state is calculated respectively. If the absolute value of the difference between the asymmetric expected risks of the two states is lower than the fuzzy threshold, the current state is judged as pending confirmation. Otherwise, according to the principle of minimizing expected risk, the current state is judged as a leakage state or a normal state.

[0040] Assuming the probability of identifying a pipeline leak is The probability of the normal state is then... In an optional embodiment, determining the fuzzy threshold based on the pipeline leak identification probability includes: Fuzzy threshold Calculated using the following formula: ; in, The preset benchmark risk difference threshold, These are preset positive parameters. This determines the probability of identifying pipeline leaks.

[0041] set up It is 500. It is 20. Assume the calculation yields... A value of 0.9 indicates a high probability of a leak. At this point, The calculated result is much less than 500, for example Approximately 20.3. This means that when there is a high degree of certainty about a leak, the fuzzy threshold for decision-making decreases, making it easier to trigger an alarm (determine a leak). Conversely, if It is 0.1. The calculated result is also approximately 20.3, making decisions to maintain the normal state easier. And when... The system uncertainty is highest when the value approaches 0.5. It will approach the baseline risk difference threshold of 500, making decisions more cautious and more likely to be classified as pending confirmation.

[0042] In an optional embodiment, the calculation of the asymmetric expected risk determined as a leakage state and a normal state includes: Set the cost of underreporting risk as The cost of false alarm risk is ,and ; The asymmetric expected risk identified as a leakage state is calculated using the following formula. : ; The following formula is used to calculate the asymmetric expected risk that is determined to be in a normal state. : ; in, This determines the probability of identifying pipeline leaks.

[0043] Specifically, based on the potentially severe consequences of a gas leak, asymmetric costs are set for different types of decision-making errors. The consequences of failing to report a real leak could be catastrophic; therefore, a cost for the risk of underreporting is set. The limit is 100,000 units. A single false alarm (leakage detection) results in the economic loss of production shutdown and maintenance; therefore, a false alarm risk cost is defined. It consists of 2000 units.

[0044] Assuming the current pipeline leak detection probability Given a value of 0.1, calculate the asymmetric expected risk under the two decision-making conditions, and obtain the results. It is 1800. The value is 10000. Then, the absolute value of the difference between the asymmetric expected risks of the two states is calculated; if the absolute value of this difference is less than... If the current evidence is insufficient to make a clear judgment, the status will be marked as pending confirmation, and the operations and maintenance personnel will be notified to pay attention; otherwise, a comparison will be made. and Size: like If the condition is normal, it is considered a normal state; otherwise, it is considered a leaking state.

[0045] The implementation principle of the machine learning-based gas pipeline leak identification and location method in this invention is as follows: This invention integrates multimodal data such as pressure, flow rate, and acoustic vibration, and innovatively employs continuous homology theory to extract topological features from acoustic signals. This reveals the essence of the leak signal more profoundly and significantly enhances the distinguishability between signal and noise. Furthermore, this invention utilizes a spatiotemporal graph convolutional network to perform integrated modeling of the pipeline network's topology and signal propagation process, effectively uncovering the spatiotemporal correlations between multi-sensor data. Additionally, within a Bayesian framework, the preliminary results of the data-driven model are deeply integrated with a mature negative pressure wave physical model, achieving complementary advantages between machine learning and physical mechanisms. Finally, a decision criterion based on asymmetric expected risk is adopted, enabling alarm decisions to fully consider the different severe consequences of missed and false alarms, thereby significantly improving the system's reliability and practicality.

[0046] An embodiment of the gas pipeline leak identification and location system based on machine learning provided by the present invention includes a memory and a processor. The memory stores computer instructions, and when the processor executes the computer instructions, it implements the gas pipeline leak identification and location method based on machine learning in the above embodiment.

[0047] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A method for identifying and locating gas pipeline leaks based on machine learning, characterized in that, The process includes the following steps: acquiring time-series data of pressure, flow rate, and acoustic vibration from multiple sensor nodes deployed along the gas pipeline; performing continuous wavelet transform on the acoustic vibration time-series data to generate a time-scale map, and calculating the continuous homology Betti number sequence of the time-scale map to obtain topological features; The pipeline network is constructed as a spatiotemporal graph model, and the topological features, pressure time series features, and flow time series features are used as multimodal inputs. The model is then processed through a spatiotemporal graph convolutional network to output the pipeline leak identification probability and the preliminary leak location probability distribution. The initial probability distribution of the leak location is used as the prior probability for Bayesian inference, and the Shannon entropy is calculated. Based on the Shannon entropy, the confidence level of the likelihood function of the physical model of negative pressure wave propagation is determined. Combining the prior probability and the likelihood function, the posterior probability distribution of the leak location is updated through Bayesian inference. Based on the pipeline leakage identification probability, a fuzzy threshold is determined, and the asymmetric expected risk of being judged as a leakage state and a normal state is calculated respectively. If the absolute value of the difference between the asymmetric expected risks of the two states is lower than the fuzzy threshold, the current state is judged as pending confirmation; otherwise, according to the principle of minimizing expected risk, the current state is judged as a leakage state or a normal state.

2. The gas pipeline leak identification and location method based on machine learning according to claim 1, characterized in that, The process of generating a time-scale spectrum by performing continuous wavelet transform on acoustic vibration time-series data and calculating the continuous homology Betti number sequence of the time-scale spectrum to obtain topological features includes: A continuous wavelet transform is performed on the acoustic vibration time-series data of each sensor node to obtain a time-scale map; the time-scale map is then grayscaled and binarized to generate a binary image; the binary image is converted into a cubic complex, and the 0th-order Betti number is calculated using the continuous homology algorithm. Sequences and 1st-order Betti numbers The sequence serves as a topological feature.

3. The gas pipeline leak identification and location method based on machine learning according to claim 1, characterized in that, The process of constructing a spatiotemporal graph model of the pipeline network and using topological features, pressure time-series features, and flow time-series features as multimodal inputs, followed by processing through a spatiotemporal graph convolutional network, includes: Each sensor node is defined as a node in the spatiotemporal graph model, and the physical pipe segments connecting adjacent nodes are defined as edges in the spatiotemporal graph model to construct the spatiotemporal graph model. The topological features, pressure time series features, and flow time series features of each node are concatenated along the feature dimension to form a multimodal input feature matrix for the node. The spatiotemporal graph convolutional network is composed of stacked spatiotemporal convolutional blocks, and each spatiotemporal convolutional block contains a layer of graph convolutional network for spatial feature extraction and a layer of gated recurrent unit for temporal feature extraction.

4. The method for identifying and locating gas pipeline leaks based on machine learning according to claim 1, characterized in that, The Shannon entropy is calculated using the following formula: ;in, For Shannon entropy, Let be the probability of a leak occurring in the i-th pipe segment.

5. The gas pipeline leak identification and location method based on machine learning according to claim 4, characterized in that, The confidence level of the likelihood function for determining the physical model of negative pressure wave propagation based on Shannon entropy includes: Confidence of the likelihood function Calculated using the following formula: ; in, The average leakage information entropy reference value is obtained based on historical data statistics, and k is a preset positive parameter. For Shannon entropy.

6. The gas pipeline leak identification and location method based on machine learning according to claim 5, characterized in that, The step of combining the prior probability and the likelihood function to update the posterior probability distribution of the leak location through Bayesian inference includes: For each possible leak location Based on the physical model of negative pressure wave propagation, the theoretical arrival time of the negative pressure wave at each sensor is calculated and compared with the actual monitored arrival time to obtain the likelihood function value. ; Posterior probability distribution of leak location Calculated using the following formula: ; in, This is a preliminary probability distribution of the leak location. represents the confidence level of the likelihood function.

7. The gas pipeline leak identification and location method based on machine learning according to claim 1, characterized in that, The determination of the fuzzy threshold based on the pipeline leak identification probability includes: Fuzzy threshold Calculated using the following formula: ; in, The preset benchmark risk difference threshold, These are preset positive parameters. This determines the probability of identifying pipeline leaks.

8. The method for identifying and locating gas pipeline leaks based on machine learning according to claim 1, characterized in that, The calculation of the asymmetric expected risks, which are determined to be in a leakage state and a normal state, includes: Set the cost of underreporting risk as The cost of false alarm risk is ,and ; The asymmetric expected risk identified as a leakage state is calculated using the following formula. : ; The following formula is used to calculate the asymmetric expected risk that is determined to be in a normal state. : ; in, This determines the probability of identifying pipeline leaks.

9. The gas pipeline leak identification and location method based on machine learning according to claim 2, characterized in that, The Morlet mother wavelet is used to perform continuous wavelet transform on the acoustic vibration time series data of each sensor node to obtain the time-scale map.

10. A gas pipeline leak identification and location system based on machine learning, characterized in that, It includes a memory and a processor. The memory stores computer instructions. When the processor executes the computer instructions, it implements the machine learning-based gas pipeline leak identification and location method as described in any one of claims 1-9.