Oil and gas pipeline defect detection method, device, storage medium and computer equipment

By generating heterogeneous image groups and extracting features, combining environmental and physical information, using training models to detect oil and gas pipeline defects, the problem of low detection accuracy in the existing technology is solved, and accurate detection and stability improvement of complex defects is achieved. .

CN119025976BActive Publication Date: 2025-01-17NORTHEASTERN UNIV CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411513959.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-01-17
Estimated Expiration
2044-10-29

AI Technical Summary

Technical Problem

The prior art has low accuracy in the detection of oil and gas pipeline defects, especially complex defects, irregular morphological defects, mild corrosion and large-area continuous corrosion, which leads to accelerated pipeline corrosion and endanger stable operation.

Method used

Collect internal pipeline information of oil and gas pipelines to generate heterogeneous image groups, obtain pipeline physical information from multiple sampling points, extract expert experience characteristics and physical evolution characteristics, and detect through the trained pipeline defect detection model, and combine environmental and physical information for detection. .

Benefits of technology

Accurate detection of oil and gas pipeline defects is achieved, the robustness and accuracy of the detection model is improved, the problem of the impact of environmental changes on corrosion state is overcome, and the accuracy of defect detection is comprehensively improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025976B_ABST
    Figure CN119025976B_ABST
Patent Text Reader

Abstract

The present application discloses a defect detection method, device, storage medium and computer equipment for oil and gas pipelines, and relates to the field of image processing. The method includes: collecting internal information of the oil and gas pipeline to be tested, and based on the internal information of the pipeline, generating a heterogeneous image group of the oil and gas pipeline to be tested, the heterogeneous image group includes a picture of the internal pipeline, a magnetic leakage pseudo-color image, an eddy current pseudo-color image and an ultrasonic pseudo-color image; obtaining the pipeline physical information of the oil and gas pipeline to be tested at multiple sampling points, and extracting the expert experience characteristics and physical evolution characteristics of the oil and gas pipeline to be tested based on the pipeline physical information, wherein the pipeline physical information includes the environmental information of the oil and gas pipeline to be tested and the physical information of the oil and gas pipeline to be tested itself; based on the heterogeneous image group, expert experience characteristics and physical evolution characteristics of the oil and gas pipeline to be tested, the defect detection results of the oil and gas pipeline to be tested are obtained through the trained pipeline defect detection model. The above method can improve the accuracy of complex defect detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a method, device, storage medium and computer equipment for defect detection of oil and gas pipelines. Background Art

[0002] As an important energy source, safe and efficient transportation of oil and gas is of vital importance. At present, pipeline transportation has become the main means of oil and gas transportation due to its high efficiency, safety and economy. However, under the combined effects of complex natural environment and human factors, oil and gas pipelines often face various defects, such as corrosion, cracks and mechanical damage. These defects not only affect the oil and gas transportation efficiency of pipelines, but may also cause serious safety accidents and pose a serious threat to energy security and personal safety.

[0003] In order to ensure the safety of oil and gas transportation, oil and gas pipeline defect detection has become a key link in oil and gas pipeline maintenance. At present, there are many methods for detecting oil and gas pipeline defects, such as traditional manual detection methods, methods that use single-category massive pipeline data to establish deep learning models for prediction, and methods that establish mathematical models for defect detection based on defect detection mechanisms for prediction, etc. Among them, although traditional manual detection methods are intuitive, they are relatively inefficient and easily affected by human factors.

[0004] In contrast, the detection method based on deep learning model established based on single-class data and the detection method based on mathematical model established based on detection mechanism can improve the efficiency of defect detection to a certain extent. However, it is often difficult to obtain accurate prediction results when faced with complex defects such as irregular defects in pipelines, weak defects caused by mild corrosion, and defects caused by large-area continuous corrosion, resulting in low prediction accuracy of pipeline defects. If these defects in oil and gas pipelines are not accurately detected, the corrosion of the pipeline may be accelerated in a short period of time, thereby seriously endangering the stable operation of the pipeline. Summary of the invention

[0005] In view of this, the embodiments of the present application provide a method, device, storage medium and computer equipment for defect detection of oil and gas pipelines, the main purpose of which is to solve the technical problem of low accuracy in complex defect detection of oil and gas pipelines.

[0006] According to one aspect of the present application, a method for defect detection of an oil and gas pipeline is provided, the method comprising:

[0007] Collecting internal information of the oil and gas pipeline to be tested, and generating a heterogeneous image group of the oil and gas pipeline to be tested based on the internal information of the pipeline, wherein the heterogeneous image group includes a pipeline internal picture, a magnetic flux leakage pseudo-color image, an eddy current pseudo-color image, and an ultrasonic pseudo-color image;

[0008] Obtaining pipeline physical information of the oil and gas pipeline to be tested at multiple sampling points, and extracting expert experience characteristics and physical evolution characteristics of the oil and gas pipeline to be tested based on the pipeline physical information, wherein the pipeline physical information includes environmental information of the oil and gas pipeline to be tested and physical information of the oil and gas pipeline to be tested itself;

[0009] Based on the heterogeneous image group, expert experience features and physical evolution features of the oil and gas pipeline to be tested, the defect detection results of the oil and gas pipeline to be tested are obtained through the trained pipeline defect detection model.

[0010] According to another aspect of the present application, a defect detection device for an oil and gas pipeline is provided, the device comprising:

[0011] An image feature acquisition module is used to acquire internal information of the oil and gas pipeline to be tested, and based on the internal information of the pipeline, generate a heterogeneous image group of the oil and gas pipeline to be tested, wherein the heterogeneous image group includes a pipeline internal picture, a magnetic flux leakage pseudo-color image, an eddy current pseudo-color image, and an ultrasonic pseudo-color image;

[0012] A physical feature acquisition module is used to obtain the pipeline physical information of the oil and gas pipeline to be tested at multiple sampling points, and based on the pipeline physical information, extract the expert experience characteristics and physical evolution characteristics of the oil and gas pipeline to be tested, wherein the pipeline physical information includes the environmental information of the oil and gas pipeline to be tested and the physical information of the oil and gas pipeline to be tested itself;

[0013] The pipeline defect prediction module is used to obtain the defect detection results of the oil and gas pipeline to be tested based on the heterogeneous image group, expert experience features and physical evolution features of the oil and gas pipeline to be tested through the trained pipeline defect detection model.

[0014] According to another aspect of the present application, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned oil and gas pipeline defect detection method is implemented.

[0015] According to another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the above-mentioned oil and gas pipeline defect detection method when executing the program.

