Oil and gas pipeline weld defect detection method based on quantum attention symmetry coding and decoding convolutional network

By converting weld defect images into quantum state data through a quantum attention symmetric encoder-decoder convolutional network, extracting feature vectors, and performing detection, the accuracy and efficiency issues of weld defect detection in oil and gas pipelines are solved, and the detection effect in complex environments is improved.

CN119006376APending Publication Date: 2024-11-22XIJING UNIV
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411009516.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

Existing non-destructive testing standards differ in their judgment of weld defects in oil and gas pipelines, making detection difficult. Furthermore, complex environments affect the accuracy and reliability of testing, especially in open-air environments where test results are greatly affected by weather changes, resulting in a low overall recognition rate.

Method used

A method based on quantum attention symmetric encoding and decoding convolutional networks is adopted. The weld defect image is converted into quantum state data through a data conversion module. The feature vector of the weld region is extracted by quantum attention symmetric encoding and decoding convolutional networks, and the defect is detected by a saliency detector.

Benefits of technology

It improves the accuracy and efficiency of weld defect detection in oil and gas pipelines, reduces the difficulty of detection in complex backgrounds, and enhances the accuracy and reliability of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119006376A_ABST
    Figure CN119006376A_ABST
Patent Text Reader

Abstract

The invention discloses an oil and gas pipeline weld defect detection method based on a quantum attention symmetry coding and decoding convolutional network. The method comprises the following steps: step 1, converting an oil and gas pipeline weld defect image into a quantum state by using a data conversion module; step 2, extracting a feature vector of a welding seam region by using a quantum attention symmetry coding and decoding convolutional network; step 3, detecting weld defects of the oil and gas pipeline by using a significance detector; converting an oil and gas pipeline weld defect image data form into a quantum state through a data conversion module, and extracting a multi-scale convolution feature vector through a multi-scale quantum convolution module; according to the oil and gas pipeline welding seam defect detection method, oil and gas pipeline welding seam defect detection can be rapidly and accurately carried out, and the accuracy of oil and gas pipeline welding seam defect detection under the complex background is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of nondestructive testing and relates to an oil and gas pipeline weld defect detection method based on a quantum attention symmetric encoding and decoding convolutional network. Background Art

[0002] Oil and gas pipelines need to be tested before and after use. The purpose of pre-service testing is to ensure that the pipeline design, manufacturing and pipeline materials themselves meet the service requirements. During use, the pipeline also needs to be tested annually, comprehensively and online, as well as safety evaluated. Only through test results can we truly understand the operating status of the service pipeline, find damage defects that lead to pipeline failure, such as corrosion, deformation, cracks, etc., and replace or repair these damage defects in a timely manner to reduce the safety risk of oil and gas pipeline leakage.

[0003] There are many existing non-destructive testing standards, and different standards have different requirements for the determination of girth weld defects, resulting in differences in defect classification. There are many types of defects in oil and gas pipeline welds, and the structure and material of the welds are also relatively complex, which increases the difficulty of detection. In addition, the on-site detection environment is relatively complex, such as temperature changes, high humidity, electromagnetic interference, etc., which will affect the accuracy and reliability of the detection. For example, when testing in an open-air environment, rain, snow, strong winds, or low temperatures in winter will have an adverse effect on the test results. There are differences in the detection rate and effectiveness of various non-destructive testing methods for different types of defects, and the overall recognition rate is low. Summary of the invention

[0004] In view of the shortcomings of the prior art, the purpose of the present invention is to provide an oil and gas pipeline weld defect detection method based on a quantum attention symmetric encoding and decoding convolutional network, which can quickly and accurately detect oil and gas pipeline weld defects and improve the accuracy and efficiency of oil and gas pipeline weld defect detection under complex backgrounds.

[0005] The present invention is achieved through the following technical solutions:

[0006] The oil and gas pipeline weld defect detection method based on quantum attention symmetric encoding and decoding convolutional network includes the following steps:

[0007] Step 1. Build a data conversion module, which includes an H gate unit, a revolving gate R x (θ) unit, variational quantum circuit VQC and measurement unit, input the oil and gas pipeline weld defect image into the data conversion module, and convert the image data into quantum state data;

