Method and system for calculating oil and gas pipeline magnetic flux leakage internal detection data channel base value
By processing the leakage magnetic field detection data through a cyclic calculation method, the channel baseline value is gradually approximated, which solves the problem of inaccurate channel baseline value calculation in the existing technology and realizes higher precision signal feature analysis and defect quantification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA PETROLEUM PIPELINE INSPECTION TECH
- Filing Date
- 2024-10-24
- Publication Date
- 2026-04-24
AI Technical Summary
The existing technology for calculating the baseline value of the data channel in the magnetic flux leakage detection of oil and gas pipelines is not accurate enough, resulting in insufficient accuracy in signal feature analysis and pipeline defect quantification.
A cyclic calculation method is adopted to process the leakage magnetic field data by using the arithmetic mean and a set threshold, gradually approaching the channel baseline value until the standard conditions are met, thus obtaining a scientifically sound channel baseline value.
It effectively filters out deviations from the baseline in channel data, making the calculation results more reliable, reflecting the magnitude of the channel baseline, and providing more scientific results. It also updates the arithmetic mean and standard interval in real time.
Smart Images

Figure CN121919447A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of internal detection calculation in oil and gas pipelines, and specifically relates to a method and system for calculating the base value of internal detection data channels for magnetic flux leakage in oil and gas pipelines. Background Technology
[0002] Pipeline transportation is the primary mode of transporting oil and natural gas, and its safety has always been a top priority. Among numerous pipeline inspection technologies, magnetic flux leakage (MF) detection is the most mature, stable, and widely used. MF detection data originates from signal values measured by multiple three-dimensional MF sensors arranged circumferentially within a detector. Analysis of this MF data allows for the detection and localization of various pipeline defects, enabling repair and ensuring the safe transport of oil and gas. Efficient and reliable data processing methods are crucial in pipeline inspection data analysis, significantly determining the effectiveness of the detection technology. The MF data collected by the detector during its operation within the pipeline is inevitably affected by factors such as environmental noise, sensor orientation, and sensitivity differences, leading to inconsistencies in the baseline values of different signal channels. Accurately calculating the baseline values of each channel is a prerequisite for subsequent data analysis and greatly impacts the accuracy of signal feature analysis and pipeline defect quantification. Currently, the industry uses varying methods for calculating the baseline values of MF signal channels, such as the mean method or the median method. Both methods may produce significant errors, hindering accurate analysis of defect signals.
[0003] Therefore, the existing methods for calculating the baseline value of the data channel for internal detection of magnetic flux leakage in oil and gas pipelines are not accurate enough. Summary of the Invention
[0004] To address the aforementioned problems in the prior art, namely the inaccuracy of existing methods for calculating the baseline value of internal magnetic flux leakage detection data channels in gas pipelines, this invention provides a method for calculating the baseline value of internal magnetic flux leakage detection data channels in oil and gas pipelines, the method comprising:
[0005] The leakage magnetic field of oil and gas pipelines is detected by using an in-pipe detector to obtain leakage magnetic field data. The leakage magnetic field data is divided into pipe section data, and the pipe section data of each section is divided into axial, radial and circumferential components.
[0006] The component data of the nth pipe section in the a direction are arranged into a matrix, wherein the data in the i-th row of the matrix is the component data of the i-th channel of the nth pipe section in the a direction; the a direction can be any of the three directions: axial, radial, and circumferential.
[0007] Calculate the arithmetic mean of the data in the i-th row of the matrix of the nth pipe segment in the a direction, and use it as the first arithmetic mean;
[0008] Based on the first arithmetic mean and the set threshold, the data of the i-th row of the matrix of the nth pipe section in the a direction are cyclically calculated until the arithmetic mean that meets the standard conditions is obtained. The arithmetic mean that meets the standard conditions is the channel base value of the i-th channel of the nth pipe section in the a direction.
[0009] In a preferred embodiment, the method of iteratively calculating the data in the i-th row of the matrix of the nth pipe segment in the a direction until an arithmetic mean that meets the standard conditions is obtained includes:
[0010] Calculate the (k-1)th standard interval based on the (k-1)th arithmetic mean and the first set threshold;
[0011] Calculate the k-th arithmetic mean of the data in the i-th row within the (k-1)-th standard interval; k is a positive number greater than or equal to 2;
[0012] Calculate the k-th standard interval based on the k-th arithmetic mean and the first set threshold;
[0013] Calculate the (k+1)th arithmetic mean of the data in the i-th row within the k-th standard interval.
[0014] When the difference between the (k+1)th arithmetic mean and the kth arithmetic mean is less than the second set threshold, the (k+1)th arithmetic mean meets the standard condition, and the (k+1)th arithmetic mean is the channel base value of the i-th channel of the n-th pipe section in the a direction.
[0015] In a preferred embodiment, when the number of data in the i-th row within the k-1 standard interval is 0, the k-1 arithmetic mean is the channel base value of the i-th channel of the n-th pipe segment in the a direction.
[0016] In a preferred embodiment, the method for calculating the k-th standard interval based on the k-th arithmetic mean and a first preset threshold is as follows:
[0017] The left endpoint is obtained by subtracting the first set threshold from the k-th arithmetic mean, and the right endpoint is obtained by adding the first set threshold to the k-th arithmetic mean.
[0018] The left endpoint and the right endpoint together form the kth standard interval.
[0019] A second aspect of the present invention provides a baseline value calculation system for an internal detection data channel of magnetic flux leakage in oil and gas pipelines, the system comprising:
[0020] The data monitoring module is used to perform magnetic flux leakage detection on oil and gas pipelines using in-pipe detectors to obtain magnetic flux leakage data of the pipelines; the magnetic flux leakage data is divided into pipe section data, and the pipe section data of each section is divided into axial, radial and circumferential components.
[0021] The matrix construction module is used to list the component data of the nth pipe segment in the a direction into a matrix, wherein the data in the i-th row of the matrix is the component data of the i-th channel of the nth pipe segment in the a direction;
[0022] The arithmetic mean calculation module is used to calculate the arithmetic mean of the data in the i-th row of the matrix of the nth pipe segment in the a direction, and use it as the first arithmetic mean.
[0023] The loop calculation module is used to perform loop calculations on the data of the i-th row of the matrix of the n-th pipe section in the a direction based on the first arithmetic mean and a set threshold, until an arithmetic mean that meets the standard conditions is obtained. The arithmetic mean that meets the standard conditions is the channel base value of the i-th channel of the n-th pipe section in the a direction.
[0024] A third aspect of the present invention provides an electronic device comprising: at least one processor; and a memory communicatively connected to at least one of the processors; wherein the memory stores instructions executable by the processor for implementing the above-described method for calculating the baseline value of the internal detection data channel for oil and gas pipeline leakage magnetic flux.
[0025] In a fourth aspect, the present invention provides a computer-readable storage medium storing computer instructions for execution by a computer to implement the above-described method for calculating the baseline value of the internal detection data channel for oil and gas pipeline leakage magnetic flux.
[0026] The beneficial effects of this invention are:
[0027] (1) The results of the base value calculation method of the present invention, compared with the arithmetic mean method and the median method, effectively filter out data points in the channel data that deviate from the base value, and can better reflect the base value of the channel, and the calculation results are reliable.
[0028] (2) The method for calculating the baseline value of the data channel for internal detection of magnetic flux leakage in oil and gas pipelines in this invention gradually approximates the baseline value of the channel through iterative calculation, resulting in a more scientific result.
[0029] (3) The method for calculating the base value of the data channel for the leakage magnetic field detection of oil and gas pipelines of the present invention not only updates the arithmetic mean at any time, but also updates the standard interval at any time, so as to obtain more scientific results. Attached Figure Description
[0030] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0031] Figure 1This is a flowchart illustrating a method for calculating the base value of an internal detection data channel for magnetic flux leakage in oil and gas pipelines, according to an embodiment of the present invention.
[0032] Figure 2 This is a graph of all the data obtained from 372 samplings of a pipe section in the internal inspection data of a φ813mm long-distance natural gas pipeline in this embodiment;
[0033] Figure 3 This is a schematic diagram comparing the pipeline baseline value obtained by the pipeline leakage magnetic field internal detection data channel baseline value calculation method of the present invention with the pipeline baseline value obtained by the arithmetic mean method and the pipeline baseline value obtained by the median method;
[0034] Figure 4 This is a schematic diagram of the structure of a computer system used to implement the methods, systems, and devices of this application. Detailed Implementation
[0035] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0036] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0037] This invention provides a method for calculating the baseline value of an internal magnetic flux leakage detection data channel in oil and gas pipelines, the method comprising:
[0038] The leakage magnetic field of oil and gas pipelines is detected by using an in-pipe detector to obtain leakage magnetic field data. The leakage magnetic field data is divided into pipe section data, and the pipe section data of each section is divided into axial, radial and circumferential components.
[0039] The component data of the nth pipe section in the a direction are arranged into a matrix, wherein the data in the i-th row of the matrix is the component data of the i-th channel of the nth pipe section in the a direction; the a direction can be any of the three directions: axial, radial, and circumferential.
[0040] Calculate the arithmetic mean of the data in the i-th row of the matrix of the nth pipe segment in the a direction, and use it as the first arithmetic mean;
[0041] Based on the first arithmetic mean and the set threshold, the data of the i-th row of the matrix of the nth pipe section in the a direction are cyclically calculated until the arithmetic mean that meets the standard conditions is obtained. The arithmetic mean that meets the standard conditions is the channel base value of the i-th channel of the nth pipe section in the a direction.
[0042] To more clearly explain the calculation method for the baseline value of the internal detection data channel of magnetic flux leakage in oil and gas pipelines according to the present invention, the following is in conjunction with... Figure 1 The steps in the embodiments of the present invention are described in detail below. The method for calculating the baseline value of the data channel for internal detection of magnetic flux leakage in oil and gas pipelines in this application calculates the arithmetic mean of the channel data cyclically according to a threshold range. The calculation result continuously approaches the baseline value of the channel until a certain condition is met, at which point the calculation stops and the result is obtained.
[0043] The method for calculating the baseline value of the internal detection data channel for magnetic flux leakage in oil and gas pipelines according to the first embodiment of the present invention is described in detail below:
[0044] The leakage magnetic field of oil and gas pipelines is detected by using an in-pipe detector to obtain leakage magnetic field data. The leakage magnetic field data is divided into pipe section data, and the pipe section data of each section is divided into axial, radial and circumferential components.
[0045] The component data of the nth pipe segment in the a direction are arranged into a matrix, wherein the data in the i-th row of the matrix is the component data of the i-th channel of the nth pipe segment in the a direction.
[0046] For example, data of a certain directional component can be represented as:
[0047]
[0048] Channel data is represented by a row of data in a matrix. For example, the data of the i-th channel, which is the i-th row, can be represented as:
[0049] A(i)=(a i1 ,a i2 ,…a in );
[0050] Calculate the arithmetic mean of the data in the i-th row of the matrix of the nth pipe segment in the a direction, and use it as the first arithmetic mean;
[0051] Based on the first arithmetic mean and the set threshold, the data of the i-th row of the matrix of the nth pipe section in the a direction are cyclically calculated until the arithmetic mean that meets the standard conditions is obtained. The arithmetic mean that meets the standard conditions is the channel base value of the i-th channel of the nth pipe section in the a direction.
[0052] The method for iteratively calculating the data in the i-th row of the matrix of the nth pipe section in the a direction until an arithmetic mean that meets the standard conditions is obtained includes:
[0053] Calculate the (k-1)th standard interval based on the (k-1)th arithmetic mean and the first set threshold;
[0054] Calculate the k-th arithmetic mean of the data in the i-th row within the (k-1)-th standard interval; k is a positive number greater than or equal to 2;
[0055] Calculate the k-th standard interval based on the k-th arithmetic mean and the first set threshold;
[0056] Calculate the (k+1)th arithmetic mean of the data in the i-th row within the k-th standard interval.
[0057] In this embodiment, the standard condition is:
[0058] When the difference between the (k+1)th arithmetic mean and the kth arithmetic mean is less than the second set threshold, the (k+1)th arithmetic mean meets the standard condition, and the (k+1)th arithmetic mean is the channel base value of the i-th channel of the n-th pipe section in the a direction.
[0059] In this embodiment, when the number of data in the i-th row within the k-1 standard interval is 0, the k-1 arithmetic mean is the channel base value of the i-th channel of the n-th pipe segment in the a direction.
[0060] In this embodiment, the method for calculating the k-th standard interval based on the k-th arithmetic mean and the first set threshold is as follows: the left endpoint is obtained by subtracting the first set threshold from the k-th arithmetic mean, and the right endpoint is obtained by adding the first set threshold to the k-th arithmetic mean; the left endpoint and the right endpoint together form the k-th standard interval.
[0061] In this embodiment, an algorithm for iterative calculation is given;
[0062] Set a first threshold ChThr and a second threshold ChErrThr;
[0063] Let k = 1;
[0064] Calculate the arithmetic mean of the data from the i-th channel:
[0065]
[0066] The following judgments and calculations are performed in a loop:
[0067] Let k = k + 1;
[0068] Iterating through the data of the i-th channel, we have n k The values in [ChAvg(i)]k-1 -ChThr, ChAvg(i) k-1 +ChThr] is within the numerical range;
[0069] When n k When = 0, the loop ends, ChAvg(i) k-1 This is the channel base value;
[0070] When n k When >0, calculate this n k Arithmetic mean of points:
[0071]
[0072] a′ ij ∈[ChAvg(i) k-1 -ChThr, ChAvg(i) k-1 +ChThr];
[0073] When the absolute value of the difference between two consecutive calculated channel data means is less than or equal to ChErrThr, i.e. |ChAvg(i) k -ChAvg(i) k-1 When |≤ChErrThr, the loop ends, ChAvg(i) k This is the channel base value;
[0074] When |ChAvg(i) k -ChAvg(i) k-1 When |>ChErrThr is reached, execution continues to return to the previous state.
[0075] In this embodiment, based on the above algorithm, an example is given for illustration; specifically including:
[0076] According to the method described in the invention, channel baseline values were calculated for pipe sections in the internal detection data of a φ813mm long-distance natural gas pipeline. The pipeline internal detector has 320 channel sensors, and 372 samples were taken within this pipe section. The curve of all acquired data is shown below. Figure 2 As shown:
[0077] We calculated the base value for the 83rd channel (the channel whose curve is orange in the above figure) using the base value algorithm described in this paper. The base value is 1076.6, while the mean of all data in this channel is 1048.6 and the median is 1064. Comparing these results with the channel data, as follows... Figure 3As shown in the figure, the baseline calculation method described in this paper effectively filters out data points that deviate from the baseline in the channel data compared to the arithmetic mean method and the median method. It better reflects the baseline value of the channel, and the calculation results are reliable. In contrast, the cutoff values calculated by the other two methods show significant deviations.
[0078] To facilitate understanding, the processing and calculation of actual data are explained in conjunction with the algorithm flowchart in the invention description. Figure 2 The data for all 372 points of the axial component of the pipe section data for the 83rd channel are as follows:
[0079] A(83)=(927,929,932,934,937,940,944,947,950,952,954,956,958,960,962,964,966,969,971,973,976,978,981,984,986,988,990,992,995,996,998,1000,1001,1005,1008,1010,1013,1015,1017,1019,1021,1023,1025,1027,1028,1029,1029,1030,1031,1032,1034,1035,1036,1035,1034,1035,1034,1035,1036,1036,1036,1038,1039,1040,1040,1041,1042,1043,1043,1043,1043,1043,1043,1044,1044,1044,1045,1046,1047,1047,1048,1048,1049,1049,1049,1050,1050,1051,1051,1052,1053,1053,1054,1054,1054,1054,1055,1056,1057,1057,1058,1059,1061,1062,1063,1063,1064,1064,1065,1067,1069,1071,1072,1075,1078,1080,1083,1084,1086,1088,1090,1087,1085,1084,1083,1079,1075,1072,1070,1073,1075,1076,1076,1077,1078,1079,1080,1082,1083,1085,1086,1086,1086,1087,1088,1086,1085,1084,1083,1078,1075,1072,1069,1064,1059,1056,1051,1047,1043,1039,1034,1033,1030,1027,1024,1023,1022,1020,1018,1018,1018,1017,1016,1012,1009,1006,1003,1000,997,993,990,992,992,991,990,992,994,995,995,994,994,994,994,986,980,971,962,955,948,947,950,970,985,994,1005,1020,1034,1041,1049,1047,1048,1052,1054,1052,1052,1053,1053,1053,1054,1054,1053,1052,1052,1051,1055,1058,1060,1062,1063,1064,1066,1067,1069,1070,1072,1074,1075,1076,1078,1079,1076,1073,1073,1071,1070,1068,1067,1066,1068,1070, 1070,1071,1074,1076,1077,1079,1081,1083,1084,1086,1083,1082,1081,1081,1078,1076,1074,1073,1071,1070,1068,1066,1068,1069,1069,1069,1072,1074,1076,1077,1078,1079,1080,1082,1082,1082,1083,1083,1082,1081,1081, 1080,1077,1075,1074,1072,1074,1075,1075,1075,1078,1079,1081,1082,1083,1084,1085,1086,1086,1087,1087,1088,1084,1082,1081,1079,1079,1078,1077,1076,1079,1081,1081,1083,1080,1079,1078,1078,1076,1075,1074,1074, The base value calculation steps are as follows: (1075,1075,1075,1076,1075,1074,1074,1074,1074,1074,1074,1074,1075,1075,1076,1076,1078,1080,1081,1082,1083,1084,1085,1085,1084,1084,1084,1083,1084,1084,1085,1084,1083,1082,1082,1081,1080).
[0080] 1) Set reasonable thresholds ChThr = 20 and ChErrThr = 0.1;
[0081] 2) k = 1;
[0082] 3) Calculate the arithmetic mean of the channel data:
[0083]
[0084] 4) k = 2;
[0085] 5) Traversing the channel data, there are 109 values in the range [1028.6, 1068.6]. These values are: (1029,1029,1030,1031,1032,1034,1035,1036,1035,1034,1035,1034,1035,1036,1036,1036,1038,1039,1040,1040,1041,1042,1043,1043,1043,1043,1043, 1043,1044,1044,1044,1045,1046,1047,1047,1048,1048,1049,1049,1049,1050,1050,1051,1051,1052,1053,1053,1054,1054,1054,1055,1056,1057,10 57,1058,1059,1061,1062,1063,1063,1064,1064,1065,1067,1064,1059,1056,1051,1047,1043,1039,1034,1033,1030,1034,1041,1049,1047,1048,1052,1054 ,1052,1052,1053,1053,1053,1054,1054,1054,1053,1052,1052,1051,1055,1058,1060,1062,1063,1064,1066,1067,1068,1067,1066,1068,1068,1066,1068);
[0086] 6) Calculate the arithmetic mean of these 109 points:
[0087]
[0088] a' ij ∈[1028.6,1068.6];
[0089] 6) |ChAvg(83)2-ChAvg(83)1|=1.0>0.1, then k=3;
[0090] 7) Traversing the channel data, there are 113 values in the range [1029.6, 1069.6]. These values are: (1030,1031,1032,1034,1035,1036,1035,1034,1035,1034,1035,1036,1036,1036,1038,1039,1040,1040,1041,1042,1043,1043,1043,1043,1043,1043,1043,1044,1044, 1044,1045,1046,1047,1047,1048,1048,1049,1049,1049,1050,1050,1051,1051,1052,1053,1053,1054,1054,1054,1055,1056,1057,1057,1058,1059,1061,10 62,1063,1063,1064,1064,1065,1067,1069,1069,1064,1059,1056,1051,1047,1043,1039,1034,1033,1030,1034,1041,1049,1047,1048,1052,1054,1052,1052,1053 ,1053,1053,1054,1054,1054,1053,1052,1052,1051,1055,1058,1060,1062,1063,1064,1066,1067,1069,1068,1067,1066,1068,1068,1066,1068,1069,1069,1069);
[0091] 8) Calculate the arithmetic mean of these 113 points:
[0092]
[0093] a' ij ∈[1029.6,1069.6];
[0094] 9) |ChAvg(83)3-ChAvg(83)2|=1.3>0.1, then k=4;
[0095] 10) Traversing the channel data, there are 117 values in the range [1030.9, 1070.9]. These values are: (1031,1032,1034,1035,1036,1035,1034,1035,1034,1035,1036,1036,1036,1038,1039,1040,1040,1041,1042,1043,1043,1043,1043,1043,1043,1044,1044,1045, 1046,1047,1047,1048,1048,1049,1049,1049,1050,1050,1051,1051,1052,1053,1053,1054,1054,1054,1055,1056,1057,1057,1058,1059,1061,1062,1063,1063,10 64,1064,1065,1067,1069,1070,1069,1064,1059,1056,1051,1047,1043,1039,1034,1033,1034,1041,1049,1047,1048,1052,1054,1052,1052,1052,1053,1053,1053,1054,1054 ,1054,1053,1052,1052,1051,1055,1058,1060,1062,1063,1064,1066,1067,1069,1070,1070,1068,1067,1066,1068,1070,1070,1070,1068,1066,1068,1069,1069,1069);
[0096] 11) Calculate the arithmetic mean of these 117 points:
[0097]
[0098] a' ij ∈[1030.9,1070.9];
[0099] 12) |ChAvg(83)4-ChAvg(83)3|=1.4>0.1, then k=5;
[0100] 13) Traversing the channel data, there are 125 values in the range [1032.3, 1072.3]. These values are: (1034,1035,1036,1035,1034,1035,1034,1035,1036,1036,1036,1038,1039,1040,1040,1041,1042,1043,1043,1043,1043,1043,1043,1043,1044,1044,1044,1045,1046,1047,1047,1048, 1048,1049,1049,1049,1050,1050,1051,1051,1052,1053,1053,1054,1054,1054,1055,1056,1057,1057,1058,1059,1061,1062,1063,1063,1064,1064,1065,1067,1069,1071,10 72,1072,1070,1072,1069,1064,1059,1056,1051,1047,1043,1039,1034,1033,1034,1041,1049,1047,1048,1052,1054,1052,1052,1053,1053,1053,1054,1054,1053,1052,1052 ,1051,1055,1058,1060,1062,1063,1064,1066,1067,1069,1070,1072,1071,1070,1068,1067,1066,1068,1070,1070,1071,1071,1070,1068,1066,1068,1069,1069,1069,1072,1072);
[0101] 14) Calculate the arithmetic mean of these 125 points:
[0102]
[0103] a' ij ∈[1032.3,1072.3];
[0104] 15)|ChAvg(83)5-ChAvg(83)4|=1.9>0.1, then k=6;
[0105] 16) Traversing the channel data, there are 138 values in the range [1034.2, 1074.2]. These values are: (1035,1036,1035,1035,1035,1036,1036,1036,1038,1039,1040,1040,1041,1042,1043,1043,1043,1043,1043,1043,1044,1044,1044,1045,1046,1047,1047,1048,1048,1049,1049,1049,1050,1050,10 51,1051,1052,1053,1053,1054,1054,1054,1054,1055,1056,1057,1057,1058,1059,1061,1062,1063,1063,1064,1064,1065,1067,1069,1071,1072,1072,1070,1073,1072,1069,1064,1059,1056,1051, 1047,1043,1039,1041,1049,1047,1048,1052,1054,1052,1052,1053,1053,1053,1054,1054,1053,1052,1052,1051,1055,1058,1060,1062,1063,1064,1066,1067,1069,1070,1072,1074,1073,107 3,1071,1070,1068,1067,1066,1068,1070,1070,1071,1074,1074,1073,1071,1070,1068,1066,1068,1069,1069,1069,1072,1074,1074,1072,1074,1074,1074,1074,1074,1074,1074,1074,1074,1074,1074,1074,1074,1074);
[0106] 17) Calculate the arithmetic mean of these 138 points:
[0107]
[0108] a' ij ∈[1034.2,1074.2];
[0109] 18)|ChAvg(83)6-ChAvg(83)5|=3.6>0.1, then k=7;
[0110] 19) Traversing the channel data, there are 163 values in the range [1037.8, 1077.8]. These values are: (1038,1039,1040,1040,1041,1042,1043,1043,1043,1043,1043,1043,1044,1044,1044,1045,1046,1047,1047,1048,1048,1049,1049,1049,1050,1050,1051,1051,1052,1053,1053,1054,1054,1054,1055,1056,1057,1057,1058,105 9,1061,1062,1063,1063,1064,1064,1065,1067,1069,1071,1072,1075,1075,1072,1070,1073,1075,1076,1076,1077,1075,1072,1069,1064,1059,1056,1051,1047,1043,1039,1041,1049,1047,1048,1052,1054,1052,1052,1053,1053,10 53,1054,1054,1054,1053,1052,1052,1051,1055,1058,1060,1062,1063,1064,1066,1067,1069,1070,1072,1074,1075,1076,1076,1073,1073,1071,1070,1068,1067,1066,1068,1070,1070,1071,1074,1076,1077,1076,1074,1073,1071,1 070,1068,1066,1068,1069,1069,1069,1072,1074,1076,1077,1077,1075,1074,1072,1074,1075,1075,1075,1077,1076,1076,1075,1074,1074,1075,1075,1076,1075,1074,1074,1074,1074,1074,1074,1074,1075,1075,1076,1076);
[0111] 20) Calculate the arithmetic mean of these 163 points:
[0112]
[0113] a' ij ∈[1037.8,1077.8];
[0114] 21)|ChAvg(83)7-CHAvg(83)6|=4.7>0.1, then k=8;
[0115] 22) Traversing the channel data, there are 205 values in the range [1042.5, 1082.5]. These values are: (1043,1043,1043,1043,1043,1043,1044,1044,1044,1045,1046,1047,1047,1048,1048,1049,1049,1049,1050,1050,1051,1051,1052,1053,1053,1054,1054,1054,1054,1055,1056,1057,1057,1058,1059,1061,1062,1063,1063,1064,1064,1065,1067,1069,1071,1072,1075,1078,1080,1079,1075,1072,1070,1073,1075,1076,1076,1077,1078,1079,1080,1082,1078,1075,1072,1069,1064,1059,1056,1051,1047,1043,1049,1047,1048,1052,1054,1052,1052,1053,1053,1053,1054,1054,1054,1053,1052,1052,1051,1055,1058,1060,1062,1063,1064,1066,1067,1069,1070,1072,1074,1075,1076,1078,1079,1076,1073,1073,1071,1070,1068,1067,1066,1068,1070,1070,1071,1074,1076,1077,1079,1081,1082,1081,1081,1078,1076,1074,1073,1071,1070,1068,1066,1068,1069,1069,1069,1072,1074,1076,1077,1078,1079,1080,1082,1082,1082,1082,1081,1081,1080,1077,1075,1074,1072,1074,1075,1075,1075,1078,1079,1081,1082,1082,1081,1079,1079,1078,1077,1076,1079,1081,1081,1080,1079,1078,1078,1076,1075,1074,1074,1075,1075,1075,1076,1075,1074,1074,1074,1074,1074,1074,1074,1075,1075,1076,1076,1078,1080,1081,1082,1082,1082,1081,1080),
[0116] 23) Calculate the arithmetic mean of these 205 points:
[0117]
[0118] a' ij ∈[1042.5,1082.5];
[0119] 24)|ChAvg(83)8-ChAvg(83)7|=5.1>0.1, then k=9;
[0120] 25) Traversing the channel data, there are 236 values in the range [1047.6, 1087.6]. These values are: (1048,1048,1049,1049,1049,1050,1050,1051,1051,1052,1053,1053,1054,1054,1054,1054,1055,1056,1057,1057,1058,1059,1061,1062,1063,1063,1064,1064,1065,1067,1069,1071,1072,1075,1078,1080,1083,1084,1086,1087,1085,1084,1083,1079,1075,1072,1070,1073,1075,1076,1076,1077,1078,1079,1080,1082,1083,1085,1086,1086,1086,1087,1086,1085,1084,1083,1078,1075,1072,1069,1064,1059,1056,1051,1049,1048,1052,1054,1052,1052,1053,1053,1053,1054,1054,1054,1053,1052,1052,1051,1055,1058,1060,1062,1063,1064,1066,1067,1069,1070,1072,1074,1075,1076,1078,1079,1076,1073,1073,1071,1070,1068,1067,1066,1068,1070,1070,1071,1074,1076,1077,1079,1081,1083,1084,1086,1083,1082,1081,1081,1078,1076,1074,1073,1071,1070,1068,1066,1068,1069,1069,1069,1072,1074,1076,1077,1078,1079,1080,1082,1082,1082,1083,1083,1082,1081,1081,1080,1077,1075,1074,1072,1074,1075,1075,1075,1078,1079,1081,1082,1083,1084,1085,1086,1086,1087,1087,1084,1082,1081,1079,1079,1078,1077,1076,1079,1081,1081,1083,1080,1079,1078,1078,1076,1075,1074,1074,1075,1075,1075,1076,1075,1074,1074,1074,1074,1074,1074,1074,1075,1075,1076,1076,1078,1080,1081,1082,1083,1084,1085,1085,1084,1084,1084,1083,1084,1084,1084,1085,1084,1083,1084,1083,1082,1082,1081,1080);,
[0121] 26) Calculate the arithmetic mean of these 236 points:
[0122]
[0123] a' ij ∈[1047.6,1087.6];
[0124] 27)|ChAvg(83)9-ChAvg(83)8|=4.9>0.1, then k=10;
[0125] 28) Traversing the channel data, there are 221 values in the range [1052.5, 1092.5]. These values are: (1053,1053,1054,1054,1054,1054,1055,1056,1057,1057,1058,1059,1061,1062,1063,1063,1064,1064,1065,1067,1069,1071,1072,1075,1078,1080,1083,1084,1086,1088,1090,1087,1085,1084,1083,1079,1075,1072,1070,1073,1075,1076,1076,1077,1078,1079,1080,1082,1083,1085,1086,1086,1086,1087,1088,1086,1085,1084,1083,1078,1075,1072,1069,1064,1059,1056,1054,1053,1053,1053,1054,1054,1054,1053,1055,1058,1060,1062,1063,1064,1066,1067,1069,1070,1072,1074,1075,1076,1078,1079,1076,1073,1073,1071,1070,1068,1067,1066,1068,1070,1070,1071,1074,1076,1077,1079,1081,1083,1084,1086,1083,1082,1081,1081,1078,1076,1074,1073,1071,1070,1068,1066,1068,1069,1069,1069,1072,1074,1076,1077,1078,1079,1080,1082,1082,1082,1083,1083,1082,1081,1081,1080,1077,1075,1074,1072,1074,1075,1075,1075,1078,1079,1081,1082,1083,1084,1085,1086,1086,1087,1087,1088,1084,1082,1081,1079,1079,1078,1077,1076,1079,1081,1081,1083,1080,1079,1078,1078,1076,1075,1074,1074,1075,1075,1075,1076,1075,1074,1074,1074,1074,1074,1074,1074,1075,1075,1076,1076,1078,1080,1081,1082,1083,1084,1085,1085,1084,1084,1084,1083,1084,1084,1084,1085,1084,1083,1083,1082,1082,1081,1080);
[0126] 29) Calculate the arithmetic mean of these 221 points:
[0127]
[0128] a' ij ∈[1052.5,1092.5];
[0129] 30)|ChAvg(83) 10 -ChAvg(83)9|=2.2>0.1, then k=11;
[0130] 31) Traversing the channel data, there are 207 values in the range [1054.7, 1094.7]. These values are: (1055,1056,1057,1057,1058,1059,1061,1062,1063,1063,1064,1064,1065,1067,1069,1071,1072,1075,1078,1080,1083,1084,1086,1088,1090,1087,1085,1084,1083,1079,1075,1072,1070,1073,1075,1076,1076,1077,1078,1079,1080,1082,1083,1085,1086,1086,1086,1087,1088,1086,1085,1084,1083,1078,1075,1072,1069,1064,1059,1056,1055,1058,1060,1062,1063,1064,1066,1067,1069,1070,1072,1074,1075,1076,1078,1079,1076,1073,1073,1071,1070,1068,1067,1066,1068,1070,1070,1071,1074,1076,1077,1079,1081,1083,1084,1086,1083,1082,1081,1081,1078,1076,1074,1073,1071,1070,1068,1066,1068,1069,1069,1069,1072,1074,1076,1077,1078,1079,1080,1082,1082,1082,1083,1083,1082,1081,1081,1080,1077,1075,1074,1072,1074,1075,1075,1075,1078,1079,1081,1082,1083,1084,1085,1086,1086,1087,1087,1088,1084,1082,1081,1079,1079,1078,1077,1076,1079,1081,1081,1083,1080,1079,1078,1078,1076,1075,1074,1074,1075,1075,1075,1076,1075,1074,1074,1074,1074,1074,1074,1074,1075,1075,1076,1076,1078,1080,1081,1082,1083,1084,1085,1085,1084,1084,1084,1083,1084,1084,1084,1085,1084, 1083, 1083, 1082, 1082, 1081, 1080);
[0131] 32) Calculate the arithmetic mean of these 207 points:
[0132]
[0133] a' ij ∈[1054.7,1094.7];
[0134] 33)|ChAvg(83) 11 -ChAvg(83) 10 If |=1.5>0.1, then k=12;
[0135] 34) Traversing the channel data, there are 203 values in the range [1056.2, 1096.2]. These values are: (1057,1057,1058,1059,1061,1062,1063,1063,1064,1064,1065,1067,1069,1071,1072,1075,1078,1080,1083,1084,1086,1088,1090,1087,1085,1084,1083,1079,1075,1072,1070,1073,1075,1076,1076,1077,1078,1079,1080,1082,1083,1085,1086,1086,1086,1087,1088,1086,1085,1084,1083,1078,1075,1072,1069,1064,1059,1058,1060,1062,1063,1064,1066,1067,1069,1070,1072,1074,1075,1076,1078,1079,1076,1073,1073,1071,1070,1068,1067,1066,1068,1070,1070,1071,1074,1076,1077,1079,1081,1083,1084,1086,1083,1082,1081,1081,1078,1076,1074,1073,1071,1070,1068,1066,1068,1069,1069,1069,1072,1074,1076,1077,1078,1079,1080,1082,1082,1082,1083,1083,1082,1081,1081,1080,1077,1075,1074,1072,1074,1075,1075,1075,1078,1079,1081,1082,1083,1084,1085,1086,1086,1087,1087,1088,1084,1082,1081,1079,1079,1078,1077,1076,1079,1081,1081,1083,1080,1079,1078,1078,1076,1075,1074,1074,1075,1075,1075,1076,1075,1074,1074,1074,1074,1074,1074,1074,1075,1075,1076,1076,1078,1080,1081,1082,1083,1084,1085,1085,1084,1084,1084,1083,1084,1084,1084,1085,1084,1083,1083,1082,1082, 1081, 1080);
[0136] 35) Calculate the arithmetic mean of these 203 points:
[0137]
[0138] a' ij ∈[1056.2,1096.2];
[0139] 36)|ChAvg(83) 12 -ChAvg(83) 11 If |=0.4>0.1, then k=13;
[0140] 37) Traversing the channel data, there are 203 values in the range [1056.6, 1096.6]. These values are: (1057,1057,1058,1059,1061,1062,1063,1063,1064,1064,1065,1067,1069,1071,1072,1075,1078,1080,1083,1084,1086,1088,1090,1087,1085,1084,1083,1079,1075,1072,1070,1073,1075,1076,1076,1077,1078,1079,1080,1082,1083,1085,1086,1086,1086,1087,1088,1086,1085,1084,1083,1078,1075,1072,1069,1064,1059,1058,1060,1062,1063,1064,1066,1067,1069,1070,1072,1074,1075,1076,1078,1079,1076,1073,1073,1071,1070,1068,1067,1066,1068,1070,1070,1071,1074,1076,1077,1079,1081,1083,1084,1086,1083,1082,1081,1081,1078,1076,1074,1073,1071,1070,1068,1066,1068,1069,1069,1069,1072,1074,1076,1077,1078,1079,1080,1082,1082,1082,1083,1083,1082,1081,1081,1080,1077,1075,1074,1072,1074,1075,1075,1075,1078,1079,1081,1082,1083,1084,1085,1086,1086,1087,1087,1088,1084,1082,1081,1079,1079,1078,1077,1076,1079,1081,1081,1083,1080,1079,1078,1078,1076,1075,1074,1074,1075,1075,1075,1076,1075,1074,1074,1074,1074,1074,1074,1074,1075,1075,1076,1076,1078,1080,1081,1082,1083,1084,1085,1085,1084,1084,1084,1083,1084,1084,1084,1085,1084,1083,1083,1082,1082, 1081, 1080);
[0141] 38) Calculate the arithmetic mean of these 203 points:
[0142]
[0143] a' ij ∈[1056.6,1096.6];
[0144] 39)|ChAvg(83) 13 -chAvg(83) 12 |=0<0.1, the loop ends, and 1076.6 is the channel base value.
[0145] The calculation results of the above steps are summarized in Table 1 below: Table 1
[0146] In addition, using the above channel values, the mean of all data can be calculated to be 1048.6, and the median of the channel data is 1064.
[0147] Although the steps in the above embodiments are described in the above order, those skilled in the art will understand that in order to achieve the effect of this embodiment, different steps do not need to be executed in such order. They can be executed simultaneously (in parallel) or in reverse order. These simple variations are all within the protection scope of this invention.
[0148] The second embodiment of the oil and gas pipeline magnetic flux leakage internal detection data channel baseline value calculation system of the present invention includes:
[0149] The data monitoring module is used to perform magnetic flux leakage detection on oil and gas pipelines using in-pipe detectors to obtain magnetic flux leakage data of the pipelines; the magnetic flux leakage data is divided into pipe section data, and the pipe section data of each section is divided into axial, radial and circumferential components.
[0150] The matrix construction module is used to list the component data of the nth pipe segment in the a direction into a matrix, wherein the data in the i-th row of the matrix is the component data of the i-th channel of the nth pipe segment in the a direction;
[0151] The arithmetic mean calculation module is used to calculate the arithmetic mean of the data in the i-th row of the matrix of the nth pipe segment in the a direction, and use it as the first arithmetic mean.
[0152] The loop calculation module is used to perform loop calculations on the data of the i-th row of the matrix of the n-th pipe section in the a direction based on the first arithmetic mean and a set threshold, until an arithmetic mean that meets the standard conditions is obtained. The arithmetic mean that meets the standard conditions is the channel base value of the i-th channel of the n-th pipe section in the a direction.
[0153] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process and related descriptions of the system described above can be found in the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0154] It should be noted that the oil and gas pipeline magnetic flux leakage detection data channel baseline value calculation system provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the modules or steps in the embodiments of the present invention can be further decomposed or combined. For example, the modules in the above embodiments can be merged into one module, or further divided into multiple sub-modules to complete all or part of the functions described above. The names of the modules and steps involved in the embodiments of the present invention are only for distinguishing the various modules or steps and are not considered as an improper limitation of the present invention.
[0155] An electronic device according to a third embodiment of the present invention includes: at least one processor; and a memory communicatively connected to at least one of the processors; wherein the memory stores instructions executable by the processor, the instructions being executed by the processor to implement the above-described method for calculating the baseline value of the internal detection data channel for oil and gas pipeline leakage magnetic flux.
[0156] A computer-readable storage medium according to a fourth embodiment of the present invention stores computer instructions, which are executed by the computer to implement the above-described method for calculating the baseline value of the internal detection data channel for magnetic flux leakage in oil and gas pipelines.
[0157] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process and related descriptions of the storage device and processing device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0158] Those skilled in the art will recognize that the modules and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. The programs corresponding to the software modules and method steps can be placed in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the art. To clearly illustrate the interchangeability of electronic hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in electronic hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the invention.
[0159] The following is for reference. Figure 4 It shows a schematic diagram of the structure of a computer system for implementing the methods, systems, and devices of this application. Figure 4 The server shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0160] like Figure 4 As shown, the computer system includes a Central Processing Unit (CPU) 601, which can perform various appropriate actions and processes based on programs stored in Read Only Memory (ROM) 602 or programs loaded from storage section 608 into Random Access Memory (RAM) 603. The RAM 603 also stores various programs and data required for system operation. The CPU 601, ROM 602, and RAM 603 are interconnected via a bus 604. An Input / Output (I / O) interface 605 is also connected to the bus 604.
[0161] The following components are connected to I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to I / O interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 610 as needed so that computer programs read from it can be installed into storage section 608 as needed.
[0162] Specifically, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 609, and / or installed from removable medium 611. When the computer program is executed by central processing unit (CPU) 601, it performs the functions defined in the methods of this application. It should be noted that the computer-readable medium described above in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on a computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0163] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0164] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0165] The terms “first”, “second”, etc., are used to distinguish similar objects, not to describe or indicate a specific order or sequence.
[0166] The term "comprising" or any other similar term is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus / device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent in such process, method, article, or apparatus / device.
[0167] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.
Claims
1. A method for calculating the base value of an internal magnetic flux leakage detection data channel in an oil and gas pipeline, characterized in that, The method includes: The leakage magnetic field of oil and gas pipelines is detected by using an in-pipe detector to obtain leakage magnetic field data. The leakage magnetic field data is divided into pipe section data, and the pipe section data of each section is divided into axial, radial and circumferential components. The component data of the nth pipe section in the a direction are arranged into a matrix, wherein the data in the i-th row of the matrix is the component data of the i-th channel of the nth pipe section in the a direction; the a direction can be any of the three directions: axial, radial, and circumferential. Calculate the arithmetic mean of the data in the i-th row of the matrix of the nth pipe segment in the a direction, and use it as the first arithmetic mean; Based on the first arithmetic mean and the set threshold, the data of the i-th row of the matrix of the nth pipe section in the a direction are cyclically calculated until the arithmetic mean that meets the standard conditions is obtained. The arithmetic mean that meets the standard conditions is the channel base value of the i-th channel of the nth pipe section in the a direction.
2. The method for calculating the base value of the internal detection data channel for magnetic flux leakage in oil and gas pipelines according to claim 1, characterized in that, The method for iteratively calculating the data in the i-th row of the matrix of the nth pipe section in the a direction until an arithmetic mean that meets the standard conditions is obtained includes: Calculate the (k-1)th standard interval based on the (k-1)th arithmetic mean and the first set threshold; Calculate the k-th arithmetic mean of the data in the i-th row within the (k-1)-th standard interval; k is a positive number greater than or equal to 2; Calculate the k-th standard interval based on the k-th arithmetic mean and the first set threshold; Calculate the (k+1)th arithmetic mean of the data in the i-th row within the k-th standard interval; When the difference between the (k+1)th arithmetic mean and the kth arithmetic mean is less than the second set threshold, the (k+1)th arithmetic mean meets the standard condition, and the (k+1)th arithmetic mean is the channel base value of the i-th channel of the n-th pipe section in the a direction.
3. The method for calculating the base value of the internal detection data channel for magnetic flux leakage in oil and gas pipelines according to claim 2, characterized in that, When the number of data in the i-th row within the k-1 standard interval is 0, the k-1 arithmetic mean is the channel base value of the i-th channel of the n-th pipe section in the a direction.
4. The method for calculating the base value of the internal detection data channel for magnetic flux leakage in oil and gas pipelines according to claim 3, characterized in that, The method for calculating the k-th standard interval based on the k-th arithmetic mean and the first set threshold is as follows: The left endpoint is obtained by subtracting the first set threshold from the k-th arithmetic mean, and the right endpoint is obtained by adding the first set threshold to the k-th arithmetic mean. The left endpoint and the right endpoint together form the kth standard interval.
5. A data channel baseline value calculation system for internal detection of magnetic flux leakage in oil and gas pipelines, characterized in that, The system includes: The data monitoring module is used to perform magnetic flux leakage detection on oil and gas pipelines using in-pipe detectors to obtain magnetic flux leakage data of the pipelines; the magnetic flux leakage data is divided into pipe section data, and the pipe section data of each section is divided into axial, radial and circumferential components. The matrix construction module is used to list the component data of the nth pipe segment in the a direction into a matrix, wherein the data in the i-th row of the matrix is the component data of the i-th channel of the nth pipe segment in the a direction; The arithmetic mean calculation module is used to calculate the arithmetic mean of the data in the i-th row of the matrix of the nth pipe segment in the a direction, and use it as the first arithmetic mean. The loop calculation module is used to perform loop calculations on the data of the i-th row of the matrix of the n-th pipe section in the a direction based on the first arithmetic mean and a set threshold, until an arithmetic mean that meets the standard conditions is obtained. The arithmetic mean that meets the standard conditions is the channel base value of the i-th channel of the n-th pipe section in the a direction.
6. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to at least one of the processors; wherein, The memory stores instructions that can be executed by the processor to implement the method for calculating the baseline value of the internal detection data channel for oil and gas pipeline leakage magnetic flux as described in any one of claims 1-5.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that are executed by the computer to implement the method for calculating the baseline value of the internal detection data channel for oil and gas pipeline leakage magnetic flux as described in any one of claims 1-5.