Method and system for assessing the degree of interference corrosion of an oil and gas pipeline by stray current

By using pipeline magnetic leakage detectors to obtain non-stress external metal loss defect information and historical pipe-to-ground potential data, and using neural network models to evaluate the degree of corrosion of oil and gas pipelines caused by stray currents, the accuracy and convenience problems of traditional methods were solved, and efficient evaluation of non-destructive testing was achieved.

CN120334342BActive Publication Date: 2025-10-21GUANGDONG SAFETY PROD TECH CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510385073.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-10-21
Estimated Expiration
2045-03-28

AI Technical Summary

Technical Problem

Existing technologies cannot accurately assess the corrosion impact of stray currents on oil and gas pipelines, and traditional methods require excavating the pipelines, which is inconvenient and may damage the pipelines.

Method used

Pipeline magnetic flux leakage detectors are used to obtain the location and size information of non-stress external metal loss defects. Combined with the historical pipeline-to-ground potential positive offset value sequence, a neural network model is used to evaluate the degree of corrosion of oil and gas pipelines caused by stray currents, thus avoiding pipeline excavation.

Benefits of technology

It provides a more accurate assessment of stray current corrosion without the need to excavate the pipeline, improving the convenience and accuracy of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120334342B_ABST
    Figure CN120334342B_ABST
Patent Text Reader

Abstract

The application relates to the field of artificial intelligence, and provides a method and system for evaluating the interference corrosion degree of stray current on an oil and gas pipeline, the method comprising the following steps: obtaining non-stress external metal loss defects of a target oil and gas pipeline identified by a pipeline magnetic flux leakage detector, sizes of the non-stress external metal loss defects, and position information of each non-stress external metal loss defect from a third-party institution; extracting distribution characteristics of the non-stress external metal loss defects based on the position information and the sizes of all the non-stress external metal loss defects; obtaining a historical pipeline ground potential positive offset value sequence of the target oil and gas pipeline; inputting the historical pipeline ground potential positive offset value sequence, the distribution characteristics of the non-stress external metal loss defects detected in adjacent two times, and a detection time interval into a stray current interference corrosion degree evaluation model to obtain the interference corrosion degree of the stray current on the oil and gas pipeline. The application can more accurately and conveniently evaluate the interference corrosion degree of the stray current on the oil and gas pipeline.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method and system for evaluating the degree of interference corrosion of oil and gas pipelines by stray currents. Background Art

[0002] Traditional methods for identifying DC stray current interference include visual identification and electrical identification. The visual identification method requires excavation of the oil and gas pipeline and manual visual identification. The electrical identification method uses the positive offset value of the pipe-to-ground potential to determine the interference. However, the positive offset value of the pipe-to-ground potential reflects the real-time interference level, but corrosion is a long-term cumulative process. Even if the potential offset is very high, the corrosion level will be limited if it persists for a period of time. However, long-term low potential may cause significant damage. The electrical identification method cannot accurately reflect the actual corrosive effects of stray current on oil and gas pipelines. The manual visual identification method requires excavation of the pipeline, which is inconvenient to operate and can easily damage the pipeline during excavation. Therefore, finding a more accurate and convenient method to assess the degree of corrosion caused by stray current interference on oil and gas pipelines is a technical problem that urgently needs to be solved. Summary of the Invention

[0003] In response to the above technical problems, the purpose of this application is to provide a method and system for evaluating the degree of interference corrosion of oil and gas pipelines caused by stray currents, aiming to provide a more accurate and convenient method for evaluating the degree of interference corrosion of oil and gas pipelines caused by stray currents.

[0004] In a first aspect, an embodiment of the present application provides a method for evaluating the degree of interference corrosion of oil and gas pipelines caused by stray currents, the method comprising:

[0005] Obtaining from a third-party organization information on non-stress external metal loss defects of a target oil and gas pipeline identified by a pipeline magnetic flux leakage detector, the size of the non-stress external metal loss defects, and the location of each non-stress external metal loss defect;

[0006] Extracting distribution characteristics of the non-stress external metal loss defects based on the position information of all the non-stress external metal loss defects and the sizes of the non-stress external metal loss defects;

[0007] Obtaining a sequence of historical forward offset values ​​of the pipe-to-ground potential of the target oil and gas pipeline;

[0008] The historical pipe-to-ground potential positive offset value sequence, the distribution characteristics of two adjacent detected non-stress external metal loss defects, and the detection time interval are input into a pre-trained stray current interference corrosion degree evaluation model to obtain the stray current interference corrosion degree of the oil and gas pipeline; wherein, the stray current interference corrosion degree evaluation model for the oil and gas pipeline is based on the distribution characteristics of non-stress external metal loss defects, the detection time interval, and the historical pipe-to-ground potential positive offset value sequence as input, and the stray current interference corrosion degree of the target oil and gas pipeline is trained as output.

[0009] In a second aspect, an embodiment of the present application provides a system for evaluating the degree of interference corrosion of oil and gas pipelines caused by stray currents, the system comprising:

[0010] An identification module is used to obtain from a third-party organization the non-stress external metal loss defects of the target oil and gas pipeline identified by the pipeline magnetic flux leakage detector, the size of the non-stress external metal loss defects, and the location information of each of the non-stress external metal loss defects;

[0011] an extraction module, configured to extract distribution characteristics of the non-stress external metal loss defects based on position information of all the non-stress external metal loss defects and sizes of the non-stress external metal loss defects;

[0012] An acquisition module is used to acquire a sequence of historical forward offset values ​​of the pipe-to-ground potential of the target oil and gas pipeline;

