A machine learning-based drill pipe early warning method and system

By adaptively extracting drill pipe alignment status features using machine learning methods, the problem of insufficient evaluation accuracy in complex working conditions under existing technologies is solved, achieving high-precision and high-robust drill pipe alignment evaluation, thereby improving the safety and efficiency of drilling operations.

CN122332906APending Publication Date: 2026-07-03ZHANGJIAKOU SANXIN TONGDA MASCH MFG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHANGJIAKOU SANXIN TONGDA MASCH MFG CO LTD
Filing Date
2026-04-09
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing drill pipe neutrality assessment technology cannot adapt to the strong noise and multiple interferences in the detection data under complex drilling conditions, resulting in insufficient assessment accuracy and robustness, and failing to meet the engineering application requirements of complex conditions.

Method used

A machine learning-based approach is adopted, which uses a multi-branch feature encoding network and a feature effective quantification mechanism to adaptively extract drill pipe alignment status-related features. Combined with a feature fusion mechanism that senses working conditions and failure sensitivity, alignment assessment is achieved.

Benefits of technology

It significantly improves the accuracy and robustness of drill pipe neutrality assessment under complex working conditions, reduces the risk of drill string failure and downhole accidents, and ensures the safety and efficiency of drilling operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122332906A_ABST
    Figure CN122332906A_ABST
Patent Text Reader

Abstract

This invention discloses a drill pipe early warning method and system based on machine learning, relating to the field of drill pipe alignment assessment technology. The method includes: collecting multi-source detection data of the drill pipe to be assessed, preprocessing the collected data to obtain a standardized detection sample set; extracting feature parameters related to the drill pipe alignment state based on the standardized detection sample set; and outputting the drill pipe alignment assessment result according to the feature parameters. This invention overcomes the bottleneck of existing drill pipe alignment assessments that rely on manual prior feature design. Based on the cascade causal mechanism of alignment failure, it achieves adaptive feature extraction and working condition adaptation fusion, significantly improving the accuracy, robustness, and real-time performance of assessment under complex working conditions, effectively reducing the risk of drill string failure and downhole accidents, and ensuring the safety and efficiency of drilling operations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of drill pipe alignment assessment technology, and in particular to a drill pipe early warning method and system based on machine learning. Background Technology

[0002] In oil and gas exploration and development, deep geological drilling, and mining downhole drilling, drill pipe is a core drilling tool component that transmits drilling power, delivers drilling media, and controls the wellbore trajectory. Drill pipe alignment, i.e., the degree of matching between the actual running axis of the drill pipe and the designed wellbore axis, as well as the coaxiality of adjacent drill pipe joints, is one of the core indicators determining the safety and efficiency of drilling operations. Good drill pipe alignment can effectively reduce wear and tear between the drill pipe and the wellbore wall / casing, extend the fatigue life of the drilling tools, ensure the accuracy of wellbore trajectory control, and avoid major downhole accidents such as drill pipe breakage, stuck pipe, and casing damage caused by severe drill pipe misalignment or alignment failure. Conversely, poor drill pipe alignment will significantly increase non-productive drilling time, resulting in huge economic losses. As my country continues to increase its efforts in the exploration and development of deep and unconventional oil and gas resources, the proportion of deep wells, ultra-deep wells, horizontal wells, and extended reach wells is constantly increasing. Downhole conditions are becoming increasingly complex, which places more stringent requirements on the accuracy, real-time performance, and adaptability of drill pipe neutrality assessment.

[0003] Currently, industry-standard drill pipe alignment assessment technologies are mainly divided into three categories: The first category is direct contact measurement methods. These methods involve installing strain sensors, displacement sensors, and directional measuring instruments on the drill pipe body and joints to collect parameters such as radial displacement, strain, and wellbore inclination angle. Alignment is assessed through threshold comparison. This method is simple in principle and is the mainstream solution for field applications, but it suffers from problems such as difficult downhole sensor installation, susceptibility to failure under high temperature, high pressure, and strong vibration environments, and susceptibility to interference from operating conditions. The second category is non-contact visual measurement methods. These methods use imaging equipment such as industrial cameras and endoscopes to collect image data of the drill pipe joints and casing during the tripping process. Traditional image processing algorithms such as edge detection, contour fitting, and template matching are used to extract drill pipe shape and position features and calculate coaxiality deviation to complete the alignment assessment. This type of method can achieve non-contact non-destructive testing and avoid the influence of harsh downhole environments on measuring elements. However, it is significantly affected by factors such as ambient light, mud adhesion, and wear and corrosion on the drill pipe surface. The third type is the indirect inversion assessment method, which is based on drilling parameters such as drilling pressure, torque, rotation speed, and vibration collected during drilling. The drill pipe alignment state is inverted through mathematical statistics and traditional machine learning models. This type of method can achieve real-time assessment while drilling. However, it has high requirements for the integrity of parameter acquisition, and the assessment results are easily affected by formation changes and drilling process adjustments.

[0004] All of the above-mentioned existing technical solutions have a key technical problem that has not yet been solved: in the existing drill pipe alignment assessment technology, the extraction of effective features related to the drill pipe alignment state all rely on manual prior design and fixed threshold screening, which cannot adapt to the characteristics of strong noise, multiple interferences and dynamic changes in feature distribution of detection data under complex drilling conditions. As a result, the accuracy, robustness and generalization ability of the alignment assessment cannot meet the engineering application requirements of complex working conditions.

[0005] Specifically, whether it's strain and displacement characteristics measured by contact, edge and contour characteristics measured by vision, or drilling dynamic parameter characteristics retrieved indirectly, existing technologies require technicians to pre-design feature extraction operators and define fixed thresholds for feature selection based on experience. This only adapts to feature distribution patterns under specific working conditions and environments. However, in actual drilling operations, downhole formation lithology, drilling parameters, drill string wear, and the on-site detection environment are all dynamically changing. The amplitude, dimension, and distribution patterns of effective features in the detection data can shift significantly, accompanied by a large amount of strong noise and interference signals. In this situation, manually designed fixed feature extraction mechanisms cannot automatically identify and adapt to the dynamic changes in features, easily leading to missed effective features and misjudgments of interference signals. While high evaluation accuracy can be achieved under ideal conditions with low interference, evaluation errors increase significantly in complex on-site environments with strong noise and frequent fluctuations in operating conditions. This can even result in missed detections or false alarms of alignment failures, failing to provide reliable alignment warnings for drilling operations and severely restricting the safety and efficiency of drilling operations. Therefore, developing a drill pipe alignment assessment method that can adaptively extract effective features and strongly adapt to complex drilling conditions is a core technical challenge that urgently needs to be solved in this field. Summary of the Invention

