Intelligent gas well anomaly detection method and system based on integrated tree

Through the integrated tree algorithm and maximum information coefficient feature extraction, a gas well abnormal detection model was constructed, which solved the problems of large gas well management workload and untimely abnormal judgment, realized dynamic intelligent analysis and abnormal prediction of gas wells, and improved the effectiveness and efficiency of gas well measures. .

CN119226942APending Publication Date: 2024-12-31PETROCHINA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310799069.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-30
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

In the existing technology, gas well management workload is large, gas well abnormal identification is not timely, and the adjustment of measures and systems is inefficient, which affects the efficiency of gas field measures.

Method used

An intelligent gas well anomaly detection method based on an integrated tree is adopted. By converting time series gas extraction data and extracting the maximum information coefficient feature, an abnormality detection model is constructed, and training is used for gas well anomaly detection.

Benefits of technology

A fast and reliable data-driven intelligent anomaly detection model is established, which can identify point anomalies and discover context anomalies based on historical data, which improves the accuracy of gas well abnormalities and the efficiency of measures and systems adjustments, and reduces the management work of technicians. quantity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119226942A_ABST
    Figure CN119226942A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent gas well anomaly detection method and system based on an integrated tree, gas well data is sequence data which continuously changes along with time, the influence of historical data on a current decision cannot be captured only by using data at the current moment, and the current anomaly cannot be judged through context information. Therefore, before an anomaly detection model is designed, it is necessary to convert gas production data in a time sequence form into effective gas well data. However, dimension disasters are easy to generate due to increase of dimensions, model training convergence is difficult due to a large amount of redundant information, and the training speed is reduced. According to the method, the maximum information coefficient is adopted to filter the features with relatively high correlation, so that the dimensionality is reduced, and the retained features are kept mutually independent to the maximum extent. And compared with a Pearson correlation coefficient, the maximum information coefficient can overcome the maximum linear limitation, and more correlation types of features can be found. And training the gas well production data to obtain an anomaly detection model so as to realize gas well anomaly detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of natural gas production, and relates to an intelligent gas well anomaly detection method and system based on an integrated tree. Background Art

[0002] The workload of drainage and gas production is increasing year by year. On average, each technician needs to spend 9.3 days a year to adjust parameters. There are common problems such as high intensity of gas well dynamic analysis, untimely adjustment of abnormal gas well identification and automation measures, and low efficiency of measures and systems adjustment, which affect the efficiency of gas field measures. Therefore, it is necessary to combine gas well development indicators and production parameters, carry out intelligent analysis of gas well production dynamics and abnormal identification research, establish an effective gas well dynamic analysis big data algorithm, and reduce the workload of personnel management. Summary of the invention

[0003] The purpose of the present invention is to solve the problems in the prior art of heavy gas well management workload, untimely identification of gas well anomalies, and low efficiency of adjustment of measures and systems, and to provide an intelligent gas well anomaly detection method and system based on an integrated tree.

[0004] In order to achieve the above object, the present invention adopts the following technical solutions:

[0005] The present invention proposes an intelligent gas well anomaly detection method based on an integrated tree, comprising the following steps:

[0006] Convert the gas production data in time series to obtain effective gas well data;

[0007] The maximum information coefficient is used to extract features from effective gas well data to obtain feature vectors;

[0008] The feature vector is processed to obtain an anomaly detection model to realize gas well anomaly detection.

[0009] Preferably, before converting the gas production data in the form of a time series, data missing value processing is performed first.

[0010] Preferably, the feature vector is trained using an ensemble tree algorithm to obtain an anomaly detection model.

[0011] Preferably, the learning objective function of the ensemble tree algorithm is as follows:

[0012]

[0013] Among them, l(y i ,x i ) is the sample x i The training loss, Ω(f k ) is the regularization term.

[0014] Preferably, the loss function of the learning objective function of the ensemble tree algorithm is as follows:

[0015]

[0016] Among them, I j is the feature set of the classification node, I j ={i|q(x i =j)}.

[0017] Preferably, the regularization term Ω(f k ) is obtained as follows:

[0018]

[0019] Where T is the total number of leaf nodes in the tree model, w j is the weight of the corresponding leaf node, and α and λ are penalty coefficients.