[0016] By means of the above technical scheme, the embodiment of the present application provides a method, device, storage medium and computer equipment for defect detection of oil and gas pipelines. The above method first collects the internal information of the oil and gas pipeline to be tested, and based on the internal information of the pipeline, generates a heterogeneous image group including an internal picture of the pipeline, a magnetic leakage pseudo-color image, an eddy current pseudo-color image and an ultrasonic pseudo-color image, then obtains the pipeline physical information of the oil and gas pipeline to be tested at multiple sampling points, and extracts the expert experience characteristics and physical evolution characteristics of the oil and gas pipeline to be tested based on the pipeline physical information, and finally obtains the defect detection result of the oil and gas pipeline to be tested based on the heterogeneous image group, expert experience characteristics and physical evolution characteristics of the oil and gas pipeline to be tested through the trained pipeline defect detection model. The above method can realize accurate detection of oil and gas pipeline defects by processing heterogeneous image groups including internal pictures of pipelines, magnetic leakage pseudo-color images, eddy current pseudo-color images and ultrasonic pseudo-color images, thereby overcoming the false detection or missed detection problems faced in the single data processing process, improving the robustness of the pipeline defect detection model, and thus improving the accuracy and stability of complex defect detection. In addition, the above method detects pipeline defects by taking the environmental information of the pipeline and the physical information of the pipeline itself as auxiliary factors, taking into account the influence of environmental factors during the detection process, overcoming the problem that conventional methods cannot detect the impact of environmental changes on the corrosion state of the pipeline, and comprehensively improving the accuracy of pipeline defect detection.

[0017] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0019] Figure 1 A schematic flow chart of a defect detection method for an oil and gas pipeline provided in an embodiment of the present application is shown;

[0020] Figure 2 A schematic flow chart of another oil and gas pipeline defect detection method provided in an embodiment of the present application is shown;

[0021] Figure 3 A schematic diagram of the structure of a pipeline defect detection model provided in an embodiment of the present application is shown;

[0022] Figure 4 A schematic structural diagram of a defect detection device for an oil and gas pipeline provided in an embodiment of the present application is shown;

[0023] Figure 5 A schematic structural diagram of another oil and gas pipeline defect detection device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0024] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.

[0025] In one embodiment, Figure 1 As shown, a defect detection method for oil and gas pipelines is provided, which is described by taking the method applied to computer equipment as an example, and includes the following steps:

[0026] Step 101, collecting internal information of the oil and gas pipeline to be tested, and generating a heterogeneous image group of the oil and gas pipeline to be tested based on the internal information of the pipeline, wherein the heterogeneous image group includes a pipeline internal picture, a magnetic flux leakage pseudo-color image, an eddy current pseudo-color image, and an ultrasonic pseudo-color image.

[0027] Among them, the internal information of the pipeline includes various types of information such as magnetic flux leakage information, eddy current information and ultrasonic information inside the pipeline. Magnetic flux leakage information refers to the information of magnetic field changes inside the pipeline collected by magnetic flux leakage detection sensors; eddy current information refers to the information obtained by detecting the conductivity changes of pipeline materials using eddy current detection sensors; ultrasonic information refers to the signal reflected back after ultrasonic waves propagate inside the pipeline and interact with the inside of the pipeline, which is used to evaluate the structural integrity of the pipeline.

[0028] Specifically, when collecting internal information of the oil and gas pipeline to be tested, a pipeline internal inspection robot equipped with a 360-degree camera gimbal and a heterogeneous signal acquisition sensor can be launched into the oil and gas pipeline to be tested. As the robot moves forward, it takes pictures of the inside of the pipeline, and at the same time collects pipeline signals including leakage magnetic field, eddy current, and ultrasound and converts them into pseudo-color images to obtain a heterogeneous image group including a pipeline internal picture (i.e., a pipeline internal picture), a leakage magnetic field pseudo-color image, an eddy current pseudo-color image, and an ultrasound pseudo-color image.

[0029] In this embodiment, the internal inspection robot refers to a device that can move autonomously or remotely inside the pipeline, and is used to carry inspection equipment for internal inspection of the pipeline. The 360-degree camera gimbal is a device that can capture the internal environment of the pipeline in all directions, ensuring that the state of the inside of the pipeline is recorded without blind spots. Heterogeneous signal acquisition sensors refer to a series of different types of sensors integrated on the internal inspection robot. These sensors can synchronously collect a variety of physical signals inside the oil and gas pipeline during the movement of the internal inspection robot, such as leakage magnetic field, eddy current and ultrasonic signals, and convert these signals into pseudo-color images for subsequent analysis and processing. Pseudo-color images refer to the conversion of raw inspection data into color images that are easy to identify and analyze through a specific algorithm, so as to more intuitively display the inspection results. A heterogeneous image group refers to the integration of the result images of multiple different inspection technologies to form an image set that comprehensively reflects the internal conditions of the pipeline.

[0030] Step 102, obtaining the pipeline physical information of the oil and gas pipeline to be tested at multiple sampling points, and extracting the expert experience characteristics and physical evolution characteristics of the oil and gas pipeline to be tested based on the pipeline physical information, wherein the pipeline physical information includes the environmental information of the oil and gas pipeline to be tested and the physical information of the oil and gas pipeline to be tested itself.

[0031] Among them, pipeline physical information includes environmental information of the oil and gas pipeline to be tested, such as temperature, humidity and other information of the environment in which the pipeline is located. Pipeline physical information also includes physical information of the oil and gas pipeline to be tested, such as pipeline size, wall thickness and material. Expert experience features refer to the features obtained by grading, encoding and fusing the changes in physical information such as temperature fluctuations and wall thickness changes according to expert experience based on the long-term observation and summary of changes in physical information of oil and gas pipelines by domain experts. This feature can reflect the association between changes in pipeline physical information and potential risks. Physical evolution features refer to the features obtained after encoding and feature splicing according to the state of the environment in which the oil and gas pipeline is located, such as parameters such as environment type, humidity, salinity, microbial content, and pressure around the pipe wall. This feature reflects the impact of environmental factors on the evolution of the physical state of the oil and gas pipeline, and ensures that the characteristic values ​​of different physical states are comparable on the same scale through normalization.

[0032] Specifically, when obtaining the physical information of the oil and gas pipeline to be tested, first, multiple representative sampling points can be selected on the oil and gas pipeline to be tested, and these sampling points can reflect the physical state and environmental conditions of the pipeline. Then, professional testing equipment and instruments are used to obtain the physical information of the oil and gas pipeline at each sampling point, including the temperature of the environment in which the pipeline is located, the size of the pipeline, the wall thickness, the material and other information. Then, based on the acquired physical information of the pipeline, the expert experience features are extracted. Among them, for the changes in key physical information such as temperature fluctuations and wall thickness changes, these changes can be recorded and graded according to expert experience. For example, the temperature fluctuation is divided into 5 levels according to the amplitude, and each level is assigned a specific code. Similarly, the wall thickness change is also graded and coded in a similar way. Then, these coded features are fused to form expert experience features. Next, according to the state of the environment in which the oil and gas pipeline is located, the physical evolution features are extracted. First, the physical states such as environmental type (such as ocean, land), environmental humidity, environmental salinity, environmental microbial content, and pressure around the pipe wall are encoded. Then, the features are spliced ​​in the order of the above physical states to obtain a physical evolution feature vector containing multiple environmental factors. Finally, this eigenvector is normalized to ensure that the eigenvalues ​​of different physical states are comparable on the same scale.

[0033] This embodiment extracts the expert experience features and physical evolution features of the oil and gas pipeline to be tested, which not only reflects the changes in the physical state of the pipeline, but also reveals the impact of environmental factors on the evolution of the physical state of the pipeline. This provides strong data support for subsequent oil and gas pipeline defect detection and helps to improve the accuracy of complex defect detection in oil and gas pipelines.

[0034] Step 103 , based on the heterogeneous image group, expert experience features and physical evolution features of the oil and gas pipeline to be tested, the defect detection result of the oil and gas pipeline to be tested is obtained through the trained pipeline defect detection model.