[0006] This invention provides a drill pipe early warning method based on machine learning, comprising: Step S1: Collect multi-source test data of the drill pipe to be evaluated, and preprocess the collected data to obtain a standardized test sample set; Step S2: Extract feature parameters related to the drill pipe alignment state based on the standardized test sample set, and output the drill pipe alignment assessment result according to the feature parameters. This specifically includes the following sub-steps: Step S21: Construct a multi-branch feature coding network based on the cascade mechanism of drill pipe alignment failure. Divide the standardized detection sample set into multiple input subsets of corresponding branches and input them into each coding branch of the multi-branch feature coding network to obtain the initial feature set. Step S22: Calculate the comprehensive effectiveness score of each output feature channel of the multi-branch feature coding network by using the feature effectiveness quantification mechanism of the cascaded causal constraint of the mid-failure. Step S23: Based on the comprehensive effectiveness score of each feature channel, remove invalid interference features from the initial feature set to obtain the initial effective feature set; Step S24: Utilize the feature fusion mechanism of working condition-failure sensitivity perception to perform cross-scale fusion on the initial screening effective feature set to obtain the final adaptive feature parameters; Step S25: Input the adaptive feature parameters into the pre-trained centering evaluation network, output the drill pipe centering quantization score and centering status level, and generate early warning information for drill pipes with centering quantization scores below the threshold.

[0007] The drill pipe early warning method based on machine learning described above includes drill pipe dynamic parameters, strain parameters, wellbore trajectory parameters, and joint coaxiality detection data collected synchronously during drilling; visual image data of the drill pipe body and joints collected during tripping in and out of the well; and current drilling condition data, including well depth, formation lithology, drilling fluid density, drilling pressure, rotation speed, and bottom hole temperature and pressure.

[0008] The drill pipe early warning method based on machine learning described above uses a three-branch parallel coding architecture that corresponds one-to-one with the failure cascade mechanism. The three branches are the joint-level local feature coding branch, the pipe-body-level mesoscale feature coding branch, and the wellbore-level global feature coding branch.

[0009] The drill pipe early warning method based on machine learning described above utilizes a feature effectiveness quantification mechanism based on cascaded causal constraints for centering failures to calculate the comprehensive effectiveness score of each output feature channel of a multi-branch feature encoding network. Specifically, it consists of the following sub-steps: A full-scale labeled sample set was constructed based on historical drill pipe inspection data; The causal correlation, inter-class discriminant distance, and physical consistency of each feature channel are quantified based on the full labeled sample set. The quantitative results of causal correlation, inter-class discrimination distance, and physical consistency are fused to obtain the final comprehensive effectiveness score for each feature channel.

[0010] The drill pipe early warning method based on machine learning described above utilizes a feature fusion mechanism based on working condition and failure sensitivity to perform cross-scale fusion of the initially screened effective feature set, obtaining the final adaptive feature parameters. Specifically, it consists of the following sub-steps: Drilling condition data are extracted from standardized test samples, and a condition clustering model is used to determine the current condition category and the failure sensitivity coefficient of the current condition. Based on the failure sensitivity coefficient under the current working conditions, the weighting coefficients of each feature channel are adaptively adjusted, and the feature values ​​of each feature channel in the initial screening effective feature set are weighted to obtain the cross-scale effective feature set. The effective feature set across scales is weighted and fused according to the upstream and downstream order of the cascaded causal chain of midpoint failure to obtain the final adaptive feature parameters.

[0011] The drill pipe early warning method based on machine learning, as described above, inputs adaptive feature parameters into a pre-trained centering evaluation network and outputs a drill pipe centering quantification score and centering status level. Specifically, it consists of the following sub-steps: Construct and complete the pre-training of the drill pipe neutrality evaluation network; The adaptive feature parameters are input into the pre-trained centering evaluation network to obtain the drill pipe centering quantization score. The drill pipe alignment status level is matched based on the obtained drill pipe alignment quantification score.

[0012] The present invention also provides a drill pipe early warning method based on machine learning, including: a multi-source detection data acquisition and processing module, and a neutral evaluation result output module; The multi-source detection data acquisition and processing module is used to acquire multi-source detection data of the drill pipe to be evaluated, and to preprocess the acquired data to obtain a standardized detection sample set. The neutrality assessment result output module is used to extract feature parameters related to the drill pipe alignment state based on the standardized test sample set, and output the drill pipe alignment assessment result according to the feature parameters, specifically including: The multi-branch coding submodule is used to divide the standardized detection sample set into multiple input subsets, which are then input into each coding branch of the multi-branch feature coding network to obtain the initial feature set. The Feature Channel Effective Measurement Submodule is used to calculate the comprehensive effectiveness score of each output feature channel of the multi-branch feature coding network by utilizing the feature effective measurement mechanism of the mid-failure cascade causal constraint. The feature filtering submodule is used to remove invalid interference features from the initial feature set based on the comprehensive effectiveness score of each feature channel, and obtain the initial effective feature set. The feature fusion submodule is used to perform cross-scale fusion of the initially screened effective feature set using the feature fusion mechanism of working condition-failure sensitivity perception, so as to obtain the final adaptive feature parameters. The neutral quantization submodule is used to input adaptive feature parameters into a pre-trained neutral evaluation network and output drill pipe neutral quantization score and neutralization status level.

[0013] The beneficial effects achieved by this invention are as follows: it breaks through the bottleneck of existing drill pipe centering assessment relying on manual prior feature design, and realizes feature adaptive extraction and working condition adaptation fusion based on the centering failure cascade causal mechanism, which significantly improves the accuracy, robustness and real-time performance of assessment under complex working conditions, effectively reduces the risk of drill string failure and downhole accidents, and ensures drilling operation safety and efficiency. Attached Figure Description

[0014] 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 recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings.

[0015] Figure 1 This is a flowchart of a drill pipe early warning method based on machine learning provided in Embodiment 1 of this application; Figure 2 This is a schematic diagram of a drill pipe early warning system based on machine learning, provided in Embodiment 2 of this application. Detailed Implementation

[0016] 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, not all, of the embodiments of the present invention. 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.

[0017] Example 1

[0018] like Figure 1 As shown, Embodiment 1 of this application provides a drill pipe early warning method based on machine learning, including: Step S1: Collect multi-source test data of the drill pipe to be evaluated, and preprocess the collected data to obtain a standardized test sample set; The multi-source detection data includes, but is not limited to, drill pipe dynamic parameters, strain parameters, wellbore trajectory parameters, and joint coaxiality detection data acquired synchronously during drilling; visual image data of the drill pipe body and joints acquired during tripping in and out of the well; and current drilling condition data, including but not limited to well depth, formation lithology, drilling fluid density, drilling pressure, rotation speed, and bottom hole temperature and pressure. The multi-source detection data is preprocessed, including outlier removal, data normalization, temporal synchronization alignment, image denoising, and size normalization, to finally obtain a standardized detection sample set.