[0008] Step 2. Construct a quantum attention symmetric encoding and decoding convolutional network for oil and gas pipeline weld defect detection. The quantum attention symmetric encoding and decoding convolutional network includes a quantum encoding part, a quantum decoding part and a quantum state attention connection layer. The quantum attention symmetric encoding and decoding convolutional network is used to extract the feature vector of the quantum state weld area;

[0009] Step 3. The quantum state feature vector F extracted by the quantum attention symmetric encoding and decoding convolutional network is converted into (f 0 ,f 1 ,...,f N ) is input into the saliency detector to perform defect detection and measurement to obtain a defect detection result image.

[0010] Furthermore, in step 1, converting the oil and gas pipeline weld defect image into a quantum state comprises the following steps:

[0011] Step 1.1, set the initial quantum state of the quantum circuit corresponding to each pixel position to the quantum state |0>, and use the H gate unit to initialize the quantum state Transformed into entangled state

[0012] Step 1.2, using the quantum revolving door R x (θ) maps the image grayscale value G(i,j) into quantum state encoding, where the quantum rotating gate R x The rotation angle of (θ) is denoted as θ (i,j) =G(i,j)×π;

[0013] Step 1.3, quantum state transformation is performed through the variational quantum circuit VQC. VQC is composed of a fixed initial state |0> quantum state through a quantum circuit U(θ) composed of a series of quantum gates to obtain the measurable data f(θ). f(θ) is measured in the measurement operation After that, it is expressed as

[0014] Step 1.4 Measure the operation by measuring the unit Get the normalized quantum state representation data.

[0015] Furthermore, the quantum attention symmetric encoding and decoding convolutional network described in step 2 is specifically:

[0016] Quantum coding part: It consists of data conversion module, 1×1 quantum convolution, quantum coding layer, multi-scale quantum convolution and quantum downsampling;

[0017] Quantum decoding part: It consists of quantum decoding layer, quantum permutation convolution, 1×1 quantum convolution, quantum state multi-output feature vector and saliency detector;

[0018] Quantum state attention connection layer: It consists of a 3×3 quantum convolution module in the quantum encoding part, a quantum state feature fusion module in the quantum decoding part, and a quantum state attention module between the quantum encoding part and the quantum decoding part.

[0019] Furthermore, the step 2 uses the quantum attention symmetric encoding and decoding convolutional network to extract the feature vector of the quantum state weld area:

[0020] Step 2.1 Extract global feature vectors through quantum global average pooling and quantum global maximum pooling respectively, and concatenate the obtained quantum state feature vectors through quantum multiplication; then fuse them into channel attention feature vectors through two 1×1 quantum convolutions;

[0021] Step 2.2: Use quantum local average pooling and quantum local maximum pooling with a step size of 2 to extract four local feature vectors respectively, and then perform quantum global average pooling and quantum global maximum pooling on these feature vectors to obtain local feature vectors. Then use bilinear interpolation to supplement them to the same size as the channel attention feature vector to obtain the spatial attention feature vector.

[0022] Step 2.3: Concatenate the channel attention feature vector and the spatial attention feature vector of the quantum state through quantum multiplication and normalize them through measurement operation to obtain the feature vector f'=(f 0 ',f 1 ',...,f N '), and then input the corresponding quantum decoding part to obtain the quantum state feature vector F = (f 0 ,f 1 ,...,f N ).

[0023] Compared with the prior art, the present invention has the following advantages and effects:

[0024] The oil and gas pipeline weld defect detection method based on the quantum attention symmetric encoding and decoding convolutional network in the present invention is simple and easy to implement, has high detection accuracy, and realizes defect detection function by designing different modules, so that it has good portability and can provide technical support for actual weld defect detection systems.

[0025] The data conversion module converts data from traditional form to quantum state, laying the foundation for subsequent defect detection; compared with traditional convolution, pooling, splicing, activation and other operations, the efficiency of quantum convolution, quantum pooling, quantum multiplication and quantum activation of the present invention is significantly improved; the multi-scale quantum convolution module obtains feature information of different scales in the weld area by generating convolution kernels of different scales, and fuses them, reducing the sensitivity of the model to changes in the size and shape of weld defects and improving the overall accuracy of defect detection; the quantum state attention module fuses the channel attention mechanism with the spatial attention mechanism, integrating the advantages of the two attention mechanisms, so that it can not only judge the importance of each feature channel of the weld image, but also focus on the spatial position of defects related to the weld defect detection task, and find the key features of the defects in the network; the quantum state feature fusion module can both retain the global features of the defects and suppress redundant feature information, and refine the feature vectors of defects of different depths by enhancing the consistent important feature information, so as to better fuse the feature vectors and avoid mutual interference between the feature vectors. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 is a flow chart of the present invention;