[0035] Among them, the trained pipeline defect detection model refers to a trained deep learning-based model, which can realize automatic detection of oil and gas pipeline defects by learning the mapping relationship between heterogeneous image groups, expert experience features, physical evolution features and pipeline defects.

[0036] Specifically, the pipeline defect detection model can predict defects inside the pipeline in the following ways: First, the heterogeneous image group of the oil and gas pipeline to be tested (including pipeline internal pictures, magnetic flux leakage pseudo-color images, eddy current pseudo-color images, and ultrasonic pseudo-color images) is input into the trained pipeline defect detection model, and the four parallel deep cascade convolutional neural networks in the model are used to extract the underlying features and deep fusion features of these images respectively. Among them, the underlying feature extraction network is responsible for extracting the basic features of the image, such as edges, textures, etc.; the deep fusion feature extraction network extracts high-level features of the image by cascading multiple convolutional layers. These high-level features can better reflect the target objects and background information in the image. Then, the extracted underlying features and deep fusion features are synthesized to obtain a feature vector containing multiple information. Next, this feature vector is input into the region proposal network (RPN), and the RPN generates a fixed number of candidate regions based on the information in the feature vector. These candidate regions contain the predicted defective parts of the oil and gas pipeline. Finally, the non-maximum suppression (NMS) method based on pipeline characteristics is used to synthesize regions in multiple candidate regions to obtain candidate boxes as the final prediction results. In this embodiment, the non-maximum suppression method can be used to screen candidate boxes based on their scores, positions, and other information to ensure that the final prediction result is both accurate and reliable.

[0037] The above embodiment can realize accurate detection of oil and gas pipeline defects by processing heterogeneous image groups including pipeline internal pictures, magnetic flux leakage pseudo-color images, eddy current pseudo-color images and ultrasonic pseudo-color images, thereby overcoming the problem of false detection or missed detection faced in the single data processing process, improving the robustness of the pipeline defect detection model, and further improving the accuracy and stability of complex defect detection. In addition, the above method detects pipeline defects by taking the environmental information of the pipeline and the physical information of the pipeline itself as auxiliary factors, taking into account the influence of environmental factors in the detection process, overcoming the problem that conventional methods cannot detect the influence of environmental changes on the corrosion state of the pipeline, and comprehensively improving the accuracy of pipeline defect detection.

[0038] Further, as a refinement and expansion of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another defect detection method for oil and gas pipelines is provided, such as Figure 2 As shown, the method includes:

[0039] Step 201 : obtaining a plurality of heterogeneous image groups of sample oil and gas pipelines, and performing image segmentation on the heterogeneous image groups of the sample oil and gas pipelines according to a preset image size to obtain samples of a pipeline defect detection model.

[0040] Specifically, before model training, a heterogeneous image group of multiple sample oil and gas pipelines is first obtained. The heterogeneous image group may contain images of multiple sample oil and gas pipelines taken under different conditions (such as different materials, different degrees of aging, different defect types, etc.) to ensure the diversity and representativeness of the samples. Subsequently, the obtained heterogeneous image group of sample oil and gas pipelines can be segmented according to the preset image size requirements. This step can unify the image size, which is convenient for subsequent processing and analysis. At the same time, the segmented images can overlap with each other, which can reduce the image feature missed detection rate. The image data obtained after image segmentation can be used as a sample of the pipeline defect detection model, thereby providing a basis for model training and verification.

[0041] In an optional embodiment, the heterogeneous image group of the sample oil and gas pipeline can be obtained in the following manner: first, a pipeline inspection robot carrying a 360-degree camera pan and a heterogeneous signal acquisition sensor is launched into the sample oil and gas pipeline, and the internal image of the pipeline is collected during the movement of the pipeline inspection robot. Then, the internal pipeline signal of the sample oil and gas pipeline is synchronously collected by the heterogeneous signal acquisition sensor installed on the pipeline inspection robot, and the internal pipeline signal is converted into multiple types of pseudo-color images, wherein the pseudo-color image includes a magnetic leakage pseudo-color image, an eddy current pseudo-color image, and an ultrasonic pseudo-color image. Finally, the internal pipeline image, the magnetic leakage pseudo-color image, the eddy current pseudo-color image, and the ultrasonic pseudo-color image are integrated to obtain a heterogeneous image group of the sample oil and gas pipeline. It can be understood that the method of obtaining the heterogeneous image group of the oil and gas pipeline to be tested in step 207 can also be implemented by the above method, so it is not repeated.

[0042] Specifically, in the above-mentioned embodiment, in order to obtain a heterogeneous image group of the sample oil and gas pipeline, the pipeline inspection robot technology can be used to launch a pipeline inspection robot carrying a 360-degree camera gimbal and a heterogeneous signal acquisition sensor into the sample oil and gas pipeline. Among them, the pipeline inspection robot can move freely inside the pipeline, and through the 360-degree camera gimbal it carries, it can collect image information inside the pipeline in all directions and without dead angles during the movement. Among them, the internal picture of the pipeline not only records the physical form inside the pipeline, but also reflects the texture, color and other detailed information of the inner wall of the pipeline. A heterogeneous signal acquisition sensor is also installed on the pipeline inspection robot, which can synchronously collect the internal pipeline signals of the sample oil and gas pipeline. The internal pipeline signals include but are not limited to leakage magnetic signals, eddy current signals and ultrasonic signals, which reflect the different physical properties inside the pipeline. In order to display these signals more intuitively, the collected internal pipeline signals can be converted into various types of pseudo-color pictures. These pseudo-color images include magnetic flux leakage pseudo-color images, eddy current pseudo-color images, and ultrasonic pseudo-color images, which can use different color codes to represent the size and distribution of different signals, so as to clearly observe the physical and chemical state inside the pipeline. Finally, the collected internal pipeline images and the converted pseudo-color images can be integrated to form a heterogeneous image group containing rich information. The above heterogeneous image group not only contains the internal pipeline image information, but also integrates the data of various physical and chemical signals, which can provide more comprehensive and accurate data support for subsequent analysis and processing.

[0043] Step 202 , obtaining the pipeline physical information of each sample oil and gas pipeline at multiple sampling points, and extracting the expert experience characteristics and physical evolution characteristics of the oil and gas pipeline to be tested based on the pipeline physical information.

[0044] First, the physical information of each sample oil and gas pipeline at multiple sampling points can be obtained. When collecting the physical information of the pipeline, the physical information around the pipeline can be mined, including the temperature of the pipeline, the size of the pipeline, the wall thickness of the pipeline, and the material of the pipeline, and a physical information model can be established through the collected physical information of the pipeline. For example, the physical information expression is shown in Formula 1.

[0045] (Formula 1)

[0046] in, is a collection of physical information, temperature is the temperature of the pipeline, size is the size of the pipeline, thickness is the thickness of the pipeline, material is the material of the pipeline, is a collection of physical processes, is the extraction rule of expert experience features, is the physical evolution rule of the scene, is the influencing factor of physical information, is the initial information, is a hyperparameter, is the time parameter.

