Oil and gas well production regulation method and system based on friction risk

CN122980873APending Publication Date: 2026-10-27NANZHI (CHONGQING) ENERGY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611066673.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-17
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0004]本发明的目的是提供基于碰摩风险的油气井生产调控方法及系统,以解决现有油气井的井下管柱的碰摩风险评估难以实时量化碰摩风险,容易导致安全系数虚高而突发失效的技术问题

Benefits of technology

[0015]基于油气井特征向量独立构建流体-钻压耦合应力项并求解,同时基于油气井特征向量和等效磨损量时间序列独立构建磨损-重力耦合应力项并求解,最后将两者直接相加得到最大综合应力。通过将流体推力、钻压、井斜角所表征的主动载荷与累积磨损量、重力分量所表征的被动劣化效应分别建模并独立求解,该技术方案能够全面反映井下管柱在复合受力状态下的应力峰值,避免了传统单一应力模型因忽略磨损与重力耦合作用而导致的应力低估问题,为动态安全系数的计算提供了准确的上游数据支撑。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122980873A_ABST
    Figure CN122980873A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of oil and gas field development engineering, and particularly relates to an oil and gas well production regulation method and system based on a rubbing risk, which comprises the following steps: obtaining multi-source monitoring data of an oil and gas well, extracting features from the multi-source monitoring data of the oil and gas well to obtain an oil and gas well feature vector; inputting the oil and gas well feature vector into a safety level prediction model, and predicting a rubbing event frequency based on the oil and gas well feature vector; calculating a cumulative equivalent wear amount based on the rubbing event frequency, and constructing an equivalent wear amount time sequence according to the cumulative equivalent wear amount; calculating a maximum comprehensive stress based on the oil and gas well feature vector and the equivalent wear amount time sequence; calculating a dynamic safety coefficient, and determining a safety level based on the dynamic safety coefficient and a safety threshold; constructing an adaptive closed-loop control instruction based on the safety level, and regulating and controlling the oil and gas well according to the adaptive closed-loop control instruction. The present application can realize real-time quantification of the rubbing risk evaluation of a downhole pipe string.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of oil and gas field development engineering technology, specifically to a method and system for oil and gas well production control based on contact risk. Background Technology

[0002] In gas field development, the friction between the drilling string and the casing in the build-up section (the curved section where the wellbore trajectory changes from vertical to horizontal) is a crucial factor affecting wellbore integrity. As oil and gas resource development extends to deeper, ultra-deep, and unconventional areas, the application of complex well structures such as highly deviated wells and horizontal wells is becoming increasingly widespread. The stress state of the drilling string in the build-up section is becoming increasingly complex, making the contact and friction problem between the drilling string and the casing more prominent. Friction between the drill string and the inner wall of the casing during rotation not only causes casing wall thinning and strength reduction but can also lead to serious accidents such as casing deformation and rupture, threatening the safe production of oil and gas wells. Therefore, accurate assessment and effective management of the friction risk of downhole tubing are core issues for ensuring the safe and efficient operation of oil and gas wells.

[0003] Currently, the risk of rubbing of downhole tubing in oil and gas wells is typically assessed using static empirical models. However, the physical mechanisms of these models are simplified to static boundary conditions, neglecting the time-varying coupling effects of abrupt well deviation changes, fluid pulses, and wear degradation. Traditional formulas rely solely on the assumptions of rotational speed and constant wear rate, failing to dynamically correlate real-time operating conditions (such as production and pressure) with material degradation (wear accumulation). This results in a lack of computational dimensions, leading to errors as high as ±30% to 50%, rendering them ineffective for early warning. Furthermore, they cannot capture the instantaneous stress peaks caused by sudden changes in drilling parameters (such as fluctuations in drilling pressure), resulting in an inflated safety factor and sudden failure. Moreover, existing static empirical models cannot distinguish between mud disturbance and actual rubbing, causing false alarms or missed alarms. Ultimately, this manifests as frequent unplanned well workovers and tubing life significantly shorter than the design value. Summary of the Invention

[0004] The purpose of this invention is to provide a method and system for production control of oil and gas wells based on friction risk, so as to solve the technical problem that the friction risk assessment of the downhole tubing of existing oil and gas wells is difficult to quantify in real time, which easily leads to an inflated safety factor and sudden failure.

[0005] In a first aspect, the present invention provides a method for controlling oil and gas well production based on rubbing risk, comprising the following steps: Acquire multi-source monitoring data of oil and gas wells, and extract features from the multi-source monitoring data of oil and gas wells to obtain oil and gas well feature vectors; Input the feature vector of the oil and gas well into the safety level prediction model, and the safety level prediction model will execute: The frequency of collision events is predicted based on the feature vectors of oil and gas wells; The feature vector of oil and gas wells is divided into more than one time step according to a preset time interval. The cumulative equivalent wear is calculated based on the time step and the frequency of rubbing events, and the equivalent wear time series is constructed based on the cumulative equivalent wear. Calculate the maximum comprehensive stress based on the characteristic vector of oil and gas wells and the time series of equivalent wear. The dynamic safety factor is calculated based on the time series of oil and gas well characteristic vectors, maximum comprehensive stress and equivalent wear, and the safety level is determined based on the dynamic safety factor and safety threshold. An adaptive closed-loop control command is constructed based on the safety level, and the oil and gas well is regulated according to the adaptive closed-loop control command.

[0006] The significant effects of this invention are: This solution extracts feature vectors from oil and gas wells and uses a classic hybrid computing architecture-based safety level prediction model to calculate dynamic parameters such as collision frequency, damage amount, and comprehensive stress in real time. It enables dynamic correlation between real-time operating conditions and material degradation, ensuring the integrity of the calculation dimensions. This significantly improves the accuracy of collision risk calculation while achieving a response speed in the second range. It realizes advanced early warning of collision risks, transforming passive response into proactive prevention.

[0007] Furthermore, this scheme abandons the traditional static boundary assumptions and uses a time-step partitioning mechanism to discretize continuous operating conditions into iterable computational units, realizing the dynamic correlation and real-time updating of rubbing frequency, cumulative wear, and comprehensive stress. Simultaneously, it determines the safety level based on the comparison between the dynamic safety factor and the safety threshold, and constructs closed-loop control commands to regulate oil and gas wells accordingly. This technical solution can respond in real-time to transient changes in operating parameters, organically coupling risk assessment and production control, effectively solving the technical problems pointed out in the background technology, such as the inability of static empirical models to capture time-varying coupling effects, artificially high safety factors, and response lag, thus achieving real-time quantification and proactive control of downhole rubbing risks.

[0008] Furthermore, the step of extracting features from multi-source monitoring data of oil and gas wells to obtain oil and gas well feature vectors includes: Mapping multi-source monitoring data from oil and gas wells to quantum encoded states; The quantum-encoded state is subjected to quantum parallel filtering to obtain a noise-filtered quantum state; Quantum feature extraction is performed on the denoised filtered quantum state to obtain the feature-compressed quantum state; The characteristic vector of an oil and gas well is obtained by performing quantum measurement and decoding on the characteristic compressed quantum state.

[0009] This scheme employs a progressive processing flow of quantum-encoded state mapping, quantum parallel filtering, quantum feature extraction, and quantum measurement and decoding. Quantum-encoded states utilize the superposition property of qubits to represent massive amounts of monitoring data in a high dimension. Quantum parallel filtering uses quantum interference principles to simultaneously suppress incoherent noise in the frequency domain. Quantum feature extraction achieves nonlinear compression and dimensionality reduction of features through quantum principal component analysis or variable component circuits. By introducing these quantum computing links, the scheme significantly reduces data dimensionality and computational complexity while preserving, to the maximum extent possible, the weak contact-related features in the original signal. This provides the subsequent safety level prediction model with input feature vectors that have a higher signal-to-noise ratio and greater information density, improving the accuracy and efficiency of the overall assessment system.

[0010] Furthermore, the step of predicting the frequency of rubbing events based on oil and gas well feature vectors includes: Feature extraction is performed on the feature vector of oil and gas wells to obtain time-domain features, frequency-domain features, time-frequency features, and engineering coupling features. The time-domain features are used to represent the distribution characteristics of shock waves in the time dimension of the oil and gas well feature vector. The frequency-domain features are used to represent the energy distribution characteristics of shock waves in the frequency dimension of the oil and gas well feature vector. The time-frequency features are used to represent the time-frequency block location and intensity characteristics of shock wave energy accumulation in the combined time and frequency dimension of the oil and gas well feature vector. The engineering coupling features represent the linkage relationship between downhole vibration response and real-time engineering operation parameters in the oil and gas well feature vector. Determine whether a collision event exists based on time-domain characteristics, frequency-domain characteristics, time-frequency characteristics, and engineering coupling characteristics; Calculate the confidence level for each collision event, and determine whether the confidence level is greater than or equal to the confidence level threshold. If so, the collision event is a valid collision event; otherwise, the collision event is an invalid collision event. Count the number of valid collision events and calculate the frequency of collision events.

