Method and system for evaluating interference corrosion degree of stray current on oil and gas pipeline
The non-stressed external metal loss defect information and historical pipe ground potential data are obtained through the pipeline leakage detector, and the neural network model is used to evaluate the degree of corrosion of stray currents on oil and gas pipelines, solving the shortcomings of traditional methods and achieving more accurate and convenient corrosion assessment.
Patent Information
- Application Number
- CN202510385073.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-03-28
AI Technical Summary
The prior art cannot accurately and conveniently evaluate the corrosion impact of stray currents on oil and gas pipelines, and traditional methods require excavation of pipelines or cannot reflect the degree of long-term corrosion.
The pipe leakage detector is used to obtain the position and dimension information of non-stressed external metal loss defects, and combine the historical tube ground potential forward offset value sequence and detection time interval to evaluate the degree of corrosion of stray current on oil and gas pipelines through neural network models.
It provides a more accurate evaluation method without excavation of pipelines, which can better reflect the corrosion impact of stray currents on oil and gas pipelines, and improves the accuracy and convenience of evaluation.
Smart Images

Figure CN120334342A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular, to a method and system for evaluating the interference corrosion degree of stray current on oil and gas pipelines. Background Art
[0002] Traditional DC stray current interference discrimination methods include appearance discrimination methods and electrical discrimination methods. The appearance discrimination method requires excavating the oil and gas pipeline and visually discriminating by hand. The electrical discrimination method judges according to the positive offset value of the pipe-to-soil potential. However, the positive offset value of the pipe-to-soil potential reflects the real-time interference degree, but corrosion is a long-term cumulative process. Even if the potential offset is very high, if the duration is short, the corrosion degree is limited. And long-term low potential may instead cause significant damage. The electrical discrimination method cannot accurately reflect the actual corrosion effect of stray current on oil and gas pipelines. The manual visual discrimination method requires excavating the pipeline, which is inconvenient to operate, and it is easy to damage the pipeline when excavating the pipeline. Therefore, how to provide a more accurate and convenient method to evaluate the interference corrosion degree of stray current on oil and gas pipelines is a technical problem that needs to be solved urgently at present. Summary of the Invention
[0003] Aiming at the above technical problems, the purpose of this application is to provide a method and system for evaluating the interference corrosion degree of stray current on oil and gas pipelines, aiming to provide a more accurate and convenient method to evaluate the interference corrosion degree of stray current on oil and gas pipelines.
[0004] In a first aspect, an embodiment of this application provides a method for evaluating the interference corrosion degree of stray current on an oil and gas pipeline, and the method includes:
[0005] Obtain the non-stress external metal loss defects of the target oil and gas pipeline identified by a pipeline magnetic flux leakage detector from a third-party agency, the sizes of the non-stress external metal loss defects, and the position information of each non-stress external metal loss defect;
[0006] Extract the 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;
[0007] Obtain the historical pipe-to-soil potential positive offset value sequence of the target oil and gas pipeline;
[0008] Input the historical pipeline-to-soil potential positive offset value sequence, the distribution characteristics of non-stress external metal loss defects detected twice adjacent to each other, and the detection time interval into a pre-trained evaluation model for the degree of stray current interference corrosion on oil and gas pipelines, so as to obtain the degree of stray current interference corrosion on oil and gas pipelines; wherein, the evaluation model for the degree of stray current interference corrosion on oil and gas pipelines is trained with the distribution characteristics of non-stress external metal loss defects, the detection time interval, and the historical pipeline-to-soil potential positive offset value sequence as inputs, and the degree of stray current interference corrosion on the target oil and gas pipeline as the output.
[0009] In a second aspect, an embodiment of the present application provides a system for evaluating the degree of stray current interference corrosion on oil and gas pipelines, and the system includes:
[0010] An identification module, configured to obtain non-stress external metal loss defects of a target oil and gas pipeline identified by a pipeline magnetic flux leakage detector from a third-party agency, the sizes of the non-stress external metal loss defects, and the position information of each of the non-stress external metal loss defects;
[0011] An extraction module, configured to extract the 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;
[0012] An acquisition module, configured to acquire the historical pipeline-to-soil potential positive offset value sequence of the target oil and gas pipeline;
[0013] An input module, configured to input the historical pipeline-to-soil potential positive offset value sequence, the distribution characteristics of non-stress external metal loss defects detected twice adjacent to each other, and the detection time interval into a pre-trained evaluation model for the degree of stray current interference corrosion on oil and gas pipelines, so as to obtain the degree of stray current interference corrosion on oil and gas pipelines; wherein, the evaluation model for the degree of stray current interference corrosion on oil and gas pipelines is trained with the distribution characteristics of non-stress external metal loss defects, the detection time interval, and the historical pipeline-to-soil potential positive offset value sequence as inputs, and the degree of stray current interference corrosion on the target oil and gas pipeline as the output.
[0014] In the embodiments of the present application, the magnetic flux leakage detection technology for pipelines relies on the thrust of the medium conveyed inside the pipeline to push the magnetic flux leakage detector for pipelines to travel along the pipeline, thereby realizing non-stop detection. The actual corrosion condition of the pipeline can be obtained through the pipeline magnetic flux leakage detector. The present invention evaluates the interference corrosion degree of stray current on oil and gas pipelines by using the position information, defect size information, detection time interval of non-stress external metal loss defects collected by the pipeline magnetic flux leakage detector and the historical series of positive offset values of the pipe-to-soil potential. Compared with the manual visual inspection method, it is more convenient without the need to excavate the pipeline. In addition, stray current will affect the distribution characteristics of metal defect losses, and the positive offset value of the pipe-to-soil potential can reflect the real-time interference degree of stray current. Therefore, based on the defect distribution characteristics, detection time interval and historical series of positive offset values of the pipe-to-soil potential between two adjacent times as inputs, and the interference corrosion degree of stray current on the target oil and gas pipeline as the output, a neural network model is trained. The neural network model can learn the relationship between the distribution characteristics, detection time interval and historical series of positive offset values of the pipe-to-soil potential detected between two adjacent times and the interference corrosion degree of the target oil and gas pipeline. Compared with a single characteristic parameter, the evaluated interference corrosion degree of the target oil and gas pipeline is more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0016] Figure 1 is a schematic flow chart of the method for evaluating the interference corrosion degree of stray current on oil and gas pipelines provided by the embodiments of the present application;
[0017] Figure 2 is a schematic radial signal diagram of non-stress external metal loss provided by the embodiments of the present application;
[0018] Figure 3 is a schematic axial signal diagram of non-stress external metal loss provided by the embodiments of the present application;
[0019] Figure 4 is an ID / OD signal diagram provided by the embodiments of the present application;
[0020] Figure 5 is a schematic structural diagram of the system for evaluating the interference corrosion degree of stray current on oil and gas pipelines provided by another embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0021] In order to make the objectives, technical solutions and advantages of the present application more clear and understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0022] Those skilled in the art of the present technology can understand that unless specifically stated, the singular forms "a", "an", "the above" and "the" used herein may also include the plural forms. It should be further understood that the term "including" used in the specification of the present application means 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 their groups. It should be understood that when we say that an element is "connected" or "coupled" to another element, it can be directly connected or coupled to other elements, or there may also be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The phrase "and / or" used herein includes all or any module and all combinations of one or more related listed items.
[0023] Those skilled in the art of the present technology can understand that unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as the general understanding of those of ordinary skill in the art to which the present application belongs. It should also be understood that terms such as those defined in a general dictionary should be understood to have a meaning consistent with the meaning in the context of the prior art, and will not be interpreted with an idealized or overly formal meaning unless specifically defined as here.
[0024] As Figure 1 shown, an embodiment of the present application provides a method for evaluating the interference corrosion degree of stray current on an oil and gas pipeline, and the method includes:
[0025] S1. Obtain the non-stress external metal loss defects of the target oil and gas pipeline identified by a pipeline magnetic flux leakage detector, the sizes of the non-stress external metal loss defects, and the position information of each of the non-stress external metal loss defects from a third-party institution;
[0026] S2. Extract the 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. Obtain the historical positive offset value sequence of the pipeline-to-soil potential of the target oil and gas pipeline;
[0028] S4. Input the historical pipeline-to-soil potential positive offset value sequence, the distribution characteristics of non-stress external metal loss defects detected twice adjacent to each other, and the detection time interval into a pre-trained evaluation model for the degree of stray current interference corrosion on oil and gas pipelines to obtain the degree of stray current interference corrosion on oil and gas pipelines. Among them, the evaluation model for the degree of stray current interference corrosion on oil and gas pipelines is trained with the distribution characteristics of non-stress external metal loss defects, the detection time interval, and the historical pipeline-to-soil potential positive offset value sequence as inputs and the degree of stray current interference corrosion on the target oil and gas pipeline as the output.
[0029] In the embodiments of the present application, it should be understood that magnetic flux leakage in-line inspection has low requirements for pipeline cleanliness, high detection efficiency, and relatively mature technology. It can detect pipelines such as natural gas, crude oil, and refined oil pipelines, and is currently a relatively effective pipeline detection technology. The magnetic flux leakage detection technology for pipelines relies on the thrust of the medium transported inside the pipeline to push the magnetic flux leakage detector for pipelines to travel along the pipeline, thereby achieving in-line inspection without shutting down the pipeline. The data collected by the magnetic flux leakage detector contains the magnetic flux leakage signals generated by defects, and the type and size of the defects can be identified based on the magnetic flux leakage signals generated by the defects. The defect size includes the defect depth, width, and length, and the defect area can be calculated after obtaining the defect width and defect length. Since stray current will corrode the pipeline appearance and the stray current corrosion on the pipeline appearance 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 flux leakage signals of non-stress external metal loss are as Figures 2 - 4As shown, in the inverse magnetic circuit, the radial signal of non-stress external metal loss is a sine curve, the axial signal is convex, and the ID / OD (inner / outer wall) signal is nearly linear with a small inner concavity. Therefore, non-stress metal loss can be identified by extracting the waveform characteristics of the magnetic flux leakage signal. 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, an odometer system, a circumferential positioning measurement system, a speed control system, and a vibration and shock suspension system. The position of the defect, including the axial position of the defect and the circumferential angle of the defect (cylindrical coordinate system), can be located through the odometer system and the circumferential positioning measurement system. The non-stress external metal loss defects of the target oil and gas pipeline identified by the above pipeline magnetic flux leakage detector, the sizes of the non-stress external metal loss defects, and the position information of each non-stress external metal loss defect can be obtained through the API interface provided by a third-party agency. The historical sequence of positive offset values of the pipe-to-soil potential refers to the positive offset values of the pipe-to-soil potential from time t1 to time t2, and the positive offset value of the pipe-to-soil potential 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 previously detected by the magnetic flux leakage detector. For example, t1 is March 1, 2022, and t2 is February 1, 2022. The detection time interval refers to the time interval between two adjacent detections.
[0030] In the embodiment of the present application, the pipeline magnetic flux leakage detection technology relies on the thrust of the medium transported inside the pipeline to push the pipeline magnetic flux leakage detector to move along the pipeline, so as to achieve non-stop detection. The actual corrosion condition of the pipeline can be obtained through the pipeline magnetic flux leakage detector. The present invention evaluates the degree of interference corrosion of stray current on oil and gas pipelines by using the position information, defect size information, detection time interval, and historical sequence of positive offset values of the pipe-to-soil potential collected by the pipeline magnetic flux leakage detector. Compared with the manual visual inspection method, it is more convenient without excavating the pipeline. In addition, stray current will affect the distribution characteristics of metal defect loss, and the positive offset value of the pipe-to-soil potential can reflect the real-time interference degree of stray current. Therefore, based on the distribution characteristics of defects, detection time interval, and historical sequence of positive offset values of the pipe-to-soil potential between two adjacent times as inputs, and the degree of interference corrosion of stray current on the target oil and gas pipeline as the output, a neural network model is trained. The neural network model can learn the relationship between the distribution characteristics, detection time interval, and historical sequence of positive offset values of the pipe-to-soil potential detected between two adjacent times and the degree of interference corrosion of the target oil and gas pipeline. Compared with a single characteristic parameter, the evaluated degree of interference corrosion of 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; the steps 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 include:
[0032] Respectively map the position information of each non-stress external metal loss defect to the two-dimensional pipeline plane to obtain the position information of each non-stress external metal loss defect in the two-dimensional pipeline plane;
[0033] 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, perform clustering through the DBSCAN algorithm to obtain the clustering result of the non-stress external metal loss defects; wherein, the preset neighborhood radius is set according to the distribution characteristics of the stray current on the pipeline corrosion;
[0034] Based on the clustering result of the non-stress external metal loss defects, 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;
[0035] Based on the non-stress external metal loss defect clusters and the sizes of the non-stress external metal loss defects, calculate the average defect depth and the maximum defect area.
[0036] In the embodiments of the present application, in order to realize the extraction of the distribution characteristics of non-stress external metal loss defects based on the DBSCAN algorithm, the coordinate positions of non-stress external metal loss defects in the cylindrical coordinate system are mapped to the two-dimensional pipeline plane, and then, based on the position information of all the non-stress external metal loss defects in the two-dimensional pipeline plane, the preset neighborhood radius, and the preset minimum number of points, clustering is performed through the DBSCAN algorithm to obtain the clustering result of non-stress external metal loss defects. Here, the neighborhood radius is set according to the distribution characteristics of stray current on pipeline corrosion. It should be understood that stray current corrosion is local corrosion, while natural corrosion is uniform corrosion. The DBSCAN clustering method is as follows: (1) First, randomly select an unvisited data point from the dataset as the starting point. (2) Check whether there are at least MinPts (the minimum number of points) data points within the neighborhood radius of this point. If so, mark this point as a core point and add all the 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 an unvisited point is found, add it to the current cluster and check whether these newly added points are core points. If they are core points, repeat the above steps to continuously expand the cluster. (4) After a cluster expansion is completed, that is, all the core points related to this cluster and the points within their neighborhoods are added to the cluster, the algorithm will select another unvisited data point and repeat the above steps to start a new clustering process. (5) After a cluster expansion is completed, that is, all the core points related to this cluster and the points within their neighborhoods are added to the cluster, the algorithm will select another unvisited data point and repeat steps (1)-(5) above to start a new clustering process. Through DBSCAN clustering, the stray current corrosion can be clustered, so that the extracted distribution characteristics can better reflect the influence of stray current on the interference corrosion degree of the pipeline. The total number of defects in all the non-stress metal loss defect clusters is the sum of the defect numbers in all the non-stress metal loss defect clusters. 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. Specifically, the average defect depth is calculated using all the defect depths of the external metal loss defect clusters. The areas of all the defects in the external metal loss defect clusters are compared to obtain the maximum defect area.
[0037] In one embodiment, the steps for training the evaluation model for the interference corrosion degree of stray current on oil and gas pipelines, with the distribution characteristics of non-stress external metal loss defects, the detection time interval, and the historical sequence of positive offsets of the pipeline-ground potential as inputs and the interference corrosion degree of stray current on the target oil and gas pipeline as the output, include:
[0038] Obtain training data; each set of training data includes the distribution characteristics of non-stress external metal loss defects in two adjacent times, the detection time interval, the historical series of positive offsets of the pipe-to-soil potential, and the label of the degree of interference corrosion of stray current on the target oil and gas pipeline;
[0039] Convert the interference corrosion degree label into a one-hot encoding;
[0040] Input the distribution characteristics of non-stress external metal loss defects in two adjacent times, the detection time interval, and the historical series of positive offsets of the pipe-to-soil potential in the training data into a preset neural network model, perform forward propagation calculations through each layer of the preset neural network model, and finally obtain the probability distribution of the interference corrosion degree of stray current on the oil and gas pipeline at the output layer of the preset neural network model;
[0041] Substitute the probability distribution of the interference corrosion degree of stray current on the oil and gas pipeline and the one-hot encoding into a preset loss function to calculate the loss value, and according to the loss value, calculate the gradients of the loss function with respect to the parameters of each layer of the model through backpropagation;
[0042] Update the model parameters using an optimization algorithm according to the calculated gradients to gradually reduce the loss function;
[0043] Return to the step of inputting the distribution characteristics of non-stress external metal loss defects in two adjacent times, the detection time interval, and the historical series of positive offsets of the pipe-to-soil potential in the training data into the preset neural network model to perform multiple iterative trainings on all samples in the training data until the loss function converges or reaches the preset number of training epochs.
[0044] In the embodiments of the present application, an evaluation model for the interference corrosion degree of stray current on the oil and gas pipeline is obtained through the above training. The interference corrosion degree of stray current on the target oil and gas pipeline includes multiple levels, which are set according to the actual situation. Exemplarily, it includes three levels: weak, medium, and strong. The optimization algorithm can be Stochastic Gradient Descent (SGD), Adagrad (Adaptive Gradient), etc. For multi-classification problems, the present invention adopts a cross-entropy loss function, that is, the preset loss function L is:
[0045]
[0046] where N is the number of samples, K is the number of classes, y i,k is the true class distribution, using one-hot encoding, is the probability that the i-th sample belongs to the k-th class predicted.
[0047] In one embodiment, the evaluation model for the interference corrosion degree of stray current on 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 pipeline-ground potential time-series data input channel and a defect detection data input channel. The pipeline-ground potential time-series data input channel is used to receive the historical pipeline-ground potential positive offset value sequence; the defect detection data input channel is used to receive the distribution characteristics of non-stress external metal loss defects detected in two adjacent times. Among them, the distribution characteristics of non-stress external metal loss defects include the number of non-stress external metal loss defect clustering clusters, the total number of defects in all non-stress metal loss defect clustering clusters, the average defect depth, and the maximum defect area;
[0049] The dual-channel feature extraction module includes 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 pipeline-ground potential positive offset value sequence through one-dimensional convolution and Transformer encoder; the defect dynamic feature extraction channel is used to calculate the change rate of the number of defect clustering clusters according to the number of non-stress external metal loss defect clustering clusters detected in two adjacent times and the detection time interval; calculate the change rate of the total number of defects according to the total number of defects in all non-stress metal loss defect clustering clusters detected in two adjacent times and the detection time interval; calculate the change rate of the average defect depth according to the average defect depth detected in two adjacent times and the detection time interval; calculate the maximum area expansion rate according to the maximum defect area detected in two adjacent times.
[0050] The corrosion degree prediction module is used to evaluate the interference corrosion degree of stray current on the target oil and gas pipeline based on the time-series potential features, the change rate of the number of defect clustering 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 clustering clusters detected currently, the total number of defects in all non-stress metal loss defect clustering clusters, the average defect depth, and the maximum defect area.
[0051] In the embodiments of the present application, the interference corrosion degree of stray current on the target oil and gas pipeline is evaluated by extracting the time-series potential characteristics, the change rate of the number of defect clustering clusters, the change rate of the total number of defects, the change rate of the average depth of defects, the maximum area expansion rate, the number of non-stress external metal loss defect clustering clusters currently detected, the total number of defects of all non-stress metal loss defect clustering clusters currently detected, the average depth of defects currently detected, and the maximum area of defects currently detected. At the same time, both static characteristics and dynamic characteristics are considered, making the evaluation of the interference corrosion degree of stray current on the target oil and gas pipeline more accurate. It should be understood that the time-series potential characteristics are time-correlation characteristics extracted from the historical positive offset value sequence of the pipe-to-soil potential, reflecting the dynamic interference law of stray current, 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 later detection in two adjacent detections.
[0052] In one embodiment, the step of mapping the position information of each non-stress external metal loss defect to the two-dimensional pipeline plane to obtain the position information of each non-stress external metal loss defect in the two-dimensional pipeline plane includes:
[0053] Obtain 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] Obtain the radius of the target pipeline;
[0055] Calculate the ordinate of the non-stress external metal loss defect on the 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] 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.
[0057] In the embodiments of the present application, calculating the ordinate of the non-stress external metal loss defect on the two-dimensional pipeline plane based on the radius of the target pipeline and the circumferential angle of the non-stress external metal loss defect specifically means multiplying the radius of the target pipeline by the circumferential angle of the non-stress external metal loss defect to obtain the ordinate of the non-stress external metal loss defect on the two-dimensional pipeline plane. Multiplying the axial position of the non-stress external metal loss defect by 1 to obtain the abscissa of the non-stress external metal loss defect on the two-dimensional pipeline plane. The embodiments of the present application lay a foundation for quickly and conveniently calculating the distribution characteristics of non-stress external metal loss defects.
[0058] Such as Figure 5As shown in the figure, the embodiment of the present application further provides a system for evaluating the interference corrosion degree of stray current on oil and gas pipelines. The system includes:
[0059] An identification module 1, configured to obtain non-stress external metal loss defects of a target oil and gas pipeline identified by a pipeline magnetic flux leakage detector from a third-party institution, the sizes of the non-stress external metal loss defects, and the position information of each non-stress external metal loss defect;
[0060] An extraction module 2, configured to extract the 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;
[0061] An acquisition module 3, configured to acquire the historical positive offset value sequence of the pipeline-to-soil potential of the target oil and gas pipeline;
[0062] An input module 4, configured to input the historical positive offset value sequence of the pipeline-to-soil potential, the distribution characteristics of non-stress external metal loss defects detected twice adjacent to each other, and the detection time interval into a pre-trained evaluation model for the interference corrosion degree of stray current on oil and gas pipelines, to obtain the interference corrosion degree of stray current on the oil and gas pipelines; wherein, the evaluation model for the interference corrosion degree of stray current on oil and gas pipelines is trained with the distribution characteristics of non-stress external metal loss defects, the detection time interval, and the historical positive offset value sequence of the pipeline-to-soil potential as inputs, and the interference corrosion degree of stray current on the target oil and gas pipeline as the 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 clustering clusters, the total number of defects in all non-stress metal loss defect clustering 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 respectively, to obtain the position information of each non-stress external metal loss defect in the two-dimensional pipeline plane;
[0065] A clustering unit, configured to perform clustering on the basis of 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; wherein, the preset neighborhood radius is set according to the corrosion distribution characteristics of stray current on the pipeline;
[0066] A statistics unit, configured to count the number of non-stress external metal loss defect clustering clusters and the total number of defects in all non-stress metal loss defect clustering clusters based on the clustering result of the non-stress external metal loss defects;
[0067] A calculation unit for calculating the average depth of defects and the maximum area of defects based on the non-stress external metal loss defect clustering clusters and the sizes of non-stress external metal loss defects.
[0068] In one embodiment, the evaluation model for the interference corrosion degree of stray current on oil and gas pipelines is trained with the distribution characteristics of non-stress external metal loss defects, the detection time interval, and the historical series of positive offsets of the pipe-to-soil potential as inputs and the interference corrosion degree of stray current on the target oil and gas pipeline as the output. The steps include:
[0069] Obtain training data; wherein each set of training data includes the distribution characteristics of non-stress external metal loss defects between two adjacent times, the detection time interval, the historical series of positive offsets of the pipe-to-soil potential, and the label of the interference corrosion degree of stray current on the target oil and gas pipeline;
[0070] Convert the interference corrosion degree label into a one-hot encoding;
[0071] Input the distribution characteristics of non-stress external metal loss defects between two adjacent times, the detection time interval, and the historical series of positive offsets of the pipe-to-soil potential in the training data into a preset neural network model, perform forward propagation calculations through each layer of the preset neural network model, and finally obtain the probability distribution of the predicted interference corrosion degree of stray current on the oil and gas pipeline at the output layer of the preset neural network model;
[0072] Substitute the probability distribution of the predicted interference corrosion degree of stray current on the oil and gas pipeline and the one-hot encoding into a preset loss function to calculate the loss value, and according to the loss value, calculate the gradients of the loss function with respect to the parameters of each layer of the model through backpropagation;
[0073] Update the model parameters using an optimization algorithm according to the calculated gradients to gradually reduce the loss function;
[0074] Return to the step of inputting the distribution characteristics of non-stress external metal loss defects between two adjacent times, the detection time interval, and the historical series of positive offsets of the pipe-to-soil potential in the training data into the preset neural network model to perform multiple iterative trainings on all samples in the training data until the loss function converges or reaches a preset number of training epochs.
[0075] In one embodiment, the evaluation model for the interference corrosion degree of stray current on 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 pipeline-ground potential time-series data input channel and a defect detection data input channel. The pipeline-ground potential time-series data input channel is used to receive the historical pipeline-ground potential positive offset value sequence; the defect detection data input channel is used to receive the distribution characteristics of non-stress external metal loss defects detected twice adjacent to each other. Among them, the distribution characteristics of non-stress external metal loss defects include the number of non-stress external metal loss defect clustering clusters, the total number of defects in all non-stress metal loss defect clustering clusters, the average defect depth, and the maximum defect area;
[0077] A dual-channel feature extraction module, which includes 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 pipeline-ground potential positive offset value sequence through a one-dimensional convolutional layer and a Transformer encoder; the defect dynamic feature extraction channel is used to calculate the change rate of the number of defect clustering clusters according to the number of non-stress external metal loss defect clustering clusters detected twice adjacent to each other and the detection time interval; calculate the change rate of the total number of defects according to the total number of defects in all non-stress metal loss defect clustering clusters detected twice adjacent to each other and the detection time interval; calculate the change rate of the average defect depth according to the average defect depth detected twice adjacent to each other and the detection time interval; calculate the maximum area expansion rate according to the maximum defect area detected twice adjacent to each other;
[0078] The corrosion degree prediction module is used to evaluate the interference corrosion degree of stray current on the target oil and gas pipeline based on the time-series potential features, the change rate of the number of defect clustering 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 clustering clusters detected currently, the total number of defects in all non-stress metal loss defect clustering clusters, the average defect depth, and the maximum defect area.
[0079] In one embodiment, the mapping unit includes:
[0080] A first acquisition subunit, which is used to 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;
[0081] A second acquisition subunit, which is used to acquire the radius of the target pipeline;
[0082] A first calculation subunit, which is used to calculate the ordinate of the non-stress external metal loss defect on the two-dimensional pipeline plane based on the radius of the target pipeline and the circumferential angle of the non-stress external metal loss defect;
[0083] A second calculation subunit, 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 methods for evaluating the interference corrosion degree of stray current on oil and gas pipelines described in the above embodiments are all applicable to the system for evaluating the interference corrosion degree of stray current on oil and gas pipelines in the embodiments of the present invention. Therefore, the present invention will not be elaborated herein too much.
[0085] It should be noted that in this document, the term "including", "comprising" or any other variant thereof is intended to cover a 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 expressly listed, or further includes elements inherent to such process, apparatus, article or method. Without further limitation, an element defined by the phrase "comprising an..." does not exclude the presence of additional identical elements in the process, apparatus, article or method comprising the element.
[0086] The above are only the preferred embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present application.
Claims
1. A method for evaluating the interference corrosion degree of stray current on oil and gas pipelines, characterized in that, The method includes: Obtaining non-stress external metal loss defects of a target oil and gas pipeline identified by a pipeline magnetic flux leakage detector, the sizes of the non-stress external metal loss defects, and the position information of each of the non-stress external metal loss defects from a third-party institution; Extracting the 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; Obtaining the historical series of positive offset values of the pipeline-to-soil potential of the target oil and gas pipeline; Inputting the historical series of positive offset values of the pipeline-to-soil potential, the distribution characteristics of non-stress external metal loss defects detected in two adjacent times, and the detection time interval into a pre-trained evaluation model for the interference corrosion degree of stray current on an oil and gas pipeline to obtain the interference corrosion degree of stray current on the oil and gas pipeline; wherein, the evaluation model for the interference corrosion degree of stray current on an oil and gas pipeline is trained with the distribution characteristics of non-stress external metal loss defects, the detection time interval, and the historical series of positive offset values of the pipeline-to-soil potential as inputs and the interference corrosion degree of stray current on the target oil and gas pipeline as the output.
2. The method for evaluating the interference corrosion degree of stray current on an oil and gas pipeline according to claim 1, wherein The distribution characteristics of the non-stress external metal loss defects include the number of non-stress external metal loss defect clustering clusters, the total number of defects in all non-stress metal loss defect clustering clusters, the average defect depth, and the maximum defect area; The step of extracting the 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 includes: Mapping the position information of each of the non-stress external metal loss defects to a two-dimensional pipeline plane respectively to obtain the position information of each non-stress external metal loss defect in the two-dimensional pipeline plane; Performing clustering on the basis of 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 by using the DBSCAN algorithm to obtain the 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 by stray current; Counting the number of non-stress external metal loss defect clustering clusters and the total number of defects in all non-stress metal loss defect clustering clusters based on the clustering result of the non-stress external metal loss defects; Calculating the average defect depth and the maximum defect area based on the non-stress external metal loss defect clustering clusters and the sizes of the non-stress external metal loss defects.
3. The method for evaluating the interference corrosion degree of stray current on an oil and gas pipeline according to claim 1, characterized in that, The step that the evaluation model for the interference corrosion degree of stray current on an oil and gas pipeline is trained with the distribution characteristics of non-stress external metal loss defects, the detection time interval, and the historical series of positive offset values of the pipeline-to-soil potential as inputs and the interference corrosion degree of stray current on the target oil and gas pipeline as the output includes: Obtaining training data; wherein, each set of training data includes the distribution characteristics of non-stress external metal loss defects detected in two adjacent times, the detection time interval, the historical series of positive offset values of the pipeline-to-soil potential, and the label of the interference corrosion degree of stray current on the target oil and gas pipeline; Converting the interference corrosion degree label into a one-hot encoding; Input the distribution characteristics, detection time interval, and historical positive offset value sequence of the pipe-to-soil potential of adjacent non-stress external metal loss defects in the training data into a preset neural network model, perform forward propagation calculations through each layer of the preset neural network model, and finally obtain the probability distribution of the interference corrosion degree of the stray current on the oil and gas pipeline at the output layer of the preset neural network model; Input the probability distribution of the interference corrosion degree of the stray current on the oil and gas pipeline and the one-hot encoding into a preset loss function to calculate the loss value. According to the loss value, calculate the gradients of the loss function with respect to the parameters of each layer of the model through backpropagation; Update the model parameters using an optimization algorithm based on the calculated gradients to gradually reduce the loss function; Return to the step of inputting the distribution characteristics, detection time interval, and historical positive offset value sequence of the pipe-to-soil potential of adjacent non-stress external metal loss defects in the training data into the preset neural network model to perform multiple iterative trainings on all samples in the training data until the loss function converges or reaches a preset number of training epochs.
4. The method for evaluating the interference corrosion degree of stray current on an oil and gas pipeline according to claim 1, wherein The evaluation model for the interference corrosion degree of the stray current on the oil and gas pipeline 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-soil potential time series data input channel and a defect detection data input channel. The pipe-to-soil potential time series data input channel is used to receive the historical positive offset value sequence of the pipe-to-soil potential; the defect detection data input channel is used to receive the distribution characteristics of adjacent non-stress external metal loss defects detected twice. Among them, the distribution characteristics of the non-stress external metal loss defects include the number of non-stress external metal loss defect clustering clusters, the total number of defects in all non-stress metal loss defect clustering clusters, the average defect depth, and the maximum defect area; A dual-channel feature extraction module, the dual-channel feature extraction module includes 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 positive offset value sequence of the pipe-to-soil potential through a one-dimensional convolutional layer and a Transformer encoder; the defect dynamic feature extraction channel is used to calculate the change rate of the number of defect clustering clusters according to the number of non-stress external metal loss defect clustering clusters detected twice and the detection time interval; calculate the change rate of the total number of defects according to the total number of defects in all non-stress metal loss defect clustering clusters detected twice and the detection time interval; calculate the change rate of the average defect depth according to the average defect depth detected twice and the detection time interval; calculate the maximum area expansion rate according to the maximum defect area detected twice; The corrosion degree prediction module is used to evaluate the interference corrosion degree of stray current on the target oil and gas pipeline based on the time-series potential characteristics, the change rate of the number of defect clustering clusters, the change rate of the total number of defects, the change rate of the average depth of defects, the maximum area expansion rate, the number of non-stress external metal loss defect clustering clusters currently detected, the total number of defects of all non-stress metal loss defect clustering clusters, the average depth of defects, and the maximum area of defects.
5. The method for evaluating the interference corrosion degree of stray current on an oil and gas pipeline according to claim 2, characterized in that The step of mapping the position information of each non-stress external metal loss defect to the two-dimensional pipeline plane respectively to obtain the position information of each non-stress external metal loss defect in the two-dimensional pipeline plane includes: Obtaining 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 pipeline; Calculating the ordinate of the non-stress external metal loss defect on the two-dimensional pipeline plane based on the radius of the target pipeline and the circumferential angle of the non-stress external metal loss defect; Calculating 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.
6. A system for evaluating the interference corrosion degree of stray current on an oil and gas pipeline, characterized in that, The system includes: An identification module, which is used to obtain the non-stress external metal loss defects of the target oil and gas pipeline identified by the pipeline magnetic flux leakage detector from a third-party agency, the sizes of the non-stress external metal loss defects, and the position information of each non-stress external metal loss defect; An extraction module, which is used to extract 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; An acquisition module, which is used to acquire the historical sequence of positive offsets of the pipe-to-soil potential of the target oil and gas pipeline; An input module, which is used to input the historical sequence of positive offsets of the pipe-to-soil potential, the distribution characteristics of the non-stress external metal loss defects detected twice adjacent to each other, and the detection time interval into a pre-trained evaluation model for the interference corrosion degree of stray current on the oil and gas pipeline to obtain the interference corrosion degree of stray current on the oil and gas pipeline; wherein, the evaluation model for the interference corrosion degree of stray current on the oil and gas pipeline is trained with the distribution characteristics of the non-stress external metal loss defects, the detection time interval, and the historical sequence of positive offsets of the pipe-to-soil potential as inputs and the interference corrosion degree of stray current on the target oil and gas pipeline as the output.
7. The system for evaluating the interference corrosion degree of stray current on oil and gas pipelines according to claim 6, characterized in that The distribution characteristics of the non-stress external metal loss defects include the number of non-stress external metal loss defect clustering clusters, the total number of defects of all non-stress metal loss defect clustering clusters, the average depth of defects, and the maximum area of defects; The extraction module includes: A mapping unit, which is used to map the position information of each non-stress external metal loss defect to the two-dimensional pipeline plane respectively to obtain the position information of each non-stress external metal loss defect in the two-dimensional pipeline plane; A clustering unit, which is used to cluster 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; wherein, the preset neighborhood radius is set according to the corrosion distribution characteristics of the stray current on the pipeline. A statistical unit, which is used to count the number of clusters of the non-stress external metal loss defects and the total number of defects in all the clusters of the non-stress metal loss defects based on the clustering result of the non-stress external metal loss defects. A calculation unit, which is used to calculate the average depth of the defects and the maximum area of the defects based on the non-stress external metal loss defect clusters and the sizes of the non-stress external metal loss defects.
8. The system for evaluating the interference corrosion degree of stray current on oil and gas pipelines according to claim 6, characterized in that, The steps for training the evaluation model of the interference corrosion degree of the stray current on the oil and gas pipeline, which is based on the distribution characteristics of the non-stress external metal loss defects, the detection time interval, and the historical positive offset value sequence of the pipe-to-soil potential as inputs and the interference corrosion degree of the stray current on the target oil and gas pipeline as the output, include: Obtaining training data; wherein, each set of training data includes the distribution characteristics of the non-stress external metal loss defects in two adjacent times, the detection time interval, the historical positive offset value sequence of the pipe-to-soil potential, and the label of the interference corrosion degree of the stray current on the target oil and gas pipeline. Converting the interference corrosion degree label into a one-hot encoding. Inputting the distribution characteristics of the non-stress external metal loss defects in two adjacent times, the detection time interval, and the historical positive offset value sequence in the training data into a preset neural network model, and performing forward propagation calculation through each layer of the preset neural network model, and finally obtaining the probability distribution of the predicted interference corrosion degree of the stray current on the oil and gas pipeline at the output layer of the preset neural network model. Substituting the probability distribution of the predicted interference corrosion degree of the stray current on the oil and gas pipeline and the one-hot encoding into a preset loss function to calculate the loss value, and according to the loss value, calculating the gradients of the loss function with respect to the parameters of each layer of the model through backpropagation. Updating the model parameters using an optimization algorithm according to the calculated gradients so that the loss function gradually decreases. Returning to the step of inputting the distribution characteristics of the non-stress external metal loss defects in two adjacent times, the detection time interval, and the historical positive offset value sequence in the training data into the preset neural network model to perform multiple iterative trainings on all the samples in the training data until the loss function converges or reaches the preset number of training epochs.
9. The system for evaluating the interference corrosion degree of stray current on an oil and gas pipeline according to claim 6, wherein The evaluation model of the interference corrosion degree of the stray current on the oil and gas pipeline 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 pipeline-ground potential timing data input channel and a defect detection data input channel. The pipeline-ground potential timing data input channel is used to receive the historical pipeline-ground potential positive offset value sequence; the defect detection data input channel is used to receive the distribution characteristics of non-stress external metal loss defects detected in two adjacent times. Among them, the distribution characteristics of non-stress external metal loss defects include the number of non-stress external metal loss defect clustering clusters, the total number of defects in all non-stress metal loss defect clustering clusters, the average defect depth, and the maximum defect area. A dual-channel feature extraction module, which includes a timing potential feature extraction channel and a defect dynamic feature extraction channel. The timing potential feature extraction channel is used to extract the timing potential features of the historical pipeline-ground potential positive offset value sequence through a one-dimensional convolutional layer and a Transformer encoder; the defect dynamic feature extraction channel is used to calculate the change rate of the number of defect clustering clusters according to the number of non-stress external metal loss defect clustering clusters detected in two adjacent times and the detection time interval; calculate the change rate of the total number of defects according to the total number of defects in all non-stress metal loss defect clustering clusters detected in two adjacent times and the detection time interval; calculate the change rate of the average defect depth according to the average defect depth detected in two adjacent times and the detection time interval; calculate the maximum area expansion rate according to the maximum defect area detected in two adjacent times. The corrosion degree prediction module is used to evaluate the interference corrosion degree of stray current on the target oil and gas pipeline based on the timing potential features, the change rate of the number of defect clustering 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 clustering clusters detected currently, the total number of defects in all non-stress metal loss defect clustering clusters, the average defect depth, and the maximum defect area.
10. The system for evaluating the interference corrosion degree of stray current on oil and gas pipelines according to claim 7, wherein The mapping unit includes: A first acquisition sub-unit, which is used to acquire the axial position and the 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 sub-unit, which is used to acquire the radius of the target pipeline. A first calculation sub-unit, which is used to calculate the ordinate of the non-stress external metal loss defect on the two-dimensional pipeline plane based on the radius of the target pipeline and the circumferential angle of the non-stress external metal loss defect. A second calculation sub-unit, which is used 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
Intelligent analysis system for magnetic flux leakage detection data in pipeline
WO2020133639A1
Cited By
Quantitative risk calculation method for oil and gas pipeline
CN120562894A