[0047] Furthermore, the expert experience features of the sample oil and gas pipeline can be extracted in the following manner: First, based on the pipeline physical information of the sample oil and gas pipeline at multiple sampling points, the change amplitude of the pipeline physical information between every two sampling points is calculated. Then, based on the change amplitude of the pipeline physical information between every two sampling points, the change level of the pipeline physical information of the multiple sampling points is determined, and the pipeline physical information levels of the multiple sampling points are feature encoded. Finally, based on the attention weights corresponding to the pipeline physical information levels, the encoded features of the pipeline physical information levels of the multiple sampling points are feature fused to obtain the expert experience features of the sample oil and gas pipeline. It can be understood that the method of extracting the expert experience features of the oil and gas pipeline to be tested in step 208 can also be achieved by the above method, so it will not be repeated.

[0048] Specifically, in the above implementation, when extracting expert experience features, first, the pipeline physical information of the sample oil and gas pipeline at multiple sampling points can be collected, wherein the collected pipeline physical information includes but is not limited to multiple physical parameters such as the wall thickness, material, and corrosion degree of the pipeline. Then, based on these pipeline physical information, the change amplitude of the pipeline physical information between each two adjacent sampling points can be calculated by methods such as difference method or ratio method to quantify the local differences in the physical characteristics of the pipeline. Then, according to the preset change amplitude threshold range, the change amplitude of the pipeline physical information between each two sampling points can be divided into different levels, such as slight change as level 1, medium change as level 2, and significant change as level 3, etc., so as to achieve hierarchical management of the degree of change of pipeline physical information. Subsequently, for each sampling point, feature encoding can be performed according to its corresponding pipeline physical information change level, that is, the level information is converted into a digital or vector form that can be recognized by a computer for subsequent processing. Finally, considering that the importance of pipeline physical information levels at different sampling points to the overall pipeline status assessment may be different, an attention mechanism can be introduced, and corresponding attention weights can be assigned to the pipeline physical information level encoding features of each sampling point. This weight can reflect the relative importance of each sampling point in assessing the pipeline status. Based on these weights, the pipeline physical information level coding features of multiple sampling points can be fused by weighted summation or weighted average, so as to comprehensively obtain the expert experience features of the sample oil and gas pipeline. This process not only improves the accuracy of feature extraction, but also enhances the feature's ability to characterize the actual operating status of the oil and gas pipeline.

[0049] For example, the expression of expert experience features can be shown as formula 2.

[0050] (Formula 2)

[0051] Among them, q 1 is the expert experience feature, tem is the temperature of the pipeline, thin is the thickness of the pipeline wall, i is the sampling point number, is the attention weight, It is the level of change of the encoded physical information.

[0052] Furthermore, the physical evolution characteristics of the sample oil and gas pipeline can be extracted in the following manner: first, the pipeline physical information encoding of the sample oil and gas pipeline at multiple sampling points is converted into physical information characteristics. Then, according to the arrangement order of the multiple sampling points, the physical information characteristics of the pipeline physical information of the multiple sampling points are feature spliced, and the spliced ​​physical information characteristics are normalized to obtain the physical evolution characteristics of the sample oil and gas pipeline. It can be understood that the method of extracting the physical evolution characteristics of the oil and gas pipeline to be tested in step 208 can also be implemented by the above method, so it will not be repeated.

[0053] Specifically, in the above embodiment, when extracting physical evolution features, first, the physical information of the pipeline obtained at multiple sampling points of the sample oil and gas pipeline, such as pipeline wall thickness, corrosion degree, material type, etc., can be converted into computer-processable physical information features using a preset encoding method to ensure that the original physical information can be effectively converted into a format that can be recognized by a machine learning or deep learning model. Subsequently, the physical information features of the converted pipeline physical information of each sampling point can be sequentially spliced ​​according to the spatial arrangement order of the multiple sampling points on the pipeline to retain the relative position information between the sampling points. Among them, the spliced ​​feature vector can contain the physical information of all sampling points and form a complete description of the physical state of the pipeline. Further, in order to eliminate the influence of the numerical differences that may exist between different feature dimensions on model training, the spliced ​​physical information features can be normalized to scale the feature values ​​to a common scale, such as [0, 1] or [-1, 1], so as to ensure that all features have equal weights during model training. The above steps can improve the stability and convergence speed of the model, and can also enhance the comparability between features.

[0054] For example, the expression of the physical evolution characteristic can be shown as formula three.

[0055] (Formula 3)

[0056] Among them, q 2 is the physical evolution characteristic, and i is the sampling point number.

[0057] Step 203: Divide the samples into training samples and test samples according to a preset sample ratio.

[0058] Specifically, after obtaining the samples, the collected heterogeneous image samples can be divided according to the preset sample ratio. In this process, a group of heterogeneous images of some sample oil and gas pipelines can be selected as training samples, and these training samples can be used in the model training stage to ensure that the model can learn enough features and rules. At the same time, the remaining heterogeneous image groups of other sample oil and gas pipelines that are not selected as training samples can be divided into test samples. After the model training is completed, the test samples can be used to perform performance testing and verification on the model to evaluate the generalization ability and accuracy of the model. Through such division, the effectiveness of the training process and the reliability of the test results can be ensured, laying the foundation for the subsequent optimization and application of the model.

[0059] For example, a heterogeneous image group of some pipelines in the sample can be used as a training sample, and the expression is shown in Formula 4. The heterogeneous image sample group of another part of the pipeline in the sample can be a test sample, and the expression is shown in Formula 5.

[0060] (Formula 4)

[0061] Among them, x d represents the training sample, , , and They are respectively the internal picture of the oil and gas pipeline, the magnetic leakage pseudo-color picture, the eddy current pseudo-color picture and the ultrasonic pseudo-color picture of each sample in the training samples, i is the sequence number of the training sample, and N is the number of training samples.

[0062] (Formula 5)

[0063] Among them, x t represents the test sample, , , and are the internal images of the oil and gas pipelines of each sample in the test sample, the magnetic leakage pseudo-color image, the eddy current pseudo-color image, and the ultrasonic pseudo-color image. i is the serial number of the test sample, and N t is the number of test samples.

[0064] Step 204: construct a loss function of the pipeline defect detection model, wherein the loss function includes a category loss function, a position loss function, and a physical environment loss function.

[0065] Specifically, the present embodiment can construct the loss function of the pipeline defect detection model from multiple angles, and the process is as follows: first, based on the binary classification labels of the sample oil and gas pipelines and the probability of the positive labels predicted by the pipeline defect detection model, a category loss function is constructed. Then, based on the actual defect bounding box parameters of the sample oil and gas pipelines and the defect candidate box parameters predicted by the pipeline defect detection model, a position loss function is constructed. Next, based on the expert experience characteristics and physical evolution characteristics of the sample oil and gas pipelines and the expert experience characteristics and physical evolution characteristics of the preset pipeline environment, a physical environment loss function is constructed. Finally, based on the category loss function, the position loss function and the physical environment loss function, the loss function of the pipeline defect detection model is obtained. After the loss function is constructed, the loss value of the loss function can be continuously verified during the iterative training of the model. When the loss value reaches the preset range, it can be considered that the preliminary training of the pipeline defect detection model is completed.