[0011] By extracting time-domain features, frequency-domain features, time-frequency features, and engineering coupling features in parallel from the feature vectors of oil and gas wells, a multi-dimensional rubbing criterion system was formed. Based on this, confidence scores were assigned to each event initially identified as rubbing, and the confidence scores were compared with preset thresholds to distinguish between valid rubbing events and invalid interference events. Finally, only the frequency of valid events was statistically analyzed. This system can accurately distinguish between genuine tubing-casing rubbing and non-rubbing signals such as mud pulses and pump interference, effectively eliminating false events caused by fluid disturbances or sensor noise. This significantly improves the authenticity and reliability of rubbing event frequency statistics, providing accurate input parameters for subsequent wear calculations.

[0012] Furthermore, the step of the equivalent wear calculation sub-model calculating the cumulative equivalent wear based on the time step and the frequency of rubbing events, and constructing the equivalent wear time series based on the cumulative equivalent wear, includes: Instantaneous wear rate is calculated based on multi-source monitoring data of oil and gas wells and frequency of rubbing events at the current time step; The wear increment at the current time step is calculated based on the instantaneous wear rate and the time step. The cumulative equivalent wear is calculated based on the wear increment at the current time step and the cumulative equivalent wear at the previous time step. Determine whether the cumulative equivalent wear amount at the current time step is less than the failure threshold. If so, calculate the cumulative equivalent wear amount for the next time step; otherwise, construct an equivalent wear amount time series based on the cumulative equivalent wear amount at each time step.

[0013] Using multi-source monitoring data of oil and gas wells and the frequency of rubbing events at the current time step as input, the instantaneous wear rate is first calculated. Then, the wear increment at the current time step is solved by combining the time step length. The wear increment is then summed with the cumulative value of the previous time step to update the current cumulative equivalent wear amount. Based on this, a failure threshold is introduced as a loop termination criterion. The calculation continues to the next time step only when the cumulative amount is less than the failure threshold; otherwise, the loop terminates and an equivalent wear amount time series is constructed. Through this computational architecture combining recursive accumulation and threshold termination, this technical solution can track the nonlinear accumulation process of wear amount in real time, automatically define the effective calculation interval, and avoid invalid iterations. This ensures both the integrity and accuracy of the wear time series data while reducing the consumption of computational resources.

[0014] Furthermore, the step of calculating the maximum comprehensive stress based on the oil and gas well feature vector and the equivalent wear time series includes: Based on the eigenvectors of oil and gas wells, a fluid-drill-pressure coupled stress term is constructed, and the fluid-drill-pressure coupled stress is obtained by solving the fluid-drill-pressure coupled stress term. Based on the characteristic vector of oil and gas wells and the time series of equivalent wear, a wear-gravity coupled stress term is constructed, and the wear-gravity coupled stress is obtained by solving the wear-gravity coupled stress term; The maximum combined stress is calculated by adding the fluid-drilling pressure coupled stress and the wear-gravity coupled stress.

[0015] The fluid-drilling pressure coupled stress term is independently constructed and solved based on the oil and gas well characteristic vectors. Simultaneously, the wear-gravity coupled stress term is independently constructed and solved based on the oil and gas well characteristic vectors and the equivalent wear time series. Finally, the two are directly added together to obtain the maximum combined stress. By modeling and independently solving the active loads represented by fluid thrust, drilling pressure, and well inclination angle, and the passive degradation effects represented by cumulative wear and gravity components, this technical solution can comprehensively reflect the peak stress of the downhole tubing under combined stress conditions. It avoids the stress underestimation problem caused by the neglect of wear and gravity coupling in traditional single stress models, providing accurate upstream data support for the calculation of the dynamic safety factor.

[0016] Furthermore, the step of calculating the dynamic safety factor based on the oil and gas well characteristic vector, maximum comprehensive stress, and equivalent wear time series includes: The inherent parameters of the material are obtained based on the feature vector of the oil and gas well, and the stress safety factor of the current time step is calculated based on the ratio of the inherent parameters of the material to the maximum comprehensive stress of the current time step. The wear attenuation factor for the current time step is calculated based on the ratio of the equivalent wear amount to the material's inherent parameters at the current time step. The dynamic safety factor for the current time step is calculated by multiplying the stress safety factor and the wear attenuation factor.

[0017] Material intrinsic parameters are extracted from the characteristic vectors of oil and gas wells. Then, the stress safety factor and wear attenuation factor are calculated separately, and finally, the two are multiplied to obtain the dynamic safety factor. By fusing the stress safety factor, which reflects the instantaneous load level, and the wear attenuation factor, which reflects long-term cumulative damage, in a product form, the superimposed effects of transient operating condition fluctuations and gradual material degradation on the safety margin can be captured simultaneously. This overcomes the technical shortcomings of a single stress index or a single wear index being unable to comprehensively characterize the safety status, and improves the comprehensiveness and scientific nature of safety level determination.

[0018] Furthermore, the safety level determined based on the dynamic safety factor and safety threshold includes a safe state, a warning state, and a dangerous state, and the adaptive closed-loop control command constructed based on the safety level includes: Adjust production operation parameters according to safety level: When the safety condition is safe, the drilling speed can be increased; When the safety status is in the warning state, the drilling pressure needs to be reduced; When the safety level is dangerous, immediately reduce the drilling pressure and reduce the discharge rate.

[0019] Through the aforementioned hierarchical and progressively enhanced control logic, this technical solution can maintain normal drilling efficiency when there is sufficient safety margin, provide flexible intervention through single parameter adjustment when risks first appear, and execute forced dual-parameter (drilling pressure and displacement) coordinated pressure reduction operation in dangerous situations to quickly pull the system back to the safe range. This balances operational efficiency and downhole string safety, achieving a precise match between risk level and control intensity.

[0020] Furthermore, after the step of regulating the oil and gas well according to the adaptive closed-loop control command, preventive maintenance is also included, comprising the following steps: Obtain the equivalent wear amount and dynamic safety factor at the current time step; calculate the maintenance time window based on the equivalent wear amount and oil and gas well feature vectors; Within the maintenance time window, the maintenance level is determined based on the equivalent wear and safety level: When the equivalent wear amount is less than the warning wear amount and the safety level is safe, the maintenance level is no maintenance, and the action strategy is normal operation and regular monitoring. When the equivalent wear amount is greater than or equal to the warning wear amount, or the safety level is in the warning state, the maintenance level is warning maintenance, and the action strategy is to plan to carry out maintenance in the next well section or when pulling out of the well, and to assess the wear status. When the equivalent wear amount is greater than or equal to the dangerous wear amount, or the safety level is dangerous, the maintenance level is emergency maintenance, and the action strategy is to immediately pull out the drill string and replace the tools.

[0021] By constructing a maintenance time window and introducing a dual-condition judgment logic based on wear amount and safety level, this technical solution can accurately plan the maintenance timing before tool failure, avoiding work interruption losses caused by premature maintenance and sudden failure accidents caused by late maintenance, thus realizing the quantification and refinement of preventive maintenance decisions.

[0022] Furthermore, after the step of regulating the oil and gas well according to the adaptive closed-loop control command, the method also includes feedback learning, which includes the following steps: Construct an assessment cycle, obtain the equivalent wear amount, maximum comprehensive stress, and dynamic safety factor at the current time step within the assessment cycle, and calculate the comprehensive assessment index; The evaluation level is determined based on comprehensive evaluation indicators, and optimization is triggered based on the evaluation level: If the comprehensive evaluation index is greater than or equal to the threshold of the first evaluation index, parameter optimization will not be triggered, and the current parameters will be maintained. When the comprehensive evaluation index is less than the first evaluation index threshold and the comprehensive evaluation index is greater than or equal to the second evaluation index threshold, the regulation gain of the adaptive closed-loop control command is optimized. When the comprehensive evaluation index is less than the threshold of the second evaluation index, the parameters of the safety level prediction model and the control rules of the adaptive closed-loop control command are optimized.

[0023] Through the aforementioned hierarchical and progressive feedback optimization architecture, this technical solution can automatically identify the source of system deviation based on the actual control effect, and match the optimization depth of differentiated shallow gain adjustment or deep model and rule reconstruction. This enables the adaptive iteration and self-improvement of the collision risk assessment model and control strategy, ensuring the continuous effectiveness and robustness of the system under long-term operation and complex working conditions.