[0019] Step S2: Extract feature parameters related to the drill pipe alignment state based on the standardized test sample set, and output the drill pipe alignment assessment result according to the feature parameters. This specifically includes the following sub-steps: Step S21: Construct a multi-branch feature coding network based on the cascade mechanism of drill pipe alignment failure. Divide the standardized detection sample set into multiple input subsets of corresponding branches and input them into each coding branch of the multi-branch feature coding network to obtain the initial feature set. The multi-branch feature coding network adopts a three-branch parallel coding architecture that corresponds one-to-one with the failure cascade mechanism (i.e., the physical cascade hierarchy of drill pipe alignment failure: "joint coaxiality deviation → pipe bending and wear → drill string axis offset throughout the well section"). The three branches are the joint-level local feature coding branch, the pipe-level mesoscale feature coding branch, and the wellbore-level global feature coding branch. Each branch adopts a three-level normalization structure of "data adaptation layer + core coding layer + feature normalization layer", which do not cross or interfere with each other, and only process the input data of the corresponding level. Finally, it outputs a fixed-dimensional feature vector to construct the initial feature set. The joint-level local feature encoding branch is designed to address micron-level joint coaxiality deviation, end face runout, and thread meshing deformation—local abrupt changes—that are the sources of drill pipe alignment failure. Its data adaptation layer employs a parallel adaptation structure with both temporal and image branches. The temporal branch takes temporal data from a subset of the joint-level input as input, uses a 1×1 one-dimensional convolutional kernel to perform channel mapping, eliminates differences in temporal data of different dimensions, and outputs temporal adaptation features. The image branch takes standardized image data from a subset of the joint-level input, uses two consecutive 3×3 two-dimensional convolutional kernels to perform dimensionality reduction and basic contour feature extraction, outputting image adaptation features. These features are then converted to sequence features through global average pooling and concatenated with the temporal adaptation feature channels to obtain the concatenated feature input. The core encoding layer employs a multi-scale one-dimensional convolutional kernel group with failure physical constraints. Four parallel one-dimensional convolutions with kernel sizes of 3, 5, 7, and 9 are set. The kernel size matches the duration of the joint failure mutation signal from 0.1 to 1 ms at a sampling frequency of 10 kHz. This can completely capture the micron-level mutation signal and end face jump period signal at the moment of joint engagement. The outputs of the four convolutions are concatenated and then fused by a 1×1 one-dimensional convolutional kernel to produce intermediate features. The feature normalization layer first performs LayerNorm normalization on the intermediate features, and then performs global average pooling and global max pooling in parallel to obtain pooled features. After channel concatenation, the final output is the joint-level feature vector. The pipe-level mesoscale feature encoding branch is designed for the millimeter-level gradual features of pipe bending, uneven wear, and fatigue deformation in the intermediate transmission link of drill pipe alignment failure. Its data adaptation layer also adopts a parallel adaptation structure with temporal and image branches. The input of the temporal branch is the temporal data of the pipe-level input subset, and a 1×1 one-dimensional convolutional kernel is used to complete the channel mapping. The output is the temporal adaptation feature. The input of the image branch is the grayscale image data of the full circumference contour of the pipe of the pipe-level input subset. Three consecutive 3×3 two-dimensional convolutional kernels are used to complete the dimensionality reduction and wear gradual feature extraction. The output is the image adaptation feature, which is then converted into sequence features by global average pooling and concatenated with the temporal adaptation feature channel to obtain the concatenated feature. The input is the core encoding layer. The core encoding layer uses three stacked temporal causal dilated convolutional units, with the dilation coefficient of each layer increasing progressively to 2, 4, and 8. Each unit uses a 3×1 one-dimensional causal convolutional kernel, and padding=causal is set to only fill the left side to ensure temporal causality, adapting to real-time processing scenarios while drilling. The dilation coefficient matches the natural frequency of a single drill pipe of 50~100Hz, which can cover the complete cycle of pipe bending vibration of 10~20ms. Each layer sets residual connections to avoid gradient vanishing. The final output is intermediate features. The feature normalization layer processes the intermediate features in the same way as the joint-level local feature encoding branch, and the final output is the pipe-level feature vector. The wellbore-level global feature encoding branch is designed to address the meter-level offset features between the drill string axis and the designed wellbore axis, which are the final manifestations of drill string alignment failure. Its data adaptation layer input is a subset of the wellbore-level input, using a 1×1 one-dimensional convolutional kernel to perform channel upscaling. The output adaptation features are input to the core encoding layer, which is a long-distance dependency encoding unit with wellbore trajectory constraints. First, sinusoidal position encoding is added to the input adaptation features to preserve the axial position information of the wellbore sequence. Then, it is connected to a 4-head multi-head self-attention module. This module has a built-in attention mask matrix with physical constraints, allowing attention weights only for the current sampling point and its three adjacent sampling points and the corresponding point on the designed wellbore axis. All other position weights are reset to zero, avoiding meaningless global attention fitting and ensuring the physical consistency of the feature and the wellbore trajectory continuity. The output of the self-attention module is connected to a two-layer fully connected feedforward network with residual connections, ultimately outputting intermediate features. The feature normalization layer processes the intermediate features in the same way as the joint-level local feature encoding branch, ultimately outputting a wellbore-level feature vector.

[0020] The standardized test sample set is divided into multiple input subsets corresponding to the branches. All data in the standardized test sample set uses a single drill pipe of 9.5m length (API standard) as the smallest sampling unit, is bound to a unique drill pipe number, and is fully synchronized in time and space. First, the joint-level test data set is extracted from the standardized test sample set. This data comes from time-series data collected by triaxial displacement sensors, end face runout sensors, and thread strain gauges installed at the drill pipe male and female joints during drilling, as well as standardized image data of the joint end face and thread engagement area collected by industrial cameras during the tripping and dredging stages. This set of data is completely divided into joint-level input subsets and directed to the joint-level local feature coding branch. Then, the pipe body-level test data set is extracted. The time-series data collected by the triaxial strain sensor and vibration acceleration sensor installed in the middle of the drill pipe during drilling, as well as the grayscale image data of the full circumference contour of the drill pipe collected by the linear array camera during the tripping stage, are completely divided into a drill pipe-level input subset and directionally input into the drill pipe-level mesoscale feature coding branch. Finally, the wellbore-level detection data set is extracted, namely the wellbore trajectory parameters collected by the drilling rig and the drilling process parameters of the entire well section collected by the surface logging system, after standardization to obtain time-series data. Specifically, this includes the time-series data of well inclination angle, azimuth angle, total angle change rate, designed wellbore axis coordinates, actual drill string axis coordinates, average drilling pressure, and average torque. This set of data is completely divided into a wellbore-level input subset and directionally input into the wellbore-level global feature coding branch.