[0013] The input module is used to input the historical pipe-to-ground potential positive offset value sequence, the distribution characteristics of two adjacent detected non-stress external metal loss defects, and the detection time interval into a pre-trained stray current interference corrosion degree evaluation model for oil and gas pipelines to obtain the stray current interference corrosion degree of oil and gas pipelines; wherein, the stray current interference corrosion degree evaluation model for oil and gas pipelines is based on the distribution characteristics of non-stress external metal loss defects, the detection time interval, and the historical pipe-to-ground potential positive offset value sequence as input, and the stray current interference corrosion degree of the target oil and gas pipeline is obtained through training as output.

[0014] In an embodiment of the present application, pipeline magnetic flux leakage detection technology relies on the thrust of the medium transported within the pipeline to propel the pipeline magnetic flux leakage detector along the pipeline, thereby achieving non-stop detection. The pipeline magnetic flux leakage detector can be used to determine the actual corrosion status of the pipeline. The present invention utilizes the location information, defect size information, detection interval, and historical pipeline-to-ground potential positive offset value sequence of non-stress external metal loss defects collected by the pipeline magnetic flux leakage detector to assess the extent of stray current interference corrosion on oil and gas pipelines. Compared to manual visual inspection, this method eliminates the need for pipeline excavation and is more convenient. Furthermore, stray currents affect the distribution characteristics of metal defect loss, and the pipeline-to-ground potential positive offset value can reflect the real-time extent of stray current interference. Therefore, a neural network model is trained based on the defect distribution characteristics, detection interval, and historical pipeline-to-ground potential positive offset value sequence of two adjacent detections as input, and the extent of stray current interference corrosion on the target oil and gas pipeline as output. The neural network model learns the relationship between the distribution characteristics, detection interval, and historical pipeline-to-ground potential positive offset value sequence of two adjacent detections and the extent of interference corrosion on the target oil and gas pipeline. Compared to single characteristic parameters, the resulting assessment of the extent of interference corrosion on the target oil and gas pipeline is more accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for use in the implementation. Obviously, the drawings described below are only some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0016] Figure 1 1 is a flow chart of a method for evaluating the degree of interference corrosion of oil and gas pipelines by stray currents provided in an embodiment of the present application;

[0017] Figure 2 Schematic diagram of radial signal of non-stress external metal loss provided by an embodiment of the present application;

[0018] Figure 3 This is a schematic diagram of an axial signal of non-stress external metal loss provided by an embodiment of the present application;

[0019] Figure 4 This is an ID / OD signal diagram provided in an embodiment of the present application;

[0020] Figure 5 This is a schematic diagram of the system structure for evaluating the degree of interference corrosion of oil and gas pipelines by stray currents, provided in another embodiment of the present application. DETAILED DESCRIPTION

[0021] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0022] Those skilled in the art will understand that, unless expressly stated otherwise, the singular forms "a", "an", "above", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of this application refers to the presence of features, integers, steps, operations, elements, modules, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, modules, components, and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, "connected" or "coupled" as used herein may include wireless connections or wireless couplings. The term "and / or" used herein includes all or any module and all combinations of one or more associated listed items.

[0023] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with their meanings in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0024] like Figure 1 As shown, an embodiment of the present application provides a method for evaluating the degree of interference corrosion of oil and gas pipelines by stray currents, the method comprising:

[0025] S1. Obtaining from a third-party institution information on non-stress external metal loss defects of a target oil and gas pipeline identified by a pipeline magnetic flux leakage detector, the size of the non-stress external metal loss defects, and the location of each non-stress external metal loss defect;

[0026] S2. extracting distribution characteristics of the non-stress external metal loss defects based on the position information and sizes of all the non-stress external metal loss defects;

[0027] S3, obtaining a sequence of historical forward offset values ​​of the pipe-to-ground potential of the target oil and gas pipeline;

[0028] S4. Input the historical pipe-to-ground potential positive offset value sequence, the distribution characteristics of two adjacent detected non-stress external metal loss defects, and the detection time interval into a pre-trained stray current interference corrosion degree evaluation model to obtain the stray current interference corrosion degree of the oil and gas pipeline; wherein, the stray current interference corrosion degree evaluation model for the oil and gas pipeline is based on the distribution characteristics of non-stress external metal loss defects, the detection time interval, and the historical pipe-to-ground potential positive offset value sequence as input, and the stray current interference corrosion degree of the target oil and gas pipeline is obtained through training as output.

[0029] In the embodiments of the present application, it should be understood that internal magnetic leakage detection does not require high cleanliness of the pipeline, and has high detection efficiency. The technology is relatively mature and can detect pipelines such as natural gas, crude oil, and refined oil. It is currently a relatively effective pipeline detection technology. Pipeline magnetic leakage detection technology relies on the thrust of the conveying medium inside the pipeline to push the pipeline magnetic leakage detector along the pipeline, thereby achieving non-stop transmission detection. The data collected by the magnetic leakage detector contains the magnetic leakage signal generated by the defect. The type and size of the defect can be identified based on the magnetic leakage signal generated by the defect. The defect size includes the depth, width and length of the defect. After obtaining the defect width and defect length, the defect area can be calculated. Since stray currents will corrode the appearance of the pipeline and the corrosion of the pipeline appearance by stray currents is usually local corrosion, while natural corrosion is uniform corrosion, the present invention selects the distribution characteristics of non-stress external metal loss defects as the input parameters of the model. The distribution characteristics of non-stress external metal loss defects refer to the distribution of non-stress metal loss defects in the target pipeline. Typical magnetic leakage signals of non-stress external metal loss are as follows: Figure 2-4As shown, in the reverse magnetic loop, the radial signal of non-stress external metal loss is a sinusoidal curve, the axial signal is convex, and the ID / OD (inner / outer wall) signal is a nearly straight line with a small concave shape. Therefore, by extracting the waveform characteristics of the leakage magnetic flux signal, non-stress metal loss can be identified. The pipeline magnetic flux leakage detector includes a drive system, a magnetization system, a sensing system, a data acquisition and storage system, a power supply system, a mileage system, a circumferential positioning measurement system, a speed control system, and a vibration and shock suspension system. The mileage system and circumferential positioning measurement system can locate the position of the defect, including the axial position of the defect and the circumferential angle of the defect (cylindrical coordinate system). The non-stress external metal loss defects of the target oil and gas pipeline identified by the pipeline magnetic flux leakage detector, the size of the non-stress external metal loss defects, and the location information of each non-stress external metal loss defect can be obtained through an API interface provided by a third-party organization. The historical pipeline ground potential positive offset value sequence refers to the pipeline ground potential positive offset value from time t1 to t2. The pipeline ground potential positive offset value refers to the offset of the pipeline potential relative to the ground. Time t1 refers to the time when the current pipeline magnetic flux leakage detector detects the target pipeline, and time t2 refers to the time when the target pipeline was last detected by the magnetic flux leakage detector. For example, t1 is March 1, 2022, and t2 is February 1, 2022. The detection interval refers to the time interval between two consecutive detections.