[0027] Figure 2 A data conversion module involved in the embodiment of the present invention;

[0028] Figure 3 The quantum attention symmetric encoding and decoding convolutional network involved in the embodiment of the present invention;

[0029] Figure 4 A quantum coding module according to an embodiment of the present invention;

[0030] Figure 5 A quantum decoding module according to an embodiment of the present invention;

[0031] Figure 6 The quantum convolution operation involved in the embodiment of the present invention;

[0032] Figure 7 This is the quantum pooling operation involved in the embodiment of the present invention. DETAILED DESCRIPTION

[0033] The present invention is further described in detail below in conjunction with specific embodiments, which are intended to explain the present invention rather than to limit it.

[0034] The present invention provides an oil and gas pipeline weld defect detection method based on a quantum attention symmetric encoding and decoding convolutional network, comprising the following steps:

[0035] Step 1. Use a data conversion module to convert the oil and gas pipeline weld defect image into a quantum state;

[0036] Step 2. Use the quantum attention symmetric encoding and decoding convolutional network to extract the feature vector of the weld area;

[0037] Step 3. Use saliency detector to detect oil and gas pipeline weld defects.

[0038] The present invention specifically comprises the following steps:

[0039] Step 1. Input the oil and gas pipeline weld defect image into the data conversion module, and convert the image data into quantum state data;

[0040] Step 2. Input the quantum state data into the quantum attention symmetric encoding and decoding convolutional network, and extract and fuse quantum state feature vectors of different scales and depths through the constructed multi-scale quantum convolution module, quantum state feature fusion module, quantum state attention mechanism and other modules;

[0041] Step 3. Use the saliency detector to detect the defects of oil and gas pipeline welds.

[0042] Example:

[0043] Reference Figure 1 The present invention provides an oil and gas pipeline weld defect detection method based on a quantum attention symmetric encoding and decoding convolutional network, comprising the following steps:

[0044] Step 1. Reference Figure 2 , build a data conversion module to convert the weld image data into quantum state data. The data conversion module mainly includes the H gate unit, the revolving gate R x (θ) unit, variational quantum circuit VQC, measurement unit.

[0045] First, the quantum circuit initialization quantum state corresponding to each pixel position is set to the quantum state |0>, and then the initialization quantum state is set to Transformed into entangled state To facilitate subsequent quantum state data encoding;

[0046] Then, using the quantum revolving door R x (θ) maps the image grayscale value into quantum state encoding, where the quantum rotating gate R x The rotation angle of (θ) is denoted as θ (i,j) =G(i,j)×π, where G(i,j) is the gray value of the image;

[0047] The quantum state transformation is then performed by the variational quantum circuit VQC, resulting in a more generalized and faster-converging quantum network optimization method. VQC consists of a fixed initial quantum state |0> passing through a quantum circuit U(θ) composed of a series of quantum gates to obtain measurable data Then, the normalized quantum state data is obtained through the measurement operation of the measurement unit to obtain quantum system information representing the image of the weld area;

[0048] Step 2. Reference Figure 3 , the quantum attention symmetric encoding and decoding convolutional network is constructed, including the quantum encoding part, the quantum decoding part and the quantum state attention connection layer. The quantum encoding part includes the data conversion module, 1×1 quantum convolution, quantum encoding layer, multi-scale quantum convolution and quantum downsampling, and the quantum decoding part includes the quantum decoding layer, quantum permutation convolution, 1×1 quantum convolution, quantum state multi-output feature vector and saliency detector. The multi-scale quantum convolution module consists of 3 parallel branches and 1×1 quantum convolution, each parallel branch consists of 3×3 hole quantum convolution and 2 1×1 quantum convolution, and the hole rates are 1, 3 and 5 respectively. The quantum state feature fusion module consists of 5 parallel branches and 1×1 quantum convolution. The first 4 branches use 3×3 hole quantum convolution with hole rates of 2, 3, 4 and 5 respectively, and the fifth branch consists of 2×2 quantum average pooling and 1×1 quantum convolution.