[0021] After each subset is processed by the multi-branch feature encoding network, the three feature vectors are sequentially concatenated in the feature channel dimension according to the upstream and downstream order of the joint-level feature vector, the pipe-level feature vector, and the well-hole-level feature vector. Each feature channel in the concatenated feature tensor is then bound with a unique physical attribute label corresponding to the encoding branch, thereby completing the construction of the initial feature set.

[0022] Step S22: Calculate the comprehensive effectiveness score of each output feature channel of the multi-branch feature coding network by using the feature effectiveness quantification mechanism of the cascaded causal constraint of the mid-failure. This step does not need to be performed for every evaluation, but only periodically. Its purpose is to provide a basis for the selection of effective features. It strictly follows the physical cascade causal chain of drill pipe alignment failure: "joint-level source deviation → pipe-level intermediate transmission → wellbore-level global offset". It integrates and calculates the comprehensive effectiveness score of each feature channel through three quantitative indicators: cascade causal mutual information, inter-class Fisher's discriminant distance, and physical consistency correlation coefficient. The specific steps are as follows: Step S221: Construct a full-scale labeled sample set based on the historical inspection data of the drill pipe; The constructed full-scale labeled sample set should cover valid samples under different well depths, formation lithology, drilling conditions, and drill pipe wear conditions, with a total number of samples greater than 30. The original data sources for each sample include: drill pipe dynamic parameters, strain parameters, wellbore trajectory parameters, and joint coaxiality detection data collected synchronously during drilling; visual image data of the drill pipe body and joints collected during tripping in and out of the drill pipe; high-precision measured values ​​of joint coaxiality deviation, pipe body curvature, and wellbore axis full angle change rate of the corresponding drill pipe; and manual annotation results of the alignment status of the corresponding drill pipe.

[0023] For each sample in the fully labeled sample set, it is processed into an initial feature set with physical attribute labels through the multi-branch feature encoding network in step S21. Let the initial feature set of a single sample be F, and the feature value of the i-th feature channel be denoted as F. i takes values ​​from 1 to C, where C is the total number of feature channels. The physical attribute label bound to each feature channel is denoted as... , , For connector-level tags (i.e., characterization) For connector-level characteristics, hour , (Number of output feature channels for the local feature coding branch at the connector level). For tube-level labeling (i.e., characterization) Characteristics at the tube level, hour , The number of output feature channels for the tube-level mesoscale feature coding branch and sum), For wellbore-level labeling (i.e., characterization) It has wellbore-level characteristics. hour ); Finally, the constructed full-scale labeled sample set is divided into binary subsets according to the drill pipe alignment status, into a normal alignment sample subset and an alignment failure sample subset. Each sample is bound to a unique alignment status label y, where y=0 represents the normal alignment status of the drill pipe and y=1 represents the alignment failure status of the drill pipe.

[0024] Step S222: Quantify the causal correlation, inter-class discriminant distance, and physical consistency of each feature channel based on the full labeled sample set; ① The causal correlation quantification process for each feature channel is as follows: Predefined cascaded causal directed loop graph of drill pipe alignment failure: That is, upstream joint-level characteristics are the cause of midstream pipe-level characteristics, and midstream pipe-level characteristics are the cause of downstream wellbore-level characteristics, ultimately jointly determining the alignment failure state y; at the same time, a set of confusing variables for operating conditions, X, is defined, X={well depth, drill pressure, rotation speed, formation lithology, bottom hole temperature}. All parameters in X are sample-level dynamic measured variables that are bound one-to-one with each sample in the full-scale labeled sample set. Each sample corresponds to a unique set of measured values ​​of operating condition parameters that are collected synchronously with the detection data of that sample; equal-frequency binning discretization is performed on continuous variables such as well depth, drill pressure, rotation speed, and bottom hole temperature in X, and unique heat encoding is performed on categorical variables such as formation lithology to complete the input adaptation for causal calculation.

[0025] For the full-sample feature sequence of the i-th feature channel in the fully labeled sample set. (in Let N be the feature value of the i-th feature channel in the n-th sample, where N is the total number of samples in the fully labeled sample set, based on its physical attribute label. The cascaded causal mutual information is calculated in three categories. As a causal correlation metric of this channel feature, the interference of the confounding variable set X is eliminated by the backdoor adjustment criterion of Pearl causal inference: When the physical attribute labels of i feature channels hour: ,in For conditional mutual information operators, For Pearl's causal budget, The formula represents the alignment state label sequence corresponding to the full set of labeled samples. This formula quantifies the degree of pure causal drive of the final alignment state of the drill pipe after eliminating the influence of working condition confusion, with the current i-th joint-level feature channel as the starting point of the causal chain. When the physical attribute label of the i-th feature channel hour: ,in This is the complete feature set of all header-level feature channels in the fully labeled sample set. It is the complete feature set of all wellbore-level feature channels in the fully labeled sample set; this formula quantifies the "connecting" role of the current i-th pipe-level feature channel in the causal chain, that is, the degree to which the feature change can be explained by the causal effect of the upstream joint-level feature, and at the same time, the degree to which the feature change can explain the downstream wellbore-level feature and the final alignment state. When the physical attribute label of the i-th feature channel hour: ,in It is the complete feature set of all pipe-level feature channels in the fully labeled sample set; this formula quantifies the core link before the current i-th well-level feature channel as the end point of the causal chain, and satisfies two causal attributes at the same time: first, the degree to which the feature change can be explained by the causal effect of the upstream pipe-level features (reflecting the consistency of causal transmission); second, the degree of direct causal contribution of the feature to the final alignment state.

[0026] After quantifying the causal relationships of all feature channels, it is still necessary to further quantify all... The values ​​are normalized to map them uniformly to the [0,1] interval.

[0027] ②The quantization process for the inter-class discriminant distance of each feature channel is as follows: For the i-th feature channel, based on the predefined normal sample subset (denoted as ) ) and the subset of failed samples (denoted as ), and respectively calculate the distribution statistics of the eigenvalues ​​of this channel in the two subsets: in mean and variance ,exist mean and variance ; Substituting the above distribution statistics into the formula: In the process, the inter-class discriminant distance of the i-th feature channel is obtained. .

[0028] After the inter-class discriminant distance of all feature channels is quantized, the quantization results should also be normalized and mapped to the [0,1] interval.

[0029] ③ The process for quantifying the physical consistency of each feature channel is as follows: For the i-th feature channel, based on its bound physical attribute label Matching with feature sequences A one-to-one corresponding alignment failure reference sequence, denoted as The specific matching rules are as follows: like Then the physical reference quantity corresponding to the i-th feature channel is the measured value of the joint coaxiality deviation. First, construct the original measured sequence. ,in The measured coaxiality deviation of the drill pipe joint corresponding to the nth sample (extracted from the full set of labeled samples), where N is the total number of samples in the full set of labeled samples, is then normalized to obtain the dimensionless reference sequence. ; like Then the physical reference quantity corresponding to the i-th feature channel is the measured value of the pipe curvature. First, construct the original measured sequence. ,in The measured value of the drill pipe bending degree corresponding to the nth sample is normalized to obtain a dimensionless reference sequence. ; like Then the physical reference quantity corresponding to the i-th feature channel is the measured value of the total angle change rate of the wellbore axis. First, construct the original measured sequence. ,in The measured value of the total angle change rate of the wellbore axis corresponding to the nth sample in the corresponding well section is normalized to obtain a dimensionless reference sequence. .