[0020] Preferably, a leaf node is a node without child nodes.

[0021] The present invention proposes an intelligent gas well anomaly detection system based on an integrated tree, comprising:

[0022] A data conversion module, which is used to convert gas production data in a time series format to obtain effective gas well data;

[0023] A feature extraction module, wherein the feature extraction module is used to extract features from effective gas well data using a maximum information coefficient to obtain a feature vector;

[0024] The feature vector processing module is used to process the feature vector to obtain an anomaly detection model and realize gas well anomaly detection.

[0025] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of an intelligent gas well anomaly detection method based on an integrated tree when executing the computer program.

[0026] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of an intelligent gas well anomaly detection method based on an integrated tree.

[0027] Compared with the prior art, the present invention has the following beneficial effects:

[0028] The present invention proposes an intelligent gas well anomaly detection method based on an integrated tree. Gas well data is a sequence data that changes over time. Only using the current moment data cannot capture the impact of historical data on the current decision, and it is also impossible to judge the current anomaly through context information. Therefore, before designing the anomaly detection model, it is necessary to convert the gas production data in the form of a time series into effective gas well data. However, the increase in dimension is prone to dimensional disaster, and a large amount of redundant information makes it difficult for the model training to converge, and the training speed is reduced. The present invention uses the maximum information coefficient to filter the features with high correlation to reduce the dimension, so that the retained features are maximized and remain independent of each other. Moreover, compared with the most commonly used Pearson correlation coefficient, the maximum information coefficient can overcome the maximum linear limitation and find more related types of features. Then the gas well production data is trained to obtain an anomaly detection model to realize gas well anomaly detection. The present invention establishes a set of fast and reliable data-driven intelligent anomaly detection models, which can not only identify point anomalies, but also discover context anomalies based on historical data. The test results on the real gas production data set are compared with the manual annotation results. The results show that the proposed framework has good performance and can solve the problems of untimely gas well anomaly identification and low efficiency of measures and system adjustment in the prior art.

[0029] The present invention proposes an intelligent gas well anomaly detection system based on an integrated tree, which realizes gas well anomaly detection by dividing the system into a data conversion module, a feature extraction module and a feature vector acquisition module. The modularization concept is adopted to make each module independent of each other, which is convenient for unified management of each module. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0031] Figure 1 This is a flow chart of the intelligent gas well anomaly detection method based on integrated tree of the present invention.

[0032] Figure 2 This is a process diagram of intelligent gas well anomaly detection based on integrated tree of the present invention.

[0033] Figure 3 This is a diagram of the intelligent gas well anomaly detection system based on integrated tree of the present invention. DETAILED DESCRIPTION

[0034] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0035] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0036] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0037] In the description of the embodiments of the present invention, it should be noted that if the terms "upper", "lower", "horizontal", "inner", etc. indicate an orientation or positional relationship based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the product of the invention is usually placed when in use, it is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, the terms "first", "second", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.

[0038] In addition, if the term "horizontal" appears, it does not mean that the component must be absolutely horizontal, but can be slightly tilted. For example, "horizontal" only means that its direction is more horizontal than "vertical", which does not mean that the structure must be completely horizontal, but can be slightly tilted.

[0039] In the description of the embodiments of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal connection of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0040] The present invention is further described in detail below in conjunction with the accompanying drawings:

[0041] The present invention proposes an intelligent gas well anomaly detection method based on an integrated tree, such as Figure 1 As shown, the following steps are included:

[0042] S1. Convert the gas production data in time series to obtain effective gas well data;

[0043] Before converting the gas production data in time series form, the missing values ​​of the data are processed first.

[0044] S2. Using the maximum information coefficient to extract features from the effective gas well data to obtain feature vectors;

[0045] S3. Process the feature vector to obtain an anomaly detection model to realize gas well anomaly detection.

[0046] The feature vector is trained using the ensemble tree algorithm to obtain the anomaly detection model.

[0047] The learning objective function of the ensemble tree algorithm is as follows:

[0048]

[0049] Among them, l(y i ,x i ) is the sample x i The training loss, Ω(f k ) is the regularization term.

[0050] Regularization term Ω(f k ) is obtained as follows:

[0051]

[0052] Where T is the total number of leaf nodes in the tree model, w j is the weight of the corresponding leaf node, α and λ are penalty coefficients, and a leaf node is a node without child nodes.