[0049] refer to Figure 4 The quantum coding layer consists of quantum state initialization, multi-scale quantum convolution layer, quantum ReLU activation layer, quantum pooling layer and measurement layer. Figure 5 ,The quantum decoding layer consists of a 3×3 quantum transposed convolution layer, a 3×3 quantum convolution layer, a quantum ReLU activation layer, a quantum convolution layer, a quantum ReLU activation layer and a measurement layer.

[0050] The quantum state attention connection layer includes a 3×3 convolution module in the quantum coding part, a quantum state feature fusion module in the quantum decoding part, and a quantum state attention module between the quantum coding part and the quantum decoding part. The quantum state attention module is a module connecting the quantum coding part and the quantum decoding part. The quantum state channel attention module and the quantum state space attention module extract the quantum state feature vector in parallel, normalize it, and then send it to the saliency detector. The quantum state channel attention module consists of a parallel branch composed of a quantum global average pooling layer and a quantum global maximum pooling layer, and two 1×1 quantum convolution layers. The quantum state space attention module consists of two parallel branches, a 3×3 hole multi-scale quantum convolution layer with a hole rate of, and a bilinear interpolation layer. The first branch is a quantum local average pooling layer and a global average pooling layer, and the second branch is a local maximum pooling layer and a global maximum pooling layer.

[0051] The specific steps of the quantum state attention module are as follows: for the quantum state feature vector f=(f 0 ,f 1 ,...,f N)First, the global feature vectors are extracted respectively through the quantum global average pooling layer and the quantum global maximum pooling layer, and the extracted feature vectors are spliced ​​through quantum multiplication, and then fused into a channel attention feature vector through two 1×1 quantum convolutions. Then, the feature vector f is again subjected to quantum local average pooling and quantum local maximum pooling with a step size of 2 to extract 4 quantum state local feature vectors, and then these feature vectors are subjected to quantum global average pooling and quantum global maximum pooling to obtain local feature vectors. After splicing these two local feature vectors, a 3×3 void quantum convolution with a void rate of 2 is used to further extract features. Then, bilinear interpolation is used to supplement it to a size that is consistent with the size of the quantum state channel attention feature vector to form a spatial attention feature vector. The quantum state channel attention feature vector and the spatial attention feature vector are then spliced ​​through quantum multiplication and normalized through measurement operations to obtain the feature vector f'=(f 0 ',f 1 ',...,f N ') and then input the corresponding quantum decoding part to obtain the quantum state feature vector F = (f 0 ,f 1 ,...,f N );

[0052] Step 3. The quantum state feature vector F extracted by the quantum attention symmetric encoding and decoding convolutional network is converted into (f 0 ,f 1 ,...,f N ) Input the saliency detector, perform defect detection and measurement, and obtain the defect detection result image.

[0053] The loss function gradient and stochastic gradient descent method are used to update the model parameters to reduce the residual between the model output and the label value so that the model can complete training; the model is tested and the parameters are adjusted using artificial defects on the comparison samples.

[0054] refer to Figure 6 Quantum convolution uses parameterized quantum convolution kernels to extract features from all qubits in the local space of the data. It plays an important role in extracting complex feature information of qubits for the entire network model. The quantum convolution kernel contains a variety of qubit gates, including single-qubit gates and double-qubit gates, which can perform unitary transformation on the corresponding qubits. The double-qubit gate acts on adjacent qubits to achieve quantum entanglement of adjacent qubits.

[0055] refer to Figure 7 The quantum pooling operation includes multiple quantum measurement operations and controlled quantum gates, where the controlled quantum gates apply different unitary transformations to the quantum bits they act on based on the measurement results. x (θ) revolving door and Ry (θ) Rotation gate, parameterized quantum gate is applied to adjacent quantum bits to complete the dimensionality reduction sampling of quantum state characteristics. Represents R x The conjugate transpose quantum gate of (θ) has 6 adjustable parameters. After each layer of quantum pooling, the number of quantum bits is reduced to half of the original.