[0030] Determine the reference sequence for the i-th feature channel. Then, calculate its relationship with Pearson correlation coefficient and will absolute value This serves as a quantification of the physical consistency of the feature channel.

[0031] Step S223: Combine the quantitative results of causal correlation, inter-class discrimination distance, and physical consistency to obtain the final comprehensive effectiveness score for each feature channel; For the i-th feature channel, its overall effectiveness score After the comprehensive validity score of all feature channels is calculated, the score is bound to the corresponding feature channel number and physical attribute label to form a feature channel validity score table. This score table is calculated offline and then fixed to the early warning system. It does not need to be recalculated for each online evaluation, but is only recalculated periodically when the full labeled sample set is iterated and updated.

[0032] Step S23: Based on the comprehensive effectiveness score of each feature channel, remove invalid interference features from the initial feature set to obtain the initial effective feature set; This step is the core screening step of the adaptive feature extraction mechanism. The inputs are the initial feature set with physical attribute labels output from step S21 and the feature channel effectiveness score table output from step S22. The output is the initially screened effective feature set. The specific screening process is as follows: Different validity screening thresholds are preset for the joint-level local feature coding branch, the pipe-level mesoscale feature coding branch, and the wellbore-level global feature coding branch. And satisfy It adapts the importance hierarchy of upstream source features, midstream transmission features, and downstream global features in the failure causal chain; According to the physical attribute labels bound to each feature channel in the initial feature set, the initial feature set is divided into a joint-level feature subset, a pipe-level feature subset, and a well-hole-level feature subset, which correspond one-to-one with the three coding branches, thus completing the branching and classification of features. For each branch feature subset, the comprehensive validity score of each feature channel within the subset is compared with the validity screening threshold of the corresponding branch. Invalid interference feature values ​​with scores lower than the corresponding threshold are removed, and feature values ​​of valid feature channels with scores greater than or equal to the corresponding threshold are retained. After the effective feature values ​​of the three branch feature subsets are initially screened, they are sequentially spliced ​​in the feature channel dimension according to the upstream and downstream causal order of the joint level-pipe level-wellbore level. The physical attribute labels and comprehensive validity scores bound to each feature channel are retained at the same time, and finally the effective feature set of the initial screening is formed.

[0033] Step S24: Utilize the feature fusion mechanism of working condition-failure sensitivity perception to perform cross-scale fusion on the initial screening effective feature set to obtain the final adaptive feature parameters; The feature fusion mechanism for operating condition-failure sensitivity perception is specifically executed through the following sub-steps: Step S241: Extract drilling condition data from standardized test samples, and use a condition clustering model to determine the current condition category and the failure sensitivity coefficient of the current condition; Overcoming the shortcomings of existing technologies that only classify operating conditions and fail to quantify the coupling relationship between operating conditions and alignment failure, this paper constructs a semi-supervised operating condition clustering model with failure label constraints and designs an original two-dimensional failure sensitivity coefficient quantification formula to accurately quantify the correlation between operating conditions and alignment failure, providing a physical basis for subsequent adaptive weighting of features. The specific implementation process is as follows: I. Extract drilling condition data from the standardized test sample set of the current sample to be evaluated, and construct a vector of operating condition parameters; The extracted drilling condition data (which has been standardized in step S1) are spliced ​​together to construct a condition parameter vector, denoted as W.

[0034] II. Construct a semi-supervised clustering model for operating conditions with failure label constraints based on the Gaussian mixture model; The specific construction and pre-training process is as follows: Extract the operating condition parameter vectors of all samples from the fully labeled sample set. and the corresponding centering status label Construct a pre-training sample set , where n is the sample index and N is the total number of samples in the fully labeled sample set; In the objective function of the traditional unsupervised Gaussian mixture model A failure label constraint term is added to ensure that the clustering results are strongly correlated with the final failure characteristics of the drill pipe. The objective function after adding the constraint term is expressed as:

[0035] Where c is the working condition category index, and the value is... , This represents the total number of preset drilling condition categories. The balance coefficient for the preset failure label constraint item. Let be the prior probability of the c-th working condition category. Let be the mean vector of the Gaussian components corresponding to the c-th working condition category. Let be the diagonal covariance matrix of the Gaussian components corresponding to the c-th working condition category. This represents the percentage of drill pipe alignment failure samples in the c-th working condition category. This represents the proportion of normal samples in the c-th working condition category. Let c be the probability density function of the c-th Gaussian component, using a diagonal covariance matrix. Reduce computational complexity to meet the real-time computing needs of drilling sites; The Expectation Maximization (EM) algorithm is used to apply the above objective function. Iterative solution; after convergence, the Gaussian component parameters for each working condition category are... , , Baseline failure probability for each operating condition category Mean variance of the overall effective feature set for initial screening of all samples within each working condition category. All data is embedded into the early warning system, completing the pre-training of the model.

[0036] III. Input the working condition parameter vector into the constructed working condition clustering model to determine the current working condition category; Input the standard working condition parameter vector W of the current sample to be evaluated into the constructed working condition clustering model, and calculate the posterior probability of W belonging to each working condition category. , , This is the index for operating condition categories, with values ​​ranging from 1 to... , The total number of pre-defined drilling condition categories is used; the condition category corresponding to the maximum posterior probability is taken as the current condition category. .

[0037] IV. Calculate the failure sensitivity coefficient of the current operating condition using the two-dimensional failure sensitivity coefficient quantification formula; The dual-dimensional failure sensitivity coefficient quantification formula simultaneously quantifies the risk of alignment failure and the fluctuation range of characteristic parameters under the current operating conditions, overcoming the deficiency of existing technologies that cannot comprehensively characterize the impact of operating conditions using a single probability. The formula is as follows: ,in Current operating condition category The corresponding failure sensitivity coefficient ranges from [0,1]. Current operating condition category The percentage of drill pipe alignment failure samples; Current operating condition category The mean variance of the overall effective feature set for the initial screening of all samples; During the pre-training phase, the above formula must also be used to calculate the corresponding [condition] for each working condition category. And calculate the average value under all operating conditions. .

