Gas pipeline leakage judgment method and storage medium

By employing adaptive background concentration extraction and multi-level source tracing methods, combined with the characteristics of methane and ethane, the problem of false alarms and missed alarms in gas pipeline leak detection in urban environments has been solved, achieving high-precision gas pipeline leak determination.

CN121953258AInactive Publication Date: 2026-05-01CHANGSHA GAS IND CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-30
Publication Date
2026-05-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing gas pipeline leak detection technologies suffer from problems such as non-adaptive background concentration, limited source identification dimensions, weak anti-interference capabilities, lack of dynamic correction mechanisms, and high false alarm rates in complex urban environments.

Method used

An adaptive background concentration extraction method is adopted, which combines the ratio, synchronicity and peak behavior of methane and ethane enhancement values. Gas pipeline leakage is determined by using a double sliding time window and a variety of adaptive models (such as EWMA, Holt double exponential smoothing, Huber M-estimation, etc.), and a multi-level source tracing system is constructed to achieve high-precision determination.

Benefits of technology

It improves the accuracy and reliability of gas pipeline leak detection, reduces false alarm and missed alarm rates, adapts to complex urban environments, and enhances anti-interference capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121953258A_ABST
    Figure CN121953258A_ABST
Patent Text Reader

Abstract

The invention discloses a gas pipeline leakage judgment method and a storage medium. The method comprises the steps that S1, adaptive background concentration extraction is carried out; for the data points one by one, taking the median in the sub-window as an initial background concentration value, and further correcting the background concentration by adopting the change condition of the initial background concentration in the main window to obtain a background concentration value adapted to the data points one by one; s2, judging a methane source; the methane source is judged by comprehensively considering the ratio of methane to ethane enhancement value, methane and ethane change synchronism and the ethane change condition at the methane peak value. The storage medium is realized based on the method. The method has the advantages of simple principle, wide application range, easiness in implementation, high detection precision and the like.
Need to check novelty before this filing date? Find Prior Art

Description

A method for determining gas pipeline leaks and a storage medium Technical Field

[0001] This invention mainly relates to the field of gas detection technology, specifically a method for determining gas pipeline leaks and a storage medium. Background Technology

[0002] Natural sources of methane in the atmosphere include wetlands, termite activity, and marine sediments, accounting for approximately 40% of global emissions. Anthropogenic sources include agriculture (such as rice cultivation and ruminant digestion), fossil fuel extraction (such as natural gas leaks), and waste landfills. The average concentration of methane in the atmosphere is approximately 1.86 ppm, but concentrations may fluctuate in localized areas due to human activities and natural releases. The main component of natural gas in urban gas pipelines is methane, with a methane content generally exceeding 85%, and ethane content ranging from approximately 3% to 10%. In addition, there are small amounts of butane, pentane, carbon dioxide, carbon monoxide, and hydrogen sulfide. Furthermore, leak detection in urban gas pipelines is often affected by methane sources, leading to false alarms. Since methane is the main component of methane, and natural gas in pipelines contains a significant amount of ethane besides methane, methane and ethane are commonly detected for differentiation. Simultaneously, the sources of gas in urban areas are complex, and the spatial distribution of gas concentration is uneven. Using a single, static background concentration value may overlook or incorrectly estimate the increase in gas concentration, further affecting source classification.

[0003] Currently, the mainstream technical solutions in the field of gas pipeline leak detection and methane source identification mainly include the following four categories: 1. Fixed concentration threshold method; using a preset methane concentration alarm threshold (such as 1.5ppm, 2ppm), a leak is determined when the monitored value exceeds the threshold. There is no background concentration adaptation, no time series analysis, and only single-point comparison is performed.

[0004] 2. Single sliding window background method: The average / median concentration is calculated using a single fixed time window as the background concentration. It cannot distinguish between short-term noise and long-term background drift, and has poor adaptability to high / low background scenes.