[0030] In an embodiment of the present application, pipeline magnetic flux leakage detection technology relies on the thrust of the medium transported within the pipeline to propel the pipeline magnetic flux leakage detector along the pipeline, thereby achieving non-stop detection. The pipeline magnetic flux leakage detector can be used to determine the actual corrosion status of the pipeline. The present invention utilizes the location information, defect size information, detection interval, and historical pipeline-to-ground potential positive offset value sequence of non-stress external metal loss defects collected by the pipeline magnetic flux leakage detector to assess the extent of stray current interference corrosion on oil and gas pipelines. Compared to manual visual inspection, this method eliminates the need for pipeline excavation and is more convenient. Furthermore, stray currents affect the distribution characteristics of metal defect loss, and the pipeline-to-ground potential positive offset value can reflect the real-time extent of stray current interference. Therefore, a neural network model is trained based on the defect distribution characteristics, detection interval, and historical pipeline-to-ground potential positive offset value sequence of two adjacent detections as input, and the extent of stray current interference corrosion on the target oil and gas pipeline as output. The neural network model learns the relationship between the distribution characteristics, detection interval, and historical pipeline-to-ground potential positive offset value sequence of two adjacent detections and the extent of interference corrosion on the target oil and gas pipeline. Compared to single characteristic parameters, the resulting assessment of the extent of interference corrosion on the target oil and gas pipeline is more accurate.

[0031] In one embodiment, the distribution characteristics of the non-stress external metal loss defects include the number of non-stress external metal loss defect clusters, the total number of defects in all non-stress metal loss defect clusters, the average defect depth, and the maximum defect area; and the step of extracting the distribution characteristics of the non-stress external metal loss defects based on the position information of all the non-stress external metal loss defects and the sizes of the non-stress external metal loss defects includes:

[0032] Mapping the position information of each non-stress external metal loss defect to a two-dimensional pipeline plane to obtain the position information of each non-stress external metal loss defect on the two-dimensional pipeline plane;

[0033] Based on the position information of all the non-stress external metal loss defects on the two-dimensional pipeline plane, a preset neighborhood radius, and a preset minimum number of points, clustering is performed using the DBSCAN algorithm to obtain a clustering result of the non-stress external metal loss defects; wherein the preset neighborhood radius is set according to the distribution characteristics of pipeline corrosion caused by stray current;

[0034] Counting the number of non-stress external metal loss defect clusters and the total number of defects in all non-stress metal loss defect clusters based on the clustering result of the non-stress external metal loss defect;

[0035] The average defect depth and the maximum defect area are calculated based on the non-stress external metal loss defect clusters and the sizes of the non-stress external metal loss defects.

[0036] In an embodiment of the present application, in order to extract the distribution characteristics of non-stress external metal loss defects based on the DBSCAN algorithm, the coordinate position of the non-stress external metal loss defects in the cylindrical coordinate system is mapped to the two-dimensional pipeline plane, and then clustering is performed based on the position information of all the non-stress external metal loss defects in the two-dimensional pipeline plane, a preset neighborhood radius and a preset minimum number of points through the DBSCAN algorithm to obtain the clustering result of the non-stress external metal loss defects. Here, the neighborhood radius is set according to the distribution characteristics of pipeline corrosion caused by stray current. It should be understood that stray current corrosion is local corrosion, while natural corrosion is uniform corrosion. The DBSCAN clustering method is: (1) First, select an unvisited data point from the data set as the starting point. (2) Check whether the neighborhood radius of the point contains at least MinPts (minimum number of points) data points. If so, mark the point as a core point, and add all points within its neighborhood radius to the current cluster. (3) For each core point in the current cluster, continue to check the points within its neighborhood radius. If any unvisited points are found, they are added to the current cluster and the newly added points are checked to see if they are core points. If they are core points, the above steps are repeated to continuously expand the cluster. (4) When a cluster is expanded, that is, all the core points related to the cluster and the points in its neighborhood are added to the cluster, the algorithm selects another unvisited data point, repeats the above steps, and starts a new clustering process. (5) When a cluster is expanded, that is, all the core points related to the cluster and the points in its neighborhood are added to the cluster, the algorithm selects another unvisited data point, repeats the above steps (1)-(5), and starts a new clustering process. Through DBSCAN clustering, stray current corrosion can be clustered, so that the extracted distribution features can better reflect the impact of stray current on the degree of pipeline interference corrosion. The total number of defects in all the above non-stress metal loss defect clusters is the sum of the number of defects in all non-stress metal loss defect clusters. The average defect depth and maximum defect area are calculated based on the size of the non-stress external metal loss defect clusters and the non-stress external metal loss defects. Specifically, the average defect depth is calculated using the depths of all defects in the external metal loss defect clusters. The maximum defect area is obtained by comparing the defect areas of all defects in the external metal loss defect clusters.

