Disclosure of Invention
Aiming at the problems in the prior art, the embodiment of the invention provides an intelligent maintenance decision method and device for a buried pipeline.
Specifically, the embodiment of the invention provides the following technical scheme:
in a first aspect, an embodiment of the present invention provides an intelligent maintenance decision method for a buried pipeline, including:
acquiring a target magnetic stress picture of a pipeline to be subjected to maintenance decision; the target magnetic stress picture is a magnetic stress detection signal picture of the pipeline to be subjected to maintenance decision;
inputting the target magnetic stress picture into a maintenance decision model trained in advance to obtain a maintenance decision result of the target magnetic stress picture; the maintenance decision result comprises a defective pixel position and a maintenance grade;
the maintenance decision model trained in advance is obtained by taking a sample magnetic stress picture with a predetermined defective pixel position and maintenance grade as the input of the model, taking the defective pixel position and the maintenance grade in the sample magnetic stress picture as the output of the model, and training and testing the neural network model.
Further, the intelligent maintenance decision method for the buried pipeline further comprises the following steps: a training process of the maintenance decision model;
wherein the training process of the maintenance decision model comprises:
collecting a preset number of sample magnetic stress pictures; wherein, the sample magnetic stress pictures with the preset number need to cover various defect pixel positions and various maintenance grades;
determining the positions of the defective pixels and the maintenance levels of the preset number of sample magnetic stress pictures according to experience or excavation by a detection signal analysis expert;
the method comprises the steps of taking a sample magnetic stress picture with a predetermined defective pixel position and a predetermined maintenance grade as input of a model, taking the defective pixel position and the maintenance grade in the sample magnetic stress picture as output of the model, and training and testing a neural network model based on an intelligent learning algorithm to obtain a maintenance decision model.
Further, after collecting a preset number of sample magnetic stress pictures, the method further comprises the following steps:
and carrying out unified scale adjustment on the sample magnetic stress picture, and specifically comprising the following steps:
firstly, counting the detection mileage X of each detected pipe section picture
max Average detected mileage
Pixel length L
src And average original pixel length
Average width
Rounded to an integer;
to ensure that the mileage detection ratio of all pictures is uniform, the pixel length L of all pictures is first determined
src Adjusting the length of the sample picture after adjustment
Counting the length L of the picture
0 Pixel average value of
Rounding to an integer, and then performing the next zoom adjustment on the picture:
case 1: for detecting mileage
The original pixel length L of the sample magnetic stress picture
0 Scaled to a length of
Original width W
0 Is scaled to
Obtaining the coordinates of the zoomed picture pixel points according to a coordinate interpolation mode:
wherein the content of the first and second substances,
to transform the coordinates of the pixel points, L
0 ,W
0 The length and width of the sample image;
the transformed coordinates (x, y) of the pixel point belong to a pixel point coordinate set P:
wherein the content of the first and second substances,
when the pixel point coordinates (x, y) are integers, the pixel value f (x, y) of the processed point is the same as the pixel value of the corresponding point in the original image; when the pixel point coordinates (x, y) are not integers, performing bilinear interpolation on the pixels of four points surrounding the point in the original image, and then rounding to obtain a pixel value f (x, y) of the processed point;
case 2: for detecting mileage
Sampling the magnetic stress picture, copying and splicing the picture until the sum of the detection mileage of the spliced picture is within the range
Within the interval, then executing case 1;
case 3: for detecting mileage
The sample magnetic stress picture is firstly split by manpower, and the splitting principle is as follows: ensure the split picture detection mileage to be in
And the abnormal signal area is not split into two pictures, and the condition 1 is executed for the split pictures.
Further, taking a sample magnetic stress picture as an input of the model, taking a defective pixel position and a maintenance grade in the sample magnetic stress picture as an output of the model, training and testing the neural network model based on an intelligent learning algorithm to obtain a maintenance decision model, and the method comprises the following steps:
determining the number ratio of pictures containing the defective magnetic stress pictures to pictures not containing the defective magnetic stress pictures according to the statistical result of the magnetic stress pictures acquired aiming at the history;
and randomly dividing the samples with the determined defective pixel positions and the maintenance grades into a training set and a testing set according to the picture quantity proportion so as to train and test the maintenance decision model.
Further, before the target magnetic stress picture is input into a pre-trained maintenance decision model, the method further comprises:
when a model is applied, firstly, detecting mileage proportion unification is carried out on the target magnetic stress picture;
if the mileage is detected
Scaling the picture to a standard size according to the method described in case 1 above;
if the mileage is detected
Then starting from the left end point of the picture, establish a length of
A sliding window of each
Cutting the picture once until the right side of the sliding window reaches the boundary of the picture to obtain the picture
And (5) opening pictures, inputting the pictures into a network for prediction, and outputting the positions of the defective pixels and the maintenance grade according to the network prediction result.
Further, the intelligent maintenance decision method for the buried pipeline further comprises the following steps: a process of adjusting and migrating the maintenance decision model;
wherein the process of adjusting and migrating the maintenance decision model comprises:
after the pipeline excavation data are accumulated, performing thermal One-Hot coding or continuous coding on the ambient environmental factors influencing magnetic induction, including metal, tree and pipeline attributes to obtain a first feature vector; splicing the feature vector of the target area selected by the area generation network RPN on the feature map obtained by the convolutional neural network with the first feature vector to obtain a second feature vector; the second characteristic vector is calculated through a fully-connected neural network layer, and then the probability L of the sample magnetic stress picture belonging to each maintenance grade is calculated through a Softmax function i Training a fully-connected network by using a random gradient descent (SGD) method, and outputting L by the network i Among the results, the maximum L i Where is the most likely repair level for the anomaly;
wherein the probability L that a signal sample belongs to each maintenance class i The calculation method is as follows:
wherein p is i Is the output of the fully connected network layer and N represents the number of repair levels.
Further, the intelligent maintenance decision method for the buried pipeline further comprises the following steps: optimizing the maintenance decision model to enable the maintenance decision model to output a defect type;
adding a layer of multi-label Sigmod loss function behind a full connection layer of the network to obtain the probability of predicting the sample magnetic stress picture into each type of defect
Wherein the content of the first and second substances,
the column vector output for the last fully connected layer of the network, M being the number of defect types,
adopting cross entropy loss function, using random gradient descent method SGD training network, network output
All the defect types corresponding to the positions larger than the threshold value in the sentence amount;
after the above processing is completed, the network outputs the defective pixel position, the defect type, and the corresponding maintenance grade in prediction.
In a second aspect, an embodiment of the present invention further provides an intelligent maintenance decision device for a buried pipeline, including:
the acquisition module is used for acquiring a target magnetic stress picture of the pipeline to be subjected to maintenance decision; the target magnetic stress picture is a magnetic stress detection signal picture of the pipeline to be subjected to maintenance decision;
the intelligent maintenance decision module is used for inputting the target magnetic stress picture into a maintenance decision model trained in advance to obtain a maintenance decision result of the target magnetic stress picture; wherein the maintenance decision result comprises a defective pixel position and a maintenance grade;
the maintenance decision model trained in advance is obtained by taking a sample magnetic stress picture with a predetermined defective pixel position and maintenance grade as the input of the model, taking the defective pixel position and the maintenance grade in the sample magnetic stress picture as the output of the model, and training and testing the neural network model.
Further, buried pipeline intelligence maintenance decision-making device still includes: a training module for performing a training process on the maintenance decision model;
wherein the training process of the maintenance decision model comprises:
collecting a preset number of sample magnetic stress pictures; wherein, the sample magnetic stress pictures with the preset number need to cover various defect pixel positions and various maintenance grades;
determining the positions of the defective pixels and the maintenance levels of the preset number of sample magnetic stress pictures according to experience or excavation by a detection signal analysis expert;
the method comprises the steps of taking a sample magnetic stress picture with a predetermined defective pixel position and a predetermined maintenance grade as input of a model, taking the defective pixel position and the maintenance grade in the sample magnetic stress picture as output of the model, and training and testing a neural network model based on an intelligent learning algorithm to obtain a maintenance decision model.
Further, after collecting a preset number of sample magnetic stress pictures, the training module is further configured to perform the following steps:
and carrying out unified scale adjustment on the sample magnetic stress picture, and specifically comprising the following steps:
firstly, counting the detection mileage X of each detected pipe section picture
max Average detected mileage
Pixel length L
src And average original pixel length
Average width
Rounded to an integer;
to ensure that the mileage detection ratio of all pictures is uniform, the pixel length L of all pictures is first determined
src Adjusting the length of the sample picture after adjustment
Counting the length L of the picture
0 Pixel average value of
Rounding to an integer, and then performing the next zoom adjustment on the picture:
case 1: for detecting mileage
Uniformly sampling a magnetic stress picture, and measuring the original pixel length L of the picture
0 Scaled to a length of
Original width W
0 Is scaled to
Obtaining the coordinates of the zoomed picture pixel points according to a coordinate interpolation mode:
wherein the content of the first and second substances,
to transform the coordinates of the pixel points, L
0 ,W
0 The length and width of the sample image;
the transformed coordinates (x, y) of the pixel point belong to a pixel point coordinate set P:
wherein the content of the first and second substances,
when the pixel point coordinates (x, y) are integers, the pixel value f (x, y) of the processed point is the same as the pixel value of the corresponding point in the original image; when the pixel point coordinates (x, y) are not integers, performing bilinear interpolation on pixels of four points surrounding the point in an original image, and then rounding to obtain a pixel value f (x, y) of the processed point;
case 2: for detecting mileage
Sampling the magnetic stress picture, copying and splicing the picture until the sum of the detection mileage of the spliced picture is within the range
Within the interval, then executing case 1;
case 3: for detecting mileage
The sample magnetic stress picture is firstly split by manpower, and the splitting principle is as follows: ensure the picture after splitting to detect the mileage
And the abnormal signal area is not split into two pictures, and the condition 1 is executed for the split pictures.
According to the technical scheme, the intelligent maintenance decision method and device for the buried pipeline, provided by the embodiment of the invention, firstly obtain a target magnetic stress picture of the pipeline to be subjected to maintenance decision, and then input the target magnetic stress picture into a maintenance decision model trained in advance to obtain a maintenance decision result of the target magnetic stress picture; wherein the maintenance decision result comprises a defective pixel position and a maintenance grade; the maintenance decision model trained in advance is obtained by taking a sample magnetic stress picture with a predetermined defective pixel position and maintenance grade as input, taking the defective pixel position and the maintenance grade in the sample magnetic stress picture as output, and training and testing a neural network model. The embodiment of the invention provides an intelligent maintenance decision method which is strong in adaptability and not influenced by artificial subjective factors based on magnetic induction signal picture data, improves the accuracy of analysis of detection results, avoids blind maintenance, can greatly improve the economy and reduce the labor force, and simultaneously improves the safety of pipelines.
Detailed Description
The following further describes embodiments of the present invention with reference to the accompanying drawings. The following examples are only for illustrating the technical solutions of the present invention more clearly, and the protection scope of the present invention is not limited thereby.
Fig. 1 shows a flowchart of an intelligent maintenance decision method for a buried pipeline according to an embodiment of the present invention, and as shown in fig. 1, the intelligent maintenance decision method for a buried pipeline according to an embodiment of the present invention specifically includes the following steps:
step 101: acquiring a target magnetic stress picture of a pipeline to be subjected to maintenance decision; the target magnetic stress picture is a magnetic stress detection signal picture of the pipeline to be subjected to maintenance decision;
in this step, the detection signal diagram is usually a two-dimensional image, and in the magnetic induction detection signal result of the two-dimensional image, the abscissa X is the detection distance in meters (m), and the ordinate H is the magnetic field strength in amperes per meter (a/m).
Step 102: inputting the target magnetic stress picture into a maintenance decision model trained in advance to obtain a maintenance decision result of the target magnetic stress picture; wherein the maintenance decision result comprises a defective pixel position and a maintenance grade;
the maintenance decision model trained in advance is obtained by taking a sample magnetic stress picture with a predetermined defective pixel position and maintenance grade as the input of the model, taking the defective pixel position and the maintenance grade in the sample magnetic stress picture as the output of the model, and training and testing the neural network model.
In this step, it should be noted that, in this embodiment, with the help of the magnetic induction signal picture data and based on the magnetic induction signal picture data, an intelligent maintenance decision method that is strong in adaptability and not affected by human subjective factors is provided, so that the accuracy of analysis of the detection result is improved, blind maintenance is avoided, the economy can be greatly improved, the labor force is reduced, and meanwhile, the safety of the pipeline is improved.
According to the technical scheme, the intelligent maintenance decision method for the buried pipeline, provided by the embodiment of the invention, comprises the steps of firstly obtaining a target magnetic stress picture of the pipeline to be subjected to maintenance decision, and then inputting the target magnetic stress picture into a maintenance decision model trained in advance to obtain a maintenance decision result of the target magnetic stress picture; the maintenance decision result comprises a defective pixel position and a maintenance grade; the maintenance decision model trained in advance is obtained by taking a sample magnetic stress picture with a predetermined defective pixel position and maintenance grade as input, taking the defective pixel position and the maintenance grade in the sample magnetic stress picture as output, and training and testing a neural network model. The embodiment of the invention provides an intelligent maintenance decision method which is strong in adaptability and not influenced by artificial subjective factors based on magnetic induction signal picture data, improves the accuracy of analysis of detection results, avoids blind maintenance, can greatly improve the economy and reduce the labor force, and simultaneously improves the safety of pipelines.
Based on the content of the foregoing embodiment, in this embodiment, the intelligent maintenance decision method for a buried pipeline further includes: a training process of the maintenance decision model;
wherein the training process of the maintenance decision model comprises:
collecting a preset number of sample magnetic stress pictures; the preset number of sample magnetic stress pictures need to cover various defect pixel positions and various maintenance levels;
determining the positions of the defective pixels and the maintenance levels of the preset number of sample magnetic stress pictures according to experience or excavation by a detection signal analysis expert;
the method comprises the steps of taking a sample magnetic stress picture with a predetermined defect pixel position and a predetermined maintenance grade as input, taking the defect pixel position and the maintenance grade in the sample magnetic stress picture as output, and training and testing a neural network model based on an intelligent learning algorithm to obtain a maintenance decision model.
In this embodiment, the preset number of sample magnetic stress pictures covers various defective pixel positions and various maintenance levels, so that a maintenance decision model obtained after model training is performed on the preset number of sample magnetic stress pictures can accurately identify the defective pixel position and the maintenance level of a target magnetic stress picture of a pipeline to be subjected to maintenance decision.
Based on the content of the foregoing embodiment, in this embodiment, after collecting a preset number of sample magnetic stress pictures, the method further includes the following steps:
and carrying out unified scale adjustment on the sample magnetic stress picture, and specifically comprising the following steps:
firstly, counting the detection mileage X of each detected pipe section picture
max Average detected mileage
Pixel length L
src And average original pixel length
Average width
Rounded to an integer;
to ensure that the mileage detection ratio of all pictures is uniform, the pixel length L of all pictures is first determined
src Adjusting the length of the sample picture after adjustment
Counting the length L of the picture
0 Pixel average value of
Rounding to an integer, and then performing the next zoom adjustment on the picture:
case 1: for detecting mileage
The original pixel length L of the sample magnetic stress picture
0 Scaled to a length of
Original width W
0 Is scaled to
Obtaining the coordinates of the zoomed picture pixel points according to a coordinate interpolation mode:
wherein the content of the first and second substances,
to transform the coordinates of the pixel points, L
0 ,W
0 The length and width of the sample image;
the transformed coordinates (x, y) of the pixel point belong to a pixel point coordinate set P:
wherein the content of the first and second substances,
when the pixel point coordinates (x, y) are integers, the pixel value f (x, y) of the processed point is the same as the pixel value of the corresponding point in the original image; when the pixel point coordinates (x, y) are not integers, performing bilinear interpolation on pixels of four points surrounding the point in an original image, and then rounding to obtain a pixel value f (x, y) of the processed point;
case 2: for detecting mileage
Sampling the magnetic stress pictures, copying and splicing the pictures until the sum of the detection mileage of the spliced pictures is within the range
Within the interval, then executing case 1;
case 3: for detecting mileage
The uniform sample magnetic stress picture is firstly split to the signal diagram through manual work, and the splitting principle is as follows: ensure the picture after splitting to detect the mileage
And the abnormal signal area is not split into two pictures, and the condition 1 is executed for the split pictures.
In the embodiment, the problem that the obtained target magnetic stress picture cannot be directly utilized to perform intelligent pipeline maintenance grade identification based on the neural network due to the fact that the abscissa scale of the target magnetic stress picture obtained each time is different because the mileage measured each time is different can be solved by determining the relation between the detection mileage of the target magnetic stress picture and the average detection mileage of the magnetic stress picture of the detected pipe section and then performing unified scale adjustment on the target magnetic stress picture according to the relation between the detection mileage of the target magnetic stress picture and the average detection mileage of the magnetic stress picture of the detected pipe section.
Based on the content of the foregoing embodiment, in this embodiment, when the pixel coordinate (x, y) is not an integer, performing bilinear interpolation and rounding on the pixels of four points surrounding the point in the original image to obtain the pixel value f (x, y) of the point after processing, including:
when the pixel point coordinates (x, y) are not integers, performing bilinear interpolation on the pixels of four points surrounding the point in the original image, and then rounding to obtain a pixel value f (x, y) of the point after processing, wherein the bilinear interpolation is as follows:
wherein Q is 11 ,Q 12 ,Q 21 ,Q 22 Four pixel points of upper, lower, left and right surrounding the point in the original picture, the coordinates of the pixel points are (x) 1 ,y 1 ),(x 1 ,y 2 ),(x 2 ,y 1 ),(x 2 ,y 2 ) The pixel values of the original picture are f (Q) 11 ),f(Q 12 ),f(Q 21 ),f(Q 22 )。
Based on the content of the foregoing embodiment, in this embodiment, a sample magnetic stress picture with a predetermined defective pixel position and a predetermined maintenance level is used as an input, the defective pixel position and the maintenance level in the sample magnetic stress picture are used as an output, and a neural network model is trained and tested based on an intelligent learning algorithm to obtain a maintenance decision model, which includes:
determining the number ratio of the pictures containing the defective magnetic stress pictures to the pictures not containing the defective magnetic stress pictures according to the statistical result of the magnetic stress pictures acquired aiming at the history;
and randomly dividing the samples with the determined defective pixel positions and the maintenance grades into a training set and a testing set according to the picture quantity proportion so as to train and test the maintenance decision model.
In this embodiment, according to a statistical result of a magnetic stress picture obtained for history, a picture number ratio between a magnetic stress picture including a defect and a magnetic stress picture not including a defect is determined, then, according to the picture number ratio, a sample in which a position and a maintenance grade of a defect pixel are determined is randomly divided into a training set and a test set, then, a neural network model is trained by the training set, an effect of a trained maintenance decision model is tested by the test set, and by randomly dividing the sample in which the position and the maintenance grade of the defect pixel are determined into the training set and the test set according to the picture number ratio, an effect of model training and an effect of subsequent testing can be improved, so that corresponding expectations can be achieved for both model training and model testing.
Based on the content of the above embodiment, in this embodiment, in the process of training the neural network model, the network parameters are updated by using the SGD method to train the neural network model; wherein, in the selection of the anchors, according to the characteristics of the magnetic induction signals, the anchors with one size are selected, and the length-width ratio is 1: 2.
based on the content of the foregoing embodiment, in this embodiment, before the target magnetic stress picture is input into a maintenance decision model trained in advance, the method further includes:
when a model is applied, firstly, detecting mileage proportion unification is carried out on the target magnetic stress picture;
if the mileage is detected
Scaling the picture to a standard size according to the method described in case 1 above;
if the mileage is detected
Then starting from the left end point of the picture, establish a length of
A sliding window of each
Cutting the picture once until the right side of the sliding window reaches the boundary of the picture to obtain the picture
And (5) opening pictures, inputting the pictures into a network for prediction, and outputting the positions of the defective pixels and the maintenance grade according to the network prediction result.
In this embodiment, it should be noted that, when the network model is applied, for a segment of magnetic induction signal, if the mileage is detected
Scaling the signal array to a standard size; if the mileage is detected
It is ensured that the potentially failing region can be detected by the network at least once in its entirety and the distortion of the data signal is reduced to improve the accuracy of the network. At this point no further scaling is performed but starting from the left end of the signal array, a length of is established
A sliding window of each
Length clipping the signal once until the right side of the sliding window reaches the boundary of the signal array to obtain
And (rounding down) the signal arrays, inputting the signal arrays into a network for prediction, and outputting the interval of the abnormal signal position on the data and the maintenance grade of the abnormal signal according to the network prediction result.
Based on the content of the foregoing embodiment, in this embodiment, the intelligent maintenance decision method for a buried pipeline further includes: a process of adjusting and migrating the maintenance decision model;
wherein the process of adjusting and migrating the maintenance decision model comprises:
after the pipeline excavation data are accumulated, performing thermal One-Hot coding or continuous coding on the ambient environmental factors influencing magnetic induction, including metal, tree and pipeline attributes to obtain a first feature vector; splicing the feature vector corresponding to the target area selected by the area generation network RPN on the feature map obtained by the convolutional neural network with the first feature vector to obtain a second feature vector; calculating the second characteristic vector through a full-connection neural network layer and then calculating through a Softmax function to obtain the probability L that the sample magnetic stress picture belongs to each maintenance grade i Training a fully-connected network by using a random gradient descent (SGD) method, and outputting L by the network i Among the results, the maximum L i Where is the most likely repair level for the anomaly;
wherein the probability L that a signal sample belongs to each maintenance class i The calculation method is as follows:
wherein p is i Is the output of the fully connected network layer and N represents the number of repair levels.
In the embodiment, through the processing, the maintenance grade finally predicted by the maintenance decision model is more accurate, and the referential significance is larger, so that the problems that the accuracy of manual troubleshooting interference signals is low, the working efficiency is low, the error judgment and the missing judgment of the signals not only cause blind maintenance of enterprises, but also cause economic loss and social influence due to shutdown and production stoppage due to large personnel level difference and huge workload are effectively solved.
Based on the content of the foregoing embodiment, in this embodiment, the intelligent maintenance decision method for a buried pipeline further includes: optimizing the maintenance decision model to enable the maintenance decision model to output a defect type;
adding a layer of multi-label Sigmod loss function behind a full connection layer of the network to obtain the probability of predicting the sample magnetic stress picture into each type of defect
Wherein the content of the first and second substances,
the column vector output for the last fully connected layer of the network, M being the number of defect types,
adopting cross entropy loss function, using random gradient descent method SGD training network, network output
All defect types corresponding to positions larger than the threshold value in the vector;
after the above processing is completed, the network outputs the defective pixel position, the defect type, and the corresponding maintenance grade in prediction.
In this embodiment, after the data is further accumulated, the output of the network may also migrate to a more accurate defect type, such as a recess, metal corrosion, weld defect, or the like.
According to the two embodiments, the accumulated actual defect maintenance decision results and the corresponding data signals are substituted into the training module to carry out model optimization and further accurately predict the defect type by acquiring the defect data of pipeline excavation, the surrounding environment data and the maintenance decision data obtained through an empirical formula.
It can be understood that the intelligent maintenance decision process based on the neural network provided by this embodiment specifically includes the following processing contents:
firstly, marking abnormal points in the magnetic stress picture and maintenance grades of the abnormal points (determined by expert experience analysis or excavation), and using the abnormal points in the magnetic stress picture with each maintenance grade as data labels; and constructing a neural network model by using the collected data set, carrying out standardized preprocessing on the data, then randomly dividing the data into a training set and a testing set in proportion, training the model by using the training set data, then testing the model effect by using the testing set data, and outputting a maintenance decision result. In addition, defect data of pipeline excavation verification can be further collected, maintenance decision is carried out on the defects obtained through excavation by adopting a standard method, the accumulated actual defect maintenance decision results and the corresponding picture signals are substituted into the training module for tuning, and when the data quantity is accumulated to a certain degree, the model is directly migrated, so that the precision of the network is further improved through the actual data. In addition, the model can be optimized by adding a layer of multi-label Sigmod loss function, so that the network can migrate to more accurate defect types, such as pits, metal corrosion, weld defects and the like.
The following describes in detail an intelligent maintenance decision process based on a neural network according to an embodiment of the present invention with reference to fig. 2:
firstly, the picture is normalized into vectors with the same size according to pixel values, and the vectors are subjected to feature extraction through a gray VGG convolutional neural network to obtain feature map vectors. The feature map is extracted by a convolution header, then sent to an RPN (Region-generated Network) to obtain a target Region, and then the target Region is predicted.
And calculating a loss function of the sample in the network according to the artificially marked image abnormal region position (which can be understood as a defective pixel position) and the pipeline signal abnormal type (which can be understood as a maintenance grade). The method comprises the steps of counting the proportion of abnormal signals to normal signals, randomly dividing the existing data into a training set and a testing set according to the proportion value, training a network model by using the training set, wherein the input of the model is a normalized picture, the output of the model is the position and the maintenance grade of a defective pixel, and dividing the maintenance grade of the abnormal magnetic stress signal into 3 conditions of immediate repair, planned repair and monitoring use. In order to reduce the loss function, a SGD (Stochastic Gradient Descent) method is adopted to update network parameters and train a target detection network, and in order to accelerate the network training speed, only an anchor of one size can be selected according to the shape characteristics of a magnetic induction signal image in the aspect of anchor selection, wherein the aspect ratio is 1: 2. and testing the network effect by adopting the test set. After further data acquisition and accumulation, in order to improve the precision of the network, newly added data are substituted into the training module for tuning, so that the network detection accuracy is further improved.
When the network model is applied, for a magnetic stress signal picture, firstly, the detection mileage proportion of the picture is unified. If the mileage is detected
Scaling the picture to a standard size according to the method described in case 1; if detected in
Then starting from the left end point of the picture, establish a length of
A sliding window of each
Cutting the picture once until the right side of the sliding window reaches the boundary of the picture to obtain the picture
(round up down) picture. Inputting the pictures into a network for prediction, and outputting the pixel position of the abnormal signal and the maintenance grade of the abnormal signal according to the network prediction result.
After the signal picture data and the pipeline excavation data are further accumulated, One-Hot encoding can be carried out on pipeline influencing factors such as variables of metal, trees, pipeline attributes and the like, or continuous numerical type encoding is carried out vectorization, namely, factors possibly influencing magnetic stress such as trees, electric wires, pipeline attribute data and the like around the pipeline are counted during excavation, the data of the factors are recorded, and a new feature vector is obtained. If the pipeline attribute data (pipeline material, pipe diameter and wall thickness) are classified to form One-Hot codes and continuous codes, the form is as follows:
wherein m represents the pipe type, n represents the pipe diameter type, and r represents different thickness values of the pipeline. Splicing the characteristic diagram of the special signal area selected by the RPN with the characteristic vector of the surrounding environment factor, calculating the spliced characteristic vector through a full-connection neural network layer, and calculating the probability L of the signal sample belonging to each maintenance level through a Softmax function i Training the network, network output L, also using the SGD method i Among the results, the maximum L i The site is the most likely repair level for the site anomaly. Probability L of signal sample belonging to each maintenance class i The calculation is as follows:
in the formula, p i Is the output of the fully connected network layer, and N represents the number of maintenance levels, such as 3 levels, immediate repair, planned repair, monitoring use.
After the data is further accumulated, the output of the network can also migrate to more accurate defect types, such as pits, metal corrosion, weld defects, and the like. Adding a layer of multi-label Sigmod loss function behind a full connection layer of the network to obtain the probability of predicting the signal sample as each type of defect
Wherein the content of the first and second substances,
the column vector output by the last full connection layer of the network, M is the number of abnormal types,
training network by adopting cross entropy loss function and SGD method and network output
All locations in the vector that are larger than a threshold (typically 0.5) correspond to defect types.
After the steps are completed, the network can output the defect type and the corresponding maintenance grade during prediction, such as 'corrosion defect, monitoring and using'.
Therefore, the embodiment provides an intelligent maintenance decision method which is strong in adaptability and free of human subjective factor influence based on magnetic induction signal picture data, so that the analysis accuracy of the detection result is improved, blind maintenance is avoided, the economy and the working efficiency are greatly improved, the labor force is reduced, and the safety level of the pipeline is further improved. In the embodiment, the image signals accumulated in history are preprocessed, the target detection convolutional neural network is trained to make a decision on the processing result, and the ambient environment factors are added in the decision making process, so that the identification accuracy is continuously improved.
Fig. 3 is a schematic structural diagram of an intelligent maintenance decision-making device for a buried pipeline according to an embodiment of the present invention, and as shown in fig. 3, the intelligent maintenance decision-making device for a buried pipeline according to an embodiment of the present invention includes:
an obtaining module 201, configured to obtain a target magnetic stress picture of a pipeline to be subjected to a maintenance decision; the target magnetic stress picture is a magnetic stress detection signal picture of the pipeline to be subjected to maintenance decision;
the intelligent maintenance decision module 202 is configured to input the target magnetic stress picture into a maintenance decision model trained in advance, so as to obtain a maintenance decision result of the target magnetic stress picture; wherein the maintenance decision result comprises a defective pixel position and a maintenance grade;
the maintenance decision model trained in advance is obtained by taking a sample magnetic stress picture with a predetermined defective pixel position and maintenance grade as the input of the model, taking the defective pixel position and the maintenance grade in the sample magnetic stress picture as the output of the model, and training and testing the neural network model.
The intelligent maintenance decision-making device for the buried pipeline provided by the embodiment can be used for executing the intelligent maintenance decision-making method for the buried pipeline provided by the embodiment, the working principle and the beneficial effect are similar, and detailed description is omitted here.
Based on the same inventive concept, another embodiment of the present invention provides an electronic device, which specifically includes the following components, with reference to fig. 4: a processor 301, a memory 302, a communication interface 303, and a communication bus 304;
the processor 301, the memory 302 and the communication interface 303 complete mutual communication through the communication bus 304; the communication interface 303 is used for realizing information transmission between the devices;
the processor 301 is configured to call a computer program in the memory 302, and when the processor executes the computer program, the processor implements all the steps of the above intelligent repair decision method for buried pipelines, for example, when the processor executes the computer program, the processor implements the following steps: acquiring a target magnetic stress picture of a pipeline to be subjected to maintenance decision; the target magnetic stress picture is a magnetic stress detection signal picture of the pipeline to be subjected to maintenance decision; inputting the target magnetic stress picture into a maintenance decision model trained in advance to obtain a maintenance decision result of the target magnetic stress picture; the maintenance decision result comprises a defective pixel position and a maintenance grade; the maintenance decision model trained in advance is obtained by taking a sample magnetic stress picture with a predetermined defective pixel position and maintenance grade as the input of the model, taking the defective pixel position and the maintenance grade in the sample magnetic stress picture as the output of the model, and training and testing the neural network model.
Based on the same inventive concept, another embodiment of the present invention provides a non-transitory computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements all the steps of the above-mentioned buried pipeline intelligent repair decision method, for example, the processor implements the following steps when executing the computer program: acquiring a target magnetic stress picture of a pipeline to be subjected to maintenance decision; the target magnetic stress picture is a magnetic stress detection signal picture of the pipeline to be subjected to maintenance decision; inputting the target magnetic stress picture into a maintenance decision model trained in advance to obtain a maintenance decision result of the target magnetic stress picture; the maintenance decision result comprises a defective pixel position and a maintenance grade; the maintenance decision model trained in advance is obtained by taking a sample magnetic stress picture with a predetermined defective pixel position and maintenance grade as the input of the model, taking the defective pixel position and the maintenance grade in the sample magnetic stress picture as the output of the model, and training and testing the neural network model.
In addition, the logic instructions in the memory may be implemented in the form of software functional units and may be stored in a computer readable storage medium when sold or used as a stand-alone product. Based on such understanding, the technical solution of the present invention or a part thereof which substantially contributes to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. Based on such understanding, the above technical solutions may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the intelligent buried pipeline repair decision method according to various embodiments or some parts of embodiments.
In addition, in the present invention, terms such as "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Moreover, in the present invention, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. The term "comprising", without further limitation, means that the element so defined is not excluded from the group consisting of additional identical elements in the process, method, article, or apparatus that comprises the element.
Furthermore, in the description of the present specification, reference to the description of "one embodiment," "some embodiments," "an example," "a specific example," or "some examples" or the like means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.