A sewer pipe clogging disease intelligent diagnosis method
By optimizing the temporal and spatial feature extraction network model using deep learning and particle swarm optimization, the problem of low efficiency in drainage pipe siltation detection is solved, achieving high-precision siltation identification and thickness prediction.
Patent Information
- Application Number
- CN202411720299.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2044-11-27
AI Technical Summary
Existing methods for detecting siltation in drainage pipes lack automation and intelligence, resulting in low detection efficiency and difficulty in meeting the needs of modern urban management. Furthermore, traditional methods have limitations in adapting to various working conditions, improving diagnostic efficiency, and reducing reliance on manual labor.
A deep learning-based approach is adopted, combining convolutional neural networks and gated recurrent units. One-dimensional time-series data is converted into two-dimensional image data through Gram angle and field data processing modules. Hyperparameters are optimized by combining particle swarm optimization algorithm to construct a time-space feature extraction network model, thereby achieving the organic integration of spatial and temporal features.
It improves the accuracy of drainage pipe siltation diagnosis, enabling more accurate identification of siltation length and thickness, reducing reliance on manual feature extraction, and increasing detection efficiency.
Smart Images

Figure CN119669849B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent operation and maintenance technology of municipal drainage pipe networks, and relates to an intelligent diagnosis method for drainage pipe siltation defects. Background Technology
[0002] Underground drainage pipes are a critical component of urban geographic infrastructure, directly impacting the normal operation of cities. Studies show that in some Chinese cities, an average of 12 functional defects exist per kilometer of drainage pipes, with siltation-related defects accounting for over 80%. Poor drainage due to pipe siltation has become one of the main causes of urban flooding. However, quickly and effectively diagnosing siltation points in drainage pipes remains a significant challenge in the operation and maintenance of geographic infrastructure. Currently, the detection of pipe siltation problems mainly relies on regular inspections, lacking support from automated and intelligent methods. Therefore, existing drainage pipe siltation inspection work is inefficient and fails to meet the needs of modern urban management.
[0003] Existing non-destructive testing methods for siltation in drainage pipes mainly include X-ray inspection, ultrasonic testing, infrared thermography, and target detection. X-ray inspection utilizes gamma rays or X-rays, emitting rays from a radiation source and collecting the data via film or detectors to generate cross-sectional images of the pipe. While this method offers high image resolution and recognition accuracy, it suffers from low diagnostic efficiency, limited applicability, and the risk of radiation contamination. Target detection relies on portable closed-circuit television (CCTV) equipment to assess siltation by taking photos or videos inside the pipe. This method is suitable for pipe sections not at full water levels and provides high-resolution images, but requires significant manual operation. Ultrasonic testing uses high-frequency sound waves to detect siltation within pipes, offering high resolution and sensitivity, particularly suitable for large pipes. However, this method is prone to errors when there are large differences in acoustic impedance. Infrared thermography assesses siltation distribution by detecting the infrared thermal radiation of objects, but its diagnostic accuracy is easily affected by ambient temperature. These traditional methods still have limitations in adapting to various operating conditions, improving diagnostic efficiency, and reducing manual reliance.
[0004] In recent years, with the rapid development of artificial intelligence, the application of deep learning in solving complex engineering problems has received widespread attention, including its application in the diagnosis of urban pipeline siltation. Deep learning can automatically extract complex and representative features from data through adaptive learning, significantly reducing the reliance on manual feature extraction. The neural networks in deep learning originate from the gradual evolution of multilayer perceptrons and can learn deep nonlinear networks, thereby achieving the fitting of complex functions. By extracting shallow features and recombinating them to form deep abstract features, deep learning can more accurately describe data characteristics and is suitable for various tasks such as object recognition, image segmentation, classification, regression, and noise reduction.
[0005] In the field of pipeline siltation diagnosis, there are two main intelligent approaches: one is a diagnostic method combining target recognition and image segmentation, and the other is a diagnostic method based on feature extraction and result classification. The former typically requires image acquisition and analysis using CCTV technology, but due to the limitations of CCTV technology, this method is inefficient and struggles to achieve accurate diagnosis under full water level conditions. On the other hand, by applying methods such as recurrent neural networks and one-dimensional convolutional neural networks, the flow velocity and flow characteristics at the pipeline inlet and outlet can be deeply analyzed, thereby effectively determining the siltation status of drainage pipelines.
[0006] Currently, commonly used feature extraction neural networks mainly include convolutional neural networks (CNNs) and recurrent neural networks (RNNs). CNNs excel at extracting deep semantic information, but when applying one-dimensional convolution to process flow velocity and volume data at pipe inlets and outlets, the spatial correlation of the original sequence may be destroyed, leading to the loss of crucial information about pipe congestion. Furthermore, although one-dimensional convolution can reduce network parameters, it fails to fully leverage the advantages of CNNs in feature extraction, and cannot comprehensively capture the spatial feature information of pipe congestion. In contrast, two-dimensional convolution has a larger receptive field, enabling more comprehensive feature extraction and effectively addressing overfitting issues during training.
[0007] While convolutional neural networks (CNNs) excel at spatial feature extraction, they are relatively weak at capturing time-dependent features, especially time-series data. Conversely, recurrent neural networks (RNNs) demonstrate a clear advantage in extracting features related to long-term dependencies in sequences. Therefore, combining the strengths of both CNNs and RNNs to extract comprehensive information that incorporates both spatial and temporal features is crucial for improving the accuracy of pipeline siltation diagnosis.
[0008] In model training, the setting of hyperparameters has a significant impact on the model's accuracy. These hyperparameters include the number of convolutional kernels, the number of hidden layers in a recurrent neural network, and the learner's learning rate and weight decay. In particular, the selection of parameters such as the learning rate often requires manual adjustment of different values and repeated training to meet prediction requirements. However, this method is not only inefficient, but also difficult to exhaust all possibilities due to the large range of values for parameters such as the learning rate. Therefore, effectively finding suitable learning rate and weight decay values has become one of the key challenges in improving the accuracy of pipeline siltation diagnosis.
[0009] Therefore, it is necessary to develop an intelligent diagnostic method for siltation defects in drainage pipes. Summary of the Invention
[0010] To address the aforementioned problems, this invention proposes an intelligent diagnostic method for drainage pipe siltation based on deep learning and machine learning, which can improve the accuracy of the intelligent diagnostic model for drainage pipe siltation.
[0011] The technical solution adopted in this invention is as follows: An intelligent diagnostic method for siltation defects in drainage pipes, comprising the following steps:
[0012] Step S1: Using a full-scale experiment on the drainage pipe, collect one-dimensional time-series data of flow velocity and flow rate at upstream and downstream nodes of the drainage pipe, and record the siltation length and siltation thickness of the drainage pipe.
[0013] Step S2: Based on the one-dimensional time series data collected in step S1, the one-dimensional time series data of flow velocity and flow rate of upstream and downstream nodes of the drainage pipeline are converted into two-dimensional image data with spatial information using a data processing module based on Gram angle and field.
[0014] Step S3: Based on the one-dimensional time-series data collected in step S1, the two-dimensional image data converted in step S2, and the siltation length and siltation thickness of the drainage pipe recorded in step S1, a dataset containing siltation information of the drainage pipe is created to obtain time information and spatial information.
[0015] Step S4: Extract the temporal and spatial information of the dataset in Step S3, and build a convolutional layer by combining convolution, batch normalization and leakage rectifier unit function. Use max pooling layer to extract important spatial information to realize the construction of convolutional neural network.
[0016] Step S5: Combine the convolutional neural network in step S4 to extract the spatial information of the dataset in step S3, and combine it with the gated recurrent unit to extract the temporal information of the dataset. Use the convolutional neural network and the gated recurrent unit to build a temporal and spatial feature extraction network model, fuse the temporal and spatial information in the extracted dataset, and use a fully connected layer to integrate the fused temporal and spatial information to output the result.
[0017] Step S6: Using particle swarm optimization, adaptive inertial weights, and mutation operations, construct an adaptive mutation particle swarm optimization algorithm to find the optimal hyperparameters of the adaptive moment estimation optimizer; and train the time-space feature extraction network model built in step S5.
[0018] Step S7: Using the time-space feature extraction network model trained in step S6, input the flow velocity and flow rate of the upstream and downstream nodes of the drainage pipe into the trained time-space feature extraction network model to obtain whether the drainage pipe is silted up and the length and thickness of the siltation inside the drainage pipe.
[0019] Step S1: Using a full-scale experiment on the drainage pipe, collect one-dimensional time-series data of flow velocity and flow rate at upstream and downstream nodes of the drainage pipe, and record the siltation length and siltation thickness of the drainage pipe.
[0020] Step S2: Based on the one-dimensional time series data collected in step S1, the one-dimensional time series data of flow velocity and flow rate of upstream and downstream nodes of the drainage pipeline are converted into two-dimensional image data with spatial information using a data processing module based on Gram angle and field.
[0021] Step S3: Based on the one-dimensional time-series data collected in step S1, the two-dimensional image data converted in step S2, and the siltation length and siltation thickness of the drainage pipe recorded in step S1, a dataset containing siltation information of the drainage pipe is created to obtain time information and spatial information.
[0022] Step S4: Extract the temporal and spatial information of the dataset in Step S3, and build a convolutional layer by combining convolution, batch normalization and leakage rectifier unit function. Use max pooling layer to extract important spatial information to realize the construction of convolutional neural network.
[0023] Step S5: Combine the convolutional neural network in step S4 to extract the spatial information of the dataset in step S3, and combine it with the gated recurrent unit to extract the temporal information of the dataset. Use the convolutional neural network and the gated recurrent unit to build a temporal and spatial feature extraction network model, fuse the temporal and spatial information in the extracted dataset, and use a fully connected layer to integrate the fused temporal and spatial information to output the result.
[0024] Step S6: Using particle swarm optimization, adaptive inertial weights, and mutation operations, construct an adaptive mutation particle swarm optimization algorithm to find the optimal hyperparameters of the adaptive moment estimation optimizer; and train the time-space feature extraction network model built in step S5.
[0025] Step S7: Using the time-space feature extraction network model trained in step S6, input the flow velocity and flow rate of the upstream and downstream nodes of the drainage pipe into the trained time-space feature extraction network model to obtain whether the drainage pipe is silted up and the length and thickness of the siltation inside the drainage pipe.
[0026] Further, in step S21, based on the one-dimensional time-series data collected in step S1, the flow velocities and flow rates of the upstream and downstream nodes of the drainage pipeline are normalized to the interval [-1,1] according to formula (1); given a set of upstream or downstream node flow velocity time-series sequences, V={v1,v2,...,v n}, ν1 is the first velocity time series, ν2 is the second velocity time series, ν nFor the nth velocity time series, the velocity time series V is normalized to the interval [-1, 1] according to formula (1). The normalized velocity time series is denoted as V. This is the first normalized flow velocity time series. This is the second normalized flow velocity time series. This is the nth normalized flow velocity time series;
[0027]
[0028] In the formula, For the i-th normalized flow velocity time series, v i Let V be the i-th velocity time series, max(V) be the maximum value of the velocity time series, and min(V) be the minimum value of the velocity time series.
[0029] Step S22, normalize the flow velocity time series from step S21. Transform to polar coordinates using formula (2):
[0030]
[0031] In the formula, Let r be the polar angle corresponding to the i-th normalized velocity time series, and t be the polar radius. i For timestamps, M is the regularization constant for polar coordinates;
[0032] Step S23: Based on the polar angle obtained in step S22, use formula (3) to normalize the velocity time series. Encode the data to obtain two-dimensional image data with spatial information:
[0033]
[0034] In the formula, GASF is two-dimensional image data with spatial information. Let represent the polar angles corresponding to the i-th normalized flow velocity time series and the j-th normalized flow velocity time series, respectively.
[0035] Further, in step S41, the convolutional kernel in the convolutional layer performs a dot product operation with the input two-dimensional image data containing spatial information for each local region to generate a new value, and uses the new value as a pixel in the data mapping map; the operation formula is as follows:
[0036]
[0037] In the formula, y e,k Let w represent the output features at positions e (horizontal coordinate) and k (vertical coordinate) on the data mapping graph, where m and n are the width and height of the convolutional kernel, respectively.u,v The parameters at the x-coordinate u and y-coordinate v of the convolution kernel, x e-u+1,k-v+1 The input features for the data mapping graph;
[0038] In step S42, the convolution kernel performs the same operation as in step S41 on the two-dimensional image of multiple local regions in a sliding manner; and merges them into a data mapping map, namely feature map F1.
[0039] Step S43: After processing the feature map F1 obtained in step S42 through formulas (5) to (8), the data mapping map conforms to a normal distribution with a mean of 0 and a variance of 1, and the feature map F2 is obtained.
[0040]
[0041] In the formula, μ is the mean of each batch of data in the data mapping graph, l is the length of each batch of data in the data mapping graph, and x i Let σ be the i-th data item in the data sequence of the data mapping graph. 2 The variance of each batch of data in the data mapping graph. Let y be the i-th data point after normalization in the data mapping graph, where ε is a constant term. i For the i-th output term of the normalization layer, γ and β are the learnable scaling and bias parameters, respectively;
[0042] The feature map F2 obtained in steps S44 and S43 is processed by the leakage rectification unit function to obtain feature map F3; feature map F3 is the output feature of the first convolutional layer data map; a parameter is added to the leakage rectification unit function so that the output is no longer always 0 when the input is less than 0. The expression of the leakage rectification unit function is shown in formula (9):
[0043]
[0044] In the formula, f(x) represents the output characteristic of the leakage rectifier unit function operation; x represents the input characteristic of the leakage rectifier unit function operation; and α represents a value between (0,1).
[0045] In step S45, the feature map F3 output from step S44 is processed by a max pooling layer to obtain feature map F4; the formula for the max pooling layer is shown in formula (10):
[0046]
[0047] In the formula, y e,k Let R be the output feature of the max pooling layer at spatial location (e,k). e,k For the pooling region at spatial location (e,k), x p,q Represents the pooling region R e,kThe pixel value at position (p, q);
[0048] Step S46: Using the convolutional layer from step S41 and the max pooling layer from step S45, the convolutional neural network is constructed.
[0049] Further, in step S51, using the convolutional neural network built in step S4, the image data in the dataset of drainage pipe siltation information in step S3 is input to realize spatial information extraction, and the feature map F5 is output after passing through the convolutional neural network;
[0050] Step S52: Add a gated loop unit to extract time information from the dataset. Extract time features from the one-dimensional time-series data of the drainage pipe siltation information dataset in Step S3 to obtain the feature vector F. T The gated loop unit is shown in equations (11) to (14):
[0051] r t =σ(w r *[h t-1 ,x t ]) (11);
[0052] z t =σ(w z *[h t-1 ,x t ]) (12);
[0053]
[0054] h t =(1-z) t )*h t-1 +z t *h t (14);
[0055] In the formula, r t z t These represent resetting the gate and updating the gate state, respectively. σ is the sigmoid activation function, and w... r w z and w h Let x be the weight matrix. t Let the input vector be the input vector at the current time. Let h be the candidate hidden state, tanh be the hyperbolic tangent function, and h be the hidden state. t and h t-1 These are the state memory variables for the current time and the previous time, respectively;
[0056] Step S53: Flatten the feature map F5 extracted in step S51 to obtain the feature vector F. S and with the feature vector F from step S52 TBy concatenating temporal and spatial information, the fused feature vector F is obtained. ST ;
[0057] Step S54, fuse the feature vector F obtained in step S53 ST The input is fed into different fully connected layers. There are two fully connected layers: one is used to determine whether siltation has occurred in the drainage pipe, and the other is used to predict the length and thickness of siltation in the drainage pipe.
[0058] Further, in step S61, the learning rate, weight decay, exponential decay rate of the first moment estimate, and exponential decay rate of the second moment estimate are used as optimization hyperparameters of the adaptive mutation particle swarm optimization algorithm. The range of the optimal hyperparameters of the adaptive moment estimation optimizer and the particle velocity are given, and the maximum number of iterations and the maximum particle flight speed are set.
[0059] Step S62: Determine a function that allows the particles to reach the standard state. Find the optimal solution for each particle through its motion, called the individual optimal solution. Then, derive the optimal solution for all particles in this step through the individual optimal solutions of each particle, called the current global optimal solution. Compare the current global optimal solution with the historical global optimal solutions, select the better solution, and update it.
[0060] Step S63: Based on the current global optimal solution in step S62, the inertia weight ω is adaptively adjusted using formula (15);
[0061]
[0062] In the formula, w is the inertia weight, t is the number of iterations, and w max w min These are the maximum and minimum values of the inertia weight, respectively. Let f be the objective function value for the i-th particle in the t-th iteration, which is the loss difference between the predicted and actual siltation states. min f avg The minimum and average target values for all current particles;
[0063] Step S64: Based on the particle's current flight speed, the inertial weight obtained in step S63, and the current global optimal solution and individual optimal solution obtained in step S62, update the particle's own speed as shown in formula (16):
[0064]
[0065] In the formula, Let be the velocity of the i-th particle at iteration number t+1. Let be the velocity of the i-th particle after t iterations, c1 and c2 be learning factors, and r1 and r2 be random numbers between [0,1]. Let be the best position experienced by the i-th particle. Let be the position vector of the i-th particle at iteration number t. This represents the best position experienced by the entire particle swarm in the solution space;
[0066] Step S65: Update the particle's velocity using the method from step S64, and update the particle's position using mutation and conventional operations; the mutation operation formula (17) is shown, and the conventional operation formula (18) is shown:
[0067]
[0068] In the formula, Let be the position vector of the i-th particle at iteration number t+1. Let be the position vector of the i-th particle at iteration number t, and rand be a random number between [0,1]. Let be the flight speed of the i-th particle at iteration number t+1;
[0069] Step S66: When the number of iterations reaches the set maximum number of iterations, or the global optimal solution reaches the set minimum boundary, the adaptive mutant particle swarm optimization algorithm terminates; obtain the optimal learning rate, weight decay, exponential decay rate of the first moment estimate, and exponential decay rate of the second moment estimate.
[0070] The beneficial effects of this invention are as follows: First, a data processing module based on Gram angles and fields converts one-dimensional data into two-dimensional image data, which not only preserves temporal information but also enhances the spatial structural features of the data. Subsequently, a convolutional neural network is used to process the converted two-dimensional image data to extract its spatial features; simultaneously, a gated recurrent unit is combined to effectively capture temporal features, achieving an organic fusion of spatial and temporal features. Furthermore, an adaptive mutation particle swarm optimization algorithm is introduced into the model to automatically optimize the key parameters of the adaptive moment estimation optimizer, thereby improving the accuracy of the intelligent diagnostic model for drainage pipe siltation. Attached Figure Description
[0071] Figure 1 This is a data processing flowchart of the method of the present invention;
[0072] Figure 2 This is a schematic diagram of convolution in this invention;
[0073] Figure 3 This is the gated loop unit of the present invention;
[0074] Figure 4This is a network model diagram of the present invention. Detailed Implementation
[0075] like Figure 1 As shown, an intelligent diagnostic method for drainage pipe siltation defects is characterized by the following steps:
[0076] Step S1: Using a full-scale experiment on the drainage pipe, collect one-dimensional time-series data of flow velocity and flow rate at upstream and downstream nodes of the drainage pipe, and record the siltation length and siltation thickness of the drainage pipe.
[0077] Step S2: Based on the one-dimensional time series data collected in step S1, the one-dimensional time series data of flow velocity and flow rate of upstream and downstream nodes of the drainage pipeline are converted into two-dimensional image data with spatial information using a data processing module based on Gram angle and field.
[0078] Step S3: Based on the one-dimensional time-series data collected in step S1, the two-dimensional image data converted in step S2, and the siltation length and siltation thickness of the drainage pipe recorded in step S1, a dataset containing siltation information of the drainage pipe is created to obtain time information and spatial information.
[0079] Step S4: Extract the temporal and spatial information of the dataset in Step S3, and build a convolutional layer by combining convolution, batch normalization and leakage rectifier unit function. Use max pooling layer to extract important spatial information to realize the construction of convolutional neural network.
[0080] Step S5: Combine the convolutional neural network in step S4 to extract the spatial information of the dataset in step S3, and combine it with the gated recurrent unit to extract the temporal information of the dataset. Use the convolutional neural network and the gated recurrent unit to build a temporal and spatial feature extraction network model, fuse the temporal and spatial information in the extracted dataset, and use a fully connected layer to integrate the fused temporal and spatial information to output the result.
[0081] Step S6: Using particle swarm optimization, adaptive inertial weights, and mutation operations, construct an adaptive mutation particle swarm optimization algorithm to find the optimal hyperparameters of the adaptive moment estimation optimizer; and train the time-space feature extraction network model built in step S5.
[0082] Step S7: Using the time-space feature extraction network model trained in step S6, input the flow velocity and flow rate of the upstream and downstream nodes of the drainage pipe into the trained time-space feature extraction network model to obtain whether the drainage pipe is silted up and the length and thickness of the siltation inside the drainage pipe.
[0083] The intelligent diagnostic method for drainage pipe siltation according to claim 1 is characterized in that: in step S2, data is converted and datasets are created using an open-source library;
[0084] Step S21: Based on the one-dimensional time-series data collected in step S1, normalize the flow velocities and flow rates of the upstream and downstream nodes of the drainage pipeline to the interval [-1, 1] according to formula (1); given a set of upstream or downstream node flow velocity time-series sequences, V = {v1, v2, ..., v n}, ν1 is the first velocity time series, ν2 is the second velocity time series, ν n For the nth velocity time series, the velocity time series V is normalized to the interval [-1, 1] according to formula (1). The normalized velocity time series is denoted as V. This is the first normalized flow velocity time series. This is the second normalized flow velocity time series. This is the nth normalized flow velocity time series;
[0085]
[0086] In the formula, For the i-th normalized flow velocity time series, v i Let V be the i-th velocity time series, max(V) be the maximum value of the velocity time series, and min(V) be the minimum value of the velocity time series.
[0087] Step S22, normalize the flow velocity time series from step S21. Transform to polar coordinates using formula (2):
[0088]
[0089] In the formula, Let r be the polar angle corresponding to the i-th normalized velocity time series, and t be the polar radius. i For timestamps, M is the regularization constant for polar coordinates;
[0090] Step S23: Based on the polar angle obtained in step S22, the normalized flow velocity time series V is encoded using formula (3) to obtain two-dimensional image data with spatial information.
[0091]
[0092] In the formula, GASF is two-dimensional image data with spatial information. Let represent the polar angles corresponding to the i-th normalized flow velocity time series and the j-th normalized flow velocity time series, respectively.
[0093] Further, in step S41, the convolutional kernel in the convolutional layer performs a dot product operation with the input two-dimensional image data containing spatial information for each local region to generate a new value, and uses the new value as a pixel in the data mapping map; the operation formula is as follows:
[0094]
[0095] In the formula, y e,k Let w represent the output features at positions e (horizontal coordinate) and k (vertical coordinate) on the data mapping graph, where m and n are the width and height of the convolutional kernel, respectively. u,v The parameters at the x-coordinate u and y-coordinate v of the convolution kernel, x e-u+1,k-v+1 The input features for the data mapping graph;
[0096] In step S42, the convolution kernel performs the same operation as in step S41 on the two-dimensional image of multiple local regions in a sliding manner; and merges them into a data mapping map, namely feature map F1.
[0097] Step S43: After processing the feature map F1 obtained in step S42 through formulas (5) to (8), the data mapping map conforms to a normal distribution with a mean of 0 and a variance of 1, and the feature map F2 is obtained.
[0098]
[0099] In the formula, μ is the mean of each batch of data in the data mapping graph, l is the length of each batch of data in the data mapping graph, and x i Let σ be the i-th data item in the data sequence of the data mapping graph. 2 The variance of each batch of data in the data mapping graph. Let y be the i-th data point after normalization in the data mapping graph, where ε is a constant term. i For the i-th output term of the normalization layer, γ and β are the learnable scaling and bias parameters, respectively;
[0100] The feature map F2 obtained in steps S44 and S43 is processed by the leakage rectification unit function to obtain feature map F3; feature map F3 is the output feature of the first convolutional layer data map; a parameter is added to the leakage rectification unit function so that the output is no longer always 0 when the input is less than 0. The expression of the leakage rectification unit function is shown in formula (9):
[0101]
[0102] In the formula, f(x) is the output characteristic of the leakage rectifier unit function operation, x is the input characteristic of the leakage rectifier unit function operation, and α is a value between (0,1].
[0103] In step S45, the feature map F3 output from step S44 is processed by a max pooling layer to obtain feature map F4; the formula for the max pooling layer is shown in formula (10):
[0104]
[0105] In the formula, y e,k Let R be the output feature of the max pooling layer at spatial location (e,k). e,k For the pooling region at spatial location (e,k), x p,q Represents the pooling region R e,k The pixel value at position (p, q);
[0106] Step S46: Using the convolutional layer from step S41 and the max pooling layer from step S45, the convolutional neural network is constructed.
[0107] Further, in step S51, using the convolutional neural network built in step S4, the image data in the dataset of drainage pipe siltation information in step S3 is input to realize spatial information extraction, and the feature map F5 is output after passing through the convolutional neural network;
[0108] Step S52: Add a gated loop unit to extract time information from the dataset. Extract time features from the one-dimensional time-series data of the drainage pipe siltation information dataset in Step S3 to obtain the feature vector F. T The gated loop unit is shown in equations (11) to (14):
[0109] r t =σ(w r *[h t-1 ,x t ]) (11);
[0110] z t =σ(w z *[h t-1 ,x t ]) (12);
[0111]
[0112] h t =(1-z) t )*h t-1 +z t *h t (14);
[0113] In the formula, r t z t These represent resetting the gate and updating the gate state, respectively. σ is the sigmoid activation function, and w... r w z and wh Let x be the weight matrix. t Let the input vector be the input vector at the current time. For candidate hidden states; tanh is the hyperbolic tangent function, h t and h t-1 These are the state memory variables for the current time and the previous time, respectively;
[0114] Step S53: Flatten the feature map F5 extracted in step S51 to obtain the feature vector F. S and with the feature vector F from step S52 T By concatenating temporal and spatial information, the fused feature vector F is obtained. ST ;
[0115] Step S54, fuse the feature vector F obtained in step S53 ST The input is fed into different fully connected layers. There are two fully connected layers: one is used to determine whether siltation has occurred in the drainage pipe, and the other is used to predict the length and thickness of siltation in the drainage pipe.
[0116] Further, in step S61, the learning rate, weight decay, exponential decay rate of the first moment estimate, and exponential decay rate of the second moment estimate are used as optimization hyperparameters of the adaptive mutation particle swarm optimization algorithm. The range of the optimal hyperparameters of the adaptive moment estimation optimizer and the particle velocity are given, and the maximum number of iterations and the maximum particle flight speed are set.
[0117] Step S62: Determine a function that allows the particles to reach the standard state. Find the optimal solution for each particle through its motion, called the individual optimal solution. Then, derive the optimal solution for all particles in this step through the individual optimal solutions of each particle, called the current global optimal solution. Compare the current global optimal solution with the historical global optimal solutions, select the better solution, and update it.
[0118] Step S63: Based on the current global optimal solution in step S62, the inertia weight ω is adaptively adjusted using formula (15);
[0119]
[0120] In the formula, w is the inertia weight, t is the number of iterations, and w max w min These are the maximum and minimum values of the inertia weight, respectively. Let f be the objective function value for the i-th particle in the t-th iteration, which is the loss difference between the predicted and actual siltation states. min f avg The minimum and average target values for all current particles; here w max and w minThe value is: w max =0.9, w min =0.3;
[0121] Step S64: Based on the particle's current flight speed, the inertial weight obtained in step S63, and the current global optimal solution and individual optimal solution obtained in step S62, update the particle's own speed as shown in formula (16):
[0122]
[0123] In the formula, Let be the velocity of the i-th particle at iteration number t+1. Let be the velocity of the i-th particle after t iterations, c1 and c2 be learning factors, and r1 and r2 be random numbers between [0,1]. Let be the best position experienced by the i-th particle. Let be the position vector of the i-th particle at iteration number t. This represents the best position experienced by the entire particle swarm in the solution space;
[0124] Step S65: Update the particle's velocity using the method from step S64, and update the particle's position using mutation and conventional operations; the mutation operation formula (17) is shown, and the conventional operation formula (18) is shown:
[0125]
[0126] In the formula, Let be the position vector of the i-th particle at iteration number t+1. Let be the position vector of the i-th particle at iteration number t, and rand be a random number between [0,1]. Let C be the velocity of the i-th particle at iteration number t+1; where the mutation rate C v =0.4;
[0127] Step S66: When the number of iterations reaches the set maximum number of iterations, or the global optimal solution reaches the set minimum boundary, the adaptive mutant particle swarm optimization algorithm terminates; obtain the optimal learning rate, weight decay, exponential decay rate of the first moment estimate, and exponential decay rate of the second moment estimate.
[0128] Furthermore, in step S21, the Gram angle field function in the open source library is used to convert the one-dimensional time series data of the flow velocity and flow rate of the upstream and downstream nodes into two-dimensional image data.
[0129] Furthermore, in step S22, the dataset module in the open-source library is used to create a dataset containing drainage pipe siltation information by converting the two-dimensional image data, one-dimensional time series data, and the siltation length and thickness of the drainage pipe from step S21.
[0130] Further, in step S31, a convolutional layer is built using an open-source library, utilizing the two-dimensional convolutional sub-module, batch normalization, and leakage rectification unit module in the neural network module to build a single convolutional layer.
[0131] Further, in step S32, using the convolutional layer and the max pooling layer in the neural network module built in step S31, a convolutional neural network is built in the order of convolutional layer and pooling layer to obtain spatial information feature map F5.
[0132] Further, in step S33, the feature map obtained in step S32 is flattened using a flattening function from an open-source library, with dimension 1, for subsequent concatenation. The flattened feature map is denoted as feature vector F. S ;
[0133] Furthermore, in step S34, the gated recurrent unit in the neural network module is used to extract time information, and the resulting features are denoted as feature vector F. T ;
[0134] Furthermore, in step S35, the concatenation function from the open-source library is used to concatenate the feature vector F from step S33. S and the eigenvector F of step S34 T Stacked and merged outputs based on depth;
[0135] Further, in step S36, the linear layer in the neural network module is used to fit the output features of step S35. One fully connected layer is used to determine whether the drainage pipe is clogged, and the other fully connected layer is used to predict the length and thickness of the clog in the drainage pipe.
[0136] Furthermore, in step S48, if rand is greater than the mutation rate of 0.4 in step S47, the code written in formula (39) in step S47 is used for position update; otherwise, the code written in formula (40) is used for position update.
Claims
1. A method for intelligent diagnosis of siltation defects in drainage pipes, characterized in that: Includes the following steps: Step S1: Using a full-scale experiment on the drainage pipe, collect one-dimensional time-series data of flow velocity and flow rate at upstream and downstream nodes of the drainage pipe, and record the siltation length and siltation thickness of the drainage pipe. Step S2: Based on the one-dimensional time series data collected in step S1, the one-dimensional time series data of flow velocity and flow rate of upstream and downstream nodes of the drainage pipeline are converted into two-dimensional image data with spatial information using a data processing module based on Gram angle and field. Step S3: Based on the one-dimensional time-series data collected in step S1, the two-dimensional image data converted in step S2, and the siltation length and siltation thickness of the drainage pipe recorded in step S1, a dataset containing siltation information of the drainage pipe is created to obtain time information and spatial information. Step S4: Extract the temporal and spatial information of the dataset in Step S3, and build a convolutional layer by combining convolution, batch normalization and leakage rectifier unit function. Use max pooling layer to extract important spatial information to realize the construction of convolutional neural network. Step S5: Combine the convolutional neural network in step S4 to extract the spatial information of the dataset in step S3, and combine it with the gated recurrent unit to extract the temporal information of the dataset. Use the convolutional neural network and the gated recurrent unit to build a temporal and spatial feature extraction network model, fuse the temporal and spatial information in the extracted dataset, and use a fully connected layer to integrate the fused temporal and spatial information to output the result. Step S6: Using particle swarm optimization, adaptive inertial weights, and mutation operations, construct an adaptive mutation particle swarm optimization algorithm to find the optimal hyperparameters of the adaptive moment estimation optimizer; and train the time-space feature extraction network model built in step S5. Step S7: Using the time-space feature extraction network model trained in step S6, input the flow velocity and flow rate of the upstream and downstream nodes of the drainage pipe into the trained time-space feature extraction network model to obtain whether the drainage pipe is silted up and the length and thickness of the siltation inside the drainage pipe.
2. The intelligent diagnostic method for siltation defects in drainage pipes according to claim 1, characterized in that: Step S2, the specific steps are as follows: Step S21: Based on the one-dimensional time-series data collected in step S1, normalize the flow velocities and flow rates of the upstream and downstream nodes of the drainage pipeline to the interval [-1, 1] according to formula (1); given a set of upstream or downstream node flow velocity time-series sequences, V = {v1, v2, ..., v n }, ν1 is the first velocity time series, ν2 is the second velocity time series, ν n For the nth velocity time series, the velocity time series V is normalized to the interval [-1, 1] according to formula (1). The normalized velocity time series is denoted as V. This is the first normalized flow velocity time series. This is the second normalized flow velocity time series. This is the nth normalized flow velocity time series; In the formula, For the i-th normalized flow velocity time series, v i Let V be the i-th velocity time series, max(V) be the maximum value of the velocity time series, and min(V) be the minimum value of the velocity time series. Step S22, normalize the flow velocity time series from step S21. Transform to polar coordinates using formula (2): In the formula, Let r be the polar angle corresponding to the i-th normalized velocity time series, and t be the polar radius. i For timestamps, M is the regularization constant for polar coordinates; Step S23: Based on the polar angle obtained in step S22, the normalized flow velocity time series V is encoded using formula (3) to obtain two-dimensional image data with spatial information. In the formula, GASF is two-dimensional image data with spatial information. Let represent the polar angles corresponding to the i-th normalized flow velocity time series and the j-th normalized flow velocity time series, respectively.
3. The intelligent diagnostic method for siltation defects in drainage pipes according to claim 2, characterized in that: Step S4, the specific steps are as follows: Step S41: The convolutional kernel in the convolutional layer performs a dot product operation with the spatially information-containing two-dimensional image data of each local region to generate a new value, and uses the new value as a pixel in the data mapping map; the operation formula is as follows: In the formula, y e,k Let w represent the output features at positions e (horizontal coordinate) and k (vertical coordinate) on the data mapping graph, where m and n are the width and height of the convolutional kernel, respectively. u,v The parameters at the x-coordinate u and y-coordinate v of the convolution kernel, x e-u+1,k-v+1 The input features for the data mapping graph; In step S42, the convolution kernel performs the same operation as in step S41 on the two-dimensional image of multiple local regions in a sliding manner; and merges them into a data mapping map, namely feature map F1. Step S43: After processing the feature map F1 obtained in step S42 through formulas (5) to (8), the data mapping map conforms to a normal distribution with a mean of 0 and a variance of 1, and the feature map F2 is obtained. In the formula, μ is the mean of each batch of data in the data mapping graph, l is the length of each batch of data in the data mapping graph, and x i Let σ be the i-th data item in the data sequence of the data mapping graph. 2 The variance of each batch of data in the data mapping graph. Let y be the i-th data point after normalization in the data mapping graph, where ε is a constant term. i For the i-th output term of the normalization layer, γ and β are the learnable scaling and bias parameters, respectively; The feature map F2 obtained in steps S44 and S43 is processed by the leakage rectification unit function to obtain feature map F3, which is the output feature of the first convolutional layer data mapping map. Add a parameter to the leakage rectifier unit function so that the output is no longer always 0 when the input is less than 0. The expression of the leakage rectifier unit function is shown in formula (9): In the formula, f(x) is the output characteristic of the leakage rectifier unit function operation, x is the input characteristic of the leakage rectifier unit function operation, and α is a value between (0,1]. In step S45, the feature map F3 output from step S44 is processed by a max pooling layer to obtain feature map F4; the formula for the max pooling layer is shown in formula (10): In the formula, y e,k Let R be the output feature of the max pooling layer at spatial location (e,k). e,k For the pooling region at spatial location (e,k), x p,q Represents the pooling region R e,k The pixel value at position (p, q); Step S46: Using the convolutional layer from step S41 and the max pooling layer from step S45, the convolutional neural network is constructed.
4. The intelligent diagnostic method for drainage pipe siltation based on deep learning and machine learning according to claim 3, characterized in that: Step S5, the specific steps are as follows: Step S51: Using the convolutional neural network built in step S4, input the image data in the dataset of drainage pipe siltation information in step S3 to realize spatial information extraction, and output feature map F5 after passing through the convolutional neural network. Step S52: Add a gated loop unit to extract time information from the dataset. Extract time features from the one-dimensional time-series data of the drainage pipe siltation information dataset in Step S3 to obtain the feature vector F. T The gated loop unit is shown in equations (11) to (14): r t =σ(w r *[h t-1 ,x t ]) (11); z t =σ(w z *[h t-1 ,x t ]) (12); h t =(1-z t )*h t-1 +z t *h t (14); In the formula, r t z t These represent resetting the gate and updating the gate state, respectively. σ is the sigmoid activation function, and w... r w z and w h Let x be the weight matrix. t Let the input vector be the input vector at the current time. Let h be the candidate hidden state, tanh be the hyperbolic tangent function, and h be the hidden state. t and h t-1 These are the state memory variables for the current time and the previous time, respectively; Step S53: Flatten the feature map F5 extracted in step S51 to obtain the feature vector F. S and with the feature vector F from step S52 T By concatenating temporal and spatial information, the fused feature vector F is obtained. ST ; Step S54, fuse the feature vector F obtained in step S53 ST The input is fed into different fully connected layers. There are two fully connected layers: one is used to determine whether siltation has occurred in the drainage pipe, and the other is used to predict the length and thickness of siltation in the drainage pipe.
5. The intelligent diagnostic method for siltation defects in drainage pipes according to claim 4, characterized in that: In step S6, the specific steps are as follows: Step S61: The learning rate, weight decay, exponential decay rate of the first moment estimate, and exponential decay rate of the second moment estimate are used as optimization hyperparameters of the adaptive mutation particle swarm optimization algorithm. The range of the optimal hyperparameters of the adaptive moment estimation optimizer and the particle velocity are given, and the maximum number of iterations and the maximum particle flight speed are set. Step S62: Determine a function that allows the particles to reach the standard state. Find the optimal solution for each particle through its motion, called the individual optimal solution. Then, derive the optimal solution for all particles in this step through the individual optimal solutions of each particle, called the current global optimal solution. Compare the current global optimal solution with the historical global optimal solutions, select the better solution, and update it. Step S63: Based on the current global optimal solution in step S62, the inertia weight ω is adaptively adjusted using formula (15); In the formula, w is the inertia weight, t is the number of iterations, and w max w min These are the maximum and minimum values of the inertia weight, respectively. f is the objective function value for the i-th particle in the t-th iteration, which is the loss difference between the predicted and actual siltation states; min f avg The minimum and average target values for all current particles; Step S64: Based on the particle's current flight speed, the inertial weight obtained in step S63, and the current global optimal solution and individual optimal solution obtained in step S62, update the particle's own speed as shown in formula (16): In the formula, Let be the velocity of the i-th particle at iteration number t+1. Let be the velocity of the i-th particle after t iterations, c1 and c2 be learning factors, and r1 and r2 be random numbers between [0,1]. Let be the best position experienced by the i-th particle. Let be the position vector of the i-th particle at iteration number t. This represents the best position experienced by the entire particle swarm in the solution space; Step S65: Update the particle's velocity using the method from step S64, and update the particle's position using mutation and conventional operations; the mutation operation formula (17) is shown, and the conventional operation formula (18) is shown: In the formula, Let be the position vector of the i-th particle at iteration number t+1. Let be the position vector of the i-th particle at iteration number t, and rand be a random number between [0,1]. Let be the velocity of the i-th particle at iteration number t+1; Step S66: When the number of iterations reaches the set maximum number of iterations, or the global optimal solution reaches the set minimum boundary, the adaptive mutant particle swarm optimization algorithm terminates; obtain the optimal learning rate, weight decay, exponential decay rate of the first moment estimate, and exponential decay rate of the second moment estimate.
Citation Information
Patent Citations
Drainage pipeline siltation disease dynamic diagnosis method based on SSAE and MLSTM
CN116542170A
Underground pipeline discharge early warning system based on urban water conservancy data
CN117216689A
Cited By
Multi-technology fusion repairing method suitable for composite disease drainage pipeline
CN122335278A