[0037] In one embodiment, the stray current interference corrosion degree evaluation model for oil and gas pipelines is based on the distribution characteristics of non-stress external metal loss defects, detection time intervals, and a historical pipeline-to-ground potential positive offset value sequence as inputs, and the stray current interference corrosion degree of the target oil and gas pipeline is trained as an output, including the following steps:

[0038] Acquire training data; each set of training data includes the distribution characteristics of two adjacent non-stress external metal loss defects, the detection time interval, the historical pipeline-to-ground potential positive offset value sequence, and the label of the degree of corrosion caused by stray current interference on the target oil and gas pipeline;

[0039] Converting the interference corrosion degree label into a hot encoding;

[0040] Inputting the distribution characteristics of two adjacent non-stress external metal loss defects, the detection time interval, and the historical pipeline-to-ground potential forward offset value sequence in the training data into a preset neural network model, performing forward propagation calculations through each layer of the preset neural network model, and finally obtaining the predicted probability distribution of the degree of interference corrosion of the oil and gas pipeline caused by the stray current at the output layer of the preset neural network model;

[0041] Substituting the predicted probability distribution of the degree of interference corrosion of the oil and gas pipeline caused by the stray current and the thermal encoding into a preset loss function to calculate the loss value, and calculating the gradient of the loss function with respect to the parameters of each layer of the model through back propagation based on the loss value;

[0042] Based on the calculated gradient, the model parameters are updated using an optimization algorithm so that the loss function is gradually reduced;

[0043] Return to the step of inputting the distribution characteristics of two adjacent non-stress external metal loss defects, the detection time interval and the historical pipe-to-ground potential forward offset value sequence in the training data into the preset neural network model to perform multiple iterative training on all samples in the training data until the loss function converges or reaches a preset number of training rounds.

[0044] In the embodiment of the present application, a model for evaluating the degree of corrosion caused by stray current on oil and gas pipelines is obtained through the above training. The degree of corrosion caused by stray current on target oil and gas pipelines includes multiple levels, which are set according to actual conditions. For example, there are three levels: weak, medium, and strong. The optimization algorithm can use stochastic gradient descent SGD (Stochastic Gradient Descent), Adagrad (Adaptive Gradient), etc. For multi-classification problems, the present invention adopts the cross entropy loss function, that is, the preset loss function L is:

[0045]

[0046] Among them, N is the number of samples, K is the number of categories, and y i,k For the true category distribution, use hot encoding, is the predicted probability that the i-th sample belongs to the k-th category.

[0047] In one embodiment, the stray current interference corrosion degree evaluation model for oil and gas pipelines includes a dual-channel data input module, a dual-channel feature extraction module, and an interference corrosion degree prediction module;

[0048] The dual-channel data input module includes a pipe-to-ground potential time series data input channel and a defect detection data input channel. The pipe-to-ground potential time series data input channel is used to receive the historical pipe-to-ground potential positive offset value sequence; the defect detection data input channel is used to receive the distribution characteristics of two adjacent non-stress external metal loss defects detected. The distribution characteristics of the non-stress external metal loss defects include the number of non-stress external metal loss defect clusters, the total number of defects in all non-stress metal loss defect clusters, the average defect depth, and the maximum defect area.

[0049] A dual-channel feature extraction module, comprising a time-series potential feature extraction channel and a defect dynamic feature extraction channel. The time-series potential feature extraction channel is used to extract the time-series potential features of the historical tube-to-ground potential forward offset value sequence through one-dimensional convolution and a Transformer encoder; the defect dynamic feature extraction channel is used to calculate the rate of change of the number of defect clusters based on the number of non-stress external metal loss defect clusters detected in two adjacent times and the detection time interval; calculate the rate of change of the total number of defects based on the total number of defects of all non-stress metal loss defect clusters detected in two adjacent times and the detection time interval; calculate the rate of change of the average defect depth based on the average defect depth and the detection time interval between two adjacent times; and calculate the maximum area expansion rate based on the maximum area of ​​the defects detected in two adjacent times;

[0050] The corrosion degree prediction module is used to evaluate the degree of corrosion caused by stray current interference on the target oil and gas pipeline based on the time-series potential characteristics, the change rate of the number of defect clusters, the change rate of the total number of defects, the change rate of the average defect depth, the maximum area expansion rate, the number of non-stress external metal loss defect clusters currently detected, the total number of defects in all non-stress metal loss defect clusters, the average defect depth and the maximum defect area.

[0051] The embodiment of the present application extracts the time series potential characteristics, the rate of change of the number of defect clusters, the rate of change of the total number of defects, the rate of change of the average depth of defects, the maximum area expansion rate, the number of currently detected non-stress external metal loss defect clusters, the total number of defects of all currently detected non-stress metal loss defect clusters, the average depth of the currently detected defects and the maximum area of ​​the currently detected defects to evaluate the degree of corrosion caused by stray currents on the target oil and gas pipelines, while taking into account both static and dynamic characteristics, and making the degree of corrosion caused by stray currents on the target oil and gas pipelines more accurate. It should be understood that the time series potential characteristics are time-correlation characteristics extracted from the historical pipeline ground potential positive offset value sequence, reflecting the dynamic interference law of stray currents, such as local fluctuation characteristics (such as spikes), global trend characteristics, etc. The corrosion degree prediction module includes an input layer, a hidden layer, a fully connected layer and an output layer. The current detection refers to the detection that is later in time between two adjacent detections.

[0052] In one embodiment, the step of mapping the position information of each non-stress external metal loss defect to a two-dimensional pipeline plane to obtain the position information of each non-stress external metal loss defect on the two-dimensional pipeline plane includes:

