Downhole working condition diagnosis method, system, equipment and medium

By collecting cable tension and winch vibration signals in the downhole environment, performing time synchronization and adaptive Kalman filtering, constructing a fusion feature set, and using a hybrid neural network model for diagnosis, the problem of high false alarm and false alarm rates in downhole operating conditions is solved, and high-precision and reliable downhole operating condition diagnosis is achieved.

CN121766464APending Publication Date: 2026-03-31YANGTZE UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-22
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing technologies have high false alarm and false negative rates in complex downhole environments and lack interpretability and generalization ability, making it difficult to meet high reliability requirements.

Method used

By collecting cable tension signals and winch vibration signals, performing time synchronization and adaptive Kalman filtering, a fusion feature set is constructed and input into a hybrid neural network model for anomaly scoring and early warning signal generation. Finally, a knowledge reasoning engine is used for diagnosis.

Benefits of technology

It improves the accuracy and reliability of downhole condition diagnosis, reduces the false alarm rate, and enhances the safety and decision-making reliability of downhole operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121766464A_ABST
    Figure CN121766464A_ABST
Patent Text Reader

Abstract

The invention provides an underground working condition diagnosis method, system, equipment and medium, and belongs to the technical field of underground exploration, and the method comprises the steps: collecting a cable tension signal and a winch vibration signal; performing time synchronization and adaptive Kalman filtering processing on the cable tension signal and the winch vibration signal to obtain a multi-channel signal sequence; constructing a fusion feature set based on the multi-channel signal sequence; inputting the fusion feature set into a pre-trained hybrid neural network model, and outputting a preliminary abnormal score sequence and a corresponding model internal state vector; performing evaluation based on the preliminary abnormal score sequence and generating an evaluation result, and performing evaluation based on a model internal state vector and generating an early warning signal; and inputting the evaluation result, the early warning signal and the fusion feature set into a knowledge inference engine, and generating an underground working condition diagnosis result according to a fusion decision result output by the knowledge inference engine. According to the method, the false alarm rate is reduced, and the safety and decision reliability of underground operation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of downhole exploration technology, specifically to a method, system, equipment, and medium for diagnosing downhole working conditions. Background Technology

[0002] In recent years, with the continuous development of deep wells, ultra-deep wells, and unconventional oil and gas resources, the downhole operating environment has exhibited extremely complex characteristics, including high temperature, high pressure, strong disturbance, and multi-physics field coupling. Under such conditions, logging instruments such as cables, drilling tools, and coiled tubing frequently encounter abnormal conditions such as obstruction and sticking, which can easily lead to major engineering accidents such as instrument damage, drill string falling into the well, wellbore integrity failure, and even the scrapping of the entire well section. This not only causes serious economic losses but also poses a severe challenge to operational safety. Therefore, achieving accurate and real-time diagnosis and early warning of downhole conditions has become a key technical challenge that urgently needs to be solved to ensure the safe and efficient operation of oil and gas exploration and development.

[0003] To address the aforementioned issues, the industry has primarily developed two types of technical solutions. One is the traditional method, which relies on manual experience to set fixed thresholds for single physical parameters (such as cable tension) for anomaly detection. This method is simple, direct, and has been widely used in the field. The other is a data-driven intelligent diagnostic method. Domestic and international research institutions are attempting to analyze multi-source downhole signals by introducing signal processing and machine learning techniques to improve the automation level of diagnostics. This type of technology is still in the research and development stage and has not yet achieved large-scale industrial application.

[0004] However, existing technical solutions still have significant limitations: traditional thresholding methods have a single perception dimension and weak anti-interference ability. In downhole environments with strong noise and nonlinear disturbances, the false alarm rate and false negative rate are generally high, making it difficult to meet high reliability requirements. On the other hand, most emerging intelligent diagnostic methods are still in the laboratory stage, with insufficient model generalization ability and poor interpretability. They often rely on a large amount of labeled data and high computing power, and have shortcomings in real-time performance, lightweight design, and engineering applicability. They have not yet formed a complete and reliable technical system. Summary of the Invention

[0005] In view of this, it is necessary to provide a diagnostic method, system, equipment and medium for downhole working conditions to solve the technical problems of high false alarm and false negative rates and insufficient interpretability and generalization ability of existing technologies in complex downhole environments.

[0006] To address the aforementioned technical problems, in a first aspect, the present invention provides a method for diagnosing downhole working conditions, comprising: Collect cable tension signals and winch vibration signals; The cable tension signal and winch vibration signal are time-synchronized and adaptive Kalman filtered to obtain a multi-channel signal sequence. A fusion feature set is constructed based on the multi-channel signal sequence; The fused feature set is input into a pre-trained hybrid neural network model, and the initial anomaly scoring sequence and the corresponding model internal state vector are output. An evaluation is performed based on the preliminary anomaly scoring sequence, and an evaluation result is generated. An evaluation is also performed based on the internal state vector of the model, and an early warning signal is generated. The evaluation results, the early warning signals, and the fused feature set are input into the knowledge reasoning engine, and the downhole working condition diagnosis results are generated based on the fused decision results output by the knowledge reasoning engine.

[0007] In one possible implementation, the step of performing time synchronization and adaptive Kalman filtering on the cable tension signal and winch vibration signal to obtain a multi-channel signal sequence includes: Calculate the cross-correlation function between the first signal segment and the second signal segment; the first signal segment is a signal segment centered on a preset event in the cable tension signal, and the second signal segment is a signal segment in the winch vibration signal that corresponds to the first signal segment; Obtain the time shift corresponding to the peak value of the cross-correlation function, and determine that the time shift is the time delay of the winch vibration signal relative to the cable tension signal; The timestamp of the winch vibration signal is offset and compensated according to the time delay, so that the cable tension signal and the winch vibration signal are aligned with the time reference, and a time-aligned multi-channel signal is obtained. For the tension signal channel and vibration signal channel in the time-aligned multi-channel signal, respectively, a corresponding state-space model is constructed; Based on the adaptive Kalman filter, the time-aligned multi-channel signal is recursively filtered according to the state-space model to obtain the multi-channel signal sequence; wherein, the recursive filtering includes adjusting the measurement noise covariance matrix according to the difference value at the current time, and adjusting the process noise covariance matrix based on the adjusted measurement noise covariance matrix, wherein the difference value is the deviation value between the observed value and the model prediction value.

[0008] In one possible implementation, constructing the fused feature set based on the multi-channel signal sequence includes: Temporal features are extracted from the multi-channel signal sequence, including the mean tension and the mean composite acceleration. Calculate the product of the mean tension value and the mean composite acceleration value to obtain the tension-vibration interaction characteristics; Extract the process features within the adaptive Kalman filtering process, including Kalman gain, process noise covariance, and measurement noise covariance; Frequency domain features are extracted from the multi-channel signal sequence, including the average amplitude of vibration in the frequency domain, the dominant frequency of vibration, and the proportion of vibration bandwidth. The time-domain features, the tension-vibration interaction features, the process features, and the frequency-domain features are concatenated to form an initial high-dimensional feature vector; The initial high-dimensional feature vector is standardized, and the standardized result is segmented over a fixed period to obtain the fused feature set.

[0009] In one possible implementation, the hybrid neural network model includes a parallel temporal convolutional network module and an extended long short-term memory network module; the step of inputting the fused feature set into the pre-trained hybrid neural network model and outputting a preliminary anomaly scoring sequence and the corresponding neural network internal state vector includes: The fused feature set is simultaneously input into the temporal convolutional network module and the extended long short-term memory network module; The fused feature set is processed by parallel convolution through the temporal convolutional network module to obtain a first temporal feature sequence; the temporal convolutional network module includes an extended causal convolutional structure with residual connections. The extended long short-term memory network module is used to perform sequence modeling on the fused feature set to obtain a second temporal feature sequence and the internal state vector of the neural network at the current time. The extended long short-term memory network module includes a first sub-module for enhancing feature tracking and a second sub-module for expanding memory capacity. The first temporal feature sequence and the second temporal feature sequence are concatenated to generate a multi-scale fusion feature sequence; The multi-scale fused feature sequence is sequentially input into at least one fully connected layer for nonlinear transformation and feature dimensionality reduction, and the preliminary anomaly score is output.

[0010] In one possible implementation, the evaluation based on the preliminary anomaly scoring sequence and the generation of evaluation results, and the evaluation based on the model's internal state vector and the generation of early warning signals, include: The preliminary anomaly scoring sequence is subjected to score standardization to obtain a standardized anomaly scoring sequence; Based on a sliding window of a preset length, the mean and standard deviation of the scores within the sliding window are calculated according to the standardized anomaly score sequence. The sensitivity coefficient is determined based on the historical false alarm rate, and the anomaly detection threshold corresponding to the sliding window is calculated based on the sensitivity coefficient, the mean score, and the standard deviation of the score. The standardized anomaly score at the current moment is compared with the anomaly determination threshold corresponding to the current moment; If the standardized anomaly score at the current moment is greater than or equal to its corresponding anomaly judgment threshold, the generated evaluation result is an anomaly in the downhole working condition at the current moment. If the standardized anomaly score at the current moment is less than its corresponding anomaly judgment threshold, the generated evaluation result is that the downhole working condition at the current moment is normal. The norm change rate is calculated based on the internal state vector of the model. The norm change rate is compared with a preset gradient threshold. If the norm change rate is greater than or equal to the preset gradient threshold, the warning signal is generated.

[0011] In one possible implementation, the knowledge reasoning engine includes a physical reasoning engine, a case reasoning engine, and a rule reasoning engine; the step of inputting the evaluation result, the early warning signal, and the fused feature set into the knowledge reasoning engine, and generating a downhole working condition diagnosis result based on the fused decision result output by the knowledge reasoning engine, includes: The evaluation results, the warning signal, and the fusion feature set are input into the knowledge reasoning engine to obtain the physical reasoning verification results from the physical reasoning engine, the case reasoning verification results from the case reasoning engine, and the rule reasoning verification results from the rule reasoning engine. If any one of the physical reasoning verification result, case reasoning verification result, and rule reasoning verification result indicates that there is no abnormality, the downhole condition diagnosis result is determined to be normal. When the fusion decision result indicates an anomaly in the physical reasoning verification result, the case reasoning verification result, and the rule reasoning verification result, the downhole working condition diagnosis result is determined to be an abnormal downhole working condition.