[0024] Secondly, the present invention provides an oil and gas well production control system based on rubbing risk, for implementing the oil and gas well production control method based on rubbing risk as described above, including: The multi-source monitoring module for oil and gas wells is used to acquire multi-source monitoring data of oil and gas wells and to extract features from the multi-source monitoring data of oil and gas wells to obtain feature vectors of oil and gas wells. The collision event frequency calculation module is used to predict the frequency of collision events based on the feature vectors of oil and gas wells. The cumulative equivalent wear calculation module is used to calculate the cumulative equivalent wear based on the frequency of collision events; The maximum comprehensive stress calculation module is used to calculate the maximum comprehensive stress based on the characteristic vector of oil and gas wells and the time series of equivalent wear. The safety level determination module is used to calculate the dynamic safety factor based on the oil and gas well characteristic vector, maximum comprehensive stress and equivalent wear time series, and determine the safety level based on the dynamic safety factor and safety threshold. An adaptive closed-loop control command construction module is used to construct adaptive closed-loop control commands based on safety levels and to regulate oil and gas wells according to the adaptive closed-loop control commands. The preventive maintenance module determines the maintenance level based on the equivalent wear and safety level, and outputs preventive maintenance action strategies based on the maintenance level. The feedback learning module is used to calculate the comprehensive evaluation index based on the equivalent wear amount, maximum comprehensive stress, and dynamic safety factor of the current time step; determine the evaluation level based on the comprehensive evaluation index; and trigger the optimization of the parameters of the safety level prediction model, the control rules of the adaptive closed-loop control command, or the control gain of the adaptive closed-loop control command based on the evaluation level. Attached Figure Description

[0025] Figure 1 This is a flowchart of an oil and gas well production control method based on rubbing risk in an embodiment of the present invention. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, a clear and complete description will be provided below in conjunction with the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the protection scope of the present invention.

[0027] See appendix Figure 1 The oil and gas well production control method based on rubbing risk, as shown, includes the following steps: S1. Acquire multi-source monitoring data of oil and gas wells, and extract features from the multi-source monitoring data of oil and gas wells to obtain oil and gas well feature vectors. When acquiring multi-source monitoring data of oil and gas wells, it can be obtained by acquiring various parameter indicators of the oil and gas well monitoring system during the operation of the oil and gas well. Specific multi-source monitoring data of oil and gas wells include vibration frequency, rotational speed, vibration acceleration, sound pressure, torque, pressure, temperature, well inclination angle, casing geometric parameters, production status, strain monitoring data, drilling pressure, flow rate, casing geometric parameters, material properties, etc. The specific content of the oil and gas well monitoring system monitoring the above parameters is existing technology and will not be described in detail here.

[0028] The extraction of feature vectors from oil and gas wells specifically includes the following steps: A1. Mapping multi-source monitoring data from oil and gas wells to quantum encoded states; specifically, constructing multi-source monitoring data vectors from the acquired multi-source monitoring data of oil and gas wells:

[0029] In the formula, For multi-source monitoring data vectors, The first in the multi-source monitoring data vector One monitoring data point; Step A1 also includes preprocessing the multi-source monitoring data vector, which includes normalization, centering, DC removal, and outlier truncation. The specific content of the preprocessing of the multi-source monitoring data vector is existing technology and will not be described in detail here.

[0030] The quantum encoded state is obtained by quantum encoding the multi-source monitoring data vector:

[0031] In the formula, For quantum encoded state, The total amount of detection data in the multi-source monitoring data vector. The first in the multi-source monitoring data vector The dimensionless probability amplitude coefficients of each monitoring data point after amplitude normalization transformation For the first The standard orthogonal calculation basis vectors are calculated; When quantum encoding multi-source monitoring data vectors, one of amplitude encoding, phase encoding, or quantum random access encoding is selected based on data characteristics, quantum hardware capabilities, and engineering requirements. This allows multi-dimensional monitoring data from oil and gas well multi-source monitoring data to be encoded using only one method. It can be represented by a single quantum bit, which can exponentially reduce the difficulty and computational cost of computation.

[0032] A2. The quantum encoded state is subjected to quantum parallel filtering to obtain a denoised filtered quantum state; specifically, a quantum Fourier transform (QFT) circuit is constructed to perform full-frequency domain parallel decomposition of the quantum encoded state; the main frequency of the signal is extracted by quantum phase estimation to suppress noise frequencies; then, the signal is projected to a low-dimensional signal subspace by a quantum projection operator to achieve the separation of signal and noise. This process uses quantum interference to enhance coherent signals (such as elastic waves generated by real rubbing) and suppress incoherent noise (such as mud pulses and pump interference).

[0033] A3. Quantum feature extraction is performed on the denoised and filtered quantum state to obtain the feature-compressed quantum state; Quantum Principal Component Analysis (QPCA) is performed on the denoised quantum state, and the eigenvalues ​​and eigenvectors of the covariance matrix are solved in parallel through quantum phase estimation (QPE), and the first k principal components are extracted as the eigenvectors after dimensionality reduction; Quantum anomaly detection is performed to measure the purity, fidelity and entropy of the denoised and filtered quantum state, and the anomalous features in the denoised and filtered quantum state are quickly identified; Finally, the feature-compressed quantum state is obtained by nonlinear eigenmapping using a variational quantum circuit (VQC).

[0034] A4. Perform quantum measurement and decoding on the characteristic compressed quantum state to obtain the oil and gas well feature vector; measure the processed quantum state under the computational basis to collapse the quantum information into classical values, and output the denoised oil and gas well feature vector.

[0035] S2. Input the feature vector of the oil and gas well into the safety level prediction model to predict the safety level of the oil and gas well; the safety level prediction model includes a sub-model for calculating the frequency of collision events, a sub-model for calculating the equivalent wear amount, and a sub-model for calculating the maximum comprehensive stress.

[0036] In petroleum engineering, friction mainly includes friction between the rotor and stator of downhole screw drills and turbine drills, friction between the drive shaft and housing in rotary steerable tools, friction between the shaft system and pump barrel of downhole electric submersible pumps and pumping units, collisions between the drill string and the wellbore, and eccentric friction. This type of friction can lead to: increased vibration, tool wear, stuck drill bit, failure, and downhole accidents. The frequency of friction events is a core quantitative indicator for evaluating the health status, friction level, and eccentric wear of downhole tools. The friction event frequency calculation sub-model is a calculation model that integrates multiple sources of parameters such as downhole vibration sensing signals, rotational speed, drilling pressure, and displacement. Through signal processing and machine learning / deep learning, it automatically identifies friction impact events and counts the effective number of friction events per unit time / unit of revolutions. The sub-models for calculating the frequency of collision events, the equivalent wear amount, and the maximum comprehensive stress can be selected from one or more of the following, depending on the different input features and calculation tasks: CNN (Convolutional Neural Network, used to process time-frequency graphs), LSTM / GRU (Long Short-Term Memory Network / Gated Recurrent Unit, used to process time-series dependencies), Transformer (used to process long-series downhole signals), Random Forest, and Quantum Enhanced Feature Extraction Model. The specific structure of the models is existing technology and will not be elaborated here.

[0037] The specific steps of the security level prediction model include: S201. The oil and gas well feature vector is input into the collision event frequency calculation sub-model for feature extraction to obtain time-domain features, frequency-domain features, time-frequency features, and engineering coupling features. Specifically, a sliding time window is used to segment the oil and gas well feature vector, where the length of the sliding time window matches the duration of the downhole collision event, specifically including the time-domain duration of the collision impact (milliseconds to hundreds of milliseconds); the rotational speed cycle (one window is collected per revolution for easy analysis synchronized with rotational speed); and downhole operating condition change nodes (new segments are triggered when drilling pressure or displacement changes abruptly). The specific details of segmentation using the sliding time window are existing technology and will not be elaborated here.

[0038] The time-domain features are used to represent the distribution characteristics of shock waves in the time dimension of the oil and gas well feature vector. The time-domain features include the signal calculation peak value, kurtosis, impulse factor, short-time energy, and peak interval distribution within the window. Kurtosis is used to reflect the intensity of the shock component, short-time energy is used to characterize the total energy of the signal within the window, and peak interval distribution is used to statistically determine the time difference between adjacent peak values ​​within the window and to judge the periodicity of the impact.

[0039] Frequency domain features are used to represent the energy distribution characteristics of shock waves in the frequency dimension of oil and gas well feature vectors. Frequency domain features include the power frequency, harmonics, and sideband energy of the window signal. Specifically, the window signal is subjected to Fast Fourier Transform (FFT) to obtain the spectrum, and the power frequency, harmonics, and sideband energy are extracted from the spectrum.

[0040] Time-frequency features are used to represent the location and intensity characteristics of the time-frequency block of shock wave energy accumulation in the joint time and frequency dimensions of the oil and gas well feature vector. When extracting time-frequency features, a short-time Fourier transform (STFT) is performed on the window signal to generate a spectrum, and a continuous wavelet transform (CWT) is performed on the spectrum to generate a time-frequency map. The location and intensity of the time-frequency block of shock energy accumulation in the time-frequency map are extracted, and the time-frequency entropy is calculated to measure the distribution complexity of signal energy in the time-frequency domain.