[0038] Step S242: Based on the failure sensitivity coefficient of the current working condition, adaptively adjust the weighting coefficient of each feature channel, and obtain the cross-scale effective feature set by weighting the feature values ​​of each feature channel in the initial screening effective feature set; For the i-th feature channel, firstly, its overall effectiveness score is calculated. With the bound physical property tag Calculate the basic weighting coefficients of this feature channel. The calculation formula is expressed as: ,in Here, C represents the feature channel index, and C represents the total number of feature channels. , Physical attribute tags , The associated basic weights (system preset values); Then, the failure sensitivity coefficient under the current working conditions is combined. For the basic weighting coefficients Adaptive adjustment is performed to obtain the weighting coefficients under the current operating conditions. The adaptive adjustment formula is expressed as: ,in This represents the average overall validity score of all feature channels within the initial screening valid feature set of the current sample to be evaluated. The average failure sensitivity coefficient under all operating conditions. These are preset adaptive weighting coefficients for operating conditions, used to control the adjustment range of feature weights by the operating conditions. After calculating the weighting coefficients for all feature channels, the feature values ​​of each feature channel within the initial screening effective feature set of the current sample to be evaluated are... Perform weighted calculations to obtain the weighted eigenvalues. ; All weighted eigenvalues Based on their physical attribute labels, they are divided into three weighted feature subsets: joint-level weighted feature subset. Pipe-level weighted feature subset Borehole-level weighted feature subset The above three subsets together constitute the effective feature set across scales.

[0039] Step S243: Weighted splicing and fusion of the cross-scale effective feature set according to the upstream and downstream order of the midpoint failure cascade causal chain to obtain the final adaptive feature parameters; For each subset of the effective feature set across scales, one-dimensional adaptive global average pooling and one-dimensional adaptive global max pooling are performed simultaneously. The one-dimensional adaptive global average pooling is used to fully capture the overall statistical characteristics of the failure features in the corresponding layer. The one-dimensional adaptive global max pooling is used to accurately capture the abrupt failure feature signals within the layer. Then, the two sets of fixed-dimensional features obtained after average pooling and max pooling of the same subset are sequentially concatenated according to the channel order to finally obtain the fused representation vector of the corresponding layer features. Based on the cascaded causal chain of drill pipe alignment failure at the joint level → pipe body level → wellbore level, a causal propagation weighted fusion formula is designed to progressively fuse the fusion representation vectors of the three levels, fully preserving the entire link information of failure causal propagation, and obtaining the final adaptive feature parameters. The causal transit weighted fusion formula is expressed as: ,in These are the fused representation vectors of features at the joint level, pipe body level, and wellbore level, respectively. This is a fusion representation of the characteristics transferred from the joint level to the pipe body level, reflecting the causal driving effect of the source joint deviation on the bending deformation of the pipe body. This represents the fusion characterization after the transfer of fusion features from the pipe-level to the wellbore-level, reflecting the causal transmission effect of pipe deformation on the axis offset throughout the well section. The preset causal transmission coefficient controls the magnitude of the transmission influence of upstream features on downstream features in the failure causal chain. This is a concatenation function.

[0040] Step S25: Input the adaptive feature parameters into the pre-trained centering evaluation network, and output the drill pipe centering quantization score and centering status level. For drill pipes with a centering quantization score below the threshold, generate early warning information. This step is the final output of the drill pipe neutrality assessment, and specifically includes the following sub-steps: S251: Construct and complete the pre-training of the drill pipe neutrality evaluation network; The neutral evaluation network is an end-to-end dual-task multi-branch network. Its overall architecture consists of four core layers: a causal feature input layer, a hierarchical feature encoding branch, a cross-branch fusion layer, and a dual-task output layer. It retains the causal hierarchical attributes that cause centering failure throughout the entire process. The specific structure is as follows: Causal feature input layer: Input dimension and adaptive feature parameters output from step S24 The dimensions are perfectly matched; the input layer will The feature vectors are split into three independent groups according to the splicing order: the original fusion representation vector at the header level, and the feature vectors at the header level. , Connector-pipe level causal transit fusion representation vector Pipe-wellbore level causal transit fusion representation vector Each of these branches corresponds to an input to three parallel hierarchical feature encoding branches, enabling independent encoding of features at different causal levels and with different physical meanings, thus avoiding feature confusion and interference. Hierarchical feature encoding branches: There are 3 parallel independent encoding branches, which correspond one-to-one with 3 sets of input feature vectors. Each branch adopts a standardized structure of two fully connected layers + batch normalization layer + LeakyReLU activation function + Dropout layer, which can adapt to the encoding requirements of different levels of features (the number of neurons in each fully connected layer can be set as needed). Cross-branch fusion layer: A fusion method of channel splicing + causal constraint channel attention is adopted. First, the output feature vectors of the three-level feature encoding branches are spliced ​​in the channel dimension, and then connected to a causal constraint channel attention module. Each feature channel is assigned an attention weight that matches the causal contribution of the centering failure. The hard constraint of the weight is: the upper limit of the weight of the channel corresponding to the joint-level feature is ≥ the upper limit of the weight of the channel corresponding to the pipe-level feature is ≥ the upper limit of the weight of the channel corresponding to the well-hole-level feature. This matches the core driving role of the upstream source feature in the failure causal chain on the final centering state and avoids weight fitting without physical meaning. The weighted fusion feature vector output by the attention module is input to the dual-task output layer.

[0041] Dual-task output layer: Parallel regression and classification output branches are set up to simultaneously achieve accurate regression of neutral quantification scores and rapid classification of neutral state levels, wherein: Regression output branch: Set up 1 fully connected layer with 1 neuron, use the Sigmoid function as the activation function, and fix the output value range to [0,1] to map and obtain the drill pipe neutrality quantization score of 0~100; Classification output branch: Set up 1 fully connected layer with the same number of neurons as the preset number of alignment state levels. Use the Softmax function as the activation function to output the probability value corresponding to each alignment state level. The sum of the probability values ​​of all levels is 1.

[0042] The pre-training of the evaluation network is completed based on the fully labeled sample set constructed in step S221. The specific process is as follows: For each sample in the fully labeled sample set, the corresponding adaptive feature parameters are calculated through the complete process of steps S21 to S24. , as input samples for pre-training; and simultaneously, binding two sets of labeled ground truth values ​​to each sample: The true value of the regression task is calculated based on the high-precision field measurements of the joint coaxiality deviation, pipe body curvature, and total angle change rate of the wellbore axis corresponding to the sample. According to API Spec 5D "Drill Pipe Specification" and SY / T 5247 "Drilling Wellbore Trajectory Control Specification", the centering benchmark score (0~100 points) of the sample is calculated and normalized to the [0,1] interval as the true value of the regression task. Among them, the smaller the form and position deviation, the higher the benchmark score and the better the centering. The ground truth for the classification task is obtained by manually labeling the centering status of the samples (y=0 indicates normal centering and y=1 indicates centering failure) and combining the centering benchmark score to complete the level refinement labeling, thus obtaining the one-hot encoding of the centering status level corresponding to each sample, which serves as the ground truth for the classification task.