[0012] In one possible implementation, inputting the evaluation result, the warning signal, and the fused feature set into the knowledge reasoning engine to obtain physical reasoning verification results from the physical reasoning engine, case reasoning verification results from the case reasoning engine, and rule reasoning verification results from the rule reasoning engine includes: Based on the physical quantity features related to the principles of mechanics and vibration in the fusion feature set, the physical quantity features are substituted into the predefined physical consistency rules to calculate the physical anomaly score, and the physical anomaly score is determined as the physical reasoning verification result. Based on the evaluation results, candidate feature data for suspected abnormal periods are located from the fused feature set. The candidate feature data is then matched with cases in the historical fault case library to calculate the case matching confidence. The case matching confidence and the corresponding matching case description are then determined as the case reasoning verification result. The evaluation results and the warning signal are matched with the set rules in the preset rule base to calculate the rule trigger strength. The rule trigger strength and the corresponding rule conclusion are determined as the rule reasoning verification results.

[0013] Secondly, the present invention also provides a diagnostic system for downhole operating conditions, comprising: The acquisition module is used to acquire cable tension signals and winch vibration signals; The processing module is used to perform time synchronization and adaptive Kalman filtering on the cable tension signal and winch vibration signal to obtain a multi-channel signal sequence; A construction module is used to construct a fusion feature set based on the multi-channel signal sequence; The extraction module is used to input the fused feature set into a pre-trained hybrid neural network model and output a preliminary anomaly scoring sequence and the corresponding model internal state vector. The evaluation module is used to evaluate based on the preliminary anomaly scoring sequence and generate evaluation results, and to evaluate based on the internal state vector of the model and generate early warning signals; The generation module is used to input the evaluation results, the early warning signals, and the fused feature set into the knowledge reasoning engine, and generate downhole working condition diagnosis results based on the fused decision results output by the knowledge reasoning engine.

[0014] Thirdly, the present invention also provides an electronic device, including a memory and a processor, wherein, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the downhole condition diagnosis method described in any of the above implementations.

[0015] Fourthly, the present invention also provides a computer-readable storage medium for storing a computer-readable program or instructions, which, when executed by a processor, can implement the steps in the downhole condition diagnosis method described in any of the above implementations.

[0016] The beneficial effects of this invention are as follows: The downhole working condition diagnosis method provided by this invention firstly integrates tension and vibration dual-channel information and employs adaptive Kalman filtering to effectively eliminate strong interference such as winch periodic noise, providing a high signal-to-noise ratio input for diagnosis and improving diagnostic accuracy and reliability. Secondly, it improves the recall rate of various anomalies by collaboratively detecting transient and slowly varying anomalies through a hybrid neural network model. Furthermore, multi-angle collaborative verification of the preliminary results output by the hybrid neural network model using a triple knowledge reasoning engine effectively identifies and filters false anomalies caused by transient interference, significantly reducing the false alarm rate and improving the safety and decision-making reliability of downhole operations. Attached Figure Description

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

[0018] Figure 1 A schematic flowchart of an embodiment of the downhole working condition diagnosis method provided by the present invention; Figure 2 For the present invention Figure 1 A schematic diagram of an embodiment of S102; Figure 3 For the present invention Figure 1 A schematic diagram of an embodiment of S103; Figure 4 For the present invention Figure 1 A schematic diagram of an embodiment of S104; Figure 5 For the present invention Figure 1 A schematic diagram of an embodiment of S105; Figure 6 For the present invention Figure 1 A schematic diagram of an embodiment of S106; Figure 7 For the present invention Figure 6 A schematic diagram of an embodiment of S601; Figure 8 This is a schematic diagram illustrating the effect of Kalman filtering in this invention; Figure 9 This is a schematic diagram of the structure of an embodiment of the TCN module of the present invention; Figure 10 This is a schematic diagram of the structure of an embodiment of the xLSTM module of the present invention; Figure 11 A schematic diagram of the overall architecture of the algorithm design provided by this invention. Detailed Implementation

[0019] 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 a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0020] In the description of the embodiments of the present invention, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.

[0021] The terms "first," "second," etc., used in the embodiments of this invention are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a technical feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature.

[0022] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0023] This invention provides a method, system, equipment, and medium for diagnosing downhole working conditions, which will be described below.

[0024] Figure 1 The following is a schematic flowchart of an embodiment of the downhole working condition diagnosis method provided by the present invention, as shown below. Figure 1 As shown, the diagnostic methods for downhole working conditions include: S101, Collect cable tension signal and winch vibration signal.

[0025] It should be noted that the system synchronously acquires two types of key physical signals using dedicated sensors deployed on the logging instruments and winch. The cable tension signal is acquired by a high-precision tension sensor installed on the cable, used to monitor the continuous changes in tension experienced by the instrument during downhole operation. The cable tension signal typically directly characterizes the risk of stuck pipe, obstruction, or jamming. The winch vibration signal is acquired by a triaxial accelerometer installed in key parts of the winch (such as the bearing housing or drive end) to capture multi-directional transient and steady-state vibrations caused by mechanical friction, sudden load changes, or instrument obstruction during winch operation. The winch vibration signal typically indirectly reflects drill string torsion, stick-slip, and eddy currents. The sampling frequency of the winch vibration signal is usually higher than that of the cable tension signal. During the acquisition of both cable tension and winch vibration signals, the system assigns a unified high-precision timestamp to both signals, laying the foundation for subsequent synchronous fusion.

[0026] S102. Time synchronization and adaptive Kalman filtering are performed on the cable tension signal and winch vibration signal to obtain a multi-channel signal sequence.

[0027] It should be noted that: firstly, the cable tension signal and winch vibration signal are synchronized and aligned in time to eliminate acquisition delay; then, adaptive Kalman filtering is applied to reduce noise and perform optimal estimation on the synchronized signal, ultimately generating a high-quality multi-channel signal sequence, providing a consistent and reliable data foundation for subsequent analysis. This eliminates phase deviations caused by differences in sampling rates, clock drift, and different mechanical transmission paths between the two types of sensors, and suppresses high-frequency noise and outliers.

[0028] S103. Construct a fusion feature set based on the multi-channel signal sequence.

[0029] It should be noted that time-domain, frequency-domain, and time-frequency-domain features are extracted from the multi-channel signal sequence and fused. In this way, based on the multi-channel signal sequence, key information that can characterize the system state is systematically mined and fused to construct a robust fused feature set, which aims to more comprehensively characterize the overall state of the cable-winch system as input for subsequent analysis and decision-making.

[0030] S104. Input the fused feature set into the pre-trained hybrid neural network model and output the preliminary anomaly scoring sequence and the corresponding model internal state vector.