[0041] Engineering coupling features represent the linkage between downhole vibration response and real-time engineering operation parameters in the feature vector of oil and gas wells. Engineering coupling features include the synchronization index of vibration and rotation speed, the correlation between vibration and drilling pressure / discharge, and the periodicity, stability and duration of rubbing impact.

[0042] S202. Based on time-domain characteristics, frequency-domain characteristics, time-frequency characteristics, and engineering coupling characteristics, determine whether a collision event exists at each impact point. Count the number of valid collision events and calculate the collision event frequency based on the results of the collision event determination. The conditions for determining whether a collision event exists include: For time-domain characteristics, when the impact waveform of the time-domain characteristics is sudden, non-periodic, and has a high amplitude, and the pulse width conforms to the physical time scale of mechanical collision, then it is determined that a collision event exists.

[0043] For frequency domain characteristics, when the impact energy in the frequency domain characteristics is concentrated in the mid-to-high frequency band and accompanied by the rotational speed octave sideband; and the interference signal is mostly low frequency or wideband continuous spectrum, then it is determined that there is a collision event.

[0044] Regarding time-frequency characteristics, if the interval between adjacent impacts conforms to the transverse vibration mode period of the tubular column and is not randomly distributed, then a collision event is determined to exist.

[0045] For engineering coupling characteristics, when the impact event is synchronized with changes in parameters such as drilling pressure, torque, and well inclination, and conforms to the laws of mechanics, it is determined that a rubbing event exists.

[0046] The steps involved in counting the number of valid collision events and calculating the frequency of collision events include: For each signal segment initially identified as a collision event, its confidence level is calculated. When calculating the confidence level score for the collision events that are determined to exist, a weighted scoring model can be used to integrate time domain features, frequency domain features, time-frequency features, and engineering coupling features to output the confidence level value of each collision event. The specific content of the confidence scoring through the weighted scoring model is existing technology and will not be elaborated here.

[0047] The determination of whether a collision event is valid is based on a confidence score, i.e., whether the confidence score is greater than or equal to a confidence threshold. If so, the collision event is a valid collision event; otherwise, the collision event is an invalid collision event. Preferably, the confidence threshold is 0.7 in this embodiment. In other embodiments, other confidence thresholds can be selected for determination.

[0048] The effective collision events are deduplicated and synchronized, and the number of effective collision events is counted based on the deduplication and synchronization results. Specifically, when performing the deduplication operation, based on the time interval and energy amplitude of the collision impact, multiple oscillation pulses generated by the same physical collision are merged, and only the event with the largest amplitude within the window is retained, while duplicate counts are eliminated.

[0049] During synchronization, the timestamps of valid rubbing events are aligned with the phase of the downhole rotation speed sensor. The shaft angle position corresponding to each event is calculated to distinguish between periodic rubbing with a fixed phase per revolution and random rubbing.

[0050] Output the number of rubbing events per unit time (times / second) and the number of rubbing events per unit revolution (times / revolution). Simultaneously calculate the mean and trend of rubbing event frequencies within the sliding window. The formula for calculating the rubbing time frequency is:

[0051] In the formula, The dynamic collision event frequency is used to represent the number of collision events per unit length. This is a wellbore curvature correction factor, used to correct for the effects of wellbore curvature on tubing vibration and rubbing. This refers to natural gas production (or drilling fluid discharge, depending on the specific operating conditions). This refers to the wellbore dip angle at the current depth or the direction of the build-up section. The outer diameter of the casing (or the diameter of the wellbore, determined based on the calculated contact object). This refers to the outer diameter of the tubing or the outer diameter of the drill string. This refers to the bottom hole flowing pressure or annular pressure. It is a sine function. It is a natural constant.

[0052] S203. Divide the oil and gas well feature vector into one or more time steps according to a preset time interval. The equivalent wear calculation sub-model calculates the cumulative equivalent wear based on the time step and the frequency of rubbing events, and constructs an equivalent wear time series based on the cumulative equivalent wear of each time step. Specifically, this includes the following steps: The oil and gas well feature vector is divided into one or more time steps according to a preset time interval. The cumulative equivalent wear is calculated by traversing one or more time steps. The single loop steps are executed as follows: Instantaneous wear rate is calculated based on multi-source monitoring data of oil and gas wells and the frequency of rubbing events at the current time step:

[0053] In the formula, For the first Instantaneous wear rate at each time step The wear coefficient of the material. For the first Frequency of collision events at each time step This refers to the length of the build-up section (or the contact length between the tubing and the wellbore / casing). The coefficient of friction, For the first Contact stress at each time step (normal contact pressure between the tubing and the wellbore / casing).

[0054] The wear increment at the current time step is calculated based on the instantaneous wear rate and the time step size:

[0055] In the formula, For the first The wear increment per time step, For time step.

[0056] The cumulative equivalent wear is updated based on the wear increment at the current time step, where the update formula for the cumulative equivalent wear is:

[0057] In the formula, For the first The cumulative equivalent wear amount per time step. For the first The cumulative equivalent wear amount per time step.

[0058] Considering the degradation of material properties after wear, the cumulative equivalent wear is calculated by introducing a nonlinear exponent, and the updated formula is as follows:

[0059] In the formula, For the first The cumulative equivalent wear amount per time step. For the first The cumulative equivalent wear amount per time step. For the first Frequency of dynamic collision events at each time step It is a very small constant. This represents the material fatigue index.

[0060] Determine whether the cumulative equivalent wear amount at the current time step is less than the failure threshold. If so, calculate the cumulative equivalent wear amount for the next time step; otherwise, construct an equivalent wear amount time series based on the cumulative equivalent wear amount at each time step.

[0061] Step S203 further includes calculating the remaining lifetime based on the equivalent wear time series and the failure threshold; specifically, the time corresponding to the equivalent wear is obtained, that is, the time when the accumulated equivalent wear first reaches the failure threshold, and the remaining lifetime is obtained by subtracting the time when the equivalent wear first reaches the failure threshold from the total calculation time.

[0062] S204, the maximum comprehensive stress calculation sub-model calculates the maximum comprehensive stress based on the oil and gas well characteristic vector and the equivalent wear time series; in calculating the maximum comprehensive stress, the maximum comprehensive stress is calculated by traversing each time step of the equivalent wear time series, and its single loop step is executed as follows: Based on the eigenvectors of oil and gas wells, a fluid-drill-pressure coupled stress term is constructed. Solving this term yields the fluid-drill-pressure coupled stress, where the expression for the fluid-drill-pressure coupled stress term is:

[0063] In the formula, For fluid-drill pressure coupling stress, The fluid-drill pressure coupling coefficient is... For the first Drilling fluid discharge at each time step For the first Drilling pressure at each time step, For the first The well inclination angle at each time step This is the outer diameter of the drill string.

[0064] The fluid-drill-pressure coupled stress term reflects the contact stress generated by the combined fluid thrust, drill pressure, and well inclination horizontal components, and is dominant in highly deviated wells.

[0065] Based on the eigenvectors of oil and gas wells and the time series of equivalent wear, a wear-gravity coupled stress term is constructed. Solving for this term yields the wear-gravity coupled stress, where the expression for the wear-gravity coupled stress term is:

[0066] In the formula, For wear-gravity coupled stress, The wear-gravity coupling coefficient. For the first The cumulative equivalent wear amount per time step.

[0067] The maximum combined stress is calculated based on the fluid-drill pressure coupled stress and the wear-gravity coupled stress. Specifically, the maximum combined stress is calculated by adding the fluid-drill pressure coupled stress and the wear-gravity coupled stress. The formula is as follows:

[0068] In the formula, For the first The maximum combined stress at each time step.

[0069] Determine whether the maximum comprehensive stress at the current time step is less than the allowable stress of the material. If so, calculate the maximum comprehensive stress at the next time step. Otherwise, construct a maximum comprehensive stress time series based on the maximum comprehensive stress at each time step, output a stress over-limit warning, and mark the current time step as a high-risk condition.

[0070] S205. Calculate the dynamic safety factor based on the oil and gas well characteristic vector, maximum comprehensive stress, and equivalent wear time series. Determine the safety level based on the dynamic safety factor and safety threshold. Specifically, iterate through each time step of the equivalent wear time series to calculate the dynamic safety factor. The single loop steps are as follows: Material intrinsic parameters are obtained based on the feature vector of oil and gas wells. These intrinsic parameters are the physical parameters of the materials used in oil and gas well components such as drill bits, tubing, wellbore, and casing, including the material yield strength and critical wear amount. The specific calculation steps for the material yield strength and critical wear amount are existing technologies and will not be elaborated here.