[0066] In this embodiment, based on the binary classification label of the sample oil and gas pipeline (i.e., whether there is a defect) and the probability of the positive label (the presence of a defect) predicted by the pipeline defect detection model, a category loss function can be constructed by methods such as cross entropy to measure the accuracy of the model in the classification task. By using the actual defect bounding box parameters (such as coordinates, size, etc.) of the sample oil and gas pipeline and the defect candidate box parameters predicted by the pipeline defect detection model, and constructing a position loss function by calculating IoU (intersection over union) loss or smooth L1 loss, the accuracy of the model in locating the defect position can be evaluated. Combining the expert experience features and physical evolution features of the sample oil and gas pipeline, as well as the expert experience features and physical evolution features of the preset pipeline environment, and constructing a physical environment loss function by weighted summation / or feature fusion, more external information related to pipeline defects can be introduced, thereby improving the robustness and generalization ability of the model.

[0067] Furthermore, after obtaining the category loss function, location loss function and physical environment loss function, they can be added according to certain weights to obtain the final loss function of the pipeline defect detection model. This loss function will be used as the optimization target in the model training process. During the model training process, when the loss value of the loss function reaches the preset range (such as less than a certain threshold or the convergence trend is obvious), it can be considered that the model has been trained. At this time, the obtained pipeline defect detection model has high classification accuracy, positioning accuracy and adaptability to the physical environment, and can be used in actual oil and gas pipeline defect detection tasks.

[0068] For example, the category loss function can adopt the cross entropy loss function, as shown in Formula 6; the position loss function can adopt the Smooth L1 loss function, as shown in Formula 7 and Formula 8; the physical environment loss function can be used as an auxiliary loss function and is calculated using the Euclidean distance, as shown in Formula 9; the total loss function is the weighted sum of the category loss function, the position loss function, and the physical environment loss function, as shown in Formula 10. By minimizing the above loss functions, the parameters of the pipeline defect detection model can be continuously updated and the model training can be completed, thereby obtaining a trained pipeline defect detection model.

[0069] (Formula 6)

[0070] Among them, L cls is the category loss function, is the true label, The probability that the model predicts the positive class.

[0071] , (Formula 7)

[0072] , (Formula 8)

[0073] Among them, L reg is the position loss function, are the bounding box parameters predicted by the model (including the center point coordinates , And width and height ), are the parameters of the true bounding box.

[0074] (Formula 9)

[0075] Among them, L phy is the physical environment loss function, Expert experience characteristics and physical evolution characteristics of sample oil and gas pipelines, Expert experience characterization and physical evolution characteristics for standard pipeline environments.

[0076] (Formula 10)

[0077] Among them, Loss is the loss function, L cls is the category loss function, L reg is the position loss function, L phy is the physical environment loss function, and is the preset weight coefficient.

[0078] This embodiment adds a physical environment loss function to the loss function, so that the environmental characteristics of the oil and gas pipeline to be tested and the environmental characteristics under ideal conditions can be digitally encoded during the model training process, so that the difference between the two characteristics can be used to assist in updating the network, thereby ensuring that the impact of environmental factors on the detection results can be fully considered during the defect detection process.

[0079] Step 205, iteratively train the pipeline defect detection model based on the training samples, and obtain a trained pipeline defect detection model when the loss value of the loss function reaches a preset range.

[0080] Specifically, the pipeline defect detection model can be trained in the following way: for each training sample, extract the underlying features and deep cascade features of the heterogeneous image group, perform feature fusion on the underlying features and deep cascade features, and perform high-dimensional synthesis on the fused features to obtain the synthetic features of the heterogeneous image group. Then, the synthetic features of the heterogeneous image group are input into the pre-constructed region proposal network, and a preset number of candidate regions of the training sample are output. Subsequently, based on the non-maximum suppression method of pipeline characteristics, the candidate regions of multiple training samples are synthesized to obtain the defect candidate box of the sample oil and gas pipeline, and the defect candidate box is used as the model prediction result. Finally, the loss function of the pipeline defect detection model is constructed, and based on the loss function, the pipeline defect detection model is iteratively trained to obtain the trained pipeline defect detection model.

[0081] Specifically, during the model training process, for each training sample, a deep convolutional neural network (CNN) or other feature extraction techniques can be used to extract the underlying features and deep cascade features in the heterogeneous image group. Among them, the underlying features usually contain basic information such as texture and edge of the image, while the deep cascade features usually contain higher-level semantic information. Subsequently, these underlying features and deep cascade features can be fused, and the feature information at different levels can be integrated together through splicing, weighted summation or feature transformation to form a more comprehensive and rich feature representation. After feature fusion, the fused features can be synthesized in high dimensions, that is, multiple feature vectors are combined into a feature vector of higher dimensions. This step can help the model better capture the correlation and complementarity between different types of images, thereby improving the model's ability to identify pipeline defects. Next, the high-dimensional synthesized features can be input into the pre-built region proposal network (RPN). Among them, RPN is a network structure specifically used to generate candidate regions. It can quickly generate a series of candidate regions that may contain pipeline defects based on the input feature map. These candidate regions are the basis for subsequent defect location and classification.

[0082] After obtaining the candidate regions, the non-maximum suppression method (NMS) based on pipeline characteristics can be used to screen and synthesize the candidate regions of multiple training samples. Among them, the NMS algorithm can remove redundant and overlapping candidate regions by comparing the scores and location information of the candidate regions, and retain the candidate regions with the highest scores and the most accurate locations as the final defect candidate frames. These defect candidate frames will be used as model prediction results for subsequent classification and positioning tasks. Through the above process, the model training can be completed once, and the above training process is repeated iteratively until the model training is completed. During the iterative training of the model, the value of the loss function can be continuously calculated, and the model parameters can be adjusted according to the loss value to gradually reduce the prediction error and improve the model performance. When the loss value of the loss function reaches the preset range, for example, the loss value converges to a stable and low level, it can be considered that the model has been trained. The pipeline defect detection model obtained at this time has high accuracy and robustness, and can accurately identify pipeline defects and accurately locate them.

[0083] In an optional embodiment, feature synthesis can be performed in the following manner to obtain synthetic features of a heterogeneous image group: first, for each training sample, four parallel deep cascade convolutional neural networks are used to extract the underlying features and deep cascade features of four images in the heterogeneous image group, wherein the four images are pipeline internal images, magnetic flux leakage pseudo-color images, eddy current pseudo-color images, and ultrasonic pseudo-color images. Then, with the deep cascade features as the dominant features and the underlying features as the auxiliary features, the underlying features and deep cascade features of each image are fused to obtain the fused features of each image. Finally, the fused features of each image are synthesized in high dimensions to obtain the synthetic features of the heterogeneous image group.

[0084] Specifically, Figure 3As described above, when performing feature synthesis, four parallel deep cascade convolutional neural networks (CNNs) can be used to extract features from each image in the heterogeneous image group of each training sample. Among them, the four images in the heterogeneous image group are pipeline internal pictures, magnetic flux leakage pseudo-color images, eddy current pseudo-color images, and ultrasonic pseudo-color images, which can reflect the internal structure of the pipeline and possible defects from different angles. In addition, each deep cascade convolutional neural network in the model has a strong feature learning ability and can extract underlying features and deep cascade features from the input image. Among them, the underlying features usually contain basic information such as texture and edges of the image, while the deep cascade features usually contain higher-level semantic information, such as the shape and structure of the object. After extracting the underlying features and deep cascade features of each image, the underlying features and deep cascade features of each image can be fused with the deep cascade features as the main and the underlying features as the auxiliary. Through feature fusion, the advantages of the underlying features and deep cascade features can be fully utilized to improve the model's recognition ability of pipeline defects.

