A method for leak detection and localization for water supply pipelines

By integrating multi-source data and using tracer gas analysis, the technical problems in water supply pipeline leak detection have been solved, achieving a highly efficient and accurate solution for detection. This addresses the detection issues in existing technologies and provides a more efficient and accurate solution for leak detection.

CN122286188APending Publication Date: 2026-06-26ZHEJIANG CHUANYAN ENVIRONMENTAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610620391.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-08
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing methods for detecting leaks in water supply pipelines lack organic integration, resulting in independent early warning and location processes. This makes it impossible to optimize parameter settings, leading to low efficiency and difficulty in improving long-term operational reliability and economy.

Method used

A multi-source data fusion method is adopted to predict the leakage probability by combining pipeline vibration, pressure fluctuation and flow difference data, and a comprehensive coefficient is obtained through gain optimization. After responding to the leakage early warning signal, active tracer gas is used to combine concentration analysis and diffusion inversion for precise location, and the leakage point location is corrected by the convection-diffusion equation of porous media.

Benefits of technology

It improves the reliability and accuracy of leak detection, reduces the false alarm rate, achieves high-precision positioning under complex soil conditions, forms a closed-loop optimization of the entire process, and enhances the long-term operational reliability and economy of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122286188A_ABST
    Figure CN122286188A_ABST
Patent Text Reader

Abstract

This invention relates to the field of water supply pipeline safety monitoring technology. The invention discloses a method for leak detection and location in water supply pipelines, comprising the following steps: Joint detection and early warning: Data on pipeline vibration, pressure fluctuations, and upstream / downstream flow differences are collected. Leakage confidence probabilities are calculated for each. Disturbances exceeding a threshold are subjected to secondary discrimination and adaptive weighting. Weights are determined based on pipe diameter, burial depth, and other operating conditions and adaptively corrected. Weighted fusion yields a comprehensive coefficient; an early warning is issued if the threshold is exceeded. Precise location: Tracer gas is injected, and its concentration is detected at the ground surface. Convection-diffusion equation inversion is used. In cases of multiple peaks, least squares or Bayesian inference is used to correct interference and obtain the precise leak location. Through multi-source data fusion and gain optimization, interference from a single sensor is effectively suppressed. Precise location using tracer gas combined with convection-diffusion inversion can eliminate multi-peak interference caused by soil fissures, controlling the location within 3 meters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of water supply pipeline safety monitoring technology, and in particular to a method for leak detection and location in water supply pipelines. Background Technology

[0002] Leak detection and location in water supply pipelines is a key technical challenge in the operation and maintenance of urban water supply systems. Existing methods mainly include acoustic detection, negative pressure wave detection, flow balance detection, and gas tracer detection. Acoustic detection utilizes the vibration or noise generated by the leak for location. It works well in metal pipes, shallowly buried pipes, and quiet environments. However, sound wave attenuation is significant in plastic pipes, and the effective propagation distance is usually less than 20 meters. Furthermore, environmental noise from vehicle traffic and construction easily causes false alarms. Negative pressure wave detection locates leaks by capturing the instantaneous pressure drop wave caused by the leak. It has a fast response time, but for slowly developing small leaks or when the pipeline is already operating at low pressure, the negative pressure wave amplitude is weak or even fails to form a recognizable wavefront. Additionally, local components such as pipe bends and tees reduce the accuracy of the wave velocity model. The flow balance detection method determines the presence of a leak by monitoring the flow difference between the pipeline inlet and outlet, but it cannot pinpoint the leak location. Moreover, the inherent measurement error of the flow meter often masks minute leak signals. Gas tracer methods locate pipes by detecting peak concentrations at the surface after injecting tracer gas into the pipe. This method is insensitive to pipe material and burial depth, making it particularly suitable for plastic pipes and deep burial scenarios. However, traditional gas tracer methods rely solely on the highest concentration point for location, ignoring the convection-diffusion transport patterns of the gas in the soil. When soil fissures, uneven backfilling, or groundwater are present, multiple spurious peaks often appear at the surface, resulting in low success rates when directly excavating the highest point. Furthermore, gas tracer methods diffuse slowly in clay strata or high-water-table areas, leading to decreased detection efficiency.

[0003] Each of the aforementioned individual methods has its specific applicable conditions and limitations. In actual engineering, it is necessary to select the appropriate method based on factors such as pipe material, geology, and environment. However, existing technologies lack a complete solution that organically integrates detection methods based on different principles. In particular, the early warning and location stages are independent of each other: after the early warning method outputs a judgment on the existence of a leak, it cannot automatically transmit the leak characteristics extracted in the early warning stage to the subsequent location equipment to optimize the gas injection parameters or invert the prior model. This results in the location stage still needing to start searching from scratch, which is inefficient. Existing methods generally lack self-iterative capabilities based on field feedback. The parameter settings and judgment logic for each detection rely on human experience, making it impossible to continuously optimize the soil diffusion coefficient, detection point spacing, and fusion weight based on actual excavation verification results. This makes it difficult to improve the reliability and economy of long-term operation. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention discloses a method for leak detection and location in water supply pipelines that overcomes the aforementioned defects and possesses both high reliability and high accuracy.

[0005] This invention discloses a method for leak detection and location in water supply pipelines, comprising the following steps:

[0006] Joint detection and early warning steps:

[0007] Multi-source data collection is performed on the target pipeline. The collected data includes at least: pipeline vibration characteristic data, pipeline pressure fluctuation characteristic data, and upstream and downstream flow difference data.

[0008] Based on the joint detection algorithm, the probability of pipeline leakage is predicted according to multi-source data, and the comprehensive coefficient of pipeline leakage is obtained by gain optimization fusion.

[0009] If the comprehensive leakage coefficient of the pipeline is greater than or equal to the preset threshold, it is determined that there is a leak in the pipeline and a leakage warning signal is generated.

[0010] Precise positioning steps:

[0011] In response to a leak warning signal, active tracer gas combined with concentration analysis and diffusion inversion is used to accurately locate the leak point, specifically including:

[0012] Inject tracer gas into the target pipeline or the surrounding soil;

[0013] Multiple detection points are set up on the ground along the target pipeline route to detect the concentration of tracer gas at each detection point;

[0014] By analyzing concentration distribution and processing gas diffusion inversion to determine concentration peak points and correct them, the precise location of leaks can be obtained.

[0015] Among them, the gas diffusion inversion uses the convection-diffusion equation based on porous media as the forward model;

[0016] When multiple peaks appear in the concentration distribution, the convection-diffusion equation is inverted and fitted using the least squares method or Bayesian inference to correct the interference peaks caused by soil fissures or uneven backfilling, and to obtain the true location of the leak.

[0017] Furthermore, in the joint detection algorithm, the probability of pipeline leakage is predicted separately based on multi-source data, and a comprehensive pipeline leakage coefficient is obtained through gain optimization fusion, specifically including:

[0018] Leakage characteristic values ​​are extracted from pipeline vibration characteristic data, and the first leakage confidence probability is calculated.

[0019] Leakage characteristic values ​​are extracted based on pipeline pressure fluctuation characteristic data, and the second leakage confidence probability is calculated.

[0020] Leakage feature values ​​are extracted based on the flow difference data between upstream and downstream of the pipeline, and the third leakage confidence probability is calculated.

[0021] A preset single-source probability anomaly threshold is set, and confidence probabilities exceeding the threshold are marked as suspected disturbances. Secondary feature discrimination is performed on the suspected disturbance data: if its time-frequency domain features match the leakage pattern, the original value is retained; if they do not match, it is determined to be an invalid disturbance, and the fusion weight of the data source is temporarily reduced or it is marked as invalid.

[0022] Based on the pipe diameter, working pressure, burial depth and soil medium type of the target pipeline, the benchmark value of the working condition weight is determined, and the weight is adaptively corrected in combination with the confidence probability to obtain three sets of final weighting coefficients.

[0023] The three sets of final weighted coefficients are normalized and weighted together with their corresponding confidence probabilities to obtain the comprehensive coefficient of pipeline leakage.

[0024] Furthermore, before the joint detection and early warning steps, there is also a step of macro-screening based on independent metering zones: dividing the water supply network into single-inlet closed independent metering zones, and collecting water supply, water consumption, instantaneous flow and pressure data for each zone;

[0025] By using the minimum nighttime flow method and water balance calculation, the calculated minimum nighttime flow and water balance index are compared with preset thresholds. If they exceed the range, it is determined that there is a leak in the zone.

[0026] Then, by controlling the branch valves and combining the zonal pipeline topology, the main water supply pipeline section in the zone is identified as the target pipeline, and joint detection and early warning steps are performed on the target pipeline.

[0027] Furthermore, before injecting the tracer gas, gases with a specific gravity less than air, chemical inertness, non-toxicity and non-corrosiveness, and environmental background concentrations below the detection limit are selected as tracer gases.

[0028] The injection method is as follows: after isolating and depressurizing the target pipeline, the gas is injected into the pipeline through the reserved opening, fire hydrant, or temporarily drilled air injection hole;

[0029] Alternatively, injection holes can be drilled directly above the target pipeline to inject into the surrounding soil;

[0030] The gas injection pressure and duration are adaptively adjusted according to the pipeline length, diameter, burial depth and soil type: the pressure when injecting gas into the pipeline is 0.05-0.3MPa and the duration is 3-30min per 100m.

[0031] When injecting air into the soil, the pressure is 0.05-0.1 MPa and the duration is 2-4 hours per 100m.

[0032] Furthermore, when setting up detection points, a mobile gas detector is first used to quickly inspect along the ground surface, or coarse test holes are drilled at large intervals of 3-5m to identify areas with abnormal concentrations.

[0033] Then, in the abnormal area, fine test holes are drilled at small intervals of 0.5-1m, and the test holes penetrate the overburden layer to the depth of the pipe, with a safe distance between the bottom of the hole and the top of the pipe.

[0034] Insert a breathable protective tube into the detection hole and mark the geographical coordinates.

[0035] Furthermore, when detecting concentration, wind speed, wind direction, air temperature, air pressure, and surface humidity are collected simultaneously, and the detected concentration value is corrected based on these environmental parameters to eliminate concentration decay or drift caused by environmental factors.

[0036] Furthermore, the specific steps for processing concentration data through concentration distribution analysis and gas diffusion inversion are as follows: plot the concentration distribution curve with the distance of the detection point along the pipeline as the abscissa and the concentration after environmental correction as the ordinate, and identify all peak points.

[0037] If there is only one peak point, the location of that point is corrected using the convection-diffusion model and then used as the leak point.