[0005] 3. Traditional ethane / ethane ratio method: It only uses a fixed ethane / methane ratio (e.g., 0.03) to distinguish between natural gas and biogas, without correlation verification or peak behavior identification, and is easily affected by interference sources.

[0006] 4. Manual inspection / simple instrument method: Relies on human experience and handheld equipment for inspection, without algorithmic judgment process, resulting in high missed detection rate and difficulty in suppressing false alarms.

[0007] All of the above-mentioned existing technologies still have some technical shortcomings: 1. The background concentration is not adaptive and cannot cope with the complex fluctuations in the city; the urban methane background is affected by sewage, catering, transportation, landfill and other factors, and exhibits strong spatiotemporal fluctuations. Fixed / single-window background will lead to: false alarms in low background areas and missed alarms in high background areas.

[0008] 2. The source identification dimension is too limited to distinguish between natural gas, biogas, and interference sources; relying solely on ratios for identification fails to utilize key characteristics such as the synchronicity and peak behavior of methane and ethane, resulting in a false alarm rate typically greater than 30%.

[0009] 3. Without a dynamic correction mechanism, high background values ​​are prone to overestimation; under high concentration background values, the leakage enhancement value is underestimated, increasing the risk of missed detection.

[0010] 4. Weak anti-interference ability; peaks formed by gusts of wind, exhaust gas, and instantaneous emissions are easily misjudged as leaks, resulting in poor stability.

[0011] 5. Lack of standardized multi-level judgment chain; lack of a rigorous judgment process of "signal significance → initial judgment of proportion → correlation verification → final judgment of peak value", resulting in insufficient reliability. Summary of the Invention

[0012] The technical problem to be solved by this invention is: in view of the technical problems existing in the prior art, this invention provides a gas pipeline leakage detection method and storage medium that is simple in principle, has a wide range of applications, is easy to implement, and has high detection accuracy.

[0013] To solve the above technical problems, the present invention adopts the following technical solution: a gas pipeline leakage determination method, comprising: step S1: adaptive background concentration extraction; for each data point, the median in the sub-window is used as the initial background concentration value, and the background concentration is further corrected by the change of the initial background concentration in the main window to obtain a background concentration value adapted to each data point; step S2: methane source identification; the methane source is identified by comprehensively considering the ratio of methane to ethane enhancement values, the synchronicity of methane and ethane changes, and the ethane change at the methane peak.

[0014] As a further improvement of the present invention: in step S1, the sub-window is set to select 30-50 data points and the monitoring time is 0.1-0.8 minutes, and the main window is set to select 150-400 data points and the monitoring time is about 2-5 minutes.

[0015] As a further improvement of the present invention: step S1 includes: step S101: setting a double sliding time window; step S102: using an adaptive model to calculate; using an adaptive mathematical model to calculate the initial background concentration; step S103: calculating the background fluctuation index; calculating the standard deviation (BSD) of the sub-window background to reflect the concentration stability; step S104: correcting the background in segments according to the degree of fluctuation, and determining whether correction is needed; step S105: outputting the final background; outputting the adaptive background concentrations of methane and ethane.

[0016] As a further improvement of the present invention: in step S101, the first sliding time window is set as a sub-window with a time step of 2n, and the second sliding time window is set as the main window with a time step of 2m, and m>n.

[0017] As a further improvement of the present invention: in step S1, the observed median value within a 2n sliding time window at time point t is calculated as the initial value of the background concentration. Calculate the initial background concentration within a 2n sliding time window at time point t. Standard deviation It reflects the fluctuation of background concentration and is used to correct the overestimation of background concentration under high background conditions; it calculates the standard deviation of the initial background concentration within a 2m sliding window at time point t. the median of Used to determine whether background concentration correction should be performed, based on and The background concentration is segmented and used to correct the background concentration to obtain the final background concentration; the calculation method is as follows:

[0018]

[0019]

[0020]

