An intelligent error detection method and system for measurement-while-drilling data

By using a hybrid MA-CNN-BiGRU model to extract and repair features from downhole measurement-while-drilling data, the shortcomings of traditional methods in identifying complex anomalies are addressed, achieving high-precision anomaly detection and classification, and improving the accuracy and safety of drilling decisions.

CN120929927BActive Publication Date: 2026-01-23ZHUOZHOU CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511438455.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-10
Publication Date
2026-01-23
Estimated Expiration
2045-10-10

AI Technical Summary

Technical Problem

In existing measurement-while-drilling technologies, anomalies exist in the raw data stream measured by sensors. Traditional methods struggle to identify complex nonlinear relationships and dynamic anomaly patterns, leading to misleading geologists' judgments and engineers' monitoring. This could cause the drilling trajectory to deviate from the design target area, miss high-quality reservoirs, or even trigger accidents such as stuck pipe or lost circulation. Furthermore, existing deep learning methods suffer from high computational complexity, gradient vanishing or exploding issues when processing long sequence signals, lacking adaptability and long-term practicality.

Method used

A hybrid MA-CNN-BiGRU model is adopted, which combines a convolutional feature extraction module, a temporal feature extraction module, a sequence attention module, and a classification output layer to extract features and reconstruct sequences from downhole measurement data, identify anomalies and repair them. The model is optimized through adaptive filtering and incremental learning to achieve high-precision anomaly detection and classification.

Benefits of technology

It achieves highly sensitive identification and accurate classification of complex anomalies, reduces false alarm and false negative rates, ensures the authenticity and continuity of data, has adaptive capabilities to adapt to changes in the drilling operation environment, and improves the accuracy and safety of drilling decisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120929927B_ABST
    Figure CN120929927B_ABST
Patent Text Reader

Abstract

The application provides an intelligent error detection method and system for measurement-while-drilling data, and relates to the technical field of measurement-while-drilling, which comprises collecting an original data stream and performing pretreatment, after the pretreatment, performing feature extraction and sequence recombination to obtain recombined sample data, constructing an MA-CNN-BiGRU hybrid model, inputting the original data stream to be detected into the trained MA-CNN-BiGRU hybrid model to obtain a detection result, repairing the abnormal data segment, transmitting the high-quality data obtained after the detection and the repair to a drilling monitoring system, and performing incremental learning on the MA-CNN-BiGRU model to realize self-adaptive optimization of the model. The application realizes high-precision classification of the measurement-while-drilling data anomaly through the MA-CNN-BiGRU model and a double attention mechanism, performs targeted intelligent repair according to the type, combines closed-loop incremental learning, and finally outputs a high-quality and traceable data stream, which significantly improves the accuracy and safety of drilling decisions.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of measurement-while-drilling technology, and particularly to an intelligent error detection method and system for measurement-while-drilling data. BACKGROUND

[0002] As the "eyes" of modern oil and gas drilling, the measurement-while-drilling technology is a core technology for realizing precise geosteering, ensuring drilling safety, and optimizing drilling efficiency. The technology collects downhole data in real time through various sensors (such as attitude sensors, geologic parameter sensors, and engineering parameter sensors) installed near the drill collar close to the drill bit, and then encodes the data and uploads it to the surface system in the form of pulses through a mud pulse telemetry system or electromagnetic waves. However, the downhole working environment is extremely harsh, and the sensors are subjected to complex working conditions of high temperature, high pressure, strong vibration, and strong electromagnetic interference for a long time, which inevitably causes various types of abnormalities in the raw data stream measured by the sensors, mainly including instantaneous pulse interference, data point loss, sensor baseline drift, signal waveform distortion, and even complete data saturation or failure. If these abnormal data cannot be identified and corrected in a timely and accurate manner, it will seriously mislead the geologist's judgment of formation information and the engineer's monitoring of the downhole drilling tool state, which may cause the drilling trajectory to deviate from the designed target area, miss high-quality reservoirs, and even cause serious engineering safety accidents such as sticking and lost circulation, resulting in huge economic losses. Traditional data error detection methods mainly rely on setting fixed physical thresholds or simple statistical rules (such as the 3σ rule based on mean and standard deviation). Although these methods are simple to implement, their recognition ability is very limited for implicit abnormalities under complex nonlinear relationships and dynamic abnormal patterns that change over time, and their false positive rate and false negative rate are high. In addition, some methods based on traditional signal processing techniques (such as Kalman filtering and wavelet denoising) are effective in specific scenarios, but their filtering parameters are often fixed and cannot adaptively cope with the actual situation where the vibration source frequency changes with the drilling speed. Moreover, while filtering out noise, these methods often lose useful real signal features, resulting in data distortion.

[0003] In recent years, with the rapid development of artificial intelligence technology, especially the successful application of deep learning in image recognition, natural language processing and other fields, some researchers have begun to try to introduce deep learning models into the field of drilling data processing. For example, some studies use convolutional neural networks to automatically extract spatial features of data, or use recurrent neural networks and their variants (such as long short-term memory networks LSTM, gated recurrent units GRU) to learn the temporal dependence of data. However, these methods still have significant limitations when faced with ultra-long sequence signals such as drilling data: CNN models have difficulty effectively capturing long-term temporal context information in data; while RNN and its variants face inherent problems such as high computational complexity, gradient vanishing or explosion, and difficulty in effectively preserving key information in the early stages of the sequence when processing long sequences. Although some studies have tried to combine CNN and RNN, they have not fundamentally solved the problems of long sequence information decay and key feature focusing. At the same time, most existing methods focus on the detection and identification of anomalies, and lack an end-to-end solution that integrates accurate anomaly classification and targeted intelligent repair. In addition, the generalization ability and adaptability of the model are insufficient, and it cannot continuously evolve as drilling operations proceed, working conditions change, and new anomaly patterns emerge, which challenges its long-term practicality and reliability in actual industrial scenarios. Therefore, there is an urgent need for a drilling data error detection method that can adapt to complex and dynamic downhole environments, has high precision, strong adaptability, and can realize intelligentization from anomaly detection, classification to repair, to fundamentally guarantee the quality and reliability of drilling measurement data and provide a solid data cornerstone for intelligent drilling. In summary, it is very necessary to design an intelligent error detection method and system for drilling measurement data. SUMMARY

[0004] In order to overcome the shortcomings of the prior art, the purpose of the present application is to provide an intelligent error detection method and system for drilling measurement data.

[0005] To achieve the above purpose, the present application provides the following solutions:

[0006] The present application provides an intelligent error detection method for drilling measurement data, comprising:

[0007] Step 1: Collecting the original data stream of the multi-source sensor of the downhole drilling measurement system and pre-processing it;

[0008] Step 2: Feature extraction and sequence recombination are performed on the pre-processed data to obtain recombined sample data;

[0009] Step 3: Construct an MA-CNN-BiGRU hybrid model and train it based on a pre-defined dataset to obtain the trained MA-CNN-BiGRU hybrid model. The MA-CNN-BiGRU hybrid model includes a convolutional feature extraction module, a temporal feature extraction module, a sequence attention module, and a classification output layer.

[0010] Step 4: Input the raw data stream from the multi-source sensors to be detected into the trained MA-CNN-BiGRU hybrid model to obtain the detection results, which include the anomaly probability and anomaly type classification results for each data point;

