Drilling tool jamming early warning method based on time sequence anomaly detection
By building a time-space coupled time series anomaly detection network model, using expert knowledge and multi-head attention mechanism, the lag and insufficient accuracy of traditional drilling early warning methods are solved, and high accuracy and real-time carding in the field of oil drilling are achieved Drill warning.
Patent Information
- Application Number
- CN202411439971.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2024-11-12
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The traditional drilling warning method relies on manual experience and simple statistical analysis, and has problems of early warning lag and insufficient accuracy. In the field of oil drilling, drilling warning based on time series data, is less research and application.
Design a drilling warning method based on time series anomaly detection. By obtaining time series data for well recording, a time series anomaly detection network model under space-time coupling is constructed, and an expert knowledge is used to screen engineering parameters, combining spatial slicing method and multi-head attention mechanism , introduces the domain adaptive loss function to automatically identify abnormal patterns and issue early warnings.
It significantly improves the accuracy of the jam-jammed drilling warning, can monitor and issue early warnings in real time, reduces manual intervention, ensures the objectivity and consistency of the early warning process, and can detect abnormal signals within minutes to hours before the jam-jammed drilling accident.
Smart Images

Figure CN118940201A_ABST
Abstract
Description
Technical Field
[0001] The invention discloses a pipe-stuck early warning method based on time series anomaly detection, and belongs to the field of oil and gas drilling data processing and analysis. Background Art
[0002] In the process of oil and gas drilling, drill bit sticking is one of the most common and serious accidents, which usually leads to operation interruption, equipment damage, loss of downhole tools and other problems, resulting in huge economic losses. Drill bit sticking means that the tools in the well cannot move, cannot be lifted, lowered or rotated.
[0003] According to different reasons, drill stuck can be divided into adhesion, collapse, sand bridge, shrinkage, keyway, mud bag, falling objects and other types. Drill stuck due to sand sedimentation often occurs in well sections with serious leakage, insufficient displacement and untimely sand carrying; drill stuck due to block loss is common in big-belly wellbore, or there is a risk of block loss during the directional or lifting process of drilling in the broken zone; drill stuck due to pressure difference often occurs in formation slurry, mudstone development and easy shrinkage formation; drill stuck with mud bag generally occurs in the well section after plugging is completed or in slurry and easy shrinkage formation. Drill stuck due to block loss is close to the bottom of the well, which occurs suddenly and has a high risk and has the characteristics of "instant kill"; drill stuck due to sand sedimentation is the gradual accumulation of rock cuttings at the bottom of the well, which gradually moves forward with the flow of drilling fluid. Drill stuck accidents are serious hazards. Once they occur, even if the jam is successfully unstuck, it will take a lot of time and seriously affect production efficiency. If the jam fails, it will cause serious economic losses.
[0004] Traditional pipe stuck warning usually relies on manual experience and simple statistical analysis, which has the problems of delayed warning and insufficient accuracy. In recent years, with the development of big data and artificial intelligence technology, data-driven anomaly detection and fault diagnosis methods have gradually been applied to the industrial field. By analyzing a large amount of historical data, such methods can automatically detect anomalies and predict faults, providing a new solution for early warning. However, in the field of oil drilling, the research and application of pipe stuck warning based on time series data is still relatively small. Summary of the invention
[0005] In view of the above problems, the present invention proposes a method for early warning of stuck pipe based on time series anomaly detection, which performs anomaly detection on logging time series data. The method uses expert knowledge to screen engineering parameters related to stuck pipe accidents, constructs and optimizes a time series anomaly detection network model under spatiotemporal coupling, automatically identifies abnormal patterns in logging data, and issues early warnings in time before a stuck pipe accident occurs.
[0006] The present invention proposes a method for early warning of a stuck pipe based on time series anomaly detection, and the specific steps are as follows: S1. Obtain the logging time series data of different work areas, and select the engineering parameters related to the occurrence of the stuck drill according to expert knowledge, wherein the engineering parameters include: time, well depth, drill bit position, drilling time, hook height, drilling pressure, rotation speed, casing pressure, standpipe pressure, inlet flow rate, and outlet flow rate; S2. Design a spatial slicing method to divide the acquired logging time series data of different work areas into segments along each dimension, and use linear projection plus position embedding to embed each segment into a spatial vector. Each spatial vector represents a one-dimensional slice of a time series. S3. Design a time series anomaly detection network model under time-space coupling, the network model includes a feature learning encoder and a reconstruction prediction decoder, input the spatial vector into the network model, and obtain the early warning information of the drill stuck accident; S4. Introduce a domain adaptive loss function to train the network. The loss function reduces the difference between the source domain and the target domain by maximizing the mean difference, thereby improving the generalization ability and performance of the model.
[0007] As a preferred solution of the method for early warning of stuck pipe based on time series anomaly detection described in the present invention, in step S2, a spatial slicing method is specifically designed as follows: First, the time series data is segmented according to the spatial and temporal dimensions, specifically: ; in, Represents time series data; Indicates the length of the time series; Indicates the dimension of the time series; Indicates the length of the segment; Indicates a point in time; Represents dimension; Indicates The Time series data of the segment; Second, each segment is embedded into a vector using linear projection plus position embedding, specifically: ; in, Represents a one-dimensional slice of a time series; Indicates The Time series data of the segment; represents the linear projection matrix; Represents the position embedding vector.
[0008] As a preferred solution of the method for early warning of stuck drill based on time series anomaly detection of the present invention, in step S3, the feature learning encoder adopts a multi-head attention mechanism to learn the global feature representation, which is defined as: ; in, represents the multi-head attention mechanism module, Obtained by linear transformation of the input sequence; Indicates the number of heads, each head will calculate a separate attention mechanism; represents a linear transformation matrix; It means concatenating the attention calculation results of each head, where Represents the attention calculation results of each head, Indicates the independent weight of each head.
[0009] As a preferred solution of the method for early warning of stuck pipe based on time series anomaly detection of the present invention, in step S3, the reconstruction prediction decoder adopts a hierarchical structure to reconstruct the input time series at different time scales, and finally fuses the reconstruction results at different time scales, which is defined as: ; in, represents the final reconstruction output; Represents a splicing operation; Indicated in Reconstructed output on layer time scale; The number of layers representing the time scale.
[0010] As a preferred solution of the method for early warning of stuck pipe based on time series anomaly detection of the present invention, in step S4, in order to minimize the distribution difference between the source domain and the target domain, a maximum mean difference loss function is introduced, specifically: ; in, represents the reconstruction loss function, represents the length of the time series, Indicates The real input data at each time point, Indicates The reconstructed output at each time point is Represents real input and reconstruct the output The mean square error between represents a hyperparameter; represents the maximum mean differential loss function, Indicates the source domain samples, Indicates the first samples, represents the number of samples in the source domain, represents the number of samples in the target domain, Represents the kernel function mapped to high-dimensional space.
[0011] Compared with the prior art, the present invention has the following beneficial effects: (1) The present invention trains and optimizes a large amount of historical data by constructing a time series anomaly detection network model under spatiotemporal coupling, which can more accurately identify abnormal changes in abnormal pattern data in logging data, thereby significantly improving the accuracy of stuck pipe warning; (2) The present invention can monitor and analyze the logging time series data in real time, detect abnormal situations in time and issue early warnings. By continuously inputting the logging data into the early warning model, the system can detect abnormal signals minutes to hours before a stuck pipe accident occurs and issue early warnings to drilling engineers in time. (3) The present invention reduces the reliance on human intervention through automated data processing and analysis. When processing logging data, the system can automatically perform a series of operations such as data preprocessing, model training, and anomaly detection to ensure the objectivity and consistency of the early warning process. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0013] The present invention is further described below in conjunction with the accompanying drawings and implementation examples to make the purpose, technical solutions and advantages of the present invention more clearly understood. Figure 1 For example, the process of the present invention is to obtain logging time series data of different work areas, and optimize the engineering parameters related to the occurrence of stuck drill accidents according to expert knowledge; design a spatial slicing method to divide the logging time series data into one-dimensional slices; design a time series anomaly detection network model under time-space coupling to warn of stuck drill accidents; introduce a domain adaptive loss function to train the network, narrow the difference between the source domain and the target domain, and improve the generalization ability and performance of the model; specifically include the following steps: S1. Obtain the logging time series data of different work areas, and select the engineering parameters related to the occurrence of the stuck drill according to expert knowledge, wherein the engineering parameters include: time, well depth, drill bit position, drilling time, hook height, drilling pressure, rotation speed, casing pressure, standpipe pressure, inlet flow rate, and outlet flow rate; The logging time series data of different work areas were obtained, and the engineering parameters related to the occurrence of stuck pipe accidents were selected according to expert knowledge to select the parameters related to stuck pipe, including time, well depth, drill bit position, drilling time, hook height, drilling pressure, speed, casing pressure, standpipe pressure, inlet flow rate and outlet flow rate. Some parameter statistics are shown in Table 1: Table 1 Statistics of some parameters Logging parameters Maximum Minimum average value Standard Deviation Drill bit position 6668.41 84.17 4834.70 1330.14 Torque 32 -22 4.02 6.3583 Hook load 3044 13 1012.82 544.36 Vertical pressure 37.29 -1.29 19.80 12.92 Turntable speed 90 -59 10.5386 18.58 Casing Pressure 70.75 -12.72 0.8089 6.9321 S2. Design a spatial slicing method to divide the acquired logging time series data of different work areas into segments along each dimension, and use linear projection plus position embedding to embed each segment into a spatial vector. Each spatial vector represents a one-dimensional slice of a time series. First, the time series data is segmented according to the spatial and temporal dimensions, specifically: ; in, Represents time series data; Indicates the length of the time series; Indicates the dimension of the time series; Indicates the length of the segment; Indicates a point in time; Represents dimension; Indicates The Time series data of the segment; Furthermore, each segment is embedded into a vector using linear projection plus position embedding, specifically: ; in, Represents a one-dimensional slice of a time series; Indicates The Time series data of the segment; represents the linear projection matrix; Represents the position embedding vector.
[0014] S3. Design a time series anomaly detection network model under time-space coupling, the network model includes a feature learning encoder and a reconstruction prediction decoder, input the spatial vector into the network model, and obtain the early warning information of the drill stuck accident; The feature learning encoder uses a multi-head attention mechanism to learn the global feature representation, which is defined as: ; in, represents the multi-head attention mechanism module, Obtained by linear transformation of the input sequence; Indicates the number of heads, each head will calculate a separate attention mechanism; represents a linear transformation matrix; It means concatenating the attention calculation results of each head, where Represents the attention calculation results of each head, specifically: ; in, Represents the independent weight of each head, which can perform attention calculation in different feature subspaces.
[0015] Furthermore, the reconstruction prediction decoder adopts a hierarchical structure to reconstruct the input time series at different time scales, and finally fuses the reconstruction results at different time scales, which is defined as: ; in, represents the final reconstruction output; Represents a splicing operation; Indicated in Reconstructed output on layer time scale; The number of layers representing the time scale.
[0016] S4. Introduce a domain adaptive loss function to train the network. The loss function reduces the difference between the source domain and the target domain by maximizing the mean difference, thereby improving the generalization ability and performance of the model.
[0017] In order to minimize the distribution difference between the source domain and the target domain, the maximum mean difference loss function is introduced, which is: ; in, The weight hyperparameter representing the balanced reconstruction loss and the maximum mean differentiation loss; Represents the reconstruction loss function, which is used to measure the error of the model in reconstructing the time series. Specifically: ; in, represents the length of the time series, Indicates The real input data at each time point, Indicates The reconstructed output at each time point is Represents real input and reconstruct the output The mean square error between represents the maximum mean difference loss function, which is used to reduce the distribution difference between the source domain and the target domain. Specifically: ; in, Indicates the source domain samples, Indicates the first samples, represents the number of samples in the source domain, represents the number of samples in the target domain, Represents the kernel function mapped to high-dimensional space.
[0018] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technician familiar with this profession can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention without departing from the content of the technical solution of the present invention still fall within the scope of the technical solution of the present invention.
Claims
1. A method for early warning of pipe sticking based on time series anomaly detection, characterized in that: The following steps are involved: S1. Obtain the logging time series data of different work areas, and select the engineering parameters related to the occurrence of the stuck drill according to expert knowledge, wherein the engineering parameters include: time, well depth, drill bit position, drilling time, hook height, drilling pressure, rotation speed, casing pressure, standpipe pressure, inlet flow rate, and outlet flow rate; S2. Design a spatial slicing method to divide the acquired logging time series data of different work areas into segments along each dimension, and use linear projection plus position embedding to embed each segment into a spatial vector. Each spatial vector represents a one-dimensional slice of a time series. S3. Design a time series anomaly detection network model under time-space coupling, the network model includes a feature learning encoder and a reconstruction prediction decoder, input the spatial vector into the network model, and obtain the early warning information of the drill stuck accident; S4. Introduce a domain adaptive loss function to train the network. The loss function reduces the difference between the source domain and the target domain by maximizing the mean difference, thereby improving the generalization ability and performance of the model.
2. The method for early warning of a stuck pipe based on time series anomaly detection according to claim 1, characterized in that: In step S2, a spatial slicing method is specifically designed as follows: First, the time series data is segmented according to the spatial and temporal dimensions, specifically: ; in, Represents time series data; Indicates the length of the time series; Indicates the dimension of the time series; Indicates the length of the segment; Indicates a point in time; Represents dimension; Indicates The Time series data of the segment; Second, each segment is embedded into a vector using linear projection plus position embedding, specifically: ; in, Represents a one-dimensional slice of a time series; Indicates The Time series data of the segment; represents the linear projection matrix; Represents the position embedding vector.
3. The method for early warning of a stuck pipe based on time series anomaly detection according to claim 1, characterized in that: In step S3, the feature learning encoder uses a multi-head attention mechanism to learn the global feature representation, which is defined as: ; in, represents the multi-head attention mechanism module, Obtained by linear transformation of the input sequence; Indicates the number of heads, each head will calculate a separate attention mechanism; represents a linear transformation matrix; It means concatenating the attention calculation results of each head, where Represents the attention calculation results of each head, Indicates the independent weight of each head.
4. The method for early warning of a stuck pipe based on time series anomaly detection according to claim 1, characterized in that: In step S3, the reconstruction prediction decoder adopts a hierarchical structure to reconstruct the input time series at different time scales, and finally fuses the reconstruction results at different time scales, which is defined as: ; in, represents the final reconstruction output; Represents a splicing operation; Indicated in Reconstructed output at the layer time scale; Represents the number of layers of the time scale.
5. The method for early warning of a stuck pipe based on time series anomaly detection according to claim 1, characterized in that: In step S4, the maximum mean difference loss function is introduced, specifically: ; in, represents the reconstruction loss function, represents the length of the time series, Indicates The real input data at each time point, Indicates The reconstructed output at each time point is Represents real input and reconstruct the output The mean square error between represents a hyperparameter; represents the maximum mean differential loss function, Indicates the source domain samples, Indicates the first samples, represents the number of samples in the source domain, represents the number of samples in the target domain, Represents the kernel function mapped to high-dimensional space.
Citation Information
Patent Citations
Method for predicting residual life of rolling bearing
CN118296951A
Intelligent identification method for early symptom signals of drilling tool jamming accidents under long tail distribution
CN118690271A
Cited By
Metal plate punching device
CN120461182A