[0021] In the formula, The observation value at time t, Let t be the initial background concentration. The standard deviation of background concentration within the sub-window at time point t. The median of the standard deviation of the background concentration in the main window at time t. and These represent the initial background concentration values ​​at the starting point within the time period for which background concentration needs to be corrected.

[0022] As a further improvement of the present invention: step S2 includes: step S201: calculating the methane and ethane enhancement values; step S202: determining whether the methane enhancement signal is significant; step S203: initial classification according to the methane-ethane ratio; determining the methane-ethane enhancement ratio and initially determining the source of methane; step S204: analyzing the correlation between methane and ethane, and accurately identifying it through time-series correlation; step S205: final determination based on peak behavior; the final determination is completed based on the change in ethane at the methane peak.

[0023] As a further improvement of the present invention: in step S201, methane enhancement = observed concentration - background concentration; ethane enhancement = observed concentration - background concentration; based on the observed concentrations and background concentrations of methane and ethane, the methane and ethane enhancement values ​​corresponding to each monitoring data are calculated, as shown in the following formula;

[0024]

[0025] in, For methane enhancement value, This is the ethane enhancement value.

[0026] As a further improvement of the present invention: In step S202, it is determined whether the methane enhancement signal is significant; using weighted signal intensity: >1 → is a real anomaly, continue tracing the source; ≤1 → normal fluctuation, end the judgment; a methane enhancement signal threshold T is set. When the methane enhancement value is higher than T times the background concentration, the enhancement signal is considered strong, and further tracing analysis is required, and a signal intensity value table is introduced. Where T is the default value;

[0027] if >1, the signal is significant, proceed to source tracing, and further analyze the source of methane; ≤1: The signal is not significant and is judged as normal background.

[0028] As a further improvement of the present invention: in step S204, the ethane enhancement ratio is determined to initially determine the methane source; the ethane enhancement ratio R is introduced, as shown in the following formula; if the ratio is greater than R, the source type is further determined to be an uncertain source or a natural gas source; if the ratio is less than R, the source type is further determined to be an uncertain source or a biogas source; the value of R comes from natural gas composition data and a default value is set; .

[0029] The present invention also provides a storage medium that can be read by a computer or processor, wherein the storage medium stores a computer program for executing any of the above methods.

[0030] Compared with the prior art, the advantages of the present invention are as follows: 1. The gas pipeline leakage determination method and storage medium of the present invention are simple in principle, have a wide range of applications, are easy to implement, and have high detection accuracy. They can improve the gas source identification rate based on the ethane enhancement ratio and ethane correlation, thereby effectively solving the problem of local background concentration fluctuations caused by human activities and natural release.

[0031] 2. The gas pipeline leakage detection method and storage medium of the present invention are gas pipeline leakage detection methods that can adaptively extract background concentration, accurately identify methane sources from multiple dimensions, have strong anti-interference ability, and have a low false alarm and false alarm rate.

[0032] 3. The gas pipeline leak detection method and storage medium of this invention, based on a dual sliding time window, introduces five adaptive background extraction models: EWMA adaptive exponential smoothing, Holt double exponential smoothing, Huber M-estimation robust mean, LOESS locally weighted regression, and Kalman filtering. It also constructs a multi-level tracing system integrating dual-criteria signal strength, dynamic ratio threshold, Bayesian probability, DTW dynamic time warping, mutual information, kurtosis three features, and fuzzy logic fusion, achieving high-precision gas leak detection. By replacing the traditional fixed median background, this method achieves dynamic tracking, outlier suppression, and drift adaptation of methane and ethane concentration backgrounds in complex urban environments, significantly improving background extraction accuracy and leak detection reliability. Attached Figure Description

[0033] Figure 1 is a flowchart of the present invention in a specific embodiment.

[0034] Figure 2 is a schematic diagram of the dual time window algorithm in a specific embodiment of the present invention.

[0035] Figure 3 is a schematic diagram of the methane source discrimination algorithm in a specific embodiment of the present invention. Detailed Implementation