[0011] Step 5: For abnormal data segments, repair them to generate repair values ​​that conform to physical laws;

[0012] Step 6: Transmit the high-quality data obtained after error detection and repair to the drilling monitoring system. Use the error detection results confirmed on-site as new samples to perform incremental learning on the MA-CNN-BiGRU model to achieve adaptive optimization of the model.

[0013] Preferably, in step 1, the raw data stream from the multi-source sensors of the downhole measurement-while-drilling system is acquired and preprocessed, specifically as follows:

[0014] The raw data streams from multiple sensors of the downhole measurement-while-drilling system are acquired, and the data undergoes quality checks, time alignment, and preliminary filtering of outliers. An adaptive filtering algorithm is then used for noise reduction to obtain the preprocessed data.

[0015] Preferably, in step 2, feature extraction and sequence recombination are performed on the preprocessed data to obtain recombined sample data, specifically as follows:

[0016] Based on the 1D-CNN network structure, primary feature extraction and sequence length reduction are performed on the processed data to obtain multi-channel feature maps;

[0017] The multi-channel feature maps are reconstructed and converted into sequence format;

[0018] The obtained data is normalized to obtain recombined sample data.

[0019] Preferably, the convolutional feature extraction module includes at least two one-dimensional convolutional layers, and each convolutional layer is followed by a convolutional block attention module for extracting spatial features and enhancing information about key channels and spatial locations.

[0020] Preferably, the temporal feature extraction module is a bidirectional gated recurrent unit layer, used to learn the long and short-term temporal dependencies of the data, and the sequence attention module is used to perform weighted fusion of the hidden states of all time steps of the bidirectional gated recurrent unit layer to highlight the contribution of key time steps.

[0021] Preferably, in step 5, for abnormal data segments, repair is performed to generate repair values ​​that conform to physical laws, specifically as follows:

[0022] Obtain the anomaly probability and anomaly type classification results for each data point, and repair it according to the anomaly type classification results using a preset repair strategy to generate repair values ​​that conform to physical laws.

[0023] The present invention also provides an intelligent error detection system for measurement-while-drilling data, applied to the above-mentioned intelligent error detection method for measurement-while-drilling data, comprising:

[0024] The data acquisition and preprocessing module is used to receive raw data streams from multiple sources of sensors in the downhole measurement while drilling system and to preprocess them.

[0025] The feature extraction and sequence recombination module is connected to the data acquisition and preprocessing module and is used to perform feature extraction and sequence recombination on the preprocessed data.

[0026] The error detection module is connected to the feature extraction and sequence recombination module and is used for error detection and recognition based on the MA-CNN-BiGRU hybrid model.

[0027] The intelligent data repair module, connected to the error detection module, is used to repair abnormal data segments by calling a preset repair strategy that matches the abnormal type based on the abnormal type classification result, and generate repair values ​​that conform to physical laws.

[0028] The data output and incremental learning module is connected to the intelligent data repair module and the error detection module, respectively. It is used to transmit the high-quality data after error detection and repair to the drilling monitoring system, and to receive the error detection results confirmed on-site as new samples to perform incremental learning on the MA-CNN-BiGRU hybrid model to achieve adaptive optimization of the model.

[0029] Preferably, the error detection module includes:

[0030] The intelligent error detection core engine module is connected to the feature extraction and sequence reconstruction module, and it has a trained MA-CNN-BiGRU hybrid model embedded in it.

[0031] The MA-CNN-BiGRU hybrid model includes: a convolutional feature extraction module, a temporal feature extraction module, a sequence attention module, and a classification output layer.

[0032] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0033] This invention provides an intelligent error detection method and system for downhole measurement-while-drilling (MWD) data. The method includes acquiring raw data streams from multiple sensors in a downhole MWD system, preprocessing the data, extracting features and reconstructing sequences from the preprocessed data to obtain reconstructed sample data, constructing an MA-CNN-BiGRU hybrid model, and training the model on a pre-defined dataset to obtain a trained MA-CNN-BiGRU hybrid model. The MA-CNN-BiGRU hybrid model includes a convolutional feature extraction module, a temporal feature extraction module, a sequence attention module, and a classification output layer. The raw data streams from multiple sensors to be detected are input into the trained MA-CNN-BiGRU hybrid model to obtain error detection results, including the anomaly probability and anomaly type classification results for each data point. For abnormal data segments, repair is performed to generate repair values ​​that conform to physical laws. The high-quality data obtained after error detection and repair is transmitted to the drilling monitoring system. The error detection results confirmed on-site are used as new samples to incrementally learn the MA-CNN-BiGRU model, achieving adaptive optimization of the model. First, in terms of core error detection performance, this invention constructs an innovative MA-CNN-BiGRU hybrid model, deeply integrating a one-dimensional convolutional neural network, a bidirectional gated recurrent unit, and a dual attention mechanism of convolutional block attention module and sequence attention module. This achieves unprecedented high-precision, fine-grained identification and classification of data anomalies. The CNN module is responsible for efficiently extracting local spatial features of the data and intelligently compressing sequence length, effectively solving the bottleneck of BiGRU in processing long sequences. The BiGRU module fully utilizes its bidirectional structure to deeply learn the temporal dependencies of the data and accurately capture normal dynamic patterns. The introduction of the dual attention mechanism of CBAM and SAM is like giving the model the ability of "intelligent focusing," enabling it to adaptively strengthen the information weights of channels, spatial locations, and key time steps that are sensitive to anomalies. This results in extremely high sensitivity to complex anomalies (such as gradual drift and intermittent distortion) that are difficult to identify by traditional methods, significantly reducing false positives and false negatives.

[0034] Secondly, this invention represents a leap from passive detection to proactive governance, proposing an intelligent repair system that precisely matches anomaly types. The method goes beyond anomaly identification; it is based on a clear anomaly classification system (e.g., transient anomalies, persistent anomalies, complete failures) and designs targeted repair strategies for each type of anomaly. For transient anomalies, a context-aware repair technique based on generative adversarial networks is employed. This technique generates repair values ​​that conform to physical laws based on normal data before and after the anomaly point, achieving significantly better results than traditional interpolation methods and maximizing the restoration of data authenticity and continuity. For persistent anomalies, strategies such as trend correction and multi-sensor fusion effectively eliminate system biases and restore the normal form of the signal. This targeted repair approach greatly reduces information loss caused by simply removing anomalous data, ensuring the integrity and high quality of the data chain upon which subsequent geological guidance and engineering decisions rely.

[0035] Third, this invention possesses strong adaptive and continuous evolution capabilities. By introducing a closed-loop learning mechanism, the system becomes an "intelligent agent" capable of continuously learning from practice. It collects confirmation or correction feedback from field engineers regarding error detection results through a human-computer interaction interface, storing this feedback as high-quality labeled samples in an incremental learning library. The system periodically or based on event-triggered model fine-tuning processes, using transfer learning techniques to incrementally update the MA-CNN-BiGRU model. This allows it to continuously adapt to new drilling blocks, new drill string combinations, and emerging anomaly patterns, thus ensuring the effectiveness and robustness of the method in long-term use and giving it longevity.

