An oil and gas pipeline safety monitoring method, system, device and storage medium
By combining distributed fiber optic sensors and deep learning methods with wavelet decomposition, Bayesian hypothesis testing, and K-means algorithm, a 1-D CNN and SVM model was constructed to solve the problem of low accuracy in leakage and intrusion identification in oil and gas pipeline monitoring, and to achieve efficient anomaly localization and identification.
Patent Information
- Application Number
- CN202310962257.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-01
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2043-08-01
AI Technical Summary
Existing oil and gas pipeline monitoring methods suffer from signal delays and low location accuracy when detecting leaks and intrusions, making it difficult to simultaneously identify both leaks and intrusion events.
Distributed fiber optic sensors were used to collect vibration data. Data preprocessing was performed using wavelet decomposition and EMD noise reduction techniques. Anomaly localization was performed using a joint localization algorithm based on empirical thresholds, Bayesian hypothesis testing, and K-means. A classification model combining 1-D CNN and SVM was constructed to identify anomaly types.
It enables precise positioning and comprehensive monitoring of oil and gas pipelines, accurately identifies leaks and intrusion events, and improves the accuracy and precision of monitoring.
Smart Images

Figure CN116989274B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of oil and gas pipeline safety monitoring, and in particular to an oil and gas pipeline safety monitoring method, system, device and storage medium. BACKGROUND
[0002] In the field of pipeline monitoring, real-time monitoring of in-service pipelines can not only understand the structural health state of the pipeline, discover pipeline problems in a timely manner, and maintain or replace the pipeline, thereby reducing economic losses and environmental pollution, but also can discover pipeline leaks or human intrusion behaviors in advance through signals and take appropriate maintenance measures. The commonly used methods at present are mainly stress wave method, pressure wave and the like. On the one hand, the signals detected by such methods exist delay, and the position of the accident is difficult to locate and the precision is low; on the other hand, such methods can only detect the leakage of the pipeline, and it is difficult to identify the intrusion behavior, which cannot realize the identification of both leakage and intrusion behavior. SUMMARY
[0003] To at least partially solve one of the technical problems existing in the prior art, the purpose of the present application is to provide an oil and gas pipeline safety monitoring method, system, device and storage medium.
[0004] The technical solution adopted by the present application is:
[0005] An oil and gas pipeline safety monitoring method, comprising the following steps:
[0006] acquiring vibration data collected by a distributed optical fiber sensor, pre-processing the vibration data to obtain space-time vibration data;
[0007] adopting a joint positioning algorithm based on empirical threshold, Bayesian hypothesis testing and K-means mean to locate abnormal data of the space-time vibration data to obtain a position sequence of the abnormality;
[0008] inputting the position sequence of the abnormality into a preset classification model for feature extraction, and obtaining the type of the abnormality according to the extracted features.
[0009] Further, the pre-processing of the vibration data comprises:
[0010] data cleaning and data denoising processing of the vibration data;
[0011] wherein a joint denoising method based on wavelet decomposition and EMD is adopted to realize data denoising.
[0012] Further, the data denoising processing of the vibration data comprises:
[0013] The vibration signal in the vibration data is decomposed using EMD to obtain a plurality of IMF components {IMF1, IMF2, …, IMF n};
[0014] The correlation coefficient R and the correlation index P of each IMF component and the original signal are calculated according to the PCC correlation coefficient method;
[0015] The effective IMF component is screened out according to the correlation coefficient R and the correlation index P;
[0016] The remaining IMF component is processed using a wavelet denoising method;
[0017] The denoised IMF component is reconstructed to obtain the time-space vibration data.
[0018] Further, the wavelet denoising method is used to process the remaining IMF component, including:
[0019] An adaptive heuristic threshold is designed, which dynamically adapts to the signal characteristics according to the decomposition scale compared with the original heuristic threshold, and the formula is as follows:
[0020]
[0021] Where j is the decomposition scale, i.e. the number of wavelet decomposition layers, which is determined by the adaptive optimal decomposition layer selection method; λ m is the Stein unbiased likelihood threshold; N is the number of wavelet coefficients after preset layer wavelet decomposition, and P is the sum of squares of all wavelet coefficients of the layer.
[0022] Further, the joint positioning algorithm based on the experience threshold, Bayesian hypothesis testing and K-means mean is used to locate the abnormal data of the time-space vibration data to obtain the abnormal position sequence, including:
[0023] A1, set an experience-based threshold T, which is determined according to the data of the distributed optical fiber sensor in the normal working environment; it is stipulated that when the data of a position point i exceeds the threshold T, the time sequence of point i is marked, and then the position sequence {X i ,X j ,…,X k} that may appear abnormal is obtained; wherein i, j and k are the position point numbers that may appear abnormal;
[0024] A2. Establish the null hypothesis and alternative hypothesis of mean and variance, obtain the hyperparameters of historical data based on historical data, and then input real-time spatiotemporal vibration data; when the real-time data is abnormal, the probability of the alternative hypothesis will be greater than the null hypothesis, thereby testing whether the current data is abnormal. The sequence obtained is used as the abnormal position sequence {X i ',X j ',…,X k '};
[0025] A3, introduce K-means clustering algorithm, and transform the abnormal position sequence {X i ',X j ',…,X k '} is divided into several groups, each group is a cluster, so as to achieve the result of similarity within clusters and differences between clusters; finally, the location points where anomalies occur are obtained through clustering.
[0026] Furthermore, the null hypothesis and alternative hypothesis of establishing the mean μ include:
[0027] Null hypothesis Alternative hypothesis in is the estimated value of μ; ε is the floating value of the mean;
[0028] The hypothetical probabilities are as follows:
[0029]
[0030] Where g(μ) is the posterior probability distribution, and the following will be g(μ) and the estimated value Solve;
[0031] The posterior probability distribution is verified to be:
[0032]
[0033] where the variance σ 2 The independent posterior distribution of is the inverse gamma distribution, and the posterior independent distribution of the mean μ is subject to the degrees of freedom υ n , the position parameter is τ n , the scale parameter is The estimated values of the four hyperparameters in the formula are obtained as follows:
[0034]
[0035] in is the variance sample set The mean of is the variance sample set The corrected variance, is the mean sample set {μ i}, is the mean sample set {μ i}, from which we can get υ n ,ρ n ,τ n ,δ n estimated value of;
[0036] In obtaining the mean μ and variance σ 2 After the posterior probability distribution, the median, mode or expectation of the posterior distribution is taken as the mean μ and variance σ 2 Estimated value, based on the mode and expectation formula of inverse gamma and t distribution, the mean μ and variance σ are obtained 2 Estimated value:
[0037]
[0038] in With μ M is the mode estimate, With μ E is the expected estimated value.
[0039] Furthermore, the classification model is a classification model that combines 1-D CNN and SVM classifier, and the classification model is constructed in the following way:
[0040] Based on the LeNet-5 model, a one-dimensional convolutional neural network is first constructed as a baseline network. The overall structure of the network includes: input layer, convolution layer C1, maximum pooling layer P1, convolution layer C2, maximum pooling layer P2, convolution layer C3, average pooling layer P3, Dropout layer, fully connected layer FC1, and output layer. The baseline network is trained to obtain a CNN model.
[0041] After obtaining the CNN model, the fully connected layer in the CNN model is removed and the 1-D CNN is used as a simple feature extractor. After obtaining the 1-D CNN features, SVM is used as the classification selector to optimize the classification model.
[0042] Another technical solution adopted in the present invention is:
[0043] An oil and gas pipeline safety monitoring system, comprising:
[0044] A data processing module is used to obtain vibration data collected by the distributed optical fiber sensor, pre-process the vibration data, and obtain spatiotemporal vibration data;
[0045] An anomaly location module is used to locate abnormal data in the spatiotemporal vibration data by using a joint location algorithm based on an empirical threshold, Bayesian hypothesis test, and K-means, and obtain an abnormal position sequence;
[0046] An anomaly classification module is configured to input the position sequence of the anomaly into a preset classification model to perform feature extraction, and obtain the type of the anomaly according to the extracted features.
[0047] Another technical solution adopted by the present application is:
[0048] An oil and gas pipeline safety monitoring device comprises:
[0049] At least one processor;
[0050] At least one memory for storing at least one program;
[0051] When the at least one program is executed by the at least one processor, the at least one processor implements the method as described above.
[0052] Another technical solution adopted by the present application is:
[0053] A computer-readable storage medium, wherein a processor-executable program is stored, the processor-executable program is used to execute the method as described above when executed by a processor.
[0054] The present application has the beneficial effects that: the present application can accurately locate the position where the anomaly occurs in combination with Bayesian hypothesis testing, and can more accurately monitor the accident in all directions. BRIEF DESCRIPTION OF DRAWINGS
[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following introduces the drawings of the related technical solutions in the embodiments of the present application or the prior art. It should be understood that the drawings in the following introduction are only for the convenience of clearly describing part of the embodiments of the technical solutions of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0056] Figure 1 is the network model structure diagram of the classification model in the embodiment of the present application;
[0057] Figure 2 is the structure diagram of the distributed optical fiber signal acquisition experimental device in the embodiment of the present application;
[0058] Figure 3 is the flowchart of the oil and gas pipeline safety monitoring method in the embodiment of the present application;
[0059] Figure 4 is the schematic diagram of the simulation platform in the embodiment of the present application;
[0060] Figure 5is a step flow chart of an oil and gas pipeline safety monitoring method in an embodiment of the present application. DETAILED DESCRIPTION
[0061] Embodiments of the present application are described in detail below with reference to examples shown in the attached drawings, wherein the same or similar notations represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the attached drawings are exemplary and are only used to explain the present application and cannot be understood as a limitation of the present application. For the step numbers in the following embodiments, they are only set for the convenience of explanation and description, and the order between the steps is not limited in any way, and the execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.
[0062] In the description of the present application, it should be understood that the orientation description, such as the orientation or position relationship indicated by up, down, front, back, left, right, etc. is based on the orientation or position relationship shown in the drawings, and is only for the convenience of describing the present application and simplifying the description, and therefore cannot be understood as indicating or implying that the device or element indicated must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation of the present application.
[0063] In the description of the present application, the meaning of several is one or more, and the meaning of multiple is two or more. Greater than, less than, more than, etc. are understood as not including the number, and above, below, etc. are understood as including the number. If it is described as first, second, it is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features or the order of indicated technical features.
[0064] In addition, in the description of the present application, unless otherwise specified, "multiple" means two or more. The "and / or" describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. The character " / " generally represents that the front and rear associated objects are in an "or" relationship.
[0065] In the description of the present application, unless otherwise explicitly limited, the words such as setting, installing, connecting, etc. should be broadly understood, and those skilled in the art can reasonably determine the specific meaning of the above words in the present application in combination with the specific content of the technical solution.
[0066] Term explanation:
[0067] EMD: Empirical Mode Decomposition, which is the abbreviation of Empirical Mode Decomposition.
[0068] IMF: Intrinsic Mode Functions, the intrinsic mode component, refers to the signal component of each layer obtained after the original signal is decomposed by EMD.
[0069] Optical fiber sensing technology originated in the 60s and 70s of last century. G. H. Koch et al. proposed to replace the current with light as the medium of information transmission, and fiber waveguide as the medium of light wave transmission. When the optical fiber is affected by the changes of external environmental factors such as pressure, vibration, temperature, electromagnetic field, etc., the changes of light intensity, light phase, light frequency and polarization state will be caused. According to the processing of the data signal received by the sensor, the changes of external parameters can be obtained, and the measurement of various physical quantities can be realized. In recent decades, optical fiber sensing technology has been applied to pipeline to a certain extent, which is mainly divided into three types: scattering type, interference type and other types.
[0070] The scattering type optical fiber sensing technology based on Rayleigh optical time domain reflection technology proposed by Barnoski can realize real-time measurement of long-distance oil and gas pipeline vibration and strain parameters. It solves the problem of slow reaction and poor positioning accuracy of traditional measurement methods. On the other hand, the combination of optical fiber sensing technology and artificial intelligence can effectively identify and classify intrusion and leakage through the use and training of different models such as SVM, CNN and Bayesian classification. Therefore, the combination of optical fiber sensing technology and deep learning method can effectively solve the problems existing in the field of pipeline monitoring.
[0071] Therefore, in view of the difficulty in identifying oil and gas pipeline leakage and intrusion, the present application provides a method for monitoring pipeline safety by deep learning based on optical fiber sensing technology. The method first processes the vibration data collected by the distributed optical fiber sensor, including data cleaning and data denoising. Then, it judges whether the processed data is abnormal and further locates the abnormality. Finally, a deep learning identification model combining one-dimensional convolutional neural network (1-D CNN) and support vector machine (SVM) is constructed to identify the abnormality at the determined position.
[0072] As shown in Figure 5 , the present embodiment provides a method for monitoring the safety of oil and gas pipelines, comprising the following steps:
[0073] S1, obtaining vibration data collected by a distributed optical fiber sensor, pre-processing the vibration data to obtain spatio-temporal vibration data.
[0074] Referring to Figure 2 , Figure 2 is a structural schematic diagram of the distributed optical fiber sensor, which collects vibration data. The pre-processing in step S1 specifically includes the following steps:
[0075] S11, cleaning the collected data, removing the first 5% of sample data for each sample data to prevent the influence of filtering interference on deformation, and then reducing the number of remaining n data points to n / 10.
[0076] S12, denoising the collected data, various noises are mixed in the original short-time signal, which greatly affects the classification and recognition performance in the later stage. Through wavelet packet denoising and EMD decomposition, and then through PCC correlation coefficient screening, the data is denoised and most of the effective information is retained. The specific steps of the denoising method proposed in this embodiment are as follows:
[0077] S121, using EMD to decompose the vibration signal to obtain a plurality of IMF components {IMF1, IMF2, …, IMF n}.
[0078] S122, according to the PCC correlation coefficient method, the correlation coefficient R and the correlation index P of each IMF component and the original signal are calculated. According to the characteristics and result analysis of the data, it is defined that when the calculated P value is greater than 0.05, the IMF component is regarded as an invalid component, and when the P value is less than 0.05 and the absolute value of R is less than 0.3, the IMF component is also regarded as an invalid IMF component, and the effective component is screened out.
[0079] S123, using wavelet denoising method to the remaining components, a self-adaptive heuristic threshold is proposed, compared with the original heuristic threshold, it can dynamically adapt to the characteristics of the signal according to the decomposition scale, the formula is as follows:
[0080]
[0081] Where j is the decomposition scale, that is, the number of wavelet decomposition layers, and the number of decomposition layers is determined by the adaptive optimal decomposition layer selection method. λ m is the Stein unbiased likelihood threshold. Where: N is the number of wavelet coefficients after wavelet decomposition at a certain layer, and P is the sum of squares of all wavelet coefficients at the layer.
[0082] S124, reconstructing the denoised IMF component.
[0083] S13, normalizing the reconstructed data set, the normalization formula is shown in formula (1):
[0084]
[0085] Where x and y are the values before and after conversion, respectively, V max , V min are the maximum and minimum values of the sample, respectively.
[0086] S2, adopt a joint positioning algorithm based on empirical threshold, Bayesian hypothesis testing and K-means mean to locate the abnormal data of the space-time vibration data, and obtain the abnormal position sequence.
[0087] In the embodiment, a joint positioning algorithm based on empirical threshold, Bayesian hypothesis testing and K-means mean is proposed, and the construction steps of the algorithm are as follows:
[0088] S21, set an empirical threshold T, which is determined according to the data of the distributed optical fiber sensor in the normal working environment. It is stipulated that when the data of a position point i exceeds the threshold, the time sequence at this point is marked, and then the position sequence {X i ,X j ,…,X k} that may appear abnormal is obtained, wherein i, j, k, etc. are the position point numbers that may appear abnormal.
[0089] S22, set the mean μ0 and variance of the data. These two hypothesis tests. Through the form of a sliding window, the current point and the previous n-1 points form a data set X={x1,x2,K,x n}, which is assumed to follow a normal distribution N(μ,σ 2 ). Each data set corresponds to one data point, that is, if there are i data points, there are i data sets, and the mean and variance values can be obtained therefrom. The floating values ε and δ of the mean and variance are obtained from the prior information, and the values of the two are used to make assumptions. Set the original hypothesis and the alternative hypothesis of the mean and variance. Taking the mean μ as an example, the original hypothesis is where is the estimate of μ. The probability of the hypothesis is as follows:
[0090]
[0091] where g(μ) is the posterior probability distribution. The solution of g(μ) and the estimate will be given below.
[0092] The posterior probability distribution is verified as follows:
[0093]
[0094] where the independent posterior distribution of σ 2 is the inverse gamma distribution, and the posterior independent distribution of the mean μ is the t distribution with degrees of freedom υ n , the location parameter is τ n , and the scale parameter is .
[0095] The estimated values of the four hyperparameters included in the above formula are obtained as follows:
[0096]
[0097] in is the variance sample set The mean of is the variance sample set The corrected variance, is the mean sample set {μ i}, is the mean sample set {μ i}. From this we can get υ n ,ρ n ,τ n ,δ n estimated value.
[0098] In obtaining the mean μ and variance σ 2 After the posterior probability distribution, the median, mode or expectation of the posterior distribution is taken as the mean μ and variance σ 2 Estimated value. The mean μ and variance σ are obtained based on the mode and expectation formula of the inverse gamma and t distributions. 2 Estimated value:
[0099]
[0100] in With μ M is the mode estimate, With μ E is the expected estimated value.
[0101] Based on the input historical data, the hyperparameters of the historical data are obtained, and then the real-time data is input. When the real-time data is abnormal, the probability of the alternative hypothesis will be greater than the original hypothesis, that is, the probability of the abnormality increases. In this way, whether the current data is abnormal is tested, and the sequence checked is the abnormal position sequence {X i ',X j ',…,X k '}.
[0102] S23. Introducing the K-means clustering algorithm, we divide the data into several groups based on custom principles. Each group is a cluster, achieving similarity within clusters and dissimilarity between clusters. Ultimately, clustering identifies the locations where anomalies occur.
[0103] S3. Input the abnormal position sequence into a preset classification model to extract features, and obtain the type of abnormality based on the extracted features.
[0104] In this embodiment, a classification model combining a 1-D CNN and an SVM classifier is constructed. The classification model is constructed by the following steps:
[0105] S31. Based on the LeNet-5 model, a one-dimensional convolutional neural network was first constructed as a baseline network. The overall structure is: input layer - convolution layer C1 - maximum pooling layer P1 - convolution layer C2 - maximum pooling layer P2 - convolution layer C3 - average pooling layer P3 - dropout layer - fully connected layer FC1 - output layer. The input is directly a one-dimensional signal, and the intermediate convolution calculations are also one-dimensional convolutions. Hyperparameters are optimized using the collected training data, and the optimized network model is finally constructed. It contains six convolutional layers, five average pooling layers, one global average pooling layer, and one fully connected layer. The first convolution layer has a kernel size of 5, and the remaining kernels have a kernel size of 3. The activation function is the Mish function, and the training batch size is set to 128.
[0106] S32. Optimize the model by combining the traditional machine learning method, support vector machine (SVM). After obtaining the CNN model, remove the CNN's fully connected layers and use the 1-D CNN as a simple feature extractor. After obtaining the 1-D CNN features, use the SVM as the classifier to simplify the parameters. A penalty coefficient of 0.9 and a linear kernel function are selected. A "one-to-one" strategy is used to expand the model to achieve multi-classification. This achieves higher training speeds when there are fewer types, making it suitable for the identification and classification of oil and gas pipelines.
[0107] In summary, this embodiment proposes a method for oil and gas pipeline safety monitoring using distributed fiber optic sensors and deep learning. Compared to traditional pressure sensing methods, this method not only provides more accurate and comprehensive accident monitoring, but also precisely locates the anomaly using Bayesian hypothesis testing. It can also identify leaks and various intrusion events. Furthermore, a 1D CNN-SVM model, combining machine learning and deep learning, is proposed, further improving recognition accuracy.
[0108] The above method is explained in detail below with reference to the accompanying drawings and specific embodiments.
[0109] like Figure 3 As shown, this embodiment provides a pipeline safety monitoring method for an oil and gas pipeline simulation device, which specifically includes the following steps:
[0110] Step 1: Build a distributed fiber optic sensing system oil and gas pipeline simulation platform to collect experimental data and verify the feasibility of the system. The schematic diagram of the platform is shown in Figure 4The main components include a distributed optical fiber signal acquisition device, a pipeline simulation device, an air compressor, etc. The distributed optical fiber signal acquisition device is based on OTDR technology and uses a single-core single-mode communication optical cable as a sensor to obtain vibration information around any point along the cable in real time. Its positioning accuracy is 1 m, and the spatial resolution is 10 m. The pipeline simulation device includes a box, soil, a pipeline, and a leak hole. The air compressor is used to simulate natural gas transportation. The simulated specific event types include normal operation, small leakage, large leakage, jumping, shovel hitting the ground, and shovel digging.
[0111] Step 2, data processing. The acquisition frequency of the sensing system is 10 MHz, and the Rayleigh scattering light at the vibration position within 1 s is taken as event data, with one saved every 1 s. It is important to note that the data obtained from each second sample is spatio-temporal data, which includes all data of the pipeline length over time. The resolution of the pipeline length is related to the resolution of the optical fiber system itself, and the resolution of the experimental device is 1 m, i.e., one sampling point per meter. The most sensitive two sampling points are taken as samples, i.e., two samples can be obtained every second, and each sample is a one-dimensional vector containing the vibration situation within one length unit of the pipeline over a period of one second. To cooperate with the subsequent network input, the 1 s length of vibration data is removed from the first 1000 sampling points (deformed due to filtering interference), and the remaining 9000 sampling points are averaged and down-sampled to 900 sampling points. Each sample is then denoised and normalized.
[0112] Step 3, abnormal positioning. First, select normal historical data to input the positioning model to obtain trained hyperparameters. Then, input the processed real-time data into the positioning model to determine which specific location in the real-time data has an anomaly, and collect the sequence of abnormal positions {X i ',X j ',…,X k '}.
[0113] Step 4, building a network model. The schematic diagram of the network model is shown in Figure 1 The initial definitions of various structure parameters and hyperparameters are as follows in Table 1:
[0114] Table 1
[0115]
[0116] Subsequently, the number of convolution kernels, the number of pooling kernels, and the number of neurons in the fully connected layer are adaptively adjusted within the range of kerasTuner. Finally, the last fully connected layer is discarded to obtain the trained feature extraction layer. An SVM model is constructed, with a penalty coefficient of 0.9, a linear kernel function, and an ovo fusion strategy.
[0117] Step four, input the position sequence of the real-time abnormality into the feature extraction layer, and input the feature data into the constructed SVM model for classification after the feature processing layer extracts the features, to identify the current pipeline operation condition in real time.
[0118] The embodiment also provides an oil and gas pipeline safety monitoring system, comprising:
[0119] A data processing module is configured to acquire vibration data collected by the distributed optical fiber sensor, pre-process the vibration data, and obtain space-time vibration data.
[0120] An abnormality positioning module is configured to adopt a joint positioning algorithm based on an empirical threshold, Bayesian hypothesis testing and K-means mean to position abnormal data in the space-time vibration data, and obtain a position sequence of the abnormality.
[0121] An abnormality classification module is configured to input the position sequence of the abnormality into a preset classification model for feature extraction, and obtain a type of the abnormality according to the extracted features.
[0122] The oil and gas pipeline safety monitoring system provided in the embodiment can execute the oil and gas pipeline safety monitoring method provided in the method embodiment, can execute any combination of the method embodiment, and has the functions and advantages of the method.
[0123] The embodiment also provides an oil and gas pipeline safety monitoring device, comprising:
[0124] At least one processor;
[0125] At least one memory configured to store at least one program;
[0126] When the at least one program is executed by the at least one processor, the at least one processor implements the method shown in Figure 5 .
[0127] The oil and gas pipeline safety monitoring device provided in the embodiment can execute the oil and gas pipeline safety monitoring method provided in the method embodiment, can execute any combination of the method embodiment, and has the functions and advantages of the method.
[0128] The embodiment of the application also discloses a computer program product or a computer program, which comprises computer instructions stored in a computer readable storage medium. A processor of a computer device can read the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method shown in Figure 5 .
[0129] The embodiment also provides a storage medium storing instructions or programs for executing the method for monitoring safety of oil and gas pipeline provided by the embodiment of the application, when the instructions or programs are executed, any combination of the method embodiments can execute the steps, and has the corresponding functions and advantages of the method.
[0130] In some alternative embodiments, the functions / operations mentioned in the block diagrams can not occur in the order mentioned in the operation diagram. For example, depending on the functions / operations involved, two blocks shown in succession can actually be executed substantially simultaneously with each other or the blocks can sometimes be executed in reverse order. In addition, the embodiments presented and described in the flowcharts of the present application are provided by way of example, with the purpose of providing a more comprehensive understanding of the technology. The disclosed method is not limited to the operations and logical flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and in which sub-operations described as part of larger operations are independently executed.
[0131] In addition, although the present application is described in the context of functional modules, it should be understood that one or more of the functions and / or features described can be integrated in a single physical device and / or software module, or one or more functions and / or features can be implemented in separate physical devices or software modules, unless otherwise specified. It can also be understood that a detailed discussion of the actual implementation of each module is unnecessary for an understanding of the present application. Rather, given the properties, functions and internal relationships of the various functional modules disclosed in the devices herein, the actual implementation of the module will be within the routine skill of the engineer, given the disclosure herein. Therefore, those skilled in the art with ordinary skill can implement the present application as set forth in the claims without undue experimentation, using ordinary skill. It can also be understood that the disclosed specific concepts are merely illustrative and are not intended to limit the scope of the present application, which is determined by the full scope of the appended claims and their equivalents.
[0132] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the parts of the technical solutions that essentially contribute to the prior art or the parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0133] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a list of executable instructions for implementing logic functions, which can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus or device, such as a computer-based system, a system including a processor or other system that can fetch the instructions from the instruction execution system, apparatus or device and execute the instructions, or in conjunction with these instructions execution systems, apparatus or devices. For the purpose of this specification, the "computer-readable medium" can be any device that can contain, store, communicate, propagate or transport programs for use by or in connection with an instruction execution system, apparatus or device, or in conjunction with these instruction execution systems, apparatus or devices.
[0134] More specific examples (a non-exhaustive list) of the computer-readable medium include the following: an electrical connection having one or more wires (electrical devices), a portable computer diskette (magnetic devices), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable medium can even be paper or other suitable medium on which the program can be printed, because the program can be electronically obtained, for example, by optical scanning of the paper or other medium, followed by editing, interpreting or otherwise processing, if necessary, in other suitable ways, to be electronically obtained and then stored in the computer memory.
[0135] It should be understood that various parts of the present application can be implemented in hardware, software, firmware or a combination thereof. In the above embodiments, various steps or methods can be implemented in software or firmware that is stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any of the following technologies, known in the art, or their equivalents, can be employed for implementation: discrete logic circuitry having logic gates for implementing logic functions upon data signals, application specific integrated circuits having appropriate combinational logic gates, programmable gate arrays (PGA), field programmable gate arrays (FPGA), and the like.
[0136] In the above description of the present specification, the description of the terms "one embodiment / one example", "another embodiment / another example", or "certain embodiments / certain examples" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiments or examples are included in at least one embodiment or example of the present application. In the present specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Also, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0137] Although the embodiments of the present application have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and variations can be made thereto without departing from the principles and spirit of the present application, the scope of which is defined by the claims and their equivalents.
[0138] The above is a specific description of the preferred embodiments of the present application, but the present application is not limited to the above-described embodiments, and those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present application, and these equivalent modifications or substitutions are included in the scope defined by the claims of the present application.
Claims
1. A method for monitoring oil and gas pipeline safety, characterized in that: The following steps are involved: Acquiring vibration data collected by a distributed optical fiber sensor, and preprocessing the vibration data to obtain spatiotemporal vibration data; A joint positioning algorithm based on empirical threshold, Bayesian hypothesis test and K-means is used to locate abnormal data in the spatiotemporal vibration data to obtain an abnormal position sequence; Input the abnormal position sequence into the preset classification model for feature extraction, and obtain the type of abnormality based on the extracted features; The method adopts a joint positioning algorithm based on an empirical threshold, a Bayesian hypothesis test, and a K-means mean to locate abnormal data in the spatiotemporal vibration data and obtain an abnormal position sequence, including: A1. Set a threshold T based on experience; stipulate that when the data of a certain location point i exceeds the threshold T, mark the time series at point i, and then obtain the location sequence {X i ,X j ,…,X k }, as real-time spatiotemporal vibration data; where i, j, and k are the location numbers where abnormalities may occur; A2. Establish the null hypothesis and alternative hypothesis of mean and variance, obtain the hyperparameters of historical data based on historical data, and then input real-time spatiotemporal vibration data; when the real-time data is abnormal, the probability of the alternative hypothesis will be greater than the null hypothesis, thereby testing whether the current data is abnormal. The sequence obtained is used as the abnormal position sequence {X i ',X j ',…,X k '}; A3, introduce K-means clustering algorithm, and transform the abnormal position sequence {X i ',X j ',…,X k '} is divided into several groups, each group is a cluster, so as to achieve the result of similarity within clusters and differences between clusters; finally, the location points where anomalies occur are obtained through clustering.
2. The oil and gas pipeline safety monitoring method according to claim 1, characterized in that: The preprocessing of the vibration data includes: Performing data cleaning and data noise reduction processing on the vibration data; Among them, a joint denoising method based on wavelet decomposition and EMD is used to achieve data denoising.
3. The oil and gas pipeline safety monitoring method according to claim 2, characterized in that: The performing data noise reduction processing on the vibration data includes: Use EMD to decompose the vibration signal in the vibration data and obtain several IMF components {IMF1,IMF2,…,IMF n }; Calculate the correlation coefficient R and correlation index P of each IMF component with the original signal according to the PCC correlation coefficient method; Screen out effective IMF components based on the correlation coefficient R and correlation index P; The remaining IMF components are processed using the wavelet denoising method; The denoised IMF components are reconstructed to obtain spatiotemporal vibration data.
4. The oil and gas pipeline safety monitoring method according to claim 3, characterized in that: In the step of using the wavelet denoising method to process the remaining IMF components, an adaptive heuristic threshold is designed, and the formula is as follows: Among them, j is the decomposition scale, that is, the number of wavelet decomposition layers, and the number of decomposition layers is determined by the adaptive optimal decomposition layer selection method; The number of numbers, P is the sum of the squares of all wavelet coefficients in this layer.
5. The oil and gas pipeline safety monitoring method according to claim 1, characterized in that: The null hypothesis and alternative hypothesis for establishing the mean μ include: Null hypothesis H0: Alternative hypothesis H1: in is the estimated value of μ; ε is the floating value of the mean; The hypothetical probabilities are as follows: Where g(μ) is the posterior probability distribution, the following is the g(μ) and the estimated value Solve; The posterior probability distribution is verified to be: where the variance σ 2 The independent posterior distribution of is the inverse gamma distribution, and the posterior independent distribution of the mean μ is subject to the degrees of freedom υ n , the position parameter is τ n , the scale parameter is The estimated values of the four hyperparameters in the formula are obtained as follows: in is the variance sample set The mean of is the variance sample set The corrected variance, is the mean sample set {μ i }, is the mean sample set {μ i }, from which we can get υ n ,ρ n ,τ n ,δ n estimated value of; In obtaining the mean μ and variance σ 2 After the posterior probability distribution, the median, mode or expectation of the posterior distribution is taken as the mean μ and variance σ 2 Estimated value, based on the mode and expectation formula of inverse gamma and t distribution, the mean μ and variance σ are obtained 2 Estimated value: in With μ M is the mode estimate, With μ E is the expected estimated value.
6. The oil and gas pipeline safety monitoring method according to claim 1, characterized in that: The classification model is a combination of 1-DCNN and SVM classifier, which is constructed in the following way: Based on the LeNet-5 model, a one-dimensional convolutional neural network is first constructed as a baseline network. The overall structure of the network includes: input layer, convolution layer C1, maximum pooling layer P1, convolution layer C2, maximum pooling layer P2, convolution layer C3, average pooling layer P3, Dropout layer, fully connected layer FC1, and output layer. The baseline network is trained to obtain a CNN model. After obtaining the CNN model, the fully connected layer in the CNN model is removed, and the 1-D CNN is used as a simple feature extractor. After obtaining the 1-D CNN features, SVM is used as the classification selector to optimize the classification model.
7. An oil and gas pipeline safety monitoring system, applied to the method according to any one of claims 1 to 6, characterized in that: include: A data processing module is used to obtain vibration data collected by the distributed optical fiber sensor, pre-process the vibration data, and obtain spatiotemporal vibration data; An anomaly location module is used to locate abnormal data in the spatiotemporal vibration data by using a joint location algorithm based on an empirical threshold, Bayesian hypothesis test, and K-means, and obtain an abnormal position sequence; The anomaly classification module is used to input the abnormal position sequence into the preset classification model for feature extraction, and obtain the type of anomaly based on the extracted features.
8. An oil and gas pipeline safety monitoring device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method according to any one of claims 1 to 6.
9. A computer-readable storage medium storing a program executable by a processor, characterized in that: The processor-executable program is used to perform the method according to any one of claims 1 to 6 when executed by the processor.
Citation Information
Patent Citations
Fault early warning method for a rotating machine based on Bayesian LSTM model
CN111914875A
Pipeline safety monitoring method based on distributed optical fiber sensor and deep learning
CN114857504A