Underground water supply pipeline leakage detection method based on convolutional neural network
The convolutional neural network model uses the feature extraction and identification of pipeline leakage vibration signals, which solves the problems of subjectivity and uncertainty in traditional methods, and realizes automated leakage diagnosis and efficient pipeline maintenance.
Patent Information
- Application Number
- CN202410878937.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-11-29
AI Technical Summary
Traditional pipeline leakage diagnosis methods based on feature information extraction have subjectivity and uncertainty, making it difficult to achieve adaptive and efficient leakage feature extraction and aperture recognition.
Using a method based on convolutional neural network, the leakage vibration signal is collected through wireless sensors, and after data preprocessing, it is input into the trained convolutional neural network model, and the model of ResNet18 structure is used for feature extraction and leakage state recognition to achieve automation Leak diagnosis.
Unattended pipeline leakage detection is achieved, the accuracy and efficiency of leakage feature extraction is improved, manual intervention is reduced, and the maintenance efficiency of water supply pipelines is improved.
Smart Images

Figure CN119042544A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of pipeline leakage detection, and in particular to a method for detecting underground water supply pipeline leakage based on a convolutional neural network. Background Art
[0003] Pipeline leakage diagnosis methods based on traditional feature information extraction often require the participation of workers, and it is difficult to achieve adaptive, efficient and accurate extraction of leakage features and leakage aperture identification. The quality of feature information depends on the operator's prior knowledge. Therefore, this type of method has problems such as subjectivity and uncertainty. Based on the technical background of the big data era, deep learning technology can be used to achieve intelligent water management and intelligent leakage diagnosis. The present invention provides a network model with powerful feature characterization capabilities, which is an intelligent leakage diagnosis solution that can automatically extract leakage features and complete leakage diagnosis and identification. Summary of the invention
[0004] To achieve the above objectives, the present application provides a method for detecting underground water supply pipeline leakage based on a convolutional neural network, comprising the following steps:
[0005] Obtain leakage vibration signals, which are collected by wireless sensors installed at collection nodes of water supply pipelines; leakage vibration signals are one-dimensional time series when pipelines leak;
[0006] Performing data preprocessing on the leakage vibration signal to generate two-dimensional positive matrix data;
[0007] Load the water supply pipeline leakage aperture identification model;
[0008] The two-dimensional positive matrix data is input into the water supply pipeline leakage aperture recognition model to obtain the categories of the water supply pipeline leakage aperture, which include: large leakage, medium leakage and small leakage.
[0009] Before loading the water supply pipeline leakage aperture identification model, build the water supply pipeline leakage aperture identification model, including:
[0010] Define the convolutional neural network model;
[0011] The convolutional neural network model is trained, and the parameters and errors in the convolutional neural network model are updated and optimized to achieve an optimal model, which is a water supply pipeline leakage aperture recognition model.
[0012] Among them, the convolutional neural network model is a ResNet18 structure, including: convolution layer, pooling layer, fully connected layer and activation layer, which is composed of eight two-layer residual units.
[0013] Among them, the two-layer residual unit includes an identity mapping X, which is used to deepen the network depth; the output of the residual unit is expressed as: y=F(x)+x; wherein x is a sample data set, F(x) is the output of two convolutions in the residual network, and y is the output of the residual unit.
[0014] Furthermore, training the convolutional neural network model includes:
[0015] Prepare sample data sets, including: test sample data sets and training set labels;
[0016] The test sample data set is input into the convolutional neural network model, and after logical output, a cross entropy comparison is performed with the training set label, and the parameters of the convolutional neural network model are optimized through the loss function; the category of the leakage aperture of the water supply pipe is output through the convolutional neural network model with optimized parameters.
[0017] Among them, data preprocessing includes: standardization processing and normalization processing;
[0018] The calculation method for standardization is: Among them, x is the data sample to be processed, u is the mean of the data sample, and σ is the standard deviation of the data sample;
[0019] The calculation method for normalization is: Among them, x″ is the normalized data sample, x min is the minimum value of the data sample, x max is the minimum value of the data sample.
[0020] Furthermore, data preprocessing also includes matrix mapping processing, which is used to convert the one-dimensional time series into two-dimensional positive matrix data; wherein, the dimension of the two-dimensional positive matrix is greater than the number of data features, and if the data length is insufficient, zero padding is performed in the matrix.
[0021] According to the intelligent water supply pipeline leakage detection method proposed in the present invention, a convolutional neural network is used to extract feature information and identify leakage states of leakage vibration signals of massive water supply pipeline leakages. Through training and learning of data set samples, the network model is autonomously optimized and updated in parameters, thereby realizing pipeline leakage detection in the original leakage signal without the need for human intervention. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 is a step diagram of an underground water supply pipeline leakage detection method provided according to an embodiment of the present invention;
[0023] Figure 2 is a schematic diagram of a two-layer residual unit process provided according to an embodiment of the present invention;
[0024] Figure 3It is a schematic diagram of the three-layer residual unit process;
[0025] Figure 4 It is a schematic diagram of the ResNet18 network structure provided according to an embodiment of the present invention;
[0026] Figure 5 is a step diagram of a training process of a convolutional neural network provided according to an embodiment of the present invention;
[0027] Figure 6 This is a schematic diagram of the standard convolutional neural network structure;
[0028] Figure 7 This is an example diagram of maximum pooling and mean pooling in the convolutional neural network structure;
[0029] Figure 8 It is a schematic diagram of the fully connected layer structure in the convolutional neural network structure;
[0030] Fig. 9 It is a graph representing the Sigmoid function and its derivative in the convolutional neural network structure;
[0031] Fig.10 It is a graph showing the Tanh function and its derivatives in the convolutional neural network structure;
[0032] Fig.11 It is a graph showing the ReLU function and its derivative in the convolutional neural network structure. DETAILED DESCRIPTION
[0033] In response to the maintenance needs of underground water supply pipelines, the present invention installs wireless sensors on the water supply pipelines to collect data, and centrally transmits the collected data to the cloud for unified analysis; the present invention uses an optimized convolutional neural network to perform deep learning on vibration signals generated when there is no leakage or various types of leakage, which can be used to detect pipeline leakage during the maintenance of underground water supply pipelines.
[0034] The specific implementation of the present invention is described in detail below with reference to the accompanying drawings.
[0035] Figure 1 A step diagram of an underground water supply pipeline leakage detection method is provided, as shown in the figure, including the following steps:
[0036] Step S100: data collection, obtaining leakage vibration signals;
[0037] The leakage vibration signal in this step is collected by a wireless sensor installed at a collection node of the underground water supply pipeline. The collected leakage vibration signal is a one-dimensional time series data when the pipeline leaks.
[0038] In the present invention, the collected leakage vibration signal is transmitted to the cloud through the network transmission device of the wireless sensor for subsequent processing and application.
[0039] Step S110: Data preprocessing:
[0040] In this step, the leakage vibration signal collected from the water supply pipeline is preprocessed, and the one-dimensional time series data is standardized and converted into a two-dimensional positive matrix.
[0041] Specifically, data preprocessing includes: standardization processing, normalization processing and matrix mapping processing.
[0042] In general, the environment in which water supply pipes leak is very complex. In the data of the collected vibration signals of water supply pipe leakage, there are a large number of abnormal values and outliers, and the value difference of the data is relatively large, which has an adverse effect on the recognition accuracy and convergence of the leakage aperture identification model. Therefore, the data needs to be standardized and normalized in turn.
[0043] The calculation method for standardization is: Among them, x is the data sample to be processed, u is the mean of the data sample, σ is the standard deviation of the data sample, and x′ is the standardized data sample.
[0044] The calculation method for normalization is: Among them, x″ is the normalized data sample, x min is the minimum value of the data sample, x max is the minimum value of the data sample.
[0045] After the data samples are normalized, matrix mapping is performed on each data, that is, the data samples in the form of one-dimensional time series are converted into an n×n matrix. The matrix dimension must be greater than the number of data features. If the data length is not enough, the matrix is insufficient and a zero-filling operation is performed.
[0046] Step S120: loading a water supply pipeline leakage aperture identification model;
[0047] In this step, the trained water supply pipeline leakage aperture recognition model is loaded for subsequent input of two-dimensional leakage vibration signals to obtain leakage status and leakage type.
[0048] Before loading the water supply pipeline leakage aperture identification model, a water supply pipeline leakage aperture identification model is constructed, including:
[0049] 1) Define the convolutional neural network model;
[0050] Convolutional neural networks are widely used in image processing, fault diagnosis and detection tasks. Convolutional neural networks are multi-layer convolutional network structures that can autonomously learn the hierarchical features of input data. The low-level convolutional layers learn to extract the summary features of the data, while the high-level convolutional layers fuse the summary features of the low-level layers into abstract feature information, and then perform classification and recognition based on the abstract feature information processing. Figure 6 It provides a classic convolutional neural network structure. The general structure of a convolutional neural network includes convolutional layers, activation layers, pooling layers, fully connected layers, etc. Among them, the convolutional layers, activation layers, and pooling layers are feature extraction layers, and the fully connected layers are classification layers.
[0051] The convolution layer is one of the basic unit structures of the convolutional neural network. It is a network structure that extracts features from the input data. The convolution kernel can be used to perform sliding convolution operations on the local area of the input data to extract the corresponding features. The convolution layer has the characteristic of weight sharing, which can reduce the parameters of its network and help avoid overfitting caused by too many parameters. The convolution operation can be expressed as: in, is the i-th convolved local area of the l-th layer, is the j′th weight of the ith convolution kernel of the lth layer, and W is the length of the convolution kernel.
[0052] The pooling layer is used to reduce the number of neurons in the feature map below the convolution layer, that is, to reduce the size of the feature map, thereby reducing the dimension of the data, which can easily lead to overfitting, but the feature map after pooling is robust to changes in the position of the input data. The pooling layer is used between two convolutional layers to select feature maps, reduce the data dimension of the feature map, and retain effective global information.
[0053] Commonly used pooling methods include maximum pooling and average pooling. The general pooling size is 2×2. Maximum pooling is to find the maximum value in the area, which can be expressed as The average value is the mean value in the region, which can be expressed as Among them, p l(i,t) is the pooled output value of the lth layer, W is the width of the pooled area, a l(i,j) Output y of the convolutional layer l(i,j) The activation value of Figure 7 Examples of maximum pooling and mean pooling.
[0054] The fully connected layer is used to classify the extracted features: the output value of the last pooling layer is stretched into a one-dimensional feature vector as the input of the fully connected layer. The activation function is hidden in the fully connected layer. The activation function of the last layer is the activation Softmax function, which currently converts the input neuron value into a probability distribution. Its structure is as follows Figure 8 As shown. The forward propagation of the fully connected layer can be expressed as: Among them, O l+1 is the output value of the jth neuron in the l+1th layer, is the weight between the lth neuron and the l+1th neuron in the layer, is the bias value of the lth neuron to the l+1th neuron in the layer.
[0055] The activation layer is an indispensable and important part of the network structure. The activation function is used to perform nonlinear transformation on the output value of each convolution. The purpose is to enhance the nonlinear expression ability of the network structure, because linear operations can only play the role of linear mapping and cannot form complex functions. Since the training of neural networks generally uses the error back propagation algorithm, the activation function must be differentiable. Commonly used activation functions in deep learning networks are Sigmoid function, Tanh function, ReLU function, etc.
[0056] The Sigmoid function is the most common activation function used in neural networks: Fig. 9 The Sigmoid function can convert the amplitude of the input data to between 0 and 1. Its disadvantage is that there are problems of gradient disappearance and gradient explosion in network training. Its function is expressed as: like Fig. 9 The value range of the derivative of the Sigmoid function is between 0 and 0.25. When the absolute value of x increases, the value of its derivative approaches zero. The derivative of the Sigmoid function is expressed as:
[0057] The expression of the tanh function is: like Fig.10 As shown in the figure, this function can convert the amplitude of the input data to between -1 and 1. The training convergence speed is faster than that of the Sigmoid function, but it does not solve the problem of the faster gradient vanishing of the Sigmoid function. The value of its derivative also approaches zero as the absolute value of increases. Its derivative expression is:
[0058] The ReLU activation function is widely used in the field of deep learning algorithms, such as Fig.11 As shown, its principle is to output negative values as 0, and its function expression is The derivative expression is Since the derivative of the activation function is always 1, it can overcome the gradient diffusion phenomenon that occurs when the error value of the training process is large or cannot decrease as the number of network layers increases.
[0059] At present, as the computing power of computers increases, the number of convolutional network layers of the model continues to increase, but there is a problem that when the number of convolutional network layers continues to increase, the effect is not very good. In the present invention, an 18-layer residual neural network model (ResNet18) is constructed using eight two-layer residual units.
[0060] The residual unit is the main component of the residual neural network, and its structure is divided into two layers of residual units (such as Figure 2 ) and three-layer residual units (as shown Figure 3 As shown); the two-layer residual unit has fewer network layers and is generally used in models with fewer network layer requirements. This unit can reduce the number of parameters for model training and recognition, thereby reducing the amount of model calculations; but the three-layer residual unit has more network layers and is mostly used in models with more network layers. Therefore, the present invention uses two-layer residual units to construct a convolutional neural network.
[0061] Among them, the two-layer residual unit includes an identity mapping X, which is used to deepen the network depth; the output of the residual unit is expressed as: y=F(x)+x; wherein x is a sample data set, F(x) is the output of two convolutions in the residual network, and y is the output of the residual unit.
[0062] In the present invention, eight two-layer residual units are used to construct an 18-layer residual neural network model (ResNet18), and its network structure is as follows: Figure 4 As shown, the network structure adopted by the present invention can compensate the weight of the shallow network for the weight of the deep network, improve the gradient diffusion problem, and has a very powerful representation ability.
[0063] 2) After the structure of the convolutional neural network model is determined, the convolutional neural network model is trained, and the parameters and errors in the convolutional neural network model are updated and optimized to achieve the optimal model. The optimal model finally generated by training is the water supply pipeline leakage aperture recognition model.
[0064] The process of training the convolutional neural network model is as follows: Figure 5 As shown, the following steps are included:
[0065] The sample data set includes: a test sample data set and a training set label, wherein the test sample data set is a leakage vibration signal converted into a two-dimensional positive matrix, and the training set label is a label corresponding to the leakage vibration signal, and its content includes the type of leakage aperture, including: large leakage, medium leakage and small leakage.
[0066] The test sample data set is input into the convolutional neural network model, and after logical output, a cross entropy comparison is performed with the training set label, and the parameters of the convolutional neural network model are optimized through the loss function; the category of the leakage aperture of the water supply pipe is output through the convolutional neural network model with optimized parameters.
[0067] Step S130: input the two-dimensional positive matrix data output in step S110 into the water supply pipeline leakage aperture recognition model to obtain the categories of the water supply pipeline leakage aperture, and the recognized categories include: large leakage, medium leakage and small leakage.
[0068] In the present invention, the vibration signal characteristics generated by the water supply pipe leakage are used as test samples and the leakage aperture type is used as the training set label. Through deep learning through an optimized convolutional neural network, a water supply pipe leakage aperture recognition model is trained. It is possible to autonomously and adaptively extract feature information from the original leakage signal data to realize leakage detection without human intervention, thereby improving the maintenance efficiency of the water supply pipe.
[0069] The above disclosures are only several specific embodiments of the present invention; however, the present invention is not limited thereto, and any changes that can be conceived by those skilled in the art should fall within the protection scope of the present invention.
Claims
1. A method for detecting underground water supply pipeline leakage based on convolutional neural network, characterized in that: The following steps are involved: Acquire a leakage vibration signal, wherein the leakage vibration signal is collected by a wireless sensor, and the wireless sensor is installed at a collection node of a water supply pipeline; the leakage vibration signal is a one-dimensional time series when the pipeline leaks; Performing data preprocessing on the leakage vibration signal to generate pipeline leakage two-dimensional positive matrix data; Load the water supply pipeline leakage aperture identification model; The two-dimensional positive matrix data is input into the water supply pipeline leakage aperture recognition model to obtain the categories of the water supply pipeline leakage aperture, which categories include: large leakage, medium leakage and small leakage.
2. The underground water supply pipeline leakage detection method according to claim 1, characterized in that: Before loading the water supply pipeline leakage aperture identification model, build a water supply pipeline leakage aperture identification model, including: Define the convolutional neural network model; The convolutional neural network model is trained, and the parameters and errors in the convolutional neural network model are updated and optimized to achieve an optimal model, which is a water supply pipeline leakage aperture identification model.
3. The underground water supply pipeline leakage detection method according to claim 2, characterized in that: The convolutional neural network model is a ResNet18 structure consisting of eight two-layer residual units, including: a convolutional layer, a pooling layer, a fully connected layer and an activation layer.
4. The underground water supply pipeline leakage detection method according to claim 2, characterized in that: The two-layer residual unit includes an identity mapping X, which is used to deepen the network depth; The output of the residual unit is expressed as: y=F(x)+x; wherein x is a sample data set, F(x) is the output of two convolutions in the residual network, and y is the output of the residual unit.
5. The underground water supply pipeline leakage detection method according to claim 4, characterized in that: The training of the convolutional neural network model includes: The sample data set includes: a test sample data set and a training set label; The test sample data set is input into the convolutional neural network model, and after logical output, a cross entropy comparison is performed with the training set label, and the parameters of the convolutional neural network model are optimized through a loss function; the category of the leakage aperture of the water supply pipeline is output through the convolutional neural network model with optimized parameters.
6. The underground water supply pipeline leakage detection method according to claim 1, characterized in that: The data preprocessing includes: standardization processing and normalization processing; The calculation method of the standardization process is: Among them, x is the data sample to be processed, u is the mean of the data sample, and σ is the standard deviation of the data sample; The calculation method of the normalization process is: Among them, x″ is the normalized data sample, x min is the minimum value of the data sample, x max is the minimum value of the data sample.
7. The underground water supply pipeline leakage detection method according to claim 1, characterized in that: The data preprocessing also includes matrix mapping processing, which is used to convert the one-dimensional time series into two-dimensional positive matrix data; wherein the dimension of the two-dimensional positive matrix is greater than the number of data features, and if the data length is insufficient, zero padding is performed in the matrix.