[0036] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0037] In the description of this application, it should be understood that the terms "length", "width", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.

[0038] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0039] In this application, unless otherwise expressly specified and limited, the terms "assembly," "connection," "joining," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.

[0040] As shown in Figures 1-3, this invention discloses a method for determining gas pipeline leaks, which includes: Step S1: Adaptive background concentration extraction; Based on an adaptive background concentration extraction algorithm with a dual sliding time window, the median in the sub-window is used as the initial background concentration value for each data point, and the background concentration is further corrected by the change of the initial background concentration in the main window to obtain a background concentration value suitable for each data point; Step S2: Methane source identification; The source of methane is identified by comprehensively considering the ratio of methane to ethane enhancement values, the synchronicity of methane and ethane changes, and the ethane change at the methane peak.

[0041] In a specific application example, in step S1, the sub-window is set to select 40 data points with a monitoring time of 0.5 minutes, and the main window is set to select 300 data points with a monitoring time of approximately 3 minutes.

[0042] Specifically, in a specific application example, step S1 includes: step S101: setting a double sliding time window; setting the time step of the first sliding time window (sub-window) to 2n, and the time step of the second sliding time window (main window) to 2m, where m>n; for example, sub-window: 40 points (0.5 minutes), main window: 300 points (3 minutes).

[0043] Step S102: Calculate using an adaptive model; calculate the initial background concentration using an adaptive mathematical model; for example, any one of the following: EWMA exponentially weighted smoothing model, Holt double exponential smoothing model, Huber M-estimated robust mean model, LOESS locally weighted regression model, or Kalman filter model; in specific application examples, the median value of observations within a 2n sliding time window at time t can be calculated as the initial value of the background concentration. As shown in equation (1); Step S103: Calculate the background fluctuation index; Calculate the standard deviation (BSD) of the background in the sub-window to reflect concentration stability; In a specific application example, the initial value of the background concentration within the 2n sliding time window at time point t can be calculated. Standard deviation As shown in equation (2), it reflects the fluctuation of background concentration and is used to correct the overestimation of background concentration under high background conditions; Step S104: Correct the background in segments according to the degree of fluctuation; Determine whether correction is needed; Use the coefficient of variation (CV) to determine whether the fluctuation is too large: If the fluctuation is small → directly use the initial background; if the fluctuation is large → enter the segmented correction; In a specific application example, the standard deviation of the initial background concentration within a 2m sliding window at time point t can be calculated. the median of , used to determine whether to carry out background concentration correction, as shown in equation (3); Step S105: Output the final background; Output the adaptive background concentrations of methane and ethane; such as obtaining methane background CH4,background and ethane background C2H6,background.

[0044] In specific application examples, it can be based on and The background concentration is segmented and used to correct the background concentration to obtain the final background concentration, as shown in equation (4); (1) (2) (3) (4) In the formula, The observation value at time t, Let t be the initial background concentration. The standard deviation of background concentration within the sub-window at time point t. The median of the standard deviation of the background concentration in the main window at time t. and These represent the initial background concentration values ​​at the starting point within the time period for which background concentration needs to be corrected.

[0045] In a specific application example, in step S2, the default value of T is set to 0.25, and the R value is derived from natural gas composition data and is set to a default value of 0.03.

[0046] Specifically, in a concrete application example, step S2 includes: Step S201: Calculating the methane and ethane enhancement values; including: Methane enhancement = Observed concentration Background concentration; Ethane enhancement = Observed concentration Background concentration; Based on the observed concentrations of methane and ethane and the background concentration, calculate the methane and ethane enhancement values ​​corresponding to each monitoring data point, as shown in equations (5) and (6); (5) (6) Among them, For methane enhancement value, This is the ethane enhancement value.

