Intelligent processing method and device of magnetic stress images for pipeline maintenance decision-making
By determining the relationship between the detection mileage of the original magnetic stress picture and the average detection mileage of the magnetic stress picture in the pipeline maintenance decision, the unified scale of the original magnetic stress picture is intelligently adjusted, and the problem of inconsistent magnetic stress picture scales caused by different mileages measured in the prior art is solved, and efficient and economical intelligent maintenance decisions are achieved.
Patent Information
- Application Number
- CN202110251402.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-08
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2041-03-08
AI Technical Summary
In the pipeline maintenance decision, the existing technology has different mileages measured each time, resulting in inconsistent horizontal scales of the magnetic stress pictures, requiring a lot of manual cutting, large workload, large labor, poor economy, and misoperation, resulting in abnormal signals being split, affecting the results of intelligent maintenance decisions.
By determining the relationship between the detection mileage of the original magnetic stress picture and the average detection mileage of the magnetic stress picture of the pipe section to be inspected, the original magnetic stress picture is intelligently adjusted to obtain the target magnetic stress picture. The method includes counting the detection mileage and pixel length of each pipe section picture to be inspected, adjusting the pixel length, uniformizing its proportions, and obtaining a target magnetic stress picture of standard size through interpolation and cropping.
By replacing manual cutting through intelligent processing, the workload and labor are reduced, work efficiency and economy are improved, the integrity of abnormal signal areas is ensured, and the accuracy of intelligent maintenance decisions is improved.
Smart Images

