An oil and gas well overflow and leakage diagnosis method combining time sequence feature processing and machine learning
By processing the time series of oil and gas well leakage diagnosis parameters using CEEMDAN and KPCA, and combining them with the PSO-ELM network, the problems of time series non-stationarity and redundancy in existing models are solved, achieving efficient and accurate oil and gas well leakage diagnosis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YANGTZE UNIVERSITY
- Filing Date
- 2026-02-06
- Publication Date
- 2026-06-05
AI Technical Summary
Existing oil and gas well leakage diagnosis models fail to effectively handle the time series non-stationarity and redundancy of raw data, affecting diagnostic accuracy and efficiency. Furthermore, the high complexity of these models makes them unsuitable for field deployment.
The time series of oil and gas well leakage diagnosis parameters were decomposed using CEEMDAN, representative IMFs were selected using KPCA, and the model was trained using PSO-ELM network to reduce dimensionality and extract leakage features, thus constructing an oil and gas well leakage diagnosis model.
It improves the accuracy and efficiency of oil and gas well leakage diagnosis, reduces model complexity, is applicable to drilling sites, and is easy to deploy.
Smart Images

Figure CN122153624A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of oil and gas well leakage diagnosis, and in particular to an oil and gas well leakage diagnosis method that integrates time-series feature processing and machine learning. Background Technology
[0002] Loss of drilling fluid is a long-standing problem plaguing the oil industry. It not only leads to significant drilling fluid loss and increased drilling costs, but can also trigger safety accidents such as formation collapse and oil / gas blowouts. Furthermore, it causes serious environmental pollution, such as contamination of surface and groundwater, disrupting the ecological balance. Therefore, accurately and quickly locating the source of well leakage is of paramount importance for improving oil and gas exploration and development efficiency, ensuring operational safety, and protecting the environment.
[0003] With the rapid development of artificial intelligence, oil and gas well engineering is increasingly integrated with machine learning. Currently, there is research on machine learning-based leakage diagnosis in oil and gas wells, but existing models still have some problems and shortcomings. For example, traditional models often ignore the time-series non-stationarity of the raw data when selecting integrated logging parameters, thus affecting the model's prediction or diagnostic accuracy. Furthermore, effectively extracting leakage characteristics from the data, eliminating redundancy in the raw data, and reducing the dimensionality of the model input are crucial for improving the model's data processing efficiency.
[0004] Patent application CN110443488A discloses a method, system, and device for identifying drilling leakage risk based on convolutional neural networks. The method includes: acquiring real-time operating condition data collected by a comprehensive logging instrument; expanding the dataset for each real-time operating condition data collected by the comprehensive logging instrument using a sliding overlap sampling method; performing normalization preprocessing on the real-time operating condition data; and inputting the normalized preprocessed real-time operating condition data into a trained convolutional neural network model to output the drilling leakage risk identification result. The drawback of this method is that the model fails to consider the time-series non-stationarity of the original comprehensive logging data and does not perform redundancy removal on the original logging data, which may limit the model's identification efficiency.
[0005] Application number CN116307670A provides a method and system for monitoring leakage risks in oil and gas wells based on bidirectional long short-term memory networks. The method includes the following steps: selecting comprehensive logging parameters that clearly characterize past anomalies in oil and gas wells as leakage monitoring parameters; constructing a leakage risk sample set based on the selected leakage monitoring parameters; performing data augmentation and data processing on the leakage risk sample set; constructing a leakage anomaly monitoring model based on a Bi-LSTM network, and training the model using the established leakage risk sample set, selecting the model with the best performance as the final intelligent model for leakage anomaly monitoring. The drawback of this method is that it also fails to consider the time-series non-stationarity of the original comprehensive logging data, and the cascaded deep learning makes the model itself highly complex, which may be detrimental to deployment at drilling sites. Summary of the Invention
[0006] To address the aforementioned technical issues, this invention proposes an oil and gas well leakage diagnosis method that integrates time-series feature processing and machine learning. This method considers the time-series non-stationarity of the original comprehensive logging data while eliminating redundancy in the original data and reducing the dimensionality of the model input. Furthermore, it employs a PSO-optimized ELM network model, which offers advantages such as fewer parameters and ease of adjustment, significantly reducing the model's complexity.
[0007] The purpose of this invention is to provide a method for diagnosing leakage in oil and gas wells that integrates time-series feature processing and machine learning, including selecting leakage diagnosis parameters and the following steps:
[0008] Step 1: Use CEEMDAN to decompose the time series of overflow diagnostic parameters to obtain IMFs at different time scales;
[0009] Step 2: Use KPCA to select IMFs that are highly representative of the original time series, eliminate redundancy in the original time series, and reduce the dimensionality of the model input.
[0010] Step 3: Calculate the energy entropy of the dimensionality-reduced IMFs, extract the leakage features of the model, and construct a leakage risk dataset;
[0011] Step 4: Preprocess the overflow risk dataset and divide the dataset;
[0012] Step 5: Construct an oil and gas well leakage diagnosis model based on the PSO-ELM network, and use the established leakage risk dataset to train and test the model, and output the oil and gas well leakage diagnosis results.
[0013] Preferably, the overflow diagnostic parameters include six categories of comprehensive logging parameters that clearly characterize oil and gas well overflows and leaks, including: mud pit volume, drilling fluid inlet / outlet flow difference, standpipe pressure, hook load, pump pressure, and drilling speed.
[0014] In any of the above schemes, step 1 preferably includes performing CEEMDAN decomposition on the six types of leakage diagnostic parameters to obtain... The time series dimension of the leakage diagnostic parameters is determined by the number of IMFs. dimension.
[0015] In any of the above solutions, step 2 preferably includes the current When the cumulative contribution rate of the characteristic sequences of each IMF reaches more than 85%, the contribution rate of the previous... Each IMF undergoes feature processing, where m <n。
[0016] In any of the above schemes, the data preprocessing preferably includes:
[0017] Outliers, zeros, and isolated points are removed from the overflow risk dataset;
[0018] The dataset was normalized using the Min-Max normalization method, unifying its range of variation to between 0 and 1.
[0019]
[0020] in, For normalized data, y is the original data. The maximum value of the samples in the dataset. It is the minimum value among the samples in the dataset.
[0021] In any of the above schemes, step 4 further includes labeling the overflow risk dataset according to the oil and gas well conditions, wherein the overflow label is 0, the well leakage label is 1, and the normal label is 2.
[0022] The preferred option among the above schemes is the one that, under different operating conditions of oil and gas wells, is... The energy entropy of each IMF corresponds to a different operating condition label.
[0023] In any of the above schemes, it is preferred that the network structure of the PSO-ELM network includes an input layer, a hidden layer, and an output layer.
[0024] Preferably, in any of the above schemes, the number of nodes in the input layer matches the number of features of the oil and gas well operating conditions. The number of energy entropy values for each IMF, where each node represents a feature and the value of the node is the preprocessed value of the input feature.
[0025] In any of the above schemes, it is preferred that the weights and biases of the hidden layer are randomly generated, and the method for selecting the number of hidden layer nodes h is as follows:
[0026]
[0027] The activation function f1 between the input layer and the hidden layer is:
[0028]
[0029] in, The number of nodes in the input layer. This represents the number of nodes in the output layer. x is an empirical coefficient. i For the input layer's first Input feature values.
[0030] Preferably, in any of the above schemes, the activation function f2 of the output layer is a ReLU function, as shown in the formula:
[0031]
[0032] in, This is the input value for the hidden layer.
[0033] In any of the above schemes, it is preferred that the loss function of the output layer adopts cross-entropy loss, as shown in the following formula:
[0034]
[0035] in, For the number of categories, For the true label of the i-th category, For the model to predict belonging to the first The probability of each category.
[0036] This invention proposes a method for diagnosing oil and gas well leakage that integrates time-series feature processing and machine learning. This method can effectively improve the accuracy and efficiency of diagnosis, has high field adaptability, and can be adjusted and applied to any drilling site equipped with a comprehensive logging tool, making it easy to promote and use in the industry.
[0037] CEEMDAN is a time-frequency analysis method for processing nonlinear and non-stationary signals.
[0038] ELM is a fast learning algorithm for a single hidden layer feedforward neural network.
[0039] PSO is a search algorithm based on group cooperation that simulates the foraging behavior of bird flocks. Attached Figure Description
[0040] Figure 1 This is a flowchart of a preferred embodiment of the oil and gas well leakage diagnosis method that integrates temporal feature processing and machine learning according to the present invention.
[0041] Figure 2This is a flowchart of another preferred embodiment of the oil and gas well leakage diagnosis method that integrates temporal feature processing and machine learning according to the present invention.
[0042] Figure 3 This is a schematic diagram of the decomposition process of an embodiment of CEEMDAN, a method for diagnosing oil and gas well leakage that integrates temporal feature processing and machine learning according to the present invention.
[0043] Figure 4 This is a schematic diagram of an embodiment of the ELM method for diagnosing oil and gas well leakage according to the present invention, which integrates temporal feature processing and machine learning.
[0044] Figure 5 This is a flowchart of an embodiment of the PSO-optimized ELM model for the oil and gas well leakage diagnosis method that integrates temporal feature processing and machine learning according to the present invention.
[0045] Figure 6 This is a schematic diagram of a module of an oil and gas well leakage diagnosis system according to an embodiment of the oil and gas well leakage diagnosis method that integrates temporal feature processing and machine learning according to the present invention. Detailed Implementation
[0046] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0047] Example 1
[0048] like Figure 1 As shown, an oil and gas well overflow diagnosis method integrating time-series feature processing and machine learning is implemented. Step 100 is to select overflow diagnosis parameters. The overflow diagnosis parameters include six types of comprehensive logging parameters that are obvious in oil and gas well overflow and leakage, including: mud pit volume, drilling fluid inlet and outlet flow difference, standpipe pressure, hook load, pump pressure and drilling speed.
[0049] Step 110 involves using CEEMDAN to decompose the time series of the overflow diagnostic parameters to obtain IMFs at different time scales, including the results obtained after CEEMDAN decomposition of the overflow diagnostic parameters. The time series dimension of the leakage diagnostic parameters is determined by the number of IMFs. dimension.
[0050] Step 120 involves using KPCA to select IMFs that are highly representative of the original time series, eliminating redundancy in the original time series, and reducing the dimensionality of the model input, including the current... When the cumulative contribution rate of the characteristic sequences of each IMF reaches more than 85%, the contribution rate of the previous... Each IMF undergoes feature processing, where m <n。
[0051] Perform step 130 to calculate the energy entropy of the dimensionality-reduced IMFs, extract the leakage features of the model, and construct the leakage risk dataset;
[0052] Step 140 involves preprocessing the overflow risk dataset and partitioning the dataset. The data preprocessing includes:
[0053] Outliers, zeros, and isolated points are removed from the overflow risk dataset;
[0054] The dataset was normalized using the Min-Max normalization method, unifying its range of variation to between 0 and 1.
[0055]
[0056] in, For normalized data, y is the original data. The maximum value of the samples in the dataset. It is the minimum value among the samples in the dataset.
[0057] The overflow risk dataset is labeled according to the operating conditions of oil and gas wells, with overflow labeled as 0, well leakage labeled as 1, and normal labeled as 2.
[0058] Oil and gas wells under different operating conditions The energy entropy of each IMF corresponds to a different operating condition label.
[0059] Perform step 150 to construct an oil and gas well leakage diagnosis model based on the PSO-ELM network, and use the established leakage risk dataset to train and test the model, outputting the oil and gas well leakage diagnosis results.
[0060] The network structure of the PSO-ELM network includes an input layer, a hidden layer, and an output layer.
[0061] The number of nodes in the input layer is matched to the number of features of the oil and gas well operating conditions. The number of energy entropy values for each IMF, where each node represents a feature and the value of the node is the preprocessed value of the input feature.
[0062] The weights and biases of the hidden layer are generated randomly, and the method for selecting the number of hidden layer nodes h is as follows:
[0063]
[0064] The activation function f1 between the input layer and the hidden layer is:
[0065]
[0066] in, The number of nodes in the input layer. This represents the number of nodes in the output layer. x is an empirical coefficient. i For the input layer's first Input feature values.
[0067] The activation function f2 of the output layer is the ReLU function, and the formula is:
[0068]
[0069] in, This is the input value for the hidden layer.
[0070] The loss function of the output layer adopts cross-entropy loss, and the formula is:
[0071]
[0072] in, For the number of categories, For the true label of the i-th category, For the model to predict belonging to the first The probability of each category.
[0073] Example 2
[0074] This invention provides a method for diagnosing oil and gas well leakage by integrating time-series feature processing and machine learning. The invention utilizes Adaptive Noise Complete Ensemble Empirical Mode Decomposition (CEEMDAN) to decompose the time series of comprehensive logging parameters to obtain intrinsic mode functions (IMFs) at different time scales. Secondly, kernel principal component analysis (KPCA) is used to screen out IMFs that are highly representative of the original time series. Thirdly, the energy entropy of these IMFs is calculated, and leakage features of the model are extracted. Finally, a particle swarm optimization limited learning machine (ELM) network (PSO-ELM) is combined to fully utilize the characteristics of the training data and improve the accuracy of the model in diagnosing oil and gas well leakage.
[0075] To achieve the above objectives, the present invention adopts the following technical solution:
[0076] This invention provides a method for diagnosing oil and gas well leakage by integrating time-series feature processing and machine learning, which includes the following steps:
[0077] Step 1. Based on well history data and prior knowledge, select comprehensive logging parameters that clearly characterize oil and gas well overflow and leakage as overflow and leakage diagnosis parameters;
[0078] In step 1, based on well history data and prior knowledge, six parameters are selected as leakage diagnosis parameters: mud pit volume, drilling fluid inlet / outlet flow difference, riser pressure, hook load, pump pressure, and drilling speed.
[0079] Step 2. Use CEEMDAN to decompose the time series of the overflow diagnostic parameters to obtain IMFs at different time scales and reduce the non-stationarity of their time series.
[0080] In step 2, CEEMDAN is an algorithm for processing nonlinear and non-stationary signals. It can decompose the time series data of the selected overflow diagnostic parameters into IMFs at different time scales. Each IMF represents the fluctuation pattern of the data within a specific frequency range.
[0081] In step 2, the six types of leakage diagnostic parameters are decomposed using CEEMDAN to obtain... One IMF means that the time series dimension of the overflow diagnostic parameters is 1. dimension.
[0082] Step 3. Use KPCA to select IMFs that are highly representative of the original time series, eliminate redundancy in the original time series, and reduce the dimensionality of the model input.
[0083] In step 3, KPCA is a non-linear dimensionality reduction algorithm that can use kernel functions to map the original data to a high-dimensional feature space, and then perform linear dimensionality reduction in the high-dimensional feature space.
[0084] In step 3, KPCA is used to reduce the dimensionality of the original time series and calculate its cumulative contribution rate. Based on prior knowledge, currently... When the cumulative contribution rate of the characteristic sequences of the IMFs reaches over 85%, the filtered IMFs are highly representative of the original time series. Therefore, it is only necessary to filter the first... By performing feature processing on each IMF, the dimensionality of the model input is effectively reduced. ).
[0085] Step 4. Calculate the energy entropy of the dimensionality-reduced IMFs, extract the leakage features of the model, and construct a leakage risk dataset;
[0086] In step 4, the preceding The feature sequences of each IMF contain effective feature information about oil and gas well leakage. For different oil and gas well operating conditions, the previous... The energy entropy of the feature sequences of each IMF is different, and they each exhibit certain regular trends. Therefore, the energy entropy of IMFs can be used to extract leakage features and construct a leakage risk dataset.
[0087] Step 5. Preprocess the overflow risk dataset and divide the dataset;
[0088] In step 5, data preprocessing includes: removing outliers, zeros, and isolated points from the overflow risk dataset; and normalizing the dataset using the Min-Max normalization method to unify its range of variation to between 0 and 1.
[0089] In step 5, the overflow risk dataset is labeled according to the operating conditions of the oil and gas wells, with overflow labeled as 0, well leakage labeled as 1, and normal labeled as 2. Furthermore, the dataset is further categorized based on the operating conditions of the oil and gas wells. The energy entropy of each IMF corresponds to a different operating condition label. In the spill risk dataset, the data ratios of spill, leakage, and normal are 2:3:5.
[0090] Step 6. Construct an oil and gas well leakage diagnosis model based on the PSO-ELM network, and use the established leakage risk dataset to train and test the model, and output the oil and gas well leakage diagnosis results.
[0091] In step 6, ELM is a fast learning algorithm for a single hidden layer feedforward neural network. Its core idea is to randomly generate the weights and biases from the input layer to the hidden layer, and then directly calculate the weights of the output layer using the least squares method, thereby avoiding the time-consuming gradient descent process in traditional neural networks.
[0092] In step 6, the network structure of ELM typically includes an input layer, a hidden layer, and an output layer. Its advantages are that it has a fast training speed, can avoid local optima problems, and has good generalization ability.
[0093] In step 6, PSO is a group-based search algorithm that simulates the foraging behavior of bird flocks. It has the advantages of strong global search capability, fast convergence speed, and the ability to quickly converge to local optima. The input and hidden layer connection weights and hidden layer biases of traditional ELM models are randomized, which cannot guarantee the reliability of diagnostic results. Therefore, using PSO to optimize the weights and biases in the ELM model is beneficial to improving the accuracy of oil and gas well leakage diagnosis models.
[0094] This invention addresses the time-series non-stationarity of raw integrated logging data while eliminating redundancy and reducing the dimensionality of the model input. Furthermore, by integrating time-series feature processing with machine learning algorithms, this invention provides an innovative method for diagnosing oil and gas well leakage, effectively improving the accuracy and efficiency of the diagnosis.
[0095] Example 3
[0096] like Figure 2 As shown, this embodiment provides a method for diagnosing oil and gas well leakage by integrating time-series feature processing and machine learning, including:
[0097] Step 1. Based on well history data and prior knowledge, select comprehensive logging parameters that clearly characterize oil and gas well overflow and leakage as overflow and leakage diagnosis parameters;
[0098] Six parameters were selected as leakage diagnosis parameters: mud pit volume, drilling fluid inlet / outlet flow difference, riser pressure, hook load, pump pressure, and drilling speed.
[0099] Step 2. Use CEEMDAN to decompose the time series of the overflow diagnostic parameters to obtain IMFs at different time scales and reduce the non-stationarity of their time series.
[0100] The decomposition process of CEEMDAN is as follows: Figure 3 As shown, the CEEMDAN decomposition of the six types of leakage diagnostic parameters yields the following results. One IMF means that the time series dimension of the overflow diagnostic parameters is 1. dimension.
[0101] Step 3. Use KPCA to select IMFs that are highly representative of the original time series, eliminate redundancy in the original time series, and reduce the dimensionality of the model input.
[0102] Based on prior knowledge, currently When the cumulative contribution rate of the characteristic sequences of each IMF reaches over 85%, the filtered IMFs are highly representative of the original time series. By performing feature processing on each IMF, the dimensionality of the model input is effectively reduced. ).
[0103] Step 4. Calculate the energy entropy of the dimensionality-reduced IMFs, extract the leakage features of the model, and construct a leakage risk dataset;
[0104] forward The feature sequences of each IMF contain effective feature information about oil and gas well leakage. For different oil and gas well operating conditions, the previous... The energy entropy of the feature sequences of each IMF is different, and they each exhibit certain regular trends. We use the energy entropy of IMFs to extract leakage features and construct a leakage risk dataset.
[0105] Step 5. Preprocess the overflow risk dataset and divide the dataset;
[0106] Outliers, zeros, and isolated points in the overflow risk dataset are removed; the dataset is normalized using the Min-Max normalization method to unify its range of variation to between 0 and 1.
[0107] The Min-Max normalization method normalizes the dataset as shown in the following formula;
[0108] (1)
[0109] In the formula, For normalized data; This is the original data; The maximum value among the samples in the dataset; It is the minimum value among the samples in the dataset.
[0110] The overflow and leakage risk dataset was labeled according to the operating conditions of oil and gas wells, with overflow labeled as 0, leakage labeled as 1, and normal as 2. Furthermore, the dataset was labeled with the previous data under different operating conditions of oil and gas wells. The energy entropy of each IMF corresponds to a different operating condition label. The proportions of overflow, leakage, and normal data in the spill risk dataset are 2:3:5. 80% of the established spill risk dataset is used as the training set for the model, and 20% as the test set.
[0111] Step 6. Construct an oil and gas well leakage diagnosis model based on the PSO-ELM network, and use the established leakage risk dataset to train and test the model, and output the oil and gas well leakage diagnosis results.
[0112] like Figure 4 As shown, the ELM network structure typically includes an input layer, hidden layers, and an output layer. Its advantages lie in its fast training speed, ability to avoid local optima, and good generalization ability. The ELM network structure shown includes three parts: an input layer, a hidden layer, and an output layer.
[0113] 1) Input layer
[0114] The number of nodes in the input layer should match the number of features of the oil and gas well operating conditions, i.e., the number of nodes in the input layer should be equal to the number of features in the oil and gas well operating conditions. The energy entropy of each IMF. Each node represents a feature, and the value of the node is the preprocessed value of the input feature.
[0115] 2) Hidden layer
[0116] The weights and biases of the hidden layer are randomly generated, and the number of hidden layer nodes is selected based on an empirical formula, as shown in the following equation:
[0117] (2)
[0118] In the formula, This represents the number of nodes in the input layer. This represents the number of nodes in the output layer. This is an empirical coefficient.
[0119] The activation functions between the input layer and the hidden layer are shown below:
[0120] (3)
[0121] 3) Output layer
[0122] The number of nodes in the output layer is usually matched with the number of classification labels, which is 3 in this embodiment, where the overflow label is 0, the well leakage label is 1, and the normal label is 2.
[0123] The Sigmoid function is prone to gradient vanishing when dealing with classification problems. The ReLU function can effectively avoid gradient vanishing. The expression for using the ReLU function as the activation function is as follows:
[0124] (4)
[0125] In the formula, This is the input value for the hidden layer.
[0126] For multi-class classification problems, the cross-entropy loss function is used, as shown in the following formula:
[0127] (5)
[0128] In the formula, The number of categories; Indicates the true label; For the model to predict belonging to the first The probability of each category.
[0129] The labels for oil and gas well overflow, well leakage, and normal operation are 0, 1, and 2, respectively. After the model is built, it is trained and tested using the established overflow risk dataset, and the oil and gas well overflow diagnosis results are output.
[0130] like Figure 5 As shown in the figure, this embodiment uses PSO to optimize the weights and biases in the ELM model, which is beneficial to further improve the accuracy of the oil and gas well leakage diagnosis model.
[0131] Example 4
[0132] like Figure 6 As shown, this embodiment provides an oil and gas well leakage diagnosis system that integrates time-series feature processing and machine learning, including:
[0133] Data acquisition module: used to acquire comprehensive logging parameters that clearly characterize oil and gas well overflows and leaks;
[0134] Temporal feature processing module: Decomposes the time series of overflow diagnostic parameters using CEEMDAN, reduces the dimensionality of the model input using KPCA, and extracts the overflow features of the model using energy entropy;
[0135] Data preprocessing module: used to remove outliers, zeros, and isolated points from the overflow risk dataset, and to normalize the resulting data.
[0136] Dataset partitioning module: Labels the overflow risk dataset according to the operating conditions of oil and gas wells;
[0137] Model building module: Used to build and optimize oil and gas well leakage diagnosis models based on PSO-ELM networks;
[0138] Overflow diagnosis module: Input the overflow risk dataset after fusing time-series features and data processing into the oil and gas well overflow diagnosis model, and output the oil and gas well overflow diagnosis results.
[0139] The present invention also provides a computer-readable storage medium. The computer-readable storage medium stores computer instructions thereon, which, when executed by a processor, complete the steps of the oil and gas well leakage diagnosis method integrating time-series feature processing and machine learning.
[0140] To better understand this invention, specific embodiments have been described in detail above, but these are not intended to limit the invention. Any simple modifications made to the above embodiments based on the technical essence of this invention still fall within the scope of this invention. Each embodiment in this specification focuses on its differences from other embodiments; similar or identical parts between embodiments can be referred to mutually. For system embodiments, since they basically correspond to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
Claims
1. A method for diagnosing leakage in oil and gas wells that integrates time-series feature processing and machine learning, comprising selecting leakage diagnosis parameters, characterized in that, It also includes the following steps: Step 1: Use CEEMDAN to decompose the time series of leakage diagnostic parameters to obtain IMFs at different time scales; Step 2: Use KPCA to select IMFs that are highly representative of the original time series, eliminate redundancy in the original time series, and reduce the dimensionality of the model input. Step 3: Calculate the energy entropy of the dimensionality-reduced IMFs, extract the leakage features of the model, and construct a leakage risk dataset; Step 4: Preprocess the overflow risk dataset and divide the dataset; Step 5: Construct an oil and gas well leakage diagnosis model based on the PSO-ELM network, and use the established leakage risk dataset to train and test the model, and output the oil and gas well leakage diagnosis results.
2. The oil and gas well leakage diagnosis method integrating time-series feature processing and machine learning as described in claim 1, characterized in that, Step 1 includes obtaining the leakage diagnostic parameters after CEEMDAN decomposition. The time series dimension of the leakage diagnostic parameters is determined by the number of IMFs. dimension.
3. The oil and gas well leakage diagnosis method integrating time-series feature processing and machine learning as described in claim 2, characterized in that, Step 2 includes the current When the cumulative contribution rate of the characteristic sequences of each IMF reaches more than 85%, the contribution rate of the preceding... Each IMF undergoes feature processing, where m <n。 4. The oil and gas well leakage diagnosis method integrating time-series feature processing and machine learning as described in claim 3, characterized in that, The data preprocessing includes: Outliers, zeros, and isolated points are removed from the overflow risk dataset; The dataset was normalized using the Min-Max normalization method, unifying its range of variation to between 0 and 1. , in, For normalized data, y represents the original data. The maximum value of the samples in the dataset. It is the minimum value among the samples in the dataset.
5. The oil and gas well leakage diagnosis method integrating time-series feature processing and machine learning as described in claim 4, characterized in that, Step 4 further includes labeling the overflow risk dataset according to the operating conditions of oil and gas wells, where overflow is labeled as 0, well leakage as 1, and normal as 2.
6. The oil and gas well leakage diagnosis method integrating time-series feature processing and machine learning as described in claim 5, characterized in that, The network structure of the PSO-ELM network includes an input layer, a hidden layer, and an output layer.
7. The oil and gas well leakage diagnosis method integrating time-series feature processing and machine learning as described in claim 6, characterized in that, The number of nodes in the input layer is matched to the number of features of the oil and gas well operating conditions. The number of energy entropy values for each IMF, where each node represents a feature and the value of the node is the preprocessed value of the input feature.
8. The oil and gas well leakage diagnosis method integrating time-series feature processing and machine learning as described in claim 7, characterized in that, The weights and biases of the hidden layer are generated randomly, and the method for selecting the number of hidden layer nodes h is as follows: , The activation function f1 between the input layer and the hidden layer is: , in, The number of nodes in the input layer. This represents the number of nodes in the output layer. x is an empirical coefficient. i For the input layer's first Input feature values.
9. The oil and gas well leakage diagnosis method integrating time-series feature processing and machine learning as described in claim 8, characterized in that, The activation function f2 of the output layer is the ReLU function, and the formula is: , in, This is the input value for the hidden layer.
10. The oil and gas well leakage diagnosis method integrating time-series feature processing and machine learning as described in claim 9, characterized in that, The loss function of the output layer adopts cross-entropy loss, and the formula is: , in, For the number of categories, For the true label of the i-th category, For the model to predict belonging to the first The probability of each category.
Citation Information
Patent Citations
CN110443488A
CN116307670A