[0053] The loss function of the learning objective function of the ensemble tree algorithm is as follows:

[0054]

[0055] Among them, I j is the feature set of the classification node, I j ={i|q(x i =j)}.

[0056] like Figure 2 The specific process and steps are as follows:

[0057] Step 1: Preprocess the time series data; first collect the data and mark the data. But the data is not complete. Missing data must be processed. Gas well data is a kind of sequence data that changes over time. Using only the current moment data cannot capture the impact of historical data on the current decision, and it is impossible to judge the current anomaly through context information. Therefore, before designing the anomaly detection model, it is necessary to convert the gas production data in the form of time series into a data form that is dependent on the time context. However, the increase in dimensionality is prone to dimensionality disasters, and a large amount of redundant information makes it difficult for model training to converge and reduces the training speed. The present invention uses the maximum information coefficient (MIC) to filter features with higher correlation to reduce the dimensionality, so that the retained features are maximized and remain independent of each other. Compared with the most commonly used Pearson correlation coefficient, MIC can overcome the maximum linear limitations and find more related types of features.

[0058] 1) Data missing value processing: Process missing values ​​and fill in the corresponding missing values ​​according to actual production conditions and operations.

[0059] 2) Data conversion: Gas well data is a kind of sequence data that changes over time. Using only the current data cannot capture the impact of historical data on current decisions, nor can it judge the current anomaly through context information. Therefore, before designing anomaly detection models, it is necessary to convert gas production data in time series form into data form that is dependent on time context.

[0060] 3) MIC feature extraction: The increase in dimensionality is prone to dimensionality disaster, and a large amount of redundant information makes it difficult for model training to converge and reduces the training speed. The present invention uses the maximum information coefficient (MIC) to filter the features with high correlation to reduce the dimensionality, so that the retained features are maximized and remain independent of each other. Compared with the most commonly used Pearson correlation coefficient, MIC can overcome the maximum linear limitation and find more related types of features.

[0061] Step 2: Model training and anomaly detection: Use the ensemble tree algorithm to train the gas well production data to obtain the anomaly detection model. For the newly collected data, data preprocessing is still performed first, and the data is used as input variables to detect anomalies using the trained ensemble tree model.

[0062] Ensemble tree model training, the ensemble tree model is composed of multiple simple tree models. The ensemble tree combines multiple simple trees in a weighted manner to form a strong anomaly detector, thereby improving the anomaly detection effect. The input is the observed feature vector set and the corresponding status T is the length of the total time step, e.g. the number of days in the collected data set. For a time step of t, y tis the working status of the sample, x t ∈R m , m is the number of features. The gas well anomaly detection problem is based on multivariate features. Gas well status As the time series of , a model f is constructed to judge the current gas well status y T+1 ,Right now:

[0063]

[0064] Finally, the K weak learners f k The ensemble becomes a strong learner, expressed as:

[0065]

[0066] The learning objective function for the integrated tree is:

[0067]

[0068] Among them, l(y i ,x i ) is the sample x i The training loss, Ω(f k ) is the regularization term, which is defined as:

[0069]

[0070] Where T is the total number of leaf nodes in the tree model, w j is the weight of the corresponding leaf node, α and λ are constants, and is the penalty coefficient; a leaf node is a node without child nodes. The purpose of the regularization term is to control the complexity of the model and effectively prevent overfitting.

[0071] The learning objective function is calculated. In order to solve the loss function of Obj(θ), the Taylor expansion is obtained.

[0072] in,

[0073] When training the model, the loss function can be expressed as:

[0074]

[0075] Among them, I j ={i|q(x i =j)}, is the feature set of the classification node. The optimal solution of the function can be obtained by differentiating the loss function and solving the optimization condition, that is:

[0076]

[0077]

[0078] The above formula can be used to measure the score of the ensemble tree model.

[0079] The present invention proposes an intelligent gas well anomaly detection system based on an integrated tree, such as Figure 3 As shown, it includes a data conversion module, a feature extraction module and a feature vector processing module;

[0080] The data conversion module is used to convert the gas production data in the form of time series to obtain effective gas well data;

[0081] The feature extraction module is used to extract features from effective gas well data using the maximum information coefficient to obtain feature vectors;