[0047] Step S202: Determine whether the methane enhancement signal is significant; use weighted signal intensity: >1 → true anomaly, continue source tracing; ≤1 → normal fluctuation, end the judgment; in a specific application example, set a methane enhancement signal threshold T. When the methane enhancement value is higher than T times the background concentration, the enhancement signal is considered strong, and further source tracing analysis is required. A signal intensity value table is introduced. The default value for T is set to 0.25. (7) If >1, the signal is significant, proceed to source tracing, and further analyze the source of methane; ≤1: The signal is not significant and is judged as normal background.

[0048] Step S203: Initial classification based on the methane-to-ethane ratio; determine the methane-to-ethane enhancement ratio to preliminarily determine the methane source; R = ethane enhancement / methane enhancement, large R → suspected natural gas / uncertain, small R → suspected biogas / uncertain.

[0049] In a specific application example, the ethane enhancement ratio R is introduced, as shown in equation (8); if the ratio is greater than R, it is necessary to further determine whether the source is an uncertain source or a natural gas source; if the ratio is less than R, it is necessary to further determine whether the source is an uncertain source or a biogas source; the R value comes from the natural gas composition data and the default value is set to 0.03; it should be noted that if the gas source is to be missed, the identification rate of the gas source can be increased by reducing the R value; (8) If R > dynamic threshold R(t) → tends to be natural gas source / uncertain source; if R < dynamic threshold R(t) → tends to be biogas source / uncertain source.

[0050] Step S204: Analyze the correlation of methane and ethane, and accurately identify them through time-series correlation; further analyze the natural gas source and the source of uncertainty; use DTW + mutual information to determine whether methane and ethane are synchronous: synchronous → natural gas source, asynchronous → continue judgment; in specific application examples, specifically, ethane is an important indicator of natural gas source; therefore, natural gas source has the characteristics of homology and consistency of time change with methane and ethane. The P-value of Pearson's test is used to analyze the correlation of methane and ethane. If the P-value is less than 0.05, the correlation is considered significant, and it is judged to be a natural gas source; Step S205: Observe the peak behavior for final judgment; complete the final judgment based on the change of ethane at the methane peak.

[0051] For example, at the highest methane level: ethane decreases → biogas source; ethane increases → natural gas source; no pattern → uncertainty interference. In specific applications, analyzing the changes in ethane and ethyl methane at the methane peak allows for further analysis of biogas and uncertainty sources. Biogas sources emit relatively little ethane, so judging the pattern of ethane and ethyl methane changes at the methane peak can determine whether it is a biogas source or an uncertainty source. That is, if ethane decreases at the methane peak, it can be identified as a biogas source, not a natural gas source.

[0052] Furthermore, the final output includes three results: natural gas source → gas pipeline leak is determined; biogas source → no leak is determined; uncertainty source → interference is marked.

[0053] Furthermore, as a preferred method, the present invention can also increase the gas source identification rate by reducing the R value in order to avoid gas source failure detection.

[0054] Furthermore, as a preferred method, the present invention uses the Pearson test statistical method to analyze the correlation of methane and ethane. If the P value is less than 0.05, the correlation is considered significant, and the source is determined to be natural gas.

[0055] In the above-mentioned scheme of the present invention, from the perspective of engineering detection: gas leakage must reach the minimum identifiable concentration increment; when a real and locatable micro-leak occurs in an urban gas pipeline, the methane concentration must be higher than the background concentration by a certain proportion in order to be distinguished from random environmental fluctuations.

[0056] Engineering practice shows that only when the methane enhancement value is ≥ 25% (0.25 times) of the background concentration can it be considered non-random noise. This is the direct basis for setting T=0.25.

[0057] In the above-described scheme of the present invention, from a statistical perspective, the distinction is made between background fluctuations and true anomalies. Environmental methane background exhibits natural fluctuations (caused by traffic, food, humidity, and air pressure); only when the enhancement value significantly exceeds the range of natural fluctuations can it be considered an anomaly; a threshold of 1 represents: the signal strength exceeds the upper limit of background natural fluctuations, which is statistically significant.