[0038] If there are multiple peak points, the location and concentration values ​​of all peak points are used as input. Combined with pipeline burial depth, soil porosity, and soil diffusion coefficient, the least squares method or Bayesian inference is used to invert the convection-diffusion equation and output the most likely true leak location.

[0039] Furthermore, after determining the location of the leak, if the pipeline is a metal pipe section with a burial depth of ≤2m, acoustic detection equipment is used to conduct acoustic detection near the peak point. The coordinates of the gas positioning are matched and compared with the coordinates of the acoustic positioning. The positioning deviation is corrected by weighted fusion to complete the dual verification.

[0040] Furthermore, it also includes model iterative optimization: comparing each positioning result with the actual location of the leak point excavated, and calculating the positioning error;

[0041] Based on the error value, the soil diffusion coefficient, the spacing of the detection points, and the gas injection parameters in the gas diffusion model are corrected;

[0042] The data from previous positioning operations, as well as the multi-source data collected during the joint detection and early warning process and various probability coefficients, were used as training samples to conduct offline training and online updates for the leakage probability prediction model and the gain optimization model.

[0043] Furthermore, the tracer gas is hydrogen, helium, or a mixture of both;

[0044] The preset threshold is pre-calibrated using the statistical quantiles or ROC curve method of historical leaked samples.

[0045] The beneficial effects of this invention are:

[0046] In the joint detection and early warning phase, this invention improves the reliability and robustness of leak detection through multi-source data fusion and gain optimization. Traditional single-sensor methods are susceptible to external interference, leading to false alarms or missed alarms. This invention, however, simultaneously collects three types of data: pipeline vibration, pressure fluctuations, and upstream / downstream flow difference, calculating the leak confidence probability for each and effectively eliminating false signals. Weighting benchmark values ​​are dynamically determined based on operating parameters such as pipe diameter, burial depth, and soil medium. Reliability is adaptively corrected by combining the historical accuracy and real-time signal-to-noise ratio of each data source, allowing the fusion weights to be optimized in real-time according to sensor performance and environmental changes. Even if one data source is distorted due to fault or interference, the accuracy of the comprehensive coefficient can still be maintained through weighted fusion of the remaining data sources.

[0047] In terms of precise location and system closed-loop optimization, this invention employs active tracer gas combined with concentration analysis and diffusion inversion to achieve high-precision leak location under complex soil conditions. The tracer gas has a low specific gravity, is chemically inert, and has a low background concentration; its concentration distribution can be quickly captured by surface detection after injection. To address multi-peak interference caused by soil fissures and uneven backfilling, this invention utilizes the convection-diffusion equation based on porous media as the forward model and employs least squares or Bayesian inference for inversion fitting, effectively eliminating the influence of spurious peaks and controlling the location error within 3 meters, thus reducing the workload of excavation verification. Furthermore, this invention integrates acoustic dual verification, model iterative optimization, and independent metering zone macroscopic screening, forming a closed-loop process from macroscopic screening to microscopic location. After each location result is compared with the actual leak point, the soil diffusion coefficient, detection spacing, and gas injection parameters can be automatically corrected. Feedback data is used to train and update the leakage probability prediction model offline and online, enabling the system to adapt to different pipe ages and geological conditions, continuously improving long-term operational reliability and economy. Attached Figure Description

[0048] Figure 1 This is a flowchart of a method for leak detection and location of water supply pipelines according to an embodiment of this application.

[0049] Figure 2 This is a flowchart of the joint detection and early warning steps in the embodiments of this application. Detailed Implementation

[0050] To enable those skilled in the art to better understand the present invention, the technical solutions in the specific embodiments of the present invention will be clearly and completely described below.

[0051] This invention discloses a method for leak detection and location in water supply pipelines, such as... Figure 1 As shown, it includes the following steps:

[0052] Joint detection and early warning steps:

[0053] Multi-source data collection is performed on the target pipeline. The collected data includes at least: pipeline vibration characteristic data, pipeline pressure fluctuation characteristic data, and upstream and downstream flow difference data.

[0054] Based on the joint detection algorithm, the probability of pipeline leakage is predicted according to multi-source data, and the comprehensive coefficient of pipeline leakage is obtained by gain optimization fusion.

[0055] If the pipeline leakage comprehensive coefficient is greater than or equal to the preset threshold, the warning review step is initiated: continuously monitor multi-source data for the next 10 to 30 minutes. If the pipeline leakage comprehensive coefficient continues to exceed the threshold, the warning is confirmed to be valid and a leakage warning signal is generated; otherwise, it is determined to be a transient disturbance and the warning is canceled.

[0056] Precise positioning steps:

[0057] In response to a leak warning signal, active tracer gas combined with concentration analysis and diffusion inversion is used to accurately locate the leak point, specifically including:

[0058] Inject tracer gas into the target pipeline or the surrounding soil;

[0059] Multiple detection points are set up on the ground along the target pipeline route to detect the concentration of tracer gas at each detection point;

[0060] By analyzing concentration distribution and processing gas diffusion inversion to determine concentration peak points and correct them, the precise location of leaks can be obtained.

[0061] Among them, the gas diffusion inversion uses the convection-diffusion equation based on porous media as the forward model;

[0062] like Figure 2 As shown, when multiple peaks appear in the concentration distribution, the convection-diffusion equation is inverted and fitted using the least squares method or Bayesian inference to correct the interference peaks caused by soil fissures or uneven backfilling, and to obtain the true location of the leak.

[0063] In the joint detection and early warning process, the system first performs multi-source synchronous data acquisition on the target pipeline. Vibration characteristic data is acquired through point-type accelerometers, which can be magnetically attached or bundled to exposed parts of the pipeline, such as pipe sections inside valve wells or fire hydrant interfaces, with a sampling frequency of no less than 200Hz. For newly built pipelines, synchronously laying distributed optical fibers is an optional solution. Pressure fluctuation characteristic data is acquired in real time by high-precision pressure transmitters installed upstream and downstream of the pipeline, with a sampling frequency of no less than 20Hz. For rapid negative pressure wave detection, the frequency can be locally increased to 100Hz, but only the data segments before and after the trigger are buffered, enabling the capture of millisecond-level negative pressure waves. Upstream and downstream flow difference data is continuously monitored by electromagnetic flowmeters or ultrasonic flowmeters to calculate the instantaneous flow difference. For each type of data, the system employs an adaptive feature extraction algorithm: extracting time-frequency domain energy spectrum and modal features from vibration data, extracting negative pressure wave arrival time difference and waveform slope features from pressure data, and extracting cumulative deviation and fluctuation variance features from flow data. These features are input into a pre-trained Gaussian process classifier or Bayesian network, which outputs the first, second, and third leakage confidence probabilities, respectively. To avoid false alarms caused by momentary sensor malfunctions or external interference, the system sets an anomaly threshold for each confidence probability. When a confidence probability exceeds the threshold, instead of direct smoothing, a secondary judgment is made based on the time-frequency domain characteristics of the data source: if the characteristics match the leakage pattern, they are retained and included in the fusion; if they do not match, it is judged as a disturbance, and the fusion weight of the data source is temporarily reduced or marked as invalid. Based on the pipe diameter, working pressure, burial depth, and soil medium type of the target pipeline, three sets of operating condition weight benchmark values ​​are obtained from the process parameter table. Then, the reliability is calculated by combining the historical accuracy or real-time signal-to-noise ratio of each confidence probability, and the benchmark weights are adaptively adjusted. Finally, the three sets of weighted coefficients are normalized and weighted with the confidence probabilities to obtain a comprehensive pipeline leakage coefficient between 0 and 1. When this coefficient is greater than or equal to the preset threshold, the system immediately issues a leakage warning signal.

[0064] The process parameters are shown in Table 1 below.

[0065]

[0066] Table 1

[0067] Example

[0068] In a city's water supply network, a target pipeline has the following parameters: pipe diameter DN300, working pressure 0.6MPa, burial depth 2.0m, and soil medium type gravelly sand. The system first retrieves three sets of weighted benchmark values ​​for this operating condition from a pre-set process parameter table: vibration data weight benchmark value Wv0 = 0.35, pressure data weight benchmark value Wp0 = 0.35, and flow difference data weight benchmark value Wq0 = 0.30.

[0069] At a given monitoring moment, the system collects and processes multi-source data. Pipeline vibration characteristics are extracted using distributed fiber optic sensors, and a Bayesian classifier calculates the first leakage confidence probability, Pv = 0.85. Negative pressure wave characteristics are captured using upstream and downstream pressure transmitters, yielding a second leakage confidence probability, Pp = 0.60. The instantaneous flow difference is calculated using an electromagnetic flowmeter, resulting in a third leakage confidence probability, Pq = 0.90. All three confidence probabilities do not exceed the preset single-source probability anomaly threshold of 0.95.

[0070] The system further calculates the reliability factor for each data source. Reliability consists of two parts: historical accuracy and real-time signal-to-noise ratio (SNR). The historical accuracy weighting coefficient is set to α = 0.6, and the real-time SNR weighting coefficient is set to β = 0.4. The historical accuracy recorded by the system is as follows: vibration sensor's correct prediction rate in the past 100 known leak or non-leak events is 80%, pressure sensor's is 75%, and flow sensor's is 85%. The current real-time SNRs are: vibration signal SNR = 12dB, pressure signal SNR = 8dB, and flow signal SNR = 20dB. To map the SNR to the 0-1 range, an empirical linear normalization formula is used: Normalized value = (Measured dB value - Minimum reference dB) / (Maximum reference dB - Minimum reference dB). Assuming the minimum reference SNR is 0 dB and the maximum reference SNR is 30 dB, the normalized SNRs are: Vibration (12-0) / 30 = 0.4, Pressure (8-0) / 30 ≈ 0.267, and Flow (20-0) / 30 ≈ 0.667. This serves as an empirical approximation for engineering applications, facilitating rapid on-site calculations, with errors within an acceptable range.

[0071] Therefore, the confidence levels are calculated as follows:

[0072] Vibration confidence level Cv = 0.6 × 0.80 + 0.4 × 0.40 = 0.64;

[0073] Pressure confidence level Cp = 0.6 × 0.75 + 0.4 × 0.267 = 0.5568;

[0074] Traffic credibility Cq = 0.6 × 0.85 + 0.4 × 0.667 = 0.7768;

[0075] The benchmark weights are adaptively corrected using a product method, meaning the corrected unnormalized weights are the benchmark weights multiplied by the confidence level.

[0076] Vibration correction weight Wv' = 0.35 × 0.64 = 0.224;

