Urban water supply pipe network leakage detection method, device, equipment, medium and product
By combining long-band radar remote sensing imagery with deep convolutional neural networks, the inefficiency of existing water supply network leakage detection methods has been solved, enabling automated and rapid detection of leakage areas in water supply networks.
Patent Information
- Application Number
- CN202510993594.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-18
- Publication Date
- 2025-10-31
AI Technical Summary
Existing methods for detecting leaks in urban water supply networks are costly in terms of manpower and resources, have long inspection cycles, are susceptible to environmental noise interference, and require extensive professional experience, making it difficult to meet the needs of efficient maintenance.
By combining long-band radar remote sensing imagery with deep convolutional neural networks, and by acquiring and preprocessing radar imagery data, multi-channel imagery data is constructed and a deep convolutional neural network model is trained to achieve automated detection of leaks in water supply networks.
It enables accurate identification and prediction of leak areas in urban water supply networks within a short period of time, significantly improving detection efficiency and reducing manual intervention and detection time.
Smart Images

Figure CN120877047A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of pipeline leakage detection, and in particular to a method, apparatus, equipment, medium and product for detecting leakage in urban water supply pipelines. Background Technology
[0002] Water supply network leaks, a common urban infrastructure problem, not only lead to the significant loss of precious water resources but also severely impact the daily lives and livelihoods of urban residents. Corroded and damaged water pipelines significantly increase the levels of impurities and heavy metals in tap water, posing a serious threat to human health with long-term consumption of such contaminated water. Furthermore, the continuous scouring of leaks by high-pressure water often triggers secondary disasters such as soil loosening, underground cavities, and road subsidence and collapse. In addition, the high water content of the underground soil environment presents significant challenges to the maintenance of other urban infrastructure in the surrounding area. At locations of leaks and ruptures in the water supply network, the friction between the high-pressure water flow and the inner wall of the pipeline produces a distinctive sound, as does the sound of water flowing into the surrounding soil. Based on these physical characteristics, the primary method for detecting leaks in urban water supply networks is currently manual inspection using techniques such as auditory and vibration methods. In practice, staff will use specialized equipment such as listening sticks and surface sensors to capture the sound emitted by the leak point, thereby initially delineating the leak area and further pinpointing the specific location of the leak.
[0003] However, the above-mentioned commonly used detection methods have many limitations in practical applications, such as high manpower and material costs, long inspection cycles, susceptibility to environmental noise interference, and extremely stringent requirements for the professional experience and skills of staff. These factors together lead to a significant reduction in the timeliness of leak detection work, making it difficult to meet the needs of efficient maintenance of urban water supply networks. Summary of the Invention
[0004] The purpose of this application is to provide a method, device, equipment, medium and product for detecting leaks in urban water supply networks, which can improve the timeliness of leak detection work in water supply networks.
[0005] To achieve the above objectives, this application provides the following solution:
[0006] Firstly, this application provides a method for detecting leaks in urban water supply networks, including:
[0007] Acquire raw radar image data;
[0008] The original radar image data is preprocessed to obtain polarization decomposition component data and backscattering component data, and the polarization decomposition component data and the backscattering component data are combined to form multi-channel image data.
[0009] A deep convolutional neural network model is constructed, and the deep convolutional network model is trained using the multi-channel image data to obtain a prediction model;
[0010] The multi-channel image data of the target area to be predicted is input into the prediction model, and the leakage probability of the target point is output.
[0011] Secondly, this application provides a leak detection device for urban water supply networks, comprising:
[0012] The acquisition module is used to acquire raw radar image data;
[0013] The preprocessing module is used to preprocess the original radar image data to obtain polarization decomposition component data and backscattering component data, and to synthesize the polarization decomposition component and the backscattering component into multi-channel image data.
[0014] A construction module is used to construct a deep convolutional neural network model, and to train the deep convolutional network model using the multi-channel image data to obtain a prediction model;
[0015] The output module is used to input the multi-channel image data of the target area to be predicted into the prediction model and output the leakage probability of the target point.
[0016] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the urban water supply network leakage detection method described in any one of the above.
[0017] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the urban water supply network leakage detection method described above.
[0018] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the urban water supply network leakage detection method described above.
[0019] According to the specific embodiments provided in this application, the following technical effects are disclosed:
[0020] This application provides a method, apparatus, equipment, medium, and product for detecting leaks in urban water supply networks. The method involves acquiring raw radar image data; preprocessing the raw radar image data to obtain polarization decomposition component data and backscattering component data; synthesizing the polarization decomposition component data and backscattering component data into multi-channel image data; constructing a deep convolutional neural network model; training the deep convolutional network model using the multi-channel image data to obtain a prediction model; and inputting the multi-channel image data of the target area to be predicted into the prediction model to output the leakage probability of the target point. This application achieves automated output of the leakage probability of water supply networks by extracting polarization decomposition component data and backscattering component data from radar images to construct multi-channel image data, and combining this with a deep convolutional network model. This reduces manual intervention and detection time, effectively improving the timeliness of leak detection work. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is an application environment diagram of a method for detecting leaks in urban water supply networks according to an embodiment of this application;
[0023] Figure 2 A schematic flowchart illustrating a method for detecting leaks in an urban water supply network, provided as an embodiment of this application;
[0024] Figure 3 This is an example diagram of the radar image preprocessing workflow of this application;
[0025] Figure 4 This is a composite image of the result of this application;
[0026] Figure 5 This is a flowchart of the channel attention module in this application;
[0027] Figure 6 This is a flowchart of the spatial attention module in this application;
[0028] Figure 7 This is a diagram illustrating the pipeline distance threshold weighting process in this application.
[0029] Figure 8 A schematic diagram of the functional modules of an urban water supply network leakage detection device provided in an embodiment of this application;
[0030] Figure 9 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0031] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0032] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0033] The urban water supply network leakage detection method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be set up independently, integrated into server 104, or placed in the cloud or on another server. Terminal 102 can send the raw radar image data to be processed to server 104. After receiving the raw radar image data, server 104 preprocesses the raw radar image data to obtain polarization decomposition component data and backscattering component data, and synthesizes the polarization decomposition component data and backscattering component data into multi-channel image data; constructs a deep convolutional neural network model, trains the deep convolutional network model using multi-channel image data, and obtains a prediction model; inputs the multi-channel image data to be predicted for the target area into the prediction model, and outputs the leakage probability of the target location. Server 104 can feed back the obtained leakage probability of the target location to terminal 102. In addition, in some embodiments, the urban water supply network leakage detection method can also be implemented by the server 104 or the terminal 102 alone. For example, the terminal 102 can directly process the raw radar image data to be processed, or the server 104 can obtain the raw radar image data to be processed from the data storage system and process the raw radar image data to be processed.
[0034] The terminal 102 can be, but is not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server 104 can be implemented using a standalone server or a server cluster composed of multiple servers, or it can be a cloud server.
[0035] In urban water supply network leak detection, the acoustic method, as a traditional approach, involves carefully distinguishing abnormal sounds produced by leaks along the water supply pipeline to determine if there is damage to pipeline equipment in a specific area. This method requires workers to meticulously inspect each section of the pipeline to ensure no potential leaks are missed. However, in practice, due to the age and disrepair of some pipelines, coupled with missing records in the pipeline management system, inspectors often struggle to accurately locate these aging pipelines during inspections, making leak detection in the corresponding areas particularly difficult. Limited by the depth of pipeline burial and the characteristics of media transmission, underground leak sounds are usually quite weak, especially in noisy environments, significantly reducing the effectiveness of the inspection and imposing considerable limitations on the working hours of personnel. Furthermore, while the acoustic vibration method uses specific sensors to receive underground vibration information, its effectiveness is severely affected by surface traffic conditions, making it difficult to achieve good detection results in areas with high pedestrian traffic. Moreover, other types of pipeline facilities around the water supply pipeline can interfere with the signal acquisition process, further increasing the difficulty of detection. In summary, environmental interference and the difficulty in locating aging and leak-prone pipeline areas are the main reasons for problems directly or indirectly caused by pipeline leak detection.
[0036] To effectively address these issues, this disclosure proposes a method for detecting leaks in urban water supply networks in complex surface environments, taking into account the spatial distribution of pipelines with potential leakage hazards. This method employs long-band radar remote sensing imagery combined with neural network algorithms to accurately extract underground leakage characteristics, thereby enabling the identification and prediction of urban leakage areas over a large spatial area within a short timeframe. This effectively reduces leak detection costs and significantly improves detection efficiency.
[0037] Radar satellites operate by actively transmitting microwave pulse signals to the Earth's surface from a satellite platform, receiving echo signals reflected from the surface and subsurface media for imaging, and ultimately clearly representing the features of surface objects at high spatial resolution. This technology boasts numerous advantages, including a wide imaging swath, all-weather operation, and minimal interference from weather and surface environments. Because long-wavelength microwave signals can penetrate the Earth's surface and urban roads to obtain the reflection characteristics of shallow soil media, numerous studies have focused on the application of long-wavelength radar satellites in soil moisture content retrieval and surface element classification. Since its concept was proposed in the 1950s, neural network learning algorithms have undergone long-term and continuous development, becoming a core technology and hot research direction in fields such as computer vision and natural language processing. This disclosure combines a backpropagation algorithm with a multi-layered deep convolutional neural network design, which can effectively extract information on leakage areas with high water content from radar satellite multi-polarization and backscatter component images. By introducing a pipeline element constraint network model for leakage risks, it fully learns the facility leakage characteristics within the risk area for image prediction. Ultimately, within a relatively short working period, the goal of accurately detecting leaks in urban water supply networks was achieved, effectively solving the technical problems of the original methods being easily affected by environmental factors and having difficulty locating potential leak areas during the verification process.
[0038] In one exemplary embodiment, such as Figure 2 As shown, a method for detecting leaks in urban water supply networks is provided. This method is executed by computer equipment, specifically by a terminal or server alone, or by both a terminal and a server. In this embodiment, the method is applied to... Figure 1 Taking server 104 as an example, the explanation includes the following steps S201 to S204. Wherein:
[0039] In step S201, raw radar image data is acquired.
[0040] Specifically, multi-polarization L-band imagery data was acquired by the Argentine SAOCOM-1A satellite. This data has a spatial resolution of 10m × 10m and covers four polarization channels: HH, HV, VH, and VV. By interfacing with the satellite data receiving system, and based on the geographical location of the study area and the imaging time requirements, the original imagery data files for the corresponding time period and covering the target area were retrieved and downloaded from the satellite data archive. Metadata, including calibration parameters and orbital information, was also obtained.
[0041] In step S202, the original radar image data is preprocessed to obtain polarization decomposition component data and backscattering component data, and the polarization decomposition component data and backscattering component data are combined to form multi-channel image data.
[0042] In one embodiment, step S202, "preprocessing the original radar image data to obtain the backscattering component," includes the following sub-steps S2021-S2027:
[0043] S2021. Read the calibration parameters of the raw radar image data.
[0044] S2022. Calculate the backscattering coefficient based on the calibration parameters.
[0045] S2023. Based on the backscattering coefficient, determine the radiometric calibration image that can reflect the true scattering characteristics of ground objects in each polarization channel.
[0046] S2024. Based on the radiometrically calibrated image, the average value of the target pixel and its adjacent pixels is calculated to obtain the multi-view processed image.
[0047] S2025. Using the Refined Lee algorithm, the average value of each pixel neighbor in the multi-view processed image is calculated using a preset moving window to obtain the filtered image.
[0048] S2026. Geocoding is performed on the filtered image to establish a mapping relationship between radar geometric coordinates and geographic coordinates.
[0049] S2027. Spatial interpolation is performed on the geocoded and filtered image to generate backscatter components.
[0050] Specifically, such as Figure 3 As shown, the SAOCOM-1A image undergoes preprocessing, including radiometric calibration, multi-view processing, filtering, and geocoding. The calculation and extraction of polarization decomposition feature sets, which reflect the randomness of ground object scattering, scattering angles, and differences in physical scattering mechanisms such as dihedral scattering and volume scattering among different ground objects, are based on polarization matrices (covariance matrix, coherence matrix) that characterize the power, correlation, and other statistical parameters of different polarization channels in the image. This disclosure utilizes two preprocessing methods—polarization matrix analysis and polarization decomposition after geocoding—to obtain radar image polarization decomposition component data and surface backscattering component data containing rich ground object information, facilitating subsequent model training.
[0051] Radiometric calibration converts raw radar data into interpretable backscattering coefficients and corrects systematic errors such as incident angle and sensor storage processes. Calibration parameters obtained by reading radar image metadata are combined with radar image data to calculate backscattering coefficient values for calibration. The final output image reflects the true scattering characteristics of target objects in each polarization channel (HH, HV, VH, VV) of the image.
[0052] Based on the radiometric calibration results, multi-view processing calculates the average value of the target pixel along the azimuth (satellite flight direction) and at a distance perpendicular to it, as well as the average value of neighboring pixels at a specified distance. This average value is then used as the pixel value for the corresponding position in the output image. Multi-view processing effectively reduces speckle noise interference in the image, and the output results are used in subsequent preprocessing steps.
[0053] Based on multi-view image processing, the filtering process further suppresses coherent speckle noise in radar images. In this disclosure, the preprocessing stage uses Refined Lee filtering, which is an adaptive speckle noise filtering algorithm. Refined Lee filtering uses a 7×7 moving window to calculate the mean value of each pixel's neighborhood and retains the original pixel values at the image edges. Its processing results can effectively weaken image noise while preserving the image's ground feature edges and texture information.
[0054] The goal of geocoding is to convert the preprocessed intermediate data from radar geometric coordinates to geographic coordinates. This corrects the geometric distortion of radar imaging and enables spatial alignment with relevant geographic feature data. Geometric correction establishes a mapping relationship between the two coordinate systems using satellite orbit parameters, DEM data, etc. Pixel resampling performs spatial interpolation on the pixels obtained from the coordinate system transformation, thereby generating the final output image data.
[0055] This disclosure extracts polarization decomposition components characterizing the scattering mechanism of ground objects by generating a polarization matrix and performing image polarization decomposition. The polarization matrix consists of a covariance matrix C and a coherence matrix T. Let S... HH S VV S HV S VH These represent the same polarization and cross-polarization channel components of the image, respectively, where S HH S represents the polarization channel data for horizontal transmission and horizontal reception. VV S represents the polarization channel data transmitted and received vertically. HV S represents the polarization channel data transmitted horizontally and received vertically. VH This represents the polarization channel data transmitted vertically and received horizontally.
[0056] The scattering vector of a single pixel in a radar image is represented by k in formula (1), and the information of the three polarization channels is integrated by formula (1) to form a column vector.
[0057]
[0058] The covariance matrix C is expressed by formula (2):
[0059]
[0060] Where, k *It is the conjugate transpose of k, and |S in the matrix HH | 2 S represents HH The square of the signal amplitude represents the energy of the signal in that polarization channel. These types of cross terms represent S HH and S HV The correlation between channel signals, including amplitude and phase relationships, can be preserved by the covariance matrix, which can retain the correlation between polarization channel signals while saving the amplitude and phase information of the signals on the channel.
[0061] The coherence matrix T is represented by formula (3). The coherence matrix is mainly used to record the randomness of the scattered signals of objects on the ground.
[0062]
[0063] For formula (4), the covariance matrix C and the coherence matrix T can be converted to each other by multiplication with the same invertible matrix U, reflecting their mathematical relationship. Different matrices can be flexibly selected to conduct subsequent analysis of ground object scattering mechanisms according to needs. The calculated covariance matrix preserves the correlation between signals in each polarization channel while saving the amplitude and phase information of the signals in the channel. The coherence matrix T is mainly used to record the randomness of the scattering signals of surface objects. The covariance matrix C and the coherence matrix T can be converted to each other through invertible matrices.
[0064] After image geocoding, the HA-alpha polarization decomposition method is employed, combining the image coherence matrix to calculate three decomposition components: entropy, anisotropy, and alpha (mean scattering angle). Entropy measures the complexity of ground features, anisotropy reflects the contribution of ground features to the scattered signal, and the mean scattering angle determines the main scattering mechanism of the ground features, thus achieving overall classification of ground features. The Yamaguchi polarization decomposition method is then used, combining the covariance matrix to calculate four decomposition components: volume scattering, surface scattering, secondary scattering, and spiral scattering. These represent the scattering characteristics of flat surfaces such as forest vegetation, soil, and water surfaces, as well as man-made structures and complex targets such as buildings. Based on the overall ground feature classification, the scattering information of targets within the same category is further refined. These two polarization decomposition methods decompose radar signals into physically meaningful scattering components, helping the model enhance its ability to distinguish surface cover such as vegetation, water bodies, and buildings during training, indirectly improving the learning effect of image feature combinations of the leak area.
[0065] In one embodiment, step S202, "preprocessing the original radar image data to obtain polarization decomposition components," includes the following sub-steps S2028-S20212:
[0066] S2028. Based on the filtered image after geocoding, extract the polarization channel components.
[0067] S2029. Construct a scattering vector based on each polarization channel component.
[0068] S20210. Calculate the covariance matrix and coherence matrix based on the scattering vector.
[0069] S20211. Based on the coherence matrix, calculate the entropy component, anisotropy component, and alpha component.
[0070] S20212. Based on the covariance matrix, calculate the volume scattering component, surface scattering component, secondary scattering component, and spiral scattering component; the entropy component, anisotropy component, alpha component, volume scattering component, surface scattering component, secondary scattering component, and spiral scattering component constitute polarization decomposition component data.
[0071] Specifically, data from four polarization channels (HH, HV, VH, and VV) are extracted from the processed radar imagery, representing radar wave scattering in different directions. The data from these four polarization channels are combined into a scattering vector according to specific rules for subsequent calculations. The covariance matrix and coherence matrix are calculated from the scattering vector; these matrices record the signal relationships between different polarization channels. From the coherence matrix, three components—entropy, anisotropy, and average scattering angle (alpha)—are calculated to determine the complexity of ground object scattering and the main scattering mechanisms. From the covariance matrix, four components—volume scattering, surface scattering, secondary scattering, and spiral scattering—are calculated, corresponding to the scattering characteristics of different ground objects such as vegetation, flat surfaces, and buildings. The seven calculated components combined constitute the final polarization decomposition component data, reflecting the polarization characteristics of ground objects.
[0072] In step S203, a deep convolutional neural network model is constructed and trained using multi-channel image data to obtain a prediction model.
[0073] In one embodiment, step S203 includes the following sub-steps S2031-S2033:
[0074] S2031. Construct a deep convolutional neural network model, which includes hidden layers and output layers.
[0075] S2032. Based on multi-channel image data, determine multi-channel image slice samples.
[0076] S2033. Set the model training parameters and input the multi-channel image slice samples into the deep convolutional neural network model. Calculate the prediction results through forward propagation and optimize the model training parameters through backpropagation until the deep convolutional neural network model converges. The converged deep convolutional neural network model is the prediction model.
[0077] Specifically, to enable the subsequent network model to identify and distinguish the characteristics of the leak area from various surface coverings, this invention utilizes Python code to preprocess the aforementioned images, including backscattering and polarization decomposition components, such as... Figure 4 As shown, the R, G, and B channel data are directly synthesized and the TIFF format processing results are output. The actual leakage verification points of the urban water supply pipeline are used, and the points are generated at 50m intervals according to urban road and water supply pipeline elements as training sample points and test sample points respectively. After being superimposed with the synthesized image, a square cropping range with a side length of 300 meters (30 pixels) is defined by extending 150 meters outward in the four directions of left, right, up and down (corresponding to 15 pixels in this invention) with the pixel at the point of overlap as the center. The image slices within this range are cropped by running code and used as multi-class input training samples and target image test samples for the model. In terms of image synthesis, HH (horizontal co-polarization), HV (horizontal-vertical polarization), and HH / VV (horizontal and vertical co-polarization image ratio) from the backscattering results are combined into AIEM images, and HH, HV, and VV image data are combined into Origin images; the Entropy, Anisotropy, and alpha (mean scattering angle) components from the HA-alpha polarization decomposition results are combined into HA-alpha image data; the calculation results of volume scattering, surface scattering, and secondary scattering in Yamaguchi decomposition are combined in RGB band order to form image synthesis data for this type of polarization decomposition method.
[0078] In this disclosure, the model training sample reference points are compiled from statistical data collected by relevant urban leak detection departments and are divided into two categories: positive leak samples and negative non-leak samples. Considering the strong correlation between water supply network layout and urban road distribution, the test sample reference points utilize elements such as urban road network and water supply pipelines, and are obtained using an equidistant point selection method. During image slicing, in addition to the reference points used to specify the center position, the cropping radius can be manually specified, thereby ensuring that the spatial scale corresponding to a single sample can be flexibly adjusted according to model training and actual work needs. Based on slice cropping, this invention performs image edge null value reassignment and positive normalization processing for each image channel, eliminating the interference of outliers in the image on network model training while preserving as much original ground feature information as possible.
[0079] Furthermore, in step S2033, during backpropagation parameter optimization, the error between the predicted result and the true label is calculated using the cross-entropy loss function to guide parameter adjustment. The cross-entropy loss function is constructed based on the principle of information entropy and can be used to measure the difference between the model's predicted distribution and the true distribution. The smaller the cross-entropy loss function value, the closer the distribution of the predicted values of the model training group data is to the true distribution, and the higher the model's prediction accuracy. It is a commonly used loss function in the training process of neural networks. This disclosure uses this loss function to calculate the loss error value based on the [training batch size, 2] array result output by the above network. During the training process, the backward() method in the Python code is used to backpropagate the loss error value in the network, thereby adjusting the internal parameters of the convolutional layers in the network to optimize the model's learning effect. The basic cross-entropy loss is calculated using formula (5), and the weighted cross-entropy is calculated using formula (6):
[0080]
[0081] Where k represents the total number of sample categories, y i p represents the sample category. i This represents the predicted probability of the corresponding category by the model. In the model disclosed herein, there are two sample categories: non-leaked and leaked, represented by the numerical labels 0 and 1. In the n sets of images used in a single training iteration of the model, the loss function value L for a single set of images with a training batch (batch) of m is... i Combined with image sample weights W i As shown in Formula 6, a weighted average is performed. Since the weight value of leak points around non-risk pipelines is less than 1, the calculated value of the loss function for the corresponding training image group is reduced, and the network's attention to the image features of such leak samples is weakened to some extent, ultimately improving the spatial clustering of predicted leak points in the pipeline risk area.
[0082] In one embodiment, step S203, "constructing a deep convolutional neural network model", includes the following sub-steps A1-A5:
[0083] A1. Based on activation function layers, two-dimensional convolutional layers, and normalization layers, a basic combination layer and a downsampling layer are constructed. The basic combination layer is used to achieve preliminary feature extraction and transformation, and the downsampling layer is used to achieve feature map downsampling.
[0084] A2. Based on the basic combination layer and the downsampling layer, construct a multi-channel input structure.
[0085] A3. Based on the multi-channel input structure, a channel attention module is embedded in the hidden layer for channel attention processing. By extracting the mean and maximum value of each channel, a weight vector is generated to enhance the information weight of key feature channels.
[0086] Specifically, such as Figure 5 As shown, Figure 5 To enhance feature learning, a channel attention module is embedded in the deep convolutional neural network model, building upon the multi-channel input structure. After inputting the feature map, global max pooling and global average pooling operations are performed to extract the maximum and average values of each channel, generating corresponding feature vectors. Then, a linear connection layer is used for scaling, transforming the dimensions of the two types of feature vectors and fusing information. Following this, an activation function layer and a summation operation are applied to output the channel weights of the feature map. Finally, these weights are multiplied by the input feature map to obtain the channel-attention-enhanced output feature map. This process dynamically adjusts the contribution of different channel features by extracting the mean and maximum values of each channel to generate weight vectors, making the model more focused on the key feature channels for leak detection, thus improving the targeting and effectiveness of feature representation.
[0087] A4. Calculate the pixel position weights through the spatial attention module and add spatial dimension weights to the feature map after channel attention processing to enhance the spatial detail representation of the leakage-related areas.
[0088] Specifically, such as Figure 6 As shown, Figure 6 For the spatial attention module, after completing the channel attention processing, a spatial attention module is introduced to further optimize feature representation. After inputting the feature map enhanced by channel attention, two types of spatial feature extraction are performed in parallel: first, the maximum value of each channel in the feature map is calculated to generate a single-channel response map focusing on significant features; second, the average value of each channel in the feature map is calculated to generate a single-channel response map reflecting the global trend. The channels of the two types of response maps are superimposed and input into a two-dimensional convolutional layer (the number of channels in the feature map is set from 2 to 1) for feature fusion and dimensionality compression, and then output as spatial attention weights through an activation function layer. Finally, these weights are multiplied by the input feature map to obtain the spatially weighted output feature map. This process, by mining the spatial correlation between pixel locations, dynamically highlights the detailed features of leak-related areas (such as the surface scattering anomaly area caused by pipeline leaks), compensating for the limitations of channel dimension in the channel attention module.
[0089] A5. Based on the compressed channel dimension of the fully connected layer, the feature map after spatial dimension weighting is mapped to the probability prediction results of leakage and non-leakage.
[0090] Specifically, this disclosure constructs a deep convolutional neural network model for pipeline leak detection. Four types of synthetic images—Origin, AIEM, HA-alpha, and Yamaguchi—are used as multi-channel input data. The network learning process is designed for each channel's data, incorporating two-dimensional convolutional layers and normalization layers, thus forming a multi-channel learning network structure. To enhance the model's ability to extract weak features of pipeline leaks in complex surface environments, a channel attention mechanism module is introduced. This module extracts the mean and maximum values of each channel in the feature map, adds them into an n-dimensional vector, and calculates multi-channel weights using activation functions, thereby weighting the feature map across multiple channels. A spatial attention mechanism module is also introduced, extracting the mean and maximum values of each pixel location across multiple channels. These two types of results are then fused to form pixel weights on a two-dimensional plane, which are then multiplied and weighted sequentially with each channel of the feature map. Through the channel attention and spatial attention modules, the key channel data in the feature map and the role of pixels at specific sample locations in the model training process are highlighted. The prediction results are obtained by fusing multi-class image feature maps, calculating through a linear fully connected layer, and compressing the channel dimension, and are represented as an array of [training batch size, 2].
[0091] It is understandable that, due to factors such as the aging of infrastructure in different regions and variations in residents' water demand, pipeline leaks often exhibit spatial linear distribution or regional clustering along the pipeline. To account for the impact of the spatial heterogeneity of actual leak distribution on model feature learning, this disclosure weights the loss function values of samples from leak-risk and non-risk areas during training. Specifically, by reducing the weight of leak samples in areas surrounding non-leaking-risk pipelines while maintaining the weight of positive leak samples around high-risk pipelines, the model's ability to learn image features of typical leak areas is enhanced, optimizing the distribution of predicted points and thus improving the model's prediction accuracy.
[0092] Furthermore, this disclosure uses a threshold-weighted method based on pipeline distribution, the actual locations of leak checkpoints, and the distances between them to highlight the importance of image samples cropped from checkpoints around leak-risk pipelines in the model learning process. For example... Figure 7 As shown, based on data from the city's water supply pipeline inspection department, the distribution of risky pipelines within the city is clearly defined. Pipelines are assigned a weight greater than 1 based on their leakage risk (e.g., Class A high risk, Class B medium risk, Class C low risk) (e.g., Class A weight is 3, Class B weight is 2), and these are distinguished by different colors in the attached diagram (red represents Class A, orange represents Class B, and yellow represents Class C). The actual leakage inspection points (blue dots represent leakage points, black dots represent non-leakage points) are overlaid with the pipeline data. Distance thresholds are set (e.g., d1 and d2 in the attached diagram, assuming a threshold of 5 meters), and the risky pipelines surrounding the inspection points are traversed to determine whether they are within the influence range of the risky pipelines. Figure 7Taking leak point 3 as an example, if the distance between the leak point and the surrounding pipeline 2 (orange, medium risk in Class B) is less than the threshold, and pipeline 2 is the pipeline with the highest risk in the surrounding area (with the largest risk weight compared to other pipelines), then the risk weight of pipeline 2, 2, is assigned to the leak point as the location weight. If the distance between the leak point and all risk pipelines is greater than or equal to the threshold, or if it is a non-leaking point (black dot), then the location weight remains at its initial value of 1. To avoid interference from excessively large weight ranges in the model loss error, the location assignment results need to be uniformly processed: all location weights are divided by the maximum pipeline weight (such as Class A weight 3). Taking leak point 3 as an example again, its original location weight 2 divided by 3 is approximately 0.67. If the distance between leak point 4 and the Class A high-risk pipeline is less than the threshold, the original location weight 3 divided by 3 becomes 1, ensuring that the final weight of the location around the high-risk pipeline is 1, which highlights the importance of the samples associated with the high-risk pipeline while limiting the weight range to avoid negative impacts.
[0093] During the model data input phase, the weights of the verification points are associated with corresponding image cropping samples. For example, leak point samples with a weight of 1 around high-risk pipelines have a greater impact on the loss function during model training, thus strengthening the model's learning of such high-risk associated features. Samples from non-high-risk areas with lower weights (such as non-leak points with a weight of approximately 0.33) have less interference with model training. Through this weighting logic, the model focuses on learning leak features around high-risk pipelines, improving the accuracy of leak detection in water supply networks and aligning with the need to prioritize high-risk areas in actual operation and maintenance.
[0094] This disclosure employs a distance threshold weighting method, assigning weights to leakage training samples based on the distribution of risk pipelines. Subsequently, a multi-sample weighted averaging method is used, where the cross-entropy loss result is multiplied by the corresponding sample weight, and the average is used for backpropagation and model parameter adjustment. As the training epochs increase, the network will tend to learn and reference the features of ground features at the location of risk pipeline leaks to determine whether test sample objects are leaking.
[0095] In step S204, the multi-channel image data of the target area to be predicted is input into the prediction model, and the leakage probability of the target point is output.
[0096] In one embodiment, step S204 includes the following sub-steps S2041-S2045:
[0097] S2041. Obtain the multi-channel image data of the target area to be predicted.
[0098] S2042. Based on preset extraction rules, extract image samples from the multi-channel image data to be predicted.
[0099] S2043. Input the image samples into the prediction model with the weight file loaded for network operation, and output a two-dimensional array result, which corresponds to the predicted value of each image sample.
[0100] S2044. Apply the Sigmoid activation function to each element in the two-dimensional array result and map it to the preset interval [0,1], and calculate the leakage probability and non-leakage probability of each image sample;
[0101] S2045. Sort the leakage probabilities in descending order, generate a priority list of leakage probabilities for each target point based on the sorting results, and identify the high-probability areas to be checked first based on the priority list of leakage probabilities.
[0102] Specifically, first, multi-channel image data of the target area to be predicted is collected. Image samples are extracted from the multi-channel images according to preset rules (e.g., cropping image blocks of fixed size centered on pipeline locations). These samples are then input into a prediction model loaded with a weight file. The network then outputs a two-dimensional array [training batch size, 2], where the two columns correspond to the original predicted values of the samples as "non-leaking" and "leaking". For each sample in the two-dimensional array, the two original predicted values x are... i,j (i is the sample index, j=0 corresponds to non-leakage, j=1 corresponds to leakage), normalize to the relative proportion range through formula (8) to ensure that the sum of the two types of predicted values is 1, and then map to the [0,1] probability range through the Sigmoid function of formula (7) to obtain the "non-leakage probability, leakage probability" of each sample.
[0103] Furthermore, a priority list of target location leakage probabilities is generated by sorting all sample leakage probabilities in descending order. The number of filtering entries can be flexibly adjusted according to maintenance needs. A .csv table containing "sample number, leakage probability, and geographic coordinates" is exported, and geographic feature data in .shp format is generated using tools such as ArcMap to assist maintenance personnel in accurately locating high-probability leakage areas and achieving "priority verification of key areas." Through model inference, probability normalization, sigmoid mapping, and result sorting, combined with mathematical transformations of formulas, the abstract original output of the model is transformed into leakage probabilities with business interpretability. Combined with a descending order filtering mechanism, high-confidence leakage points are output as needed. This not only solves the problem that the original model results are difficult to directly guide maintenance, but also adapts to the actual needs of focusing on high-risk areas and balancing verification costs in the pipeline network, achieving deep integration of technical solutions and business scenarios. Probability filtering adapts to pipeline network maintenance needs, normalization and sigmoid mapping ensure reasonable and interpretable probabilities, descending order sorting and flexible filtering focus on high-risk areas to improve verification efficiency, and geographic coordinates are linked with tools to form a closed loop of model prediction, spatial analysis, and on-site verification, supporting intelligent operation and maintenance of urban pipeline networks.
[0104] The Sigmoid probability mapping is shown in Equation (7), and the predicted value normalization is shown in Equation (8):
[0105]
[0106] This disclosed technical solution uses radar satellite remote sensing imagery as the core data source. Compared to traditional data acquisition methods, it is less affected by external factors such as urban surface residents' activities and environmental noise, thus ensuring data reliability. Furthermore, radar satellite remote sensing imagery data has the capability for all-weather, all-time acquisition and can complete data acquisition within a short timeframe, greatly improving the flexibility and timeliness of data acquisition. Simultaneously, from image preprocessing to the final output of missing points and affected areas, the entire process is rigorously and objectively designed, effectively reducing reliance on human experience during operation and improving the standardization and automation level of the operation.
[0107] Furthermore, this disclosure enables accurate prediction of pipeline leak areas over large spatial areas, significantly shortening the cycle of regional inspections and greatly improving the efficiency of verification work. By introducing a confidence screening mechanism, it can efficiently identify locations with a high probability of leakage, thereby increasing the proportion of leak detection within a limited sample size and optimizing resource utilization and detection results. For areas lacking pipeline information, a well-trained model can be used for prediction, effectively narrowing the scope of investigation and reducing the time and cost of blind searches. The provided leak prediction area data can also be overlaid and analyzed with various urban infrastructures in geographic information system software, fully meeting the needs of joint infrastructure management in smart city construction and providing strong technical support for urban safety and sustainable development.
[0108] Based on the same inventive concept, this application also provides an embodiment for implementing the aforementioned urban water supply network leakage detection device. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations of one or more embodiments of the urban water supply network leakage detection device provided below can be found in the limitations of the urban water supply network leakage detection method described above, and will not be repeated here.
[0109] In one exemplary embodiment, such as Figure 8 As shown, a leak detection device for urban water supply networks is provided, comprising:
[0110] The acquisition module 810 is used to acquire raw radar image data;
[0111] Preprocessing module 820 is used to preprocess the original radar image data to obtain polarization decomposition component data and backscattering component data, and to synthesize the polarization decomposition component and the backscattering component into multi-channel image data.
[0112] The construction module 830 is used to construct a deep convolutional neural network model, and to train the deep convolutional network model using the multi-channel image data to obtain a prediction model;
[0113] The output module 840 is used to input the multi-channel image data of the target area to be predicted into the prediction model and output the leakage probability of the target point.
[0114] As an optional implementation, in preprocessing the original radar image data to obtain the backscattering component, the preprocessing module 820 is specifically used for:
[0115] Read the calibration parameters of the original radar image data;
[0116] The backscattering coefficient is calculated based on the calibration parameters;
[0117] Based on the backscattering coefficient, determine the radiometric calibration image that can reflect the true scattering characteristics of ground objects in each polarization channel;
[0118] Based on the radiometrically calibrated image, the average value of the target pixel and its adjacent pixels is calculated to obtain the multi-view processed image.
[0119] The Refined Lee algorithm is used to calculate the average value of each pixel neighbor in the multi-view processed image using a preset moving window to obtain the filtered image;
[0120] The filtered image is geocoded to establish a mapping relationship between radar geometric coordinates and geographic coordinates;
[0121] Spatial interpolation is performed on the geocoded filtered image to generate the backscatter component.
[0122] As an optional implementation, in preprocessing the original radar image data to obtain polarization decomposition components, the preprocessing module 820 is specifically used for:
[0123] Based on the geocoded filtered image, extract the polarization channel components;
[0124] Based on the polarization channel components, a scattering vector is constructed;
[0125] Based on the scattering vector, calculate the covariance matrix and the coherence matrix;
[0126] Based on the coherence matrix, calculate the Entropy component, Anisotropy component, and alpha component;
[0127] Based on the covariance matrix, the volume scattering component, surface scattering component, secondary scattering component, and spiral scattering component are calculated; the entropy component, anisotropy component, alpha component, volume scattering component, surface scattering component, secondary scattering component, and spiral scattering component constitute polarization decomposition component data.
[0128] As an optional implementation, module 830 is specifically used for:
[0129] Construct a deep convolutional neural network model, which includes hidden layers and an output layer;
[0130] Based on the multi-channel image data, multi-channel image slice samples are determined;
[0131] The model training parameters are set, and the multi-channel image slice samples are input into the deep convolutional neural network model. The prediction result is calculated through forward propagation, and the model training parameters are optimized through backpropagation until the deep convolutional neural network model converges. The converged deep convolutional neural network model is the prediction model.
[0132] As an optional implementation, in constructing the deep convolutional neural network model, the construction module 830 is specifically used for:
[0133] Based on activation function layers, two-dimensional convolutional layers, and normalization layers, a basic combination layer and a downsampling layer are constructed. The basic combination layer is used to perform preliminary feature extraction and transformation, and the downsampling layer is used to perform feature map downsampling.
[0134] Based on the basic combination layer and the downsampling layer, a multi-channel input structure is constructed;
[0135] Based on the multi-channel input structure, a channel attention module is embedded in the hidden layer for channel attention processing. By extracting the mean and maximum value of each channel, a weight vector is generated to enhance the information weight of key feature channels.
[0136] The spatial attention module calculates the pixel position weights and performs spatial dimension weighting on the feature map after channel attention processing to enhance the spatial detail representation of the leakage-related areas.
[0137] Based on the compressed channel dimension of the fully connected layer, the feature map after spatial dimension weighting is mapped to the probability prediction results of leakage and non-leakage.
[0138] As an optional implementation, the output module 840 is specifically used for:
[0139] Acquire multi-channel image data of the target area to be predicted;
[0140] Based on preset extraction rules, image samples are extracted from the multi-channel image data to be predicted.
[0141] The image samples are input into the prediction model with the weight file loaded for network operation, and a two-dimensional array result is output, which corresponds to the predicted value of each image sample.
[0142] Each element in the two-dimensional array result is mapped to a preset interval [0,1] using the Sigmoid activation function, and the leakage probability and non-leakage probability of each image sample are calculated.
[0143] The leakage probabilities are sorted in descending order, and a leakage probability priority list for each target point is generated based on the sorting results. The high-probability areas that should be checked first are identified based on the leakage probability priority list.
[0144] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 9 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores raw radar image data. The I / O interfaces are used for information exchange between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements a method for detecting leaks in urban water supply networks.
[0145] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0146] In one exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0147] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0148] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0149] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0150] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0151] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0152] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0153] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for detecting leaks in urban water supply networks, characterized in that, The method for detecting leaks in urban water supply networks includes: Acquire raw radar image data; The original radar image data is preprocessed to obtain polarization decomposition component data and backscattering component data, and the polarization decomposition component data and the backscattering component data are combined to form multi-channel image data. A deep convolutional neural network model is constructed, and the deep convolutional network model is trained using the multi-channel image data to obtain a prediction model; The multi-channel image data of the target area to be predicted is input into the prediction model, and the leakage probability of the target point is output.
2. The method for detecting leaks in urban water supply networks according to claim 1, characterized in that, The original radar image data is preprocessed to obtain the backscattering component, including: Read the calibration parameters of the original radar image data; The backscattering coefficient is calculated based on the calibration parameters; Based on the backscattering coefficient, determine the radiometric calibration image that can reflect the true scattering characteristics of ground objects in each polarization channel; Based on the radiometrically calibrated image, the average value of the target pixel and its adjacent pixels is calculated to obtain the multi-view processed image. The Refined Lee algorithm is used to calculate the average value of each pixel neighbor in the multi-view processed image using a preset moving window to obtain the filtered image; The filtered image is geocoded to establish a mapping relationship between radar geometric coordinates and geographic coordinates; Spatial interpolation is performed on the geocoded filtered image to generate the backscatter component.
3. The method for detecting leaks in urban water supply networks according to claim 2, characterized in that, The original radar image data is preprocessed to obtain polarization decomposition components, including: Based on the geocoded filtered image, extract the polarization channel components; Based on the polarization channel components, a scattering vector is constructed; Based on the scattering vector, calculate the covariance matrix and the coherence matrix; Based on the coherence matrix, calculate the Entropy component, Anisotropy component, and alpha component; Based on the covariance matrix, the volume scattering component, surface scattering component, secondary scattering component, and spiral scattering component are calculated; the entropy component, anisotropy component, alpha component, volume scattering component, surface scattering component, secondary scattering component, and spiral scattering component constitute polarization decomposition component data.
4. The method for detecting leaks in urban water supply networks according to claim 1, characterized in that, The construction of the deep convolutional neural network model, which involves training the deep convolutional network model using the multi-channel image data to obtain a prediction model, includes: Construct a deep convolutional neural network model, which includes hidden layers and an output layer; Based on the multi-channel image data, multi-channel image slice samples are determined; The model training parameters are set, and the multi-channel image slice samples are input into the deep convolutional neural network model. The prediction result is calculated through forward propagation, and the model training parameters are optimized through backpropagation until the deep convolutional neural network model converges. The converged deep convolutional neural network model is the prediction model.
5. The method for detecting leaks in urban water supply networks according to claim 4, characterized in that, The construction of the deep convolutional neural network model includes: Based on activation function layers, two-dimensional convolutional layers, and normalization layers, a basic combination layer and a downsampling layer are constructed. The basic combination layer is used to perform preliminary feature extraction and transformation, and the downsampling layer is used to perform feature map downsampling. Based on the basic combination layer and the downsampling layer, a multi-channel input structure is constructed; Based on the multi-channel input structure, a channel attention module is embedded in the hidden layer for channel attention processing. By extracting the mean and maximum value of each channel, a weight vector is generated to enhance the information weight of key feature channels. The spatial attention module calculates the pixel position weights and performs spatial dimension weighting on the feature map after channel attention processing to enhance the spatial detail representation of the leakage-related areas. Based on the compressed channel dimension of the fully connected layer, the feature map after spatial dimension weighting is mapped to the probability prediction results of leakage and non-leakage.
6. The method for detecting leaks in urban water supply networks according to claim 1, characterized in that, The leakage probability is a classification probability, which includes leakage probability and non-leakage probability; the step of inputting the multi-channel image data of the target area to be predicted into the prediction model and outputting the leakage probability of the target point includes: Acquire multi-channel image data of the target area to be predicted; Based on preset extraction rules, image samples are extracted from the multi-channel image data to be predicted. The image samples are input into the prediction model with the weight file loaded for network operation, and a two-dimensional array result is output, which corresponds to the predicted value of each image sample. Each element in the two-dimensional array result is mapped to a preset interval [0,1] using the Sigmoid activation function, and the leakage probability and non-leakage probability of each image sample are calculated. The leakage probabilities are sorted in descending order, and a leakage probability priority list for each target point is generated based on the sorting results. The high-probability areas that should be checked first are identified based on the leakage probability priority list.
7. A leak detection device for urban water supply networks, characterized in that, The urban water supply network leakage detection device includes: The acquisition module is used to acquire raw radar image data; The preprocessing module is used to preprocess the original radar image data to obtain polarization decomposition component data and backscattering component data, and to synthesize the polarization decomposition component and the backscattering component into multi-channel image data. A construction module is used to construct a deep convolutional neural network model, and to train the deep convolutional network model using the multi-channel image data to obtain a prediction model; The output module is used to input the multi-channel image data of the target area to be predicted into the prediction model and output the leakage probability of the target point.
8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the steps of the urban water supply network leakage detection method according to any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the urban water supply network leakage detection method according to any one of claims 1-6.
10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the urban water supply network leakage detection method according to any one of claims 1-6.
Citation Information
Cited By
Water supply pipeline leakage detection method and system based on radar image and deep learning
CN121599966A