[0053] Acquire the axial position of the non-stress external metal loss defect and the circumferential angle of the non-stress external metal loss defect from the position information of the non-stress external metal loss defect;

[0054] Obtaining the radius of the target pipeline;

[0055] Calculating the ordinate of the non-stress external metal loss defect on a two-dimensional pipeline plane based on the radius of the target pipeline and the circumferential angle of the non-stress external metal loss defect;

[0056] The abscissa of the non-stress external metal loss defect on the two-dimensional pipeline plane is calculated based on the axial position of the non-stress external metal loss defect.

[0057] In an embodiment of the present application, the ordinate of the non-stress external metal loss defect on a two-dimensional pipeline plane is calculated based on the radius of the target pipeline and the circumferential angle of the non-stress external metal loss defect. Specifically, the ordinate of the non-stress external metal loss defect on the two-dimensional pipeline plane is calculated by multiplying the radius of the target pipeline by the circumferential angle of the non-stress external metal loss defect. The abscissa of the non-stress external metal loss defect on the two-dimensional pipeline plane is calculated by multiplying the axial position of the non-stress external metal loss defect by 1. This embodiment of the present application lays the foundation for quickly and conveniently calculating the distribution characteristics of non-stress external metal loss defects.

[0058] like Figure 5As shown, an embodiment of the present application further provides a system for evaluating the degree of interference corrosion of oil and gas pipelines by stray currents, the system comprising:

[0059] Identification module 1 is used to obtain from a third-party organization the non-stress external metal loss defects of the target oil and gas pipeline identified by the pipeline magnetic flux leakage detector, the size of the non-stress external metal loss defects, and the location information of each non-stress external metal loss defect;

[0060] Extraction module 2, configured to extract distribution characteristics of the non-stress external metal loss defects based on the position information of all the non-stress external metal loss defects and the sizes of the non-stress external metal loss defects;

[0061] An acquisition module 3 is used to acquire a sequence of historical forward offset values ​​of the pipe-to-ground potential of the target oil and gas pipeline;

[0062] Input module 4 is used to input the historical pipe-to-ground potential positive offset value sequence, the distribution characteristics of two adjacent detected non-stress external metal loss defects, and the detection time interval into a pre-trained stray current interference corrosion degree evaluation model for oil and gas pipelines to obtain the stray current interference corrosion degree of oil and gas pipelines; wherein, the stray current interference corrosion degree evaluation model for oil and gas pipelines is based on the distribution characteristics of non-stress external metal loss defects, the detection time interval, and the historical pipe-to-ground potential positive offset value sequence as input, and the stray current interference corrosion degree of the target oil and gas pipeline is obtained through training as output.

[0063] In one embodiment, the distribution characteristics of the non-stress external metal loss defects include the number of non-stress external metal loss defect clusters, the total number of defects in all non-stress metal loss defect clusters, the average defect depth, and the maximum defect area; the extraction module includes:

[0064] A mapping unit, configured to map the position information of each non-stress external metal loss defect to a two-dimensional pipeline plane, to obtain the position information of each non-stress external metal loss defect on the two-dimensional pipeline plane;

[0065] A clustering unit is configured to cluster all the non-stress external metal loss defects using a DBSCAN algorithm based on the location information of the non-stress external metal loss defects on the two-dimensional pipeline plane, a preset neighborhood radius, and a preset minimum number of points, to obtain a clustering result of the non-stress external metal loss defects; wherein the preset neighborhood radius is set according to the distribution characteristics of pipeline corrosion caused by stray current;

[0066] a statistical unit, configured to count the number of non-stress external metal loss defect clusters and the total number of defects in all non-stress metal loss defect clusters based on the clustering result of the non-stress external metal loss defect;

[0067] A calculation unit is used to calculate the average defect depth and the maximum defect area based on the non-stress external metal loss defect clusters and the sizes of the non-stress external metal loss defects.

[0068] In one embodiment, the stray current interference corrosion degree evaluation model for oil and gas pipelines is based on the distribution characteristics of non-stress external metal loss defects, detection time intervals, and a historical pipeline-to-ground potential positive offset value sequence as inputs, and the stray current interference corrosion degree of the target oil and gas pipeline is trained as an output, including the following steps:

[0069] Acquire training data; each set of training data includes the distribution characteristics of two adjacent non-stress external metal loss defects, the detection time interval, the historical pipeline-to-ground potential positive offset value sequence, and the label of the degree of corrosion caused by stray current interference on the target oil and gas pipeline;

[0070] Converting the interference corrosion degree label into a hot encoding;

[0071] Inputting the distribution characteristics of two adjacent non-stress external metal loss defects, the detection time interval, and the historical pipeline-to-ground potential forward offset value sequence in the training data into a preset neural network model, performing forward propagation calculations through each layer of the preset neural network model, and finally obtaining the predicted probability distribution of the degree of interference corrosion of the oil and gas pipeline caused by the stray current at the output layer of the preset neural network model;

[0072] Substituting the predicted probability distribution of the degree of interference corrosion of the oil and gas pipeline caused by the stray current and the thermal encoding into a preset loss function to calculate the loss value, and calculating the gradient of the loss function with respect to the parameters of each layer of the model through back propagation based on the loss value;

[0073] Based on the calculated gradient, the model parameters are updated using an optimization algorithm so that the loss function is gradually reduced;

[0074] Return to the step of inputting the distribution characteristics of two adjacent non-stress external metal loss defects, the detection time interval and the historical pipe-to-ground potential forward offset value sequence in the training data into the preset neural network model to perform multiple iterative training on all samples in the training data until the loss function converges or reaches a preset number of training rounds.