[0077] Pressure correction weight Wp' = 0.35 × 0.5568 = 0.19488;

[0078] The flow correction weight Wq' = 0.30 × 0.7768 = 0.23304;

[0079] The sum of the three weights, S = 0.224 + 0.19488 + 0.23304 = 0.65192. Normalization yields the final weighted coefficients:

[0080] The final vibration coefficient kv = 0.224 / 0.65192 ≈ 0.3436;

[0081] The final pressure coefficient kp = 0.19488 / 0.65192 ≈ 0.2990;

[0082] The final flow coefficient kq = 0.23304 / 0.65192 ≈ 0.3574;

[0083] At this point, the comprehensive pipeline leakage coefficient λ is calculated through weighted fusion:

[0084] λ=kv×Pv+kp×Pp+kq×Pq;

[0085] = 0.3436 × 0.85 + 0.2990 × 0.60 + 0.3574 × 0.90;

[0086] =0.79312;

[0087] The system's preset leak warning threshold is 0.70. Since λ = 0.79312 ≥ 0.70, a leak is detected in the pipeline, a leak warning signal is immediately generated, and the subsequent tracer gas precise location step is triggered.

[0088] In response to the warning signal, the precise positioning step is activated. First, a tracer gas is selected, with helium being the preferred choice due to its lower density than air, chemical inertness, non-toxicity, non-corrosiveness, and generally low background concentration (below 1 ppm), making it easy to detect. Injection methods include in-pipe injection and soil injection: For in-pipe injection, after isolating and depressurizing the target pipeline, gas is injected at a pressure of 0.05-0.3 MPa through fire hydrants or pre-reserved injection ports, for 3-30 minutes per 100m of pipeline. For soil injection, injection holes are drilled directly above the pipeline, and gas is injected at a pressure of 0.05-0.1 MPa, for 2-4 hours per 100m of pipeline. The actual duration can be dynamically adjusted based on the response time of the surface detector; it is not necessary to inject for the entire duration. For long-distance pipelines, segmented synchronous injection can be used. After gas injection is completed, detection points are set up on the ground along the pipeline route: First, a handheld gas detector is used for rapid inspection, or coarse detection holes are drilled at 3-5m intervals to identify areas of abnormal concentration. Then, fine detection holes are drilled at 0.5-1m intervals within these areas, penetrating the overburden layer to the pipeline burial depth, but maintaining a safety distance of at least 0.1m between the bottom of the hole and the top of the pipe. A PVC protective pipe with vent holes is inserted into the hole to prevent collapse. The geographical coordinates of each detection point are marked using an RTK positioning device. During detection, wind speed, wind direction, air temperature, air pressure, and surface humidity are collected simultaneously. The original concentration values ​​are corrected using a pre-calibrated environmental compensation coefficient to eliminate attenuation or drift caused by environmental factors. A concentration distribution curve is plotted with the distance of the detection point along the pipeline as the x-axis and the corrected concentration as the y-axis to identify all peak points. If there is only one peak, the location of the peak is corrected using a convection-diffusion forward model: the pipe burial depth, soil porosity, and diffusion coefficient are used as known parameters, and the peak point is used as the initial value. The one-dimensional convection-diffusion equation is solved using the finite difference method, and the source location is iteratively adjusted to minimize the residual between the simulated concentration distribution and the measured distribution, thus obtaining the accurate leak point. If multiple peaks occur, the locations and concentration values ​​of all peaks are used as inputs, and the convection-diffusion equation is solved using the least squares method or Bayesian inference inversion. Bayesian inference can introduce a prior probability distribution, such as the leak point location following a uniform or Gaussian distribution. The posterior distribution is sampled using the Markov chain Monte Carlo method, and the most probable true leak point location is finally output, thereby effectively eliminating the interference of false peaks caused by soil cracks or uneven backfilling.

[0089] Joint detection and early warning reduces the risk of false alarms or missed alarms from a single sensor by fusing multi-source data. Pipeline vibration may be caused by vehicle traffic or construction, pressure fluctuations may originate from pump start-up or valve adjustment, and flow differences may be caused by metering errors. This invention calculates the confidence probability of each of these three factors separately and uses gain optimization fusion. Even if one data source is disturbed, the other data sources can still maintain the accuracy of the comprehensive coefficient through adaptive weight correction. When vibration data generates a false high confidence probability due to external impact, the system will classify it as disturbed data, perform secondary discrimination, and temporarily reduce its weight. At the same time, if pressure and flow data maintain a low probability, the comprehensive coefficient after weighted fusion will still be below the threshold, thus avoiding false alarms. The precise positioning step uses active tracer gas combined with multi-peak inversion processing, solving the problem of sharp decline in positioning accuracy of traditional acoustic or correlator methods under conditions of plastic pipes, deep burial, or complex soil. The convection-diffusion equation, as a forward model, fully considers the gas transport mechanism in porous media, including the convection term being driven by the pressure gradient and the diffusion term by the concentration gradient. This allows the inversion to physically and consistently correct multiple spurious peaks caused by soil fissures or uneven backfilling. Experiments show that in non-uniform soil with a burial depth of 2m and backfill containing gravel, the traditional peak method may give an incorrect location more than 1.5m away from the true leak point. However, after using Bayesian inference inversion, the location error of this invention can be controlled within 3m, greatly reducing the workload of excavation verification.

[0090] This invention achieves a closed-loop process from macroscopic screening to microscopic location, with data feedback and model iteration capabilities between each step. In practical deployment, minimum nighttime flow analysis can be performed based on independent metering zones to quickly identify zones and target pipelines with potential leaks. Then, joint detection and early warning are only performed on the selected target pipelines, avoiding the blind deployment of high-cost sensors throughout the entire pipeline network and reducing the construction and maintenance costs of the monitoring system. When the joint detection and early warning is issued, the tracer gas precise location not only provides the excavation coordinates but also compares the location results with the actual excavated leak location, forming error feedback. This feedback is used to correct the soil diffusion coefficient, detection point spacing, and gas injection parameters in the gas diffusion model, continuously improving the subsequent location accuracy under the same pipe section or similar geological conditions. Acoustic detection equipment can be introduced as dual verification: for metal pipe sections with a burial depth of no more than 2m, acoustic detection is performed near the peak point of gas location, and the gas location coordinates and acoustic location coordinates are weighted and fused, for example, by allocating weights inversely proportional to the historical location accuracy of the two, to further correct deviations. Acoustic detection data can also be fed back to the joint detection and early warning step to update the calculation model for the first or second leakage confidence probability, forming a cross-step data loop. Model iterative optimization is further extended to the machine learning level: multi-source data collected in each leakage event, confidence probability coefficients, gain optimization weights, and the final location error are all stored in the training sample library. The leakage probability prediction model and gain optimization model are periodically trained offline or incrementally updated online, enabling the system to adapt to changes in pipe age and geological conditions. This invention not only achieves integrated high-precision leakage detection from early warning to location, but also continuously improves the reliability and economy of long-term operation through data closure and adaptive mechanisms. The method of this invention is particularly suitable for pipe sections with relatively homogeneous soil and relatively straight pipeline routes. For obviously heterogeneous soil or complex pipe networks, acoustic methods can be used for coarse location first, and then this method can be applied to that small section.

[0091] As one implementation method, the joint detection algorithm predicts pipeline leakage probabilities based on multi-source data and obtains a comprehensive pipeline leakage coefficient through gain optimization fusion. Specifically, this includes: extracting leakage feature values ​​from pipeline vibration characteristic data to calculate a first leakage confidence probability; extracting leakage feature values ​​from pipeline pressure fluctuation characteristic data to calculate a second leakage confidence probability; extracting leakage feature values ​​from upstream and downstream flow difference data to calculate a third leakage confidence probability; setting a single-source probability anomaly threshold, and marking confidence probabilities exceeding the threshold as suspected disturbances; performing secondary feature discrimination on the suspected disturbance data: if its time-frequency domain features match the leakage pattern, the original value is retained; if they do not match, it is determined to be an invalid disturbance. The fusion weight of the data source is temporarily reduced or it is marked as invalid. Based on the pipe diameter, working pressure, burial depth, and soil medium type of the target pipeline, a baseline value for the operating condition weight is determined. The credibility factor of each data source is calculated, consisting of a weighted sum of historical accuracy and real-time signal-to-noise ratio. Historical accuracy is statistically obtained based on the correct prediction rate of the data source in the past 100 known events. The real-time signal-to-noise ratio is calculated as the ratio of signal energy to noise floor energy and normalized to the range of 0 to 1. The baseline value for the operating condition weight is multiplied by the credibility factor and then normalized to obtain three sets of final weighting coefficients. These three sets of final weighting coefficients are then normalized and weighted with the corresponding confidence probabilities to obtain the comprehensive pipeline leakage coefficient.

[0092] The system extracts leakage features from the collected pipeline vibration characteristic data. Vibration data is sourced from distributed fiber optic sensors or accelerometer arrays, with a sampling frequency of at least 1 kHz. A short-time Fourier transform is used to convert the time-domain signal into a time-frequency graph, extracting the energy percentage and spectral kurtosis within a specific frequency band as feature vectors. A pre-trained Gaussian process classifier is then used to calculate the first leakage confidence probability, ranging from 0 to 1. Pressure fluctuation characteristic data is collected by upstream and downstream high-precision pressure transmitters at a sampling rate of at least 100 Hz. Three features are extracted: the time difference of the negative pressure wave arrival at the upstream and downstream sides, the waveform falling edge slope, and the pressure recovery time. These features are input into a support vector machine classifier to obtain the second leakage confidence probability. Upstream and downstream flow difference data is continuously monitored by an electromagnetic flowmeter. The cumulative deviation and fluctuation variance of the instantaneous flow difference are calculated, and a Bayesian network inference is used to obtain the third leakage confidence probability. It should be noted that the inherent measurement error of the electromagnetic flowmeter is typically ±0.5%–±2%. For minor leaks, where the leakage amount is less than 1% of the pipeline flow rate, the flow difference is often within the error range. The flow difference data in this invention is mainly used to assist in judging large flow leaks (greater than 5% of the pipeline flow) and as a reference for long-term trend analysis. For minor leaks, confidence probabilities are mainly provided by vibration and pressure fluctuation data. After the three confidence probabilities are output independently, the system enters the gain optimization and fusion stage. An anomaly threshold is set for each confidence probability. This threshold is determined by the statistical quantile of the confidence probability distribution under historical leak-free conditions, usually the 95th quantile. When a certain confidence probability exceeds this threshold, the system does not directly perform smoothing, but enters a secondary discrimination process: extracting the time-frequency domain features of the data source within the corresponding time window and comparing them with a pre-stored leak pattern library. If the feature matching degree is higher than the set threshold, it is determined that the high probability is caused by a real leak, and the original value is retained; if there is no match, it is determined to be a momentary sensor disturbance or external interference, and the fusion weight of the data source is temporarily reduced to 30% of the original weight or directly marked as invalid, so that it does not participate in subsequent weighted fusion. The system retrieves three sets of benchmark values ​​for operating conditions from a pre-set process parameter table based on the target pipeline's diameter, operating pressure, burial depth, and soil medium type. Simultaneously, it calculates the confidence factor for each confidence probability. The confidence factor consists of two parts: historical accuracy and real-time signal-to-noise ratio (SNR). Historical accuracy is calculated based on the correct prediction rate of the sensor or algorithm in the past 100 known events; real-time SNR is calculated as the ratio of signal energy to noise floor energy, normalized to the range of 0 to 1. The confidence factor is the weighted sum of historical accuracy and real-time SNR, with historical accuracy having a weight of 0.6 and real-time SNR having a weight of 0.4. An adaptive correction to the benchmark weights is performed using a product method; that is, the corrected unnormalized weights are equal to the benchmark weights multiplied by the confidence factor. The three corrected weights are summed and normalized to obtain three final weighting coefficients, the sum of which is 1.The three final weighted coefficients are summed with their corresponding confidence probabilities to obtain a comprehensive pipeline leakage coefficient, which ranges from 0 to 1. When this comprehensive coefficient is greater than or equal to a preset threshold, the system immediately generates a leakage warning signal. The preset threshold is calibrated using the ROC curve method on historical leakage samples, typically taking the threshold that maximizes the Youden exponent; an example value is 0.70.