[0036] Finally, this invention demonstrates significant advantages in terms of engineering practicality and systematicity. The entire solution designs a complete data pipeline, from multi-source data preprocessing and feature engineering to model inference, intelligent repair, and then to result output and feedback learning. Each step is closely integrated, forming an end-to-end automated solution. The system supports an edge-cloud collaborative computing architecture, which not only meets the low-latency requirements of real-time downhole data processing but also utilizes the powerful computing capabilities of the cloud for complex model analysis and updates. Simultaneously, a detailed data quality traceability chain (repair metadata) and a tiered alarm mechanism provide engineers with ample transparency and decision support, greatly enhancing the deployability and practical value of this method in complex industrial environments. Attached Figure Description

[0037] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0038] Figure 1 This is a schematic diagram of the method flow of the present invention;

[0039] Figure 2 This is a schematic diagram of primary feature extraction;

[0040] Figure 3 This is a schematic diagram of the MA-CNN-BiGRU hybrid model structure;

[0041] Figure 4 This is a schematic diagram of the model training process;

[0042] Figure 5 This is a schematic diagram of the repair strategy process. Detailed Implementation

[0043] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0044] The purpose of this invention is to provide an intelligent error detection method and system for measurement-while-drilling (MWD) data. It achieves high-precision classification of MWD data anomalies through an MA-CNN-BiGRU model and a dual attention mechanism, and performs targeted intelligent repair based on the type. Combined with closed-loop incremental learning, it ultimately outputs a high-quality, traceable data stream, which significantly improves the accuracy and safety of drilling decisions.

[0045] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0046] like Figure 1 As shown, the present invention provides an intelligent error detection method for drilling measurement data, comprising:

[0047] Step 1: Acquire raw data streams from multiple sensors in the downhole measurement-while-drilling system and preprocess them;

[0048] Step 2: Perform feature extraction and sequence recombination on the preprocessed data to obtain the recombined sample data;

[0049] Step 3: Construct an MA-CNN-BiGRU hybrid model and train it based on a pre-defined dataset to obtain the trained MA-CNN-BiGRU hybrid model. The MA-CNN-BiGRU hybrid model includes a convolutional feature extraction module, a temporal feature extraction module, a sequence attention module, and a classification output layer.

[0050] Step 4: Input the raw data stream from the multi-source sensors to be detected into the trained MA-CNN-BiGRU hybrid model to obtain the detection results, which include the anomaly probability and anomaly type classification results for each data point;

[0051] Step 5: For abnormal data segments, repair them to generate repair values ​​that conform to physical laws;

[0052] Step 6: Transmit the high-quality data obtained after error detection and repair to the drilling monitoring system. Use the error detection results confirmed on-site as new samples to perform incremental learning on the MA-CNN-BiGRU model to achieve adaptive optimization of the model.

[0053] In step 1, the raw data stream from the multi-source sensors of the downhole measurement-while-drilling system is acquired and preprocessed, specifically as follows:

[0054] The raw data stream from multiple sensors in the downhole measurement-while-drilling system is acquired, and its quality is checked, time aligned, and outlier initially filtered. An adaptive filtering algorithm is then used for noise reduction to obtain preprocessed data. Step 1 is explained in detail below:

[0055] Downhole measurement-while-drilling (MWD) data from complex environments, raw and multi-source data containing significant noise, consumes substantial computational resources for the model. Therefore, this step enables data preprocessing, which will be described step by step:

[0056] Step 101: A measurement-while-drilling system typically includes multiple sensors that together form a measurement network, which includes:

[0057] 1. Attitude sensor group:

[0058] Triaxial accelerometer: measures well inclination angle and tool face angle.

[0059] Three-axis fluxgate sensor: measures azimuth angle (requires use with accelerometer).

[0060] Three-axis gyroscope: assists in attitude measurement in dynamic environments and compensates for the effects of drill bit rotation.

[0061] 2. Geological parameter sensor group:

[0062] Gamma sensor: measures natural gamma rays in the formation for stratigraphic correlation.

[0063] Resistivity sensor: measures formation resistivity to determine lithology and fluid properties.

[0064] 3. Engineering parameter sensor group:

[0065] Downhole pressure / temperature sensor: monitors downhole operating conditions.

[0066] Vibration sensors: monitor the intensity of drill string vibration, and are themselves an important source and indicator of anomalies.

[0067] Data is typically uploaded to the ground system in real time using specific frame formats and transmission protocols (such as WITSML). The interface module in this step needs to support multiple communication protocols and reliably receive and parse these data packets.

[0068] Step 102: Data quality check and preliminary cleaning

[0069] Before formal preprocessing, a coarse screening is performed to remove the most obvious invalid data. The specific steps are as follows:

[0070] 1. Outlier Removal: Detects and removes data points that are significantly outside the physical range due to momentary transmission interruptions (e.g., abnormal peak values ​​with acceleration values ​​exceeding 3 times the gravitational acceleration).

[0071] 2. Data integrity verification: Check whether the data frame is complete, mark the missing data segments caused by packet loss, and then use interpolation or mark it as a "communication interruption" type exception.

[0072] 3. Consistency Verification: Rapid verification based on physical principles. For example, the magnitudes of the three axial vectors of a triaxial accelerometer should be approximately equal to 1g (gravitational acceleration). Excessive deviation indicates a potential sensor malfunction.

[0073] Step 103: Multi-sensor data time alignment

[0074] Different sensors may have data that is out of sync in time due to differences in sampling rate, processing delay, or transmission timing;