[0071] The stress safety factor for the current time step is calculated based on the ratio of the material's inherent parameters to the maximum combined stress at the current time step. The formula for calculating the stress safety factor is:

[0072] In the formula, As the stress safety factor, For the material's yield strength, For the first The maximum combined stress at each time step. The stress safety factor reflects the impact of stress level on safety margin; specifically, the greater the stress, the smaller the stress safety factor.

[0073] The wear attenuation factor for the current time step is calculated based on the ratio of the equivalent wear amount to the material's inherent parameters. The formula for calculating the wear attenuation factor is:

[0074] In the formula, For wear attenuation factor, For the first The cumulative equivalent wear amount per time step. This is the wear attenuation factor. The wear attenuation factor reflects the attenuation effect of wear on the safety margin. Specifically, the closer the wear is to the critical value, the closer the wear attenuation factor is to 0.

[0075] The dynamic safety factor for the current time step is calculated by multiplying the stress safety factor and the wear attenuation factor. The formula for calculating the dynamic safety factor is:

[0076] In the formula, For the first The dynamic safety factor for each time step.

[0077] The current safety level is determined based on the dynamic safety factor, safety threshold, and early warning threshold. The rules for determining the safety level are as follows: When the dynamic safety factor is greater than the safety threshold, the safety level of the current time step is a safe state. When the dynamic safety factor is less than or equal to the safety threshold and the dynamic safety factor is greater than the warning threshold, the safety level of the current time step is a warning state. When the dynamic safety factor is less than or equal to the warning threshold, the safety level of the current time step is a dangerous state.

[0078] Preferably, in this embodiment, the safety threshold is 1.5 and the warning threshold is 1.0; in other embodiments, other values ​​of the safety threshold and warning threshold can be selected according to the actual situation.

[0079] When training the safety level prediction model, multi-source monitoring sample data of oil and gas wells is constructed by collecting measured data of oil and gas wells, full-size test bench data and dynamic simulation data; the labels in the multi-source monitoring sample data of oil and gas wells include normal state, rubbing state and disturbance state.

[0080] The safety level prediction model is trained and optimized using the Adam optimizer based on multi-source monitoring sample data from oil and gas wells. The specific details of the synchronous Adam optimizer training and optimizing the model parameters are existing technologies and will not be elaborated here.

[0081] S3. Construct adaptive closed-loop control commands based on safety levels, regulate oil and gas wells according to the adaptive closed-loop control commands, and obtain multi-source monitoring data of oil and gas wells after regulation for iterative regulation of oil and gas wells.

[0082] When constructing adaptive closed-loop control commands, different control commands are constructed based on the safety level: Adjust production operation parameters according to safety level: When the safety condition is in a safe state, it means that the safety margin is too high, and the drilling pressure / displacement rate can be appropriately increased to improve the drilling speed. When the safety status is in the warning state, reduce the drilling pressure; When the safety level is dangerous, immediately reduce the drilling pressure and discharge rate to adjust the safety level to a safe state, and stop drilling if necessary.

[0083] After the adjustment is performed, the dynamic safety factor is recalculated in the next time step. If the dynamic safety factor still does not meet the standard, the above adjustment is repeated until the target is met.

[0084] When the safety level is hazardous, the adaptive closed-loop control command is to dynamically optimize the tubing design parameters; the steps of dynamic optimization of the tubing design parameters include: An equivalent wear time series curve is constructed based on the equivalent wear time series, the growth slope of the equivalent wear time series curve is calculated, and high wear well sections are identified based on the growth slope. Calculate the dynamic safety factor of the tubing design parameters for the high-wear section, and determine whether the dynamic safety factor of the tubing design parameters for the high-wear section is less than the target safety factor. If so, reduce the outer diameter of the tubing in the tubing design parameters to increase the annular space clearance of the tubing in the high-wear section. Preferably, in this embodiment, the target safety factor is 1.3-1.5, and more preferably, the target safety factor is 1.3.

[0085] Calculate the cumulative equivalent wear of the tubing design parameters for the high-wear section after the tubing outer diameter is reduced, and determine whether the cumulative equivalent wear is greater than the wear threshold. If so, optimize the tool length in the tubing design parameters or replace the wear-resistant material.

[0086] The calculation of the dynamic safety factor and the cumulative equivalent wear amount is the same as that in step S2, and will not be repeated here.

[0087] Step S3 also includes preventative maintenance, wherein the triggering mechanism for preventative maintenance specifically includes: B1. Obtain the equivalent wear amount and dynamic safety factor at the current time step; calculate the maintenance time window based on the equivalent wear amount and oil and gas well feature vector:

[0088]

[0089] In the formula, To maintain the time window, To estimate the remaining time before collision failure occurs, This represents the critical wear level. This represents the equivalent wear amount at the current time step. This represents the recent average wear rate. By calculating the maintenance time window, premature or delayed maintenance can be avoided.

[0090] B2. Within the maintenance time window, the maintenance level is determined based on the equivalent wear and safety level, specifically: When the equivalent wear amount is less than the warning wear amount and the safety level is safe, the maintenance level is no maintenance, and the action strategy is normal operation and periodic monitoring.

[0091] When the equivalent wear amount is greater than or equal to the warning wear amount, or the safety level is in the warning state, the maintenance level is warning maintenance, and the action strategy is to plan to carry out maintenance in the next well section or when pulling out of the well, and to assess the wear status. When the equivalent wear amount is greater than or equal to the dangerous wear amount, or the safety level is dangerous, the maintenance level is emergency maintenance, and the action strategy is to immediately pull out the drill string and replace the tools.

[0092] The warning wear amount is 0.7 times the critical wear amount of the material, and the dangerous wear amount is 0.9 times the critical wear amount of the material. The critical wear amount is the critical wear amount of the material's inherent parameters in the characteristic vector of the oil and gas well.

[0093] Step S3 also includes a feedback learning mechanism. Specifically, this mechanism collects real-time operational data after regulation, evaluates the regulation effect, and automatically optimizes model parameters and regulation rules. This achieves a closed-loop iteration of regulation, feedback, optimization, and re-regulation, improving the safety margin and operational efficiency of downhole tools and adapting to transient changes in downhole conditions (such as well inclination fluctuations, sudden changes in drilling pressure, and increased wear). The feedback learning mechanism is implemented across the entire adaptive regulation process, covering three main categories: model parameters, regulation rules, and trigger thresholds. It precisely corresponds to the core parameters of preceding rubbing events, equivalent wear, comprehensive stress, dynamic safety factor, and regulation strategy, as detailed below: The parameters of the safety level prediction model include: fluid-structure coupling coefficient, LSTM time-series calibration coefficient (dynamically corrected to adapt to fluid disturbances in different well sections); material wear coefficient, nonlinear cumulative index (dynamically updated with wear status to correct wear rate calculation deviations); wear-gravity coupling coefficient, wear-stress amplification coefficient (adapting to stress calculation accuracy under different well inclinations and drilling pressures); safety threshold, and critical wear amount.

[0094] Control strategy parameters include: optimized step size for drill string outer diameter and tool length (adapting to annular clearance requirements in different well sections); and early warning wear rate (initially 0.7). (Iterates with the actual lifespan of the tool) and maintenance time window coefficient (0.8~0.9, to optimize maintenance timing).

[0095] Control rules parameters include: priority of operation parameter adjustment (such as "priority adjustment of drilling pressure" or "priority adjustment of displacement", optimized according to feedback from different well sections); preventive maintenance triggering logic (supplementing multi-dimensional constraints, such as stress over-limit duration and wear rate growth trend, to avoid false triggering); and iterative rules for tubing optimization (such as parameter adjustment step size and optimization termination conditions to improve optimization efficiency).

[0096] The steps involved in feedback learning include: C1. Construct an assessment cycle, obtain the equivalent wear, maximum comprehensive stress, and dynamic safety factor for the current time step within the assessment cycle, and calculate the comprehensive assessment index. When constructing the assessment cycle, use a single well segment or fixed time window as the unit (e.g., every 2 hours, every 50m well depth) to ensure the assessment closely reflects changes in operating conditions and avoids frequent or delayed assessments. The formula for calculating the comprehensive assessment index is:

[0097] In the formula, For comprehensive evaluation indicators, To ensure the safety factor meets the standard, The average wear rate control rate, The stress over-limit rate, To maintain operational efficiency; The safety factor compliance rate is a core evaluation indicator, representing the percentage of time within the evaluation period where the dynamic safety factor is greater than or equal to the target safety factor. It reflects the effectiveness of the control strategy in ensuring tool safety. The formula for calculating the safety factor compliance rate is:

[0098] In the formula, To evaluate the total number of time steps within the period, where this time step is consistent with the time step in step S2, This is an indicator function. The value of the indicator function is 1 when the condition inside the parentheses is true, and 0 otherwise. For the first The dynamic safety factor at each time step. The target safety factor.