Figure CN115049542B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of pipeline safety, and in particular to a magnetic stress image intelligent processing method and device for pipeline maintenance decision-making. Background Art
[0002] Buried pipelines in refineries and stations are the link between various facilities in the plant. Because such pipelines cannot be inspected internally, it is difficult to observe them because they are buried underground, the excavation cost is high, and they are more susceptible to environmental corrosion such as soil. With the increase in the operating cycle, pipeline leakage accidents occur frequently, seriously affecting production and maintenance, and threatening the safety of the environment, people and property. At present, the maintenance decision-making method for buried pipelines that cannot be inspected internally is mainly based on non-contact detection. At present, magnetic stress detection is one of the most applicable and universal non-contact detection methods and is widely used by enterprises.
[0003] For pipeline companies, the length of pipelines tested at one time is not the same, ranging from tens of meters to hundreds of meters or even thousands of meters. Therefore, the signal diagrams of the test results provided by the third-party testing company are not the same test mileage. If they are directly cropped, it is easy to separate the abnormal signal area, thus affecting the results of intelligent maintenance decisions. For pictures with longer test mileage, the existing technology uses manual cropping to first crop the pictures into a standard size, and then use them for pipeline maintenance decisions. For a large amount of test data, this method has a large workload, a large number of workers, low work efficiency, poor economy, and there is a possibility of misoperation that causes abnormal signals to be split, resulting in missed reports or false reports of defects. Summary of the invention
[0004] In view of the problems existing in the prior art, an embodiment of the present invention proposes a magnetic stress image intelligent processing method and device for pipeline maintenance decision-making.
[0005] Specifically, the embodiment of the present invention provides the following technical solutions:
[0006] In a first aspect, an embodiment of the present invention provides a magnetic stress image intelligent processing method for pipeline maintenance decision-making, comprising:
[0007] Determine the relationship between the detection mileage of the original magnetic stress image and the average detection mileage of the magnetic stress image of the inspected pipe section;
[0008] According to the relationship between the detection mileage of the original magnetic stress image and the average detection mileage of the magnetic stress images of the inspected pipe section, the original magnetic stress image is intelligently adjusted to a uniform scale to obtain a target magnetic stress image.
[0009] Furthermore, the method of intelligently adjusting the original magnetic stress image to a uniform scale to obtain the target magnetic stress image according to the relationship between the detection mileage of the original magnetic stress image and the average detection mileage of the magnetic stress image of the inspected pipe section includes:
[0010] First, count the inspection mileage X of each inspected pipe section image max , average inspection mileage and pixel length L src and the average original pixel length Average Width Round to an integer;
[0011] To ensure that the detection mileage ratio of all images is unified, firstly, the pixel length L of all images is src Adjust so that the adjusted sample image length Count the average pixel value of the image length L0 Round to an integer, and then scale the image:
[0012] Processing situation 1: For detection mileage The original magnetic stress image is scaled to a length of The original width W0 is scaled to The coordinates of the pixel points of the scaled target magnetic stress image are obtained by coordinate interpolation:
[0013]
[0014]
[0015] in, is the coordinate of the pixel after transformation, L0, W0 is the length and width before scaling; is the average detection mileage of the magnetic stress images of the inspected pipe section, is the average pixel length, is the average width; the magnetic stress image is a two-dimensional image, the horizontal axis X is the detection mileage, the unit is meter, and the vertical axis H is the magnetic field intensity, the unit is ampere per meter;
[0016] The coordinates (x, y) of the transformed pixel point belong to the pixel point coordinate set P:
[0017]
[0018] Among them, P ij =(x i ,y j );i=1,2,…,m,j=1,2,…,n;
[0019] When the pixel point coordinates (x, y) are integers, the pixel value f(x, y) of the point after processing 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, the pixels of the four points surrounding the point in the original image are interpolated and rounded to obtain the pixel value f(x, y) of the point after processing;
[0020] Processing situation 2: For detection mileage The original magnetic stress image is copied and spliced until the sum of the target magnetic stress image detection mileage after splicing is In the interval, recycle and execute processing situation 1;
[0021] Processing situation 3: For detection mileage The original magnetic stress image of the non-abnormal area is divided from the left and right ends of the original magnetic stress image to the opposite side. The corresponding pixel length The length of the two pixels is Target magnetic stress image.
[0022] Furthermore, the intelligent adjustment of the original magnetic stress image to a uniform scale according to the relationship between the detection mileage of the original magnetic stress image and the average detection mileage of the magnetic stress image of the inspected pipe section also includes:
[0023] Processing situation 4: For detection mileage The original magnetic stress image of the non-abnormal area is obtained by dividing the image by the pixel length from the left end point of the original magnetic stress image. Cutting, when the remaining mileage After the cropping, the target magnetic stress images obtained all have a pixel length of The standard target magnetic stress picture is obtained, and the rest is processed in the same way as cases 1-3.
[0024] Furthermore, the intelligent adjustment of the original magnetic stress image to a uniform scale according to the relationship between the detection mileage of the original magnetic stress image and the average detection mileage of the magnetic stress image of the inspected pipe section also includes:
[0025] Processing situation 5: For detection mileage The original magnetic stress image of the signal with abnormal areas, the pixel horizontal coordinates of the original magnetic stress image are [0, L], then the abnormal area set G is expressed as
[0026] G={[g i ,g i +D i ],i=1,2,…,q}
[0027] Where q is the number of abnormal regions in an original magnetic stress image, g iis the starting point of the abscissa pixel of the ith abnormality, D i is the pixel length of the anomaly at the i-th location;
[0028] For each abnormal area, divide it from the starting point and end point of the abnormal area to both sides. or If the interval completely contains other abnormal areas, the abnormal areas contained in the original magnetic stress image are merged, including:
[0029] When the abnormal area When , the abnormal area is merged into the same target magnetic stress image and cropped. Similarly, when When , the abnormal area is merged into the same target magnetic stress image and cropped. The cropped target magnetic stress image has a pixel length of Standard target magnetic stress picture; if or The interval does not completely contain other abnormal areas. From the abnormal area [g i ,g i +D i ] are extended to both sides, and the length is The interval If this interval contains the endpoint of other abnormal areas, then this endpoint is used as a clipping point, and then extended to the other side for clipping to ensure that the length of the target magnetic stress image containing the abnormal area is Wherein, the incomplete inclusion includes not including or half including;
[0030] For abnormal areas The original magnetic stress image is cut into a target magnetic stress image in the abnormal area, and then the target magnetic stress image of the remaining non-abnormal area after cutting is cut into a target magnetic stress image, and processing conditions 1 to processing conditions 4 are executed cyclically.
[0031] Furthermore, when the pixel coordinates (x, y) are not integers, the pixels of the four points surrounding the point in the original image are interpolated and rounded to obtain the pixel value f(x, y) of the point after processing, including:
[0032] The bilinear interpolation is:
[0033]
[0034] Among them, Q 11 , Q 12 , Q 21 , Q 22The four pixels surrounding the point in the original image are (x1, y1), (x1, y2), (x2, y1), (x2, y2), and the pixel values in the original image are f(Q 11 ), f(Q 12 ), f(Q 21 ), f(Q 22 ).
[0035] In a second aspect, the present invention further provides a magnetic stress image intelligent processing device for pipeline maintenance decision-making, comprising:
[0036] A determination module, used to determine the relationship between the detection mileage of the original magnetic stress image and the average detection mileage of the magnetic stress image of the inspected pipe section;
[0037] The processing module is used to intelligently adjust the original magnetic stress image to a uniform scale to obtain a target magnetic stress image according to the relationship between the detection mileage of the original magnetic stress image and the average detection mileage of the magnetic stress image of the inspected pipe section.
[0038] Furthermore, the processing module is specifically used to perform the following process:
[0039] First, count the inspection mileage X of each inspected pipe section image max , average inspection mileage and pixel length L src and the average original pixel length Average Width Round to an integer;
[0040] To ensure that the detection mileage ratio of all images is unified, firstly, the pixel length L of all images is src Adjust so that the adjusted sample image length Count the average pixel value of the image length L0 Round to an integer, and then scale the image:
[0041] Processing situation 1: For detection mileage The original magnetic stress image is converted to the original pixel length L s0 Scale to length The original width W0 is scaled to The coordinates of the pixel points of the scaled target magnetic stress image are obtained by coordinate interpolation:
[0042]
[0043] in, is the coordinate of the pixel after transformation, L0, W0 is the length and width before scaling; is the average detection mileage of the magnetic stress images of the inspected pipe section, is the average pixel length, is the average width; the target magnetic stress image is a two-dimensional image, the horizontal axis X is the detection mileage, the unit is meter, and the vertical axis H is the magnetic field intensity, the unit is ampere per meter;
[0044] The coordinates (x, y) of the transformed pixel point belong to the pixel point coordinate set P:
[0045]
[0046] Among them, P ij =(x i ,y j );i=1,2,…,m,j=1,2,…,n;
[0047] When the pixel point coordinates (x, y) are integers, the pixel value f(x, y) of the point after processing 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, the pixels of the four points surrounding the point in the original image are interpolated and rounded to obtain the pixel value f(x, y) of the point after processing;
[0048] Processing situation 2: For detection mileage The original magnetic stress image is copied and spliced until the sum of the target magnetic stress image detection mileage after splicing is In the interval, recycle and execute processing situation 1;
[0049] Processing situation 3: For detection mileage The original magnetic stress image of the non-abnormal area is divided from the left and right ends of the original magnetic stress image to the opposite side. The corresponding pixel length The length of the two pixels is Target magnetic stress image.
[0050] Furthermore, the processing module is also used to perform the following process:
[0051] Processing situation 4: For detection mileage The original magnetic stress image of the non-abnormal area is obtained by dividing the image by the pixel length from the left end point of the original magnetic stress image. Cutting, when the remaining mileage The cropping is then completed, and the target magnetic stress images obtained all have a pixel length of The standard target magnetic stress picture is obtained, and the remaining parts are processed in the same way as Case 1 to Case 3.
[0052] Furthermore, the processing module is also used to perform the following process:
[0053] Processing situation 5: For detection mileage The original magnetic stress image with abnormal areas, the pixel horizontal coordinates of the original magnetic stress image are [0, L], then the abnormal area set G is expressed as
[0054] G={[g i ,g i +D i ],i=1,2,…,q}
[0055] Where q is the number of abnormal regions in an original magnetic stress image, g i is the starting point of the abscissa pixel of the ith abnormality, D i is the pixel length of the anomaly at the i-th location;
[0056] For each abnormal area, divide it from the starting point and end point of the abnormal area to both sides. or If the interval completely contains other abnormal areas, the abnormal areas contained in the original magnetic stress image are merged, including:
[0057] When the abnormal area When , the abnormal area is merged into the same target magnetic stress image and cropped. Similarly, when When , the abnormal area is merged into the same target magnetic stress image and cropped. The cropped target magnetic stress image has a pixel length of Standard target magnetic stress picture; if or The interval does not completely contain other abnormal areas. From the abnormal area [g i ,g i +D i ] are extended to both sides, and the length is The interval If this interval contains the endpoint of other abnormal areas, the endpoint is used as a clipping point and then extended to the other side to ensure that the length of the target magnetic stress image containing the abnormal area is Wherein, the incomplete inclusion includes not including or half including;
[0058] For abnormal areas The original magnetic stress image is cut into a target magnetic stress image in the abnormal area, and then the target magnetic stress image of the remaining non-abnormal area after cutting is cut into a target magnetic stress image, and processing conditions 1 to processing conditions 4 are executed cyclically.
[0059] Furthermore, when the processing module performs interpolation and rounding with the pixels of four points surrounding the point in the original image when the pixel point coordinate (x, y) is not an integer, to obtain the pixel value f(x, y) of the point after processing, it is specifically used to perform:
[0060] The bilinear interpolation is:
[0061]
[0062] Among them, Q 11 , Q 12 , Q 21 , Q 22 The four pixels surrounding the point in the original image are (x1, y1), (x1, y2), (x2, y1), (x2, y2), and the pixel values in the original image are f(Q 11 ), f(Q 12 ), f(Q 21 ), f(Q 22 ).
[0063] It can be seen from the above technical scheme that the intelligent processing method and device of magnetic stress images for pipeline maintenance decision-making provided by the embodiment of the present invention first determine the relationship between the detection mileage of the original magnetic stress image and the average detection mileage of the magnetic stress image of the inspected pipe section, and then intelligently adjust the original magnetic stress image to a unified scale based on the relationship between the detection mileage of the original magnetic stress image and the average detection mileage of the magnetic stress image of the inspected pipe section. This can replace manual work with intelligent methods to solve the problem that the horizontal coordinate scale of the target magnetic stress image obtained each time is different due to the different mileage measured each time, which in turn requires a lot of manual cropping work to obtain the target magnetic stress image for intelligent identification of pipeline maintenance level based on neural network. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0065] Figure 1 It is a flow chart of a magnetic stress image intelligent processing method for pipeline maintenance decision-making provided by an embodiment of the present invention;
[0066] Figure 2 It is a structural schematic diagram of a magnetic stress image intelligent processing device for pipeline maintenance decision-making provided by an embodiment of the present invention;
[0067] Figure 3 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0068] The specific implementation of the present invention is further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.
[0069] As described in the background technology section, for pipeline companies, the length of pipelines tested at one time is not the same, ranging from tens of meters to hundreds of meters or even thousands of meters. When using the test pictures provided by a third-party testing company to automatically determine the maintenance level of the pipeline based on the intelligent recognition of the test pictures based on the neural network, there is a technical problem: due to the different mileages measured each time, the horizontal coordinate scale of the target magnetic stress picture (also called the magnetic stress signal picture) obtained each time is also different, resulting in the inability to directly use the obtained target magnetic stress picture to identify the pipeline maintenance level (that is, it is impossible to directly input the obtained target magnetic stress picture into the intelligent recognition model based on the neural network to automatically determine the maintenance level of the pipeline). Therefore, if it is directly cropped, it is easy to separate the abnormal signal area, thereby affecting the intelligent maintenance decision result. For pictures with longer detection mileage, the prior art uses manual cropping to first crop the pictures into standard sizes, and then use them for pipeline maintenance decisions, which leads to another technical problem: for a large amount of test data, this method has a large workload, a large number of workers, low work efficiency, poor economy, and there is a misoperation that causes the abnormal signal to be split, thereby causing the omission or false alarm of defects. To solve these technical problems, the embodiments of the present invention provide a magnetic stress image intelligent processing method and device for pipeline maintenance decision-making. The magnetic stress image intelligent processing method and device for pipeline maintenance decision-making provided by the present invention will be described in detail below through specific embodiments.
[0070] Figure 1 FIG. 1 shows a flow chart of a magnetic stress image intelligent processing method for pipeline maintenance decision-making provided by an embodiment of the present invention. Figure 1 As shown, the magnetic stress image intelligent processing method for pipeline maintenance decision-making provided by the embodiment of the present invention specifically includes the following contents:
[0071] Step 101: determining the relationship between the detection mileage of the original magnetic stress image and the average detection mileage of the magnetic stress image of the inspected pipe section;
[0072] Step 102: Based on the relationship between the detection mileage of the original magnetic stress image and the average detection mileage of the magnetic stress images of the inspected pipe section, the original magnetic stress image is intelligently adjusted to a uniform scale to obtain a target magnetic stress image.
[0073] The intelligent processing method of magnetic stress images for pipeline maintenance decision-making provided by an embodiment of the present invention first determines the relationship between the detection mileage of the original magnetic stress image and the average detection mileage of the magnetic stress images of the inspected pipe section, and then intelligently adjusts the original magnetic stress image to a uniform scale based on the relationship between the detection mileage of the original magnetic stress image and the average detection mileage of the magnetic stress images of the inspected pipe section. This can replace manual work with an intelligent method to solve the problem that the horizontal coordinate scale of the target magnetic stress image obtained each time is different due to the different mileage measured each time, which in turn requires a lot of manual cutting work to obtain the target magnetic stress image for intelligent identification of pipeline maintenance level based on neural network.
[0074] It is understandable that, due to the different mileage measured each time, the horizontal axis scale of the target magnetic stress image (also called magnetic stress signal image) obtained each time is also different, which makes it impossible to directly use the obtained target magnetic stress image to identify the pipeline maintenance level, that is, it is impossible to directly input the obtained target magnetic stress image into the intelligent recognition model based on the neural network to automatically determine the maintenance level of the pipeline. The present application solves this problem well. The present application intelligently adjusts the obtained target magnetic stress image to a unified scale, so that the intelligently adjusted magnetic stress image can be input into the intelligent recognition model based on the neural network to accurately determine the maintenance level of the pipeline.
[0075] Based on the content of the above embodiment, in this embodiment, the original magnetic stress image is intelligently adjusted to a uniform scale to obtain a target magnetic stress image according to the relationship between the detection mileage of the original magnetic stress image and the average detection mileage of the magnetic stress image of the inspected pipe section, including:
[0076] First, count the inspection mileage X of each inspected pipe section image max , average inspection mileage and pixel length L src and the average original pixel length Average Width Round to an integer;
[0077] To ensure that the detection mileage ratio of all images is unified, firstly, the pixel length L of all images is src Adjust so that the adjusted sample image length Count the average pixel value of the image length L0 Round to an integer, and then scale the image:
[0078] Processing situation 1: For detection mileage The original magnetic stress image is scaled to a length of The original width W0 is scaled to The coordinates of the pixel points of the scaled target magnetic stress image are obtained by coordinate interpolation:
[0079]
[0080] in, is the coordinate of the pixel after transformation, L0, W0 is the length and width before scaling; is the average detection mileage of the magnetic stress images of the inspected pipe section, is the average pixel length, is the average width; the magnetic stress image is a two-dimensional image, the horizontal axis X is the detection mileage, the unit is meter, and the vertical axis H is the magnetic field intensity, the unit is ampere per meter;
[0081] The coordinates (x, y) of the transformed pixel point belong to the pixel point coordinate set P:
[0082]
[0083] Among them, P ij =(x i ,y j );i=1,2,…,m,j=1,2,…,n;
[0084] When the pixel point coordinates (x, y) are integers, the pixel value f(x, y) of the point after processing 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, the pixels of the four points surrounding the point in the original image are interpolated and rounded to obtain the pixel value f(x, y) of the point after processing;
[0085] Processing situation 2: For detection mileage The original magnetic stress image is copied and spliced until the sum of the target magnetic stress image detection mileage after splicing is In the interval, recycle and execute processing situation 1;
[0086] Processing situation 3: For detection mileage The original magnetic stress image of the non-abnormal area is divided from the left and right ends of the original magnetic stress image to the opposite side. The corresponding pixel length The length of the two pixels is Target magnetic stress image;
[0087] Based on the content of the above embodiment, in this embodiment, the magnetic stress image intelligent processing method for pipeline maintenance decision-making, the original magnetic stress image is intelligently adjusted to a uniform scale according to the relationship between the detection mileage of the original magnetic stress image and the average detection mileage of the magnetic stress image of the inspected pipe section, further comprising:
[0088] Processing situation 4: For detection mileage The original magnetic stress image of the non-abnormal area is obtained by dividing the image by the pixel length from the left end point of the original magnetic stress image. Cutting, when the remaining mileage The cropping is then completed, and the target magnetic stress images obtained all have a pixel length of The standard target magnetic stress picture is obtained, and the remaining parts are processed in the same way as Case 1 to Case 3.
[0089] Based on the content of the above embodiment, in this embodiment, the magnetic stress image intelligent processing method for pipeline maintenance decision-making, the original magnetic stress image is intelligently adjusted to a uniform scale according to the relationship between the detection mileage of the original magnetic stress image and the average detection mileage of the magnetic stress image of the inspected pipe section, further comprising:
[0090] Processing situation 5: For detection mileage The original magnetic stress image with abnormal areas, the pixel horizontal coordinates of the original magnetic stress image are [0, L], then the abnormal area set G is expressed as
[0091] G={[g i ,g i +D i ],i=1,2,…,q}
[0092] Where q is the number of abnormal regions in an original magnetic stress image, g i is the starting point of the abscissa pixel of the ith abnormality, D i is the pixel length of the anomaly at the i-th location;
[0093] For each abnormal area, divide it from the starting point and end point of the abnormal area to both sides. or If the interval completely contains other abnormal areas, the abnormal areas contained in the original magnetic stress image are merged, including:
[0094] When the abnormal area When , the abnormal area is merged into the same target magnetic stress image and cropped. Similarly, when When , the abnormal area is merged into the same target magnetic stress image and cropped. The cropped target magnetic stress image has a pixel length of Standard target magnetic stress picture; if or The interval does not completely contain other abnormal areas. From the abnormal area [g i ,g i +D i ] are extended to both sides, and the length is The interval If this interval contains the endpoint of other abnormal areas, the endpoint is used as a clipping point and then extended to the other side to ensure that the length of the target magnetic stress image containing the abnormal area is Wherein, the incomplete inclusion includes not including or half including;
[0095] For abnormal areas The original magnetic stress image is cut into a target magnetic stress image in the abnormal area, and then the target magnetic stress image of the remaining non-abnormal area after cutting is cut into a target magnetic stress image, and processing conditions 1 to processing conditions 4 are executed cyclically.
[0096] Based on the content of the above embodiment, in this embodiment, if this interval contains the endpoint of other abnormal areas, the endpoint is used as a clipping point, and then extended to the other side for clipping to ensure that the length of the target magnetic stress image containing the abnormal area is For example: If this interval contains the endpoints g of other abnormal regions i-1 +D i-1 , then the clipping interval is obtained If the right endpoint falls within other abnormal areas, it will shrink to the left to the area without abnormalities to obtain the final trimming interval [g i-1 +D i-1 ,g i+1 ], and execute processing case 1-processing case 2 cyclically for the final cropped target magnetic stress image.
[0097] Based on the content of the above embodiment, in this embodiment, when the pixel point coordinate (x, y) is not an integer, the pixels of the four points surrounding the point in the original image are interpolated and rounded to obtain the pixel value f (x, y) of the point after processing, including:
[0098] When the pixel coordinates (x, y) are not integers, the pixels of the four points surrounding the point in the original image are bilinearly interpolated and then rounded to get the pixel value f(x, y) of the point after processing. The bilinear interpolation is:
[0099]
[0100] Among them, Q 11 , Q 12 , Q 21 , Q 22 The four pixels surrounding the point in the original image are (x1, y1), (x1, y2), (x2, y1), (x2, y2), and the pixel values in the original image are f(Q 11 ), f(Q 12 ), f(Q 21 ), f(Q 22 ).
[0101] It is understandable that the above scheme is a scheme for unifying the scale of magnetic stress images. Through the above processing method of unifying the scale of magnetic stress images, intelligent methods can be used to replace manual work to solve the problem that the horizontal axis scale of the magnetic stress image obtained each time is different due to the different mileage measured each time, which leads to a large amount of manual cutting work required to obtain the magnetic stress image for intelligent identification of pipeline maintenance level based on neural network. The following briefly introduces the intelligent maintenance decision-making process based on neural network after obtaining the scale-unified standard magnetic stress image. Specifically including:
[0102] First, mark the abnormal points in the magnetic stress image and the maintenance level of the abnormal points (determined by expert experience analysis or excavation); use the abnormal points in the magnetic stress image with various maintenance levels as data labels; use the collected data set to build a neural network model, standardize the data for preprocessing, and then randomly divide the data into training set and test set in proportion. Train the model with the training set data, then use the test set data to test the model effect and output the maintenance decision result.
[0103] In addition, defect data verified by pipeline excavation can be further collected, and standard methods can be used to make maintenance decisions on the defects obtained by excavation. The accumulated actual defect repair decision results and their corresponding image signals can be substituted into the training module for optimization processing. When the amount of data accumulates to a certain extent, the model can be directly migrated to further improve the accuracy of the network through actual data.
[0104] Figure 2 FIG. 4 shows a schematic diagram of the structure of a magnetic stress image intelligent processing device for pipeline maintenance decision-making provided by an embodiment of the present invention. Figure 2 As shown, the magnetic stress image intelligent processing device for pipeline maintenance decision-making provided by the embodiment of the present invention includes:
[0105] A determination module 201 is used to determine the relationship between the detection mileage of the original magnetic stress image and the average detection mileage of the magnetic stress image of the inspected pipe section;
[0106] The processing module 202 is used to intelligently adjust the original magnetic stress image to a uniform scale to obtain a target magnetic stress image according to the relationship between the detection mileage of the original magnetic stress image and the average detection mileage of the magnetic stress images of the inspected pipe section.
[0107] Based on the content of the above embodiment, in this embodiment, the processing module is specifically used to perform the following process:
[0108] First, count the inspection mileage X of each inspected pipe section image max , average inspection mileage and pixel length Lsrc and the average original pixel length Average Width Round to an integer;
[0109] To ensure that the detection mileage ratio of all images is unified, firstly, the pixel length L of all images is src Adjust so that the adjusted sample image length Count the average pixel value of the image length L0 Round to an integer, and then scale the image:
[0110] Processing situation 1: For detection mileage The original magnetic stress image is scaled to a length of The original width W0 is scaled to The coordinates of the pixel points of the scaled target magnetic stress image are obtained by coordinate interpolation:
[0111]
[0112] in, is the coordinate of the pixel after transformation, L0, W0 is the length and width before scaling; is the average detection mileage of the magnetic stress images of the inspected pipe section, is the average pixel length, is the average width; the magnetic stress image is a two-dimensional image, the horizontal axis X is the detection mileage, the unit is meter, and the vertical axis H is the magnetic field intensity, the unit is ampere per meter;
[0113] The coordinates (x, y) of the transformed pixel point belong to the pixel point coordinate set P:
[0114]
[0115] Among them, P ij =(x i ,y j );i=1,2,…,m,j=1,2,…,n;
[0116] When the pixel point coordinates (x, y) are integers, the pixel value f(x, y) of the point after processing 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, the pixels of the four points surrounding the point in the original image are interpolated and rounded to obtain the pixel value f(x, y) of the point after processing;
[0117] Processing situation 2: For detection mileage The original magnetic stress image is copied and spliced until the sum of the target magnetic stress image detection mileage after splicing is In the interval, recycle and execute processing situation 1;
[0118] Processing situation 3: For detection mileage The original magnetic stress image of the non-abnormal area is divided from the left and right ends of the original magnetic stress image to the opposite side. The corresponding pixel length The length of the two pixels is Target magnetic stress image.
[0119] Based on the content of the above embodiment, in this embodiment, the processing module is also used to perform the following process:
[0120] Processing situation 4: For detection mileage The original magnetic stress image of the non-abnormal area is obtained by dividing the image by the pixel length from the left end point of the original magnetic stress image. Cutting, when the remaining mileage The cropping is then completed, and the target magnetic stress images obtained all have a pixel length of The standard target magnetic stress picture is obtained, and the remaining parts are processed in the same way as Case 1 to Case 3.
[0121] Based on the content of the above embodiment, in this embodiment, the processing module is also used to perform the following process:
[0122] Processing situation 5: For detection mileage The original magnetic stress image with abnormal areas, the pixel horizontal coordinates of the original magnetic stress image are [0, L], then the abnormal area set G is expressed as
[0123] G={[g i ,g i +D i ],i=1,2,…,q}
[0124] Where q is the number of abnormal regions in an original magnetic stress image, g i is the starting point of the abscissa pixel of the ith abnormality, D i is the pixel length of the anomaly at the i-th location;
[0125] For each abnormal area, divide it from the starting point and end point of the abnormal area to both sides. or If the interval completely contains other abnormal areas, the abnormal areas contained in the original magnetic stress image are merged, including:
[0126] When the abnormal area When , the abnormal area is merged into the same target magnetic stress image and cropped. Similarly, when When , the abnormal area is merged into the same target magnetic stress image and cropped. The cropped target magnetic stress image has a pixel length of Standard target magnetic stress picture; if or The interval does not completely contain other abnormal areas. From the abnormal area [g i ,g i +D i ] are extended to both sides, and the length is The interval If this interval contains the endpoint of other abnormal areas, the endpoint is used as a clipping point and then extended to the other side to ensure that the length of the target magnetic stress image containing the abnormal area is Wherein, the incomplete inclusion includes not including or half including;
[0127] For abnormal areas The original magnetic stress image is cut into a target magnetic stress image in the abnormal area, and then the target magnetic stress image of the remaining non-abnormal area after cutting is cut into a target magnetic stress image, and processing conditions 1 to processing conditions 4 are executed cyclically.
[0128] Based on the content of the above embodiment, in this embodiment, if the processing module executes the interval containing the endpoint of other abnormal areas, the endpoint is used as a clipping point, and then extended to the other side for clipping to ensure that the length of the target magnetic stress image containing the abnormal area is For example,
[0129] If this interval contains the endpoints of other abnormal regions g i-1 +D i-1 , then the clipping interval is obtained If the right endpoint falls within other abnormal areas, it will shrink to the left to the area without abnormalities to obtain the final trimming interval [g i-1 +D i-1 ,g i+1 ], and execute processing case 1-processing case 2 cyclically for the final cropped target magnetic stress image.
[0130] Based on the content of the above embodiment, in this embodiment, when the processing module performs interpolation and rounding with the pixels of the four points surrounding the point in the original image when the pixel coordinate (x, y) is not an integer, to obtain the pixel value f (x, y) of the point after processing, it is specifically used to perform:
[0131] When the pixel coordinates (x, y) are not integers, the pixels of the four points surrounding the point in the original image are bilinearly interpolated and rounded to get the pixel value f(x, y) of the point after processing. The bilinear interpolation is:
[0132]
[0133] Among them, Q 11 , Q 12 , Q 21 , Q 22 The four pixels surrounding the point in the original image are (x1, y1), (x1, y2), (x2, y1), (x2, y2), and the pixel values in the original image are f(Q 11 ), f(Q 12 ), f(Q 21 ), f(Q 22 ).
[0134] Since the magnetic stress image intelligent processing device for pipeline maintenance decision-making provided in this embodiment can be used to execute the magnetic stress image intelligent processing method for pipeline maintenance decision-making provided in the above embodiment, its working principle and beneficial effects are similar and will not be described in detail here.
[0135] Based on the same inventive concept, another embodiment of the present invention provides an electronic device, see Figure 3 , the electronic device specifically includes the following contents: a processor 301, a memory 302, a communication interface 303 and a communication bus 304;
[0136] The processor 301, the memory 302, and the communication interface 303 communicate with each other through the communication bus 304; the communication interface 303 is used to realize information transmission between various devices;
[0137] The processor 301 is used to call the computer program in the memory 302. When the processor executes the computer program, all steps of the above-mentioned magnetic stress image intelligent processing method for pipeline maintenance decision-making are implemented. For example, when the processor executes the computer program, the following steps are implemented: determining the relationship between the detection mileage of the target magnetic stress image and the average detection mileage of the magnetic stress image of the inspected pipe section; and intelligently adjusting the target magnetic stress image to a uniform scale according to the relationship between the detection mileage of the target magnetic stress image and the average detection mileage of the magnetic stress image of the inspected pipe section.
[0138] 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. When the computer program is executed by a processor, all steps of the above-mentioned magnetic stress image intelligent processing method for pipeline maintenance decision-making are implemented. For example, when the processor executes the computer program, the following steps are implemented: determining the relationship between the detection mileage of the target magnetic stress image and the average detection mileage of the magnetic stress image of the inspected pipe section; and performing intelligent adjustment of the target magnetic stress image to a unified scale based on the relationship between the detection mileage of the target magnetic stress image and the average detection mileage of the magnetic stress image of the inspected pipe section.
[0139] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0140] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they 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 embodiments of the present invention. Those of ordinary skill in the art may understand and implement them without creative effort.
[0141] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the magnetic stress image intelligent processing method for pipeline maintenance decision-making described in each embodiment or some parts of the embodiment.
[0142] In addition, in the present invention, terms such as "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0143] In addition, in the present invention, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0144] In addition, in the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0145] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A magnetic stress image intelligent processing method for pipeline maintenance decision-making, characterized in that: include: Determine the relationship between the detection mileage of the original magnetic stress image and the average detection mileage of the magnetic stress image of the inspected pipe section; According to the relationship between the detection mileage of the original magnetic stress image and the average detection mileage of the magnetic stress images of the inspected pipe section, the original magnetic stress image is intelligently adjusted to a uniform scale to obtain a target magnetic stress image; According to the relationship between the detection mileage of the original magnetic stress image and the average detection mileage of the magnetic stress image of the inspected pipe section, the original magnetic stress image is intelligently adjusted to a uniform scale to obtain a target magnetic stress image, including: First, count the inspection mileage X of each inspected pipe section image max , average inspection mileage and pixel length L src and the average original pixel length Average Width Round to an integer; To ensure that the detection mileage ratio of all images is unified, firstly, the pixel length L of all images is src Adjust so that the adjusted sample image length Count the average pixel value of the image length L0 Round to an integer, and then scale the image: Processing situation 1: For detection mileage The original magnetic stress image is scaled to a length of The original width W0 is scaled to The coordinates of the pixel points of the scaled target magnetic stress image are obtained by coordinate interpolation: in, is the coordinate of the pixel after transformation, L0, W0 is the length and width before scaling; is the average detection mileage of the magnetic stress images of the inspected pipe section, is the average pixel length, is the average width; the magnetic stress image is a two-dimensional image, the horizontal axis X is the detection mileage, the unit is meter, and the vertical axis H is the magnetic field intensity, the unit is ampere per meter; The coordinates (x, y) of the transformed pixel point belong to the pixel point coordinate set P: in, When the pixel point coordinates (x, y) are integers, the pixel value f(x, y) of the point after processing 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, the pixels of the four points surrounding the point in the original image are interpolated and rounded to obtain the pixel value f(x, y) of the point after processing; Processing situation 2: For detection mileage The original magnetic stress image is copied and spliced until the sum of the target magnetic stress image detection mileage after splicing is In the interval, recycle and execute processing situation 1; Processing situation 3: For detection mileage The original magnetic stress image of the non-abnormal area is divided from the left and right ends of the original magnetic stress image to the opposite side. The corresponding pixel length The length of the two pixels is Target magnetic stress image.
2. The magnetic stress image intelligent processing method for pipeline maintenance decision-making according to claim 1 is characterized in that: The intelligent adjustment of the original magnetic stress image to a uniform scale according to the relationship between the detection mileage of the original magnetic stress image and the average detection mileage of the magnetic stress image of the inspected pipe section also includes: Processing situation 4: For detection mileage The original magnetic stress image of the non-abnormal area is obtained by dividing the image by the pixel length from the left end point of the original magnetic stress image. Cutting, when the remaining mileage After the cropping, the target magnetic stress images obtained all have a pixel length of The standard target magnetic stress picture is obtained, and the rest is processed in the same way as cases 1-3.
3. The intelligent processing method of magnetic stress images for pipeline maintenance decision-making according to claim 2 is characterized in that: The intelligent adjustment of the original magnetic stress image to a uniform scale according to the relationship between the detection mileage of the original magnetic stress image and the average detection mileage of the magnetic stress image of the inspected pipe section also includes: Processing situation 5: For detection mileage The original magnetic stress image of the signal with abnormal areas, the pixel horizontal coordinates of the original magnetic stress image are [0, L], then the abnormal area set G is expressed as G={[g i ,g i +D i ],i=1,2,…,q} Where q is the number of abnormal regions in an original magnetic stress image, g i is the starting point of the abscissa pixel of the ith abnormality, D i is the pixel length of the anomaly at the i-th location; For each abnormal area, divide it from the starting point and end point of the abnormal area to both sides. or If the interval completely contains other abnormal areas, the abnormal areas contained in the original magnetic stress image are merged, including: When the abnormal area When , the abnormal area is merged into the same target magnetic stress image and cropped. Similarly, when When , the abnormal area is merged into the same target magnetic stress image and cropped. The cropped target magnetic stress image has a pixel length of Standard target magnetic stress picture; if or The interval does not completely contain other abnormal areas. From the abnormal area [g i ,g i +D i ] are extended to both sides, and the length is The interval If this interval contains the endpoint of other abnormal areas, then this endpoint is used as a clipping point, and then extended to the other side for clipping to ensure that the length of the target magnetic stress image containing the abnormal area is Wherein, the incomplete inclusion includes not including or half including; For abnormal areas The original magnetic stress image is cut into a target magnetic stress image in the abnormal area, and then the target magnetic stress image of the remaining non-abnormal area after cutting is cut into a target magnetic stress image, and processing conditions 1 to processing conditions 4 are executed cyclically.
4. The magnetic stress image intelligent processing method for pipeline maintenance decision-making according to claim 1 is characterized in that: When the pixel coordinates (x, y) are not integers, the pixels of the four points surrounding the point in the original image are interpolated and rounded to obtain the pixel value f(x, y) of the point after processing, including: The bilinear interpolation is: Among them, Q 11 , Q 12 , Q 21 , Q 22 The four pixels surrounding the point in the original image are (x1, y1), (x1, y2), (x2, y1), (x2, y2), and the pixel values in the original image are f(Q 11 ), f(Q 12 ), f(Q 21 ), f(Q 22 ).
5. A magnetic stress image intelligent processing device for pipeline maintenance decision-making, characterized in that: include: A determination module, used to determine the relationship between the detection mileage of the original magnetic stress image and the average detection mileage of the magnetic stress image of the inspected pipe section; A processing module, for intelligently adjusting the original magnetic stress image to a uniform scale to obtain a target magnetic stress image according to the relationship between the detection mileage of the original magnetic stress image and the average detection mileage of the magnetic stress image of the inspected pipe section; The processing module is specifically used to perform the following process: First, count the inspection mileage X of each inspected pipe section image max , average inspection mileage and pixel length L src and the average original pixel length Average Width Round to the nearest integer; To ensure that the detection mileage ratio of all images is unified, firstly, the pixel length L of all images is src Adjust so that the adjusted sample image length Count the average pixel value of the image length L0 Round to an integer, and then scale the image: Processing situation 1: For detection mileage The original magnetic stress image is scaled to a length of The original width W0 is scaled to The coordinates of the pixel points of the scaled target magnetic stress image are obtained by coordinate interpolation: in, is the coordinate of the pixel after transformation, L0, W0 is the length and width before scaling; is the average detection mileage of the magnetic stress images of the inspected pipe section, is the average pixel length, is the average width; the target magnetic stress image is a two-dimensional image, the horizontal axis X is the detection mileage, the unit is meter, and the vertical axis H is the magnetic field intensity, the unit is ampere per meter; The coordinates (x, y) of the transformed pixel point belong to the pixel point coordinate set P: in, When the pixel point coordinates (x, y) are integers, the pixel value f(x, y) of the point after processing 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, the pixels of the four points surrounding the point in the original image are interpolated and rounded to obtain the pixel value f(x, y) of the point after processing; Processing situation 2: For detection mileage The original magnetic stress image is copied and spliced until the sum of the target magnetic stress image detection mileage after splicing is In the interval, recycle and execute processing situation 1; Processing situation 3: For detection mileage The original magnetic stress image of the non-abnormal area is divided from the left and right ends of the original magnetic stress image to the opposite side. The corresponding pixel length The length of the two pixels is Target magnetic stress image.
6. The magnetic stress image intelligent processing device for pipeline maintenance decision-making according to claim 5 is characterized in that: The processing module is also used to perform the following process: Processing situation 4: For detection mileage The original magnetic stress image of the non-abnormal area is obtained by dividing the image by the pixel length from the left end point of the original magnetic stress image. Cutting, when the remaining mileage The cropping is then completed, and the target magnetic stress images obtained all have a pixel length of The standard target magnetic stress picture is obtained, and the remaining parts are processed in the same way as Case 1 to Case 3.
7. The magnetic stress image intelligent processing device for pipeline maintenance decision-making according to claim 6 is characterized in that: The processing module is also used to perform the following process: Processing situation 5: For detection mileage The original magnetic stress image with abnormal areas, the pixel horizontal coordinates of the original magnetic stress image are [0, L], then the abnormal area set G is expressed as G={[g i ,g i +D i ],i=1,2,…,q} Where q is the number of abnormal regions in an original magnetic stress image, g i is the starting point of the abscissa pixel of the ith abnormality, D i is the pixel length of the anomaly at the i-th location; For each abnormal area, divide it from the starting point and end point of the abnormal area to both sides. or If the interval completely contains other abnormal areas, the abnormal areas contained in the original magnetic stress image are merged, including: When the abnormal area When , the abnormal area is merged into the same target magnetic stress image and cropped. Similarly, when When , the abnormal area is merged into the same target magnetic stress image and cropped. The cropped target magnetic stress image has a pixel length of Standard target magnetic stress picture; if or The interval does not completely contain other abnormal areas. From the abnormal area [g i ,g i +D i ] are extended to both sides, and the length is The interval If this interval contains the endpoint of other abnormal areas, the endpoint is used as a clipping point and then extended to the other side to ensure that the length of the target magnetic stress image containing the abnormal area is Wherein, the incomplete inclusion includes not including or half including; For abnormal areas The original magnetic stress image is cut into a target magnetic stress image in the abnormal area, and then the target magnetic stress image of the remaining non-abnormal area after cutting is cut into a target magnetic stress image, and processing conditions 1 to processing conditions 4 are executed cyclically.
8. The magnetic stress image processing device for pipeline maintenance decision-making according to claim 5, characterized in that: When the processing module performs interpolation and rounding with the pixels of the four points surrounding the point in the original image when the pixel coordinate (x, y) is not an integer, to obtain the pixel value f (x, y) of the point after processing, it is specifically used to perform: The bilinear interpolation is: Among them, Q 11 , Q 12 , Q 21 , Q 22 The four pixels surrounding the point in the original image are (x1, y1), (x1, y2), (x2, y1), (x2, y2), and the pixel values in the original image are f(Q 11 ), f(Q 12 ), f(Q 21 ), f(Q 22 ).