[0093] The historical accuracy rate is defined as follows for vibration data sources: Historical accuracy = (Number of correct warnings from this data source in the past N leakage events + Number of correct non-warnings from this data source in the past M no-leak events) / (N + M). N and M are taken from the most recent 50 leakage events and 50 no-leak events, respectively, and are updated using a sliding window. The real-time signal-to-noise ratio (SNR) is calculated by acquiring 10 consecutive seconds of raw signal data during the joint detection and warning step. The signal energy is the power spectrum integral within the leakage characteristic frequency band (vibration: 100-800Hz; pressure: 0.5-5Hz; flow rate: 0.01-0.1Hz). The noise energy is the average power of adjacent frequency bands outside the characteristic frequency band. The signal-to-noise ratio (SNR) (dB) = 10 × log10 (signal energy / noise energy). For normalization, a maximum reference SNR of 30dB is set; values ​​exceeding 30dB are calculated as 30dB. For cases where leakage has not yet been confirmed, this SNR is a real-time estimate, and its accuracy is gradually corrected through subsequent verification after a leak warning.

[0094] This invention identifies single confidence probabilities that significantly deviate from the normal statistical distribution by setting a single-source probability anomaly threshold. It then distinguishes between true leakage and disturbances through secondary feature discrimination. For data sources identified as disturbances, their fusion weight is temporarily reduced or they are removed, preventing outliers from interfering with the fusion results. The system introduces a reliability adaptive correction mechanism based on historical accuracy and real-time signal-to-noise ratio. When the signal-to-noise ratio of a vibration sensor decreases due to aging or loose installation, its reliability automatically decreases, thus weakening the influence of that data source in the weighted fusion. If a data source maintains high accuracy over a long period and has a good current signal-to-noise ratio, its weight is adaptively increased. This dynamic weight adjustment allows the system to always focus the fusion on the most reliable data source, even under changes in sensor performance or external environmental interference, thereby reducing the false alarm rate.

[0095] Different pipe diameters, operating pressures, burial depths, and soil media types have varying effects on the propagation characteristics of vibration, pressure, and flow signals. For example, in small-diameter, shallowly buried pipelines in sandy soil, the pressure wave attenuation from leakage is smaller, making the pressure signal more sensitive; therefore, the weighting benchmark value for pressure data should be set higher. Conversely, in large-diameter, deeply buried pipelines in mixed soil backfill, vibration signals attenuate significantly, and flow difference data exhibits poor stability due to limited measurement accuracy; in this case, the weighting benchmark value for vibration data should be relatively lower. This invention uses a pre-set process parameter table to transform engineering experience and theoretical analysis results into numerical weighting benchmark values, enabling the fusion algorithm to automatically match a reasonable initial weight allocation based on the actual pipeline operating conditions. The weighting benchmark values ​​are not fixed but are adaptively adjusted based on the credibility of each confidence probability, achieving joint optimization of prior knowledge of operating conditions and real-time data quality. Furthermore, this method has good scalability. As the system accumulates runtime, it can continuously update the historical accuracy statistics of each data source and adjust the weight coefficients in the credibility calculation through offline training or online learning, allowing the fusion model to gradually adapt to the specific noise characteristics and signal propagation characteristics of the pipeline environment.

[0096] As one implementation method, before the joint detection and early warning step, there is also a step of macro-screening based on independent metering zones: the water supply network is divided into single-inlet closed independent metering zones, and the water supply, water consumption, instantaneous flow rate and pressure data of each zone are collected; by using the minimum nighttime flow rate method and water balance calculation, the calculated minimum nighttime flow rate and water balance index are compared with preset thresholds, and if they exceed the range, it is determined that there is a leak in the zone; then, by controlling the branch valves and combining the zone pipeline topology, the main water supply pipeline section in the zone is locked as the target pipeline, and the joint detection and early warning step is performed on the target pipeline.

[0097] The entire water supply network is divided into several independent metering zones according to the existing topology. Each zone is a closed area with a single inlet, meaning there is only one inlet point. The inlet flow rate is continuously monitored by electromagnetic flow meters. Water consumption by each user within a zone is aggregated through household meters or regional assessment tables. Pressure transmitters are installed at the inlet and key nodes within the zone. The system collects water supply, water consumption, instantaneous flow rate, and pressure data for each zone every 5 minutes and uploads them to the analysis platform in real time through a data acquisition and monitoring control system. Nighttime minimum flow analysis is performed between 2:00 AM and 4:00 AM daily, when urban water consumption drops to its lowest point of the day, which can be approximated as near zero user water consumption. The system extracts the inlet flow rate values ​​from 60 consecutive collection points during this period and takes the median as the nighttime minimum flow rate for that day. The preset normal threshold for the nighttime minimum flow rate is determined based on statistical values ​​from the same season during a historical leak-free period for that zone, typically the historical average plus two standard deviations. If the calculated nighttime minimum flow rate exceeds this threshold, a suspected leak is identified in the zone. Simultaneously, the system performs water balance calculations, determining the difference between the total water supply to the zone (typically 24 hours) and the sum of water consumption by all users within the zone over a complete metering cycle. This difference is then divided by the total water supply to obtain the water balance index, expressed as a percentage. The preset normal water balance threshold is typically 5%-8%; exceeding this threshold also indicates a leak in the zone. When either the minimum nighttime flow or the water balance index exceeds this range, the system issues a zone leak warning. The system accesses the zone's pipeline geographic information system topology data to identify the main water supply trunk lines and important branch lines within the zone. Through remote control or manual operation of the zone's branch line valves, each branch valve is closed sequentially, and the instantaneous flow rate at the inlet is observed. If the inlet flow rate drops significantly after closing a branch line valve, the leak is located in that branch line segment; if the flow rate does not drop significantly after closing all branch lines, the leak is located in the trunk line segment. After the above valve control and flow response analysis, the system identifies a specific section or several sections of the main water supply pipeline within the zone as the target pipeline, and then performs joint detection and warning procedures on the target pipeline. The entire macroscopic screening process can be completed within 30 minutes, narrowing the search range for subsequent high-precision detection.

[0098] By introducing independent metering zoning for macroscopic screening before joint detection and early warning, this invention effectively solves the problem of excessively high costs associated with directly deploying multi-source sensors across the entire pipeline network. For a typical medium-sized city water supply network, with a total length reaching hundreds of kilometers, installing vibration sensors, pressure transmitters, and flow meters on all pipe sections would result in equipment procurement and installation costs reaching tens of millions of yuan, and the real-time processing of massive amounts of data would place enormous pressure on computing resources. However, with an independent metering zoning architecture, only a small number of flow and pressure monitoring devices need to be deployed at the inlet and key nodes of each zoning. The number of zoning zones is typically dozens to hundreds, and the total number of devices is only one-tenth or even less of the total deployment cost for the entire pipeline network. The minimum flow rate method at night and water balance calculation are both mature engineering calculation methods with low computational complexity, capable of running in real-time on conventional industrial computers without the need for high-performance servers. Only when macroscopic screening determines that a leak exists in a certain zoning zone does the system initiate the joint detection and early warning step for the target pipeline within that zone, i.e., deploying or activating high-precision vibration, pressure, and flow difference sensors only on a few suspicious pipe sections.

[0099] As one implementation method, before injecting the tracer gas, a gas with a specific gravity less than air, chemical inertness, non-toxicity, non-corrosiveness, and an environmental background concentration below the detection limit is selected as the tracer gas. The injection method is as follows: after isolating and depressurizing the target pipeline, gas is injected into the pipeline through a pre-reserved opening or fire hydrant; or injection is directly injected into the surrounding soil through injection holes drilled above the target pipeline. The injection pressure and duration are adaptively adjusted according to the pipeline length, diameter, burial depth, and soil type: when injecting gas into the pipeline, the pressure is 0.05-0.3 MPa, and the duration is 3-30 minutes per 100m; when injecting gas into the soil, the pressure is 0.05-0.1 MPa, and the duration is 2-4 hours per 100m. Soil gas injection is only applicable to soils with a permeability coefficient greater than 10. -5 For sandy or gravelly layers with a speed of m / s, the air injection pressure is 0.1-0.2 MPa, the injection time is 4-8 hours per 100m, and an intermittent pulse injection method is used; for clay or compacted backfill soil, soil air injection is not used.