[0058] In the above-described solution of the present invention, from the perspective of dual criteria, it is ensured that there are no false alarms in low background and no missed detections in high background.

[0059] Based on the above, the criterion is that the methane enhancement value significantly exceeds the natural fluctuation range of the background, meeting the minimum identifiable increment condition for micro-leaking of gas.

[0060] In a specific application example, the detailed process of the method of the present invention includes: Step S1: Adaptive background concentration extraction Step S101: Set the sub-window time step to 40 data points (0.5 minutes) and the main window time step to 300 data points (3 minutes).

[0061] Step S102: Calculate the background concentration at time t using one or more combinations of the following adaptive mathematical models: Model 1: Adaptive Forgetting Factor EWMA Exponentially Weighted Moving Average; Model 2: Holt Double Exponential Smoothing (adapting to drifting background); Model 3: Huber M-Estimation Robust Mean (resistant to wild values); Model 4: LOESS Locally Weighted Regression (nonlinear fitting); Model 5: Kalman Filter (optimal dynamic tracking); Step S103: Correct the background using the coefficient of variation CV and 3σ robust interval, and finally output the methane background and ethane background.

[0062] Step S2: Methane source identification; Step S201: Calculate methane and ethane enhancement values; Step S202: Significance of dual-criteria signal intensity; Step S203: Initial judgment of dynamic ratio R(t) + Bayesian probability; Step S204: DTW + mutual information correlation verification: If the correlation is significant, it is determined to be a natural gas source.

[0063] Step S205: Determine the biogas source based on the three peak features; Step S206: Fuzzy logic fusion outputs the final result: natural gas source / biogas source / uncertainty source.

[0064] The test conditions included: monitoring environment: old urban gas pipeline network, sewage wells, and densely populated catering areas; instrument: laser methane and ethane analyzer (resolution 1 ppb); data duration: 72 hours of continuous monitoring; samples: 60 natural gas leaks, 40 biogas leaks, and 50 interference sources.

[0065] The test results are shown in Table 1: Table 1 Test Results

[0066] Conclusion: This invention significantly improves background fitting and recognition accuracy by using multiple adaptive background models and multi-level source tracing fusion decision, while reducing the false negative rate and false positive rate to below 2%. Its anti-interference ability and robustness are far superior to existing technologies.

[0067] By employing the method described above in this invention, we break through the conventional approaches in this field, which rely on fixed thresholds, single windows, fixed ratios, and single correlations. For the first time, we construct a multi-layered model system combining weighted median, Kalman filtering, dynamic R, Bayesian filtering, DTW, mutual information, kurtosis three-feature analysis, and fuzzy fusion, representing a completely new technical path. We pioneer a four-level source tracing judgment chain: saliency → proportion → correlation → peak behavior. The optimized dynamic weights, DTW correlation, and three-state peak discrimination form a new technical paradigm. The method of this invention improves background fitting and recognition accuracy by an order of magnitude; significantly reduces false positives and false negatives; and is adaptable to complex urban scenarios, possessing outstanding technical effects and industrial application value.

[0068] The present invention also provides a storage medium that can be read by a computer or processor, wherein the storage medium stores a computer program for executing any of the above methods.

[0069] Those skilled in the art will understand that the above embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more blocks of the flowchart illustrations and / or one or more blocks of the block diagrams. These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.

[0070] The above are merely preferred embodiments of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should be considered within the scope of protection of the present invention.

Claims

1. A method for determining gas pipeline leakage, characterized in that, include: Step S1: Adaptive background concentration extraction; For each data point, the median in the sub-window is used as the initial background concentration value, and the background concentration is further corrected by the change of the initial background concentration in the main window to obtain a background concentration value that is suitable for each data point; Step S2: Methane source identification; The source of methane is identified by comprehensively considering the ratio of methane to ethane enhancement values, the synchronicity of methane and ethane changes, and the ethane changes at the methane peak.