[0075] In one embodiment, the stray current interference corrosion degree evaluation model for oil and gas pipelines includes a dual-channel data input module, a dual-channel feature extraction module, and an interference corrosion degree prediction module;

[0076] The dual-channel data input module includes a pipe-to-ground potential time series data input channel and a defect detection data input channel. The pipe-to-ground potential time series data input channel is used to receive the historical pipe-to-ground potential positive offset value sequence; the defect detection data input channel is used to receive the distribution characteristics of two adjacent non-stress external metal loss defects detected. The distribution characteristics of the non-stress external metal loss defects include the number of non-stress external metal loss defect clusters, the total number of defects in all non-stress metal loss defect clusters, the average defect depth, and the maximum defect area.

[0077] A dual-channel feature extraction module, comprising a time-series potential feature extraction channel and a defect dynamic feature extraction channel. The time-series potential feature extraction channel is used to extract the time-series potential features of the historical tube-to-ground potential forward offset value sequence through a one-dimensional convolutional layer and a Transformer encoder; the defect dynamic feature extraction channel is used to calculate the rate of change in the number of defect clusters based on the number of non-stress external metal loss defect clusters detected in two adjacent times and the detection time interval; calculate the rate of change in the total number of defects based on the total number of defects of all non-stress metal loss defect clusters detected in two adjacent times and the detection time interval; calculate the rate of change in the average depth of defects based on the average depth of defects detected in two adjacent times and the detection time interval; and calculate the maximum area expansion rate based on the maximum area of ​​defects detected in two adjacent times.

[0078] The corrosion degree prediction module is used to evaluate the degree of corrosion caused by stray current interference on the target oil and gas pipeline based on the time-series potential characteristics, the change rate of the number of defect clusters, the change rate of the total number of defects, the change rate of the average defect depth, the maximum area expansion rate, the number of non-stress external metal loss defect clusters currently detected, the total number of defects in all non-stress metal loss defect clusters, the average defect depth and the maximum defect area.

[0079] In one embodiment, the mapping unit includes:

[0080] A first acquiring subunit is configured to acquire an axial position of the non-stress external metal loss defect and a circumferential angle of the non-stress external metal loss defect from the position information of the non-stress external metal loss defect;

[0081] A second acquiring subunit is configured to acquire the radius of the target pipe;

[0082] A first calculation subunit is configured to calculate a vertical coordinate of the non-stress external metal loss defect on a two-dimensional pipeline plane based on a radius of the target pipeline and a circumferential angle of the non-stress external metal loss defect;

[0083] The second calculation subunit is configured to calculate the abscissa of the non-stress external metal loss defect on the two-dimensional pipeline plane based on the axial position of the non-stress external metal loss defect.

[0084] It should be noted that the above embodiments of evaluating the degree of interference corrosion of oil and gas pipelines by stray currents are all applicable to the system for evaluating the degree of interference corrosion of oil and gas pipelines by stray currents in the embodiments of the present invention. Therefore, the present invention will not be described in detail here.

[0085] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, apparatus, article, or method comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, apparatus, article, or method. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, apparatus, article, or method comprising the element.

[0086] The above description is only a preferred embodiment of the present application and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for evaluating the degree of interference corrosion of oil and gas pipelines caused by stray current, characterized in that: The method comprises: Obtaining from a third-party organization information on non-stress external metal loss defects of a target oil and gas pipeline identified by a pipeline magnetic flux leakage detector, the size of the non-stress external metal loss defects, and the location of each non-stress external metal loss defect; Extracting distribution characteristics of the non-stress external metal loss defects based on the position information of all the non-stress external metal loss defects and the sizes of the non-stress external metal loss defects; Obtaining a sequence of historical forward offset values ​​of the pipe-to-ground potential of the target oil and gas pipeline; The historical pipeline-to-ground potential positive offset value sequence, the distribution characteristics of two adjacent detected non-stress external metal loss defects, and the detection time interval are input into a pre-trained stray current interference corrosion degree evaluation model to obtain the stray current interference corrosion degree of the oil and gas pipeline; wherein the stray current interference corrosion degree evaluation model is based on the distribution characteristics of non-stress external metal loss defects, the detection time interval, and the historical pipeline-to-ground potential positive offset value sequence as input, and the stray current interference corrosion degree of the target oil and gas pipeline is trained as output; The stray current interference corrosion degree evaluation model for oil and gas pipelines includes a dual-channel data input module, a dual-channel feature extraction module and an interference corrosion degree prediction module; The dual-channel data input module includes a pipe-to-ground potential time series data input channel and a defect detection data input channel. The pipe-to-ground potential time series data input channel is used to receive the historical pipe-to-ground potential positive offset value sequence; the defect detection data input channel is used to receive the distribution characteristics of two adjacent non-stress external metal loss defects detected. The distribution characteristics of the non-stress external metal loss defects include the number of non-stress external metal loss defect clusters, the total number of defects in all non-stress metal loss defect clusters, the average defect depth, and the maximum defect area. A dual-channel feature extraction module, comprising a time-series potential feature extraction channel and a defect dynamic feature extraction channel. The time-series potential feature extraction channel is used to extract the time-series potential features of the historical tube-to-ground potential forward offset value sequence through a one-dimensional convolutional layer and a Transformer encoder; the defect dynamic feature extraction channel is used to calculate the rate of change in the number of defect clusters based on the number of non-stress external metal loss defect clusters detected in two adjacent times and the detection time interval; calculate the rate of change in the total number of defects based on the total number of defects of all non-stress metal loss defect clusters detected in two adjacent times and the detection time interval; calculate the rate of change in the average depth of defects based on the average depth of defects detected in two adjacent times and the detection time interval; and calculate the maximum area expansion rate based on the maximum area of ​​defects detected in two adjacent times. The corrosion degree prediction module is used to evaluate the degree of corrosion caused by stray current interference on the target oil and gas pipeline based on the time-series potential characteristics, the change rate of the number of defect clusters, the change rate of the total number of defects, the change rate of the average defect depth, the maximum area expansion rate, the number of non-stress external metal loss defect clusters currently detected, the total number of defects in all non-stress metal loss defect clusters, the average defect depth and the maximum defect area.

