Intelligent diagnosis method for sedimentation diseases of drainage pipeline
By combining deep learning and machine learning methods, convolutional neural networks and gated cyclic units are used to extract the spatial and temporal characteristics of drainage pipes, and automatically optimize hyperparameters using particle swarm optimization algorithms, the problem of inefficient diagnosis of drainage pipe silt in the existing technology is solved, and high-precision intelligent diagnosis is achieved.
Patent Information
- Application Number
- CN202411720299.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-11-27
AI Technical Summary
The existing technology is inefficient in the diagnosis of drainage pipeline silt, lacks automation and intelligent means, and it is difficult to meet the needs of modern urban management.
Using a deep learning and machine learning method, combining convolutional neural networks and gated loop units, spatial and temporal features are extracted, and hyperparameters are automatically optimized through particle swarm optimization algorithm to improve diagnostic accuracy.
The accuracy of intelligent diagnosis of drainage pipe silt is improved, and hyperparameters can be automatically optimized, improving the efficiency and accuracy of the model.
Smart Images

Figure CN119669849A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of intelligent operation and maintenance of municipal drainage pipe networks, and relates to an intelligent diagnosis method for siltation diseases in drainage pipes. Background Art
[0002] Underground drainage pipes are a key component of urban geographic infrastructure and are directly related to the normal operation of the city. Studies have shown that there are an average of 12 functional diseases per kilometer in the drainage pipes of some cities in China, of which siltation diseases account for more than 80%. Poor drainage caused by pipe siltation has become one of the main causes of urban waterlogging. However, rapid and effective diagnosis of siltation points in drainage pipes remains a major challenge in the operation and maintenance of geographic infrastructure. At present, the detection of pipeline siltation problems mainly relies on regular inspections, which lack the support of automation and intelligent means. Therefore, the existing drainage pipe siltation inspection work is inefficient and difficult to meet the needs of modern urban management.
[0003] Existing nondestructive detection methods for siltation in drainage pipes mainly include radiographic detection, ultrasonic method, infrared thermal imaging method and target detection method. Radiographic detection method generates a cross-sectional image of the pipe by using gamma rays or X-rays, emitting rays from a radiation source, and collecting ray data through film or detectors. Although this method has high image resolution and recognition accuracy, it has low diagnostic efficiency, limited applicable conditions, and the risk of radiation contamination. The target detection method relies on mobile closed-circuit television (CCTV) equipment to assess the siltation by taking photos or videos inside the pipe. This method is suitable for pipe sections that are not full of water and can provide high-resolution images, but requires more manual operations. The ultrasonic method detects silt in the pipe through high-frequency sound waves, has high resolution and sensitivity, and is particularly suitable for large pipes. However, this method is prone to errors when the acoustic impedance difference is large. The infrared thermal imaging method assesses the siltation distribution by detecting the infrared thermal radiation of the object, but its diagnostic accuracy is easily affected by the ambient temperature. These traditional methods still have limitations in adapting to various working conditions, improving diagnostic efficiency, and reducing manual dependence.
[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 in the engineering application of urban pipeline siltation diagnosis. Deep learning can automatically extract complex and representative features from data through adaptive learning, significantly reducing the reliance on manual feature extraction. The neural network in deep learning is derived from the gradual evolution of multi-layer perceptrons and can learn deep nonlinear networks to achieve the fitting of complex functions. By extracting shallow features and recombining them to form deep abstract features, deep learning can describe data features more accurately and is suitable for a variety of tasks such as target recognition, image segmentation, classification, regression, and noise removal.
[0005] In the field of pipeline siltation diagnosis, there are two main intelligent paths: one is the diagnosis method that combines target recognition and image segmentation, and the other is the diagnosis method based on feature extraction and result classification. The former usually requires the combination of CCTV technology for image acquisition and analysis, but due to the limitations of CCTV technology, this method is less efficient and difficult to achieve accurate diagnosis under full water level conditions. On the other hand, by applying methods such as recursive neural networks and one-dimensional convolutional neural networks, the flow velocity and flow characteristics of the pipeline inlet and outlet can be deeply explored, thereby effectively judging the siltation condition of the drainage pipeline.
[0006] Currently, the commonly used feature extraction neural networks mainly include convolutional neural networks and recurrent neural networks. Convolutional neural networks perform well in extracting deep semantic information, but when one-dimensional convolution is applied to process the velocity and flow data at the inlet and outlet of the pipeline, the spatial correlation of the original sequence may be destroyed, resulting in the loss of key information about pipeline siltation. In addition, although one-dimensional convolution can reduce network parameters, it fails to give full play to the advantages of convolutional neural networks in feature extraction and cannot fully capture the spatial feature information of pipeline siltation. In contrast, two-dimensional convolution has a larger receptive field, can extract features more comprehensively, and effectively deal with overfitting problems during training.
[0007] Although convolutional neural networks are powerful in extracting spatial features, they are relatively weak in capturing time-dependent features when processing sequence data, especially time series data. In contrast, recurrent neural networks have obvious advantages in extracting features of long-term sequence dependencies. Therefore, how to combine the respective advantages of convolutional neural networks and recurrent neural networks to extract comprehensive information that includes both spatial and temporal features is one of the keys to improving the accuracy of pipeline siltation diagnosis.
[0008] In model training, the setting of hyperparameters has an important impact on the accuracy of the model. These hyperparameters include the number of convolution kernels, the number of hidden layers of the recurrent neural network, and the learning rate and weight decay of the optimizer. In particular, the selection of parameters such as the learning rate usually requires manual adjustment of different values and repeated training to meet the prediction requirements. However, this method is not only inefficient, but also difficult to exhaust all possibilities due to the large range of values of parameters such as the learning rate. Therefore, how to effectively find suitable learning rate and weight decay values has become one of the key challenges to improve the accuracy of pipeline siltation diagnosis.
[0009] Therefore, it is necessary to develop an intelligent diagnosis method for drainage pipe siltation diseases. Summary of the invention
[0010] In response to the above problems, the present invention proposes an intelligent diagnosis method for drainage pipe siltation diseases based on deep learning and machine learning, which can improve the accuracy of the intelligent diagnosis model for drainage pipe siltation.
[0011] The technical solution adopted by the present invention is as follows: A method for intelligent diagnosis of drainage pipe siltation disease, comprising the following steps:
[0012] Step S1, using a full-scale experiment on a drainage pipeline, collecting one-dimensional time series data of flow velocity and flow rate at upstream nodes and downstream nodes of the drainage pipeline, and recording the siltation length and siltation thickness of the drainage pipeline;
[0013] Step S2, based on the one-dimensional time series data collected in step S1, using a data processing module based on Gram angle and field to convert the one-dimensional time series data of flow velocity and flow rate of upstream nodes and downstream nodes of the drainage pipe into two-dimensional image data with spatial information;
[0014] Step S3, making a data set containing drainage pipe siltation information 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, and obtaining time information and space information;
[0015] Step S4, extracting the temporal information and spatial information of the data set in step S3, building a convolution layer by combining convolution, batch normalization and leaky rectifier unit functions, and using a maximum pooling layer to extract important spatial information to achieve the construction of a convolutional neural network;
[0016] Step S5, extracting spatial information of the data set in step S3 by combining the convolutional neural network in step S4, extracting temporal information in the data set by combining the gated recurrent unit, building a temporal-spatial feature extraction network model using the convolutional neural network and the gated recurrent unit, fusing the temporal information and spatial information in the extracted data set, integrating the fused temporal information and spatial information using a fully connected layer, and outputting the result;
[0017] Step S6, using the particle swarm algorithm, adaptive inertia weight and mutation operation, construct an adaptive mutation particle swarm optimization algorithm to find the optimal hyperparameters of the adaptive moment estimation optimizer; to 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 and the siltation length and thickness in the drainage pipe.
[0019] Step S1, using a full-scale experiment on a drainage pipeline, collecting one-dimensional time series data of flow velocity and flow rate at upstream nodes and downstream nodes of the drainage pipeline, and recording the siltation length and siltation thickness of the drainage pipeline;
[0020] Step S2, based on the one-dimensional time series data collected in step S1, using a data processing module based on Gram angle and field to convert the one-dimensional time series data of flow velocity and flow rate of upstream nodes and downstream nodes of the drainage pipe into two-dimensional image data with spatial information;
[0021] Step S3, making a data set containing drainage pipe siltation information 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, and obtaining time information and space information;
[0022] Step S4, extracting the temporal information and spatial information of the data set in step S3, building a convolution layer by combining convolution, batch normalization and leaky rectifier unit functions, and using a maximum pooling layer to extract important spatial information to achieve the construction of a convolutional neural network;
[0023] Step S5, extracting spatial information of the data set in step S3 by combining the convolutional neural network in step S4, extracting temporal information in the data set by combining the gated recurrent unit, building a temporal-spatial feature extraction network model using the convolutional neural network and the gated recurrent unit, fusing the temporal information and spatial information in the extracted data set, integrating the fused temporal information and spatial information using a fully connected layer, and outputting the result;
[0024] Step S6, using the particle swarm algorithm, adaptive inertia weight and mutation operation, construct an adaptive mutation particle swarm optimization algorithm to find the optimal hyperparameters of the adaptive moment estimation optimizer; to 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 and the siltation length and thickness in the drainage pipe.
[0026] Further, in step S21, based on the one-dimensional time series data collected in step S1, the flow velocity and flow rate of the upstream and downstream nodes of the drainage pipe are normalized to the interval [-1, 1] according to formula (1); given a set of upstream node or downstream node flow velocity time series sequence, V = {v1, v2, ..., v n}, ν1 is the first flow velocity time series, ν2 is the second flow velocity time series, ν nis the nth velocity time series. According to formula (1), the velocity time series V is normalized to the interval [-1, 1]. The normalized velocity time series is recorded as is the first normalized flow velocity time series, is the second normalized flow velocity time series, is the nth normalized flow velocity time series;
[0027]
[0028] In the formula, is the i-th normalized velocity time series, v i is the ith flow velocity time series, max(V) is the maximum value of the flow velocity time series, and min(V) is the minimum value of the flow velocity time series;
[0029] Step S22, normalizing the flow velocity time series sequence in step S21 Use formula (2) to transform into polar coordinates:
[0030]
[0031] In the formula, is the polar angle corresponding to the i-th normalized velocity time series, r is the polar diameter, t i is the timestamp, M is the regularization constant of polar coordinates;
[0032] Step S23, according to the polar angle obtained in step S22, the normalized flow velocity time series is calculated using formula (3): Encode to obtain two-dimensional image data with spatial information:
[0033]
[0034] Where GASF is a two-dimensional image data with spatial information. They respectively represent the polar angle corresponding to the i-th normalized flow velocity time series sequence and the polar angle corresponding to the j-th normalized flow velocity time series sequence.
[0035] Further, in step S41, the convolution kernel in the convolution layer generates a new value by performing a dot multiplication operation with the two-dimensional image data with spatial information of each local area, and the new value is used as a pixel point in the data mapping diagram; the operation formula is as follows:
[0036]
[0037] In the formula, y e,k is the output feature at the horizontal coordinate e and the vertical coordinate k on the data map, m and n are the width and height of the convolution kernel respectively, and wu,v is the parameter of the convolution kernel at the horizontal coordinate u and vertical coordinate v, x e-u+1,k-v+1 is the input feature of the data map;
[0038] In step S42, the convolution kernel performs the same operation as step S41 on the two-dimensional images of the input multiple local regions in a sliding manner, and merges them into a data map, i.e., a feature map F1;
[0039] Step S43, after the feature graph F1 obtained in step S42 is processed by formula (5) to formula (8), the data mapping graph conforms to the normal distribution with a mean of 0 and a variance of 1, and a feature graph F2 is obtained;
[0040]
[0041] In the formula, μ is the mean value of each batch of data in the data mapping diagram, l is the length of each batch of data in the data mapping diagram, and x i is the i-th data item in the data sequence in the data mapping diagram, σ 2 is the variance of each batch of data in the data mapping diagram, is the i-th data after data normalization in the data mapping diagram, ε is a constant term, y i is the i-th output item of the normalization layer, γ and β represent the learnable scaling and bias parameters respectively;
[0042] In step S44, the feature map F2 obtained in step S43 is subjected to the leaky rectifier unit function operation to obtain the feature map F3; the feature map F3 is the output feature of the first convolutional layer data map; a parameter is added to the leaky rectifier unit function so that when the input is less than 0, the output is no longer always 0. The expression of the leaky rectifier unit function is shown in formula (9):
[0043]
[0044] Where f(x) is the output feature of the leaky rectifier unit function operation; x is the input feature of the leaky rectifier unit function operation; α is a value between (0,1];
[0045] Step S45: The feature map F3 outputted in step S44 is subjected to the maximum pooling layer to obtain the feature map F4; the maximum pooling layer formula is shown in formula (10):
[0046]
[0047] In the formula, y e,k is the maximum pooling layer output feature at spatial position (e, k), R e,k is the pooling area at spatial position (e, k), x p,q Represents the pooling area R e,kThe pixel value at position (p,q) in the graph;
[0048] Step S46, using the convolution layer of step S41 and the maximum pooling layer of step S45 to complete the construction of the convolutional neural network.
[0049] Furthermore, in step S51, the convolutional neural network constructed in step S4 is used to input the image data in the data set of drainage pipe siltation information in step S3 to extract spatial information, and a feature map F5 is output after the convolutional neural network.
[0050] Step S52, adding a gated recurrent unit to extract time information from the data set, extracting time features from the one-dimensional time series data in the data set of drainage pipe siltation information in step S3, and obtaining a feature vector F T ; The gated recurrent unit is shown in formula (11) to formula (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 are reset gate and update gate states respectively, σ is the sigmoid activation function, w r 、w z and w h is the weight matrix, x t is the input vector at the current moment, is the candidate hidden state, tanh is the hyperbolic tangent function, h t and h t-1 They are the state memory variables of the current moment and the previous moment respectively;
[0056] Step S53: Flatten the feature map F5 extracted in step S51 to obtain a feature vector F S and the feature vector F in step S52 TSplicing, to achieve the fusion of time information and space information, and obtain the fused feature vector F ST ;
[0057] Step S54: The feature vector F fused in step S53 ST The input is sent to different fully connected layers, which are divided into two. One fully connected layer is used to determine whether siltation occurs in the drainage pipe, and the other fully connected layer 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-order moment estimate, and exponential decay rate of the second-order moment estimate are used as optimization hyperparameters of the adaptive mutation particle swarm optimization algorithm, the optimal hyperparameter ranges and particle speeds of the adaptive moment estimate optimizer are given, and the maximum number of iterations and the maximum flight speed of the particles are set;
[0059] Step S62, determine a function that allows the particle to reach the standard state, find the optimal solution of the particle through the movement of each particle, called the individual optimal solution; then deduce the optimal solution of all particles this time through the individual optimal solution of each particle, called the global optimal solution; compare the global optimal solution this time with the historical global optimal solution, select a better solution, and update it;
[0060] Step S63, according to the 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 are the maximum and minimum values of the inertia weight, respectively. is the objective function value of the tth iteration of the ith particle, that is, the loss difference between the predicted siltation state and the actual siltation state, f min 、f avg The minimum target value and average target value of all particles at present;
[0063] Step S64, according to the current flying speed of the particle, the inertia weight obtained in step S63 and the global optimal solution and individual optimal solution obtained in step S62, the speed of the particle itself is updated, as shown in formula (16):
[0064]
[0065] In the formula, is the flying speed of the ith particle at the iteration number t+1, is the flight speed of the ith particle at the tth iteration, c1 and c2 are learning factors, r1 and r2 are random numbers between [0,1], is the best position experienced by the ith particle, is the position vector of the ith particle at the tth iteration, is the best position experienced by the entire particle swarm in the solution space;
[0066] Step S65, using step S64 to update the velocity of the particle itself, and using mutation operation and traditional operation to update the position of the particle itself; the mutation operation formula (17) and the traditional operation formula (18) are shown:
[0067]
[0068] In the formula, is the position vector of the ith particle at the time of iteration t+1, is the position vector of the ith particle at the tth iteration, rand is a random number between [0,1], is the flying speed of the ith particle when the number of iterations is 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 mutation particle swarm optimization algorithm terminates; the optimal learning rate, weight decay, exponential decay rate of the first-order moment estimate, and exponential decay rate of the second-order moment estimate are obtained.
[0070] The beneficial effects of the present invention are as follows: First, a data processing module based on Gram angle and field is used to convert one-dimensional data into two-dimensional image data, which not only retains the time information but also enhances the spatial structure characteristics of the data. Subsequently, a convolutional neural network is used to process the converted two-dimensional image data to extract the spatial features therein; at the same time, the gated recurrent unit is combined to effectively capture the time features to achieve an organic fusion of spatial features and time features. In addition, 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 diagnosis model for drainage pipe siltation. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 A data processing flow chart invented for the method of the present invention;
[0072] Figure 2 It is a convolution schematic diagram of the present invention;
[0073] Figure 3 A gated recurrent unit according to the present invention;
[0074] Figure 4This is a network model diagram of the present invention. DETAILED DESCRIPTION
[0075] like Figure 1 As shown, a method for intelligent diagnosis of drainage pipe siltation disease is characterized by comprising the following steps:
[0076] Step S1, using a full-scale experiment on a drainage pipeline, collecting one-dimensional time series data of flow velocity and flow rate at upstream nodes and downstream nodes of the drainage pipeline, and recording the siltation length and siltation thickness of the drainage pipeline;
[0077] Step S2, based on the one-dimensional time series data collected in step S1, using a data processing module based on Gram angle and field to convert the one-dimensional time series data of flow velocity and flow rate of upstream nodes and downstream nodes of the drainage pipe into two-dimensional image data with spatial information;
[0078] Step S3, making a data set containing drainage pipe siltation information 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, and obtaining time information and space information;
[0079] Step S4, extracting the temporal information and spatial information of the data set in step S3, building a convolution layer by combining convolution, batch normalization and leaky rectifier unit functions, and using a maximum pooling layer to extract important spatial information to achieve the construction of a convolutional neural network;
[0080] Step S5, extracting spatial information of the data set in step S3 by combining the convolutional neural network in step S4, extracting temporal information in the data set by combining the gated recurrent unit, building a temporal-spatial feature extraction network model using the convolutional neural network and the gated recurrent unit, fusing the temporal information and spatial information in the extracted data set, integrating the fused temporal information and spatial information using a fully connected layer, and outputting the result;
[0081] Step S6, using the particle swarm algorithm, adaptive inertia weight and mutation operation, construct an adaptive mutation particle swarm optimization algorithm to find the optimal hyperparameters of the adaptive moment estimation optimizer; to 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 and the siltation length and thickness in the drainage pipe.
[0083] The intelligent diagnosis method for drainage pipe siltation disease according to claim 1 is characterized in that: in step S2, an open source library is used to convert data and create a data set;
[0084] Step S21, based on the one-dimensional time series data collected in step S1, the flow velocity and flow rate of the upstream and downstream nodes of the drainage pipe are normalized to the interval [-1, 1] according to formula (1); given a set of upstream node or downstream node flow velocity time series sequence, V = {v1, v2, ..., v n}, ν1 is the first flow velocity time series, ν2 is the second flow velocity time series, ν n is the nth velocity time series. According to formula (1), the velocity time series V is normalized to the interval [-1, 1]. The normalized velocity time series is recorded as is the first normalized flow velocity time series, is the second normalized flow velocity time series, is the nth normalized flow velocity time series;
[0085]
[0086] In the formula, is the i-th normalized velocity time series, v i is the ith flow velocity time series, max(V) is the maximum value of the flow velocity time series, and min(V) is the minimum value of the flow velocity time series;
[0087] Step S22, normalizing the flow velocity time series sequence in step S21 Use formula (2) to transform into polar coordinates:
[0088]
[0089] In the formula, is the polar angle corresponding to the i-th normalized velocity time series, r is the polar diameter, t i is the timestamp, M is the regularization constant of polar coordinates;
[0090] Step S23, according to the polar angle obtained in step S22, the normalized velocity time series V is encoded using formula (3) to obtain two-dimensional image data with spatial information:
[0091]
[0092] Where GASF is a two-dimensional image data with spatial information. They respectively represent the polar angle corresponding to the i-th normalized flow velocity time series sequence and the polar angle corresponding to the j-th normalized flow velocity time series sequence.
[0093] Further, in step S41, the convolution kernel in the convolution layer generates a new value by performing a dot multiplication operation with the two-dimensional image data with spatial information of each local area, and the new value is used as a pixel point in the data mapping diagram; the operation formula is as follows:
[0094]
[0095] In the formula, y e,k is the output feature at the horizontal coordinate e and the vertical coordinate k on the data map, m and n are the width and height of the convolution kernel respectively, and w u,v is the parameter of the convolution kernel at the horizontal coordinate u and vertical coordinate v, x e-u+1,k-v+1 is the input feature of the data map;
[0096] In step S42, the convolution kernel performs the same operation as step S41 on the two-dimensional images of the input multiple local regions in a sliding manner, and merges them into a data map, i.e., a feature map F1;
[0097] Step S43, after the feature graph F1 obtained in step S42 is processed by formula (5) to formula (8), the data mapping graph conforms to the normal distribution with a mean of 0 and a variance of 1, and a feature graph F2 is obtained;
[0098]
[0099] In the formula, μ is the mean value of each batch of data in the data mapping diagram, l is the length of each batch of data in the data mapping diagram, and x i is the i-th data item in the data sequence in the data mapping diagram, σ 2 is the variance of each batch of data in the data mapping diagram, is the i-th data after data normalization in the data mapping diagram, ε is a constant term, y i is the i-th output item of the normalization layer, γ and β represent the learnable scaling and bias parameters respectively;
[0100] In step S44, the feature map F2 obtained in step S43 is subjected to the leaky rectifier unit function operation to obtain the feature map F3; the feature map F3 is the output feature of the first convolutional layer data map; a parameter is added to the leaky rectifier unit function so that when the input is less than 0, the output is no longer always 0. The expression of the leaky rectifier unit function is shown in formula (9):
[0101]
[0102] Where f(x) is the output feature of the leaky rectifier unit function operation, x is the input feature of the leaky rectifier unit function operation, and α is a value between (0,1];
[0103] Step S45: The feature map F3 outputted in step S44 is subjected to the maximum pooling layer to obtain the feature map F4; the maximum pooling layer formula is shown in formula (10):
[0104]
[0105] In the formula, y e,k is the maximum pooling layer output feature at spatial position (e, k), R e,k is the pooling area at spatial position (e, k), x p,q Represents the pooling area R e,k The pixel value at position (p,q) in the graph;
[0106] Step S46, using the convolution layer of step S41 and the maximum pooling layer of step S45 to complete the construction of the convolutional neural network.
[0107] Furthermore, in step S51, the convolutional neural network constructed in step S4 is used to input the image data in the data set of drainage pipe siltation information in step S3 to extract spatial information, and a feature map F5 is output after the convolutional neural network.
[0108] Step S52, adding a gated recurrent unit to extract time information from the data set, extracting time features from the one-dimensional time series data in the data set of drainage pipe siltation information in step S3, and obtaining a feature vector F T ; The gated recurrent unit is shown in formula (11) to formula (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 are reset gate and update gate states respectively, σ is the sigmoid activation function, w r 、w z and wh is the weight matrix, x t is the input vector at the current moment, is the candidate hidden state; tanh is the hyperbolic tangent function, h t and h t-1 They are the state memory variables of the current moment and the previous moment respectively;
[0114] Step S53: Flatten the feature map F5 extracted in step S51 to obtain a feature vector F S and the feature vector F in step S52 T Splicing, to achieve the fusion of time information and space information, and obtain the fused feature vector F ST ;
[0115] Step S54: The feature vector F fused in step S53 ST The input is sent to different fully connected layers, which are divided into two. One fully connected layer is used to determine whether siltation occurs in the drainage pipe, and the other fully connected layer 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-order moment estimate, and exponential decay rate of the second-order moment estimate are used as optimization hyperparameters of the adaptive mutation particle swarm optimization algorithm, the optimal hyperparameter ranges and particle speeds of the adaptive moment estimate optimizer are given, and the maximum number of iterations and the maximum flight speed of the particles are set;
[0117] Step S62, determine a function that allows the particle to reach the standard state, find the optimal solution of the particle through the movement of each particle, called the individual optimal solution; then deduce the optimal solution of all particles this time through the individual optimal solution of each particle, called the global optimal solution; compare the global optimal solution this time with the historical global optimal solution, select a better solution, and update it;
[0118] Step S63, according to the 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 are the maximum and minimum values of the inertia weight, respectively. is the objective function value of the tth iteration of the ith particle, that is, the loss difference between the predicted siltation state and the actual siltation state, f min 、f avg The minimum target value and average target value of all particles at present; here w max and w minThe value is: w max =0.9, w min =0.3;
[0121] Step S64, according to the current flying speed of the particle, the inertia weight obtained in step S63 and the global optimal solution and individual optimal solution obtained in step S62, the speed of the particle itself is updated, as shown in formula (16):
[0122]
[0123] In the formula, is the flying speed of the ith particle at the iteration number t+1, is the flight speed of the ith particle at the tth iteration, c1 and c2 are learning factors, r1 and r2 are random numbers between [0,1], is the best position experienced by the ith particle, is the position vector of the ith particle at the tth iteration, is the best position experienced by the entire particle swarm in the solution space;
[0124] Step S65, using step S64 to update the velocity of the particle itself, and using mutation operation and traditional operation to update the position of the particle itself; the mutation operation formula (17) and the traditional operation formula (18) are shown:
[0125]
[0126] In the formula, is the position vector of the ith particle at the time of iteration t+1, is the position vector of the ith particle at the tth iteration, rand is a random number between [0,1], is the flying speed of the ith particle when the number of iterations is t+1; 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 mutation particle swarm optimization algorithm terminates; the optimal learning rate, weight decay, exponential decay rate of the first-order moment estimate, and exponential decay rate of the second-order moment estimate are obtained.
[0128] Furthermore, in step S21, the one-dimensional time series data of the flow velocity and flow rate of the upstream node and the downstream node are converted into two-dimensional image data using the Gram angular field function in the open source library;
[0129] Furthermore, in step S22, a data set module in an open source library is used to make the two-dimensional image data, the one-dimensional time series data, and the siltation length and siltation thickness of the drainage pipe converted in step S21 into a data set containing the siltation information of the drainage pipe;
[0130] Further, in step S31, a convolution layer is constructed using an open source library, and a single convolution layer is constructed using a two-dimensional convolution submodule, a batch normalization, and a leaky rectifier unit module in a neural network module;
[0131] Further, in step S32, using the convolutional layer built in step S31 and the maximum pooling layer in the neural network module, a convolutional neural network is built in the order of the convolutional layer and the pooling layer to obtain a spatial information feature map F5;
[0132] Further, in step S33, the feature map obtained in step S32 is flattened according to dimension 1 using the flattening function in the open source library to facilitate subsequent splicing. The flattened feature map F5 is recorded as feature vector F S ;
[0133] Further, in step S34, the gated recurrent unit in the neural network module is used to extract time information, and the obtained features are recorded as feature vectors F T ;
[0134] Further, in step S35, the feature vector F in step S33 is concatenated using the concatenation function in the open source library. S and the feature vector F of step S34 T Stack the fused outputs by depth;
[0135] Further, in step S36, the linear layer in the neural network module is used to fit the output features of step S35, wherein one fully connected layer is used to determine whether siltation occurs in the drainage pipe, and another fully connected layer is used to predict the length and thickness of siltation in the drainage pipe;
[0136] Further, in step S48, when rand in step S47 is greater than the mutation rate 0.4, the code written in formula (39) in step S47 is used to update the position; otherwise, the code written in formula (40) is used to update the position.
Claims
1. An intelligent diagnosis method for drainage pipe siltation disease, characterized by: The following steps are involved: Step S1, using a full-scale experiment on a drainage pipeline, collecting one-dimensional time series data of flow velocity and flow rate at upstream nodes and downstream nodes of the drainage pipeline, and recording the siltation length and siltation thickness of the drainage pipeline; Step S2, based on the one-dimensional time series data collected in step S1, using a data processing module based on Gram angle and field to convert the one-dimensional time series data of flow velocity and flow rate of upstream nodes and downstream nodes of the drainage pipe into two-dimensional image data with spatial information; Step S3, making a data set containing drainage pipe siltation information 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, and obtaining time information and space information; Step S4, extracting the temporal information and spatial information of the data set in step S3, building a convolution layer by combining convolution, batch normalization and leaky rectifier unit functions, and using a maximum pooling layer to extract important spatial information to achieve the construction of a convolutional neural network; Step S5, extracting spatial information of the data set in step S3 by combining the convolutional neural network in step S4, extracting temporal information in the data set by combining the gated recurrent unit, building a temporal-spatial feature extraction network model using the convolutional neural network and the gated recurrent unit, fusing the temporal information and spatial information in the extracted data set, integrating the fused temporal information and spatial information using a fully connected layer, and outputting the result; Step S6, using the particle swarm algorithm, adaptive inertia weight and mutation operation, construct an adaptive mutation particle swarm optimization algorithm to find the optimal hyperparameters of the adaptive moment estimation optimizer; to 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 and the siltation length and thickness in the drainage pipe.
2. The intelligent diagnosis method for drainage pipe siltation disease according to claim 1 is characterized by: Step S2, the specific steps are as follows: Step S21, based on the one-dimensional time series data collected in step S1, the flow velocity and flow rate of the upstream and downstream nodes of the drainage pipe are normalized to the interval [-1, 1] according to formula (1); given a set of upstream node or downstream node flow velocity time series sequence, V = {v1, v2, ..., v n }, ν1 is the first flow velocity time series, ν2 is the second flow velocity time series, ν n is the nth velocity time series. According to formula (1), the velocity time series V is normalized to the interval [-1, 1]. The normalized velocity time series is recorded as is the first normalized flow velocity time series, is the second normalized flow velocity time series, is the nth normalized flow velocity time series; In the formula, is the i-th normalized velocity time series, v i is the ith flow velocity time series, max(V) is the maximum value of the flow velocity time series, and min(V) is the minimum value of the flow velocity time series; Step S22, normalizing the flow velocity time series sequence in step S21 Use formula (2) to transform into polar coordinates: In the formula, is the polar angle corresponding to the i-th normalized velocity time series, r is the polar diameter, t i is the timestamp, M is the regularization constant of polar coordinates; Step S23, according to the polar angle obtained in step S22, the normalized velocity time series V is encoded using formula (3) to obtain two-dimensional image data with spatial information: Where GASF is a two-dimensional image data with spatial information. They respectively represent the polar angle corresponding to the i-th normalized flow velocity time series sequence and the polar angle corresponding to the j-th normalized flow velocity time series sequence.
3. The intelligent diagnosis method for drainage pipe siltation disease according to claim 2 is characterized by: Step S4, the specific steps are as follows: Step S41, the convolution kernel in the convolution layer generates a new value by performing a dot multiplication operation with the two-dimensional image data with spatial information in each local area, and uses the new value as a pixel point in the data map; the operation formula is as follows: In the formula, y e,k is the output feature at the horizontal coordinate e and the vertical coordinate k on the data map, m and n are the width and height of the convolution kernel respectively, and w u,v is the parameter of the convolution kernel at the horizontal coordinate u and vertical coordinate v, x e-u+1,k-v+1 is the input feature of the data map; In step S42, the convolution kernel performs the same operation as step S41 on the two-dimensional images of the input multiple local regions in a sliding manner, and merges them into a data map, i.e., a feature map F1; Step S43, after the feature graph F1 obtained in step S42 is processed by formula (5) to formula (8), the data mapping graph conforms to the normal distribution with a mean of 0 and a variance of 1, and a feature graph F2 is obtained; In the formula, μ is the mean value of each batch of data in the data mapping diagram, l is the length of each batch of data in the data mapping diagram, and x i is the i-th data item in the data sequence in the data mapping diagram, σ 2 is the variance of each batch of data in the data mapping diagram, is the i-th data after data normalization in the data mapping diagram, ε is a constant term, y i is the i-th output item of the normalization layer, γ and β represent the learnable scaling and bias parameters respectively; Step S44, the feature map F2 obtained in step S43 is subjected to a leaky rectifier unit function operation to obtain a feature map F3, where the feature map F3 is the output feature of the first convolutional layer data map; A parameter is added to the leaky rectifier unit function so that when the input is less than 0, the output is no longer always 0. The expression of the leaky rectifier unit function is shown in formula (9): Where f(x) is the output feature of the leaky rectifier unit function operation, x is the input feature of the leaky rectifier unit function operation, and α is a value between (0,1]; Step S45: The feature map F3 outputted in step S44 is subjected to the maximum pooling layer to obtain the feature map F4; the maximum pooling layer formula is shown in formula (10): In the formula, y e,k is the maximum pooling layer output feature at spatial position (e, k), R e,k is the pooling area at spatial position (e, k), x p,q Represents the pooling area R e,k The pixel value at position (p,q) in the graph; Step S46, using the convolution layer of step S41 and the maximum pooling layer of step S45 to complete the construction of the convolutional neural network.
4. The intelligent diagnosis method for drainage pipe siltation disease based on deep learning and machine learning according to claim 3 is characterized by: Step S5, the specific steps are as follows: Step S51, using the convolutional neural network built in step S4, inputting the image data in the data set of drainage pipe siltation information in step S3, extracting spatial information, and outputting a feature map F5 after the convolutional neural network; Step S52, adding a gated recurrent unit to extract time information from the data set, extracting time features from the one-dimensional time series data in the data set of drainage pipe siltation information in step S3, and obtaining a feature vector F T ; The gated recurrent unit is shown in formula (11) to formula (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 are reset gate and update gate states respectively, σ is the sigmoid activation function, w r 、w z and w h is the weight matrix, x t is the input vector at the current moment, is the candidate hidden state, tanh is the hyperbolic tangent function, h t and h t-1 They are the state memory variables of the current moment and the previous moment respectively; Step S53: Flatten the feature map F5 extracted in step S51 to obtain a feature vector F S and the feature vector F in step S52 T Splicing, to achieve the fusion of time information and space information, and obtain the fused feature vector F ST ; Step S54: The feature vector F fused in step S53 ST The input is sent to different fully connected layers, which are divided into two. One fully connected layer is used to determine whether siltation occurs in the drainage pipe, and the other fully connected layer is used to predict the length and thickness of siltation in the drainage pipe.
5. The intelligent diagnosis method for drainage pipe siltation disease according to claim 4 is characterized by: In step S6, the specific steps are as follows: Step S61, using the learning rate, weight decay, exponential decay rate of the first-order moment estimate, and exponential decay rate of the second-order moment estimate as optimization hyperparameters of the adaptive mutation particle swarm optimization algorithm, giving the optimal hyperparameters of the adaptive moment estimate optimizer their respective ranges and particle speeds, setting the maximum number of iterations and the maximum particle flight speed; Step S62, determine a function that allows the particle to reach the standard state, find the optimal solution of the particle through the movement of each particle, called the individual optimal solution; then deduce the optimal solution of all particles this time through the individual optimal solution of each particle, called the global optimal solution; compare the global optimal solution this time with the historical global optimal solution, select a better solution, and update it; Step S63, according to the 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 are the maximum and minimum values of the inertia weight, respectively. is the objective function value of the t-th iteration of the ith particle, that is, the loss difference between the predicted siltation state and the actual siltation state; f min 、f avg The minimum target value and average target value of all particles at present; Step S64, according to the current flying speed of the particle, the inertia weight obtained in step S63 and the global optimal solution and individual optimal solution obtained in step S62, the speed of the particle itself is updated, as shown in formula (16): In the formula, is the flying speed of the ith particle at the iteration number t+1, is the flight speed of the ith particle at the tth iteration, c1 and c2 are learning factors, r1 and r2 are random numbers between [0,1], is the best position experienced by the ith particle, is the position vector of the ith particle at the tth iteration, is the best position experienced by the entire particle swarm in the solution space; Step S65, using step S64 to update the velocity of the particle itself, and using mutation operation and traditional operation to update the position of the particle itself; the mutation operation formula (17) and the traditional operation formula (18) are shown: In the formula, is the position vector of the ith particle at iteration number t+1, is the position vector of the ith particle at the tth iteration, rand is a random number between [0,1], is the flying speed of the ith particle at the 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 mutation particle swarm optimization algorithm terminates; the optimal learning rate, weight decay, exponential decay rate of the first-order moment estimate, and exponential decay rate of the second-order moment estimate are obtained.
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
Error-corrected intelligent diagnosis method for sedimentation of drainage pipeline
CN117725836A
Abnormality detecting device and abnormality detecting method
JP2020144619A