2. The gas pipeline leakage determination method according to claim 1, characterized in that, In step S1, the sub-window is set to have 30-50 data points and a monitoring time of 0.1-0.8 minutes, while the main window is set to have 150-400 data points and a monitoring time of approximately 2-5 minutes.

3. The gas pipeline leakage determination method according to claim 1, characterized in that, Step S1 includes: Step S101: Set a double sliding time window; Step S102: Calculate using an adaptive model; Calculate the initial background concentration using an adaptive mathematical model; Step S103: Calculate the background fluctuation index; Calculate the standard deviation (BSD) of the sub-window background to reflect concentration stability; Step S104: Correct the background in segments according to the degree of fluctuation, and determine whether correction is needed; Step S105: Output the final background; Output the adaptive background concentrations of methane and ethane.

4. The gas pipeline leakage determination method according to claim 3, characterized in that, In step S101, the first sliding time window is set as a sub-window with a time step of 2n, and the second sliding time window is set as the main window with a time step of 2m, where m>n.

5. The gas pipeline leakage determination method according to claim 4, characterized in that, In step S1, the observed median value within the 2n sliding time window at time point t is calculated as the initial value of the background concentration. Calculate the initial background concentration within a 2n sliding time window at time point t. Standard deviation It reflects the fluctuation of background concentration and is used to correct the overestimation of background concentration under high background conditions; it calculates the standard deviation of the initial background concentration within a 2m sliding window at time point t. Accuracy Used to determine whether background concentration correction should be performed, based on and The background concentration is segmented and used to correct the background concentration to obtain the final background concentration; the calculation method is as follows: In the formula, The observation value at time t, Let t be the initial background concentration. The standard deviation of background concentration within the sub-window at time point t. The median of the standard deviation of the background concentration in the main window at time t. and These represent the initial background concentration values ​​at the starting point within the time period for which background concentration needs to be corrected.

6. The method for determining gas pipeline leakage according to any one of claims 1-5, characterized in that, Step S2 includes: Step S201: Calculate the methane and ethane enhancement values; Step S202: Determine whether the methane enhancement signal is significant; Step S203: Initially classify according to the methane-to-ethane ratio; determine the methane-to-ethane enhancement ratio and preliminarily determine the source of methane; Step S204: Analyze the correlation between methane and ethane, and accurately identify them through time-series correlation; Step S205: Observe the peak behavior for final determination; complete the final determination based on the change in ethane at the methane peak.

7. The gas pipeline leakage determination method according to claim 6, characterized in that, In step S201, methane enhancement = observed concentration - background concentration; ethane enhancement = observed concentration - background concentration; based on the observed and background concentrations of methane and ethane, the methane and ethane enhancement values ​​corresponding to each monitoring data point are calculated, as shown in the following formula; in, For methane enhancement value, This is the ethane enhancement value.

8. The gas pipeline leakage determination method according to claim 7, characterized in that, In step S202, it is determined whether the methane enhancement signal is significant. Using weighted signal intensity: >1 → a true anomaly, continue tracing the source; ≤1 → normal fluctuation, end the judgment. A methane enhancement signal threshold T is set. When the methane enhancement value is higher than T times the background concentration, the enhancement signal is considered strong, requiring further source tracing analysis, and a signal intensity value table is introduced. Where T is the default value; if >1, the signal is significant, proceed to source tracing, and further analyze the source of methane; ≤1: The signal is not significant and is judged as normal background.

9. The gas pipeline leakage determination method according to claim 7, characterized in that, In step S204, the methane enhancement ratio is determined to preliminarily determine the methane source; the methane enhancement ratio R is introduced as shown in the following formula; if the ratio is greater than R, the source type is further determined to be an uncertain source or a natural gas source. If the proportion is less than R, then it is further determined whether the source is an uncertain source or a biogas source; the R value comes from the natural gas composition data and is set with a default value; 。 10. A storage medium capable of being read by a computer or processor, characterized in that, The storage medium stores a computer program for performing the method described in any one of claims 1 to 9.