Natural gas pipeline leakage detection method, system, equipment and medium
By combining deep learning technology with environmental data and real-time meteorological factors, leak detection of natural gas pipelines is achieved, solving the problem that soil characteristics and meteorological factors are not considered in traditional methods, and realizing more accurate leak location and rapid response.
Patent Information
- Application Number
- CN202511787269.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-01
- Publication Date
- 2026-01-27
AI Technical Summary
Traditional natural gas pipeline leak detection methods ignore the individual effects of soil characteristics, resulting in large deviations in leak range prediction. They also fail to effectively incorporate real-time meteorological factors, making it impossible to quickly and accurately locate the leak.
By acquiring environmental and pipeline data along the natural gas pipeline, deep learning technology is used to identify anomalies in real-time gas cloud images. Combined with a pre-trained pipeline leakage analysis model, gas infiltration time is generated and corrected based on real-time precipitation to ultimately determine the location of the leak.
It improves the accuracy and reliability of natural gas pipeline leak detection, enabling more precise prediction of gas seepage paths, narrowing the scope of anomaly investigation, shortening repair time, and preventing accidents from escalating.
Smart Images

Figure CN121408641A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of pipeline leak detection, and specifically relates to a method, system, equipment and medium for natural gas pipeline leak detection based on deep learning. Background Technology
[0002] Since the West-East Gas Pipeline Project began operation, natural gas, as a high-quality and efficient clean energy source, has gradually become the dominant gas source for urban gas supply, promoting socio-economic development and reducing environmental pollution. However, with the increasingly widespread use of natural gas, accidents could seriously endanger public safety.
[0003] The soil environment along the pipeline is complex and variable. Traditional leak detection methods use a uniform detection strategy, which ignores the individual influence of soil characteristics, resulting in a large deviation in the prediction of the leak range. Summary of the Invention
[0004] To address the aforementioned issues, this application provides a method, system, equipment, and medium for detecting leaks in natural gas pipelines based on deep learning. This solution more accurately predicts the actual gas seepage path, narrows down the scope of anomaly detection, thereby shortening repair time and preventing the accident from escalating.
[0005] To address the aforementioned technical problems, the first aspect of this disclosure proposes a deep learning-based method for detecting leaks in natural gas pipelines, the detection method comprising: The system acquires environmental and pipeline data at various locations along the natural gas pipeline, and obtains real-time gas cloud images at various locations along the natural gas pipeline based on the pipeline data. Anomaly identification is performed on each of the real-time gas cloud images to determine the location of the anomaly. Based on the pre-trained pipeline leakage analysis model and combined with environmental data, the gas infiltration time of the natural gas pipeline at the anomaly location is generated. The gas infiltration time is corrected by using environmental data of the natural gas pipeline at the abnormal location and real-time precipitation data. Based on the gas migration velocity corresponding to the abnormal location, the leak location of the natural gas pipeline is determined by the corrected gas infiltration time.
[0006] According to a preferred embodiment of this disclosure, the training method for the pipeline leakage analysis model includes: Based on environmental data from different segments in historical data, the porosity and permeability of the soil in different segments are calculated, and corresponding physical models of gas leakage are constructed based on the porosity and permeability. Using the aforementioned physical model of gas leakage, simulation results of leakage under different operating conditions were obtained. The simulated infiltration time is obtained from each of the simulated leakage results, and the operating condition information corresponding to each simulated infiltration time is determined; Using the operating condition information as input and the corresponding simulated infiltration time as output, the pipeline leakage analysis model constructed based on the deep learning algorithm is trained to obtain the trained pipeline leakage analysis model.
[0007] According to a preferred embodiment of this disclosure, the correction of the gas infiltration time based on environmental data and real-time precipitation from the natural gas pipeline at the abnormal location includes: A precipitation correction model is determined based on the aforementioned anomaly locations; The real-time precipitation data is input into the precipitation correction model to obtain the correction coefficients; The gas permeation time is corrected using the correction coefficient.
[0008] According to a preferred embodiment of this disclosure, determining the precipitation correction model based on the abnormal location includes: Obtain historical precipitation data at various locations along the natural gas pipeline; Based on the soil permeability at different locations of the natural gas pipeline under different historical precipitation levels, a curve showing the relationship between precipitation and permeability at different locations was fitted. The permeability in the corresponding gas leakage physical model is updated based on the relationship curves at each location, and the simulated permeation time is updated based on the updated gas leakage physical model. The precipitation correction model is established by regression fitting using the simulated infiltration time before each update and the simulated infiltration time after each update. The corresponding precipitation correction model is determined based on the location of the anomaly.
[0009] According to a preferred embodiment of this disclosure, the step of identifying anomalies and determining anomaly locations in each of the real-time weather and cloud images includes: Extract the first image features from the real-time cloud image and obtain the second image features from the normal cloud image; Each of the first image features is compared with the second image features to determine the abnormal cloud images in the real-time cloud images; The location of the abnormal cloud image is taken as the abnormal location.
[0010] According to a preferred embodiment of this disclosure, determining the leak location of the natural gas pipeline based on the gas migration velocity corresponding to the abnormal location and the corrected gas permeation time includes: Obtain the surface wind speed at the abnormal location and calculate the pressure change caused by the surface wind speed; The horizontal gas migration velocity is calculated based on the pressure change. The location of the leak in the natural gas pipeline is calculated based on the gas migration velocity and the gas infiltration time, combined with the location of the anomaly.
[0011] According to a preferred embodiment of this disclosure, obtaining real-time gas cloud images at various locations along the natural gas pipeline based on the pipeline data includes: The distribution data of natural gas pipelines is determined based on the pipeline data, and the flight path of the UAV is planned based on the distribution data; The drone is controlled to fly based on the flight path, and real-time atmospheric cloud images of various locations are collected by the atmospheric cloud imaging device on the drone.
[0012] To address the aforementioned technical problems, a second aspect of this disclosure proposes a deep learning-based natural gas pipeline leak detection system, the detection system comprising: The data acquisition module is used to acquire environmental data and pipeline data at various locations along the natural gas pipeline, and to acquire real-time gas cloud images at various locations along the natural gas pipeline based on the pipeline data. The infiltration time determination module is used to identify anomalies in each of the real-time gas cloud images to determine the location of the anomalies, and generate the gas infiltration time of the natural gas pipeline at the anomaly location based on a pre-trained pipeline leakage analysis model and combined with environmental data. The data correction module is used to correct the gas infiltration time using environmental data of the natural gas pipeline at the abnormal location and real-time precipitation. The leak location determination module is used to determine the leak location of the natural gas pipeline based on the gas migration velocity corresponding to the abnormal location and the corrected gas permeation time.
[0013] To address the aforementioned technical problems, a third aspect of this disclosure provides an electronic device, comprising: Processor; and A memory storing computer-executable instructions, which, when executed, cause the processor to perform the method described in any of the above embodiments.
[0014] To address the aforementioned technical problems, a fourth aspect of this disclosure provides a computer storage medium that stores one or more programs, which, when executed by a processor, implement the method described in any of the above embodiments.
[0015] Compared with existing technologies, this application has the following advantages: By acquiring environmental data, pipeline data, and real-time gas cloud images at various locations along the natural gas pipeline, deep learning is used to identify and locate leak anomalies in the gas cloud images. A pre-trained pipeline leak analysis model is combined with environmental data to generate gas infiltration time. This infiltration time is then corrected based on real-time precipitation. Finally, the leak location is determined based on the corrected infiltration time and the pre-trained gas migration velocity. This solution effectively solves the problems of traditional methods neglecting the individual influence of soil characteristics and failing to couple real-time meteorological factors. It improves the accuracy and reliability of natural gas pipeline leak detection, enabling more precise prediction of the actual gas infiltration path, narrowing the scope of anomaly investigation, thereby shortening repair time and preventing the accident from escalating.
[0016] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures pointed out in the description, claims and drawings. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 A schematic flowchart of a deep learning-based natural gas pipeline leak detection method according to an embodiment of the present disclosure is shown. Figure 2 A schematic flowchart of a training method for a pipeline leakage analysis model according to an embodiment of the present disclosure is shown; Figure 3 A second schematic flowchart of a deep learning-based natural gas pipeline leak detection method according to an embodiment of the present disclosure is shown. Figure 4 A schematic flowchart of a method for determining a precipitation correction model based on anomaly locations according to an embodiment of the present disclosure is shown. Figure 5 A schematic flowchart of a deep learning-based natural gas pipeline leak detection method according to an embodiment of the present disclosure is shown in part three. Figure 6 A schematic flowchart of a deep learning-based natural gas pipeline leak detection method according to an embodiment of the present disclosure is shown in Figure 4. Figure 7A schematic flowchart of a deep learning-based natural gas pipeline leak detection method according to an embodiment of the present disclosure is shown in Figure 5. Figure 8 A schematic diagram of a deep learning-based natural gas pipeline leak detection system according to an embodiment of the present disclosure is shown. Figure 9 A schematic diagram of an electronic device structure according to an embodiment of the present disclosure is shown. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] The same reference numerals in the accompanying drawings denote the same or similar elements, components, or parts, and therefore repeated descriptions of the same or similar elements, components, or parts may be omitted below. It should also be understood that although qualifiers such as first, second, third, etc., indicating numbers may be used herein to describe various devices, elements, components, or parts, these devices, elements, components, or parts should not be limited by these qualifiers. That is, these qualifiers are only used to distinguish one from another. For example, a first device may also be referred to as a second device, without departing from the essence of the technical solution of this disclosure. Furthermore, the terms "and / or" and "and / or" refer to all combinations including the first or more of the listed items.
[0021] Please see Figure 1 , Figure 1 This is one of the flowcharts of a deep learning-based natural gas pipeline leak detection method disclosed herein, such as... Figure 1 As shown, the detection methods include: S11. Obtain environmental data and pipeline data at various locations along the natural gas pipeline, and based on the pipeline data, obtain real-time gas cloud images at various locations along the natural gas pipeline.
[0022] In this embodiment, by collecting detailed environmental data (such as soil characteristics and meteorological conditions) and pipeline data (such as pipeline layout and material parameters) at various locations along the natural gas pipeline, and using this data to guide drones or fixed monitoring stations to acquire real-time gas cloud images along the pipeline route, comprehensive monitoring of the gas distribution around the pipeline can be achieved. This enables accurate acquisition of real-time status information for each section of the pipeline, providing a reliable data foundation for subsequent accurate identification of leak locations, analysis of leak range, and assessment of environmental impact, effectively improving the accuracy and response speed of pipeline leak detection.
[0023] In this embodiment, environmental data of the natural gas pipeline installation and pipeline data are collected to establish a natural gas pipeline leak detection database to record the collected parameters. Based on the distance of the natural gas pipeline, a UAV equipped with a gas cloud imaging device is used to continuously monitor the area along the natural gas pipeline and collect images of the gas concentration distribution above the ground.
[0024] In this embodiment, the current installation location data of the natural gas pipeline is acquired through a geographic information system. The installation location data includes the coordinates of the pipeline installation location and the pipeline direction. At the same time, natural gas pipeline parameter data, including pipeline length, pipeline diameter and soil depth data, are collected. The natural gas pipeline parameter data and the natural gas pipeline installation location data are integrated into pipeline data.
[0025] In this embodiment, environmental data of the natural gas pipeline installation is collected at fixed intervals. Soil samples were taken along the natural gas pipeline to obtain soil data, and the leakage depth limits for different sections of the pipeline were recorded. The leakage depth limits include the upper limit value. and lower limit value The upper limit value is lower limit value ,in This represents the current depth of the soil layer from the top of the pipeline to the ground surface. Representing the pipe diameter, a natural gas pipeline leak detection database is established using MySQL, and the collected data is recorded in the corresponding natural gas pipeline file.
[0026] S12. Anomaly identification is performed on each real-time gas cloud image to determine the location of the anomaly. Based on the pre-trained pipeline leakage analysis model, the gas infiltration time of the natural gas pipeline at the anomaly location is generated in combination with environmental data.
[0027] In this embodiment, image recognition technology is used to detect anomalies in real-time gas cloud images to accurately locate potential leak locations. Then, based on a pre-trained pipeline leak analysis model and combined with environmental data of the location point (such as soil type and meteorological conditions), the gas infiltration time at the anomaly location is intelligently generated. Through the fusion of deep learning and gas cloud imaging technology, rapid response and accurate prediction of pipeline leaks are achieved, effectively improving the accuracy and efficiency of leak detection.
[0028] In this embodiment, based on the real-time gas cloud images along the natural gas pipeline, the location of abnormal gas cloud images is identified to locate the section of the abnormal natural gas pipeline. Relevant data of the current abnormal section is extracted through the natural gas pipeline leak detection database, and the current leakage gas infiltration time range is calculated.
[0029] In this embodiment, the permeability of soil under different soil densities is collected, and natural gas leakage is simulated in combination with soil depth. A pipeline leakage analysis model is constructed based on a deep learning model and the gas infiltration time is output. Specifically, based on the soil type and soil density data in the current natural gas pipeline leakage detection database, the natural gas leakage is simulated in combination with the leakage depth limit range, and a pipeline leakage analysis model is constructed based on a deep learning model to output the gas infiltration time interval.
[0030] In this embodiment, based on the location where the current abnormal gas cloud image was captured, relevant data of the current abnormal segment is extracted from the natural gas pipeline leak detection database to obtain the leakage depth limit range. This leakage depth limit range is then substituted into the pipeline leak analysis model to output the gas infiltration time interval of the leaking gas. ,in These represent the shortest and longest infiltration times, respectively.
[0031] S13. Correct the gas infiltration time using environmental data of natural gas pipelines at abnormal locations and real-time precipitation.
[0032] In this embodiment, environmental data (such as soil permeability and temperature) of the natural gas pipeline at the abnormal location and real-time precipitation information are used to dynamically adjust and correct the gas infiltration time calculated in the preliminary stage. By comprehensively considering the influence of actual environmental factors and meteorological conditions on gas diffusion, the accuracy of gas infiltration time prediction is significantly improved, thereby more accurately locating the leakage range.
[0033] In this embodiment, the current leakage gas infiltration time range is corrected based on the rainfall in the current area using a correction coefficient. Historical rainfall data for the current natural gas pipeline laying area can be collected, and a correction model can be established based on the impact of rainfall on soil permeability to output the gas infiltration time interval correction coefficient.
[0034] S14. Based on the gas migration velocity corresponding to the abnormal location, the leak location of the natural gas pipeline is determined by the corrected gas infiltration time.
[0035] In this embodiment, a pre-trained gas migration velocity model (customized for the environmental characteristics of abnormal locations) is used, combined with the gas infiltration time corrected by environmental data and precipitation, to accurately delineate the leakage location range of the natural gas pipeline by calculating the diffusion distance of the gas in the soil. Through the application of multi-factor coupling correction and dynamic migration parameters, the accuracy of leak location is significantly improved, and the risk of accident spread is effectively controlled.
[0036] In this embodiment, anomaly identification is performed on real-time gas cloud images. Combined with pipeline environmental data at the abnormal location of the gas cloud imaging, the current gas infiltration time is obtained based on the pipeline leakage analysis model, and the gas infiltration time is corrected by combining precipitation. The location range of the pipeline gas leak is located by comprehensively using the current regional environmental wind speed prediction model.
[0037] In this embodiment, by acquiring environmental data, pipeline data, and real-time gas cloud images at various locations along the natural gas pipeline, deep learning is used to identify and locate leak anomalies in the gas cloud images. A pre-trained pipeline leak analysis model is combined with environmental data to generate gas infiltration time. This infiltration time is then corrected based on real-time precipitation. Finally, the leak location is determined based on the corrected infiltration time and the pre-trained gas migration velocity. This solution effectively solves the problems of traditional methods neglecting the individual influence of soil characteristics and failing to couple real-time meteorological factors. It improves the accuracy and reliability of natural gas pipeline leak detection, enabling more precise prediction of the actual gas infiltration path, narrowing the scope of anomaly investigation, thereby shortening repair time and preventing the accident from escalating.
[0038] Please see Figure 2 , Figure 2 This is a schematic diagram of the training method for a pipeline leakage analysis model provided in this disclosure, such as... Figure 2 As shown, the training method includes the following steps: S21. Based on environmental data from different segments in historical data, calculate the porosity and permeability of the soil in different segments, and construct corresponding physical models of gas leakage based on porosity and permeability.
[0039] In this embodiment, based on historical environmental data, soil porosity and permeability parameters are calculated for each road segment, and a segmented physical model describing the migration pattern of gas in the soil is constructed accordingly. By quantifying the influence of soil properties on gas diffusion, an accurate prediction model that conforms to actual geological conditions is established, effectively solving the problem of leakage range prediction deviation caused by the simplification of soil parameters in traditional methods.
[0040] In this embodiment, based on soil data from different sections of the natural gas pipeline leak detection database, the porosity and permeability of the soil in different sections are calculated, and a physical model is constructed: Among them, the porosity of the soil ,in These represent the bulk density of the soil and the density of soil particles, respectively, based on porosity. Calculate the penetration rate ,in Where A is the average particle size, and A is a constant. A physical model is constructed based on the convection-diffusion equations of mass conservation, Darcy's law, and Fick's law: ; ; Where u is the Darcy velocity, C is the gas concentration, and t is time. For the effective diffusion coefficient, It is the dynamic viscosity of the fluid, and P represents the internal pressure of the pipe.
[0041] S22. Using a physical model of gas leakage, simulated leakage results under different working conditions are obtained.
[0042] In this embodiment, a segmented gas leakage physical model is used to systematically simulate the gas diffusion process under various working conditions and generate a leakage result dataset by setting different combinations of variables such as soil conditions, meteorological parameters and leakage scenarios. Through high-precision numerical simulation, quantitative prediction of leakage behavior under complex geological-meteorological coupling conditions is realized, providing a standardized data foundation covering all working conditions for training deep learning models, and significantly improving the model's adaptability to edge scenarios such as extreme weather or special strata.
[0043] In this embodiment, the physical model is solved, and simulations are performed for a large number of different working conditions, with the results recorded: Discretize the depth direction z into N grids, where the step size is... Discretize time t into M steps, each step being... Regarding concentration The difference scheme at i grid points and j time steps is as follows: ; This represents the concentration at the i-th grid point at the j-th time step. Given initial and boundary conditions, the concentration distribution at each time step is iteratively solved. Simultaneously monitor surface concentration .
[0044] S23. Obtain the simulated penetration time from each simulated leakage result, and determine the operating condition information corresponding to each simulated penetration time.
[0045] In this embodiment, the system extracts the time data of gas infiltration to the ground surface from the results of multi-condition simulated leakage, and establishes a mapping database between each simulated infiltration time and specific operating conditions (soil parameter combination, meteorological variables, leakage scenario settings); by constructing a labeled data system of "operating condition characteristics-infiltration time", it provides training samples with causal logic for the deep learning model, enabling the model to accurately capture the time pattern of gas migration under different geological and meteorological conditions.
[0046] In this embodiment, the infiltration time is extracted from the results of each simulated working condition to construct a dataset for machine learning training. That is, when the natural gas concentration at the monitoring point exceeds a specific threshold of the background concentration, it is considered that the gas has infiltrated to the surface, and the infiltration time is recorded.
[0047] S24. Using the operating condition information as input and the corresponding simulated infiltration time as output, train the pipeline leakage analysis model built based on the deep learning algorithm to obtain the trained pipeline leakage analysis model.
[0048] In this embodiment, a combination of environmental parameters such as soil and meteorology under multiple operating conditions is used as input features, and the corresponding simulated gas infiltration time is used as the target output. The massive operating condition-infiltration time data is iteratively trained using deep learning algorithms (such as neural networks) to finally construct a pipeline leakage analysis model with environmental adaptability. Through the powerful nonlinear fitting capability of deep learning, the model can automatically learn the implicit laws of complex geological and meteorological conditions and gas diffusion time. Compared with traditional empirical formulas, the prediction accuracy is improved by more than 40%, and it has the generalization capability of cross-regional transfer learning.
[0049] In this embodiment, after completing a large number of working condition simulations, a dataset Q containing S samples is obtained, where , The value of is from 1 to S. The input features include soil type coding, soil density, leakage depth, and leakage rate. The output label is the infiltration time obtained from the simulation of this operating condition. The operating condition information and the simulated infiltration time are combined to generate a dataset, which is then divided into a training set, a validation set, and a test set. A pipeline leakage analysis model is trained using a neural network model to output the gas infiltration time.
[0050] Please see Figure 3 , Figure 3 This is the second schematic diagram of a deep learning-based natural gas pipeline leak detection method disclosed herein. As shown in the figure, the detection method includes the following steps: S31. Determine the precipitation correction model based on the abnormal location.
[0051] In this embodiment, for the identified pipeline anomaly locations, a mathematical model is constructed specifically to correct the impact of precipitation on gas infiltration time, taking into account key factors such as the geological characteristics and historical meteorological data of the location. By establishing a location-specific precipitation correction mechanism, the interference of differences in rainfall intensity and soil water holding capacity in different regions on gas diffusion prediction is effectively eliminated.
[0052] S32. Input the real-time precipitation into the precipitation correction model to obtain the correction coefficient.
[0053] S33. The gas permeation time is corrected by a correction coefficient.
[0054] In this embodiment, real-time monitored precipitation data is input into a pre-built precipitation correction model customized for specific abnormal locations. The gas infiltration time correction coefficient reflecting the impact of current rainfall is calculated, and the initial predicted gas infiltration time is dynamically adjusted using this coefficient. Through real-time rainfall quantification correction, the accuracy of gas infiltration time prediction is improved under rainy conditions, effectively solving the problem of misjudgment of leakage range caused by traditional models not considering dynamic changes in rainfall.
[0055] like Figure 4 As shown, the precipitation correction model is determined based on the anomaly location, including the following steps: S41. Obtain historical precipitation data for various locations along the natural gas pipeline.
[0056] In this embodiment, historical meteorological data from various monitoring points along the natural gas pipeline are collected, with a focus on extracting long-term precipitation records that precisely match the pipeline laying area, and constructing a time-space precipitation database covering the entire pipeline network. By accumulating multi-dimensional precipitation data, a basic support is provided for analyzing the changing patterns of the hydrological environment around the pipeline, enabling the subsequent leakage prediction model to quantify the differentiated impacts of rainfall in different areas on soil moisture content and gas diffusion.
[0057] S42. Based on the soil permeability at different locations of the natural gas pipeline under different historical precipitation levels, the relationship curves between precipitation and permeability at different locations are fitted.
[0058] In this embodiment, based on measured soil permeability data at various locations along the natural gas pipeline under different historical precipitation conditions, mathematical fitting methods (such as polynomial regression, nonlinear fitting, etc.) are used to establish quantitative relationship curves between precipitation and soil permeability at each location. By revealing the dynamic influence of precipitation on soil permeability under different geological conditions, key parameter support is provided for constructing an accurate gas leakage diffusion model.
[0059] S43. Update the permeability in the corresponding gas leakage physical model according to the relationship curves at each location, and update the simulated permeation time based on the updated gas leakage physical model.
[0060] In this embodiment, the soil permeability parameters in the physical model of gas leakage are dynamically corrected by using the precipitation-permeability relationship curves at various locations. This allows the model parameters to be automatically updated with real-time or historical precipitation data, and the simulated infiltration time of gas in the soil is then recalculated based on the updated model. By realizing the real-time coupling of model parameters with the precipitation environment, the scenario adaptability and engineering application value of leakage diffusion simulation are significantly improved.
[0061] S44. By using the simulated infiltration time before each update and the simulated infiltration time after the update, a precipitation correction model is established through regression fitting.
[0062] S45. Determine the corresponding precipitation correction model based on the abnormal location.
[0063] In this embodiment, the initial simulated infiltration time before the update and the simulated infiltration time after the update (with infiltration parameters corrected by precipitation) under the same working conditions are used as data pairs. Regression analysis methods (such as linear regression, nonlinear regression, etc.) are used to construct a quantitative mapping relationship between the two, thereby forming a precipitation correction model that can directly output correction coefficients based on the initial prediction results and real-time precipitation data. Through machine learning, the infiltration time correction rules are automatically extracted from massive data, enabling the model to have an integrated processing capability of "initial prediction - precipitation correction".
[0064] In this embodiment, a functional relationship between precipitation Y and soil permeability k is established experimentally, and the limiting rainfall is determined. Based on the newly generated soil permeability k, the updated infiltration time is obtained. Combined with the update penetration time Compared with the initial penetration time Establish a precipitation correction model: Under the same soil samples and environmental conditions, different amounts of precipitation were applied. Measure soil permeability under corresponding rainfall levels By fitting a quadratic function to the relationship between precipitation and soil permeability, the functional relationship curve between precipitation and soil permeability was analyzed. The precipitation at which the rate of change of soil permeability approaches 0 as precipitation increases was recorded as the extreme rainfall. ; Update soil permeability to obtain updated infiltration time With precipitation as the independent variable, the correction coefficient is... Using the variable as the dependent variable, a precipitation correction model is obtained through multinomial regression fitting, and the correction coefficient is output based on real-time rainfall.
[0065] Please see Figure 5 , Figure 5 This is the third schematic diagram of a deep learning-based natural gas pipeline leak detection method disclosed herein. As shown in the figure, the detection method includes the following steps: S51. Extract the first image features of the real-time cloud image and obtain the second image features of the normal cloud image.
[0066] In this embodiment, image processing techniques (such as edge detection and texture analysis) are used to extract key visual features (such as morphology, distribution, and concentration gradient) from real-time monitored gas cloud images as first image features. At the same time, the corresponding features are extracted from preset normal state gas cloud images using the same method as second image features. By establishing a feature benchmark comparison system between real-time and normal states, a quantifiable basis for difference analysis is provided for subsequent anomaly detection algorithms, enabling the system to quickly identify early signs of leakage when the gas cloud morphology deviates from the normal range.
[0067] S52. Compare each of the first image features with the second image features to determine the abnormal cloud images in the real-time cloud image.
[0068] S53. The location of the abnormal cloud image is taken as the abnormal location.
[0069] In this embodiment, features are extracted from the acquired real-time cloud images using edge detection and color segmentation algorithms. Abnormal cloud images are then identified by comparing them with the features of normal cloud images.
[0070] Please see Figure 6 , Figure 6 This is the fourth flowchart of a deep learning-based natural gas pipeline leak detection method provided in this disclosure. As shown in the figure, the detection method includes the following steps: S61. Obtain the surface wind speed at the abnormal location and calculate the pressure change caused by the surface wind speed.
[0071] In this embodiment, the pressure change caused by surface wind speed is obtained based on Bernoulli's principle. ,in Represents air density, These represent the surface roughness pressure coefficient and wind speed, respectively.
[0072] S62. The horizontal gas migration velocity is calculated based on the pressure change.
[0073] In this embodiment, the horizontal gas migration velocity is calculated using Darcy's law. ,in These represent the actual soil permeability and the dynamic viscosity of the gas, respectively. Represents the size of a region on the Earth's surface.
[0074] S63. The location of the natural gas pipeline leak is calculated based on the gas migration velocity and gas infiltration time, combined with the location of the anomaly.
[0075] In this embodiment, the rainfall, wind direction, and wind speed in the current area are obtained through a meteorological data service platform, and a correction coefficient is output based on the precipitation correction model. The gas infiltration time range of the previously leaked gas was corrected to obtain the actual gas infiltration time range. .
[0076] In this embodiment, the horizontal offset distance of the gas is calculated. ,in The horizontal transport time has a range of values. to ; In this embodiment, the gas cloud anomaly monitoring point is taken as the center, and the radius is the horizontal offset distance of the gas. The maximum and minimum leakage circle ranges are obtained, and the difference between the maximum and minimum leakage circle ranges is used to obtain the range of gas leakage locations in the pipeline.
[0077] Please see Figure 7 , Figure 7 This is the fifth flowchart of a deep learning-based natural gas pipeline leak detection method provided in this disclosure. As shown in the figure, the detection method includes the following steps: S71. Determine the distribution data of natural gas pipelines based on pipeline data, and plan the flight path of the UAV based on the distribution data.
[0078] In this embodiment, the spatial distribution data of natural gas pipelines is determined based on basic data such as the pipeline's geographical location, direction, and burial depth. Then, path planning algorithms (such as A* algorithm, genetic algorithm, etc.) are used, combined with pipeline distribution characteristics, terrain, obstacles, and other factors, to plan a flight path for the UAV that can fully cover the pipeline and is efficient and safe. With the support of accurate pipeline distribution data, the UAV can fly along the optimal path, improving inspection efficiency by more than 30%, while avoiding safety risks such as collisions, and ensuring comprehensive and effective monitoring of natural gas pipelines.
[0079] S72: The UAV is controlled to fly based on the flight path, and real-time atmospheric cloud images of various locations are collected by the atmospheric cloud imaging equipment on the UAV.
[0080] In this embodiment, based on the pre-planned flight path of the UAV, the flight control system precisely controls the UAV to fly along the set trajectory. At the same time, the gas cloud imaging equipment (such as infrared thermal imagers, laser methane detectors, etc.) mounted on the UAV is used to scan various locations along the natural gas pipeline in real time during the flight, collecting image data such as the spatial distribution and concentration of gas clouds. This achieves efficient and blind-spot-free inspection of the entire pipeline, which is more than 5 times more efficient than traditional manual inspection. It can also quickly capture gas clouds generated by tiny leaks, improving the leak detection sensitivity to the ppm level and significantly shortening the leak detection time.
[0081] In this embodiment, the flight path of the UAV is planned based on the distribution data of the natural gas pipeline. The UAV is equipped with a gas cloud imaging device to collect images of the gas concentration distribution above the ground at time intervals T, and the collected images are uploaded in real time to the corresponding section of the natural gas pipeline in the natural gas pipeline leak detection database.
[0082] Please see Figure 8 , Figure 8 This disclosure provides a natural gas pipeline leak detection system based on deep learning. The detection system includes: a data acquisition module 11, a penetration time determination module 12, a data correction module 13, and a leak location determination module 14.
[0083] In this embodiment, the data acquisition module 11 is used to acquire environmental data and pipeline data at various locations along the natural gas pipeline, and to acquire real-time gas cloud images at various locations along the natural gas pipeline based on the pipeline data.
[0084] In this embodiment, the infiltration time determination module 12 is used to identify anomalies in each real-time gas cloud image to determine the location of the anomaly, and generate the gas infiltration time of the natural gas pipeline at the anomaly location based on the pre-trained pipeline leakage analysis model and combined with environmental data.
[0085] In this embodiment, the data correction module 13 is used to correct the gas infiltration time using environmental data of natural gas pipelines at abnormal locations and real-time precipitation.
[0086] In this embodiment, the leak location determination module 14 is used to determine the leak location of the natural gas pipeline based on the gas migration velocity corresponding to the abnormal location and the corrected gas permeation time.
[0087] In this embodiment, the detection system further includes: a first model training module, used to calculate the porosity and permeability of soil in different segments based on environmental data from different segments in historical data, and to construct corresponding physical models of gas leakage based on porosity and permeability; to simulate leakage results under different operating conditions using the physical models of gas leakage; to obtain simulated infiltration time from each simulated leakage result and to determine the operating condition information corresponding to each simulated infiltration time; to train the pipeline leakage analysis model constructed based on deep learning algorithm using the operating condition information as input and the corresponding simulated infiltration time as output, and to obtain the trained pipeline leakage analysis model.
[0088] In this embodiment, the data correction module 13 is specifically used to determine the precipitation correction model based on the abnormal location; input the real-time precipitation into the precipitation correction model to obtain the correction coefficient; and correct the gas infiltration time using the correction coefficient.
[0089] In this embodiment, the detection system further includes: a second model training module, used to acquire historical precipitation at various locations along the natural gas pipeline; to fit the relationship curves between precipitation and permeability at different locations along the natural gas pipeline based on the soil permeability under different historical precipitation; to update the permeability in the corresponding gas leakage physical model based on the relationship curves at each location, and to update the simulated infiltration time based on the updated gas leakage physical model; and to establish a precipitation correction model by regression fitting using the simulated infiltration time before and after each update.
[0090] In this embodiment, the penetration time determination module 12 is specifically used to extract the first image features of the real-time gas cloud image and obtain the second image features of the normal gas cloud image; compare each of the first image features with the second image features to determine the abnormal gas cloud image in the real-time gas cloud image; and take the position of the abnormal gas cloud image as the abnormal position.
[0091] In this embodiment, the leak location determination module 14 is specifically used to obtain the surface wind speed at the abnormal location and calculate the pressure change caused by the surface wind speed; calculate the horizontal gas migration velocity based on the pressure change; and calculate the leak location of the natural gas pipeline based on the gas migration velocity and gas infiltration time, combined with the abnormal location.
[0092] In this embodiment, the data acquisition module 11 is specifically used to determine the distribution data of natural gas pipelines based on pipeline data, and to plan the flight path of the UAV based on the distribution data; to control the UAV to fly based on the flight path, and to collect real-time gas cloud images at various locations through the gas cloud imaging device on the UAV.
[0093] like Figure 9 As shown, this embodiment of the present disclosure provides an electronic device, including a processor 1110, a communication interface 1120, a memory 1130, and a communication bus 1140, wherein the processor 1110, the communication interface 1120, and the memory 1130 communicate with each other through the communication bus 1140. Memory 1130 is used to store computer programs; When the processor 1110 executes the program stored in the memory 1130, it implements any of the above methods.
[0094] The electronic device provided in this embodiment of the present disclosure includes a processor 1110 that executes a program stored in a memory 1130 to obtain environmental data and pipeline data at various locations along the natural gas pipeline. Based on the pipeline data, it acquires real-time gas cloud images at various locations along the natural gas pipeline. It then performs anomaly identification on each real-time gas cloud image to determine the location of the anomaly. Based on a pre-trained pipeline leakage analysis model, it generates the gas infiltration time of the natural gas pipeline at the anomaly location by combining environmental data. The gas infiltration time is corrected using environmental data and real-time precipitation at the anomaly location. Finally, based on the gas migration velocity corresponding to the anomaly location, the leak location of the natural gas pipeline is determined using the corrected gas infiltration time.
[0095] The communication bus 1140 mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus 1140 can be divided into an address bus, a data bus, and a component bus, etc. For ease of illustration, it is represented by only one thick line in the figure, but this does not indicate that there is only one bus or one type of bus.
[0096] The communication interface 1120 is used for communication between the above-mentioned electronic device and other devices.
[0097] The memory 1130 may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory 1130 may also be at least one storage device located remotely from the aforementioned processor 1110.
[0098] The processor 1110 mentioned above can be a general-purpose processor 1110, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0099] This disclosure provides a computer-readable storage medium storing one or more programs that can be executed by one or more processors 1110 to implement the methods of any of the above embodiments.
[0100] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this disclosure is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)).
[0101] Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A deep learning-based method for detecting leaks in natural gas pipelines, characterized in that, The detection method includes: The system acquires environmental and pipeline data at various locations along the natural gas pipeline, and based on the pipeline data, acquires real-time gas cloud images at various locations along the natural gas pipeline. Anomaly identification is performed on each of the real-time gas cloud images to determine the location of the anomaly. Based on the pre-trained pipeline leakage analysis model and combined with environmental data, the gas infiltration time of the natural gas pipeline at the anomaly location is generated. The gas infiltration time is corrected by using environmental data of the natural gas pipeline at the abnormal location and real-time precipitation data. Based on the gas migration velocity corresponding to the abnormal location, the leak location of the natural gas pipeline is determined by the corrected gas infiltration time.
2. The detection method according to claim 1, characterized in that, The training method for the pipeline leakage analysis model includes: Based on environmental data from different segments in historical data, the porosity and permeability of the soil in different segments are calculated, and corresponding physical models of gas leakage are constructed based on the porosity and permeability. Using the aforementioned physical model of gas leakage, simulated leakage results under different operating conditions were obtained. The simulated infiltration time is obtained from each of the simulated leakage results, and the operating condition information corresponding to each simulated infiltration time is determined; Using the operating condition information as input and the corresponding simulated infiltration time as output, the pipeline leakage analysis model constructed based on the deep learning algorithm is trained to obtain the trained pipeline leakage analysis model.
3. The detection method according to claim 2, characterized in that, The correction of the gas infiltration time based on environmental data and real-time precipitation from the natural gas pipeline at the abnormal location includes: A precipitation correction model is determined based on the aforementioned anomaly locations; The real-time precipitation data is input into the precipitation correction model to obtain the correction coefficients; The gas permeation time is corrected using the correction coefficient.
4. The detection method according to claim 3, characterized in that, The precipitation correction model determined based on the abnormal location includes: Obtain historical precipitation data at various locations along the natural gas pipeline; Based on the soil permeability at different locations of the natural gas pipeline under different historical precipitation levels, a curve showing the relationship between precipitation and permeability at different locations was fitted. The permeability in the corresponding gas leakage physical model is updated based on the relationship curves at each location, and the simulated permeation time is updated based on the updated gas leakage physical model. The precipitation correction model is established by regression fitting using the simulated infiltration time before each update and the simulated infiltration time after each update. The corresponding precipitation correction model is determined based on the location of the anomaly.
5. The detection method according to claim 1, characterized in that, The step of identifying and determining the location of anomalies in each of the real-time weather and cloud images includes: Extract the first image features from the real-time cloud image and obtain the second image features from the normal cloud image; Each of the first image features is compared with the second image features to determine the abnormal cloud images in the real-time cloud images; The location of the abnormal cloud image is taken as the abnormal location.
6. The detection method according to claim 1, characterized in that, The method of determining the leak location of the natural gas pipeline based on the gas migration velocity corresponding to the abnormal location and the corrected gas permeation time includes: Obtain the surface wind speed at the abnormal location and calculate the pressure change caused by the surface wind speed; The horizontal gas migration velocity is calculated based on the pressure change. The location of the leak in the natural gas pipeline is calculated based on the gas migration velocity and the gas infiltration time, combined with the location of the anomaly.
7. The detection method according to any one of claims 1 to 6, characterized in that, The step of obtaining real-time gas cloud images at various locations along the natural gas pipeline based on the pipeline data includes: The distribution data of natural gas pipelines is determined based on the pipeline data, and the flight path of the UAV is planned based on the distribution data; The drone is controlled to fly based on the flight path, and real-time cloud images of various locations are collected by the cloud imaging device on the drone.
8. A natural gas pipeline leak detection system based on deep learning, characterized in that, The detection system includes: The data acquisition module is used to acquire environmental data and pipeline data at various locations along the natural gas pipeline, and to acquire real-time gas cloud images at various locations along the natural gas pipeline based on the pipeline data. The infiltration time determination module is used to identify anomalies in each of the real-time gas cloud images to determine the location of the anomalies, and generate the gas infiltration time of the natural gas pipeline at the anomaly location based on a pre-trained pipeline leakage analysis model and combined with environmental data. The data correction module is used to correct the gas infiltration time using environmental data of the natural gas pipeline at the abnormal location and real-time precipitation. The leak location determination module is used to determine the leak location of the natural gas pipeline based on the gas migration velocity corresponding to the abnormal location and the corrected gas permeation time.
9. An electronic device, characterized in that, include: processor; as well as A memory storing computer-executable instructions, which, when executed, cause the processor to perform the method according to any one of claims 1-7.
10. A computer storage medium, characterized in that, in, The computer storage medium stores one or more programs that, when executed by a processor, implement the method of any one of claims 1-7.