[0075] Therefore, all data streams are stamped with a uniform, high-precision timestamp (usually using the downhole tool's clock, synchronized with the surface system); using the sensor with the highest sampling rate as a reference (or a uniform clock as a reference), the data from other sensors are resampled onto a uniform time axis using interpolation algorithms (such as linear interpolation, spline interpolation) to ensure that all sensor readings at the same point in time are measurements of the same downhole condition.

[0076] Step 104: Noise Suppression and Signal Enhancement

[0077] For the most significant noise source downhole—strong vibration noise—targeted processing is employed, using adaptive signal processing technology instead of fixed filters.

[0078] The vibration frequency of the drill string changes with the rotational speed (RPM) and drilling conditions. Using a fixed-frequency filter will either not filter it cleanly or will result in the loss of useful signals.

[0079] A band-stop filter with adaptive center frequency is used for filtering, and the following operations are performed:

[0080] 1. Real-time spectrum analysis: Perform short-time Fourier transform (STFT) on vibration acceleration signals or raw gamma / resistivity signals to analyze the currently dominant vibration frequency components in real time;

[0081] 2. Dynamic filtering: Based on the analyzed dominant frequency, the center frequency and bandwidth of the band-stop filter are dynamically set to accurately filter out noise near that frequency, while preserving formation signals and real anomalies to the greatest extent possible.

[0082] Inter-sensor coupling correction: The covariance matrix is ​​used to analyze the correlation of readings from different sensors within a sliding window. For example, strong lateral vibrations may simultaneously affect the readings of both the accelerometer and resistivity sensor. By analyzing this coupling relationship, it is possible to correct for spurious correlations to some extent.

[0083] Step 105: Data Standardization / Normalization

[0084] Scaling sensor data with different dimensions and numerical ranges to a similar scale accelerates model convergence and prevents certain features with large values ​​from dominating model training. Z-Score standardization is usually used, which will not be discussed here, but other standardization methods can also be used.

[0085] Step 106: Data Caching and Streaming Construction

[0086] The cleaned data after processing is placed in a buffer and organized according to the input format required by the subsequent model (such as fixed-length time series segments);

[0087] Continuous data sample blocks are generated in real time using a sliding window method. For example, the window length is set to 1600 data points and the step size is 800 points. This ensures the generation of continuous training / inference samples with a certain degree of overlap, taking into account both timeliness and information integrity.

[0088] In step 2, feature extraction and sequence recombination are performed on the preprocessed data to obtain the recombined sample data, specifically as follows:

[0089] Based on the 1D-CNN network structure, primary feature extraction and sequence length reduction are performed on the processed data to obtain multi-channel feature maps;

[0090] The multi-channel feature maps are reconstructed and converted into sequence format;

[0091] The obtained data is then normalized to obtain recombined sample data;

[0092] It is described in detail below:

[0093] The clean but still raw time-series data output from step 1 is transformed and reorganized into a structured format that maximizes the performance of the MA-CNN-BiGRU model. This is not a simple data transfer, but an intelligent, model-oriented data representation transformation that solves two key problems:

[0094] 1. Problem of excessively long sequences: If the original sequence is too long, directly inputting it into BiGRU will lead to high computational cost and gradient vanishing.

[0095] 2. Feature representation problem: Provide the model with richer and more structured input features, rather than just raw amplitude points;

[0096] Specifically, the steps include the following:

[0097] Step 201: Primary Feature Extraction and Sequence Length Reduction Based on 1D-CNN

[0098] Taking a one-dimensional sequence of length L=1600 time points as an example, the flowchart is as follows: Figure 2 As shown;

[0099] The input is: multi-channel timing data after preprocessing in step 1;

[0100] The operation involves processing using one-dimensional convolutional layers and pooling layers.

[0101] 1. One-dimensional convolution: Multiple one-dimensional convolution kernels (e.g., 16 kernels of size 5 in the first layer) are slid across the sequence. Each kernel is responsible for extracting a specific local pattern (such as a specific vibration pattern or trend change), which is equivalent to automatically generating the output of 16 different "feature detectors".

[0102] 2. Pooling: A pooling layer (usually max pooling) is applied after convolution to reduce the sequence length (i.e., downsampling) while preserving significant features. For example, a pooling layer with a stride of 2 can halve the sequence length.

[0103] The output is a multi-channel feature map with dimensions (number of channels C, new sequence length L'). For example, after two CNN layers and pooling, the sequence length is reduced from 1600 to 200 (a reduction of 1 / 8), while generating a 16-channel feature map. This means that a long sequence of 1600 points is compressed into a short sequence of 200 steps, each step represented by a 16-dimensional feature vector.

[0104] Step 202: Sequence Recombination

[0105] Convert the feature map format output by the CNN into a sequence format that can be understood by the BiGRU recurrent neural network;

[0106] The feature map output in step 201 is cut along the channel dimension and then reassembled along the time dimension;

[0107] Specifically, for a new sequence of length T=200, at each time step t, the feature values ​​of all channels (16) at that time step are extracted and formed into a 16-dimensional vector V. t .

[0108] This results in a sequence of length T=200, where the input at each time point is a 16-dimensional feature vector: [V1, V2, ..., V...]. 200 ];

[0109] Now, each step of this sequence contains condensed information about multiple features of the original signal during that time period, rather than just the amplitude value of a single sensor, which provides BiGRU with a much higher information density input.

[0110] Step 203: Data Normalization (for the recombined features)

[0111] Although the original data has been standardized in step 1, the new feature vectors may need to be normalized again after CNN transformation and feature enhancement to ensure that they are within a similar numerical range, which is beneficial to the stability of model training. Usually, batch normalization layers are integrated into the model, or Z-score normalization is performed again, depending on the specific needs.

[0112] In step 3, a hybrid MA-CNN-BiGRU model is constructed and trained on a pre-defined dataset to obtain the trained MA-CNN-BiGRU hybrid model. This model includes a convolutional feature extraction module, a temporal feature extraction module, a sequence attention module, and a classification output layer. Specifically, the steps are as follows:

[0113] Step 301: Definition of Anomaly Classification System

[0114] First, we establish an anomaly classification system based on data form and generation mechanism, which is oriented towards repair. This system is a bridge connecting detection and repair. Anomalies are mainly divided into three categories, each with a clear definition and subsequent repair direction.

[0115] 1. Transient anomalies (high recoverability): short duration (usually <100ms), complete context information.

[0116] Pulse anomaly: The amplitude spikes instantaneously to well beyond the normal range (e.g., beyond ±3 standard deviations), then immediately recovers. Often caused by electromagnetic interference or transient collisions. Repair strategy: Context-aware repair.

[0117] Missing data points: A gap in the data sequence, consisting of one or a small number of consecutive data points (e.g., transmission errors). Repair strategy: Context-aware repair.

[0118] 2. Persistent anomalies (moderate recoverability): The duration is relatively long (hundreds of milliseconds to several seconds), and the overall data deviates from the normal pattern.

[0119] Trend drift: Slow or rapid linear / non-linear changes in the sensor reference value. Often caused by temperature drift or slow sensor failure. Repair strategy: Trend correction repair.

[0120] Signal distortion: Data waveform distortion, such as a significant increase / decrease in variance (due to suppression or oscillation) or response delay. Often caused by probe fouling or changes in damping. Repair strategies: Trend correction / model correction.

[0121] 3. Complete Failure (Low / Unrepairable): The data is completely unreliable, indicating a serious failure of the sensor or communication link.

[0122] Data saturation / jamming: The data remains unchanged at the extreme value of the measurement range or at a fixed value for a long time.

[0123] Random noise: The data is completely overwhelmed by irregular noise, losing all useful information.

[0124] Remediation strategy: Mark-and-remove and alerts.

[0125] Step 302: Convolutional Spatial Feature Extraction and Enhancement (CNN+CBAM Module)

[0126] The goal of this stage is to extract spatial local features that are sensitive to the above six types of anomalies from the original sequence and to enhance key information;

[0127] 1. Input data preparation: Receive the recombined feature sequence from step 2, with dimensions [batch size, sequence length T=200, feature dimension D=16].

[0128] 2. One-dimensional convolution operation:

[0129] Multiple one-dimensional convolutional kernels are used as local pattern detectors. Different convolutional kernels are specifically designed to capture different local patterns, which are the basis for anomaly identification.

[0130] Implementation details: 32 convolutional kernels of size 3 are used to perform one-dimensional convolution along the time dimension. The association with anomaly classification is as follows:

[0131] Some convolutional kernels learn the "sharp peak" pattern needed to identify pulse anomalies.

[0132] Some convolutional kernels learn to recognize the "slow slope" pattern at the beginning of a trend drift.

[0133] Some convolutional kernels can learn to recognize "high-frequency oscillations" or "waveform broadening" patterns in signal distortion.

[0134] 3. Application of Convolutional Block Attention Module:

[0135] Let the model automatically determine "which features (channel dimension) and which time region (spatial dimension) are most useful for anomaly detection at the current location";

[0136] Channel attention mechanism: Global average pooling and max pooling are performed on the feature map in the spatial dimensions (H, W) to obtain two C×1×1 descriptors. The outputs are summed through a shared small neural network (such as a multilayer perceptron MLP) and then activated by a sigmoid function to obtain the weight coefficient Mc for each channel. For example, when the model is suspected of having a spurious anomaly, it will automatically assign higher weights to the outputs (channels) of convolutional kernels that are sensitive to high-frequency abrupt changes.

[0137] Spatial attention mechanism: Average pooling and max pooling are performed along the channel dimension, the results are concatenated, and then passed through a convolutional layer to obtain the spatial weight matrix Ms. For example, it automatically generates higher spatial attention weights around "hole" regions where data points may be missing, or at the starting point of trend drift.

[0138] Weighted Output: The original feature map is multiplied sequentially by the channel attention weight Mc and the spatial attention weight Ms to obtain the enhanced feature map F''. This step significantly improves the quality of the feature map, allowing subsequent networks to focus more on anomaly-related information.

[0139] Step 303: Bidirectional Temporal Context Modeling (BiGRU Module)

[0140] The goal at this stage is to enable the model to understand the evolution of data over time, i.e., "cause and effect," which is the key to distinguishing anomaly types.

[0141] 1. Input: The feature sequence enhanced in step 302;

[0142] 2. BiGRU working principle:

[0143] Forward GRU: Processes the sequence sequentially from the beginning to the end (t=1 to t=T). It learns the normal pattern of "predicting the future based on the past".

[0144] Backward GRU: It processes the sequence in reverse order from the end to the beginning (t=T to t=1). It learns the normal pattern of "looking back at the past based on the future".

[0145] Output fusion: At each time step t, change the forward hidden state to h. t and the backward hidden state ←h t The pieces are then assembled to form the final hidden state h. t =[→h t , ←h t ]. This h t It contains complete contextual information centered on time t, extending to both the left and right sides.

[0146] 3. Relationship with anomaly classification:

[0147] To determine whether an isolated peak is an abnormal pulse or a normal oscillation, it is necessary to look at whether there is supporting evidence before and after it. BiGRU provides this context.

[0148] The judgment of trend drift requires a longer-term dependency relationship. BiGRU can sense the change of the current value relative to the benchmark a period of time ago.

[0149] Identifying signal distortion (such as response delay) requires comparing the timing relationship between the input stimulus and the output response, and BiGRU excels at capturing such timing misalignments.

[0150] Step 304: Attention Weighting at Key Time Steps (SAM Module)

[0151] This stage addresses the inherent shortcomings of standard BiGRU in long sequence classification: model decisions often rely excessively on the hidden states at the end of the sequence, while ignoring potentially more critical anomalous evidence from earlier in the sequence.

[0152] An anomalous pulse may occur at the beginning of a sequence, but in traditional BiGRU classification, the information at the beginning may have decayed or been forgotten after a long time of step transmission.

[0153] SAM Solution:

[0154] Input: Hidden states of the BiGRU layer at all time steps. Output H = [h1, h2, ..., h...] T ].