[0100] The tracer gas must meet the following conditions: its specific gravity must be less than that of air to ensure diffusion into the overlying soil after a leak, facilitating surface detection; it must be chemically inert to avoid reaction with pipe materials, soil composition, or groundwater; it must be non-toxic and non-corrosive to ensure construction safety and environmental friendliness; and its background concentration must be below the detection limit, meaning the concentration naturally present in the atmosphere or soil is far below the sensitivity of the detection instrument, thus avoiding background interference. Hydrogen and helium are the preferred gases to meet these conditions, and mixtures of the two can also be used. Hydrogen has the characteristics of fast diffusion and high detection sensitivity, while helium is more inert and has no explosion risk; the choice can be made based on the pipe burial depth and soil density. Injection methods are divided into two types: internal pipe injection and soil injection. The engineering decision-making principles for these two injection methods are as follows: internal pipe injection is preferred when: the pipe can be temporarily shut off from water supply, such as a non-residential water main, has a backup pipeline, can be operated at night, has a pipe diameter ≥ DN200, a burial depth ≤ 2m, and poor soil permeability. This method has the highest positioning accuracy, with an error controllable within 0.5m. This method has lower positioning accuracy but does not require interruption of water supply. The specific steps for internal pipeline injection are as follows: First, close the upstream and downstream valves of the target pipeline, open the vent valve or pressure relief port to reduce the pressure inside the pipeline to atmospheric pressure. After confirming that the isolation and pressure relief are completed, connect the high-pressure gas cylinder or small gas compressor to the injection connector through existing reserved ports on the pipeline, such as vent valve interfaces, flushing ports, or fire hydrant interfaces. Adjust the pressure reducing valve to the set pressure and then start the injection. The injection pressure and duration need to be adaptively adjusted according to the pipeline length, diameter, burial depth, and soil type. For internal pipeline injection, the pressure is generally controlled between 0.05-0.3 MPa. At lower pressures, gas diffusion is slow but safe, while at higher pressures, the gas can quickly fill the pipe section and be injected into the soil around the leak point. The injection duration is calculated as 3-30 minutes per 100m of pipeline length. The longer the pipeline or the denser the soil, the longer the duration should be, and vice versa. In actual operation, a segmented injection strategy can be adopted, that is, after injecting the amount of gas corresponding to every 100m of length, pause and check the gas concentration at the downstream end, and continue injection after the concentration stabilizes. Soil injection is suitable for situations where the pipeline cannot be isolated or where the gas injection efficiency inside the pipeline is low. The specific steps are as follows: Using a small drilling rig or manual auger, drill an injection hole every few meters along the pipeline's direction on the ground surface directly above the target pipeline. The hole diameter is approximately 20-50 mm, and the hole depth penetrates the overburden layer to near the pipeline's burial depth without touching the pipeline itself. Maintain a safety distance of at least 0.1 m between the bottom of the hole and the top of the pipe. Insert the injection pipe into the bottom of the hole, and seal the hole opening with bentonite or cement mortar to prevent gas from escaping along the hole wall. Control the injection pressure at a low pressure range of 0.05-0.1 MPa, and the injection time is 2-4 hours for every 100 m of pipeline length. Pulsed injection can be used during the injection process, i.e., pausing for 5 minutes every 15 minutes of injection to allow sufficient time for the gas to diffuse laterally and distribute evenly in the soil. After injection is complete, remove the injection pipe and backfill the injection hole with the original soil.

[0101] The low density of hydrogen or helium ensures that once the gas escapes from the leak, it will rise vertically through the soil layer to the surface, avoiding lateral diffusion or sinking into groundwater layers due to its high density, which would render it undetectable. Its chemical inertness and non-corrosiveness mean that the injection process will not accelerate pipe aging or corrode welds, making it particularly suitable for old cast iron or steel pipes. The low background concentration ensures a high signal-to-noise ratio in the detection data, allowing even minute leaks to be reliably identified. Furthermore, the two injection methods complement each other: internal pipe injection is suitable for isolable pipe sections with larger diameters, while gas seeps directly outward from the leak point, best reflecting the true leak path and providing high location accuracy.

[0102] This invention preferentially uses helium as the tracer gas. Helium is less dense than air, chemically inert, non-toxic and non-corrosive, and its background concentration in the environment is extremely low, requiring no special explosion-proof measures, which can significantly reduce the risks and complexity of on-site operations. This is only applicable when the pipeline is buried at a depth of more than 3m and the soil permeability coefficient is less than 10. -6 In special cases where the flow rate is [m / s] and a safety assessment permits it, a hydrogen-helium mixture may be considered to utilize the high diffusivity of hydrogen. If pure hydrogen is used, the following conditions must be met: the pipeline must be completely emptied and purged with nitrogen to ensure the oxygen volume concentration inside the pipeline is below 2%; the injection pressure must be strictly controlled between 0.05-0.1 MPa, using intermittent pulse injection, and explosion-proof injection equipment must be used. A hydrogen concentration monitor must be available on-site to ensure that the hydrogen volume concentration at any detection point is below 10% of the lower explosive limit, i.e., 0.4%. For routine water supply pipeline leak detection, helium is recommended as its positioning accuracy is sufficient for engineering requirements within 3 meters.

[0103] As one implementation method, when setting up detection points, a mobile gas detector is first used for rapid inspection along the ground surface, or coarse detection holes are drilled at large intervals of 3-5 meters to identify areas with abnormal concentrations. Then, within the abnormal areas, fine detection holes are drilled at smaller intervals of 0.5-1 meters, penetrating the overburden layer to the depth of the pipeline, with a safe distance maintained between the bottom of the hole and the top of the pipe. A breathable protective pipe is inserted into the detection hole, and its geographical coordinates are marked. Specifically, on unpaved surfaces such as green belts, farmland, and bare soil, fine detection holes are drilled at small intervals of 0.5-1 meters within the abnormal areas; on paved urban surfaces such as asphalt and concrete, the spacing of the fine detection holes is widened to 2-5 meters, or a surface gas collection hood method is used instead of drilling, i.e., a gas collection hood is placed every 1-2 meters along the pipeline route, left to stand for 10 minutes, and then the gas concentration inside the hood is measured. A preliminary screening strategy is used to narrow down the detection range. There are two specific methods, and one can be selected according to the site conditions. The first method involves a rapid, walking inspection along the ground directly above the pipeline using a portable gas detector. The detector should be capable of detecting hydrogen or helium with an accuracy of at least 1 ppm and a sampling frequency of 1 Hz. The inspector walks at a normal pace of approximately 3 km / h along the pipeline, keeping the detector probe 10-20 cm above the ground. Concentration readings are recorded in real-time, and the location is marked using a handheld GPS receiver. Areas with readings exceeding three times the background level are marked as an abnormal concentration zone. If the pipeline is deeply buried or the surface cover is hard, preventing natural gas diffusion, coarse boreholes are drilled along the pipeline at 3-5 meter intervals. The borehole diameter is approximately 30 mm, penetrating the road structure and overburden layer to a depth of approximately 0.3 meters above the top of the pipeline. The gas detector probe is inserted into the borehole, the opening is sealed, and gas is extracted for measurement, recording the peak concentration. Both methods can quickly identify the approximate range of abnormal concentrations, typically between 10-30 meters in length. After initial screening, intensive and detailed testing is conducted within the identified anomaly areas. Within these areas, fine testing holes are drilled at intervals of 0.5-1 meter along the pipeline. Handheld gasoline drills or electric augers are used, with a hole diameter of 25-40 mm. The drilling depth must penetrate the entire overburden layer to the pipeline's burial depth, meaning the bottom of the hole should reach approximately 0.1-0.2 m above the top of the pipe, but must not touch the pipe wall. To ensure a safe spacing, the drilling should be stopped immediately if the drill bit resistance suddenly decreases, indicating that it has approached the backfill sand layer around the pipeline or the pipeline itself. After each fine testing hole is drilled, a venting pipe is immediately inserted. The venting pipe is made of rigid plastic or thin-walled stainless steel, with a diameter slightly smaller than the borehole diameter. Ventilation holes of 2-5 mm diameter are evenly distributed on the pipe wall, with an opening rate of no less than 30%. The length of the venting pipe is consistent with the borehole depth. The lower end is sealed or has a conical head to prevent soil ingress, while the upper end protrudes 5-10 cm above the ground and is equipped with an openable sealing cap. After inserting the protective tube, fill the annular gap between the protective tube and the borehole wall with fine sand to ensure that gas can freely enter the protective tube from the soil without blockage.Finally, a real-time dynamic differential GPS system or total station is used to accurately measure the geographical coordinates of each detection well, with an accuracy better than 10 centimeters. Each detection well is assigned a unique number, and its coordinates, depth, casing type, and initial concentration reading are entered into the field data acquisition terminal to form a detection point distribution map.

[0104] If all possible pipe sections are directly drilled at 0.5m intervals, taking a 100m long suspected pipe section as an example, approximately 200 holes would need to be drilled. Each hole drilling and pipe installation would take about 5 minutes, resulting in a total working time exceeding 16 hours and generating a large number of holes that require backfilling, causing severe damage to the road surface. However, using the method of this invention: firstly, through rapid inspection or coarse surveying at 3-5m intervals, only 20-30 coarse survey holes need to be drilled, taking about 1-2 hours to locate the abnormal area. The length of the abnormal area is usually no more than 30m. Within this area, by densifying the density at 1m intervals, only about 30 fine survey holes need to be drilled, controlling the total number of holes to 50-60. The on-site operation time is reduced to 4-6 hours, and the workload is reduced by about 70%. Especially for cases with greater burial depth or dense soil, where drilling is inherently difficult, the tiered strategy offers better economic benefits. The rapid inspection method, under conditions of shallow burial depth and permeable soil, may even eliminate the need for coarse survey holes; abnormal area identification can be completed solely through surface inspection, further reducing invasive operations. This tiered design fully considers the balance between efficiency and accuracy under different working conditions, enabling this method to be successfully implemented in places such as urban roads and green belts where large-scale drilling is not suitable.

[0105] As one implementation method, when detecting concentration, wind speed, wind direction, air temperature, air pressure and surface humidity are collected simultaneously, and the detected concentration value is corrected based on these environmental parameters to eliminate concentration decay or drift caused by environmental factors.

