Drill pipe make-up quality detection method and system based on deep learning and multi-source fusion
By employing deep learning and multi-source fusion methods, the accuracy and consistency issues in judging the quality of drill pipe snaps were resolved, enabling automatic detection and real-time early warning of drill pipe snap quality, adapting to different drill pipe specifications and complex environments.
Patent Information
- Application Number
- CN202611338333.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-31
- Publication Date
- 2026-11-20
AI Technical Summary
Existing methods for judging the quality of drill pipe tangling rely on human experience, a single torque threshold, or a single curve feature, which are difficult to adapt to different drill pipe specifications, materials, and environmental conditions. Furthermore, they are affected by noise and anomalies, leading to misjudgments and poor consistency. They also lack multi-source data fusion and real-time automatic detection.
A deep learning-based multi-source fusion method is adopted, which includes wavelet denoising, feature standardization, multi-source fusion, one-dimensional convolutional local feature extraction, multi-head self-attention long-term dependency modeling, and channel attention feature recalibration to achieve automatic detection of the quality of the drill pipe buckle.
It effectively reduces noise interference, improves the accuracy and robustness of drill pipe buckling quality detection, can identify complex abnormal patterns, realize real-time automatic detection and early warning, and adapts to different working conditions.
Smart Images

Figure CN123138653A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of oil and gas drilling operation technology, and in particular to a method and system for detecting drill pipe buckling quality based on deep learning and multi-source fusion. Background Technology
[0002] In oil and gas drilling operations, the quality of drill pipe connection directly affects the strength of drill string connections, thread sealing performance, downhole operation safety, and the stability of subsequent drilling operations. The drill pipe connection process is usually completed by a steel driller, power tongs, or related connection equipment, and its quality is mainly reflected in the curve shape of torque over time, peak torque, torque growth rate, inflection point characteristics, fluctuation amplitude, and connection duration.
[0003] Current methods for judging the quality of drill pipe threading largely rely on manual experience, fixed torque thresholds, or single curve characteristics. While these methods are simple to implement, they have the following shortcomings: (1) A single torque threshold is difficult to adapt to the differences in the quality of the upper pull under different drill pipe specifications, materials, service life and environmental conditions; (2) Upper pull abnormalities often manifest as short-term local fluctuations, abnormal torque growth, missing inflection points or abnormal curve shape, and traditional rules are difficult to fully characterize complex time sequence features; (3) On-site acquired signals are affected by mechanical vibration, electromagnetic interference, equipment impact and operating habits, and there are noise and abnormal points in the original torque curve, and the fixed threshold method is prone to misjudgment; (4) Existing methods usually only use torque signals and do not fully integrate drill pipe attributes, environmental parameters and historical quality records, resulting in insufficient judgment basis; (5) Manual judgment not only requires high manpower costs, but also has poor consistency of judgment results, making it difficult to form an automatic detection system that is reusable, traceable and can provide real-time early warning.
[0004] Therefore, there is a need for a drill pipe overlock quality detection method and system that can uniformly process multi-source data such as overlock torque timing signal, drill pipe outer and inner diameter, wall thickness, overlock type, material, service life, ambient temperature, clamping pressure, and optional historical overlock quality records, jointly learn local features and long-term dependence features of torque curve, and output overlock quality category and confidence level. Summary of the Invention
[0005] The purpose of this invention is to provide a method and system for detecting the quality of drill pipe buckles based on attention mechanisms and multi-source fusion. Through wavelet denoising, feature standardization and encoding, multi-source fusion, one-dimensional convolutional local feature extraction, multi-head self-attention long-term dependency modeling, channel attention feature recalibration, and classification output, the invention achieves automatic detection of drill pipe buckle quality.
[0006] This invention is achieved using the following technical solution: a drill pipe buckling quality detection method based on deep learning and multi-source fusion, comprising the following steps: Collect multi-source data, including the timing signal of the upper torque, drill pipe attribute data, and environmental parameter data; The upper torque timing signal is subjected to wavelet threshold denoising to obtain the denoised torque signal; The denoised torque signal is divided into several time window samples according to the predetermined time window length L. The drill pipe attribute data vector and environmental parameter data vector corresponding to each time window are concatenated with the torque window features to obtain multi-source fusion input features. The multi-source fusion input features are input into a pre-trained deep learning detection model. The deep learning detection model sequentially includes a one-dimensional convolutional local feature extraction layer, a multi-head self-attention layer, a channel attention feature recalibration layer, and a classification output layer. It outputs the probability of each quality category and determines the upper-level quality detection result and the corresponding confidence level based on the maximum probability.
[0007] Furthermore, the wavelet thresholding denoising process employs a soft thresholding function: ; in, These are the original wavelet coefficients. These are the wavelet coefficients after thresholding. For the threshold; The denoised wavelet coefficients are reconstructed to obtain the denoised torque signal.
[0008] Furthermore, the process includes the following steps: performing Z-score standardization on continuous data from multiple sources and encoding on discrete data; wherein: The Z-score standardization process is as follows: For any continuous feature x, the Z-score standardization method is applied: ; in, This is the mean of the feature in the training samples. x′ is the standard deviation of the feature in the training samples, and x′ is the standardized feature value; The encoding process is as follows: For discrete feature c, the one-hot encoding method is used as follows: ; In this case, the i-th position is 1, and the rest are 0.
[0009] Furthermore, the construction method of the multi-source fusion input features is as follows: Suppose the process is divided into time windows of length L, and the nth window is represented as: ; The drill pipe attribute vector A and environmental parameter vector E corresponding to this time window are concatenated with the torque window feature: ; in, This indicates a feature splicing operation.
[0010] Furthermore, the one-dimensional convolutional local feature extraction layer is used to extract short-term features of local peaks, fluctuations, abrupt changes, and inflection points in the torque curve; for the input sequence X, the convolution output under the l-th convolutional kernel is: ; Where k is the kernel length. Let be the weight of the l-th convolutional kernel at position j. For bias terms, It is a non-linear activation function.
[0011] Furthermore, the multi-head self-attention layer is used to model the long-term dependencies between the initial segment, the stable segment, and the peak segment during the up-conversion process; the convolutional output feature H is linearly mapped to the query matrix Q, the key matrix K, and the value matrix V, respectively. ; in, The weight matrix is a learnable weight matrix; The formula for calculating single-head scaling dot product attention is: ; in, For the key vector dimension, the function is used to normalize the attention score; The output of the m-th attention head is: ; The vector sequence output by multi-head attention is: ; Where M is the number of attention heads, This is the output mapping matrix.
[0012] Furthermore, the channel attention feature recalibration layer is used to adaptively weight the feature channels; let the multi-head self-attention output feature be... Where L is the time length and C is the number of channels, the channel description vector z is obtained by first performing global average pooling on each channel: ; in, This represents the global statistical characteristics of the C-th channel; Then, channel weights are generated using a two-layer fully connected network: ; in, These are learnable parameters; Finally, channel recalibration is performed on the original features: ; in, Let c be the importance weight of the channel. The channel characteristics after recalibration.
[0013] Furthermore, the classification output layer pools or flattens the channel attention output features before inputting them into the fully connected classification layer, and uses the Softmax function to calculate the probability of each quality category. ; in, For the score of class c, This is the total quantity of the above quality categories. Let be the predicted probability of class c; The final test results are as follows: ; Simultaneously, the maximum probability is output as the detection confidence level; when the predicted category is an anomaly category and the confidence level is greater than a preset threshold... When this happens, an early warning output is triggered; The quality categories include acceptable, torque fluctuation, no inflection point, and over-tightening.
[0014] Furthermore, the deep learning detection model is trained using a loss function based on sample weight adjustment; the loss function is a weighted cross-entropy loss function. ; Where N is the number of training samples. Let c be the class weight of the sample. One-hot encoding for the real label, Predict probabilities for the model; Alternatively, the loss function can be Focal Loss: ; Here, γ is the focusing parameter, used to reduce the loss weight of easily classified samples.
[0015] A drill pipe overlock quality inspection system based on deep learning and multi-source fusion is used to implement the drill pipe overlock quality inspection method based on deep learning and multi-source fusion described above, including: The data acquisition module is used to collect the timing signal of the upper torque, drill pipe attribute data, and environmental parameter data; The signal preprocessing module is used to perform wavelet threshold denoising on the upper torque time series signal, Z-score normalization on continuous features, encoding on discrete features, divide the denoised torque signal into several time window samples according to a predetermined time window length, and concatenate the drill rod attribute data vector and environmental parameter data vector corresponding to each time window with the torque window features to obtain multi-source fusion input features. The deep learning detection module is loaded with a pre-trained deep learning detection model, which receives the multi-source fusion input features and processes them sequentially through a one-dimensional convolutional local feature extraction layer, a multi-head self-attention layer, a channel attention feature recalibration layer, and a classification output layer, and outputs the probability of each quality category, the final quality category, and the confidence level. The early warning output module is used to output quality status, confidence level and alarm information, and triggers early warning output when the predicted category is an abnormal category and the confidence level is greater than a preset threshold.
[0016] The beneficial effects of this invention are as follows: This invention effectively reduces the impact of on-site noise and dimensional differences on the detection results by fusing multi-source heterogeneous data such as torque timing, drill pipe properties, and environmental parameters, and combining wavelet denoising and standardization processing. Compared with the traditional single threshold judgment method, this invention has more sufficient judgment basis and significantly reduces misjudgments caused by environmental interference or equipment vibration.
[0017] This invention utilizes a one-dimensional convolutional network (1D-CNN) to effectively extract subtle features such as local abrupt changes, missing inflection points, and short-term fluctuations in torque curves. Combined with a multi-head self-attention mechanism (MHA), it can model the long-term dependencies between the initial, stable, and peak segments during the overcutting process. This enables the system to identify complex anomaly patterns (such as progressive overcutting and latent fluctuations) that are difficult to capture using traditional rule-based methods.
[0018] This invention constructs a specific cascaded network architecture combining 1D-CNN, multi-head self-attention (MHA) mechanism, and channel attention, achieving excellent synergistic results. Specifically, the 1D-CNN is dedicated to capturing the local high-frequency abrupt changes generated during the mechanical engagement of the drill pipe during the engagement process, while the MHA module establishes long-term dependencies from the engagement start to the torque peak. This feature division and cascaded structure, designed specifically for the physical process of drill pipe engagement, overcomes the shortcomings of existing general-purpose time-series models (such as LSTM or general-purpose Transformer) in simultaneously capturing local transient details and global trends, significantly improving the accuracy of anomaly identification under complex working conditions.
[0019] For multi-source data fusion, this invention abandons the traditional linear stitching method (based on stitching and fusion) and introduces a channel attention mechanism for non-linear adaptive fusion. This mechanism can dynamically evaluate and select the weights of the feature channels that play a decisive role according to real-time operating conditions. For example, in extreme temperature environments, the model automatically increases the weights of the material and temperature channels. This dynamic adaptive mechanism effectively eliminates the interference of environmental noise on the torque curve, significantly improving the robustness and generalization ability of the model under different drill pipe specifications and complex field environments. In addition, to address the computing power limitations of industrial edge computing devices, this invention has made lightweight customizations to the model architecture. By using one-dimensional convolution instead of two-dimensional convolution and limiting the context window length of multi-head self-attention, the computational complexity and memory consumption of the model are significantly reduced while retaining key temporal features. In actual testing, this system maintains high-precision detection while keeping the single inference latency within 50ms. This solves the pain point of traditional deep learning models having high computational load and being difficult to deploy in real time in industrial fields, and can truly realize the transformation from laboratory algorithms to real-time detection on the production line. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art 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 the structures shown in these drawings without creative effort.
[0021] Figure 1 This is an overall flowchart of the present invention; Figure 2 This is a flowchart of the one-dimensional convolution local feature extraction process; Figure 3 A schematic diagram of the multi-head self-attention mechanism structure; Figure 4 Flowchart for attention feature recalibration; Figure 5 This is a schematic diagram of the classification output and early warning process; Figure 6 This is a system framework diagram of the present invention. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0023] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0024] The following detailed description of some embodiments of the present invention is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other. Example
[0025] See Figures 1 to 5 This embodiment provides a method for detecting the quality of drill pipe fastening based on deep learning and multi-source fusion, including the following steps: Step 1: Acquire multi-source data. Acquire the timing signal of the upper torque. Drill pipe attribute data Environmental parameter data and optional historical deduction records The drill pipe attribute data (A) includes drill pipe model, outer diameter, inner diameter, wall thickness, material, and service life; environmental parameter data (E) includes temperature, clamping pressure, or on-site operating conditions; and historical debit records (R) include historical debit quality grades, anomaly types, and non-conforming records. Historical records are optional and primarily used for model training, supplementing abnormal samples, and quality traceability. When historical records are unavailable on-site, the system can complete the detection based solely on the current debit data, drill pipe attribute data, and environmental parameter data.
[0026] Step two: Since the on-site torque signal is easily affected by mechanical vibration, electromagnetic interference, and equipment impact, this invention uses a wavelet threshold denoising method to process the original torque signal. For the original torque signal... The wavelet thresholding denoising method is used for processing. Let the wavelet coefficients obtained after wavelet decomposition be... The soft threshold function is: ; in, These are the original wavelet coefficients. These are the wavelet coefficients after thresholding. The threshold can be determined based on the noise level or the maximum value of the wavelet coefficients, for example... k is an empirical coefficient. The processed wavelet coefficients are reconstructed to obtain the denoised torque signal. .in This represents the wavelet coefficients retained after thresholding at this specific scale d. The subscripts 1, 2, ..., L represent the temporal or spatial indices of these coefficients, and the total length of the coefficients in this layer. This step is used to reduce the impact of high-frequency noise such as mechanical vibration and electromagnetic interference on subsequent feature extraction.
[0027] Step 3: Standardize the continuous data in the multi-source dataset. For any continuous feature x, such as torque, temperature, pressure, or uptime, use Z-score standardization: ; in, This is the mean of the feature in the training samples. The standard deviation of this feature in the training samples. These are the standardized feature values. This formula maps features of different dimensions and numerical ranges to similar scales, preventing the model from being dominated by large numerical features during training.
[0028] Discrete data in multi-source data is encoded. For discrete features c such as drill pipe type, material, and quality grade, one-hot encoding can be used as follows: ; In this configuration, the i-th position is 1, and the remaining positions are 0. This method converts textual or categorical information into numerical vectors that can be processed by neural networks.
[0029] Step 4: Construct a unified time window sample. Let the above-mentioned process be divided into time windows of length L, and the nth window be represented as: ; The drill pipe attribute vector A, environmental parameter vector E, and optional historical record vector R corresponding to this time window are concatenated with the torque window features to obtain the multi-source fusion input features: ; in, This indicates a feature concatenation operation. If the historical record R does not exist, then let... This step means organizing the torque changes during the same tightening operation and within the same time period, along with relevant static attributes and environmental background, into a single sample, enabling the model to make judgments based on the complete context.
[0030] Step 5: Construct a deep learning detection model. In this embodiment, the constructed deep learning detection model includes a one-dimensional convolutional feature extraction layer, a multi-head self-attention layer, a channel attention layer, and a classification output layer. The model input is multi-source fused features. The output is the quality status of the drill pipe and the corresponding confidence level.
[0031] Specifically, the one-dimensional convolutional local feature extraction layer is used to extract short-term features such as local peaks, fluctuations, abrupt changes, and inflection points in the torque curve. For the input sequence X, the convolution output under the l-th convolutional kernel is: ; Where K is the kernel length, Let be the weight of the l-th convolutional kernel at position j. For bias terms, It is a non-linear activation function. Functions can be used: ; A batch normalization layer can be set after the convolutional layer, and its calculation formula is as follows: ; in, and These are the mean and variance of the features in the current batch, respectively. and For learnable parameters, To prevent constants with zero denominators, batch normalization is used to improve training stability and convergence speed. Through one-dimensional convolutional layers, this invention can extract local morphological features from torque time series that are difficult to describe using traditional thresholding methods, such as short-term torque jitter, abnormal jumps, torque plateaus, and missing inflection points.
[0032] The multi-head self-attention layer addresses the issue that the quality of the buckling depends not only on the torque value at a specific moment but also on the changing trend and the correlation between key time segments throughout the buckling process. This invention introduces a multi-head self-attention mechanism based on convolutional features. The convolutional output features H are linearly mapped to the query matrix Q, key matrix K, and value matrix V, respectively. ; in, The weight matrix is a learnable weight matrix; The formula for calculating single-head scaling dot product attention is: ; in, The dimension of the key vector. Used to scale the dot product result. The function is used to normalize the attention score. For the m-th attention head, its output is: ; The vector sequence output by multi-head attention is: ; Where M is the number of attention heads, The output mapping matrix is used. The multi-head mechanism can learn various correlation patterns in the process from different feature subspaces, such as the relationship between torque ramp-up in the initial stage, fluctuations in the stable stage, peak values and inflection point positions in the final stage.
[0033] The channel attention feature recalibration layer addresses the issue that different channels in multi-source fusion features have varying importance for upper-level quality determination. This invention employs a channel attention module to adaptively weight feature channels. Let the multi-head self-attention output feature be... Where L is the time length and C is the number of channels. First, global average pooling is performed on each channel to obtain the channel description vector z: ; in, This represents the global statistical characteristics of the C-th channel. Then, channel weights are generated using a two-layer fully connected network. ; in, The sigmoid function is a learnable parameter. Used to map weights between 0 and 1.
[0034] Finally, channel recalibration is performed on the original features: ; in, Let c be the importance weight of the channel. This module represents the recalibrated channel features. Through this module, the model can enhance feature channels closely related to the upper clipping quality, suppress irrelevant or noisy features, and improve detection stability.
[0035] The classification output layer pools or flattens the channel attention output features to obtain feature vectors. ; in This indicates a global pooling or flattening operation.
[0036] Input the feature vector into the fully connected classification layer to obtain the class score vector: in, This indicates a global pooling or flattening operation. and These are the parameters for the classification layer. The Softmax function is used to calculate the probability of each quality category: ; in, For the score of class c, This is the total quantity of the above quality categories. Let be the predicted probability of class c.
[0037] The final test results are as follows: ; `argmax` means to find the variable value that makes a given function reach its maximum value. In other words, it finds the value among all categories that maximizes the probability. The highest possible category. This quality category may include acceptable, torque fluctuation, no inflection point, over-tapping, etc. The system also outputs the highest probability. As the detection confidence level; when the predicted category is an anomaly category and the confidence level is greater than a preset threshold. When this happens, an early warning output is triggered.
[0038] It should be noted that, to address the issues of a small number of outlier samples and class imbalance, this invention employs a loss function based on sample weight adjustment for training, in order to increase the contribution of the few outlier classes during training. Specifically, the loss function is selected from any of the following: Weighted Cross-Entropy Loss: This function assigns different weights to different categories. This allows the model to focus more on anomaly categories with fewer samples during training. Supervised learning is performed using labeled historical samples during the training phase. Let the true label of the i-th sample be... The model predicts the probability as The cross-entropy loss function is then: ; Where N is the number of training samples. This is a one-hot encoding of the true labels. To address the issues of a small number of outlier samples and class imbalance, weighted cross-entropy can be used. ; in, represents the class weights of the c-th class samples, used to increase the contribution of a few outlier classes during training.
[0039] Alternatively, a focal loss function can be used: by introducing a focusing parameter. and category weight This automatically reduces the weight of easily classifiable samples (usually a large number of qualified samples), allowing the model to focus on difficult-to-classify outlier samples. The loss function is: ; in, This is a tuning factor (focusing parameter) used to reduce the loss weight of easily classified samples, making the model focus more on difficult-to-classify and outlier samples. The model parameters are continuously updated using the Adam or AdamW optimizer, resulting in the optimal model parameters after training. The parameter update target is: ,in, The training loss function is used. During training, training, validation, and test sets can be used, and early stopping strategies, learning rate decay, and data augmentation methods can be combined to improve generalization ability. Example
[0040] See Figure 6 The present invention also provides a drill pipe buckling quality detection system for implementing the above method, the system comprising a data acquisition module, a signal preprocessing module, a deep learning detection module, and an early warning output module.
[0041] Specifically, the data acquisition module is used to acquire the upper torque time-series signal, drill pipe attribute data, and environmental parameter data; the signal preprocessing module is used to perform wavelet threshold denoising on the upper torque time-series signal, Z-score standardization on continuous features, encoding on discrete features, dividing the denoised torque signal into several time window samples according to a predetermined time window length, and concatenating the drill pipe attribute data vector and environmental parameter data vector corresponding to each time window with the torque window features to obtain multi-source fusion input features; the deep learning detection module is loaded with a pre-trained deep learning detection model, which receives the multi-source fusion input features and processes them sequentially through a one-dimensional convolutional local feature extraction layer, a multi-head self-attention layer, a channel attention feature recalibration layer, and a classification output layer, outputting the probability of each quality category, the final quality category, and the confidence level; the early warning output module is used to output the quality status, confidence level, and alarm information, and triggers an early warning output when the predicted category is an abnormal category and the confidence level is greater than a preset threshold.
[0042] During real-time detection, the system first collects the torque signal, drill pipe properties, and environmental parameters of the current up-cutting process; then it sequentially performs wavelet denoising, standardization, encoding, and multi-source feature fusion; subsequently, the fused features are input into the trained deep learning detection model; the model outputs the probability of each quality category, the final category, and the confidence level; when the detection result is abnormal, the early warning output module displays, alarms, and stores the data.
[0043] In summary, the core implementation method and system for drill pipe overcut quality detection based on attention mechanism and multi-source fusion proposed in this invention is as follows: First, the data acquisition module acquires the overcut torque time-series signal, drill pipe attribute data, and environmental parameter data in real time, and can selectively access historical overcut quality records; then, the signal preprocessing module sequentially performs wavelet threshold soft threshold denoising, Z-score normalization of continuous features, and one-hot encoding of discrete features, and divides the torque signal into several time-series segments according to a fixed time window length. The torque features within the same window are concatenated with the drill pipe attribute vector, environmental parameter vector, and optional historical record vector to form a unified multi-source fusion input feature tensor; then, this tensor is input into a pre-trained deep learning detection model, which adopts a one-dimensional convolutional layer (1D-CNN) — multi-head self-attention layer (MHA) — channel attention feature recalibration layer — softmax classification output. The system employs a cascaded architecture, where a one-dimensional convolutional layer extracts short-term morphological features such as local peaks, abrupt changes, and inflection points in the torque curve. A multi-head self-attention layer models the long-term dependencies between the initial, stable, and peak segments of the drill pipe overcut. A channel attention layer generates adaptive weights for each feature channel through global average pooling and a two-layer fully connected network, recalibrating the original features to highlight key channels and suppress noise interference. Finally, the classification output layer inputs the recalibrated features, after pooling or flattening, into the fully connected layer. The Softmax function calculates the probability of each quality category, such as qualified, torque fluctuation, no inflection point, and overcut, and takes the category with the highest probability as the final detection result, simultaneously outputting the confidence level. When the detection result is an abnormal category and the confidence level exceeds a preset threshold, the early warning output module triggers an alarm and stores relevant data for quality traceability. During the model training phase, the entire system uses weighted cross-entropy loss or Focal Loss to optimize for the scarcity of abnormal samples. The real-time detection phase relies on the complete preprocessing-fusion-inference-early warning process described above to achieve end-to-end automatic detection and real-time early warning of drill pipe overcut quality.
[0044] The above embodiments describe the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Modifications and variations made by those skilled in the art without departing from the spirit and scope of the invention should be within the protection scope of the appended claims.
Claims
1. A method for detecting the quality of drill pipe fastening based on deep learning and multi-source fusion, characterized in that, Includes the following steps: Collect multi-source data, including the timing signal of the upper torque, drill pipe attribute data, and environmental parameter data; The upper torque timing signal is subjected to wavelet threshold denoising to obtain the denoised torque signal; The denoised torque signal is divided into several time window samples according to the predetermined time window length L. The drill pipe attribute data vector and environmental parameter data vector corresponding to each time window are concatenated with the torque window features to obtain multi-source fusion input features. The multi-source fusion input features are input into a pre-trained deep learning detection model. The deep learning detection model sequentially includes a one-dimensional convolutional local feature extraction layer, a multi-head self-attention layer, a channel attention feature recalibration layer, and a classification output layer. It outputs the probability of each quality category and determines the upper-level quality detection result and the corresponding confidence level based on the maximum probability.
2. The drill pipe fastening quality detection method based on deep learning and multi-source fusion according to claim 1, characterized in that, The wavelet thresholding denoising process uses a soft thresholding function: ; in, These are the original wavelet coefficients. These are the wavelet coefficients after thresholding. For the threshold; The denoised wavelet coefficients are reconstructed to obtain the denoised torque signal.
3. The drill pipe fastening quality detection method based on deep learning and multi-source fusion according to claim 1, characterized in that, It also includes the following steps: performing Z-score standardization on continuous data from multiple sources, and encoding discrete data; wherein: The Z-score standardization process is as follows: For any continuous feature x, the Z-score standardization method is applied: ; in, This is the mean of the feature in the training samples. x′ is the standard deviation of the feature in the training samples, and x′ is the standardized feature value; The encoding process is as follows: For discrete feature c, the one-hot encoding method is used as follows: ; In this case, the i-th position is 1, and the rest are 0.
4. The drill pipe fastening quality detection method based on deep learning and multi-source fusion according to claim 1, characterized in that, The multi-source fusion input features are constructed as follows: Suppose the process is divided into time windows of length L, and the nth window is represented as: ; The drill pipe attribute vector A and environmental parameter vector E corresponding to this time window are concatenated with the torque window feature: ; in, This indicates a feature splicing operation.
5. The drill pipe fastening quality detection method based on deep learning and multi-source fusion according to claim 1, characterized in that, The one-dimensional convolutional local feature extraction layer is used to extract short-term features of local peaks, fluctuations, abrupt changes, and inflection points in the torque curve; for the input sequence X, the convolution output under the l-th convolutional kernel is: ; Where k is the kernel length. Let be the weight of the l-th convolutional kernel at position j. For bias terms, It is a non-linear activation function.
6. The drill pipe fastening quality detection method based on deep learning and multi-source fusion according to claim 1, characterized in that, The multi-head self-attention layer is used to model the long-term dependency relationship between the initial segment, the stable segment, and the peak segment during the up-cutting process; the convolutional output feature H is linearly mapped to the query matrix Q, the key matrix K, and the value matrix V, respectively. ; in, The weight matrix is a learnable weight matrix; The formula for calculating single-head scaling dot product attention is: ; in, The dimension of the key vector. The function is used to normalize the attention score; The output of the m-th attention head is: ; The vector sequence output by multi-head attention is: ; Where M is the number of attention heads, This is the output mapping matrix.
7. The drill pipe fastening quality detection method based on deep learning and multi-source fusion according to claim 1, characterized in that, The channel attention feature recalibration layer is used for adaptive weighting of feature channels; let the multi-head self-attention output feature be... Where L is the time length and C is the number of channels, the channel description vector z is obtained by first performing global average pooling on each channel: ; in, This represents the global statistical characteristics of the C-th channel; Then, channel weights are generated using a two-layer fully connected network: ; in, These are learnable parameters; Finally, channel recalibration is performed on the original features: ; in, Let c be the importance weight of the channel. The channel characteristics after recalibration.
8. The drill pipe fastening quality detection method based on deep learning and multi-source fusion according to claim 1, characterized in that, The classification output layer pools or flattens the channel attention output features before inputting them into the fully connected classification layer, and uses the Softmax function to calculate the probability of each quality category. ; in, For the score of class c, This is the total quantity of the above quality categories. Let be the predicted probability of class c; The final test results are as follows: ; Simultaneously, the maximum probability is output as the detection confidence level; when the predicted category is an abnormal category and the confidence level is greater than the preset threshold τ, an early warning output is triggered. The quality categories include acceptable, torque fluctuation, no inflection point, and over-tightening.
9. The drill pipe fastening quality detection method based on deep learning and multi-source fusion according to claim 1, characterized in that, The deep learning detection model is trained using a loss function based on sample weight adjustment; the loss function is a weighted cross-entropy loss function. ; Where N is the number of training samples. Let c be the class weight of the sample. One-hot encoding for the real label, Predict probabilities for the model; Alternatively, the loss function can be Focal Loss: ; Here, γ is the focusing parameter, used to reduce the loss weight of easily classified samples.
10. A drill pipe overlay quality inspection system based on deep learning and multi-source fusion, used to implement the drill pipe overlay quality inspection method based on deep learning and multi-source fusion as described in any one of claims 1 to 9, characterized in that, include: The data acquisition module is used to collect the timing signal of the upper torque, drill pipe attribute data, and environmental parameter data; The signal preprocessing module is used to perform wavelet threshold denoising on the upper torque time series signal, Z-score normalization on continuous features, encoding on discrete features, divide the denoised torque signal into several time window samples according to a predetermined time window length, and concatenate the drill rod attribute data vector and environmental parameter data vector corresponding to each time window with the torque window features to obtain multi-source fusion input features. The deep learning detection module is loaded with a pre-trained deep learning detection model, which receives the multi-source fusion input features and processes them sequentially through a one-dimensional convolutional local feature extraction layer, a multi-head self-attention layer, a channel attention feature recalibration layer, and a classification output layer, and outputs the probability of each quality category, the final quality category, and the confidence level. The early warning output module is used to output quality status, confidence level and alarm information, and triggers early warning output when the predicted category is an abnormal category and the confidence level is greater than a preset threshold.