[0099] The average wear rate control rate is an auxiliary evaluation index used to assess the effect of regulation on inhibiting wear aggression. The formula for calculating the average wear rate control rate is:

[0100] In the formula, The average wear rate before adjustment. The adjusted average wear rate, where This indicates that the control is effective in suppressing wear aggravation, and the higher the value of the average wear rate control rate, the better the control is in suppressing wear aggravation.

[0101] The stress exceedance rate is an auxiliary evaluation index used to assess the control effect of regulation on the maximum comprehensive stress. Its calculation formula is:

[0102] In the formula, For the first The maximum combined stress at each time step Let be the allowable stress of the material, where The control effect of the time regulation on the maximum comprehensive stress is qualified, and the smaller the stress over-limit rate, the better the control effect on the maximum comprehensive stress.

[0103] The operation efficiency retention rate is a supplementary evaluation indicator used to assess the impact of regulation on drilling efficiency and to avoid excessive regulation that leads to efficiency decline. The formula for calculating the operation efficiency retention rate is:

[0104] In the formula, The mechanical speed before adjustment, The adjusted mechanical speed, where This indicates that the assessment of the impact of the control measures on drilling efficiency is satisfactory, balancing both safety and efficiency. The mechanical rotation speed before and after the control measures can be obtained from multi-source monitoring data of oil and gas wells.

[0105] C2. Determine the evaluation level based on comprehensive evaluation indicators, and trigger optimization based on the evaluation level: If the comprehensive evaluation index is greater than or equal to the threshold of the first evaluation index, parameter optimization will not be triggered, and the current parameters will be maintained. When the comprehensive evaluation index is less than the first evaluation index threshold and the comprehensive evaluation index is greater than or equal to the second evaluation index threshold, the control gain of the adaptive closed-loop control command is optimized. The specific steps for optimizing the control gain of the adaptive closed-loop control command include: When the safety factor compliance rate is within the acceptable range, but the coefficient of variation of the dynamic safety factor is greater than the safety factor fluctuation threshold, it indicates that the adjustment range of the adaptive closed-loop control command is unreasonable, and the adjustment gain of the adaptive closed-loop control command needs to be optimized. The acceptable range for the safety factor compliance rate is 75%-90%, and the safety factor fluctuation threshold is 0.1. The calculation steps for the coefficient of variation of the dynamic safety factor are existing technologies and will not be elaborated here. Optimizing the adjustment gain of the adaptive closed-loop control command specifically includes the following steps: Calculate the statistical characteristic values ​​of the dynamic safety factor within the current assessment period, where the statistical characteristic values ​​include the average safety factor, the maximum safety factor, and the minimum safety factor. The current drill pressure control gain is calculated based on the statistical characteristic value of the safety factor and the drill pressure control gain of the previous assessment period. The calculation formula is as follows:

[0106] In the formula, For the current drilling pressure control gain, This represents the drilling pressure control gain from the previous evaluation period. For the target safety factor, The average value of the safety factor. To maximize the safety factor, This represents the minimum safety factor.

[0107] The current displacement control gain is calculated based on the current drilling pressure control gain and the displacement control gain of the previous evaluation period. The formula is as follows:

[0108] In the formula, For the current displacement control gain, This is the displacement control gain from the previous evaluation period.

[0109] The dynamic safety factor is calculated based on the current drilling pressure control gain and the current displacement control gain, and the drilling pressure adjustment and displacement adjustment are calculated based on the dynamic safety factor after the control gain optimization. The calculation formula is as follows:

[0110] In the formula, This is the drilling pressure adjustment amount. For drilling pressure, For displacement adjustment amount, This refers to the drilling fluid discharge rate.

[0111] Based on the simulation control effect of drilling pressure adjustment and displacement adjustment, the optimized dynamic safety factor is calculated, and it is determined whether the optimized dynamic safety factor is less than or equal to the safety factor fluctuation threshold. If so, the optimization of the adaptive closed-loop control command control gain for the current evaluation cycle is completed; otherwise, the control gain of the adaptive closed-loop control command is iteratively optimized based on the optimized dynamic safety factor.

[0112] When the average wear rate control rate is less than the wear rate control rate threshold and the annular clearance is less than the gap threshold, the optimization step size of the tubing string design parameters needs to be optimized. The wear rate control rate threshold is 10%, the annular clearance is the difference between the casing outer diameter (or wellbore diameter, depending on the object being rubbed) and the tubing outer diameter (or drill string outer diameter), and the gap threshold is... In the formula It represents the minimum annular space gap.

[0113] The steps involved in optimizing the step size of the tubing design parameters include: Obtain the target wear rate, and calculate the optimization step size based on the target wear rate and the adjusted average wear rate; the formula for calculating the optimization step size is:

[0114] In the formula, To optimize step size, The target wear rate is defined as the number of wear items, which is set according to the tool's lifespan; preferably, in this embodiment, it is 0.002 mm / s. The average wear rate after adjustment.

[0115] The calculation of the tubing or drill string outer diameter is based on the optimized step size, ensuring that the annular clearance in the calculated tubing or drill string outer diameter is greater than or equal to the clearance threshold. The formula for calculating the tubing or drill string outer diameter based on the optimized step size is:

[0116] In the formula, The adjusted outer diameter of the tubing or drill string. The outer diameter of the tubing or drill string before adjustment.

[0117] The optimized average wear rate is calculated based on the adjusted tubing outer diameter or drill string outer diameter, and it is determined whether the difference between the optimized average wear rate and the target wear rate is less than the target threshold. If so, the optimization step size of the tubing design parameters for the current evaluation cycle is completed; otherwise, the optimization step size of the tubing design parameters is iteratively optimized based on the optimized average wear rate.

[0118] When the comprehensive evaluation index is less than the threshold of the second evaluation index, the parameters of the safety level prediction model and the control rules of the adaptive closed-loop control command are optimized.

[0119] The parameter optimization in the security level prediction model includes: Parameter optimization for the calculation of maximum combined stress, i.e., optimization of the fluid-structure coupling coefficient in the calculation of maximum combined stress, includes the following steps: When the stress over-limit rate is greater than the stress over-limit threshold, it indicates that the stress over-limit rate is too high, which means that there is a deviation in the calculation of the fluid-structure coupling coefficient, resulting in inaccurate stress prediction. At this time, it is necessary to optimize the fluid-structure coupling coefficient. In this embodiment, the stress over-limit threshold is 5%.

[0120] Obtain the measured stress and calculated stress within the evaluation period, and calculate the deviation ratio based on the measured stress and calculated stress; wherein the measured stress is the maximum comprehensive stress obtained by actual measurement of the oil and gas well, and the calculated stress is the maximum comprehensive stress calculated in step S2.

[0121] The optimized fluid-structure coupling coefficient is calculated based on the deviation ratio and the fluid-structure coupling coefficient before optimization. The formula for the optimized fluid-structure coupling coefficient is as follows:

[0122] In the formula, Let be the optimized fluid-structure coupling coefficient, where , The fluid-structure coupling coefficient before optimization. For actual stress measurement, To calculate the stress.

[0123] Calculate the optimized stress over-limit rate based on the optimized fluid-structure coupling coefficient, and determine whether the optimized stress over-limit rate is less than the stress over-limit threshold. If it is, the optimization of the fluid-structure coupling coefficient is completed; otherwise, iteratively optimize the fluid-structure coupling coefficient.

[0124] The optimization of parameters for equivalent wear calculation, i.e., optimization of the material wear coefficient in the equivalent wear calculation, includes the following steps: When the average wear rate control rate is less than or equal to the wear control threshold, it indicates that the wear rate after adjustment has not decreased or has even increased, suggesting that the material wear coefficient underestimates or overestimates the degree of wear. In this case, the material wear coefficient needs to be optimized. Specifically, in this embodiment, the wear control threshold is 0. In other embodiments, other wear control thresholds can also be selected.

[0125] Obtain the measured wear amount and calculated wear amount within the evaluation period, and calculate the wear correction coefficient based on the measured wear amount and calculated wear amount; wherein the measured wear amount is the equivalent wear amount obtained by actual measurement of the oil and gas well, and the calculated wear amount is the cumulative equivalent wear amount obtained by the calculation step in step S2.

[0126] The optimized material wear coefficient is calculated based on the wear correction coefficient and the material wear coefficient before optimization. The calculation formula is as follows:

[0127] In the formula, The optimized material wear coefficient is where , The material wear coefficient before optimization. To measure the actual wear amount, To calculate the amount of wear.

[0128] The optimized average wear rate control rate is calculated based on the optimized material wear coefficient. It is then determined whether the optimized material wear coefficient is greater than the wear control threshold. If so, the fluid-structure coupling coefficient is optimized; otherwise, the material wear coefficient is iteratively optimized.