[0085] After the feature fusion is completed, the fusion features of each image can be obtained, and these fusion features can be synthesized in high dimensions. Among them, high-dimensional synthesis is a method of combining multiple feature vectors into a higher-dimensional feature vector, which can help the model better capture the correlation and complementarity between different features. Through high-dimensional synthesis, the fusion features of the four heterogeneous images can be integrated together, and the synthetic features of the heterogeneous image group can be obtained. In this embodiment, the synthetic features of the heterogeneous image group not only contain all the useful information of the four heterogeneous images, but also improve the feature expression ability and the recognition performance of the model through feature fusion and high-dimensional synthesis. In the subsequent model training process, these synthetic features will be used as input to train a more accurate and robust pipeline defect detection model.

[0086] For example, the underlying features and deep feature structure of a heterogeneous image set can be constructed by four parallel deep cascade convolutional neural networks. They are defined as , , and .in, , , and They are the underlying feature extraction networks for pipeline internal images, magnetic flux leakage pseudo-color images, eddy current pseudo-color images, and ultrasonic pseudo-color images. , , and They are deep fusion feature extraction networks for pipeline internal images, magnetic flux leakage pseudo-color images, eddy current pseudo-color images, and ultrasonic pseudo-color images. Among them, the underlying features can include contour features, edge features, color features, texture features, and shape features. The underlying features of each group of heterogeneous images can be recorded as shown in Formula 11.

[0087] (Formula 11)

[0088] in, is the underlying feature of the heterogeneous image group, They represent the internal picture of the pipeline, the leakage magnetic field pseudo-color picture, the eddy current pseudo-color picture and the ultrasonic pseudo-color picture respectively.

[0089] Furthermore, , , and They contain multiple layers of feature extraction and cascade fusion layers, and their structures are parallel and identical. The specific feature extraction and cascade fusion are shown below. Take the 3-layer cascade fusion structure as an example:

[0090] The first layer of deep features : Through a convolution structure Perform feature extraction, with the input being the bottom-level features of the last layer output , where the first layer of deep features It can be expressed by formula twelve.

[0091] (Formula 12)

[0092] The second layer of deep fusion features : Through two convolution structures and Respectively and Perform feature extraction and obtain and , and the two features are connected in series, where the second layer of deep fusion features It can be expressed by formula 13.

[0093] (Formula 13)

[0094] The third layer of deep fusion features : Through three convolution structures , and Respectively , and Perform feature extraction and obtain , and , and connect the three features in series, where the third layer of deep fusion features It can be expressed by formula 14.

[0095] (Formula 14)

[0096] Furthermore, for the underlying features and deep cascade features Fusion, deep cascade features Dominant, underlying characteristics For assistance, its expression is as shown in Formula 15.

[0097] (Formula 15)

[0098] in, is the fusion feature of one image in the heterogeneous image group, is the deep cascade feature of one image in the heterogeneous image group, is the underlying feature of one image in the heterogeneous image group, is the KPCA dimensionality reduction function.

[0099] Furthermore, the fusion features of various images in the heterogeneous image group are synthesized in high dimensions, and the synthesized features are Fuzzy logic analysis and probability model analysis are performed on the heterogeneous features, and high-dimensional synthesis is performed on the heterogeneous features according to the analysis results. The expression is shown in Formula 16.

[0100] (Formula 16)

[0101] in, is the synthetic feature of heterogeneous image group, is the fusion feature of one image in the heterogeneous image group, They represent the internal image of the pipeline, the magnetic flux leakage pseudo-color image, the eddy current pseudo-color image and the ultrasonic pseudo-color image. is the probability distribution coefficient, is the fuzzy inference system model, and are the antecedent and consequent membership functions, respectively. is the data distribution function of the corresponding feature.

[0102] Furthermore, the synthetic features of the heterogeneous image group can be input into the region proposal network (RPN) to output a fixed number of candidate regions. Finally, the defect candidate box can be determined by the non-maximum suppression (NMS) method based on pipeline characteristics, and the leakage magnetic characteristics of the pipeline can be used to identify the defect candidate box. To replace the IoU coefficient of NMS, its expression is as shown in Formula 17.

[0103] (Formula 17)

[0104] in, is the magnetic flux leakage characteristic of the pipeline, is the leakage flux matrix The extreme value of .

[0105] Step 206 , optimizing and verifying parameters of the pipeline defect detection model based on the test samples.

[0106] Specifically, after the pipeline defect detection model is trained, the parameters of the pipeline defect detection model can be optimized and verified using the pre-divided test samples. In this process, the test samples can be input into the pipeline defect detection model that has been preliminarily trained, and the model can predict the test samples. During the prediction process, the model outputs the defect candidate box and the corresponding prediction probability of each test sample. Then, the model prediction results can be compared with the true labels of the test samples, and the performance indicators of the model on the test set, such as accuracy, recall, etc., can be calculated. These performance indicators can intuitively reflect the model's ability to identify pipeline defects. After obtaining the performance indicators, the parameters of the model can be optimized. In the process of parameter optimization, the cross-validation method can be used to divide the test samples into multiple subsets, and train and test them separately to more accurately evaluate the performance of the model on different subsets. Through multiple iterations and adjustments, better model parameters and structures can be gradually found. Finally, the optimized model parameters and structures can be applied to the pipeline defect detection model, and the model can be retrained, and then the test samples can be used for verification again. The performance indicators of the model after parameter optimization on the test set can be significantly improved, indicating that the model's ability to identify pipeline defects has been effectively enhanced.

[0107] Step 207 : collecting internal information of the oil and gas pipeline to be tested, and generating a heterogeneous image group of the oil and gas pipeline to be tested based on the internal information of the pipeline.

[0108] Step 208, obtaining the pipeline physical information of the oil and gas pipeline to be tested at multiple sampling points, and extracting the expert experience characteristics and physical evolution characteristics of the oil and gas pipeline to be tested based on the pipeline physical information.

[0109] Step 209 , based on the heterogeneous image group, expert experience features and physical evolution features of the oil and gas pipeline to be tested, the defect detection result of the oil and gas pipeline to be tested is obtained through the trained pipeline defect detection model.

[0110] Specifically, the implementation method and technical effects of steps 207 to 209 can refer to the contents of steps 101 to 103 and steps 201 to 206, and will not be repeated here.

[0111] The above embodiment can realize accurate detection of oil and gas pipeline defects by processing heterogeneous image groups including pipeline internal pictures, magnetic flux leakage pseudo-color images, eddy current pseudo-color images and ultrasonic pseudo-color images, thereby overcoming the problem of false detection or missed detection faced in the single data processing process, improving the robustness of the pipeline defect detection model, and thus improving the accuracy and stability of complex defect detection. In addition, the above method detects pipeline defects by taking the environmental information of the pipeline and the physical information of the pipeline itself as auxiliary factors, taking into account the influence of environmental factors during the detection process, overcoming the problem that the conventional method cannot detect the influence of environmental changes on the corrosion state of the pipeline, and comprehensively improving the accuracy of pipeline defect detection. In addition, the above method extracts and fuses the underlying features and deep features of the heterogeneous image group during the model training process, and adds reference factors such as classification loss, position loss and physical information loss in the loss function, so that the parameters of the model can be continuously optimized, and the model can obtain more abundant and effective pipeline information, enhance the interpretability of the network, and thus improve the stability and accuracy of the detection results.