[0043] The pre-trained dataset with completed ground truth binding is randomly divided into a training set, a validation set, and a test set in a ratio of 7:2:1. The training set is used for iterative updates of model parameters, the validation set is used for monitoring generalization ability and early stopping control, and the test set is used for final performance verification.

[0044] For the dual-task output layer, a multi-task joint loss function with physical constraints is constructed to avoid conflicts between the optimization objectives of regression and classification tasks, while ensuring the physical consistency of the prediction results. The loss function formula is as follows: ,in Let be the joint total loss, and be the objective function for iterative optimization of the model; For the regression task loss, mean squared error loss (MSE) is used; For the classification task loss, cross-entropy loss is used; The physical consistency constraint loss is used to penalize situations where the prediction results do not conform to the cascade causal mechanism. The calculation formula is as follows: ,in These are the average attention weights for the joint-level, pipe-level, and well-bore-level feature channels of all samples within the batch; These are the balancing weights for the three types of losses, with preset values ​​of 0.6, 0.3, and 0.1, respectively, which can be adjusted according to on-site engineering needs.

[0045] The Adam optimizer is used for iterative updates of model parameters. An early stopping mechanism is set during training. When the joint total loss of the validation set does not decrease for 20 consecutive iterations, training is terminated early, and the model weights with the lowest validation set loss are saved as the optimal pre-training weights.

[0046] After pre-training, the model performance is validated using a test set. The acceptance metric is the coefficient of determination for the regression task on the test set. The accuracy of the classification task is ≥98%, and the failure state false alarm rate is ≤0.5%. The model weights that meet the requirements are fixed into the early warning system for subsequent online evaluation. If the requirements are not met, the full labeled sample set is expanded, and the feature effective measurement process in step S22 and the pre-training process in this step are repeated until the model performance meets the requirements.

[0047] Step S252: Input the adaptive feature parameters into the pre-trained centering evaluation network to obtain the drill pipe centering quantization score; The adaptive feature parameters output in step S24 Directly input to the causal feature input layer of the pre-trained evaluation network without additional preprocessing ensures that the physical properties and causal hierarchy of the features are fully preserved. The evaluation network performs forward propagation computation according to the pre-trained and fixed network structure and weight parameters, sequentially completing hierarchical feature independent encoding and cross-branch causal attention fusion, and finally outputs regression prediction values ​​and classification probability vectors through a dual-task output layer. The predicted values ​​in the [0,1] interval output by the regression output branch are linearly mapped to the integer interval of 0 to 100 to obtain the final drill pipe alignment quantitative score. The higher the score, the better the drill pipe alignment, the higher the matching degree between the running axis and the design axis, and the lower the risk of wear and failure.

[0048] Step S253: Match the drill pipe alignment status level according to the obtained drill pipe alignment quantification score; Combining API drill pipe specifications, oil and gas industry drilling operation safety standards, and field engineering practices, drill pipe alignment status is divided into five levels (Excellent, Good, Acceptable, Warning, and Failure) based on a centering quantification score. Each level corresponds to a clear scoring range, physical meaning, and engineering handling principles. Based on the obtained centering quantification score, the centering status level corresponding to the scoring range is determined. Simultaneously, the level with the highest probability value from the classification output branches is extracted for cross-validation: if the two results are consistent, the final centering status level is directly output; if the two results are inconsistent, the level corresponding to the quantification score is used, and the classification probability deviation is recorded for subsequent model iteration and optimization.

[0049] Finally, the unique number of the drill pipe to be evaluated, the corresponding well depth, the current drilling conditions, the neutrality quantitative score, and the neutrality status level are integrated and output.

[0050] Example 2

[0051] like Figure 2 As shown, Embodiment 2 of this application provides a drill pipe early warning system based on machine learning, including: a multi-source detection data acquisition and processing module 21, and a neutrality assessment result output module 22; The multi-source detection data acquisition and processing module 21 is used to acquire multi-source detection data of the drill pipe to be evaluated, and to preprocess the acquired data to obtain a standardized detection sample set. The neutrality assessment result output module 22 is used to extract feature parameters related to the drill pipe alignment state based on the standardized test sample set, and output the drill pipe alignment assessment result according to the feature parameters, specifically including: The multi-branch coding submodule 221 is used to divide the standardized detection sample set into multiple input subsets, which are then input into each coding branch of the multi-branch feature coding network to obtain the initial feature set. Feature channel effective metric submodule 222 is used to calculate the comprehensive effectiveness score of each output feature channel of the multi-branch feature coding network by utilizing the feature effective metric mechanism of the mid-failure cascade causal constraint. The feature filtering submodule 223 is used to remove invalid interference features from the initial feature set based on the comprehensive effectiveness score of each feature channel, and obtain the initial effective feature set. The feature fusion submodule 224 is used to perform cross-scale fusion on the initial screening effective feature set using the feature fusion mechanism of working condition-failure sensitivity perception to obtain the final adaptive feature parameters. The neutral quantization submodule 225 is used to input adaptive feature parameters into a pre-trained neutral evaluation network and output drill pipe neutral quantization score and neutralization status level.

[0052] Corresponding to the above embodiments, the present invention provides a computer storage medium, including: at least one memory and at least one processor; The memory is used to store one or more program instructions; A processor is used to run one or more program instructions to execute a machine learning-based drill pipe early warning method.

[0053] Corresponding to the above embodiments, this embodiment of the invention provides a computer-readable storage medium containing one or more program instructions, which are executed by a processor to provide a machine learning-based drill pipe early warning method.

[0054] The embodiments disclosed in this invention provide a computer-readable storage medium storing computer program instructions that, when executed on a computer, cause the computer to perform the aforementioned machine learning-based drill pipe early warning method.

[0055] In this embodiment of the invention, the processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0056] The various methods, steps, and logic diagrams disclosed in the embodiments of this invention can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The processor reads information from the storage medium and, in conjunction with its hardware, completes the steps of the above methods.

[0057] The storage medium can be memory, such as volatile memory or non-volatile memory, or may include both volatile and non-volatile memory.

[0058] Among them, non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory.

[0059] Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (Synchlink DRAM, SLDRAM), and direct memory bus RAM (DRRAM).

[0060] The storage media described in the embodiments of the present invention are intended to include, but are not limited to, these and any other suitable types of memory.

[0061] Those skilled in the art will recognize that, in one or more of the examples above, the functions described in this invention can be implemented using a combination of hardware and software. When applied as software, the corresponding functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transmission of computer programs from one place to another. Storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0062] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of the present invention should be included within the scope of protection of the present invention.

Claims