[0129] The optimization of parameters for rubbing time frequency calculation, namely the optimization of the wellbore curvature correction coefficient in the rubbing time frequency calculation, includes the following steps: The measured and calculated frequencies of rubbing events within the evaluation period are obtained, and the deviation is predicted based on the rubbing event frequencies and calculated frequencies. The measured rubbing event frequencies are the rubbing event frequencies obtained by actual measurement of oil and gas wells, and the calculated rubbing event frequencies are the dynamic rubbing event frequencies obtained by the calculation step in step S2.

[0130] When the safety factor compliance rate is less than the safety compliance threshold and the frequency prediction deviation of the collision event is greater than the collision deviation threshold, the wellbore curvature correction coefficient is optimized; preferably, in this embodiment, the safety compliance threshold is 75% and the collision deviation threshold is 10%.

[0131] The optimized wellbore curvature correction coefficient is calculated based on the prediction deviation of the rubbing event frequency and the wellbore curvature correction coefficient before optimization. The calculation formula is as follows:

[0132] In the formula, This is the optimized wellbore curvature correction factor, where , The wellbore curvature correction factor before optimization. To measure the frequency of collision events, To calculate the frequency of collision events.

[0133] The optimized safety factor compliance rate is calculated based on the optimized wellbore curvature correction coefficient. It is then determined whether the optimized safety factor compliance rate is greater than or equal to the safety compliance threshold, and whether the predicted deviation of the frequency of rubbing events is less than or equal to the rubbing deviation threshold. If so, the optimization of the wellbore curvature correction coefficient is completed; otherwise, the wellbore curvature correction coefficient is iteratively optimized.

[0134] Optimization of security level determination parameters, namely, optimizing the security threshold for security level determination, includes the following steps: When the switching frequency of the dynamic safety factor between the warning and danger boundaries exceeds the frequency threshold, i.e., the frequency of the dynamic safety factor fluctuating between [1.0, 1.2] exceeds the frequency threshold, the safety threshold is optimized based on the distribution of historical safety thresholds to avoid the safety threshold from becoming overly sensitive. The calculation formula for the safety threshold optimization is as follows:

[0135] In the formula, The optimized security threshold is where , The average value of the dynamic safety factor within the evaluation period.

[0136] When optimizing the control rules for adaptive closed-loop control commands, the specific steps include: Logic optimization of preventive maintenance triggering mechanism: The system acquires the maintenance false trigger rate and missed trigger rate within the evaluation period. When the maintenance false trigger rate exceeds the false trigger threshold, or the missed trigger rate exceeds the missed trigger threshold, the logic of the preventive maintenance triggering mechanism is optimized. A maintenance false trigger rate exceeding the false trigger threshold indicates that, after preventive maintenance, the actual wear of the tool did not reach the warning threshold; a missed trigger rate exceeding the missed trigger threshold indicates that the tool is close to failure but preventive maintenance was not triggered. Specifically, in this embodiment, the false trigger threshold is 10%, and the missed trigger threshold is 5%.

[0137] The optimized preventative maintenance triggering mechanism logic is as follows: When the equivalent wear amount is greater than or equal to the warning wear amount, and the wear rate growth rate of the first preset time step is greater than or equal to the wear rate growth threshold, the maintenance level is warning maintenance; where the first preset time step is 3, and the wear rate growth threshold is 10%.

[0138] When the equivalent wear amount is greater than or equal to the dangerous wear amount, or the safety level is dangerous, and the decrease of the dynamic safety factor in the second preset time step is greater than or equal to the safety factor decrease threshold, the maintenance level is emergency maintenance; where the second preset time step is 2, and the safety factor decrease threshold is 0.05.

[0139] Production operation parameter adjustment priority optimization: When the efficiency retention rate is less than the efficiency retention threshold and the improvement rate of the safety factor compliance rate is less than the safety factor improvement threshold, the optimization of the production operation adjustment priority is triggered. Specifically, in this embodiment, the efficiency retention threshold is 85%.

[0140] The optimization rule for prioritizing production operation parameter adjustments is as follows: When the wellbore inclination angle at the build-up section or current well depth is greater than the inclination angle threshold, it indicates that the oil and gas well is a highly deviated well. In this case, the drilling pressure should be adjusted first. That is, when adjusting, the drilling pressure control gain is 0.15 and the displacement control gain is 0.1 to avoid the displacement adjustment affecting the wellbore cleanliness. When the wellbore inclination angle at the build-up section or current well depth is less than or equal to the inclination angle threshold, it indicates that the oil and gas well is a vertical well or a low-angle well. In this case, the displacement rate should be adjusted first. That is, the displacement rate control gain is 0.12 and the drilling pressure control gain is 0.1, so as to balance efficiency and safety.

[0141] C3. If the calculated comprehensive evaluation index after optimization is greater than or equal to the first evaluation index threshold, or if the improvement of the comprehensive evaluation index after continuous optimization for a preset number of iterations is less than or equal to the improvement threshold, then the model parameters and control rules are completed, and the optimized model parameters and control rules are solidified as the initial parameters for the next evaluation cycle. Simultaneously, the optimization process (changes in parameters and evaluation index before and after adjustment) is recorded for subsequent feedback learning. Otherwise, return to step C2 to continue optimizing the model parameters and control rules. The preset number of iterations is 3, and the improvement threshold is 2%.

[0142] Compared to traditional static empirical models that rely on empirical formulas and can only statically estimate contact risk, this solution extracts oil and gas well feature vectors using quantum computing and calculates dynamic parameters such as contact frequency, damage amount, and comprehensive stress in real time using a safety level prediction model with a classic hybrid computing architecture. This significantly improves the accuracy of contact risk calculation while enabling contact risk prediction response times down to the second level (compared to the traditional hourly level). This achieves advanced early warning of contact risk, transforming passive response into proactive prevention and control.

[0143] Furthermore, by establishing a preventative maintenance mechanism, planned maintenance can be scheduled when warning thresholds are reached, avoiding unplanned tripping due to sudden failures. Additionally, through adaptive parameter adjustments, the design of the tubing, including centralizer spacing and drill string outer diameter, can be dynamically optimized to reduce severe localized wear, extend tool life, and decrease well workover frequency.

[0144] Furthermore, timely feedback learning enables dynamic adjustment of the parameters of the safety level prediction model, the control rules of the adaptive closed-loop control command, or the control gain of the adaptive closed-loop control command during the control process. This achieves self-dynamic control of the safety level prediction model and the production control mechanism, ensuring that the specific prediction results and control results match the actual situation.

[0145] This invention also aims to provide an oil and gas well production control system based on rubbing risk, for implementing the oil and gas well production control method based on rubbing risk as described above, including: The multi-source monitoring module for oil and gas wells is used to acquire multi-source monitoring data of oil and gas wells and to extract features from the multi-source monitoring data of oil and gas wells to obtain feature vectors of oil and gas wells. The collision event frequency calculation module is used to predict the frequency of collision events based on the feature vectors of oil and gas wells. The cumulative equivalent wear calculation module is used to calculate the cumulative equivalent wear based on the frequency of collision events; The maximum comprehensive stress calculation module is used to calculate the maximum comprehensive stress based on the characteristic vector of oil and gas wells and the time series of equivalent wear. The safety level determination module is used to calculate the dynamic safety factor based on the oil and gas well characteristic vector, maximum comprehensive stress and equivalent wear time series, and determine the safety level based on the dynamic safety factor and safety threshold. An adaptive closed-loop control command construction module is used to construct adaptive closed-loop control commands based on safety levels and to regulate oil and gas wells according to the adaptive closed-loop control commands. The preventive maintenance module determines the maintenance level based on the equivalent wear and safety level, and outputs preventive maintenance action strategies based on the maintenance level. The feedback learning module is used to calculate the comprehensive evaluation index based on the equivalent wear amount, maximum comprehensive stress, and dynamic safety factor of the current time step; determine the evaluation level based on the comprehensive evaluation index; and trigger the optimization of the parameters of the safety level prediction model, the control rules of the adaptive closed-loop control command, or the control gain of the adaptive closed-loop control command based on the evaluation level.

[0146] The present invention also aims to provide an oil and gas well production control device based on rubbing risk, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above-described oil and gas well production control method based on rubbing risk.

[0147] The present invention also aims to provide a computer-readable storage medium containing a computer program, wherein the computer program is stored thereon, and when the computer program is executed by one or more processors, implements the steps of the above-described method for controlling oil and gas well production based on rubbing risk.

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

Claims