2. The method for evaluating the degree of interference corrosion of oil and gas pipelines caused by stray current according to claim 1 is characterized in that: The distribution characteristics of the non-stress external metal loss defects include the number of non-stress external metal loss defect clusters, the total number of defects in all non-stress metal loss defect clusters, the average depth of the defects, and the maximum area of ​​the defects; The step of extracting the distribution characteristics of the non-stress external metal loss defects based on the position information of all the non-stress external metal loss defects and the sizes of the non-stress external metal loss defects comprises: Mapping the position information of each non-stress external metal loss defect to a two-dimensional pipeline plane to obtain the position information of each non-stress external metal loss defect on the two-dimensional pipeline plane; Based on the location information of all the non-stress external metal loss defects on the two-dimensional pipeline plane, a preset neighborhood radius, and a preset minimum number of points, clustering is performed using the DBSCAN algorithm to obtain a clustering result of the non-stress external metal loss defects; wherein the preset neighborhood radius is set according to the distribution characteristics of pipeline corrosion caused by stray current; Counting the number of non-stress external metal loss defect clusters and the total number of defects in all non-stress metal loss defect clusters based on the clustering result of the non-stress external metal loss defect; The average defect depth and the maximum defect area are calculated based on the non-stress external metal loss defect clusters and the sizes of the non-stress external metal loss defects.

3. The method for evaluating the degree of interference corrosion of oil and gas pipelines caused by stray current according to claim 1 is characterized in that: The stray current interference corrosion degree evaluation model for oil and gas pipelines is based on the distribution characteristics of non-stress external metal loss defects, detection time intervals, and historical pipeline-to-ground potential positive offset value sequences as inputs, and the stray current interference corrosion degree of the target oil and gas pipeline is obtained as output through training steps including: Acquire training data; each set of training data includes the distribution characteristics of two adjacent non-stress external metal loss defects, the detection time interval, the historical pipeline-to-ground potential positive offset value sequence, and the label of the degree of corrosion caused by stray current interference on the target oil and gas pipeline; Converting the interference corrosion degree label into a hot encoding; Inputting the distribution characteristics of two adjacent non-stress external metal loss defects, the detection time interval, and the historical pipeline-to-ground potential forward offset value sequence in the training data into a preset neural network model, performing forward propagation calculations through each layer of the preset neural network model, and finally obtaining the predicted probability distribution of the degree of interference corrosion of the oil and gas pipeline caused by the stray current at the output layer of the preset neural network model; Substituting the predicted probability distribution of the degree of interference corrosion of the oil and gas pipeline caused by the stray current and the thermal encoding into a preset loss function to calculate the loss value, and calculating the gradient of the loss function with respect to the parameters of each layer of the model through back propagation based on the loss value; Based on the calculated gradient, the model parameters are updated using an optimization algorithm so that the loss function is gradually reduced; Return to the step of inputting the distribution characteristics of two adjacent non-stress external metal loss defects, the detection time interval and the historical pipe-to-ground potential forward offset value sequence in the training data into the preset neural network model to perform multiple iterative training on all samples in the training data until the loss function converges or reaches a preset number of training rounds.

4. The method for evaluating the degree of interference corrosion of oil and gas pipelines caused by stray current according to claim 2 is characterized in that: The step of mapping the position information of each non-stress external metal loss defect to a two-dimensional pipeline plane to obtain the position information of each non-stress external metal loss defect on the two-dimensional pipeline plane includes: Acquire the axial position of the non-stress external metal loss defect and the circumferential angle of the non-stress external metal loss defect from the position information of the non-stress external metal loss defect; Obtaining the radius of the target oil and gas pipeline; Calculating the ordinate of the non-stress external metal loss defect on a two-dimensional pipeline plane based on the radius of the target oil and gas pipeline and the circumferential angle of the non-stress external metal loss defect; The abscissa of the non-stress external metal loss defect on the two-dimensional pipeline plane is calculated based on the axial position of the non-stress external metal loss defect.