[0106] A portable weather station is set up at the testing site. The station should include at least a wind speed sensor, a wind direction sensor, a temperature sensor, a pressure sensor, and a surface humidity sensor. The wind speed and direction sensors are installed 1.5-2 meters above the ground. The temperature sensor is placed in a well-ventilated radiation shield. The pressure sensor and surface humidity sensor are positioned at the center of the testing area. While measuring the concentration at each well, the instantaneous wind speed, wind direction, temperature, pressure, and humidity are recorded in real time. Each well corresponds to an independent set of environmental parameters. Average values ​​over a fixed time window are not used to avoid correction errors introduced by changes in meteorological conditions over time. During concentration measurement, the gas detector probe is inserted into the bottom of the breathable protective tube. After the reading stabilizes, the concentration value is recorded, along with the corresponding wind speed, wind direction, temperature, pressure, and surface humidity. After completing measurements at all testing points, the original concentration values ​​are processed using an environmental correction model. The core idea of ​​the correction model is to eliminate the effects of wind-induced dilution, temperature and pressure, and surface humidity on gas adsorption. Wind speed and direction correction is performed first. For any detection point, calculate the wind direction angle relative to the assumed leak area. Since the actual leak source location is unknown, an empirical formula is used: correction factor C. wind The correction factor is calculated by dividing the reference wind speed by the measured wind speed and then multiplying by the wind direction factor. The reference wind speed is the median of the measured wind speeds at all points within the detection area. The wind direction factor is the absolute value of the cosine of the angle between the wind direction and the line connecting the source point to the detection point; if the angle is greater than 90 degrees, a value of 0.1 is used to avoid division by zero. If the measured wind speed is less than 0.3 m / s, it is considered a windless condition, and the correction factor is 1. Then, temperature and pressure corrections are applied. The response of gas concentration sensors is typically related to ambient temperature and pressure, especially for electrochemical or thermal conductivity sensors. According to the ideal gas law, concentration is directly proportional to absolute temperature and inversely proportional to pressure. Therefore, the temperature and pressure correction factor C... tp The value is equal to the ratio of the reference temperature to the measured temperature multiplied by the ratio of the measured air pressure to the reference air pressure. The temperature unit is Kelvin, and the air pressure unit is hectopascals. The reference temperature and reference air pressure are the average values ​​taken over the detection period. Finally, surface humidity correction is performed. When the surface soil humidity is high, water molecules can adsorb tracer gas molecules or alter the gas diffusion path in the soil pores, leading to a lower detected concentration. The humidity correction coefficient C is obtained by fitting a humidity correction curve previously measured in the experimental soil. humidity This coefficient decreases as surface humidity increases, reaching 1 when humidity is 0 and decreasing to 0.4-0.6 when humidity reaches saturation. The final environmentally corrected concentration value equals the original measured concentration multiplied by the wind speed correction factor, air temperature and pressure correction factor, and humidity correction factor. If the corrected concentration is negative or exceeds the sensor's range, boundary constraints are applied. All corrected concentration values ​​and their corresponding detection point coordinates are stored in a database for subsequent concentration distribution curve plotting and diffusion inversion.

[0107] In actual field testing, weather conditions change rapidly. For example, within the same testing area, the concentration measured in the morning when there is no wind may be 50 ppm, while in the afternoon, when the wind speed increases to 5 m / s, the concentration at the same location may drop sharply to 10 ppm, even though the intensity of the leak source remains unchanged. Without wind speed correction, the system may misinterpret the concentration drop as a move away from the leak source or that the leak has stopped, leading to peak location deviation. This invention introduces wind speed and direction correction to normalize the concentration values ​​at different times and under different wind conditions to a unified reference wind speed, making the concentrations at different testing points comparable. Wind direction correction further solves the problem of asymmetrical concentration distribution caused by wind direction changes: when the wind blows towards a testing point, the gas is blown away from the ground, and the concentration at that point decreases; this invention compensates for this effect through a wind direction factor, making the corrected concentration more reflective of the true direction of the leak source. Temperature and pressure correction solves the problems of temperature drift and gas density changes in the sensor itself. For example, when the temperature reaches 35 degrees Celsius at midday, sensor sensitivity may decrease. Simultaneously, the increased thermal motion of gas molecules and their reduced density can lead to measurements being more than 15% lower than expected. This deviation can be effectively offset by correction using the ideal gas law. Surface humidity correction addresses situations where soil moisture increases sharply after rain or irrigation, preventing the attenuation of gas signals due to water film adsorption from being misjudged as the absence of a leak. After these corrections, the consistency of concentration distribution curves measured under different weather conditions for the same leak scenario can be reduced from a deviation of over 50% before correction to less than 10%, providing stable and reliable input data for subsequent peak identification and inversion localization.

[0108] Environmental parameter correction enables the comparison and joint modeling of detection data from different times, seasons, and even years, laying the foundation for long-term iterative optimization of the system. After accumulating a sufficient number of samples, machine learning methods can be used to establish a mapping relationship between environmental parameters and concentration correction coefficients, replacing or optimizing the initial empirical formulas to achieve an adaptive correction model. In the joint detection and early warning step, vibration, pressure, and flow difference data are also affected by environmental parameters such as temperature and humidity. The environmental parameters collected in this step can also serve as auxiliary inputs to update the environmental compensation term in the calculation model of the first or second leakage confidence probability. Ultimately, the environmental correction module becomes a bridge connecting multi-source data and eliminating common interference in the entire leak detection system, improving the system's generalization ability and robustness under different geographical and climatic conditions.

[0109] As one implementation method, the specific steps for processing concentration data through concentration distribution analysis and gas diffusion inversion are as follows: plot the concentration distribution curve with the distance of the detection point along the pipeline as the abscissa and the concentration after environmental correction as the ordinate, and identify all peak points; if there is only one peak point, use the convection-diffusion model to correct the location of the point and then take it as the leak point; if there are multiple peak points, use the location and concentration value of all peak points as input, and combine the pipeline burial depth, soil porosity, and soil diffusion coefficient, use the least squares method or Bayesian inference to invert the convection-diffusion equation, and output the most likely true leak point location.

[0110] After environmental correction, the system projects the geographic coordinates of each detection point onto the direction of the pipeline centerline, calculates the arc distance along the pipeline for each detection point as the abscissa, and plots the concentration distribution curve with the environmentally corrected concentration value as the ordinate. The specific projection method is as follows: extract the coordinate sequence of the broken line segments of the target pipeline centerline from the pipeline geographic information system data; for each detection point, calculate the shortest projection point to each segment of the pipeline centerline, and accumulate the broken line length from that projection point to the pipeline starting point to obtain the pipeline distance for that detection point. The concentration distribution curve can be formed by connecting discrete points using linear interpolation or spline interpolation. The system uses a sliding window local maximum detection algorithm to identify all peak points on the curve. The window width is adaptively set according to the spacing between detection points, typically 3-5 adjacent points. For each identified peak point, its pipeline distance location and concentration value are recorded. If only one peak point exists on the concentration distribution curve, the single-peak correction process begins. The system first uses the pipeline distance location of that peak point as the initial estimate of the leak point. Then, it calls the convection-diffusion forward model to correct this location. The forward model uses a one-dimensional convection-diffusion equation to describe the diffusion of tracer gas from the leak point into the soil and upwards into the overlying soil layer: with the pipeline centerline as the x-axis, the leak point location as the origin, and downstream as the positive direction, the gas concentration C(x,t) satisfies: Where C is the gas concentration (ppm), t is time (s), and D is the effective diffusion coefficient of the soil (m²). 2 / s), v is the convection velocity (m / s, driven by the leak pressure gradient), and λ is the attenuation coefficient (s). -1 λ represents the rate at which the concentration of a gas in the soil decreases due to factors such as adsorption, dissolution, or diffusion into deeper layers; λ can be empirically determined based on soil type, such as 0.001 s for sandy soil. -1 Clay sample 0.005s -1 Alternatively, it can be calibrated through on-site tracer experiments. The horizontal offset of the concentration peak detected on the ground exhibits a monotonic mapping relationship with the location of the leak.

[0111] Pipeline burial depth, soil porosity, and soil diffusion coefficient are input into the model as known parameters. The diffusion coefficient is obtained by laboratory testing of soil samples taken from the site or by consulting empirical value tables based on soil type. The system uses the finite difference method to discretize the equations, with a spatial step size of 0.1 m and a time step size that satisfies the Courant stability condition. A series of candidate source locations are set within a 5 m range before and after the initial leak point estimate. For each candidate source location, forward modeling is performed to simulate the theoretical concentration values ​​at each detection point after a diffusion time equal to the on-site gas injection detection time, under continuous point source conditions at that location. The objective function is defined as the sum of squares of the differences between the theoretical concentration and the measured corrected concentration. The candidate source locations are iteratively adjusted using the golden section search or parabolic interpolation method to minimize the objective function value. The process stops when the relative change in the objective function between two adjacent iterations is less than 0.1%, and the corresponding source location is the corrected precise leak point location. This process typically completes within a few seconds. Although the convection-diffusion equation is strictly applicable to homogeneous porous media, the heterogeneity of actual soils, such as fissures and uneven backfilling, can be regarded as disturbances to the macroscopic diffusion process on an engineering scale (meter level). The convection-diffusion equation used in this invention is a forward model, which is essentially an equivalent continuous medium model. Its diffusion coefficient D and porosity parameter are taken as the macroscopic average values ​​of the soil in the field, which can describe the average transport behavior of gas in heterogeneous soils.

[0112] Before performing gas diffusion inversion, the groundwater level depth in the detection area should be detected. If the groundwater level is higher than the top of the pipeline or the soil moisture saturation exceeds 80%, gas cannot diffuse effectively, and this method is not applicable. If the groundwater level is lower than the pipeline and the soil moisture content is moderate, the following inversion process is used. If two or more peak points are identified on the concentration distribution curve, it indicates the presence of cracks in the soil, uneven backfilling, or multiple leaks in the pipeline, causing gas to emerge from the ground through multiple paths. At this time, the system initiates the multi-peak inversion process. The pipeline distance and corresponding environmentally corrected concentration values ​​of all detection points are used as input data, along with the pipeline depth, soil porosity, soil diffusion coefficient, and the location and concentration values ​​of each peak point. The inversion uses the least squares method or Bayesian inference to solve the inverse problem of the convection-diffusion equation. When using the least squares method, the leak location and leakage intensity are treated as parameters to be optimized, constructing a nonlinear least squares problem: the objective function is the sum of squares of the differences between the simulated and measured concentrations at all detection points, with a regularization term added to suppress solution instability. The regularization coefficient is determined using the L-curve method. The Levenberg-Marquardt algorithm is used iteratively to solve the problem, with the initial values ​​being the location and concentration of the highest concentration. After convergence, the algorithm outputs the optimal leak location. When using Bayesian inference, the leak location and leakage intensity are treated as random variables. Prior probability distributions are defined: the leak location follows a uniform distribution covering the entire length of the pipeline detection section; the leakage intensity follows a log-normal distribution, with the mean and variance estimated based on the injection parameters. The likelihood function is constructed based on a Gaussian error model of the difference between the simulated and measured concentrations, with the error variance set according to the sensor accuracy. The posterior distribution is proportional to the product of the prior and the likelihood. The Metropolis-Hastings algorithm from the Markov chain Monte Carlo method was used for posterior sampling. A multivariate Gaussian distribution was proposed, with the covariance matrix initially set as a diagonal matrix and adaptively adjusted to achieve an optimal acceptance rate of approximately 25%. After 20,000 sampling runs, the first 5,000 runs were discarded as an aging period, and the mean or the point with the highest posterior probability of the remaining samples was used as the final estimate of the leak location. The Bayesian method quantifies the uncertainty of the location, outputting the standard deviation of the posterior distribution as the confidence interval for the location error. Regardless of the inversion method used, a single true leak location is ultimately output, effectively eliminating false peak interference caused by soil heterogeneity. The inversion calculation was run on a computer, with typical processing time ranging from several seconds to several minutes depending on the number of sampling points.