[0155] Calculating the attention score: SAM computes an attention score a for each time step t using a trainable fully connected layer and a softmax function. t This score represents the importance of the hidden state at that time step to the final classification decision of the entire sequence.

[0156] a t =softmax(score(h t ))=exp(score(h t )) / Σ(exp(score(h jforj=1toT

[0157] Generate context vector: generate all hidden states h t Based on their attention score a t We perform a weighted summation to obtain a fixed-size context vector C that can represent the key information of the entire sequence;

[0158] C=Σ(a t *h t fort=1toT

[0159] Regardless of where the anomaly occurs in the sequence (beginning, middle, or end), as long as it is significant enough, the SAM mechanism will assign it high weight, ensuring that the model's final judgment is based on the strongest evidence in the entire sequence, thereby significantly improving the detection accuracy of early and scattered anomalies.

[0160] Step 305: Anomaly Classification Output and Post-processing

[0161] 1. Classification of Fully Connected Layers and Softmax:

[0162] The context vector C output by SAM is nonlinearly transformed through one or more fully connected layers and finally input into an output layer with N neurons (N equals the number of abnormality categories, for example, 7 categories: normal + 6 abnormal categories).

[0163] The Softmax function transforms the values ​​of this N-dimensional vector into a probability distribution, where each value represents the probability of belonging to the corresponding category, and the sum of all probabilities is 1.

[0164] Output example: [Normal: 0.02, Impulse anomaly: 0.91, Missing data: 0.01, Trend drift: 0.04, Signal distortion: 0.01, Data saturation: 0.01, Random noise: 0.00].

[0165] 2. Classification Judgment:

[0166] The category with the highest probability is taken as the final anomaly label for the sequence (or for the time period based on the sliding window).

[0167] At the same time, a confidence threshold (such as 0.8) can be set. If the maximum probability is lower than this threshold, the result is marked as "low confidence" or "uncertain" and can be submitted to the rule system or manual review.

[0168] 3. Abnormal event aggregation:

[0169] The model processes data segment by segment (or through a sliding window). The system aggregates results that are classified as the same type of anomaly within consecutive time periods to form a complete "anomaly event".

[0170] Generate exception event descriptors: Each event record includes:

[0171] Event ID, anomaly type, start time, end time, average confidence level, maximum anomaly magnitude;

[0172] This structured exception event descriptor is the direct input to the repair module in step 5. It clearly indicates where the problem occurred and what the corresponding repair strategy is triggered.

[0173] The present invention provides a schematic diagram of the MA-CNN-BiGRU hybrid model structure as follows: Figure 3 As shown, MA, CNN, and BIGRU will not be discussed in detail here. Instead, the training process of the model will be described in detail, which is as follows:

[0174] S1: Training Dataset Construction

[0175] This is the foundation of model training; data quality directly determines the upper limit of model performance.

[0176] Its data sources include:

[0177] 1. Historical Normal Data: Collect a large amount of drilling data recorded under known normal operating conditions from multiple successfully completed drilling projects.

[0178] 2. Historical Anomaly Data: Collect data segments with clear historical records of anomalies (such as sensor failures, severe vibrations, etc.), and have them precisely labeled by domain experts based on drilling logs and event reports.

[0179] 3. Artificially Injecting Anomalous Data: To obtain sufficiently diverse and abundant anomalous samples, various anomalies are simulated in normal data through artificial injection. Specifically:

[0180] Pulse anomaly: A sudden high-amplitude pulse is added at a random position in a normal data sequence.

[0181] Missing data: Randomly set a continuous range of data points to zero or NaN.

[0182] Trend drift: Adding a linear or slowly changing non-linear trend term to normal data.

[0183] Signal distortion: Low-pass / high-pass filtering of normal data to simulate a slow or oscillating response, or multiplying by an attenuation / gain factor.

[0184] Sample labeling and balancing:

[0185] Each data sample (such as a sequence of length 1600) is assigned a unique anomaly type label (e.g., "0" represents normal, "1" represents pulse anomaly, and so on).

[0186] It is necessary to ensure that the number of samples in each category (including "normal") in the dataset is roughly balanced to prevent the model from favoring the category with more samples. For categories with fewer samples, oversampling or data augmentation techniques can be used.

[0187] Dataset partitioning:

[0188] The constructed complete dataset is randomly divided into three parts:

[0189] Training set: Used for learning model parameters (e.g., accounting for 70% of the total).

[0190] Validation set: Used to monitor model performance during training, adjust hyperparameters, and prevent overfitting (e.g., 15%).

[0191] Test set: Used to finally evaluate the model's generalization performance, and is used only once after training (e.g., accounting for 15%).

[0192] S2: Model Training Hyperparameter Settings

[0193] Before starting training, a series of hyperparameters need to be configured.

[0194] Loss function: Since this is a multi-class classification problem, the classification cross-entropy loss function is chosen. It can effectively measure the difference between the probability distribution predicted by the model and the true label.

[0195] Optimizer: The Adam optimizer is chosen because it can adaptively adjust the learning rate and typically converges quickly and performs well in deep learning tasks.

[0196] Learning rate: The initial learning rate is usually set to a small value, such as 0.001 or 0.0001.

[0197] Batch size: Selected based on GPU memory, typically 32, 64, 128, or 256.

[0198] Training rounds: Set a large number of rounds, but use early stopping techniques to prevent overfitting.

[0199] S3: Model Training Process

[0200] The training process is an iterative optimization process, and its core flow is as follows: Figure 4 As shown

[0201] Initialization: Randomly initialize all parameters in the model.

[0202] Forward propagation: Inputting a batch of training data into the model. The data passes through the following steps sequentially:

[0203] CNN layers extract local features.

[0204] The CBAM module performs feature enhancement.

[0205] BiGRU layers learn sequential dependencies.

[0206] The SAM module performs weighted calculations for key time steps.

[0207] The fully connected layer and the Softmax layer output predicted probabilities.

[0208] Loss calculation: The loss function is used to calculate the difference between the model's predicted values ​​and the true labels.

[0209] Backpropagation: Using the chain rule, the loss is propagated backward from the output layer to the input layer, calculating the gradient of the loss function with respect to each parameter. This process automatically optimizes the attention weights in CBAM and SAM.

[0210] Parameter update: The optimizer updates all parameters in the model based on the calculated gradient, with the goal of reducing the loss.

[0211] Looping iteration: Repeat the steps until all samples in the training set have been traversed (one epoch). Then start the next epoch until the stopping condition is met.

[0212] Validation and Early Stopping: After each epoch, the model performance is evaluated using a validation set (e.g., accuracy is calculated). When the validation set performance no longer improves over several consecutive epochs, "early stopping" is triggered, and the model parameters of the best-performing validation set are restored. This effectively prevents the model from overfitting on the training set.

[0213] Final evaluation: After training is completed, the final model is evaluated once using a test set that has never been used for training and parameter tuning to obtain objective metrics of its generalization performance (such as accuracy, precision, recall, F1 score, etc.).

[0214] S4: Model Validation and Performance Metrics

[0215] Confusion matrix: Provides a comprehensive view of the model's classification performance for each category, including misclassified categories.

[0216] Accuracy: The percentage of the overall classifications that are correct.

[0217] Precision: The proportion of data predicted as "impulse anomalies" that are actually impulse anomalies. High precision is required for severe anomaly categories to reduce false positives.

[0218] Recall rate: The proportion of all genuine "impact anomalies" that are successfully identified by the model. For anomalies related to safety hazards, a high recall rate is required to reduce false negatives.

[0219] F1 score: The harmonic mean of precision and recall, is a comprehensive metric.

[0220] Through the detailed training process described above, a fully optimized and validated high-performance MA-CNN-BiGRU error detection model can be obtained, providing a reliable core engine for real-time error detection in step 3.

[0221] In step 4, the raw data stream from the multi-source sensors to be detected is input into the trained MA-CNN-BiGRU hybrid model to obtain the error detection results, which include the anomaly probability and anomaly type classification results for each data point, specifically:

[0222] This step is the inference stage for the trained MA-CNN-BiGRU hybrid model to be put into practical application. Its core objective is to use the trained model to perform real-time analysis and diagnosis of newly acquired and unknown drilling measurement data streams, and output the abnormal status of each data point. The entire process is an automated forward propagation process that does not require manual intervention, and specifically includes the following steps:

[0223] Step 401: Real-time data stream access and buffering

[0224] Input: A continuous, real-time data stream from step 1, after preprocessing and sequence reconstruction;

[0225] Data buffer: The system maintains a first-in-first-out (FIFO) data buffer, the size of which is consistent with the sample length set during model training (e.g., 1600 data points). New data is constantly flowing in, and old data is constantly being squeezed out, thus forming a sliding data window;

[0226] Step 402: Model Inference and Anomaly Probability Calculation

[0227] For each complete data window in the buffer (e.g., a sequence of [1, 200, 16] representing 1 sample, 200 time steps, and 16-dimensional features), perform the following forward propagation computation:

[0228] 1. Spatial Feature Extraction and Enhancement (CNN + CBAM):

[0229] The data sequence is first input into a pre-trained one-dimensional convolutional layer in the model. The convolutional layer uses the convolutional kernels it has learned (such as kernels for recognizing pulses and drifts) to automatically extract local features.

[0230] Subsequently, the feature map enters the Convolutional Block Attention (CBAM) module. This module uses the trained parameters to automatically calculate and assign higher weights to key feature channels and key time regions, suppressing unimportant information. At this stage, the model does not need to relearn, but directly applies the best attention parameters obtained during the training stage.

[0231] 2. Temporal Context Modeling (BiGRU):

[0232] The enhanced feature sequence is input into the Bidirectional Gated Recurrent Unit (BiGRU) layer. BiGRU uses its trained hidden state parameters to calculate a new hidden state sequence that can capture long-short-term dependencies based on the current input and the previously saved hidden states. This process is the key for the model to use its "memory" to understand the dynamic process of the data.

[0233] 3. Focus on Key Information (SAM):

[0234] The hidden state outputs of BiGRU at all time steps are fed into the Sequence Attention (SAM) module. Based on the trained weight parameters, SAM calculates the importance score (attention score) of each time step for the final classification, and performs a weighted summation of all hidden states to generate a fixed-size context vector rich in key information of the entire sequence.

[0235] 4. Anomaly classification and probability output (fully connected layer + Softmax):

[0236] This context vector is ultimately passed through a fully connected layer and a Softmax activation function;

[0237] The Softmax layer outputs a probability distribution vector whose dimensions are strictly consistent with the number of anomaly categories defined in step 3 (e.g., 7 dimensions). Each element of this vector represents the probability that the current data window center point or the last point (depending on the model design) belongs to the corresponding anomaly category.

[0238] Output example: The model may output [Normal: 0.02, Impulse Anomaly: 0.91, Missing Data: 0.01, Trend Drift: 0.04, Signal Distortion: 0.01, Data Saturation: 0.01, Random Noise: 0.00], which means that the model determines with 91% confidence that the data point has an impulse anomaly;

[0239] Step 403: Generation and Output of Error Detection Results

[0240] 1. Point-by-point decision: The system runs continuously with a sliding window step size (e.g., inference is performed once for each new data point received), thereby generating a set of anomaly probabilities for each data point in the data stream; based on a preset confidence threshold (e.g., 0.75), the system assigns the category with the highest probability (if its probability exceeds the threshold) to the data point as its final anomaly label.

[0241] 2. Real-time generation of exception event descriptors: The system background monitors these consecutive exception tags in real time. Once consecutive exception tags of the same type are detected, the aggregation logic is immediately started to package them into a complete exception event descriptor.

[0242] This descriptor is the direct input and basis for subsequent repair steps, and it contains:

[0243] Event ID (unique identifier);

[0244] Abnormal type (e.g., "pulse abnormality");

[0245] Start timestamp;

[0246] End timestamp;

[0247] Average confidence level;

[0248] The affected data sequence (raw data or feature data);

[0249] Step 4 fully describes the entire process of transforming real-time data streams into structured error detection results. It makes full use of the fixed parameters (including attention weights) of the model trained in Step 3. Through a series of defined and automated calculation steps, it achieves real-time, accurate, and quantifiable intelligent diagnosis of anomalies in drilling data. This provides a key bridge for the entire invention from "offline training" to "online application," ensuring the integrity and feasibility of the technical solution.

[0250] In step 5, for abnormal data segments, repair is performed to generate repaired values ​​that conform to physical laws, specifically as follows:

[0251] Based on the refined anomaly classification results (i.e., "anomaly event descriptors") output in step 4, a repair algorithm that precisely matches them is executed to restore the authenticity and usability of the data to the greatest extent possible. This step achieves a leap from "discovering the problem" to "solving the problem".

[0252] Input: The exception event descriptor generated in step 4 (including exception type, time range, confidence level, etc.).

[0253] Output: The repaired data segment, along with detailed repair metadata.

[0254] Step 501: Repair Policy Routing

[0255] Based on the exception type field in the exception event descriptor, the repair task is routed to the corresponding dedicated repairer. The core decision logic is as follows: Figure 5 As shown;

[0256] Step 502-1: Pulse Anomaly Repair Process

[0257] Precise location and elimination: Based on the time range of the event descriptor, the pulse anomaly points are precisely located, and the values ​​of these points are set to NaN (not a number), which transforms them into "missing data point" problems. This operation removes the interference of outliers on the repair algorithm.

[0258] Repair execution: Proceed to step 502-2 and use GAN for repair;

[0259] Step 502-2: Data Point Missing Repair Process

[0260] Data segment preparation: Centered on the missing point / segment, extract sufficient length of normal data before and after it as the conditional context. For example, to repair a missing point of 10 points, extract 100 normal points before and after it to form a data segment of 210 points, which includes 10 NaNs.

[0261] GAN Fix:

[0262] Generator: Input the above data segment containing NaN into the pre-trained generative adversarial network (GAN) generator. During the training phase, the generator has learned the dynamic change patterns and physical laws of drilling data from massive amounts of normal data (such as the continuity of vibration signals and the smooth change of attitude angles).

[0263] Repair generation: Based on its learned "knowledge" and contextual information, the generator predicts the most reasonable value for the NaN position and generates a complete and smooth data segment;

[0264] Compared to traditional interpolation (linear, spline), GANs can generate more complex data waveforms that conform to nonlinearity and physical constraints, resulting in more natural and accurate restoration effects.

[0265] Step 503: Trend Correction Repairer (for persistent anomalies)

[0266] This repairer is suitable for persistent anomalies with predictable patterns. Its core idea is to estimate and eliminate systematic biases or distortions.

[0267] Step 503-1: Trend Drift Repair Process

[0268] Baseline estimation:

[0269] Calculate the baseline value (such as the mean) using normal data before the start point and after the end point of the abnormal event.

[0270] By using linear or exponential interpolation, the "proper" baseline at each moment within the abnormal period can be estimated. For example, if the baseline is A before the start and B after the end, it is considered that the baseline has drifted slowly from A to B.

[0271] Signal restoration: Subtract the estimated drift baseline value from the original data during the abnormal period.

[0272] Wherein, the correction value = the original value - the drift estimate.

[0273] This operation aims to remove drift components while preserving the original high-frequency fluctuation characteristics of the data.

[0274] Step 503-2: Signal Distortion Repair Process

[0275] 1. Multi-sensor fusion correction:

[0276] If another sensor physically related to the distorting sensor and with normal readings exists, it can be used for correction. For example, the vibration acceleration signal may be distorted, but the temperature sensor is normal, and a correlation between vibration and temperature is known. A regression model (such as linear regression, support vector regression (SVR), or a simple neural network) is trained on historical normal data, using normal sensor data as input, to predict the theoretical value of the target sensor. Data from the normal sensor during the abnormal period is then input into the model, and the model's output replaces the distorted original data.

[0277] 2. Deep learning waveform correction:

[0278] If dual-sensor support is unavailable, a denoising autoencoder or a U-Net-structured network can be trained to learn the mapping from "distorted waveforms" to "clean waveforms." This method requires a large number of "distorted-clean" data pairs for training, making it quite challenging.

[0279] Step 504: Mark Removal and Alert (for Complete Failure)

[0280] For this type of anomaly, any attempt to fix it may introduce a larger error. Therefore, the strategy is to handle it conservatively and issue explicit warnings.

[0281] Mark all data within the time period corresponding to the abnormal event descriptor as invalid or suspicious, and immediately send a high-level alarm to the drilling monitoring system. The information should include:

[0282] Alarm Level: Critical; Affected Sensors: Explicit Indication; Anomaly Type: Data Saturation / Random Noise; Recommended Action: Check sensor hardware, communication lines, or ground interface.

[0283] Step 505: Repair Quality Assessment and Metadata Annotation

[0284] After each repair operation, the repair quality must be evaluated and recorded to ensure data reliability.

[0285] 1. Quality assessment:

[0286] Smoothness test: Check whether the first derivative is continuous (without abrupt jumps) at the connection between the repaired segment and the normal data before and after it.

[0287] Physical rationality verification: The repaired data must conform to physical laws (e.g., the rate of change of well inclination angle is within a reasonable range);

[0288] Statistical consistency test: The corrected data should be similar to the surrounding normal data in terms of statistical properties (such as mean and variance);

[0289] Metadata annotation: Attach the following metadata to each repaired data point or data segment to form a data quality traceability chain:

[0290] is_repaired: True (repair flag);

[0291] original_anomaly_type: [Impact Anomaly] (original anomaly type);

[0292] repair_algorithm: [GAN] (the repair algorithm used);

[0293] repair_confidence: 0.92 (repair confidence, generated internally by the repair algorithm or calculated based on consistency);

[0294] timestamp_repair: [Repair timestamps].

[0295] In step 6, the high-quality data obtained after error detection and repair is transmitted to the drilling monitoring system. The error detection results confirmed on-site are used as new samples to incrementally learn the MA-CNN-BiGRU model, achieving adaptive optimization of the model. Specifically:

[0296] Step 601: Output of high-quality data and error detection reports

[0297] This part is responsible for delivering the processing results to downstream systems (such as drilling monitoring systems and geological steering systems) and engineers;

[0298] 1. Data stream output:

[0299] Content: Output a continuous, error-checked, and repaired high-quality data stream. This data stream is perfectly time-aligned with the original data stream.

[0300] Data labeling: Each data point is accompanied by a data quality label:

[0301] 0 or Normal: Normal data.

[0302] 1 or Repaired: The repaired data (along with the repair metadata generated in step 405).

[0303] -1 or Invalid: Data marked as completely invalid and unrepaired;

[0304] Format: Encapsulated and transmitted using standardized industrial data formats (such as WITSML) to ensure seamless integration with the existing drilling software ecosystem.

[0305] 2. Error detection report generation and alarms:

[0306] Real-time Report: The system generates a data quality summary in real time, including:

[0307] Current data channel quality score, types and number of newly discovered anomalies, and statistics on current repair operations;

[0308] Tiered alerts: Different levels of alerts are triggered based on the severity of the abnormal event.

[0309] Notification alert: Notify engineers of any transient anomalies that have been successfully resolved;

[0310] Warning alerts: These alert engineers to pay close attention to events that are persistently abnormal or have low confidence in being fixed.

[0311] Critical warning: For complete failure anomalies, immediately notify engineers to perform hardware checks;

[0312] Step 602: Human-Computer Interaction and Feedback Collection

[0313] 1. Visual monitoring interface: Provides a graphical interface that displays the original data curve, anomaly markers (highlighted with different colors), and the data curve after repair in parallel;

[0314] 2. Feedback Mechanism: The interface provides confirmation / rejection functions. Engineers can use this to perform the following operations:

[0315] Confirmation: The system's error detection and repair results are acknowledged;

[0316] Rejection and Correction: If you believe the system's judgment is incorrect, you can manually re-label the exception type or point out the unreasonable aspects of the repair.

[0317] All cases that have been confirmed or corrected by engineers, along with their corresponding original data segments, will be automatically packaged into a high-quality labeled sample.

[0318] Step 603: Incremental Learning and Adaptive Model Optimization

[0319] 1. Incremental learning sample library management:

[0320] The high-quality labeled samples collected in step 602 are stored in a dedicated incremental learning sample library.

[0321] The sample library will be managed according to time, working conditions, and anomaly type to ensure the diversity and balance of the samples;

[0322] 2. Triggering mechanisms include:

[0323] Periodic triggering: For example, start a round of model fine-tuning every 24 hours or when a certain number of new samples are accumulated (such as 1,000);

[0324] Event triggering: When the system's error detection performance significantly decreases under a new operating condition (such as when multiple cases are rejected by engineers in succession), the model update is triggered immediately;

[0325] 3. Model fine-tuning process:

[0326] Data preparation: A batch of new samples is extracted from the incremental learning sample library and mixed with some historical basic training data to prevent "catastrophic forgetting";

[0327] Transfer learning: Using the currently used MA-CNN-BiGRU model as the initial model, freeze its low-level feature extraction layers (such as the first few layers of CNN), and mainly fine-tune the parameters of its high-level networks (such as BiGRU layers, attention layers and classification layers);

[0328] Training and Validation: The model is trained using a new mixed dataset and its performance is evaluated on a reserved validation set to ensure that the fine-tuned model performs better on the new data without seriously damaging the original knowledge.

[0329] Model Deployment: After rigorous testing, the finely tuned and updated model version is smoothly switched to the online error detection system, replacing the old version. This process should ensure the continuity of drilling monitoring data streams.

[0330] Step 604: System Performance Monitoring and Log Recording

[0331] For the maintainability and traceability of the system, comprehensive logging is essential, and the logged content includes:

[0332] The model's daily error detection accuracy, recall, and other performance metrics, all alarm events, repair operations and their metadata, all feedback operations from engineers, and detailed information for each incremental learning of the model (time, samples used, performance changes).

[0333] Complete logs can be used for system status diagnosis, performance trend analysis, and accountability.

[0334] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0335] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. An intelligent error detection method for measurement-while-drilling data, characterized in that, include: Step 1: Acquire raw data streams from multiple sensors in the downhole measurement-while-drilling system and preprocess them; The data stream is the raw data stream from multiple sensors in the downhole measurement while drilling system. The raw data stream from multiple sensors includes continuous physical waveform signals collected by the attitude sensor group, the geological parameter sensor group, and the engineering parameter sensor group. Step 2: Perform feature extraction and sequence recombination on the preprocessed data to obtain recombined sample data; specifically including: Based on the 1D-CNN network structure, primary feature extraction and sequence length reduction are performed on the processed data to obtain multi-channel feature maps; The multi-channel feature maps are reconstructed and converted into sequence format; The obtained data is then normalized to obtain recombined sample data; Step 3: Construct an MA-CNN-BiGRU hybrid model and train it based on a pre-defined dataset to obtain the trained MA-CNN-BiGRU hybrid model. The MA-CNN-BiGRU hybrid model includes a convolutional feature extraction module, a temporal feature extraction module, a sequence attention module, and a classification output layer. Step 4: Input the raw data stream from the multi-source sensors to be detected into the trained MA-CNN-BiGRU hybrid model to obtain the detection results, which include the anomaly probability and anomaly type classification results for each data point; Step 5: For abnormal data segments, repair them to generate repair values ​​that conform to physical laws; obtain the abnormal probability and abnormal type classification results for each data point, and repair them based on the abnormal type classification results using a preset repair strategy to generate repair values ​​that conform to physical laws. Step 6: Transmit the high-quality data obtained after error detection and repair to the drilling monitoring system. Use the error detection results confirmed on-site as new samples to perform incremental learning on the MA-CNN-BiGRU model to achieve adaptive optimization of the model.

2. The method according to claim 1, characterized in that, In step 1, the raw data stream from the multi-source sensors of the downhole measurement-while-drilling system is acquired and preprocessed, specifically as follows: The raw data streams from multiple sensors of the downhole measurement-while-drilling system are acquired, and the data undergoes quality checks, time alignment, and preliminary filtering of outliers. An adaptive filtering algorithm is then used for noise reduction to obtain the preprocessed data.

3. The method according to claim 2, characterized in that, The convolutional feature extraction module includes at least two one-dimensional convolutional layers, and each convolutional layer is followed by a convolutional block attention module, which is used to extract spatial features and enhance information on key channels and spatial locations.

4. The method according to claim 3, characterized in that, The temporal feature extraction module is a bidirectional gated recurrent unit layer used to learn the long-term and short-term temporal dependencies of the data. The sequence attention module is used to perform weighted fusion of the hidden states of all time steps of the bidirectional gated recurrent unit layer to highlight the contribution of key time steps.

5. An intelligent error detection system for measurement-while-drilling data, applied to the intelligent error detection method for measurement-while-drilling data as described in any one of claims 1-4, characterized in that, include: The data acquisition and preprocessing module is used to receive raw data streams from multiple sources of sensors in the downhole measurement while drilling system and to preprocess them. The feature extraction and sequence recombination module is connected to the data acquisition and preprocessing module and is used to perform feature extraction and sequence recombination on the preprocessed data. The error detection module is connected to the feature extraction and sequence recombination module and is used for error detection and recognition based on the MA-CNN-BiGRU hybrid model. The intelligent data repair module, connected to the error detection module, is used to repair abnormal data segments by calling a preset repair strategy that matches the abnormal type based on the abnormal type classification result, and generate repair values ​​that conform to physical laws. The data output and incremental learning module is connected to the intelligent data repair module and the error detection module, respectively. It is used to transmit the high-quality data after error detection and repair to the drilling monitoring system, and to receive the error detection results confirmed on-site as new samples to perform incremental learning on the MA-CNN-BiGRU hybrid model to achieve adaptive optimization of the model.

6. The system according to claim 5, characterized in that, The error detection module includes: The intelligent error detection core engine module is connected to the feature extraction and sequence reconstruction module, and it has a trained MA-CNN-BiGRU hybrid model embedded in it. The MA-CNN-BiGRU hybrid model includes: a convolutional feature extraction module, a temporal feature extraction module, a sequence attention module, and a classification output layer.

Citation Information

Patent Citations

  • Malicious traffic identification method and system based on data enhancement and feature fusion

    CN116318928A

  • Sewage quality prediction method and system based on deep learning

    CN119416935A

  • In-vehicle CAN bus intrusion detection system and method based on artificial intelligence

    CN120012077A