[0082] The feature vector processing module is used to process the feature vector to obtain an anomaly detection model and realize gas well anomaly detection.

[0083] The terminal device provided in an embodiment of the present invention comprises: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor executes the computer program, the functions of the modules / units in the above-mentioned device embodiments are implemented.

[0084] The computer program may be divided into one or more modules / units, and the one or more modules / units are stored in the memory and executed by the processor to accomplish the present invention.

[0085] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.

[0086] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0087] The memory may be used to store the computer program and / or module, and the processor implements various functions of the terminal device by running or executing the computer program and / or module stored in the memory and calling the data stored in the memory.

[0088] If the module / unit integrated in the terminal device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0089] The present invention mainly solves the common problems of drainage gas production technology, such as large workload, untimely parameter adjustment, uneven parameter adjustment levels, etc., as well as the current detection of gas well production anomalies mainly relying on the personal experience of engineers. The continuously generated gas well data brings huge pressure to limited manpower. Moreover, the results of manual judgment are often unreliable due to personal subjectivity, and the anomalies are not discovered in time. A method for intelligent gas well anomaly detection based on an integrated tree is provided. Data preprocessing is performed from the dynamic production characteristics of gas wells and the production data of automated equipment to carry out intelligent analysis of gas well production dynamics and anomaly identification research; a set of fast and reliable data-driven intelligent anomaly detection framework is established. The framework can not only identify point anomalies, but also discover contextual anomalies based on historical data. The test results on the real gas production data set are compared with the manual annotation results. The results show that the proposed framework has good performance.

[0090] It has the following advantages:

[0091] 1) Establish an ensemble tree model by building a data intelligent analysis framework, training the function set in the anomaly detection model, and constructing the learning objective function of the ensemble tree.

[0092] 2) Based on the ensemble tree algorithm, an intelligent gas well anomaly detection system was built to achieve dynamic intelligent analysis of gas wells and anomaly prediction. The anomaly detection accuracy rate reached over 85%, further reducing the management workload of technical personnel and effectively improving the effectiveness of gas well measures.

[0093] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. An intelligent gas well anomaly detection method based on an integrated tree, characterized in that: The steps include: Convert the gas production data in time series to obtain effective gas well data; The maximum information coefficient is used to extract features from effective gas well data to obtain feature vectors; The feature vector is processed to obtain an anomaly detection model to realize gas well anomaly detection.

2. The intelligent gas well anomaly detection method based on integrated tree according to claim 1 is characterized in that: Before converting the gas production data in time series form, the missing values ​​of the data are processed first.

3. The intelligent gas well anomaly detection method based on integrated tree according to claim 1 is characterized in that: The feature vector is trained using the ensemble tree algorithm to obtain the anomaly detection model.

4. The intelligent gas well anomaly detection method based on integrated tree according to claim 3 is characterized in that: The learning objective function of the ensemble tree algorithm is as follows: Among them, l(y i ,x i ) is the sample x i The training loss, Ω(f k ) is the regularization term.

5. The intelligent gas well anomaly detection method based on integrated tree according to claim 4 is characterized in that: The loss function of the learning objective function of the ensemble tree algorithm is as follows: Among them, I j is the feature set of the classification node, I j ={i|q(x i =)}.

6. The intelligent gas well anomaly detection method based on integrated tree according to claim 4 is characterized in that: Regularization term Ω(f k ) is obtained as follows: Where T is the total number of leaf nodes in the tree model, w j is the weight of the corresponding leaf node, and α and λ are penalty coefficients.

7. The intelligent gas well anomaly detection method based on integrated tree according to claim 6 is characterized in that: A leaf node is a node that has no child nodes.

8. An intelligent gas well anomaly detection system based on integrated tree, characterized in that: include: A data conversion module, which is used to convert gas production data in a time series format to obtain effective gas well data; A feature extraction module, wherein the feature extraction module is used to extract features from effective gas well data using a maximum information coefficient to obtain a feature vector; The feature vector processing module is used to process the feature vector to obtain an anomaly detection model and realize gas well anomaly detection.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the intelligent gas well anomaly detection method based on integrated tree as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the intelligent gas well anomaly detection method based on integrated tree as described in any one of claims 1 to 7 are implemented.