1. A method for controlling oil and gas well production based on rubbing risk, characterized in that, Includes the following steps: Acquire multi-source monitoring data of oil and gas wells, and extract features from the multi-source monitoring data of oil and gas wells to obtain oil and gas well feature vectors; Input the feature vector of the oil and gas well into the safety level prediction model, and the safety level prediction model will execute: The frequency of collision events is predicted based on the feature vectors of oil and gas wells; The feature vector of oil and gas wells is divided into more than one time step according to a preset time interval. The cumulative equivalent wear is calculated based on the time step and the frequency of rubbing events, and the equivalent wear time series is constructed based on the cumulative equivalent wear. Calculate the maximum comprehensive stress based on the characteristic vector of oil and gas wells and the time series of equivalent wear. The dynamic safety factor is calculated based on the time series of oil and gas well characteristic vectors, maximum comprehensive stress and equivalent wear, and the safety level is determined based on the dynamic safety factor and safety threshold. An adaptive closed-loop control command is constructed based on the safety level, and the oil and gas well is regulated according to the adaptive closed-loop control command.

2. The oil and gas well production control method based on rubbing risk according to claim 1, characterized in that, The step of extracting features from multi-source monitoring data of oil and gas wells to obtain oil and gas well feature vectors includes: Mapping multi-source monitoring data from oil and gas wells to quantum encoded states; The quantum-encoded state is subjected to quantum parallel filtering to obtain a noise-filtered quantum state; Quantum feature extraction is performed on the denoised filtered quantum state to obtain the feature-compressed quantum state; The characteristic vector of an oil and gas well is obtained by performing quantum measurement and decoding on the characteristic compressed quantum state.

3. The oil and gas well production control method based on rubbing risk according to claim 1, characterized in that, The step of predicting the frequency of rubbing events based on oil and gas well feature vectors includes: Feature extraction is performed on the feature vector of oil and gas wells to obtain time-domain features, frequency-domain features, time-frequency features, and engineering coupling features. The time-domain features are used to represent the distribution characteristics of shock waves in the time dimension of the oil and gas well feature vector. The frequency-domain features are used to represent the energy distribution characteristics of shock waves in the frequency dimension of the oil and gas well feature vector. The time-frequency features are used to represent the time-frequency block location and intensity characteristics of shock wave energy accumulation in the combined time and frequency dimension of the oil and gas well feature vector. The engineering coupling features represent the linkage relationship between downhole vibration response and real-time engineering operation parameters in the oil and gas well feature vector. Determine whether a collision event exists based on time-domain characteristics, frequency-domain characteristics, time-frequency characteristics, and engineering coupling characteristics; Calculate the confidence level for each collision event, and determine whether the confidence level is greater than or equal to the confidence level threshold. If so, the collision event is a valid collision event; otherwise, the collision event is an invalid collision event. Count the number of valid collision events and calculate the frequency of collision events.

4. The oil and gas well production control method based on rubbing risk according to claim 1, characterized in that, The equivalent wear calculation sub-model calculates the cumulative equivalent wear based on time steps and the frequency of rubbing events, and constructs an equivalent wear time series based on the cumulative equivalent wear. Instantaneous wear rate is calculated based on multi-source monitoring data of oil and gas wells and frequency of rubbing events at the current time step; The wear increment at the current time step is calculated based on the instantaneous wear rate and the time step. The cumulative equivalent wear is calculated based on the wear increment at the current time step and the cumulative equivalent wear at the previous time step. Determine whether the cumulative equivalent wear amount at the current time step is less than the failure threshold. If so, calculate the cumulative equivalent wear amount for the next time step; otherwise, construct an equivalent wear amount time series based on the cumulative equivalent wear amount at each time step.

5. The oil and gas well production control method based on rubbing risk according to claim 1, characterized in that, The steps for calculating the maximum comprehensive stress based on oil and gas well feature vectors and equivalent wear time series include: Based on the eigenvectors of oil and gas wells, a fluid-drill-pressure coupled stress term is constructed, and the fluid-drill-pressure coupled stress is obtained by solving the fluid-drill-pressure coupled stress term. Based on the characteristic vector of oil and gas wells and the time series of equivalent wear, a wear-gravity coupled stress term is constructed, and the wear-gravity coupled stress is obtained by solving the wear-gravity coupled stress term; The maximum combined stress is calculated by adding the fluid-drilling pressure coupled stress and the wear-gravity coupled stress.

6. The oil and gas well production control method based on rubbing risk according to claim 1, characterized in that, The steps for calculating the dynamic safety factor based on the oil and gas well characteristic vector, maximum comprehensive stress, and equivalent wear time series include: The inherent parameters of the material are obtained based on the feature vector of the oil and gas well, and the stress safety factor of the current time step is calculated based on the ratio of the inherent parameters of the material to the maximum comprehensive stress of the current time step. The wear attenuation factor for the current time step is calculated based on the ratio of the equivalent wear amount to the material's inherent parameters at the current time step. The dynamic safety factor for the current time step is calculated by multiplying the stress safety factor and the wear attenuation factor.

7. The oil and gas well production control method based on rubbing risk according to claim 1, characterized in that, The safety level determined based on the dynamic safety factor and safety threshold includes a safe state, a warning state, and a dangerous state. The adaptive closed-loop control command constructed based on the safety level includes: Adjust production operation parameters according to safety level: When the safety condition is safe, the drilling speed can be increased; When the safety status is in the warning state, the drilling pressure needs to be reduced; When the safety level is dangerous, immediately reduce the drilling pressure and reduce the discharge rate.

8. The oil and gas well production control method based on rubbing risk according to claim 7, characterized in that, Following the steps of regulating the oil and gas wells according to adaptive closed-loop control commands, preventative maintenance is also included, comprising the following steps: Obtain the equivalent wear amount and dynamic safety factor at the current time step; calculate the maintenance time window based on the equivalent wear amount and oil and gas well feature vectors; Within the maintenance time window, the maintenance level is determined based on the equivalent wear and safety level: When the equivalent wear amount is less than the warning wear amount and the safety level is safe, the maintenance level is no maintenance, and the action strategy is normal operation and regular monitoring. When the equivalent wear amount is greater than or equal to the warning wear amount, or the safety level is in the warning state, the maintenance level is warning maintenance, and the action strategy is to plan to carry out maintenance in the next well section or when pulling out of the well, and to assess the wear status. When the equivalent wear amount is greater than or equal to the dangerous wear amount, or the safety level is dangerous, the maintenance level is emergency maintenance, and the action strategy is to immediately pull out the drill string and replace the tools.

9. The oil and gas well production control method based on rubbing risk according to claim 7, characterized in that, After the step of regulating the oil and gas well according to the adaptive closed-loop control command, the method also includes feedback learning, which includes the following steps: Construct an assessment cycle, obtain the equivalent wear amount, maximum comprehensive stress, and dynamic safety factor at the current time step within the assessment cycle, and calculate the comprehensive assessment index; The evaluation level is determined based on comprehensive evaluation indicators, and optimization is triggered based on the evaluation level: If the comprehensive evaluation index is greater than or equal to the threshold of the first evaluation index, parameter optimization will not be triggered, and the current parameters will be maintained. When the comprehensive evaluation index is less than the first evaluation index threshold and the comprehensive evaluation index is greater than or equal to the second evaluation index threshold, the regulation gain of the adaptive closed-loop control command is optimized. When the comprehensive evaluation index is less than the threshold of the second evaluation index, the parameters of the safety level prediction model and the control rules of the adaptive closed-loop control command are optimized.

10. An oil and gas well production control system based on rubbing risk, used to implement the oil and gas well production control method based on rubbing risk as described in any one of claims 1-9, characterized in that, include: The multi-source monitoring module for oil and gas wells is used to acquire multi-source monitoring data of oil and gas wells and to extract features from the multi-source monitoring data of oil and gas wells to obtain feature vectors of oil and gas wells. The collision event frequency calculation module is used to predict the frequency of collision events based on the feature vectors of oil and gas wells. The cumulative equivalent wear calculation module is used to calculate the cumulative equivalent wear based on the frequency of collision events; The maximum comprehensive stress calculation module is used to calculate the maximum comprehensive stress based on the characteristic vector of oil and gas wells and the time series of equivalent wear. The safety level determination module is used to calculate the dynamic safety factor based on the oil and gas well characteristic vector, maximum comprehensive stress and equivalent wear time series, and determine the safety level based on the dynamic safety factor and safety threshold. An adaptive closed-loop control command construction module is used to construct adaptive closed-loop control commands based on safety levels and to regulate oil and gas wells according to the adaptive closed-loop control commands. The preventive maintenance module determines the maintenance level based on the equivalent wear and safety level, and outputs preventive maintenance action strategies based on the maintenance level. The feedback learning module is used to calculate the comprehensive evaluation index based on the equivalent wear amount, maximum comprehensive stress, and dynamic safety factor of the current time step; determine the evaluation level based on the comprehensive evaluation index; and trigger the optimization of the parameters of the safety level prediction model, the control rules of the adaptive closed-loop control command, or the control gain of the adaptive closed-loop control command based on the evaluation level.