1. A machine learning based drill pipe early warning method, characterized in that, include: Step S1: Collect multi-source test data of the drill pipe to be evaluated, and preprocess the collected data to obtain a standardized test sample set; Step S2: Extract feature parameters related to the drill pipe alignment state based on the standardized test sample set, and output the drill pipe alignment assessment result according to the feature parameters. This specifically includes the following sub-steps: Step S21: Construct a multi-branch feature coding network based on the cascade mechanism of drill pipe alignment failure. Divide the standardized detection sample set into multiple input subsets of corresponding branches and input them into each coding branch of the multi-branch feature coding network to obtain the initial feature set. Step S22: Calculate the comprehensive effectiveness score of each output feature channel of the multi-branch feature coding network by using the feature effectiveness quantification mechanism of the cascaded causal constraint of the mid-failure. Step S23: Based on the comprehensive effectiveness score of each feature channel, remove invalid interference features from the initial feature set to obtain the initial effective feature set; Step S24: Utilize the feature fusion mechanism of working condition-failure sensitivity perception to perform cross-scale fusion on the initial screening effective feature set to obtain the final adaptive feature parameters; Step S25: Input the adaptive feature parameters into the pre-trained centering evaluation network, output the drill pipe centering quantization score and centering status level, and generate early warning information for drill pipes with centering quantization scores below the threshold.

2. A machine learning based drill pipe early warning method according to claim 1, characterized in that, The multi-source detection data includes drill pipe dynamic parameters, strain parameters, wellbore trajectory parameters, and joint coaxiality detection data acquired synchronously during drilling; visual image data of the drill pipe body and joints acquired during tripping in and out of the well; and current drilling condition data, including well depth, formation lithology, drilling fluid density, drilling pressure, rotation speed, and bottom hole temperature and pressure.

3. The machine learning based drill pipe early warning method of claim 1, wherein, The multi-branch feature coding network adopts a three-branch parallel coding architecture that corresponds one-to-one with the failure cascade mechanism. The three branches are the joint-level local feature coding branch, the pipe-level mesoscale feature coding branch, and the wellbore-level global feature coding branch.

4. The machine learning based drill pipe early warning method of claim 1, wherein, The effective metric mechanism of the cascaded causal constraint in the mid-failure phase is used to calculate the comprehensive effectiveness score of each output feature channel of the multi-branch feature coding network. The specific steps are as follows: A full-scale labeled sample set was constructed based on historical drill pipe inspection data; The causal correlation, inter-class discriminant distance, and physical consistency of each feature channel are quantified based on the full labeled sample set. The quantitative results of causal correlation, inter-class discrimination distance, and physical consistency are fused to obtain the final comprehensive effectiveness score for each feature channel.

5. A drill pipe early warning method based on machine learning according to claim 4, characterized in that, The original data sources for each sample in the full-volume annotation sample set include: drill pipe dynamic parameters, strain parameters, wellbore trajectory parameters, and joint coaxiality detection data collected synchronously during drilling; visual image data of the drill pipe body and joints collected during tripping in and out of the drill pipe; high-precision measured values ​​of joint coaxiality deviation, pipe body curvature, and full-angle change rate of the wellbore axis corresponding to the sample; and manual annotation results of the alignment status of the drill pipe corresponding to the sample.

6. A drill pipe early warning method based on machine learning according to claim 3, characterized in that, Based on the comprehensive effectiveness score of each feature channel, invalid interference features in the initial feature set are removed to obtain the initial effective feature set. This process is divided into the following sub-steps: Different validity screening thresholds are preset for the joint-level local feature coding branch, the pipe-body-level mesoscale feature coding branch, and the wellbore-level global feature coding branch; The initial feature set is divided into a joint-level feature subset, a pipe-level feature subset, and a well-hole-level feature subset, each corresponding to one of the three coding branches. For each branch feature subset, the comprehensive validity score of each feature channel within the subset is compared with the validity screening threshold of the corresponding branch. Invalid interference feature values ​​with scores lower than the corresponding threshold are removed, and feature values ​​of valid feature channels with scores greater than or equal to the corresponding threshold are retained. The effective feature values ​​after the initial screening of the three branch feature subsets are sequentially spliced ​​in the feature channel dimension according to the upstream and downstream causal order of the joint level-pipe level-wellbore level, and finally form the effective feature set after the initial screening.

7. A drill pipe early warning method based on machine learning according to claim 1, characterized in that, The feature fusion mechanism based on operating condition-failure sensitivity perception is used to perform cross-scale fusion on the initially screened effective feature set to obtain the final adaptive feature parameters. The specific steps are as follows: Drilling condition data are extracted from standardized test samples, and a condition clustering model is used to determine the current condition category and the failure sensitivity coefficient of the current condition. Based on the failure sensitivity coefficient under the current working conditions, the weighting coefficients of each feature channel are adaptively adjusted, and the feature values ​​of each feature channel in the initial screening effective feature set are weighted to obtain the cross-scale effective feature set. The effective feature set across scales is weighted and fused according to the upstream and downstream order of the cascaded causal chain of midpoint failure to obtain the final adaptive feature parameters.

8. A drill pipe early warning method based on machine learning according to claim 1, characterized in that, The adaptive feature parameters are input into the pre-trained centering evaluation network, which outputs a drill pipe centering quantization score and centering status level. The process is divided into the following sub-steps: Construct and complete the pre-training of the drill pipe neutrality evaluation network; The adaptive feature parameters are input into the pre-trained centering evaluation network to obtain the drill pipe centering quantization score. The drill pipe alignment status level is matched based on the obtained drill pipe alignment quantification score.

9. A drill pipe early warning method based on machine learning, characterized in that, include: Multi-source detection data acquisition and processing module, and neutral assessment result output module; The multi-source detection data acquisition and processing module is used to acquire multi-source detection data of the drill pipe to be evaluated, and to preprocess the acquired data to obtain a standardized detection sample set. The neutrality assessment result output module is used to extract feature parameters related to the drill pipe alignment state based on the standardized test sample set, and output the drill pipe alignment assessment result according to the feature parameters, specifically including: The multi-branch coding submodule is used to divide the standardized detection sample set into multiple input subsets, which are then input into each coding branch of the multi-branch feature coding network to obtain the initial feature set. The Feature Channel Effective Measurement Submodule is used to calculate the comprehensive effectiveness score of each output feature channel of the multi-branch feature coding network by utilizing the feature effective measurement mechanism of the mid-failure cascade causal constraint. The feature filtering submodule is used to remove invalid interference features from the initial feature set based on the comprehensive effectiveness score of each feature channel, and obtain the initial effective feature set. The feature fusion submodule is used to perform cross-scale fusion of the initially screened effective feature set using the feature fusion mechanism of working condition-failure sensitivity perception, so as to obtain the final adaptive feature parameters. The neutral quantization submodule is used to input adaptive feature parameters into a pre-trained neutral evaluation network and output drill pipe neutral quantization score and neutralization status level.