5. A system for evaluating the degree of interference corrosion of oil and gas pipelines caused by stray current, characterized in that: The system comprises: An identification module is used to obtain from a third-party organization the non-stress external metal loss defects of the target oil and gas pipeline identified by the pipeline magnetic flux leakage detector, the size of the non-stress external metal loss defects, and the location information of each of the non-stress external metal loss defects; an extraction module, configured to extract distribution characteristics of the non-stress external metal loss defects based on position information of all the non-stress external metal loss defects and sizes of the non-stress external metal loss defects; An acquisition module is used to acquire a sequence of historical forward offset values ​​of the pipe-to-ground potential of the target oil and gas pipeline; An input module is configured to input the historical pipeline-to-ground potential positive offset value sequence, the distribution characteristics of two adjacent detected non-stress external metal loss defects, and the detection time interval into a pre-trained stray current interference corrosion degree evaluation model for oil and gas pipelines, thereby obtaining the stray current interference corrosion degree of the oil and gas pipelines; wherein the stray current interference corrosion degree evaluation model for oil and gas pipelines is trained based on the distribution characteristics of non-stress external metal loss defects, the detection time interval, and the historical pipeline-to-ground potential positive offset value sequence as input, and the stray current interference corrosion degree of the target oil and gas pipeline as output; The stray current interference corrosion degree evaluation model for oil and gas pipelines includes a dual-channel data input module, a dual-channel feature extraction module and an interference corrosion degree prediction module; The dual-channel data input module includes a pipe-to-ground potential time series data input channel and a defect detection data input channel. The pipe-to-ground potential time series data input channel is used to receive the historical pipe-to-ground potential positive offset value sequence; the defect detection data input channel is used to receive the distribution characteristics of two adjacent non-stress external metal loss defects detected. The distribution characteristics of the non-stress external metal loss defects include the number of non-stress external metal loss defect clusters, the total number of defects in all non-stress metal loss defect clusters, the average defect depth, and the maximum defect area. A dual-channel feature extraction module, comprising a time-series potential feature extraction channel and a defect dynamic feature extraction channel. The time-series potential feature extraction channel is used to extract the time-series potential features of the historical tube-to-ground potential forward offset value sequence through a one-dimensional convolutional layer and a Transformer encoder; the defect dynamic feature extraction channel is used to calculate the rate of change in the number of defect clusters based on the number of non-stress external metal loss defect clusters detected in two adjacent times and the detection time interval; calculate the rate of change in the total number of defects based on the total number of defects of all non-stress metal loss defect clusters detected in two adjacent times and the detection time interval; calculate the rate of change in the average depth of defects based on the average depth of defects detected in two adjacent times and the detection time interval; and calculate the maximum area expansion rate based on the maximum area of ​​defects detected in two adjacent times. The corrosion degree prediction module is used to evaluate the degree of corrosion caused by stray current interference on the target oil and gas pipeline based on the time-series potential characteristics, the change rate of the number of defect clusters, the change rate of the total number of defects, the change rate of the average defect depth, the maximum area expansion rate, the number of non-stress external metal loss defect clusters currently detected, the total number of defects in all non-stress metal loss defect clusters, the average defect depth and the maximum defect area.

6. The system for evaluating the degree of interference corrosion of oil and gas pipelines caused by stray current according to claim 5, characterized in that: The distribution characteristics of the non-stress external metal loss defects include the number of non-stress external metal loss defect clusters, the total number of defects in all non-stress metal loss defect clusters, the average depth of the defects, and the maximum area of ​​the defects; The extraction module includes: A mapping unit, configured to map the position information of each non-stress external metal loss defect to a two-dimensional pipeline plane, to obtain the position information of each non-stress external metal loss defect on the two-dimensional pipeline plane; a clustering unit configured to cluster all the non-stress external metal loss defects using a DBSCAN algorithm based on the location information of the non-stress external metal loss defects on the two-dimensional pipeline plane, a preset neighborhood radius, and a preset minimum number of points, to obtain a clustering result of the non-stress external metal loss defects; wherein the preset neighborhood radius is set according to the distribution characteristics of pipeline corrosion caused by stray current; a statistical unit, configured to count the number of non-stress external metal loss defect clusters and the total number of defects in all non-stress metal loss defect clusters based on the clustering result of the non-stress external metal loss defect; A calculation unit is used to calculate the average defect depth and the maximum defect area based on the non-stress external metal loss defect clusters and the sizes of the non-stress external metal loss defects.

7. The system for evaluating the degree of interference corrosion of oil and gas pipelines caused by stray current according to claim 5, characterized in that: The stray current interference corrosion degree evaluation model for oil and gas pipelines is based on the distribution characteristics of non-stress external metal loss defects, detection time intervals, and historical pipeline-to-ground potential positive offset value sequences as inputs, and the stray current interference corrosion degree of the target oil and gas pipeline is obtained as output through training steps including: Acquire training data; each set of training data includes the distribution characteristics of two adjacent non-stress external metal loss defects, the detection time interval, the historical pipeline-to-ground potential positive offset value sequence, and the label of the degree of corrosion caused by stray current interference on the target oil and gas pipeline; Converting the interference corrosion degree label into a hot encoding; Inputting the distribution characteristics of two adjacent non-stress external metal loss defects, the detection time interval, and the historical pipeline-to-ground potential forward offset value sequence in the training data into a preset neural network model, performing forward propagation calculations through each layer of the preset neural network model, and finally obtaining the predicted probability distribution of the degree of interference corrosion of the oil and gas pipeline caused by the stray current at the output layer of the preset neural network model; Substituting the predicted probability distribution of the degree of interference corrosion of the oil and gas pipeline caused by the stray current and the thermal encoding into a preset loss function to calculate the loss value, and calculating the gradient of the loss function with respect to the parameters of each layer of the model through back propagation based on the loss value; Based on the calculated gradient, the model parameters are updated using an optimization algorithm so that the loss function is gradually reduced; Return to the step of inputting the distribution characteristics of two adjacent non-stress external metal loss defects, the detection time interval and the historical pipe-to-ground potential forward offset value sequence in the training data into the preset neural network model to perform multiple iterative training on all samples in the training data until the loss function converges or reaches a preset number of training rounds.

8. The system for evaluating the degree of interference corrosion of oil and gas pipelines caused by stray current according to claim 6, characterized in that: The mapping unit includes: A first acquiring subunit is configured to acquire an axial position of the non-stress external metal loss defect and a circumferential angle of the non-stress external metal loss defect from the position information of the non-stress external metal loss defect; A second acquisition subunit is used to acquire the radius of the target oil and gas pipeline; A first calculation subunit is configured to calculate the vertical coordinate of the non-stress external metal loss defect on a two-dimensional pipeline plane based on the radius of the target oil and gas pipeline and the circumferential angle of the non-stress external metal loss defect; The second calculation subunit is configured to calculate the abscissa of the non-stress external metal loss defect on the two-dimensional pipeline plane based on the axial position of the non-stress external metal loss defect.

Citation Information

Patent Citations

  • Oil and gas pipeline multi-type defect quantitative evaluation method based on magnetic flux leakage signal

    CN118392980A

  • Method of estimating depth of defect

    JP2003043015A