[0112] It should be noted that the user information (including but not limited to user information, device information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. In addition, the numbers corresponding to the various steps in the above embodiments only serve as identification and are not used as a limitation on the order in which the steps are executed. The order in which the steps are executed in each embodiment can be set according to actual conditions.

[0113] Further, as Figures 1 to 3 The specific implementation of the method shown in the figure, the embodiment of the present application provides a defect detection device for oil and gas pipelines, such as Figure 4 As shown, the device comprises:

[0114] The image feature acquisition module 31 can be used to acquire the internal information of the oil and gas pipeline to be tested, and generate a heterogeneous image group of the oil and gas pipeline to be tested based on the internal information of the pipeline, wherein the heterogeneous image group includes a pipeline internal picture, a magnetic flux leakage pseudo-color image, an eddy current pseudo-color image, and an ultrasonic pseudo-color image;

[0115] The physical feature acquisition module 32 can be used to obtain the pipeline physical information of the oil and gas pipeline to be tested at multiple sampling points, and based on the pipeline physical information, extract the expert experience characteristics and physical evolution characteristics of the oil and gas pipeline to be tested, wherein the pipeline physical information includes the environmental information of the oil and gas pipeline to be tested and the physical information of the oil and gas pipeline to be tested;

[0116] The pipeline defect prediction module 33 can be used to obtain defect detection results of the oil and gas pipeline to be tested based on the heterogeneous image group, expert experience features and physical evolution features of the oil and gas pipeline to be tested through the trained pipeline defect detection model.

[0117] In a specific application scenario, the image feature acquisition module 31 can be used to launch a pipeline inspection robot equipped with a 360-degree camera gimbal and a heterogeneous signal acquisition sensor into the oil and gas pipeline to be tested, and collect pictures of the inside of the pipeline while the pipeline inspection robot is moving; through the heterogeneous signal acquisition sensor installed on the pipeline inspection robot, the internal pipeline signals of the oil and gas pipeline to be tested are synchronously collected, and the internal pipeline signals are converted into multiple types of pseudo-color pictures, wherein the pseudo-color pictures include leakage magnetic pseudo-color pictures, eddy current pseudo-color pictures and ultrasonic pseudo-color pictures; the internal pipeline pictures, the leakage magnetic pseudo-color pictures, the eddy current pseudo-color pictures and the ultrasonic pseudo-color pictures are integrated to obtain a heterogeneous image group of the oil and gas pipeline to be tested.

[0118] In a specific application scenario, the physical feature acquisition module 32 can be used to calculate the variation range of the pipeline physical information between every two sampling points based on the pipeline physical information of the oil and gas pipeline to be tested at multiple sampling points; determine the variation level of the pipeline physical information of multiple sampling points based on the variation range of the pipeline physical information between every two sampling points, and perform feature encoding on the pipeline physical information levels of the multiple sampling points; perform feature fusion on the encoded features of the pipeline physical information levels of multiple sampling points based on the attention weights corresponding to the pipeline physical information levels, and obtain the expert experience features of the oil and gas pipeline to be tested.

[0119] In a specific application scenario, the physical feature acquisition module 32 can be used to convert the pipeline physical information encoding of the oil and gas pipeline to be tested at multiple sampling points into physical information features; according to the arrangement order of the multiple sampling points, the physical information features of the pipeline physical information of the multiple sampling points are feature spliced, and the spliced ​​physical information features are normalized to obtain the physical evolution characteristics of the oil and gas pipeline to be tested.

[0120] In specific application scenarios, such as Figure 5As shown, the device also includes a model training module 34, which can be used to obtain a plurality of heterogeneous image groups of sample oil and gas pipelines, and perform image segmentation on the heterogeneous image groups of the sample oil and gas pipelines according to a preset image size to obtain training samples of the pipeline defect detection model; for each training sample, extract the underlying features and deep cascade features of the heterogeneous image group, perform feature fusion on the underlying features and the deep cascade features, and perform high-dimensional synthesis on the fused features to obtain synthetic features of the heterogeneous image group; input the synthetic features of the heterogeneous image group into a pre-constructed region proposal network, and output a preset number of candidate regions of the training sample; perform region synthesis on the candidate regions of the plurality of training samples based on the non-maximum suppression method of pipeline characteristics to obtain defect candidate frames of the sample oil and gas pipeline, and use the defect candidate frames as model prediction results; construct a loss function of the pipeline defect detection model, and iteratively train the pipeline defect detection model based on the loss function to obtain a trained pipeline defect detection model.

[0121] In a specific application scenario, the model training module 34 can be used to extract the underlying features and deep cascade features of four images in the heterogeneous image group for each training sample through four parallel deep cascade convolutional neural networks, wherein the four images are respectively a picture of the interior of a pipeline, a magnetic leakage pseudo-color image, an eddy current pseudo-color image, and an ultrasonic pseudo-color image; using the deep cascade features as the dominant features and the underlying features as the auxiliary features, the underlying features and deep cascade features of each image are respectively fused to obtain the fused features of each image; the fused features of each image are high-dimensionally synthesized to obtain the synthesized features of the heterogeneous image group.

[0122] In a specific application scenario, the model training module 34 can be used to construct a category loss function based on the binary classification label of the sample oil and gas pipeline and the probability of the positive label predicted by the pipeline defect detection model; construct a position loss function based on the actual defect bounding box parameters of the sample oil and gas pipeline and the defect candidate box parameters predicted by the pipeline defect detection model; construct a physical environment loss function based on the expert experience characteristics and physical evolution characteristics of the sample oil and gas pipeline and the expert experience characteristics and physical evolution characteristics of the preset pipeline environment; obtain the loss function of the pipeline defect detection model based on the category loss function, the position loss function and the physical environment loss function; based on the loss function, iteratively train the model parameters of the pipeline defect detection model, and obtain a trained pipeline defect detection model when the loss value of the loss function reaches within a preset range.

[0123] It should be noted that for other corresponding descriptions of the functional units involved in the oil and gas pipeline defect detection device provided in the embodiment of the present application, reference can be made to Figures 1 to 3The corresponding description in the method will not be repeated here.

[0124] The embodiment of the present application also provides a computer device, which can be a personal computer, a server, a network device, etc. The computer device includes a bus, a processor, a memory and a communication interface, and can also include an input and output interface and a display device. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store location information. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the steps in each method embodiment are implemented.

[0125] Those skilled in the art will appreciate that the structure of the above-mentioned computer device is only a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components, or combine certain components, or have a different arrangement of components.

[0126] In one embodiment, a computer-readable storage medium is provided. The computer-readable storage medium may be non-volatile or volatile, and stores a computer program thereon. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0127] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0128] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0129] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0130] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for defect detection of oil and gas pipelines, characterized in that: The method comprises: Collecting internal information of the oil and gas pipeline to be tested, and generating a heterogeneous image group of the oil and gas pipeline to be tested based on the internal information of the pipeline, wherein the heterogeneous image group includes a pipeline internal picture, a magnetic flux leakage pseudo-color image, an eddy current pseudo-color image, and an ultrasonic pseudo-color image; Obtaining pipeline physical information of the oil and gas pipeline to be tested at multiple sampling points, and extracting expert experience characteristics and physical evolution characteristics of the oil and gas pipeline to be tested based on the pipeline physical information, wherein the pipeline physical information includes environmental information of the oil and gas pipeline to be tested and physical information of the oil and gas pipeline to be tested itself; Based on the heterogeneous image group, expert experience features and physical evolution features of the oil and gas pipeline to be tested, the defect detection results of the oil and gas pipeline to be tested are obtained through the trained pipeline defect detection model, wherein the method for constructing the loss function of the pipeline defect detection model includes: constructing a category loss function based on the binary classification label of the sample oil and gas pipeline and the probability of the positive label predicted by the pipeline defect detection model; constructing a position loss function based on the real defect bounding box parameters of the sample oil and gas pipeline and the defect candidate box parameters predicted by the pipeline defect detection model; constructing a physical environment loss function based on the expert experience features and physical evolution features of the sample oil and gas pipeline and the expert experience features and physical evolution features of the preset pipeline environment; based on the category loss function, the position loss function and the physical environment loss function, the loss function of the pipeline defect detection model is obtained.