[0113] Single-peak correction utilizes a convection-diffusion model to optimize the initial peak value under physical constraints, improving positioning accuracy. Methods that directly take the highest surface concentration point as the leak point ignore the offset effect of lateral gas diffusion in the soil. When the burial depth is large or the soil diffusion coefficient is high, the surface peak value may deviate from the true leak point by tens of centimeters or even meters. This invention uses a forward model for iterative correction, incorporating physical parameters such as burial depth and porosity into the calculation, making the positioning error typically less than 3 meters, achieving an accuracy level where the leak point can be directly located during excavation verification. Multi-peak inversion solves the problem of complex soil conditions that traditional methods cannot handle. In actual engineering, backfill soil often contains gravel, cavities, or animal burrows, causing gas to rise rapidly along preferred channels, forming multiple spurious peaks. Simply selecting the highest peak for excavation will likely result in digging the wrong location. This invention uses the least squares method or Bayesian inference to inversely solve for the most likely source location from all global detection point data. Even if three or four spurious peaks appear on the surface, the algorithm can still locate the true leak point by fitting the entire concentration distribution field. The Bayesian method additionally provides a posterior probability distribution, enabling maintenance personnel to assess the reliability of the location results. For example, when the posterior distribution exhibits a bimodal distribution, it suggests the possible existence of two independent leak points. In practical applications, multiple peaks in the concentration distribution may be caused by two reasons: soil heterogeneity leading to preferential gas pathways and forming spurious peaks; or the existence of two or more independent real leak points in the pipeline. If the inverted posterior probability distribution shows a single, concentrated peak with a small fitting residual, it is determined to be a single-point leak, and spurious peaks are effectively eliminated. If the posterior probability distribution shows a clear bimodal or multimodal distribution, i.e., there are two or more local maxima, and the peak spacing is greater than twice the detection point spacing, the system outputs multiple candidate leak point locations and suggests the possible existence of multi-point leaks, recommending segmented excavation verification or verification using an acoustic correlator. For multi-point leak scenarios, the system no longer forcibly merges them into a single point, but instead outputs all probably significant leak point locations and their confidence intervals.

[0114] As one implementation method, after determining the location of the leak, if the pipeline is a metal pipe section with a burial depth of ≤2m, then acoustic detection equipment is used to conduct acoustic detection near the peak point. The coordinates of the gas positioning are matched and compared with the coordinates of the acoustic positioning. The positioning deviation is corrected by weighted fusion to complete the dual verification.

[0115] The pipeline is made of metal, including cast iron and steel, and its burial depth does not exceed 2 meters. If these conditions are met, the system automatically enters the acoustic-assisted verification process. An acoustic detection search zone is defined by extending 10 meters forward and backward along the pipeline, centered on the gas positioning coordinates. On-site personnel carry acoustic leak detectors, which typically include piezoelectric accelerometers or ground-sound stethoscopes, bandpass filters, and noise-canceling headphones. The sensors are placed in close contact with the ground above the pipeline or directly on exposed pipe sections such as valve wells or fire hydrant interfaces, with a measuring point every 1-2 meters along the pipeline. At each measuring point, the equipment collects continuous broadband acoustic signals generated by the pipeline leak, typically in the range of 100-2000 Hz. The system performs a fast Fourier transform on the collected acoustic signals, extracting the energy integral within the leak's characteristic frequency band as the sound intensity index. Simultaneously, it uses a dual-sensor time-difference method or correlation analysis to calculate the time difference of the leak sound wave reaching different measuring points, thus providing a preliminary estimate of the acoustic positioning coordinates. After completing measurements at all measuring points, the acoustic positioning result is obtained, which is represented as a distance coordinate on the pipeline. The process then proceeds to the matching, comparison, and weighted fusion stage. Let the gas positioning coordinate be X. g The acoustic positioning coordinates are X a Both units are in meters, with the pipe start point as the zero point. The system first calculates the positioning deviation Δ=|X g -X a If Δ is less than the preset consistency threshold, typically 1.0-2.0m, then the two methods are considered to corroborate each other, and a weighted fusion is performed to further improve accuracy. The final leak point coordinates X after fusion are... f =w g ×X g +w a ×X a where the weight w g and w a The sum is 1. The weights are determined using an adaptive method: based on historical positioning error statistics or on-site signal quality assessment, the confidence level for gas positioning is inversely proportional to the concentration inversion residual, while the confidence level for acoustic positioning is directly proportional to the signal-to-noise ratio. Specifically, w g =1 / (1+SNR) a / SNR ref ), w a =1-w g SNR a The signal-to-noise ratio (SNR) of an acoustic signal. ref The reference signal-to-noise ratio is typically set to 10 dB. If Δ is greater than the consistency threshold, the system outputs two different location results and marks them as inconsistent, prompting maintenance personnel to review them in conjunction with the site conditions, such as checking for multiple leak points or soil conditions that could cause gas inversion dispersion. After fusion is complete, X... f The final leak location is output to guide excavation and repair.

[0116] Tracer gas methods, when used at greater burial depths and in conditions of poor soil permeability, suffer from slow gas diffusion, potentially leading to systematic biases in inversion positioning. Acoustic methods, on the other hand, offer high sensitivity and fast positioning for metal pipe sections buried no more than 2 meters deep, but are susceptible to environmental noise interference and cannot be used for plastic pipes. The fusion of these two methods improves positioning accuracy from 0.3-0.5 meters for shallow-buried metal pipe sections to 0.1-0.2 meters, and the consistency of the fusion results provides a quality assessment indicator for on-site personnel. When the coordinate deviation between the two methods is less than 1 meter, the excavation success rate approaches 100%; larger deviations indicate potential complexities, necessitating caution during indiscriminate excavation.

[0117] As one implementation method, it also includes model iterative optimization: comparing each positioning result with the actual excavated leak location to calculate the positioning error; correcting the soil diffusion coefficient, detection point spacing, and gas injection parameters in the gas diffusion model based on the error value; and using the positioning data from each iteration, as well as the multi-source acquisition data and probability coefficients from the joint detection and early warning steps, as training samples to perform offline training and online updates for the leakage probability prediction model and gain optimization model.

[0118] After each successful precise location of the tracer gas and output of the leak coordinates, maintenance personnel conduct excavation verification based on these coordinates. They then use a measuring tape or laser rangefinder to measure the distance difference between the actual leak location and the system's output location, denoted as the location error E (in meters). The system records this error value in the database and stores it in association with all parameters used in this location. Based on the error value, the system performs layered adaptive corrections to key parameters in the gas diffusion model to avoid coupling interference caused by simultaneous adjustments of multiple parameters.

[0119] First layer: Correction of the effective diffusion coefficient D in the soil. Assuming the detection point spacing S and injection parameters P and T are the recommended values ​​of the current system, only D is considered as the variable to be optimized. For the nth location, the optimal diffusion coefficient D_opt that minimizes the location error E is calculated and smoothed using Kalman filtering to obtain D_new = D_old + K·(D_opt - D_old), where the filter gain K is initially set to 0.3. This correction is performed every 3 locations. Second layer: Correction of the detection point spacing S. After the correction of D tends to stabilize, if the correction amount is less than 5% for 3 consecutive times, the impact of S is evaluated. If the average error E_avg of 5 consecutive locations is > 0.5m, and the error manifests as an excessive shift in the concentration peak position, the spacing of fine boreholes in the abnormal area is reduced by one level from the current value, for example, from 1.0m to 0.7m, with a lower limit of 0.3m; if E_avg < 0.2m and the error is below the threshold for 5 consecutive times, the spacing is appropriately increased to 1.5m. The third layer involves correcting the injection parameters, specifically pressure P and duration T. Once D and S stabilize, the optimal injection pressure range that minimizes the location error is calculated for leakage events of the same soil type. If the location error is consistently high for the current soil type, manifested as an excessively small gas diffusion range, the injection pressure is increased by 0.05-0.1 MPa and the duration is extended by 20%-50% in the next detection of the same type. Conversely, if excessive gas diffusion leads to a flat concentration distribution, the pressure is appropriately reduced or the duration is shortened. This layered correction strategy performs a batch update after every three location events, and the updated parameters are stored in the process parameter configuration file.

[0120] After each complete leak event is handled, the system stores the multi-source data collected during the joint detection and early warning steps of the event, including pipeline vibration characteristic data, pressure fluctuation characteristic data, upstream and downstream flow difference data, the first, second, and third leak confidence probabilities corresponding to each data source, and the comprehensive leak coefficient obtained through gain optimization fusion, along with the final leak confirmation result (whether the actual excavation revealed a leak and the coordinates of the leak location), into the sample database. For normal operating conditions without leaks, the system also periodically extracts multi-source data within a time window and marks it as a negative sample. The sample database is stored in time-partitioned partitions, retaining at least the most recent 1000 records. Offline training is performed once per quarter, or triggered when the number of newly added samples reaches 200. There are two training objectives. The first objective is to update the leak probability prediction model, i.e., the three classifiers used to calculate the confidence probabilities from vibration, pressure, and flow difference data, respectively. Supervised learning is used, with multi-source data features as input and actual leak labels as output, and the model is retrained using gradient boosting decision trees or support vector machines. Five-fold cross-validation is used during training to prevent overfitting, and the parameters of historical models are retained as regularization references. The second objective is to update the adaptive weight parameters in the gain optimization model, including the baseline values ​​of operating condition weights in the process parameter table and the historical accuracy statistics in the confidence calculation. Based on the actual performance of each data source in the most recent 100 leakage events, the historical accuracy of each data source is recalculated, i.e., the number of correct predictions divided by the total number of participations. Simultaneously, a linear regression method is used to analyze the relationship between operating condition parameters such as pipe diameter, burial depth, and soil type and the optimal weights, fitting and updating the process parameter table to make the lookup values ​​closer to the actual optimal weights. For online updates, the system supports lightweight incremental learning. For the leakage probability prediction model, stochastic gradient descent is used to fine-tune the most recent 20 samples, executed after each leakage verification, without waiting for the offline training cycle. For the confidence in the gain optimization model, the real-time signal-to-noise ratio and historical accuracy are updated daily using a sliding window. The online update process runs asynchronously in the background, without affecting the real-time detection and early warning functions on the front end.