[0031] It should be noted that the fused feature set is input into a pre-trained hybrid neural network model (such as CNN-LSTM) for forward propagation. The hybrid neural network model utilizes its temporal extraction of feature dependencies and outputs a preliminary anomaly scoring sequence through fully connected layers; simultaneously, it captures the state vector of the model's final hidden layer as a high-level representation of the input features after network transformation. The hybrid neural network model simultaneously outputs two key pieces of information: first, a scoring sequence representing the probability of anomalies at each time step (i.e., the preliminary anomaly scoring sequence); and second, the state vector of the model's internal hidden layers (i.e., the model's internal state vector), which contains a deep abstract representation of the input features.

[0032] S105. Evaluate based on the preliminary anomaly scoring sequence and generate evaluation results, and evaluate based on the internal state vector of the model and generate early warning signals.

[0033] It should be noted that after obtaining the preliminary anomaly score sequence and the internal state vector of the model through the above steps, the post-processing and decision-making stage is entered. That is, the threshold determination and trend analysis of the preliminary anomaly score sequence are performed to generate structured evaluation results. At the same time, the pattern recognition and comparison of the internal state vector of the model are performed. When it meets the preset warning mode, a graded warning signal is dynamically generated.

[0034] S106. Input the evaluation results, the early warning signal, and the fusion feature set into the knowledge reasoning engine, and generate downhole working condition diagnosis results based on the fusion decision results output by the knowledge reasoning engine.

[0035] It should be noted that the aforementioned assessment results, early warning signals, and original fusion feature sets are aggregated into the knowledge reasoning engine, which performs rule-based and knowledge-based deep analysis to generate interpretable, comprehensive, and reliable downhole condition diagnostic results.

[0036] In summary, the downhole condition diagnosis method provided by this invention firstly integrates tension and vibration information from both channels and employs adaptive Kalman filtering to effectively eliminate strong interference such as periodic winch noise, providing a high signal-to-noise ratio input for diagnosis and improving diagnostic accuracy and reliability. Secondly, it improves the recall rate of various anomalies by collaboratively detecting transient and slowly varying anomalies using a hybrid neural network model. Furthermore, it effectively identifies and filters false anomalies caused by transient interference through multi-angle collaborative verification of the preliminary results output by the hybrid neural network model using a triple knowledge reasoning engine, significantly reducing the false alarm rate and improving the safety and decision-making reliability of downhole operations.

[0037] To address the timing discrepancies in logging signals caused by asynchronous sensor acquisition and strong downhole noise interference, and to provide high-quality, synchronized, and clean multi-channel signal input for subsequent diagnostics, in some embodiments of the present invention, such as... Figure 2 As shown, step S102 includes: S201. Calculate the cross-correlation function between the first signal segment and the second signal segment; the first signal segment is a signal segment centered on a preset event in the cable tension signal, and the second signal segment is a signal segment in the winch vibration signal corresponding to the first signal segment.

[0038] It should be noted that: the time difference between two sets of signals is accurately measured using signal processing techniques. In practice, the sampling frequency is first set to... ft Cable tension signal T ( t In this process, a unique transient event with significant characteristics is identified manually or automatically, such as a tension spike caused by a slight impact from a downhole instrument, and the center time point of the event is recorded. tevent Based on this central time point tevent Take the center and cut off both the front and the back. N Each sampling point constitutes the first signal segment. Tseg ( t Subsequently, the winch vibration signal was sampled at a higher frequency (specifically the Z-axis signal, which is most sensitive to tension changes). Vz ( t In the example of ), taking the same central time point tevent Centered on the signal, a longer segment of the signal is proportionally extracted as the second signal segment. Vseg ( t Calculate the cross-correlation function of these two segments. RTV ( τ ): ;in, This is the time-shift parameter.

[0039] S202. Obtain the time shift corresponding to the peak value of the cross-correlation function, and determine that the time shift is the time delay of the winch vibration signal relative to the cable tension signal.

[0040] It should be noted that the calculated cross-correlation function RTV ( τ () is about time shift τ Given a sequence, find the global maximum (peak) point of the sequence, and the time shift value corresponding to this peak point. τ peak This refers to the number of sample points the vibration signal needs to move relative to the tension signal to achieve maximum similarity between the two signal segments. Since the two signals have different sampling frequencies—for example, assuming the tension sensor has a sampling rate of 20Hz and the vibration sensor has a sampling rate of 100Hz—to achieve the fusion analysis of the cable tension signal and the winch vibration signal, it is necessary to first address the signal sequence misalignment problem caused by the difference in sensor frequency and time. The specific signal timing process is as follows: First, parallel acquisition sampling frequency is... The cable tension signal and the frequency are higher (denoted as ,satisfy > The winch vibration signal is used; subsequently, a distinct and unique step or spike event is selected from the cable tension signal as a synchronization reference point. t event Next, along the vibration axis most sensitive to tension changes, the cross-correlation function between the tension event segment and the vibration signal segment is calculated with that point as the center of the window. The time shift corresponding to the peak value is then determined. τ This is the precise time delay; the timestamps of all winch vibration signals are uniformly subtracted. τ Time base alignment was completed; finally, Kalman filtering was applied to the aligned winch vibration signal, and the filtering result is as follows. Figure 8 As shown, the sampling frequency is reduced to the target frequency. After the above processing, four signal sequences with strictly synchronized time and one-to-one corresponding sampling points can be obtained: cable tension signal. T ( t k ), and the vibration signal of the triaxial winch. V x ( tk ), V y ( t k ), V z ( t k (including time delay) .

[0041] S203. The timestamp of the winch vibration signal is offset and compensated according to the time delay, so that the cable tension signal and the winch vibration signal are aligned with the time reference, and a time-aligned multi-channel signal is obtained.

[0042] It should be noted that: after obtaining the precise time delay, for all vibration signal channels ( Vx , Vy , Vz The original timestamps of the vibration data points are uniformly compensated: the time delay is subtracted from the timestamp of each vibration data point. This is equivalent to shifting the vibration signal forward on the time axis, aligning it with the tension signal at the time of the event. After alignment, resampling techniques (such as linear interpolation) are used to reduce the high sampling rate vibration signal to the same target frequency as the tension signal. Ultimately, four time-aligned multi-channel signals with strict one-to-one correspondence on the time axis and synchronized sampling points were obtained.

[0043] S204. Construct corresponding state-space models for the tension signal channel and vibration signal channel in the time-aligned multi-channel signal, respectively.

[0044] It should be noted that, for targeted filtering, state-space models characterizing the physical properties of both the tension and vibration signals need to be established. The state-space model corresponding to the tension signal channel (i.e., the tension signal model) focuses on describing its short-term trends and gradual changes. Assuming the tension changes linearly within a short time window, the tension signal model includes a tension state vector, a tension state transition matrix, and a tension observation matrix. The state-space model corresponding to the vibration signal channel (i.e., the vibration signal model) focuses on describing its oscillation decay characteristics. Assuming the vibration signal has decaying oscillation characteristics, it can be approximated by a second-order autoregressive (AR) model. The vibration signal model includes a vibration state vector, a vibration state transition matrix, and a vibration observation matrix.

[0045] S205. Based on the adaptive Kalman filter, the time-aligned multi-channel signal is recursively filtered according to the state-space model to obtain the multi-channel signal sequence; wherein, the recursive filtering includes adjusting the measurement noise covariance matrix according to the difference value at the current time, and adjusting the process noise covariance matrix based on the adjusted measurement noise covariance matrix, wherein the difference value is the deviation value between the observed value and the model prediction value.

[0046] It should be noted that adaptive Kalman filtering is applied to the synchronized multi-channel signal sequence to suppress noise and extract effective signal components. State-space models for tension and vibration are established separately to address their different physical characteristics. The tension model describes the short-term trend, while the vibration model (taking the Z-axis as an example) characterizes the decay characteristics. Their general state and observation equations are as follows: (1), where, x k For the system at time k The vibration state vector, F Here is the vibration state transition matrix. w k It's process noise. Q k Let be the covariance matrix.

[0047] (2), where, z k For vibration observation vectors, H This is the vibration observation matrix. v k It is vibration observation noise. R k To measure the noise covariance.

[0048] Calculate Kalman gain (3), where, K k For Kalman gain, P k To estimate the error covariance a priori, R k To measure the noise covariance. Equation 3 shows that the Kalman gain is determined by the relative magnitudes of the prior error covariance and the measurement noise covariance: when prediction uncertainty... P k When the gain is large, it approaches 1, indicating greater confidence in the measurement; conversely, when the measurement noise is low, the gain approaches 1. R When the gain is large, it approaches 0, indicating greater confidence in the predicted value.

[0049] (4) Update the state estimate according to Formula 4. It is the posterior state estimate (the optimal estimate after fusing prediction and measurement). K k It is the Kalman gain, which corrects the prediction by calculating the measurement residual and multiplying it by the gain.

[0050] (5) Update the error covariance using formula 5, where, P k|k It is the posterior estimation error covariance (updated uncertainty). P k|k-1 It is the prior error covariance. Q k It is the process noise covariance (representing the uncertainty of the system model). The formula adjusts the covariance through Kalman gain and incorporates process noise to reflect the dynamic changes of the system.

[0051] (6) The measurement noise covariance is dynamically adjusted using Formula 6. R k For the current moment k The measurement noise covariance matrix, v k This is the difference value, which is the difference between the observed value and the model prediction value; θ This is the threshold for filtering anomalies; R max and R min These are the preset upper and lower limits of the measurement noise covariance, used to prevent issues during the adjustment process. R k Increase or decrease indefinitely to an unreasonable value. α This is the noise amplification factor; when the difference value exceeds the filtering anomaly threshold (| v k |> θ When the value is amplified, it indicates that the observation may have a sudden change or strong interference. R k Quickly reduce the confidence level in the current observation to prevent the filter from over-following potentially anomalous observations; β This is the noise attenuation factor. When the difference value does not exceed the filtering anomaly threshold, it indicates that the system is operating smoothly, and noise is attenuated slowly. R k This gradually increases the confidence level in the observations, resulting in a smoother filtered output. The process noise covariance is adjusted. Q k Based on the current R k Calculate, and limit to Q min and Q maxThis allows process noise and measurement noise to change synchronously, thereby optimizing filtering performance. That is, the process noise covariance... Q k No longer fixed, but related to the current R k Coordinated adjustments: ;in λ This is the proportionality coefficient. This increases the uncertainty of the system model ( Qk ) can be related to the uncertainty of observation ( Rk Synchronous adaptation enables coordinated estimation of system dynamics and noise levels. Through the above recursive process, the final output is a multi-channel signal sequence that has undergone deep denoising and enhanced effective features, providing high-quality input for subsequent feature extraction.

[0052] In this embodiment, by selecting a specific physical event (tension spike) as a benchmark and using a cross-correlation function for similarity extremum search, the time delay can be determined with an accuracy far exceeding that of a single sampling interval. This event-driven synchronization method is more accurate and reliable than simple timestamp alignment or fixed delay compensation, ensuring a true causal correspondence between tension and vibration signals. This provides accurate physical timing evidence for subsequent analysis of their coupling relationship (such as how tension changes trigger vibration responses). Furthermore, state-space models conforming to the motion laws of tension (trend-driven) and vibration (oscillation-driven) are established respectively, and domain knowledge (physical laws) is encoded into the filter. This allows the filter to follow physical constraints such as "tension will not change drastically without rules" and "vibration will decay naturally" when predicting the next state, thereby more effectively separating reasonable real signal changes from noise and improving the fidelity of the filter. Furthermore, based on the difference between observation and prediction... v k Real-time assessment of the current environment, increasing efficiency when encountering strong interference. R k It maintains stability by relying on model predictions, and decreases when the environment is stable. R k This makes the output closer to the actual measurement, gives the filter the ability to intelligently identify and resist sudden interference, and reduces model uncertainty. Q k With observation uncertainty ( R k The adaptive changes enable coordinated estimation and optimization of internal dynamics and external observation quality. This allows for stable output of high signal-to-noise ratio signals even under complex downhole noise conditions such as winch periodic vibrations and random electromagnetic pulses. It provides downstream intelligent diagnostics with time-consistent, physically reliable, clean, and clear multi-channel signal sequences, directly ensuring the accuracy, reliability, and real-time performance of the overall diagnostic system from the data source.

[0053] To address the challenge of effectively learning and utilizing multi-source downhole signal data due to its high dimensionality, dispersed physical meaning, and inconsistent dimensions, this invention aims to provide models with inputs that can comprehensively and robustly represent complex operating conditions. In some embodiments of this invention, such as... Figure 3 As shown, step S103 includes: S301. Extract time-domain features from the multi-channel signal sequence, wherein the time-domain features include the mean tension value and the mean composite acceleration value.

[0054] It should be noted that time-domain features reflecting the basic statistical characteristics are extracted from the synchronized and filtered tension and triaxial vibration signals. Processing is performed in units of a fixed-length sliding time window (e.g., 40 data points corresponding to 2 seconds). The arithmetic mean of all sampled points of the cable tension signal within the window is calculated to obtain the tension mean, which reflects the average level of tension on the cable during that time period. The triaxial vibration signals are synthesized at each sampled point, and the synthesized acceleration is calculated. Subsequently, the arithmetic mean of this synthesized acceleration sequence within the window is calculated to obtain the synthesized acceleration mean, which is used to characterize the overall intensity level of the vibration during that time period.

[0055] S302. Calculate the product of the mean tension value and the mean composite acceleration value to obtain the tension vibration interaction characteristics.

[0056] It should be noted that the tension-vibration interaction feature is obtained by directly multiplying the mean tension value calculated by S301 with the mean synthetic acceleration value. This feature quantifies and amplifies the potential physical coupling between tension and vibration signals. Under normal circumstances, there is a certain correlation between stable changes in tension and vibration intensity. When resistance or jamming occurs, this correlation may be broken or exhibit an abnormal pattern (e.g., a sudden increase in tension without a corresponding increase in vibration). As a reinforced coupling indicator, the tension-vibration interaction feature amplifies this abnormal correlation, providing the model with more sensitive anomaly detection cues than a single feature.

[0057] S303. Extract the process features inside the adaptive Kalman filtering process, including Kalman gain, process noise covariance and measurement noise covariance.

[0058] It should be noted that using the internal state of the filter as a feature provides the model with in-depth information about the "signal estimation confidence" and "system dynamic uncertainty." During the recursive filtering process in S102, the Kalman gain is recorded and extracted in real time. K k Process noise covariance Q k and measurement noise covariance R k .

[0059] S304. Extract frequency domain features from the multi-channel signal sequence, wherein the frequency domain features include the average amplitude of vibration in the frequency domain, the dominant vibration frequency, and the proportion of vibration bandwidth.

[0060] It should be noted that Fourier transform is used to convert the vibration signal from the time domain to the frequency domain to capture its periodicity, resonance, and other spectral patterns. These patterns are highly sensitive to specific faults (such as mechanical wear and periodic jamming). A Fast Fourier Transform (FFT) is performed on the triaxial vibration composite acceleration signal within the window. The average amplitude of the spectrum after the FFT is calculated to obtain the average amplitude of the vibration in the frequency domain. The frequency point with the largest amplitude in the spectrum is found to obtain the dominant vibration frequency. An energy threshold is set, and the minimum frequency range width required to reach this energy threshold is calculated. The ratio of this minimum frequency range to the Nyquist frequency is then calculated to obtain the bandwidth ratio.

[0061] S305. The time-domain features, the tension-vibration interaction features, the process features, and the frequency-domain features are concatenated to form an initial high-dimensional feature vector.

[0062] It should be noted that all features extracted in steps S301 to S304 are concatenated into a one-dimensional vector in a predetermined order. The initial high-dimensional feature vector integrates diverse information from the time domain, interaction domain, process domain, and frequency domain, forming a multi-view snapshot of the downhole working conditions in the current time window.

[0063] S306. The initial high-dimensional feature vector is standardized, and the standardized result is segmented according to a fixed time period to obtain the fused feature set.

[0064] It should be noted that multi-domain feature mining is performed on multi-channel signal sequences to construct a 14-dimensional high-information fusion feature set. First, this fusion feature set includes a three-state condition code, which categorizes the conditions within a window into three predetermined states based on the signal baseline: State 0 (steady-state operation), State 1 (obstruction), and State 2 (stuck), providing a basic condition context for the model. Second, a quantitative tension-vibration interaction term is constructed, specifically the product of the mean tension and the mean synthetic acceleration, to characterize and amplify the physical coupling strength between the two under abnormal conditions. This fusion feature set comprehensively integrates time-domain, interaction-domain, process-domain, and frequency-domain information, specifically including: tension signal, vibration signal, tension and vibration interaction features, Kalman gain of the tension signal, process variance of the tension signal, measurement variance of the tension signal, Kalman gain of the vibration signal, process variance of the vibration signal, measurement variance of the vibration signal, frequency-domain average amplitude of the vibration signal, frequency-domain amplitude standard deviation of the vibration signal, frequency-domain maximum amplitude of the vibration signal, dominant frequency of the vibration signal, and bandwidth ratio of the vibration signal. All features are standardized using a Robust-MinMax (robust min-max normalization) joint normalization method. Sample sequences are generated through a sliding window, and the training set, validation set, and test set are strictly divided according to the time series to prevent future information leakage.

[0065] (8), where, Represents the energy function. Kinetic energy density represents the energy generated by motion, and it is proportional to the square of the velocity. ρ This indicates mass density. Potential energy density represents the energy stored due to deformation. EA Indicates axial stiffness. s u ) 2 It is the square of the strain. It refers to the internal potential energy density or the foundation potential energy density.

[0066] (9), of which, This represents the dominant frequency to be calculated. The operator representing the argument of the maximum value. Indicates the vibration signal at a frequency f The frequency domain amplitude at that point.

[0067] (10). By analyzing different signal sources (index) s ) and different feature dimensions (index) under each signal source p Perform a double traversal to get each eigenvalue Its corresponding weighting coefficient Multiply and sum to generate a time-varying value. t The result of the fusion of changes R ( t ).in, s It can represent different sensors or signal types (such as tension, vibration). p This represents various features extracted from a signal source (such as mean, variance, frequency domain indices, etc.). By adjusting the weights to adjust the importance of different features, this model achieves effective integration and compression of heterogeneous information from multiple sources, providing a one-dimensional, interpretable time-series input for subsequent analysis.

[0068] For example, using Robust-MinMax (robust min-max normalization), instead of using the global maximum and minimum values ​​for each feature dimension, the 5th percentile (P5) and 95th percentile (P95) of that dimension on the training set are used as scaling boundaries. The calculation formula is as follows: The resulting values ​​are cropped and scaled to the [0, 1] interval. This method effectively weakens the impact of extreme outliers on the normalization scale, making the standardization process more robust. The entire standardized feature time series is divided into a sample sequence by a fixed time step or window length (synchronized with or overlapping with the feature extraction window). Simultaneously, the training, validation, and test sets are strictly divided according to time order, and future information leakage is strictly prohibited (e.g., data from the test set time cannot be used for training or validation), ensuring the fairness of the model evaluation. The final output is the fused feature set used for training and inference.

[0069] In this embodiment, by fusing multi-domain features, a holographic working condition profile with complementary information is constructed, solving the problem of insufficient representation capability of a single feature dimension. Time-domain features (S301) provide a macroscopic statistical baseline of the working condition; interaction features (S302) specifically strengthen the coupling relationship between the two core physical quantities, tension and vibration, providing direct clues to abnormal correlations for diagnosis; frequency-domain features (S304) reveal spectral patterns such as periodicity and resonance hidden beneath the time-domain waveform, which is crucial for identifying specific types of mechanical faults. This multi-domain fusion ensures that regardless of whether the abnormality manifests as transient impact, slow drift, or spectral shift, a corresponding representation can be found in the feature set, greatly improving the model's completeness in perceiving complex and polymorphic anomalies. Furthermore, the Kalman gain of the adaptive Kalman filter is... K Noise covariance Q k and R kAs a feature, it endows the model with the ability to perceive data quality and system dynamic uncertainty. When the signal is strongly disturbed, the model can learn to appropriately reduce its dependence on features of that time period, thereby significantly enhancing the system's decision robustness in noisy and non-stationary environments and improving the model's judgment in uncertain environments. Furthermore, the adoption of Robust-MinMax normalization effectively suppresses the distortion of the data distribution scale by extreme outliers, making model training more stable, focusing on learning the main data patterns, and dividing the dataset according to time order to eliminate any form of data leakage, ensuring the authenticity of model performance evaluation and the reliability of generalization ability.

[0070] To address the challenge of accurately capturing two different time-scale fault modes—high-frequency transient anomalies (such as shocks) and long-period slowly varying anomalies (such as progressive jamming)—in complex downhole operating conditions simultaneously using a single neural network model, some embodiments of this invention include a hybrid neural network model comprising a parallel temporal convolutional network module and an extended long short-term memory network module; such as... Figure 4 As shown, step S104 includes: S401. The fused feature set is simultaneously input into the temporal convolutional network module and the extended long short-term memory network module.

[0071] It should be noted that the hybrid neural network model with 0.4M parameters (hereinafter referred to as the TCN-xLSTM model) takes the fused feature set (of shape [B, T, C], where B is the batch size, T is the time step, and C is the feature dimension) output from step S103 as input and feeds it into two parallel sub-networks. These two parallel sub-networks share the same input but use different network structures for processing. The two parallel sub-networks include a temporal convolutional network module (TCN module) and an extended long short-term memory network module (xLSTM module). The TCN module is specifically responsible for handling local patterns and transient changes in the input. The xLSTM module is specifically responsible for modeling long-term dependencies and gradual trends in the input. This parallel architecture design avoids mutual interference between two different time scale patterns in a single network.

[0072] S402. The fused feature set is processed by parallel convolution through the temporal convolutional network module to obtain a first temporal feature sequence; the temporal convolutional network module includes an extended causal convolutional structure with residual connections.

[0073] It should be noted that the TCN module is specifically designed for high-frequency transient anomaly detection in downhole operations. The TCN module employs an expanded causal convolution architecture, constructing a multi-scale temporal receptive field through an exponentially increasing expansion coefficient. This allows for millisecond-level accurate identification of transient distortion signals such as sudden tension changes and vibration shocks caused by events like obstruction / jamming, while ensuring that the output depends only on current and historical inputs. Figure 9 As shown, the network input dimension is (B, T, C_in), which is linearly mapped to the TCN input dimension (B, T, C_tcn). The TCN module contains four convolutional layers, each with a kernel width of 5 and a uniform output channel count of 64. Residual connections are used between layers to avoid gradient vanishing. Specifically, in each convolutional layer, the input undergoes weight normalization, ReLU activation, and dilated causal convolution. The output is then element-wise added to the original input to form the final output of that layer. This design not only enhances training stability but also gives the model better gradient flow characteristics. Thanks to the non-recursive convolutional structure, this TCN module has fully parallel computational capabilities, significantly outperforming recursive networks in inference speed, and can meet the low-latency requirements of real-time operational monitoring.

[0074] (11); among which, y t Indicates that the TCN module is in the first... t The output feature values ​​at each time step K It is the kernel size. w k It is the first k Each weighting coefficient It is the first td k Input at each time step, d It is the expansion factor, i.e., the skip interval.

[0075] The TCN module employs a Dilated Causal Convolution (DCC) structure and residual connection layers. The DCC structure consists of multiple convolutional layers. Features from the fused feature set are passed through a 1×1 linear projection layer to adjust the number of channels to the internal dimensions of the TCN (e.g., 64). For the input sequence, multiple convolutional layers are used for processing. The kernel size of each layer is fixed (e.g., 5), but the dilation coefficient increases exponentially with the number of layers (e.g., 1, 2, 4, 8), resulting in an exponentially expanded receptive field for each layer while maintaining causality (i.e., the output depends only on the current and historical inputs). Residual connections are used between each convolutional layer, meaning the output of each layer is the element-wise addition of the convolutional result and the original input (adjusted for dimensionality via a 1×1 convolution). This design effectively alleviates the vanishing gradient problem in deep networks and enhances training stability. Finally, the TCN module outputs the first time-series feature sequence (with shape [B, T, D_tcn], where D_tcn=64), which is rich in high-frequency transient anomaly features extracted through multi-layer nonlinear transformation.

[0076] S403. The fused feature set is sequence-modeled using the extended long short-term memory network module to obtain a second temporal feature sequence and the internal state vector of the neural network at the current time. The extended long short-term memory network module includes a first sub-module for enhancing feature tracking and a second sub-module for expanding memory capacity.

[0077] It should be noted that the xLSTM module primarily addresses the modeling problem of long-period, slowly varying anomalies. For example... Figure 10 As shown, the system comprises a first submodule (i.e., the sLSTM layer) and a second submodule (i.e., the mLSTM layer). The sLSTM layer effectively tracks slowly varying characteristics such as continuous stick-slip motion and gradual load changes through enhanced gating mechanisms and normalization strategies. The mLSTM layer expands the memory capacity through a high-order state matrix, significantly improving its ability to represent complex operating conditions and coupling modes. The hidden layer dimension is set to 128, all gating signals are activated using sigmoid, and the memory cell state update uses tanh transform. The xLSTM module, through long-term memory of historical information and selective forgetting, can accurately identify slowly varying anomalies that change weakly in a short period of time but accumulate continuously and eventually lead to failure.

[0078] (12). Among them, the input gate This indicates that the first layer is at time step t The input gate activation value, express Sigmoid The function compresses the output. The interval (0, 1) represents the weight matrix of the input gate. This indicates that the first layer is at time step t The input vector, This represents the bias vector of the input gate. LayerNorm Presentation layer normalization operation.

[0079] (13). Among them, the Gate of Oblivion, This indicates that the first layer is at time step t The activation value of the forget gate, The weight matrix represents the forget gate. This represents the bias vector of the forget gate.

[0080] (14). Among them, the output gate, This indicates that the first layer is at time step t The output gate activation value, This represents the weight matrix of the output gate. This represents the bias vector of the output gate.

[0081] (15). Among them, candidate memories, This indicates that the first layer is at time step t Candidate cell state, This represents the hyperbolic tangent function, compressing the output to the interval (-1, 1). The weight matrix representing the candidate memory. This represents the bias vector of the candidate memory.

[0082] (16). Among them, memory update, This indicates that the first layer is at time step t The new cellular state, This indicates that the first layer is at time step t The old cell state of 1, Indicates the output of the forget gate. Indicates the input gate output. Indicates candidate memories, This represents element-wise multiplication (Hadamard product).

[0083] The xLSTM module recursively processes the input sequence step-by-step. At each time step t, the network receives the current input feature xt and the hidden state ht-1 from the previous time step, and outputs the current hidden state ht through collaborative computation of sLSTM and mLSTM. The ht values ​​from all time steps are stacked to form the second temporal feature sequence (with shape [B, T, D_lstm], where D_lstm=128). The hidden state hT of the last time step is recorded as the internal state vector of the neural network (with shape [B, D_lstm]). This vector encodes the system dynamic information accumulated throughout the sequence processing and is a key input for subsequent early warning mechanisms.

[0084] S404. The first time-series feature sequence and the second time-series feature sequence are concatenated to generate a multi-scale fusion feature sequence.

[0085] It should be noted that after the TCN module and the xLSTM module process the same input sequence, their output features are concatenated along the time step dimension to form a joint feature vector that integrates multi-scale temporal information (i.e., a multi-scale fused feature sequence). Specifically, the first temporal feature sequence ([B, T, 64]) output by the TCN module and the second temporal feature sequence ([B, T, 128]) output by the xLSTM module are concatenated along the feature dimension (the last dimension) to obtain the multi-scale fused feature sequence (with the shape [B, T, 192]).

[0086] S405. The multi-scale fused feature sequence is sequentially input into at least one fully connected layer for nonlinear transformation and feature dimensionality reduction, and the preliminary anomaly score is output.

[0087] It should be noted that the joint feature vector is then subjected to nonlinear transformation and dimensionality compression through two fully connected layers (the first layer is 192-dimensional, and the second layer is 256-dimensional, both using ReLU activation). Finally, a preliminary anomaly score sequence is generated by a single-neuron output layer (linear activation). The first layer maps the 192-dimensional features to 192 dimensions (preserving dimensionality) through a fully connected layer, introducing nonlinearity using the ReLU activation function. The second layer maps the 192-dimensional features to 256 dimensions, also using ReLU activation. These two transformations further enhance the model's expressive power, enabling it to learn more complex interactions between features. Finally, a single-neuron fully connected layer (linear activation) compresses the 256-dimensional features into a 1-dimensional preliminary anomaly score. This preliminary anomaly score is a continuous real value; a higher value indicates a greater probability of an anomaly, and its shape is [B, T, 1].

[0088] In this embodiment, the TCN branch specifically targets high-frequency transient anomalies (sudden tension changes and vibration shocks when encountering obstacles), achieving high sensitivity and fast response to such events through millisecond-level parallel processing of expanded causal convolution. The xLSTM branch specifically targets long-period slowly varying anomalies (gradual load increases when encountering jams), achieving accurate tracking and early warning of slowly accumulating faults through enhanced memory mechanisms and long-range recursion. The TCN+xLSTM parallel architecture design achieves full temporal coverage of detection capabilities, enabling the model to maintain both sensitivity to rapidly changing signals and insight into slowly changing trends. Furthermore, the local detail features extracted by TCN (such as the second-order difference of the signal and high-frequency components) can detect minute signal distortions; the global context features extracted by xLSTM (such as the slope of the trend line and changes in periodic amplitude) can grasp the long-term evolution of the operating conditions. Through a multi-scale feature fusion mechanism, the organic integration of information from micro to macro levels is achieved, improving the model's comprehensive judgment ability on complex anomaly patterns. Furthermore, the hidden state vector of xLSTM (i.e. the internal state vector of the model) is used as an early anomaly indicator. Before the anomaly score exceeds the threshold, subtle changes in the system's internal dynamic characteristics can be detected in advance, providing operators with additional decision-making buffer time and forming a redundancy guarantee. The early warning value is particularly prominent when dealing with slowly developing stall faults.

[0089] To adaptively generate reliable (reducing false alarms) and timely (achieving early warning) anomaly judgments from the raw anomaly scores and internal states output by deep learning models, addressing the challenges of dynamically changing downhole conditions and complex anomaly patterns, this invention employs various methods in some embodiments. Figure 5 As shown, step S105 includes: S501. The preliminary anomaly scoring sequence is subjected to score standardization processing to obtain a standardized anomaly scoring sequence.

[0090] It should be noted that the Z-score standardization method is used to calculate the standardized outlier score. ,in, To standardize anomaly scoring, The initial anomaly score output by the TCN-xLSTM model at time t. , These are the mean and standard deviation of the entire initial anomaly rating sequence calculated on the training set, respectively. Standardization ensures that the rating sequence is transformed into a distribution with a mean of 0 and a standard deviation of 1, so that the degree of "anomaly" of the rating is converted into a multiple of the standard deviation relative to the historical normal pattern.

[0091] S502. Based on a sliding window of a preset length, calculate the mean and standard deviation of the scores within the sliding window according to the standardized anomaly score sequence.

[0092] It should be noted that: setting a fixed length as L (For example, L A sliding window (containing 120 time steps, corresponding to approximately 1 minute of real-time data) is used. At each current moment... t Extract all standardized scores within the sliding window and calculate the mean and standard deviation of the scores.

[0093] S503. Determine the sensitivity coefficient based on the historical false alarm rate, and calculate the anomaly judgment threshold corresponding to the sliding window based on the sensitivity coefficient, the mean score and the standard deviation of the score.

[0094] It should be noted that: Calculating the anomaly detection threshold T hreshold(t) = μ window(t) + k ( t )× σ window(t) .in, μ window(t) The average score σ window(t) The standard deviation of the rating k ( t () represents the sensitivity coefficient. k ( t ) constraint in [ kmin , kmax Within a reasonable range for the project, for example, [1.20, 1.65]. k ( tThe initial value can be set to 1.5. The sensitivity coefficient is determined based on the historical false positive rate (FPR). If the recent FPR is higher than the target value (e.g., >5%), it indicates the system is too sensitive; therefore, k(t) is slowly increased to raise the threshold and reduce false alarms. If the recent FPR is lower than the target value, it indicates the system is too conservative; therefore, k(t) is slowly decreased to lower the threshold and enhance detection sensitivity.

[0095] S504. Compare the standardized anomaly score at the current moment with the anomaly determination threshold corresponding to the current moment; S505. If the standardized anomaly score at the current moment is greater than or equal to its corresponding anomaly judgment threshold, the generated evaluation result is an anomaly in the downhole working condition at the current moment. S506. If the standardized anomaly score at the current moment is less than its corresponding anomaly judgment threshold, the generated evaluation result is that the downhole working condition at the current moment is normal.

[0096] It should be noted that the standardized anomaly score at the current moment will be used. Zt With the dynamic anomaly detection threshold corresponding to the current moment T hreshold(t) Perform a numerical comparison. If Zt ≥ T hreshold(t) If it is determined to be abnormal, an assessment result of the abnormal downhole operating condition is generated. If Zt < T hreshold(t) If the condition is deemed normal, an assessment result indicating normal downhole operating conditions is generated.

[0097] S507. Calculate the norm change rate based on the internal state vector of the model, compare the norm change rate with a preset gradient threshold, and if the norm change rate is greater than or equal to the preset gradient threshold, generate the warning signal.

[0098] It should be noted that: the internal state vector of the TCN-xLSTM model at the current time t is extracted in step S104. ht(a high-dimensional vector), calculate its L2 norm. Then, the norm change rate between adjacent time points can be calculated. The norm change rate is compared with a preset gradient threshold θg, which has been calibrated through extensive experiments. If Gt ≥ θg, it indicates that the dynamic representation within the neural network has changed drastically in a short period of time. This is usually a sign of an early, subtle change in the system's physical state, even if the standardized anomaly score may not exceed the anomaly detection threshold at this time. In this case, the system generates an early warning signal to alert the operator to potential risks.

[0099] In this embodiment, the initial anomaly score sequence output by the TCN-xLSTM model is Z-score standardized to obtain a standardized anomaly score sequence. Based on this standardized anomaly score sequence, a sliding window is used to dynamically estimate the anomaly detection threshold. Simultaneously, an early sign detection mechanism is constructed by calculating the norm change rate of the model's internal state vector. If the norm change rate exceeds a preset gradient threshold, it is determined as an early anomaly sign of the system, generating an early warning signal. Ultimately, a dual-insurance strategy of dynamic threshold + gradient warning is formed, significantly improving the robustness of system decision-making while ensuring zero false negatives.

[0100] Data-driven deep learning models may produce false alarms or unreliable diagnoses in complex downhole environments due to noise, model uncertainty, or data bias. To ensure that the final diagnostic results are physically reasonable, empirically sound, and logically reliable, in some embodiments of this invention, the knowledge reasoning engine includes a physical reasoning engine, a case-based reasoning engine, and a rule-based reasoning engine; such as... Figure 6 As shown, step S106 includes: S601. Input the evaluation results, the warning signal, and the fusion feature set into the knowledge reasoning engine to obtain the physical reasoning verification results from the physical reasoning engine, the case reasoning verification results from the case reasoning engine, and the rule reasoning verification results from the rule reasoning engine.

[0101] It should be noted that: the above evaluation results, warning signals, and fusion feature sets are aggregated into the knowledge reasoning engine, which concurrently calls its internal physical reasoning engine, case reasoning engine, and rule reasoning engine to obtain the corresponding physical reasoning verification results, case reasoning verification results, and rule reasoning verification results, respectively. Specifically, the original physical quantities in the fusion feature set, such as the tension change value, vibration energy, and dominant frequency change value in the current time window, are input into the knowledge reasoning engine, which then calls its internal physical reasoning engine to obtain the physical reasoning verification results. The key feature subsets in the fusion feature set that are related to historical case definitions (such as the mean and fluctuation range of tension, the dominant frequency of vibration, and the name of the energy band) are input into the knowledge reasoning engine, which then calls its internal case reasoning engine to obtain the case reasoning verification results. Finally, the evaluation results, the warning signals, and the fusion feature set are input into the knowledge reasoning engine, which then calls its internal rule reasoning engine to obtain the rule reasoning verification results.

[0102] S602. When the fusion decision result indicates that there is no abnormality in any of the physical reasoning verification result, case reasoning verification result, and rule reasoning verification result, the downhole working condition diagnosis result is determined to be normal.

[0103] It should be noted that: Anomaly detection thresholds are set for the output results of each engine, and a logical AND operation is performed on the three. If the flag bit of any one engine is 0 (indicating normal), the downhole condition diagnosis result is determined to be normal. For example, if the physics inference engine determines that the current signal change completely conforms to the laws of energy conservation and Hooke's Law (PhysicsFlag=0), even if the data model score is high, it will ultimately be determined to be normal because it does not make sense from a fundamental physical principle. If the case inference engine does not find a similar pattern in all historical fault cases (CaseFlag=0), it indicates that the current situation lacks empirical support and tends to conservatively determine it as normal. If no expert rules are triggered (RuleFlag=0), it is also considered to lack clear rule support and is determined to be normal.

[0104] S603. When the fusion decision result indicates that the physical reasoning verification result, the case reasoning verification result, and the rule reasoning verification result all indicate that there is an anomaly, the downhole working condition diagnosis result is determined to be an abnormal downhole working condition.

[0105] It should be noted that the triple knowledge reasoning engine achieves joint suppression of pseudo-anomalies through collaborative reasoning, as shown in Formula 17, and finally determines the anomaly only when the anomaly is consistently confirmed.

[0106] (17). Among them, E i [ k ]and E j [ k ] respectively represent the first i The and the first j The inference engine for the first... k Anomaly detection results for each sample. Indicator function [ E i [ k ]= E j [ k The value is 1 when the two are equal, and 0 otherwise. N This represents the total number of samples. A downhole operating condition anomaly is only definitively diagnosed when the outputs of all three engines exceed their respective anomaly detection thresholds (i.e., PhysicsFlag=1, CaseFlag=1, RuleFlag=1). In this case, the system not only outputs the anomaly conclusion but also generates a comprehensive diagnostic report.

[0107] In this embodiment, a dual-driven paradigm of data and knowledge is constructed by introducing three independent knowledge sources. By deploying physical reasoning, case reasoning, and rule reasoning engines in parallel, prior knowledge, historical experience, and physical laws from the human domain are encoded into computable verification modules. These modules comprehensively evaluate the model's initial judgment from three independent and complementary dimensions: verifying compliance with natural laws, comparing with historical experience, and checking compliance with operating procedures. This ensures the credibility and acceptability of the final diagnosis. Furthermore, by determining normal operation if any one of the three criteria in S602 fails, false alarms are suppressed. Anomalies are only determined if all three criteria in S603 fail, improving the accuracy of downhole anomaly detection and assessment.

[0108] To transform abstract domain knowledge (physical laws, historical experience, expert rules) into concrete, quantifiable verification metrics that can be collaboratively computed with data-driven model outputs, thereby achieving effective fusion and comparison of multi-source heterogeneous information at the decision-making level, in some embodiments of this invention, such as... Figure 7 As shown, step S601 includes: S701. Based on the physical quantity features related to the principles of mechanics and vibration in the fusion feature set, the physical quantity features are substituted into the predefined physical consistency rules to calculate the physical anomaly score, and the physical anomaly score is determined as the physical reasoning verification result.

[0109] It should be noted that a collaborative verification mechanism based on three engines—physical reasoning, case-based reasoning, and rule-based reasoning—is constructed. Original or derived physical quantity features directly related to mechanics and vibration are extracted from the fused feature set. These physical quantity features include tension changes within the current time window, vibration energy within the current time window (obtainable through the sum of squares of the vibration signal or frequency domain energy integration), changes in the dominant vibration frequency within the current time window, and changes in vibration amplitude within the current time window. These physical quantity features are then substituted into predefined physical consistency verification rules for calculation. Each rule outputs a violation indication (0 or 1) or a continuous violation degree.

[0110] The physics reasoning engine is based on the principles of mechanics and vibration to perform physical consistency verification on suspected anomalies. The physical consistency verification rules include energy conservation consistency, Hooke's law consistency, and dynamic equilibrium consistency.

[0111] (18); Energy conservation consistency, that is, high vibrational energy must correspond to significant tension changes, among which E i Vibrational energy, θ E The vibration energy threshold, This represents the change in tension. This is the threshold for tension change.

[0112] (19); Hooke's Law consistency, that is, an increase in tension should lead to an increase in the dominant frequency, otherwise it is abnormal, in which This represents the change in tension. The value of the main frequency change. For tension changes, The threshold for the change in the main frequency.

[0113] (20); Dynamic equilibrium consistency, when tension changes drastically, the vibration should change synchronously, among which, Vibration change value, Dynamic equilibrium tension change threshold Minimum threshold for vibration change, ∧ represents logical AND.

[0114] (21); The violation results of each physical consistency check rule are weighted and summed according to Formula 21 to obtain the physical anomaly score. ,in, α + β + γ =1, default α = β = γ = , To measure the degree to which a system deviates from Hooke's Law, To measure the degree of change in the system's total energy, To measure the degree to which the system's equations of motion are satisfied.

[0115] S702. Based on the evaluation results, locate candidate feature data for suspected abnormal periods from the fused feature set, perform similarity matching between the candidate feature data and cases in the historical fault case library, calculate the case matching confidence, and determine the case matching confidence and the corresponding matching case description as the case reasoning verification result.

[0116] It should be noted that the input includes the evaluation results (positive results from dynamic threshold evaluation) and the fused feature set. When a positive judgment signal is received, a certain window is expanded forward and backward from the time point corresponding to the signal, and the statistics (such as mean, maximum, and trend) of all features within that time period are extracted from the fused feature set to form a candidate feature data vector. In the historical fault case library, each case... Mi Defined as: a feature range Ri (For example, Tmean ∈[ Lowi , Highi ], Venergy ∈[ Lowj , Highj ], fdominant ∈[ Lowk , Highk ]) and corresponding fault description Di The case-based reasoning engine provides empirical evidence through similarity matching from a historical failure case database, as shown in formulas 22, 23, 24, and 25: (22); among them, T For tension, V For vibration, F Main frequency, D i This is an exception description. Mi For each fault case, Ri represents the similarity score.

[0117] The matching process involves checking whether each dimension of the candidate feature vector falls within the case. Mi Within the corresponding feature range. (23); Formula 23 is a Boolean matching function, where, x j For vectors x The j Each component ( j ∈{ T, V, F}), and To represent respectively In mode j The lower and upper bounds of the feature. This is an indicator function that returns 0 or 1. That is, if all dimensions fall within the specified range, then... Otherwise, it is 0.

[0118] (24); among them, Let represent the confidence score for the i-th category. Indicates input sample x With the i A model M i The distance between them is quantified by α, which represents a scaling parameter used to control the decay rate. This represents an exponential function, ensuring that the output value is within the range (0, 1].

[0119] If continuous measurement is required, calculate the weighted distance between the candidate vector x and the boundary of the range of case M_i: (25); Representing the eigenvector x With model M i The cumulative distance between them For all features jThe weighted distances are accumulated. The smaller the weighted distance, the more similar the cases. Then, the case matching confidence is calculated according to Formula 24. The case inference verification results are output through the above calculations, including the best matching case (i.e.,...). The highest case Mk ), case matching confidence And matching case description ( Mk Corresponding fault description Dk ).

[0120] S703. Match the evaluation result and the warning signal with the set rules in the preset rule base, calculate the rule trigger strength, and determine the rule trigger strength and the corresponding rule conclusion as the rule reasoning verification result.

[0121] It should be noted that the input consists of the evaluation results, warning signals, and necessary fusion features. The preset rule base comprises a series of production rules (i.e., defined rules). The rule reasoning engine constructs interpretable rule chains based on expert knowledge and optimizes anomaly detection by combining continuous point logic, as shown in formulas 26, 27, and 28.

[0122] (26); Formula 26 is a rule knowledge base, in which, P i (x) It is a prerequisite, based on feature vectors x (such as tension) T ,vibration V , main frequency F Logical combination of ) C i This is a conclusion (such as an exception type).

[0123] (27); Formula 27 is the rule matching function, where, This indicates a matching function that returns... x With setting rules r i The matching result I returns 1 (true) or 0 (false). Indicates the first i The predicate function of the rule, for the sample x Perform conditional judgment.

[0124] (28); The trigger strength is calculated according to formula 28, where, This indicates the degree of matching between the set rule ri and the current input data x. It is the maximum matching degree among all rules.

[0125] The rule base is traversed, and for each defined rule ri, it is evaluated whether it is satisfied by the current input data. If satisfied, the defined rule ri is triggered. Its trigger strength can be simply set to 1 (for Boolean matching), or continuously calculated based on the degree to which feature values ​​meet the conditions (e.g., using fuzzy logic). If not satisfied, the trigger strength is 0. The rule reasoning verification results are output through the above calculations. These results typically include: a list of triggering rules (the IDs or contents of all triggered rules), rule trigger strength (the trigger strength of the main triggering rule, or the combined strength of all triggering rules), and rule conclusion (the conditions corresponding to the main triggering rule).

[0126] In this embodiment, by unifying and quantifying physical laws, historical cases, and expert rules into calculable verification scores, the bottleneck of integrating multi-source heterogeneous knowledge with data model output for direct collaborative decision-making is resolved, achieving a closed loop of signal-data-knowledge. The quantification of physical reasoning (S701) transforms the abstract question of whether physical consistency rules are met into a specific physical anomaly score. The quantification of case reasoning (S702) transforms empirical judgment into measurable case matching confidence. The quantification of rule reasoning (S703) transforms rules into rule trigger strength. All three output standardized or comparable quantitative indicators, improving the targeting and efficiency of knowledge verification and optimizing resource utilization and decision-making speed in real-time diagnosis. Furthermore, physical reasoning directly focuses on the few core physical quantity features, is simple and fast to calculate, and can immediately filter out the most absurd false alarms. Case reasoning does not perform a cumbersome search across all time periods and features, but is driven by evaluation results (S702), only starting during suspected anomaly periods. The retrieval target is clear, significantly improving the efficiency of historical big data retrieval and meeting real-time requirements. Rule-based reasoning is also triggered by abnormal and warning signals, achieving conditional activation rather than continuously running all rules, thus keeping computational overhead manageable. This event-driven, on-demand knowledge reasoning mechanism ensures that the triple engine provides powerful verification capabilities without placing an excessive computational burden on the entire real-time diagnostic system. By generating structured and traceable verification results (score, confidence level, intensity, description), the final output is no longer an isolated "abnormal" label, but rather a downhole condition diagnostic result consisting of a physical score, case matching details, and triggering rules. For example, the system can output: "Diagnosis conclusion: Stuck. Evidence chain: 1) Data model score 0.92; 2) Physical verification found a violation of Hooke's Law (score 0.88); 3) Historical case matching 'keyway card' (confidence level 0.91); 4) Triggered expert rule 'gradually increasing load and softening spectrum' (intensity 0.95), enabling field engineers to quickly understand the root cause of the alarm, assess its reliability, and take targeted measures, greatly enhancing users' trust in the intelligent system."

[0127] The overall architecture of the algorithm design in this invention is as follows: Figure 11 As shown, this invention integrates adaptive Kalman filtering, a lightweight deep learning model, and a knowledge reasoning engine for intelligent diagnosis of downhole working conditions. It constructs a complete technical solution from signal preprocessing, feature extraction, intelligent recognition to decision verification, effectively solving the core problems of insufficient accuracy, low reliability, and poor interpretability in the diagnosis of complex downhole working conditions. Based on the collaborative architecture of adaptive Kalman filtering, a lightweight TCN-xLSTM hybrid neural network, and a triple knowledge reasoning engine, at the signal perception level, this invention breaks through the limitations of traditional single tension monitoring, constructing a dual-channel perception architecture for tension and vibration signals. It innovatively introduces an adaptive Kalman filtering algorithm for parallel state estimation, effectively separating periodic interference from the winch and strong downhole noise, achieving excellent performance with residual peak attenuation ≥60%. This provides input features with significantly improved signal-to-noise ratio and clear physical meaning for subsequent diagnostic processes. At the intelligent diagnostic level, this invention utilizes a lightweight hybrid neural network architecture, TCN-xLSTM, to achieve parallel capture of high-frequency impacts at the millisecond level through the expanded causal convolution of the TCN module. Combined with the enhanced memory mechanism of the xLSTM module, it accurately tracks slowly varying anomalies over 60-180 seconds. With a compact structure containing only 0.4M parameters, it achieves outstanding diagnostic performance with a recall rate of 1.0000 and an F1 score of 0.8931, perfectly aligning with the core safety principle of "zero missed detections" in downhole operations. At the decision verification level, this invention creates a "physical-case-rule" triple knowledge reasoning engine. Through collaborative verification and logical reasoning of multi-source prior knowledge, it constructs an interpretable diagnostic paradigm from "black-box prediction" to "white-box decision-making." Ultimately, while maintaining a recall rate and F1 score of 1.0000, it completely eliminates false alarms, thoroughly solving the industry problem of high false alarm rates and insufficient reliability of purely data-driven models in complex downhole environments. In summary, this invention achieves a synergistic improvement in diagnostic accuracy, reliability, and interpretability through a full-chain innovation of "perception-diagnosis-decision," providing a complete technical solution for intelligent diagnosis of complex downhole conditions and possessing significant engineering application value.

[0128] To better implement the downhole condition diagnosis method in the embodiments of the present invention, based on the downhole condition diagnosis method, the present invention also provides a downhole condition diagnosis system, which includes: The acquisition module is used to acquire cable tension signals and winch vibration signals; The processing module is used to perform time synchronization and adaptive Kalman filtering on the cable tension signal and winch vibration signal to obtain a multi-channel signal sequence; A construction module is used to construct a fusion feature set based on the multi-channel signal sequence; The extraction module is used to input the fused feature set into a pre-trained hybrid neural network model and output a preliminary anomaly scoring sequence and the corresponding model internal state vector. The evaluation module is used to evaluate based on the preliminary anomaly scoring sequence and generate evaluation results, and to evaluate based on the internal state vector of the model and generate early warning signals; The generation module is used to input the evaluation results, the early warning signals, and the fused feature set into the knowledge reasoning engine, and generate downhole working condition diagnosis results based on the fused decision results output by the knowledge reasoning engine.

[0129] The downhole working condition diagnostic system provided in the above embodiments can realize the technical solutions described in the above downhole working condition diagnostic method embodiments. The specific implementation principles of each module or unit can be found in the corresponding content in the above downhole working condition diagnostic method embodiments, which will not be repeated here.

[0130] The present invention also provides an electronic device. This electronic device includes a processor, a memory, and a display. Only some components of the electronic device have been shown above; however, it should be understood that it is not required to implement all the shown components, and more or fewer components may be implemented alternatively.

[0131] In some embodiments, the processor may be a central processing unit (CPU), a microprocessor, or other data processing chip, used to run program code stored in memory or process data, such as the downhole working condition diagnosis method in this invention.

[0132] In some embodiments, the processor may be a single server or a group of servers. The server group may be centralized or distributed. In some embodiments, the processor may be local or remote. In some embodiments, the processor may be implemented on a cloud platform. In one embodiment, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an intranet, a multi-cloud, or any combination thereof.

[0133] In some embodiments, the memory can be an internal storage unit of an electronic device, such as a hard drive or RAM. In other embodiments, the memory can also be an external storage device of the electronic device, such as a plug-in hard drive, a smart media card (SMC), a secure digital (SD) card, a flash card, etc.

[0134] Furthermore, memory can include both internal storage units and external storage devices of electronic devices. Memory is used to store application software and various types of data installed in electronic devices.

[0135] In some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. The display is used to show information from an electronic device and to display a visual user interface. Components of the electronic device communicate with each other via a system bus.

[0136] In one embodiment, when the processor executes a diagnostic program for downhole operating conditions stored in memory, the following steps can be implemented: Collect cable tension signals and winch vibration signals; The cable tension signal and winch vibration signal are time-synchronized and adaptive Kalman filtered to obtain a multi-channel signal sequence. A fusion feature set is constructed based on the multi-channel signal sequence; The fused feature set is input into a pre-trained hybrid neural network model, and the initial anomaly scoring sequence and the corresponding model internal state vector are output. An evaluation is performed based on the preliminary anomaly scoring sequence, and an evaluation result is generated. An evaluation is also performed based on the internal state vector of the model, and an early warning signal is generated. The evaluation results, the early warning signals, and the fused feature set are input into the knowledge reasoning engine, and the downhole working condition diagnosis results are generated based on the fused decision results output by the knowledge reasoning engine.

[0137] It should be understood that when the processor executes the downhole operating condition diagnostic program in the memory, in addition to the functions mentioned above, it can also perform other functions, as detailed in the description of the corresponding method embodiments above.

[0138] Furthermore, the embodiments of the present invention do not specifically limit the type of electronic device mentioned. The electronic device can be a mobile phone, tablet computer, personal digital assistant (PDA), wearable device, laptop computer, or other portable electronic device. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices running iOS, Android, Microsoft, or other operating systems. The aforementioned portable electronic devices can also be other portable electronic devices, such as laptop computers with touch-sensitive surfaces (e.g., touch panels). It should also be understood that in some other embodiments of the present invention, the electronic device may not be a portable electronic device, but rather a desktop computer with a touch-sensitive surface (e.g., a touch panel).

[0139] Accordingly, this application also provides a computer-readable storage medium for storing computer-readable programs or instructions. When the programs or instructions are executed by a processor, they can implement the steps or functions of the downhole working condition diagnosis methods provided in the above-described method embodiments.

[0140] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.), and the computer program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.

[0141] The above provides a detailed description of the diagnostic method, system, equipment, and medium for downhole working conditions provided by this invention. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.

Claims

1. A method for diagnosing downhole working conditions, characterized in that, include: Collect cable tension signals and winch vibration signals; The cable tension signal and winch vibration signal are time-synchronized and adaptive Kalman filtered to obtain a multi-channel signal sequence. A fusion feature set is constructed based on the multi-channel signal sequence; The fused feature set is input into a pre-trained hybrid neural network model, and the initial anomaly scoring sequence and the corresponding model internal state vector are output. An evaluation is performed based on the preliminary anomaly scoring sequence, and an evaluation result is generated. An evaluation is also performed based on the internal state vector of the model, and an early warning signal is generated. The evaluation results, the early warning signals, and the fused feature set are input into the knowledge reasoning engine, and the downhole working condition diagnosis results are generated based on the fused decision results output by the knowledge reasoning engine.

2. The method for diagnosing downhole working conditions according to claim 1, characterized in that, The process of time synchronization and adaptive Kalman filtering of the cable tension signal and winch vibration signal to obtain a multi-channel signal sequence includes: Calculate the cross-correlation function between the first signal segment and the second signal segment; the first signal segment is a signal segment centered on a preset event in the cable tension signal, and the second signal segment is a signal segment in the winch vibration signal that corresponds to the first signal segment; Obtain the time shift corresponding to the peak value of the cross-correlation function, and determine that the time shift is the time delay of the winch vibration signal relative to the cable tension signal; The timestamp of the winch vibration signal is offset and compensated according to the time delay, so that the cable tension signal and the winch vibration signal are aligned with the time reference, and a time-aligned multi-channel signal is obtained. For the tension signal channel and vibration signal channel in the time-aligned multi-channel signal, respectively, a corresponding state-space model is constructed; Based on the adaptive Kalman filter, the time-aligned multi-channel signal is recursively filtered according to the state-space model to obtain the multi-channel signal sequence; wherein, the recursive filtering includes adjusting the measurement noise covariance matrix according to the difference value at the current time, and adjusting the process noise covariance matrix based on the adjusted measurement noise covariance matrix, wherein the difference value is the deviation value between the observed value and the model prediction value.

3. The method for diagnosing downhole working conditions according to claim 1, characterized in that, The construction of the fused feature set based on the multi-channel signal sequence includes: Temporal features are extracted from the multi-channel signal sequence, including the mean tension and the mean composite acceleration. Calculate the product of the mean tension value and the mean composite acceleration value to obtain the tension-vibration interaction characteristics; Extract the process features within the adaptive Kalman filtering process, including Kalman gain, process noise covariance, and measurement noise covariance; Frequency domain features are extracted from the multi-channel signal sequence, including the average amplitude of vibration in the frequency domain, the dominant frequency of vibration, and the proportion of vibration bandwidth. The time-domain features, the tension-vibration interaction features, the process features, and the frequency-domain features are concatenated to form an initial high-dimensional feature vector; The initial high-dimensional feature vector is standardized, and the standardized result is segmented over a fixed period to obtain the fused feature set.

4. The method for diagnosing downhole working conditions according to claim 1, characterized in that, The hybrid neural network model includes a parallel temporal convolutional network module and an extended long short-term memory network module; the step of inputting the fused feature set into the pre-trained hybrid neural network model and outputting a preliminary anomaly scoring sequence and the corresponding neural network internal state vector includes: The fused feature set is simultaneously input into the temporal convolutional network module and the extended long short-term memory network module; The fused feature set is processed by parallel convolution through the temporal convolutional network module to obtain a first temporal feature sequence; the temporal convolutional network module includes an extended causal convolutional structure with residual connections. The extended long short-term memory network module is used to perform sequence modeling on the fused feature set to obtain a second temporal feature sequence and the internal state vector of the neural network at the current time. The extended long short-term memory network module includes a first sub-module for enhancing feature tracking and a second sub-module for expanding memory capacity. The first temporal feature sequence and the second temporal feature sequence are concatenated to generate a multi-scale fusion feature sequence; The multi-scale fused feature sequence is sequentially input into at least one fully connected layer for nonlinear transformation and feature dimensionality reduction, and the preliminary anomaly score is output.

5. The method for diagnosing downhole working conditions according to claim 1, characterized in that, The evaluation based on the preliminary anomaly scoring sequence and the generation of evaluation results, and the evaluation based on the model's internal state vector and the generation of early warning signals, include: The preliminary anomaly scoring sequence is subjected to score standardization to obtain a standardized anomaly scoring sequence; Based on a sliding window of a preset length, the mean and standard deviation of the scores within the sliding window are calculated according to the standardized anomaly score sequence. The sensitivity coefficient is determined based on the historical false alarm rate, and the anomaly detection threshold corresponding to the sliding window is calculated based on the sensitivity coefficient, the mean score, and the standard deviation of the score. The standardized anomaly score at the current moment is compared with the anomaly determination threshold corresponding to the current moment; If the standardized anomaly score at the current moment is greater than or equal to its corresponding anomaly determination threshold, the generated evaluation result is an anomaly in the downhole working condition at the current moment. If the standardized anomaly score at the current moment is less than its corresponding anomaly judgment threshold, the generated evaluation result is that the downhole working condition at the current moment is normal. The norm change rate is calculated based on the internal state vector of the model. The norm change rate is compared with a preset gradient threshold. If the norm change rate is greater than or equal to the preset gradient threshold, the warning signal is generated.

6. The method for diagnosing downhole working conditions according to claim 1, characterized in that, The knowledge reasoning engine includes a physical reasoning engine, a case reasoning engine, and a rule reasoning engine; the step of inputting the evaluation results, the early warning signals, and the fused feature set into the knowledge reasoning engine, and generating downhole condition diagnosis results based on the fused decision results output by the knowledge reasoning engine, includes: The evaluation results, the warning signal, and the fusion feature set are input into the knowledge reasoning engine to obtain the physical reasoning verification results from the physical reasoning engine, the case reasoning verification results from the case reasoning engine, and the rule reasoning verification results from the rule reasoning engine. If any one of the physical reasoning verification result, case reasoning verification result, and rule reasoning verification result indicates that there is no abnormality, the downhole condition diagnosis result is determined to be normal. When the fusion decision result indicates an anomaly in the physical reasoning verification result, the case reasoning verification result, and the rule reasoning verification result, the downhole working condition diagnosis result is determined to be an abnormal downhole working condition.

7. The method for diagnosing downhole working conditions according to claim 6, characterized in that, The step of inputting the evaluation result, the warning signal, and the fused feature set into the knowledge reasoning engine to obtain the physical reasoning verification result from the physical reasoning engine, the case reasoning verification result from the case reasoning engine, and the rule reasoning verification result from the rule reasoning engine includes: Based on the physical quantity features related to the principles of mechanics and vibration in the fusion feature set, the physical quantity features are substituted into the predefined physical consistency rules to calculate the physical anomaly score, and the physical anomaly score is determined as the physical reasoning verification result. Based on the evaluation results, candidate feature data for suspected abnormal periods are located from the fused feature set. The candidate feature data is then matched with cases in the historical fault case library to calculate the case matching confidence. The case matching confidence and the corresponding matching case description are then determined as the case reasoning verification result. The evaluation results and the warning signal are matched with the set rules in the preset rule base to calculate the rule trigger strength. The rule trigger strength and the corresponding rule conclusion are determined as the rule reasoning verification results.

8. A diagnostic system for downhole operating conditions, characterized in that, include: The acquisition module is used to acquire cable tension signals and winch vibration signals; The processing module is used to perform time synchronization and adaptive Kalman filtering on the cable tension signal and winch vibration signal to obtain a multi-channel signal sequence; A construction module is used to construct a fusion feature set based on the multi-channel signal sequence; The extraction module is used to input the fused feature set into a pre-trained hybrid neural network model and output a preliminary anomaly scoring sequence and the corresponding model internal state vector. The evaluation module is used to evaluate based on the preliminary anomaly scoring sequence and generate evaluation results, and to evaluate based on the internal state vector of the model and generate early warning signals; The generation module is used to input the evaluation results, the early warning signals, and the fused feature set into the knowledge reasoning engine, and generate downhole working condition diagnosis results based on the fused decision results output by the knowledge reasoning engine.

9. An electronic device, characterized in that, Including memory and processor, among which, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the downhole working condition diagnosis method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, Used to store computer-readable programs or instructions, which, when executed by a processor, can implement the steps in the downhole condition diagnosis method according to any one of claims 1 to 7.