Claims

1. An oil and gas pipeline weld defect detection method based on quantum attention symmetric encoding and decoding convolutional network, characterized in that: The following steps are involved: Step 1. Build a data conversion module, which includes an H gate unit, a revolving gate R x (θ) unit, variational quantum circuit VQC and measurement unit, input the oil and gas pipeline weld defect image into the data conversion module, and convert the image data into quantum state data; Step 2. Construct a quantum attention symmetric encoding and decoding convolutional network for oil and gas pipeline weld defect detection. The quantum attention symmetric encoding and decoding convolutional network includes a quantum encoding part, a quantum decoding part and a quantum state attention connection layer. The quantum attention symmetric encoding and decoding convolutional network is used to extract the feature vector of the quantum state weld area; Step 3. Extract the quantum state feature vector F = (f0, f1, ..., f N ) is input into the saliency detector to perform defect detection and measurement to obtain a defect detection result image.

2. The method for detecting oil and gas pipeline weld defects based on quantum attention symmetric encoding and decoding convolutional network according to claim 1 is characterized in that The step 1 of converting the oil and gas pipeline weld defect image into a quantum state comprises the following steps: Step 1.1, set the initial quantum state of the quantum circuit corresponding to each pixel position to the quantum state |0>, and use the H gate unit to initialize the quantum state Transformed into entangled state Step 1.2, using the quantum revolving door R x (θ) maps the image grayscale value G(i,j) into quantum state encoding, where the quantum rotating gate R x The rotation angle of (θ) is denoted as θ (i,j) =G(i,j)×π; Step 1.3, quantum state transformation is performed through the variational quantum circuit VQC. VQC consists of a fixed initial state 0> quantum state through a quantum circuit U(θ) composed of a series of quantum gates to obtain measurable data f(θ). f(θ) is measured in the measurement operation After that, it is expressed as Step 1.4, measure the operation by measuring the unit Get the normalized quantum state representation data.

3. The method for detecting oil and gas pipeline weld defects based on quantum attention symmetric encoding and decoding convolutional network according to claim 1 is characterized in that The quantum attention symmetric encoding and decoding convolutional network described in step 2 is specifically: Quantum coding part: It consists of data conversion module, 1×1 quantum convolution, quantum coding layer, multi-scale quantum convolution and quantum downsampling; Quantum decoding part: It consists of quantum decoding layer, quantum permutation convolution, 1×1 quantum convolution, quantum state multi-output feature vector and saliency detector; Quantum state attention connection layer: It consists of a 3×3 quantum convolution module in the quantum encoding part, a quantum state feature fusion module in the quantum decoding part, and a quantum state attention module between the quantum encoding part and the quantum decoding part.

4. The method for detecting oil and gas pipeline weld defects based on quantum attention symmetric encoding and decoding convolutional network according to claim 3 is characterized in that The step 2 uses the quantum attention symmetric encoding and decoding convolutional network to extract the feature vector of the quantum state weld area: Step 2.1 Extract global feature vectors through quantum global average pooling and quantum global maximum pooling respectively, and concatenate the obtained quantum state feature vectors through quantum multiplication; then fuse them into channel attention feature vectors through two 1×1 quantum convolutions; Step 2.2: Use quantum local average pooling and quantum local maximum pooling with a step size of 2 to extract four local feature vectors respectively, and then perform quantum global average pooling and quantum global maximum pooling on these feature vectors to obtain local feature vectors. Then use bilinear interpolation to supplement them to the same size as the channel attention feature vector to obtain the spatial attention feature vector. Step 2.3: Concatenate the channel attention feature vector and the spatial attention feature vector of the quantum state through quantum multiplication and normalize them through measurement operation to obtain the feature vector f'=(f0',f1',...,f N '), and then input the corresponding quantum decoding part to obtain the quantum state feature vector F = (f0, f1, ..., f N ).

Citation Information

Cited By

  • Calculation method, device and system based on quantum neural network model

    CN119963554A

  • Intelligent mechanical part defect detection system based on deep learning

    CN120197512A

  • Intelligent detection system for mechanical parts defects based on deep learning

    CN120197512B

  • Infrared weak and small target detection network under complex background based on multi-level feature combination

    CN120852794A