[0121] Soil properties vary greatly across different regions. Even within the same city, the compaction, gravel content, and organic matter ratio of backfill soil differ between different pipe sections. Initial soil diffusion coefficients are typically derived from empirical values ​​or laboratory measurements, which may deviate from actual field conditions. This invention utilizes the actual leak location obtained from each excavation verification as a benchmark, and reverse-corrects the diffusion coefficient, detection point spacing, and air injection parameters, thereby continuously improving the positioning accuracy in the same area or under similar soil conditions. Engineering practice shows that after five to ten iterations of correction, the average positioning error can be reduced from the initial 0.5m to within 0.2m, and the parameter adjustment process is fully automated, requiring no manual intervention. The offline and online joint training of the leak probability prediction model and the gain optimization model enables the joint detection and early warning steps to adapt to long-term drift caused by pipeline aging, changes in environmental noise, and other factors.

[0122] In one implementation, the tracer gas is hydrogen, helium, or a mixture of both; the preset threshold is pre-calibrated using statistical quantiles or ROC curves from historical leak samples. The historical sample contains at least 50 sets of data, with half showing leaks and half showing no leaks in known real-world conditions. If there are insufficient samples, an empirical threshold of 0.7 can be used initially, and recalibrated after accumulating data.

[0123] The preset thresholds used in the joint detection and early warning steps are pre-calibrated using statistical quantiles or ROC curves from historical leak samples. The statistical quantile method involves collecting historical data from the pipeline or similar pipelines operating continuously for at least 1000 hours under known leak-free conditions. The pipeline leakage comprehensive coefficient is calculated at each sampling time, yielding an empirical distribution of the comprehensive coefficient under leak-free conditions. The 95th or 99th quantile of this distribution is used as the preset threshold; a leak is considered present when the comprehensive coefficient exceeds this value with 95% or 99% confidence. The ROC curve method involves collecting at least 50 historical samples, half with known actual leaks and half without. Each sample includes the calculated pipeline leakage comprehensive coefficient and its corresponding actual leak label. The judgment threshold is varied from 0 to 1, and the true positive rate and false positive rate are calculated for each threshold. An ROC curve is plotted with the false positive rate on the x-axis and the true positive rate on the y-axis. The area under the curve (AUC) is calculated; the closer the AUC value is to 1, the stronger the discriminative power of the comprehensive coefficient. The threshold point with the highest Youden index is selected as the optimal preset threshold. The Youden index equals the true positive rate minus the false positive rate. This threshold achieves a balance between false positives and false negatives in practical applications. If the engineering focus is more on avoiding false negatives, the threshold can be appropriately lowered; if the focus is more on avoiding false positives, the threshold can be raised. After calibration, this threshold is fixed in the system configuration file and can also be recalibrated annually based on seasonal changes or pipeline updates.

[0124] The precise location steps described in this invention are particularly suitable for high-precision leak identification in non-emergency situations, or as a final verification method for other rapid detection methods such as acoustic methods, correlator methods, and infrared thermal imaging. In practical engineering, acoustic or correlator methods are typically used first for rapid coarse location, narrowing down the length of the suspected pipe section to within 10-20m. Then, tracer gas is used for precise location of this short pipe section, thereby reducing gas injection and detection time. For emergency leaks that must be repaired quickly, acoustic or correlator methods can be used alone for location, while the method of this invention can be used for post-repair leak verification or complex scenarios where location is difficult.

[0125] It should be understood that those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.

Claims

1. A method for leak detection and location in water supply pipelines, characterized in that, Includes the following steps: Joint detection and early warning steps: Data is collected from multiple data sources for the target pipeline. The collected data includes at least: pipeline vibration characteristic data, pipeline pressure fluctuation characteristic data, and upstream and downstream flow difference data. Based on the joint detection algorithm, the probability of pipeline leakage is predicted according to multi-source data, and the comprehensive coefficient of pipeline leakage is obtained by gain optimization fusion. If the comprehensive leakage coefficient of the pipeline is greater than or equal to the preset threshold, it is determined that there is a leak in the pipeline and a leakage warning signal is generated. Precise positioning steps: In response to a leak warning signal, active tracer gas combined with concentration analysis and diffusion inversion is used to accurately locate the leak point, specifically including: Inject tracer gas into the target pipeline or the surrounding soil; Multiple detection points are set up on the ground along the target pipeline route to detect the concentration of tracer gas at each detection point; By analyzing concentration distribution and processing gas diffusion inversion to determine concentration peak points and correct them, the precise location of leaks can be obtained. Among them, the gas diffusion inversion uses the convection-diffusion equation based on porous media as the forward model; When multiple peaks appear in the concentration distribution, the convection-diffusion equation is inverted and fitted using the least squares method or Bayesian inference to correct the interference peaks caused by soil fissures or uneven backfilling, and to obtain the true location of the leak.

2. The method for leak detection and location in a water supply pipeline according to claim 1, characterized in that: In the joint detection algorithm, the probability of pipeline leakage is predicted separately based on multi-source data, and a comprehensive pipeline leakage coefficient is obtained through gain optimization fusion, specifically including: Leakage characteristic values ​​are extracted from pipeline vibration characteristic data, and the first leakage confidence probability is calculated. Leakage characteristic values ​​are extracted based on pipeline pressure fluctuation characteristic data, and the second leakage confidence probability is calculated. Leakage feature values ​​are extracted based on the flow difference data between upstream and downstream of the pipeline, and the third leakage confidence probability is calculated. A preset single-source probability anomaly threshold is set, and confidence probabilities exceeding the threshold are marked as suspected disturbances. Secondary feature discrimination is performed on the suspected disturbance data: if its time-frequency domain features match the leakage pattern, the original value is retained; if they do not match, it is determined to be an invalid disturbance, and the fusion weight of the data source is temporarily reduced or it is marked as invalid. Based on the pipe diameter, working pressure, burial depth and soil medium type of the target pipeline, the benchmark value of the working condition weight is determined, and the weight is adaptively corrected in combination with the confidence probability to obtain three sets of final weighting coefficients. The three sets of final weighted coefficients are normalized and weighted together with their corresponding confidence probabilities to obtain the comprehensive coefficient of pipeline leakage.

3. The method for leak detection and location in a water supply pipeline according to claim 1, characterized in that: Before the joint detection and early warning steps, there is also a step of macro-screening based on independent metering zones: dividing the water supply network into single-inlet closed independent metering zones, and collecting water supply, water consumption, instantaneous flow and pressure data for each zone; By using the minimum nighttime flow method and water balance calculation, the calculated minimum nighttime flow and water balance index are compared with preset thresholds. If they exceed the range, it is determined that there is a leak in the zone. Then, by controlling the branch valves and combining the zonal pipeline topology, the main water supply pipeline section in the zone is identified as the target pipeline, and joint detection and early warning steps are performed on the target pipeline.

4. The method for leak detection and location in a water supply pipeline according to claim 1, characterized in that: Before injecting tracer gas, select gases that are less dense than air, chemically inert, non-toxic and non-corrosive, and whose background concentration is below the detection limit as tracer gases. The injection method is as follows: after isolating and depressurizing the target pipeline, the gas is injected into the pipeline through the reserved opening, fire hydrant, or temporarily drilled air injection hole; Alternatively, injection holes can be drilled directly above the target pipeline to inject into the surrounding soil; The gas injection pressure and duration are adaptively adjusted according to the pipeline length, diameter, burial depth and soil type: the pressure when injecting gas into the pipeline is 0.05-0.3MPa and the duration is 3-30min per 100m. When injecting air into the soil, the pressure is 0.05-0.1 MPa and the duration is 2-4 hours per 100m.

5. A method for leak detection and location in water supply pipelines according to claim 1, characterized in that: When setting up detection points, first use a mobile gas detector to quickly inspect along the ground surface, or drill coarse test holes at large intervals of 3-5m to identify areas with abnormal concentrations. Then, in the abnormal area, fine test holes are drilled at small intervals of 0.5-1m, and the test holes penetrate the overburden layer to the depth of the pipe, with a safe distance between the bottom of the hole and the top of the pipe. Insert a breathable protective tube into the detection hole and mark the geographical coordinates.

6. The method for leak detection and location in a water supply pipeline according to claim 1, characterized in that: When detecting concentration, wind speed, wind direction, air temperature, air pressure, and surface humidity are collected simultaneously, and the detected concentration value is corrected based on these environmental parameters to eliminate concentration decay or drift caused by environmental factors.

7. A method for leak detection and location in water supply pipelines according to claim 1, characterized in that: The specific steps for processing concentration data through concentration distribution analysis and gas diffusion inversion are as follows: plot the concentration distribution curve with the distance of the detection point along the pipeline as the abscissa and the concentration after environmental correction as the ordinate, and identify all peak points. If there is only one peak point, the location of that point is corrected using the convection-diffusion model and then used as the leak point. If there are multiple peak points, the location and concentration values ​​of all peak points are used as input. Combined with pipeline burial depth, soil porosity, and soil diffusion coefficient, the least squares method or Bayesian inference is used to invert the convection-diffusion equation and output the most likely true leak location.

8. A method for leak detection and location in water supply pipelines according to claim 1, characterized in that: After determining the location of the leak, if the pipeline is a metal pipe section with a burial depth of ≤2m, then acoustic detection equipment is used to conduct acoustic detection near the peak point. The coordinates of the gas positioning are matched and compared with the coordinates of the acoustic positioning. The positioning deviation is corrected by weighted fusion to complete the dual verification.

9. A method for leak detection and location in a water supply pipeline according to claim 1, characterized in that: It also includes model iterative optimization: comparing each positioning result with the actual location of the leak point excavated, and calculating the positioning error; Based on the error value, the soil diffusion coefficient, the spacing of the detection points, and the gas injection parameters in the gas diffusion model are corrected; The data from previous positioning operations, as well as the multi-source data collected during the joint detection and early warning process and various probability coefficients, were used as training samples to conduct offline training and online updates for the leakage probability prediction model and the gain optimization model.

10. A method for leak detection and location in a water supply pipeline according to claim 1, characterized in that: The tracer gas is hydrogen, helium, or a mixture of both; The preset threshold is pre-calibrated using the statistical quantiles or ROC curve method of historical leaked samples.