A three-dimensional water network leakage point positioning detection method and system
Patent Information
- Application Number
- CN202611272145.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-21
- Publication Date
- 2026-09-18
AI Technical Summary
缺陷:(a)仍然依赖时间差测量,存在时差法的根本性问题;(b)对信噪比要求高,泄漏声波信号具有多模态、频散特点,使时间差和波速的确定精度误差较大;
(1)本发明对于泄漏的检测提出了分层架构策略,构建了两级泄漏识别体系:终端侧轻量化预警模型和云端精细化诊断模型,终端侧轻量化预警模型部署在边缘检测设备上,实现了实时预警和快速响应;云端模型部署在PC或服务器上,进行精细化检测与多维属性分析;
Smart Images

Figure CN122774572A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of water network leakage detection technology, and in particular to a method and system for locating and detecting leakage points in a three-dimensional water network. Background Technology
[0002] Leaks in building water supply networks and industrial pipeline systems can cause serious waste of water resources and economic losses. Timely detection and location of leaks are of great significance for saving resources and ensuring water supply security.
[0003] Existing methods for locating leaks can be categorized as follows: (1) Time Difference of Occupation (TDOA) The most commonly used method in existing technologies is the Time Difference of Arrival (TDOA)-based location method. Its principle is as follows: when a leak occurs, it generates an acoustic signal that propagates in two directions along the pipe, arriving at the sensors at the two ends at different times. By measuring the time difference Δt and using the speed of sound v, the location of the leak is calculated. Where L is the distance between the two sensors, and x is the distance from the leak point to one of the sensors.
[0004] This method has the following drawbacks: (a) Accurate capture of the signal's onset time is required: The time-difference method relies on accurately identifying the "onset time" of the leak signal. For transient leaks (such as pipe bursts), the arrival time of the shock wave can be identified; however, for persistent leaks (such as crack seepage or corrosion leaks), the signal persists without a clear onset time, making the time-difference method difficult to apply effectively. In practical applications, leaks in aging pipelines are often small, persistent leaks, which significantly limits the effectiveness of the time-difference method.
[0005] (b) High-precision time synchronization is required: Positioning accuracy requires time synchronization between sensors to reach the microsecond or even nanosecond level. For example, when the speed of sound in a solid medium is v=1500m / s, a positioning accuracy of 1 meter is required, which necessitates time synchronization of 0.67 microseconds. To ensure the simultaneity of leak signal detection at both ends of the pipeline, a GPS (Global Positioning System) clock is needed to ensure the consistency of the measured leak signals, but this measure increases costs. Weak GPS signals in indoor environments further increase the difficulty and cost of implementation. (c) Sound velocity uncertainty: The time difference and the sound wave propagation speed within the pipeline are the main parameters affecting positioning accuracy. When leaking sound waves propagate within the pipeline, they not only cause changes in pressure and temperature, but also undergo refraction and scattering, resulting in unstable propagation speeds. Sound velocity is affected by various factors such as temperature, pressure, pipeline material, pipe wall thickness, and medium flow rate; the sound velocity may differ in different pipe sections, requiring frequent calibration and increasing the difficulty of use.
[0006] (2) Dense sensor coverage method Another approach is to deploy a large number of sensors in the pipeline network to achieve positioning through dense coverage.
[0007] Principle: Sensors are installed at both ends of each pipe section or at each node. By comparing the signal strength of adjacent sensors, the location of the leak can be directly determined. defect: (a) Numerous sensors: Theoretically, a pipeline network with N nodes requires a certain number of sensors. For example, a pipeline network with 55 nodes and 54 pipe sections in a 6-story building would require 55 sensors. The more sensors there are, the higher the accuracy of leak location, but the number of sensors is limited by the actual pipeline environment and economic conditions. (b) Complex installation and maintenance: The installation of a large number of sensors requires a lot of manpower, the wiring is complicated (power lines, data lines), and the maintenance workload is large (sensor failure, periodic calibration). (c) Low cost performance: Although dense sensor deployment improves positioning accuracy, it increases costs exponentially, making it unsuitable for large-scale application.
[0008] (3) Correlation analysis method (cross-correlation method) The time difference is calculated using the peak position of the cross-correlation function of two sensor signals. Scholars both domestically and internationally have proposed various time delay estimation methods based on cross-correlation techniques, including cross-correlation, generalized cross-correlation, and generalized cross-correlation-Roth. Defects: (a) It still relies on time difference measurement, which has the fundamental problem of the time difference method; (b) It has high requirements for signal-to-noise ratio. The leakage sound wave signal has multi-mode and dispersion characteristics, which makes the accuracy of determining the time difference and wave velocity have large errors. (c) The cross-correlation function in complex pipe networks has multiple peaks, making it difficult to determine the actual leak point; (d) The computational load is large and the real-time performance is poor.
[0009] The fundamental contradiction of existing technology: the core problem: unknown source strength. The initial intensity (source intensity) A0 of the vibration signal generated at the leak point is unknown; it depends on factors such as the size of the leak orifice, the pressure inside the pipe, and the type of leak (crack, hole, corrosion). The signal intensity received by a single sensor is: Since A0 is unknown, the propagation distance cannot be deduced from A, making precise positioning difficult. Existing technologies attempt to circumvent this by: Time difference method: utilizing time difference (not dependent on amplitude), but requiring precise capture of the signal start time and high-precision time synchronization; Dense coverage method: narrowing the positioning range through spatial redundancy (a large number of sensors), but at a high cost; Neither of the two approaches fundamentally solves the problem of unknown source strength, and both face numerous limitations in practical applications. Summary of the Invention
[0010] The purpose of this invention is to overcome the shortcomings of the prior art by providing a method and system for locating and detecting leak points in a three-dimensional water network that is suitable for continuous leakage, does not require precise time synchronization, and does not depend on source intensity information.
[0011] The objective of this invention can be achieved through the following technical solutions: A method for locating and detecting leaks in a three-dimensional water network includes the following steps: Vibration signals collected from the three-dimensional water network; The vibration signal is subjected to statistical feature extraction in the time domain, frequency domain, and time-frequency domain, and multiple high-discrimination features are obtained by screening. The power spectrum data of the vibration signal is extracted, and a real-time early warning of leakage is performed by a pre-constructed terminal-side early warning model. The terminal-side early warning model extracts high-dimensional features from the power spectrum data through a convolutional neural network, concatenates them with multiple pre-selected statistical features, and then performs leakage detection through a multilayer perceptron. If the terminal-side early warning model detects a leak, the power spectrum and marginal spectrum of the vibration signal are extracted. A pre-constructed multimodal fusion neural network is then used for refined leak detection. This multimodal fusion neural network employs a graph encoder to extract and concatenate deep features from the power spectrum and marginal spectrum, forming a joint spectral representation. A statistical feature encoder is then used to encode and recalibrate the multiple high-discrimination features to obtain statistical features. The joint spectral representation and statistical features are fused to form a fused feature, which is then output through multiple parallel output heads to complete leak detection and leak type classification. If the refined detection determines a leak, the power in the characteristic frequency band is extracted based on the vibration signal collected from the three-dimensional water network. The characteristic frequency band is determined according to the type of leak, thereby locating the leak point.
[0012] Furthermore, the method uses an accelerometer to collect vibration signals from the three-dimensional water network, and the accelerometer is connected to the three-dimensional water network by magnetic attraction, bolt fixing, or adhesive bonding.
[0013] Furthermore, the statistical characteristics of the time domain dimension include: root mean square value, integral energy, kurtosis, and skewness; The statistical features of the frequency domain dimension include: spectral features, power spectral features, and Mel energy features. The spectral features include spectral centroid, spectral flatness, and subband bandwidth. The power spectral features include spectral flatness, spectral kurtosis, spectral skewness, spectral descent rate, root mean square bandwidth, main frequency band, peak frequency, and energy entropy. The statistical features of the time-frequency domain dimension include marginal spectral features, which include average instantaneous frequency, spectral flatness, bandwidth, energy concentration, energy entropy, peak frequency, spectral skewness, and spectral kurtosis.
[0014] Furthermore, the screening process for the high-discrimination features includes: The mutual information analysis method is used to evaluate the statistical dependency between each statistical feature and the target variable to obtain a mutual information score, wherein the target variable is whether leakage occurs; based on the mutual information score, screening and redundancy checks are performed to obtain the multiple high-discrimination features; The multiple high-discrimination features include: time-domain energy, spectral flatness, power spectral kurtosis, power spectral main band, time-domain kurtosis, marginal spectral entropy, power spectral flatness, spectral bandwidth, spectral centroid, power spectral bandwidth, and power spectral peak frequency.
[0015] Furthermore, the process of extracting the power spectrum data includes: calculating the power spectrum of the vibration signal in the time domain using a fast Fourier transform, and then inputting the truncated power spectrum into the terminal-side early warning model. The convolutional neural network is a one-dimensional convolutional neural network and is connected with pooling structures; The pre-screened statistical features are highly discriminative and low-redundancy statistical features selected through F-test and redundancy analysis. The multilayer perceptron includes multiple fully connected layers connected in sequence, which are used to perform nonlinear transformation and discrimination on the splicing results of high-dimensional features and statistical features, and finally output a binary classification result.
[0016] Furthermore, the extraction process of the power spectrum includes: calculating the power spectrum of the vibration signal through fast Fourier transform, and representing the frequency domain energy distribution in the form of a two-dimensional image based on the power spectrum to obtain the power spectrum. The extraction process of the marginal spectrum map includes: calculating the marginal spectrum of the vibration signal through Hilbert-Huang transform, and constructing the marginal spectrum map in the form of a two-dimensional image; The multimodal fusion neural network fuses the joint spectral representation and statistical features through a cross-modal attention fusion module. The cross-modal attention fusion module uses the joint spectral representation as the query and the statistical features as the key and value, and fuses them by learning the dynamic matching relationship between the joint spectral representation and the statistical features.
[0017] Furthermore, the parallel output head of the multimodal fusion neural network is also used for pressure level identification, leakage distance prediction, and valve status prediction. The loss function of the multimodal fusion neural network during training includes: For output heads with specific leakage distances and pressure levels, the mask mean square error is used as the loss function. The expression for the mask mean square error is: In the formula, For the mean square error of the mask, The valid number of samples is the set of samples whose label is not -1. Let i be the true label of the i-th sample. Let be the predicted value for the i-th sample; For the output header predicting leakage type and valve status, the mask classification cross-entropy is used as the loss function. The expression for the mask classification cross-entropy is: In the formula, The one-hot encoding of the true label of the i-th sample. For the number of categories, One-hot encoding of the predicted value for the i-th sample; The overall loss function of the multimodal fusion neural network is a weighted sum of the loss functions of each output head.
[0018] Furthermore, the process of locating the leak point includes: The obtained pipeline topology information includes pipe segment connection relationships, pipe segment lengths, node types, and candidate installation locations for sensors, which are used to collect vibration signals on the three-dimensional water network; Using the number of sensors and their corresponding candidate installation locations as variables, and minimizing the number of sensor collisions as the optimization objective, an optimization solution is obtained through a search strategy to obtain the minimum number of sensors and their installation locations. The collision between sensors is defined as the distance between the coordinate vectors of the energy ratio generated by two pipe segments where different sensors are located being less than a preset distance threshold. Based on the minimum number of sensors obtained and their installation locations, sensors are installed in the pipeline. A unique path from each pipe segment to each sensor is determined by searching and traversing the pipeline. For each pipe segment, it is assumed that there is a leak point. The power of each sensor is calculated based on the corresponding unique path, and the ratios are calculated in pairs to construct an energy ratio coordinate system and form a leak point energy ratio database. After a leak is detected, the power in the characteristic frequency band is extracted from the vibration signals of each sensor, and the ratios are calculated in pairs to construct the measured coordinates. The similarity between the measured coordinates and the energy ratio coordinates in the leak point energy ratio database is calculated, and the location of the leak point corresponding to the closest energy ratio coordinate is selected as the leak location result.
[0019] Furthermore, the expression for the optimization objective is: In the formula, For the set of sensor locations, For the set of all candidate installation locations, For the number of sensors, This is an indicator function that takes the value 1 when the condition is met, and 0 otherwise. This indicates the number of pipe segment pairs that are in a collision state. For sensors i The energy coordinate vector generated by the pipe segment in question, For sensors j The energy coordinate vector generated by the pipe segment in question, Distance threshold; The method, for the assumed leakage point, calculates the power of each sensor using the following expression: In the formula, For pipe section j Sensor when leakage occurs i power, The source power at the point of leakage. For pipeline attenuation coefficient, For pipe section j The leak occurred at the sensor. Path length, For pipe section j The leak occurred at the sensor. The product of the energy distribution coefficients of all nodes on the path, wherein the node energy distribution coefficients are determined based on the node type, geometric characteristics and pipeline parameters of the pipe segment, and the node types include two-way nodes, three-way nodes and four-way nodes.
[0020] The present invention also provides a system for implementing the above-described method for locating and detecting leaks in a three-dimensional water network, comprising: Vibration signal acquisition module, used to acquire vibration signals from a three-dimensional water network; The high-discrimination feature filtering module is used to extract statistical features from the vibration signal in the time domain, frequency domain, and time-frequency domain dimensions, and filter out multiple high-discrimination features. The real-time leakage early warning module is used to extract the power spectrum data of the vibration signal and perform real-time early warning for leakage detection through a pre-constructed terminal-side early warning model. The terminal-side early warning model extracts high-dimensional features from the power spectrum data through a convolutional neural network, concatenates them with multiple pre-selected statistical features, and then performs leakage detection through a multilayer perceptron. The refined leakage detection module is used to extract the power spectrum and marginal spectrum of the vibration signal after the early warning model on the terminal side identifies a leak. It then performs refined leakage detection using a pre-constructed multimodal fusion neural network. This multimodal fusion neural network employs a graph encoder to extract and concatenate deep features from the power spectrum and marginal spectrum to form a joint spectral representation. A statistical feature encoder is then used to encode and recalibrate the multiple high-discrimination features to obtain statistical features. Finally, the joint spectral representation and statistical features are fused to form a fused feature, which is then output through multiple parallel output heads to complete leakage detection and leakage type classification. The leak location module is used to extract the power in a characteristic frequency band based on the vibration signal collected from the three-dimensional water network after the refined detection determines the leak. The characteristic frequency band is determined according to the type of leak, thereby locating the leak point.
[0021] Compared with the prior art, the present invention has the following advantages: (1) This invention proposes a layered architecture strategy for leak detection, and constructs a two-level leak identification system: a lightweight early warning model on the terminal side and a refined diagnostic model on the cloud. The lightweight early warning model on the terminal side is deployed on the edge detection device to realize real-time early warning and rapid response; the cloud model is deployed on a PC or server to perform refined detection and multi-dimensional attribute analysis. The proposed terminal-side early warning model adopts a dual-path feature fusion architecture. On the one hand, high-dimensional features are extracted from the power spectrum data of vibration signals through a convolutional neural network. On the other hand, multiple pre-screened statistical features are weighted by F-test. After feature fusion, a multilayer perceptron is used for fast and real-time leakage detection. The proposed cloud-based refined diagnostic model employs a multimodal fusion neural network. It uses a power spectrum, marginal spectrum, and high-discrimination features as trimodal feature inputs. A graph encoder performs dual-path parallel extraction and channel fusion of the power spectrum and marginal spectrum. A statistical feature encoder adaptively recalibrates the high-discrimination features. An attention mechanism is used to fuse the outputs of the graph encoder and the statistical feature encoder, achieving dynamic weighted fusion of heterogeneous information. Finally, a parallel output head enables multi-target detection. This scheme integrates multiple representation capabilities of leakage signals in the frequency domain, time-frequency domain, and structured statistical features, maximizing the model's ability to identify leakage features and enhancing its generalization ability in complex scenarios.
[0022] (2) In the process of locating the leak point in this invention, by constructing an energy ratio, the leakage source strength in the formula is canceled out, so that the ratio result is only related to the path length difference and the node coefficient, and does not depend on the leakage source strength. The leakage location method of energy ratio coordinates constructed thereby no longer requires known or estimated source strength, does not require pre-calibration of leakage source characteristics, and is applicable to leaks of any size and type.
[0023] (3) The traditional time difference method for leak detection can only handle transient leaks and requires the signal start time; while the present invention detects leaks by analyzing the steady-state energy distribution, which is fully applicable to continuous leaks and can cover the most common types of leaks in practical applications, such as cracks and corrosion, and can detect small flow and early leaks.
[0024] (4) In the process of determining the number of sensors in this invention, the uniqueness of the path of the tree topology is used to avoid redundant coverage; through the energy ratio coordinate, each sensor provides not local information but global constraints, and finally the minimum sensor configuration is found through exhaustive optimization algorithm. Compared with the traditional solution, it can greatly save the number of sensors, reduce wiring costs, installation labor, maintenance workload, number of data acquisition channels and acquisition equipment costs; and it does not rely on time difference measurement, does not require synchronous sampling, and each sensor can collect independently, and can be loosely associated through timestamps.
[0025] (5) This invention utilizes the natural tree structure of the building water supply network, which has path uniqueness and predictability. Path uniqueness means that the path between any two points in the tree is unique, the propagation path from the leak point to the sensor is completely determined, and there is no multipath interference problem. Predictability means that energy attenuation only needs to consider the pipe segments and nodes on the unique path, without the need to deal with complex multipath superposition signals, the model is simple and robust. Based on this, the leak point location algorithm is implemented, with high location accuracy and strong scalability.
[0026] (6) The sensor (piezoelectric accelerometer) of the present invention is fixed by magnetic adsorption or mechanical clamps, and is directly attached to the outer wall of the pipe to detect the vibration of the pipe wall (without contact with water flow). It does not require drilling, does not damage the integrity of the pipe, and does not introduce new potential leakage points. It does not require water outage, has a short installation time, and can be installed during operation.
[0027] (7) The positioning accuracy of this invention is at the pipe segment level, that is, it can accurately identify which pipe segment the leak occurs on, but it cannot determine the precise location within the pipe segment. Specifically, since the leakage source intensity A0 is unknown, leaks at different locations within the pipe segment can be equivalent to leaks at the same location with different source intensities. The two produce the same energy ratio coordinates, so they are mathematically indistinguishable. This is an inherent characteristic of the method, not a defect.
[0028] For building water supply networks, after maintenance personnel arrive at the designated pipe section, they can achieve precise location through: visual inspection, local detection with a leak detector, and portable detector. The maintenance time and cost mainly depend on finding the problem area, rather than being accurate to the meter.
[0029] (8) The present invention is highly scalable and adaptable. It can be expanded according to the number of floors and the scale of the pipeline network. Only the amount of calculation needs to be increased. However, it can still be calculated quickly for large pipeline networks with hundreds of pipe sections. It can adapt to different buildings. Only the pipeline network topology needs to be input to automatically generate sensor configuration schemes and coordinate libraries. Different pipe materials can be used. The attenuation coefficient α can be determined by looking up a table or calibrating in advance according to the pipe material type. Attached Figure Description
[0030] Figure 1 This is a flowchart illustrating a method for locating and detecting leaks in a three-dimensional water network, as provided in an embodiment of the present invention. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0032] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0033] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0034] Example 1 like Figure 1 As shown, this embodiment provides a method for locating and detecting leaks in a three-dimensional water network, including the following steps: S1: Collect vibration signals from the three-dimensional water network; S2: Extract statistical features from the vibration signal in the time domain, frequency domain, and time-frequency domain, and select multiple high-discrimination features; S3: Extract the power spectrum data of the vibration signal, and perform real-time early warning for leakage detection through a pre-built terminal-side early warning model. The terminal-side early warning model extracts high-dimensional features from the power spectrum data through a convolutional neural network, concatenates them with multiple pre-selected statistical features, and then performs leakage detection through a multilayer perceptron. S4: If the terminal-side early warning model detects a leak, the power spectrum and marginal spectrum of the vibration signal are extracted. A pre-constructed multimodal fusion neural network is used for refined leak detection. The multimodal fusion neural network employs a graph encoder to extract and concatenate deep features from the power spectrum and marginal spectrum to form a joint spectral representation. A statistical feature encoder is used to encode and recalibrate multiple high-discrimination features to obtain statistical features. The joint spectral representation and statistical features are fused to form a fused feature, which is then output through multiple parallel output heads to complete leak detection and leak type classification. S5: If a leak is detected by fine-tuning, the power in the characteristic frequency band is extracted based on the vibration signal collected from the three-dimensional water network. The characteristic frequency band is determined according to the type of leak, thereby locating the leak point.
[0035] The following is a detailed description of each step: I. Signal acquisition process in step S1 Preferably, the vibration signal on the pipe of the three-dimensional water network is collected by an accelerometer, and the accelerometer is connected to the outer wall surface of the pipe by magnetic attraction, bolt fixing or adhesive bonding.
[0036] 1.1 Sensor Types and Installation Methods Key technical parameters of the sensor: Acceleration range: ±50g~±80g; Frequency response range: 0.1~15kHz (±3dB); Sensitivity: 50~100mV / g (voltage output type); Nonlinearity: ≤1%; Noise within bandwidth: ≤30µg / √Hz; Sampling frequency: 20kHz; Operating temperature range: -40~125°C; Protection rating: ≥IP65; Electrical interface: Supports analog output or digital communication (RS485 / Modbus RTU, etc.).
[0037] The above parameters cover the main frequency range of pipeline leakage vibration signals (0-5000Hz is the main frequency band), and the wide range design ensures that the sensor will not saturate its output under complex working conditions (such as when the pipeline is subjected to external mechanical impact or water hammer effect). Installation methods: Magnetic type: suitable for ferromagnetic pipe materials, easy to install and disassemble, suitable for temporary monitoring or inspection applications; Bolt fixing: the sensor is fixed to the outer wall of the pipe through the threaded hole, the installation is firm and reliable, suitable for long-term monitoring; Adhesive type: the sensor is pasted to the pipe surface using industrial adhesive, suitable for scenarios where drilling is not possible.
[0038] Sensor type description: This invention can employ either a piezoelectric accelerometer or a MEMS accelerometer, both of which can effectively acquire vibration signals from pipeline leaks. Piezoelectric sensors offer high sensitivity and wide bandwidth, making them suitable for precision measurement and prototype verification; MEMS sensors offer advantages such as small size, low power consumption, and low cost, making them suitable for large-scale distributed deployment. 1.2 Signal Source The signals collected in this invention originate from pipe wall vibrations caused by pipeline leaks. When a pipeline leaks, high-pressure fluid is ejected from the leak hole, rubbing and colliding with the pipe wall and the surrounding medium, generating sound waves / vibration signals. These vibration signals propagate along the pipe's axial and circumferential directions, forming measurable vibration acceleration signals on the pipe wall surface.
[0039] Signal characteristics: The leakage vibration signal contains multiple characteristic frequency components within the 0-5000Hz frequency range, and the frequency component distribution is relatively stable. The spectrum without leakage exhibits a relatively stable frequency distribution, while the presence of leakage results in significant frequency component changes and energy concentration. The intensity of the pipe wall vibration signal is related to factors such as the leakage orifice diameter, internal pipe pressure, and leakage type.
[0040] II. Statistical Feature Extraction in Step S2 Optionally, the screening process for high-discrimination features includes: using mutual information analysis to evaluate the statistical dependency between each statistical feature and the target variable to obtain a mutual information score, with the target variable being whether leakage occurs; and performing screening and redundancy checks based on the mutual information scores to obtain multiple high-discrimination features.
[0041] Feature extraction of leakage vibration signals is a crucial step in achieving accurate identification. This invention performs multimodal feature extraction on the acquired signals from three dimensions: time domain, frequency domain, and time-frequency domain, comprehensively characterizing the vibration characteristics of leakage events.
[0042] 2.1 Time-domain characteristics Time-domain features directly reflect the amplitude variation characteristics and statistical distribution patterns of vibration signals. This invention extracts the following time-domain statistical features: Root Mean Square (RMS): characterizing the overall energy level of the signal; Integrated Energy: reflecting the total energy of the signal; Kurtosis: describing the sharpness of the signal amplitude distribution, sensitive to impact signals; Skewness: reflecting the symmetry of the signal amplitude distribution. Among the time-domain features, the mutual information score of time-domain energy reaches 0.267, and the time-domain kurtosis score is 0.182, both showing strong discriminative ability.
[0043] 2.2 Frequency Domain Characteristics Frequency domain features reveal the energy distribution patterns of vibration signals at different frequency components. This invention calculates the spectrum and power spectrum based on Fourier transform (FFT) and extracts the following frequency domain features: (a) Spectral Features Spectral centroid: Characterizes the centroid location of the spectral energy distribution, reflects the dominant frequency of the signal, and has a mutual information score of 0.134; Spectral Flatness Measure (SFM): Measures the uniformity of spectral energy distribution, with a mutual information score as high as 0.250, making it an important discriminant feature; Subband bandwidth: Characterizes the bandwidth where spectral energy is concentrated, with a mutual information score of 0.159.
[0044] (b) Power Spectrum Features The power spectrum is obtained by squaring the amplitude of the spectrum, which better reflects the energy distribution of each frequency component. The extracted power spectrum features include: Spectral flatness: an index of the uniformity of the power spectrum energy distribution, with a mutual information score of 0.170; Spectral kurtosis: The sharpness of the power spectrum distribution, with a mutual information score of 0.218, which is a highly discriminative feature; Spectral skewness: A measure of the symmetry of the power spectrum distribution; Spectral roll-off: The percentage of total energy below a given frequency (e.g., 85% or 95%). Root Mean Square Bandwidth: The root mean square value of the power spectral bandwidth, with a mutual information score of 0.120; Main Frequency Band: The frequency range with the most concentrated energy. The mutual information score of the lower boundary of the main frequency band is 0.184. Peak Frequency: The frequency corresponding to the maximum power spectrum value, with a mutual information score of 0.106; Spectral Entropy: Characterizes the degree of disorder in the energy distribution of the power spectrum; In the power spectrum, the leak-free and leaky states show obvious morphological differences and are highly distinguishable.
[0045] (c) Mel energy characteristics Mel Frequency Cepstral Coefficients (MFCCs): These extract frequency features that conform to human hearing characteristics by performing a nonlinear transformation on the power spectrum using a Mel filter bank, making them suitable for characterizing complex acoustic signals.
[0046] 2.3 Time-Frequency Domain Characteristics Time-frequency domain analysis can simultaneously characterize the evolution of a signal in both time and frequency dimensions, making it suitable for processing non-stationary signals. This invention uses the Hilbert-Huang Transform (HHT) to calculate the marginal spectrum and extract time-frequency domain features: Marginal Spectrum Features: The marginal spectrum is a frequency domain representation obtained by integrating the time spectrum over the time axis, reflecting the cumulative energy distribution of each frequency component of the signal throughout the entire time period. Extracted marginal spectral features include: (a) Average instantaneous frequency: equivalent to the centroid of the marginal spectrum, characterizing the centroid of the energy distribution in the time-frequency domain. (b) Spectral flatness: the uniformity of energy distribution at the margins of the spectrum. (c) Bandwidth: The bandwidth of the frequency band where the marginal spectral energy is concentrated. (d) Energy Concentration Ratio: Corresponding to the main frequency band characteristics, it characterizes the degree of energy concentration. (e) Energy entropy: The mutual information score of the marginal spectral entropy is 0.178, showing strong discriminative ability. (f) Peak Frequency: The frequency corresponding to the maximum value of the marginal spectrum. (g) Spectral Skewness: The symmetry of the marginal spectral distribution. (h) Spectral kurtosis: The sharpness of the marginal spectral distribution. In the marginal spectrum, the leak-free and leaky states also exhibit significant morphological differences. Time-frequency domain features can capture the transient changes of the leaking signal, providing supplementary information beyond the frequency domain features.
[0047] 2.4 Feature Optimization and Dimensionality Reduction The extracted multidimensional features contain some redundancy and low discriminative power. This invention uses mutual information analysis to evaluate the statistical dependency between features and the target variable (leaked / non-leaked), and removes features with low correlation and high redundancy. Criteria for determining mutual information values: MI ≥ 0.2: Strongly correlated features, prioritized for inclusion in the model; 0.1≤MI<0.2: Moderately relevant features, possessing discriminative ability; MI < 0.1: Weak correlation characteristic, can be considered for rejection.
[0048] After mutual information scoring and redundancy testing, 11 high-discrimination features were ultimately retained as model inputs, as shown in Table 1.
[0049] Table 1 This feature set covers time-domain energy, frequency-domain morphology, and time-frequency domain entropy characteristics. It has strong correlation and low redundancy, making it suitable as an input variable for leakage identification models.
[0050] III. Leakage Identification Model in Steps S3 and S4 This invention employs a layered architecture strategy, constructing a two-level leakage identification system: a lightweight early warning model on the terminal side and a refined diagnostic model in the cloud. The terminal model is deployed on edge detection devices to achieve real-time early warning and rapid response; the cloud model is deployed on PCs or servers for refined detection and multi-dimensional attribute analysis. This section first introduces the architecture and detection process of the terminal-side early warning model.
[0051] 3.1 Terminal-side early warning model In the processing of the terminal-side early warning model, the extraction process of power spectrum data includes: calculating the power spectrum of the vibration signal in the time domain through fast Fourier transform, and inputting it into the terminal-side early warning model after truncating the power spectrum. A convolutional neural network is a one-dimensional convolutional neural network with pooling structures connected to it; The pre-screened statistical features are highly discriminative and low-redundancy statistical features selected through F-test and redundancy analysis. A multilayer perceptron consists of multiple fully connected layers connected in sequence, used to perform nonlinear transformation and discrimination on the concatenation results of high-dimensional features and statistical features, and finally outputs a binary classification result.
[0052] Specifically, the implementation details of this embodiment are as follows: (a) Model Architecture Design The terminal early warning model is based on a fusion structure of 1D-CNN and MLP, and is specifically adapted to resource-constrained embedded platforms such as STM32. The architecture adopts a serial feature extraction and fusion strategy: first, a one-dimensional convolutional neural network (1D-CNN) is used to extract deep frequency domain features from the power spectrum; then, the high-dimensional features extracted by the CNN are concatenated with five pre-selected statistical features; and finally, the data is fed into a multilayer perceptron (MLP) for leakage detection.
[0053] Input data: To improve FFT computation efficiency and meet the resource constraints of the embedded platform, the input signal was truncated to 8192 points. Although the original signal was windowed, the corresponding short-time power spectrum still showed obvious structural differences between non-leaking and leaking samples, demonstrating good distinguishability. The model's input consists of two parts: Power spectrum: The power spectrum of the original time-domain signal (8192 points) is calculated by Fast Fourier Transform (FFT), and the first 4096 points are retained as the input of 1D-CNN.
[0054] Statistical characteristics: Five high-discrimination, low-redundancy characteristic indicators were selected through F-test and redundancy analysis, including: Spectral Flatness, Power Spectral Bandwidth, Power Spectral Skewness, Power Spectral Kurtosis, and Time RMS.
[0055] Network structure: 1D-CNN Feature Extractor: Employs a multi-layer one-dimensional convolution and pooling structure to extract local patterns and high-order abstract features of the power spectrum layer by layer, capturing the deep patterns of frequency domain energy distribution and outputting a fixed-dimensional deep feature vector. Feature fusion layer: The deep feature vector output by 1D-CNN is concatenated with five statistical features that have been weighted by the F-test to form a multimodal fusion representation; MLP classifier: It consists of multiple fully connected layers, which perform nonlinear transformation and discrimination on the fused features, and finally output a binary classification result (leaking / non-leaking).
[0056] (b) Training strategies This model is positioned as an early warning module on the terminal side. Its core responsibility is to promptly upload the data for the current period to a PC or cloud server upon detecting a suspected leak, so that a more complex and refined model can make further judgments. Therefore, in terms of training strategy, this model focuses more on improving recall to minimize the risk of false negatives, while allowing for a certain degree of false positives.
[0057] Evaluation metric: Accuracy: The proportion of correctly classified samples out of the total sample; Precision: The proportion of samples predicted as leaks that actually leak. Recall: The proportion of actual leaked samples that are correctly identified (a priority metric); F1 score: the harmonic mean of precision and recall, a comprehensive evaluation metric; To enhance the robustness and generalization ability of the model under small sample conditions, a four-fold cross-validation strategy was used for evaluation.
[0058] (c) Noise robustness verification To verify the reliability of the model in real-world complex environments, the leakage detection capability of the 1D-CNN and MLP fusion model under different noise conditions was systematically evaluated. Gaussian white noise environment: The noise signal-to-noise ratio was set to 5dB, 10dB, 15dB, and 20dB, respectively. The experimental results are shown in Table 2. Table 2 Performance analysis: It maintained good performance even in a high-noise environment (5dB), with an accuracy of 70.1%, an F1 score of 0.817, and an AUC of 0.844, demonstrating that the model has a certain noise resistance. With the increase in signal-to-noise ratio, the model performance improved rapidly, recovering to an F1 score of 0.864 and an AUC of 0.994 under 10dB noise, demonstrating good robustness in transition. When the signal-to-noise ratio reaches 15dB or more, the model performance is almost the same as that in the case of no noise, the accuracy is close to 99%, the F1 value exceeds 0.99, and the AUC reaches 0.999 or more, indicating that the model performs extremely robustly under medium-to-high signal-to-noise ratio conditions. The recall rate remained at 100% under all noise conditions, ensuring no leaks were missed. Sinusoidal interference signal environment: The amplitude of the sinusoidal interference was set to 5%, 10%, and 15% of the signal amplitude. The experimental results are shown in Table 3. Table 3 Performance analysis: The model performs more stably for sinusoidal interference signals; With a 5% sinusoidal amplitude perturbation, the model can achieve almost non-destructive leak detection performance (accuracy and F1 score both exceed 0.999). Even when the sine amplitude is increased to 15%, the model still maintains performance almost identical to that in a noise-free environment, with an AUC of 1.0, indicating that the model has a strong ability to suppress periodic disturbances. Based on the combined experimental results of Gaussian noise and sinusoidal interference, the terminal warning model can still maintain a high recognition accuracy and 100% recall rate in complex noise environments, demonstrating good practicality and robustness.
[0059] 3.2 Cloud-based refined diagnostic model Optionally, in the process of processing the cloud-based refined diagnostic model, the power spectrum extraction process includes: calculating the power spectrum of the vibration signal through fast Fourier transform, and representing the frequency domain energy distribution in the form of a two-dimensional image based on the power spectrum to obtain the power spectrum map; The process of extracting the marginal spectrum includes: calculating the marginal spectrum of the vibration signal through Hilbert-Huang transform, and constructing the marginal spectrum in the form of a two-dimensional image; The multimodal fusion neural network fuses joint spectral representations and statistical features through a cross-modal attention fusion module. The cross-modal attention fusion module uses the joint spectral representation as the query and the statistical features as the key and value, and fuses them by learning the dynamic matching relationship between the joint spectral representation and the statistical features.
[0060] Specifically, the implementation details of this embodiment are as follows: (a) Model Architecture Design To achieve accurate identification of leak events and multi-dimensional attribute judgment (such as leak location, pressure level, and leak type), this invention proposes a multimodal fusion neural network architecture, HybridFusionNet. This model integrates multiple representation capabilities of leak signals in the frequency domain, time-frequency domain, and structured statistical features, aiming to maximize the model's ability to identify leak features and enhance its generalization ability in complex scenarios. Unlike the terminal-side early warning model, the cloud-based model processes a longer signal segment (131,072 points), extracts richer feature dimensions, and achieves intelligent processing of the entire process of leak detection, location, pressure prediction, and type classification through multi-task learning. (b) Multimodal feature input HybridFusionNet integrates three heterogeneous information sources to achieve joint modeling of the spatial-frequency-structural information of the same leakage event: Power spectrum: The power spectrum calculated by FFT transformation is represented as a two-dimensional image showing the frequency domain energy distribution. Leakage events exhibit distinct spectral patterns in the power spectrum from different frequency analysis perspectives, providing good visual differentiation. Marginal spectrum: The marginal spectrum, calculated using the Hilbert-Huang transform (HHT), reflects the cumulative energy distribution of each frequency component of the signal over the entire time period. The marginal spectrum and the power spectrum exhibit different frequency domain characteristics, providing complementary spectral information. Structured statistical features: 11 highly discriminative features selected through mutual information testing, including time-domain energy, spectral flatness, power spectral kurtosis, and marginal spectral entropy, which numerically distinguish different leakage states. The fusion of the three types of features achieves the complementary advantages of image-level deep features and structured statistical features, enabling a more comprehensive characterization of the multidimensional nature of leakage events.
[0061] (c) Network architecture design HybridFusionNet employs a multi-branch encoder-fusion-decoder architecture, including a graph encoder, a statistical feature encoder, a cross-modal fusion module, and a multi-task output head. Graph encoder: It uses a pre-trained visual model to extract deep information. It can extract graph features through EfficientNet-B0 to obtain power spectrum and marginal spectrum.
[0062] Dual-path parallel extraction: Feature extraction is performed on the power spectrum and the marginal spectrum separately, and a parameter sharing mechanism is used to reduce the risk of overfitting; Feature splicing: The two spectral features are spliced along the channel dimension to form a joint spectral representation; Transformer Encoding: The concatenated features are input into the Transformer Encoder to model non-local time-frequency correlations in the graph, capturing more complex long-range dependencies and pattern evolution; Transformer's self-attention mechanism can establish correlations between frequency components globally, effectively capturing the global characteristics of leaked signals. Statistical Feature Encoder: Embedding Modeling of Structured Features Statistical features are encoded using a multilayer perceptron (MLP), with an internal Squeeze-and-Excitation (SE) module to enhance the response of important features and automatically suppress redundant feature dimensions. The SE module adaptively recalibrates features through a channel attention mechanism, enabling the network to learn the importance weights of different features. This module retains the intuitive description of leakage behavior by handcrafted features while maintaining a lightweight design. Modal fusion strategy: Cross-modal attention mechanism: To break down the barriers between modalities, a Cross-Attention fusion module is introduced. This mechanism uses graph features as the primary query and statistical features as the key and value. By learning the dynamic matching relationship between graph features and structured features, it achieves deep interaction and weighted fusion of information. The calculation process for cross-attention is as follows: in For spectral features, and For statistical characteristics, This is the feature dimension. This approach has been proven to effectively improve the accuracy and robustness of decision-making in multimodal tasks. Multi-task output design: The final fused features are processed through multiple parallel output heads, each completing one of the following sub-tasks: Leak detection (binary classification): Determines whether a leak event exists. Distance prediction (regression): Predicts the relative distance between the leak point and the detection sensor; Pressure level identification (classification / regression): Identify the current pressure level of the pipeline; Leakage type classification (multi-classification): distinguishes different leakage modes such as continuous leakage and sudden leakage.
[0063] This multi-task collaborative learning mechanism facilitates feature sharing and regularization, effectively improving the performance of the main task (leakage detection) while expanding the model's practical applications.
[0064] (d) Loss Function and Training Strategy Multi-task joint learning and masking mechanism: This invention employs a multi-task joint learning strategy to construct a multi-output neural network model with classification and regression capabilities. The primary task is binary classification between leaks and non-leaks, while the labels for other tasks (such as relative distance, pressure level, and leak type) are missing in non-leaking samples. Indiscriminately including these labels in loss calculations would interfere with the training process. Therefore, this invention designs and introduces two types of custom loss functions: Masked Mean Squared Error (MSE): Used for regression tasks such as relative propagation distance and pressure level, it ignores invalid samples with a true label of -1.0 and calculates the mean squared error only for valid samples, thus improving training stability. in The number of valid samples, where valid represents the set of samples whose label is not -1.0.
[0065] Masked Cross-Entropy (CCE): Used for multi-classification tasks involving leakage type and valve opening angle. It utilizes a one-hot encoding masking mechanism to avoid interference from missing labels in loss calculation. in For the number of categories, One-hot encoding for the actual label. Overall loss function: The loss function configuration during model training covers five sub-tasks: in: Leakage event identification (binary classification, using binary_crossentropy); , Distance and stress prediction (regression, using masked_mse); , Leakage type and valve angle identification (multi-classification, using masked_cce); The loss weights are set through hyperparameter search and are used to dynamically balance the gradient effects between different tasks.
[0066] (e) Model performance Under the current optimal combination of hyperparameters, the model exhibits good convergence and robustness during the training and validation phases. Training process performance: The total loss of the model continued to decrease, and the performance indicators of all five sub-tasks showed an improving trend; the training curve was smooth and there were no obvious oscillations, indicating that the model training was stable; the change trend of the validation set loss was consistent with that of the training set loss, and no obvious overfitting phenomenon was observed.
[0067] The performance metrics of the validation set are shown in Table 4.
[0068] Table 4 Performance Analysis: Leakage detection task: The model achieved 100% accuracy on both the training and validation sets, indicating that the model has a very strong leakage detection capability; Leakage type classification: The validation accuracy reached 95%, demonstrating the model's good ability to distinguish different leakage modes; Valve angle prediction: The verification accuracy reached 86%, indicating that the model can effectively predict pipeline state parameters; Overall, the model has initially demonstrated its ability to model the multivariate response of complex pipeline networks, showing its potential in multi-task collaborative modeling. The multimodal fusion strategy and multi-task learning mechanism effectively enhance the model's comprehensive analytical capabilities, laying a solid foundation for subsequent improvements in distance regression accuracy and the development of localization algorithms.
[0069] (f) Testing process The complete detection process of the cloud-based refined diagnostic model is as follows: Data reception: Receive the raw data (long signal segment) of the suspected leakage signal uploaded by the terminal device. Multimodal feature extraction: calculate the power spectrum and convert it into a two-dimensional spectrum; calculate the marginal spectrum and convert it into a two-dimensional spectrum; extract 11 structured statistical features.
[0070] Spectral feature encoding: Power spectrum and marginal spectrum are input into EfficientNet-B0 to extract deep features, and global time-frequency relationship is modeled by Transformer Encoder.
[0071] Statistical feature encoding: 11 statistical features are input into the MLP+SE module for encoding and recalibration.
[0072] Cross-modal fusion: fusing map features and statistical features through the Cross-Attention mechanism.
[0073] Multi-task reasoning: It integrates features and inputs five task heads in parallel, and outputs: leakage / non-leakage judgment, leakage point distance estimation, pipeline pressure level, leakage type identification, and valve status prediction.
[0074] Output: Returns a comprehensive leak diagnosis report, including multi-dimensional information such as whether a leak has occurred, the location of the leak, and the characteristics of the leak.
[0075] IV. The process of locating the leak point in step S5 The process of locating the leak point includes: The obtained pipeline topology information includes pipe segment connection relationships, pipe segment lengths, node types, and candidate installation locations for sensors used to collect vibration signals on the pipeline. Using the number of sensors and their corresponding candidate installation locations as variables, and minimizing the number of sensor collisions as the optimization objective, an optimization solution is obtained through a search strategy to obtain the minimum number of sensors and their installation locations. The collision between sensors is defined as the energy ratio generated by two pipe segments located at different sensors and the distance between their coordinate vectors is less than a preset distance threshold. Based on the minimum number of sensors and their installation locations, sensors are installed in the system. A unique path from each pipe segment to each sensor is determined by searching and traversing the system. For each pipe segment in the system, it is assumed that there is a leak point. The power of each sensor is calculated based on the corresponding unique path, and the power ratio is calculated in pairs to construct an energy ratio coordinate system and form a leak point energy ratio database. After a leak is detected, the power in the characteristic frequency band is extracted from the vibration signals of each sensor, and the ratios are calculated in pairs to construct the measured coordinates. The similarity between the measured coordinates and the energy ratio coordinates in the leak point energy ratio database is calculated, and the location of the leak point corresponding to the closest energy ratio coordinate is selected as the leak location result.
[0076] Specifically, the implementation details of this embodiment are as follows: 4.1 Theoretical Basis (1) Vibration signal propagation attenuation model (a) Amplitude attenuation characteristics When vibration signals generated by a leak propagate through a pipeline, the vibration amplitude (acceleration, velocity, or displacement) gradually attenuates as the propagation distance increases. This attenuation of vibration amplitude can be described using an exponential decay model: in: For the distance of transmission The vibration amplitude at that location, The initial vibration amplitude at the leak source. This is the attenuation coefficient, which is related to the pipe material, pipe diameter, wall thickness, fluid medium, and frequency. This represents the signal propagation distance.
[0077] Physical mechanisms of amplitude attenuation: When a vibration signal propagates in a pipe, mechanical energy is gradually lost and converted into other forms of energy. The main reasons include: internal material damping: the viscoelasticity of the pipe material causes vibration energy to be converted into heat energy through intermolecular friction; geometric diffusion: the vibration wave diffuses in three-dimensional space, reducing the energy density per unit area; interface dissipation: energy coupling loss between the pipe wall and the surrounding medium (air, soil, building structure); nodal reflection: reflection occurs at pipe nodes, and some energy returns in the form of reflected waves, resulting in a reduction in transmitted energy.
[0078] (b) Power attenuation characteristics In practical applications, sensors acquire vibration acceleration signals, and signal power is typically used as a measure of vibration intensity. Signal power is defined as the time average of the square of the signal amplitude: in It is a time-domain vibration signal. For signal duration, This represents the number of sampling points. Since power is proportional to the square of amplitude ( The power attenuation law is as follows: in Let be the initial signal power at the leakage source. The power attenuation exponent is... The decay rate is faster than the amplitude decay.
[0079] This invention uses signal power (or its logarithmic form) as the core metric for leak location algorithms.
[0080] (c) Frequency invariance Unlike amplitude attenuation, the frequency components of leakage vibration signals remain essentially unchanged as they propagate through the pipeline. Studies have shown that within the 0-5000Hz frequency range, longitudinal and transverse waves in the pipeline exhibit minimal dispersion, and their frequency components remain relatively stable.
[0081] The physical principle of constant frequency: Frequency is determined by the source: Frequency is an inherent property of the leakage source and is determined by physical mechanisms such as fluid turbulence, jet vibration, and pipe wall resonance; Linear propagation medium: In the low-frequency range, the pipe behaves as a linear system. The core characteristic of a linear system is that the output frequency is equal to the input frequency, and no new frequency components are generated. Energy loss is broadband: the damping, dissipation and other energy loss mechanisms of the pipeline have a similar degree of attenuation for each frequency component. The amplitude of all frequencies decreases proportionally, but the frequency itself and the shape of the spectrum remain basically unchanged.
[0082] Practical significance: Frequency invariance provides a theoretical basis for leakage identification based on frequency domain features. Signals collected from different sensor locations have similar spectral structures, which facilitates feature extraction and pattern recognition.
[0083] Frequency domain characteristics (such as spectral flatness, power spectral kurtosis, marginal spectral entropy, etc.) can serve as effective criteria for leak detection.
[0084] The amplitude or power information is used to locate leaks by comparing the power attenuation of different sensors to infer the location of the leak.
[0085] (2) Node energy allocation model (a) Fluctuation at the node When vibration signals propagate to pipe joints (such as elbows, tees, crosses, etc.), reflection and transmission occur due to impedance discontinuities at the joints. The energy of the incident wave is distributed to each branch in a certain proportion: part of the energy returns as reflected waves, and part of the energy continues to propagate to the connected pipe sections as transmitted waves.
[0086] Drawing on wave dynamics and impedance matching theory, the energy (power) distribution ratio at a node depends on the node's geometry (connection angle, number of branches) and the characteristic impedance of each branch.
[0087] (b) Energy distribution coefficients for different node types Based on the common node types and their geometric characteristics in pipeline networks, the energy (power) distribution patterns are as follows: a) Two-way junction: 90° bend: The signal is reflected and refracted at the bend, and the transmitted power is about 0.9 times the incident power (i.e., 10% energy loss). 180° straight-through (straight pipe connection): good impedance matching, the transmitted power is about 1.0 times the incident power (power loss is almost zero, only attenuation along the path is considered).
[0088] b) Tee junction Two 90° branches: The incident power is distributed to two vertical branches, and the transmitted power of each branch is approximately 0.425 times the incident power (considering energy shunting and reflection losses). One 180° branch + one 90° branch: The transmission power in the 180° straight direction is about 0.75 times, the transmission power in the 90° vertical direction is about 0.20 times, and the reflection and dissipation power is about 0.05 times.
[0089] c) Cross junction One 180° branch + two 90° branches: the transmitted power in the 180° straight direction is about 0.65 times, the transmitted power in each 90° vertical direction is about 0.15 times, and the reflected and dissipated power is about 0.05 times.
[0090] The energy distribution coefficients mentioned above are based on pipeline acoustic theory and experimental measurement data. In practical applications, they can be modified according to specific pipeline parameters (pipe diameter, wall thickness, material, fluid pressure, etc.).
[0091] (c) Applications in localization algorithms In leak location algorithms, given the pipeline topology and node types, the cumulative attenuation coefficients along the path from the leak point to each sensor can be calculated, including: Friction decay: exponential decay of each pipe section ; Node decay: the product of the energy distribution coefficients of each node; By establishing a mathematical relationship between the sensor power measurement and the leakage source power, and combining the observations from multiple sensors, the location and intensity of the leakage source can be deduced.
[0092] (3) Uniqueness of tree topology path (a) Definition and characteristics of tree topology Building water supply networks typically employ a tree topology, where the main water supply pipe extends to each floor and user branch, forming a loop-free tree network. Tree topologies have the following basic characteristics: Acyclicity: There is only one unique path between any two nodes, and there are no closed loops; Hierarchical structure: A clear hierarchical relationship is presented from the root node (main water supply source) to the leaf node (end user); Connectivity: All nodes are connected through branches, forming a connected graph.
[0093] (b) Principle of Path Uniqueness In a tree topology, the path between any two nodes is uniquely determined. This property can be rigorously proven from a graph theory perspective: Suppose there are two distinct paths from node A to node B. and Then the path and This forms a closed loop; this contradicts the definition of a loopless tree; therefore, the path between any two nodes must be unique.
[0094] (c) Application of path uniqueness in leak location The uniqueness of the path provides an important theoretical basis and computational convenience for locating leaks in pipeline networks, as detailed below: Signal propagation path determination: The signal propagation path from the leak point to any sensor is unique and can be clearly traced through the topology.
[0095] Unique node sequence: The sequence of nodes and pipe segments through which the signal passes is determined, which facilitates the calculation of cumulative attenuation.
[0096] Traceable energy distribution: Based on the energy distribution coefficients of each node along the path and the attenuation coefficients of each pipe segment, a deterministic mathematical model can be established to infer the location and intensity of the leak source from the sensor measurements.
[0097] Mathematical expression: For the leak point To the sensor The only path, the power measured by the sensor is: in: For the leakage source power, For the first on the path Energy distribution coefficient of each node The total propagation distance from the leak point to the sensor. This represents the set of nodes on a unique path.
[0098] Due to the uniqueness of the path, once the network topology is established, except for the above formula... All parameters outside the leak location are determined. This is the theoretical basis of the localization algorithm in this invention.
[0099] 4.2 Energy Ratio Coordinate Method because The power value of a single sensor is unknown and cannot be used for positioning. However, consider the power ratio of two sensors: Simplifying, we get: Key finding: Unknown source strength in the power ratio I got invited out.
[0100] ratio Depends only on: ① The difference in path length between the two sensors and the leak point ( ); ② The ratio of node attenuation coefficients on the two paths ( ).
[0101] Both of these quantities are uniquely determined by the location of the leak and the topology of the pipeline network, and are independent of the source strength.
[0102] Energy ratio coordinate vector: For A sensor can be constructed Each independent energy ratio is defined as an energy ratio coordinate vector: in: , .
[0103] this dimensional vector The coordinates of the leak location have the following properties: Location uniqueness: Different leak locations generate different coordinate vectors (in a tree topology); Source strength independence: Coordinates are unaffected by the strength of the leakage source. The impact; Predictability: Given the pipeline topology, sensor locations, and leak locations, the coordinates can be calculated accurately; Measurability: By measuring the power of each sensor, the measured coordinates can be calculated.
[0104] 4.3 Positioning accuracy: Pipe section level It should be noted that the positioning accuracy of this method is at the pipe segment level (edge level), meaning it can accurately identify which pipe segment the leak occurred on, but cannot determine the precise location of the leak within the pipe segment. Cause analysis: Consider leaks occurring at different locations within the same pipe segment. Let the distance from the leak point to a certain end of the pipe segment be... The source strength is If the leak point moves to a distance of At that point, but at the same time the source strength becomes Therefore, the energy coordinates produced by these two cases are exactly the same.
[0105] Mathematical expression: position Source intensity The leak, and its location Source intensity The leakage resulted in all sensors having the same energy ratio.
[0106] Physical explanation: Because the source strength is unknown, the location information within the pipe segment is "hidden" in the uncertainty of the source strength, and the two cannot be separated. This is an inherent characteristic of the method and a mathematically inevitable result of the constraint of unknown source strength.
[0107] Engineering significance: For building water supply networks, pipe sections are typically 2-6 meters long, and the positioning accuracy at the pipe section level is sufficient for maintenance work. After arriving at the designated pipe section, maintenance personnel can quickly and accurately locate the pipe within the section area through visual inspection (exposed pipes), listening rods (concealed pipes), or portable testing equipment.
[0108] 4.4 Implementation of the Positioning Algorithm (1) Offline configuration stage Before deploying the system, the optimal placement of the sensors must first be determined. This is a combinatorial optimization problem, with the goal of achieving unique identification of all pipe segments using the fewest possible number of sensors. Step 1: Obtain pipeline topology information: pipeline segment connection relationship (edges and nodes), pipeline segment length, node type (T-type, L-type, cross-type, etc.), and candidate locations where sensors can be installed.
[0109] Step 2: Define the optimization problem Collision definition: If the ratio of the energy generated by two different pipe segments is less than a threshold, then the collision occurs when the distance between their coordinate vectors is less than a threshold. (Considering measurement errors and calculation accuracy), they are said to have collided, meaning they cannot be distinguished by coordinates. Two pipe sections in the pipeline network and The coordinate vectors are respectively and The collision determination condition is: Cost function: in This is an indicator function that takes the value 1 when the condition is met, and 0 otherwise. This indicates the number of pipe segments in a collision state.
[0110] Optimization goal: in For the set of sensor locations, For the set of all candidate locations, This represents the number of sensors.
[0111] when At that time, the coordinates of all pipe segments can be distinguished in pairs, achieving completely unique positioning. Step 3: Determine the range of sensor quantity The lower bound for the number of sensors is determined by the coordinate dimension. For A sensor, which can be constructed 3D coordinate vector. Theoretically, The number of discrete points that can be distinguished in 3D space is limited, therefore the number of sensors needs to be determined based on the network size (total number of pipe segments). The structural characteristics were determined. General search strategy: From smaller Value start (e.g.) ); gradually increase Calculate each The optimal configuration under the given value; when it first appears At that time, record the Values and corresponding configurations.
[0112] Step 4: Solve the optimization problem. This problem is a combinatorial optimization problem, and the solution methods include: (a) Exhaustive search method Traverse all possible sensor configuration combinations Calculate for each configuration Find the globally optimal solution. Purpose: Suitable for small-scale problems (few candidate locations); used to verify the solvability of a problem: confirming that, given... Does the value exist? The configuration serves as a performance benchmark for other algorithms.
[0113] Limitations: The computational complexity is O(n log n). The growth rate increases exponentially with the size of the problem; for large-scale pipeline networks (such as...) The calculation time can be as long as several hours.
[0114] (b) Constraint-based heuristic search By utilizing the structural characteristics of the pipeline network (such as layered structure and symmetry) to set constraints, the search space can be reduced. Example of constraint strategy: deploy at least one sensor on each floor (taking advantage of the hierarchical characteristics of the pipeline network); prioritize the deployment of sensors at pipeline branch points or convergence points; avoid over-concentration of sensors in a certain area.
[0115] Advantages: The search space can be reduced by more than 90%; suitable for pipe networks with obvious structural features.
[0116] Step 5: Output the optimal sensor deployment plan After the solution is completed, the output includes: the minimum number of sensors. (satisfy The smallest Value); sensor installation location (pipe segment number, floor, specific location coordinates); potential collision pipe segment pairs (e.g. hour).
[0117] Step 6: Robustness Verification Considering the uncertainties in practical applications, a robustness analysis is performed: Parameter perturbation test: attenuation coefficient There is an error of ±10%; nodal energy distribution coefficient There is an error of ±15%; signal power measurement has noise of ±3dB; under these disturbance conditions, the configuration scheme is verified. Whether to keep it at 0 or an acceptable small value.
[0118] Sensor failure test: Simulate the failure of one sensor and calculate the remaining... The positioning performance of each sensor is evaluated to assess the system's fault tolerance.
[0119] Example Case: The pipeline network (54 pipe segments) of a 6-story residential building was optimized, and the candidate locations included the midpoints of all pipe segments (54 candidate locations), as shown in Table 5.
[0120] Table 5 The results show that at least seven sensors are needed for completely unique localization of the pipeline network. Using constraint heuristics or genetic algorithms can significantly reduce computation time while achieving the same optimization effect. Phase Two: Establishing a Coordinate Database After determining the sensor locations, an energy coordinate database for the pipeline network is established. Step 1: Path Calculation Using a tree traversal algorithm (Breadth-First Search or Depth-First Search), calculate the unique path from each pipe segment to each sensor, and record: the total path length. The nodes along the path and their types; the propagation direction corresponding to each node (straight 180° or branch 90°).
[0121] Step 2: Coordinate Calculation For each pipe segment Assuming the leak occurs at its midpoint, calculate the power to each sensor: in: This is the assumed source power (it can be set to 1 because it will be canceled out). This is the pipeline attenuation coefficient; For from the pipe section Midpoint to sensor Path length; It is the product of the energy distribution coefficients of all nodes on the path.
[0122] Calculate the energy ratio coordinates: because It will be cancelled out; this can be set during calculation. .
[0123] Step 3: Create a database Storage mapping relationship: The database structure example is shown in Table 6.
[0124] Table 6 This database forms a coordinate library for online matching.
[0125] (2) Online positioning stage Once the detection model confirms a leak, the location process is initiated: Step 1: Power Extraction The power of characteristic frequency bands is extracted from the vibration signals of each sensor. The characteristic frequency bands are determined according to the type of leakage.
[0126] Use a bandpass filter to extract the signal in this frequency band and calculate the power: Or in the frequency domain: in This is the Fourier transform of the signal. Step 2: Calculate the measured coordinates Step 3: Coordinate Matching Search the database for the pipe segment that most closely matches the measured coordinates. Use Euclidean distance as the similarity metric. Choose the pipe segment with the shortest distance: Step 4: Output the leak location results: the pipe segment number where the leak is located, the floor where the pipe segment is located, the start and end points of the pipe segment, the matching confidence score (normalized distance), and the second-best candidate pipe segments (used to assist in the judgment).
[0127] (3) Taking a common 6-story residential building (4 households per floor) as an example, we modeled and exhaustively solved the problem, and found that a minimum of 7 sensors can be used to achieve unique positioning of each pipe segment.
[0128] Example 2 This embodiment provides a system for implementing a three-dimensional water network leakage point location and detection method as described in Embodiment 1, comprising: Vibration signal acquisition module, used to acquire vibration signals from pipes in a three-dimensional water network; The high-discrimination feature filtering module is used to extract statistical features of vibration signals from the dimensions of time domain, frequency domain, and time-frequency domain, and filter out multiple high-discrimination features. The real-time leakage early warning module is used to extract the power spectrum data of the vibration signal and perform real-time early warning for leakage detection through a pre-built terminal-side early warning model. The terminal-side early warning model extracts high-dimensional features from the power spectrum data through a convolutional neural network, concatenates them with multiple pre-selected statistical features, and then performs leakage detection through a multilayer perceptron. The refined leakage detection module is used to extract the power spectrum and marginal spectrum of the vibration signal after the early warning model on the terminal side identifies a leak. It then uses a pre-constructed multimodal fusion neural network for refined leak detection. The multimodal fusion neural network employs a graph encoder to extract and concatenate deep features from the power spectrum and marginal spectrum to form a joint spectral representation. A statistical feature encoder encodes and recalibrates multiple high-discrimination features to obtain statistical features. The joint spectral representation and statistical features are then fused to form a fused feature, which is then output through multiple parallel output heads to complete leak detection and leak type classification. The leak location module is used to extract the power in the characteristic frequency band based on the vibration signal collected from the three-dimensional water network pipeline after a leak is detected by refined detection. The characteristic frequency band is determined according to the type of leak, thereby locating the leak point.
[0129] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.
Claims
1. A method for locating and detecting leak points in a three-dimensional water network, characterized in that, Includes the following steps: Vibration signals collected from the three-dimensional water network; The vibration signal is subjected to statistical feature extraction in the time domain, frequency domain, and time-frequency domain, and multiple high-discrimination features are obtained by screening. The power spectrum data of the vibration signal is extracted, and a real-time early warning of leakage is performed by a pre-constructed terminal-side early warning model. The terminal-side early warning model extracts high-dimensional features from the power spectrum data through a convolutional neural network, concatenates them with multiple pre-selected statistical features, and then performs leakage detection through a multilayer perceptron. If the terminal-side early warning model detects a leak, the power spectrum and marginal spectrum of the vibration signal are extracted. A pre-constructed multimodal fusion neural network is then used for refined leak detection. This multimodal fusion neural network employs a graph encoder to extract and concatenate deep features from the power spectrum and marginal spectrum, forming a joint spectral representation. A statistical feature encoder is then used to encode and recalibrate the multiple high-discrimination features to obtain statistical features. The joint spectral representation and statistical features are fused to form a fused feature, which is then output through multiple parallel output heads to complete leak detection and leak type classification. If the refined detection determines a leak, the power in the characteristic frequency band is extracted based on the vibration signal collected from the three-dimensional water network. The characteristic frequency band is determined according to the type of leak, thereby locating the leak point.
2. The method for locating and detecting leak points in a three-dimensional water network according to claim 1, characterized in that, The method uses an accelerometer to collect vibration signals from a three-dimensional water network. The accelerometer is connected to the three-dimensional water network by magnetic attraction, bolt fixing, or adhesive bonding.
3. The method for locating and detecting leak points in a three-dimensional water network according to claim 1, characterized in that, The statistical characteristics of the time domain dimension include: root mean square value, integral energy, kurtosis, and skewness; The statistical features of the frequency domain dimension include: spectral features, power spectral features, and Mel energy features. The spectral features include spectral centroid, spectral flatness, and subband bandwidth. The power spectral features include spectral flatness, spectral kurtosis, spectral skewness, spectral descent rate, root mean square bandwidth, main frequency band, peak frequency, and energy entropy. The statistical features of the time-frequency domain dimension include marginal spectral features, which include average instantaneous frequency, spectral flatness, bandwidth, energy concentration, energy entropy, peak frequency, spectral skewness, and spectral kurtosis.
4. The method for locating and detecting leak points in a three-dimensional water network according to claim 1, characterized in that, The screening process for the high-discrimination features includes: The mutual information analysis method is used to evaluate the statistical dependency between each statistical feature and the target variable to obtain a mutual information score, wherein the target variable is whether leakage occurs; based on the mutual information score, screening and redundancy checks are performed to obtain the multiple high-discrimination features; The multiple high-discrimination features include: time-domain energy, spectral flatness, power spectral kurtosis, power spectral main band, time-domain kurtosis, marginal spectral entropy, power spectral flatness, spectral bandwidth, spectral centroid, power spectral bandwidth, and power spectral peak frequency.
5. The method for locating and detecting leak points in a three-dimensional water network according to claim 1, characterized in that, The process of extracting the power spectrum data includes: calculating the power spectrum of the vibration signal in the time domain through fast Fourier transform, and inputting it into the terminal-side early warning model after truncating the power spectrum. The convolutional neural network is a one-dimensional convolutional neural network and is connected with pooling structures; The pre-screened statistical features are highly discriminative and low-redundancy statistical features selected through F-test and redundancy analysis. The multilayer perceptron includes multiple fully connected layers connected in sequence, which are used to perform nonlinear transformation and discrimination on the splicing results of high-dimensional features and statistical features, and finally output a binary classification result.
6. The method for locating and detecting leak points in a three-dimensional water network according to claim 1, characterized in that, The process of extracting the power spectrum includes: calculating the power spectrum of the vibration signal through fast Fourier transform, and representing the frequency domain energy distribution in the form of a two-dimensional image based on the power spectrum to obtain the power spectrum. The extraction process of the marginal spectrum map includes: calculating the marginal spectrum of the vibration signal through Hilbert-Huang transform, and constructing the marginal spectrum map in the form of a two-dimensional image; The multimodal fusion neural network fuses the joint spectral representation and statistical features through a cross-modal attention fusion module. The cross-modal attention fusion module uses the joint spectral representation as the query and the statistical features as the key and value, and fuses them by learning the dynamic matching relationship between the joint spectral representation and the statistical features.
7. The method for locating and detecting leak points in a three-dimensional water network according to claim 6, characterized in that, The parallel output head of the multimodal fusion neural network is also used for pressure level identification, leakage distance prediction, and valve status prediction. The loss function of the multimodal fusion neural network during training includes: For output heads with specific leakage distances and pressure levels, the mask mean square error is used as the loss function. The expression for the mask mean square error is: In the formula, For the mean square error of the mask, The valid number of samples is the set of samples whose label is not -1. Let i be the true label of the i-th sample. Let be the predicted value for the i-th sample; For the output header predicting leakage type and valve status, the mask classification cross-entropy is used as the loss function. The expression for the mask classification cross-entropy is: In the formula, The one-hot encoding of the true label of the i-th sample. For the number of categories, One-hot encoding of the predicted value for the i-th sample; The overall loss function of the multimodal fusion neural network is a weighted sum of the loss functions of each output head.
8. The method for locating and detecting leak points in a three-dimensional water network according to claim 1, characterized in that, The process of locating the leak point includes: The obtained pipeline topology information includes pipe segment connection relationships, pipe segment lengths, node types, and candidate installation locations for sensors, which are used to collect vibration signals on the three-dimensional water network; Using the number of sensors and their corresponding candidate installation locations as variables, and minimizing the number of sensor collisions as the optimization objective, an optimization solution is obtained through a search strategy to obtain the minimum number of sensors and their installation locations. The collision between sensors is defined as the distance between the coordinate vectors of the energy ratio generated by two pipe segments where different sensors are located being less than a preset distance threshold. Based on the minimum number of sensors obtained and their installation locations, sensors are installed in the pipeline. A unique path from each pipe segment to each sensor is determined by searching and traversing the pipeline. For each pipe segment, it is assumed that there is a leak point. The power of each sensor is calculated based on the corresponding unique path, and the ratios are calculated in pairs to construct an energy ratio coordinate system and form a leak point energy ratio database. After a leak is detected, the power in the characteristic frequency band is extracted from the vibration signals of each sensor, and the ratios are calculated in pairs to construct the measured coordinates. The similarity between the measured coordinates and the energy ratio coordinates in the leak point energy ratio database is calculated, and the location of the leak point corresponding to the closest energy ratio coordinate is selected as the leak location result.
9. The method for locating and detecting leak points in a three-dimensional water network according to claim 8, characterized in that, The expression for the optimization objective is: In the formula, For the set of sensor locations, For the set of all candidate installation locations, For the number of sensors, This is an indicator function that takes the value 1 when the condition is met, and 0 otherwise. This indicates the number of pipe segment pairs that are in a collision state. For sensors i The energy coordinate vector generated by the pipe segment in question, For sensors j The energy coordinate vector generated by the pipe segment in question, Distance threshold; The method, for the assumed leakage point, calculates the power of each sensor using the following expression: In the formula, For pipe section j Sensor when leakage occurs i power, The source power at the point of leakage. For pipeline attenuation coefficient, For pipe section j The leak occurred at the sensor. Path length, For pipe section j The leak occurred at the sensor. The product of the energy distribution coefficients of all nodes on the path, wherein the node energy distribution coefficients are determined based on the node type, geometric characteristics and pipeline parameters of the pipe segment, and the node types include two-way nodes, three-way nodes and four-way nodes.
10. A system for implementing the method for locating and detecting leak points in a three-dimensional water network as described in any one of claims 1-9, characterized in that, include: Vibration signal acquisition module, used to acquire vibration signals from a three-dimensional water network; The high-discrimination feature filtering module is used to extract statistical features from the vibration signal in the time domain, frequency domain, and time-frequency domain dimensions, and filter out multiple high-discrimination features. The real-time leakage early warning module is used to extract the power spectrum data of the vibration signal and perform real-time early warning for leakage detection through a pre-constructed terminal-side early warning model. The terminal-side early warning model extracts high-dimensional features from the power spectrum data through a convolutional neural network, concatenates them with multiple pre-selected statistical features, and then performs leakage detection through a multilayer perceptron. The refined leakage detection module is used to extract the power spectrum and marginal spectrum of the vibration signal after the early warning model on the terminal side identifies a leak. It then performs refined leakage detection using a pre-constructed multimodal fusion neural network. This multimodal fusion neural network employs a graph encoder to extract and concatenate deep features from the power spectrum and marginal spectrum to form a joint spectral representation. A statistical feature encoder is then used to encode and recalibrate the multiple high-discrimination features to obtain statistical features. Finally, the joint spectral representation and statistical features are fused to form a fused feature, which is then output through multiple parallel output heads to complete leakage detection and leakage type classification. The leak location module is used to extract the power in a characteristic frequency band based on the vibration signal collected from the three-dimensional water network after the refined detection determines the leak. The characteristic frequency band is determined according to the type of leak, thereby locating the leak point.