2. The defect detection method for oil and gas pipeline according to claim 1, characterized in that: The collecting of internal information of the oil and gas pipeline to be tested and generating a heterogeneous image group of the oil and gas pipeline to be tested based on the internal information of the pipeline include: Launching a pipeline inspection robot equipped with a 360-degree camera gimbal and heterogeneous signal acquisition sensors into the oil and gas pipeline to be inspected, and collecting images of the interior of the pipeline while the pipeline inspection robot is moving; By means of a heterogeneous signal acquisition sensor installed on the pipeline internal inspection robot, internal signals of the oil and gas pipeline to be inspected are synchronously acquired, and the internal signals of the pipeline are converted into various types of pseudo-color images, wherein the pseudo-color images include magnetic flux leakage pseudo-color images, eddy current pseudo-color images and ultrasonic pseudo-color images; The pipeline internal picture, the magnetic flux leakage pseudo-color image, the eddy current pseudo-color image and the ultrasonic pseudo-color image are integrated to obtain a heterogeneous image group of the oil and gas pipeline to be tested.

3. The defect detection method for oil and gas pipeline according to claim 1, characterized in that: The extracting of expert experience features and physical evolution features of the oil and gas pipeline to be tested based on the pipeline physical information includes: Based on the physical information of the oil and gas pipeline to be tested at multiple sampling points, the variation range of the physical information of the pipeline between every two sampling points is calculated; Based on the change amplitude of the pipeline physical information between every two sampling points, determining the change level of the pipeline physical information of the multiple sampling points, and performing feature encoding on the pipeline physical information levels of the multiple sampling points; Based on the attention weight corresponding to the pipeline physical information level, the encoding features of the pipeline physical information level of multiple sampling points are fused to obtain the expert experience features of the oil and gas pipeline to be tested.

4. The defect detection method for oil and gas pipeline according to claim 1, characterized in that: The extracting of expert experience features and physical evolution features of the oil and gas pipeline to be tested based on the pipeline physical information also includes: Convert the pipeline physical information encoding at multiple sampling points of the oil and gas pipeline to be tested into physical information features; According to the arrangement order of multiple sampling points, the physical information features of the pipeline physical information of multiple sampling points are spliced, and the spliced ​​physical information features are normalized to obtain the physical evolution features of the oil and gas pipeline to be tested.

5. The defect detection method for oil and gas pipeline according to claim 1, characterized in that: The pipeline defect detection model training method includes: Acquire a plurality of heterogeneous image groups of sample oil and gas pipelines, and perform image segmentation on the heterogeneous image groups of the sample oil and gas pipelines according to a preset image size to obtain training samples for a pipeline defect detection model; For each training sample, extracting the underlying features and deep cascade features of the heterogeneous image group, performing feature fusion on the underlying features and the deep cascade features, and performing high-dimensional synthesis on the fused features to obtain synthetic features of the heterogeneous image group; Inputting the synthesized features of the heterogeneous image group into a pre-constructed region proposal network, and outputting a preset number of candidate regions of the training samples; Based on the non-maximum suppression method of pipeline characteristics, the candidate regions of multiple training samples are synthesized to obtain the defect candidate frame of the sample oil and gas pipeline, and the defect candidate frame is used as the model prediction result; A loss function of the pipeline defect detection model is constructed, and based on the loss function, the pipeline defect detection model is iteratively trained to obtain a trained pipeline defect detection model.

6. The defect detection method for oil and gas pipeline according to claim 5, characterized in that: For each training sample, extracting the underlying features and deep cascade features of the heterogeneous image group, fusing the underlying features and the deep cascade features, and performing high-dimensional synthesis on the fused features to obtain synthetic features of the heterogeneous image group, including: For each training sample, four parallel deep cascade convolutional neural networks are used to extract the underlying features and deep cascade features of four images in the heterogeneous image group, wherein the four images are pipeline internal images, magnetic flux leakage pseudo-color images, eddy current pseudo-color images, and ultrasonic pseudo-color images; Taking the deep cascade feature as the leading feature and the bottom-level feature as the auxiliary feature, the bottom-level feature and the deep cascade feature of each image are respectively fused to obtain the fused feature of each image; The fused features of each image are synthesized in high dimension to obtain the synthesized features of the heterogeneous image group.

7. A defect detection device for oil and gas pipelines, characterized in that: The device comprises: An image feature acquisition module is used to acquire internal information of the oil and gas pipeline to be tested, and based on the internal information of the pipeline, generate a heterogeneous image group of the oil and gas pipeline to be tested, wherein the heterogeneous image group includes a pipeline internal picture, a magnetic flux leakage pseudo-color image, an eddy current pseudo-color image, and an ultrasonic pseudo-color image; A physical feature acquisition module is used to obtain the pipeline physical information of the oil and gas pipeline to be tested at multiple sampling points, and based on the pipeline physical information, extract the expert experience characteristics and physical evolution characteristics of the oil and gas pipeline to be tested, wherein the pipeline physical information includes the environmental information of the oil and gas pipeline to be tested and the physical information of the oil and gas pipeline to be tested itself; A pipeline defect prediction module is used to obtain defect detection results of the oil and gas pipeline to be tested based on a heterogeneous image group, expert experience features and physical evolution features of the oil and gas pipeline to be tested, through a trained pipeline defect detection model, wherein a method for constructing a loss function of the pipeline defect detection model includes: constructing a category loss function based on the binary classification label of the sample oil and gas pipeline and the probability of the positive label predicted by the pipeline defect detection model; constructing a position loss function based on the real defect bounding box parameters of the sample oil and gas pipeline and the defect candidate box parameters predicted by the pipeline defect detection model; constructing a physical environment loss function based on the expert experience features and physical evolution features of the sample oil and gas pipeline and the expert experience features and physical evolution features of the preset pipeline environment; and obtaining the loss function of the pipeline defect detection model based on the category loss function, the position loss function and the physical environment loss function.

8. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

9. A computer device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Pipeline detection robot and multisensory fusion detection method thereof

    CN110159869A

  • Pipeline inner and outer wall damage distinguishing method based on combination of magnetic leakage and eddy current

    CN114705749A