An artificial intelligence-based oil downhole tubing lifting safety analysis method

By combining multi-source data acquisition, edge computing, and 5G slicing networks, a multi-task AI model cluster is deployed to perform safety analysis of downhole tubing lifting operations. This solves the safety risk problem of downhole tubing lifting operations in existing technologies and achieves efficient and accurate safety management and fault handling.

CN122169775APending Publication Date: 2026-06-09CHINA UNIV OF PETROLEUM (EAST CHINA)

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA UNIV OF PETROLEUM (EAST CHINA)
Filing Date
2026-03-04
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing technologies for oil well downhole tubing lifting operations suffer from problems such as low efficiency and accuracy of manual monitoring, crude data preprocessing, insufficient adaptability and generalization ability of AI models, insufficient real-time performance and reliability, privacy leakage and small sample adaptation challenges due to reliance on centralized data for model iteration, and insufficient ability to adapt to extreme downhole environments.

Method used

By combining multi-source data acquisition, edge computing, and 5G slicing networks, a multi-task AI model cluster is deployed to perform local intelligent analysis, identify operator violations and fatigue, detect key faults in oil pipelines and lifting systems, and transmit early warning information according to preset risk level priorities through the 5G slicing network, forming a complete closed-loop management process with ground-based collaborative response.

Benefits of technology

It achieves efficient and precise safety control of downhole tubing lifting and lowering, with low misjudgment rate, short response delay, adaptability to extreme downhole environments, high transmission reliability, strong anti-interference capability of data preprocessing, improved fault handling efficiency, compatibility with new and old well scenarios, and low deployment cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure SMS_2
    Figure SMS_2
  • Figure SMS_7
    Figure SMS_7
  • Figure SMS_11
    Figure SMS_11
Patent Text Reader

Abstract

The application discloses an oil downhole tubing lifting safety analysis method based on artificial intelligence, which comprises the following steps: S1) multi-source data acquisition; S2) local intelligent analysis; S3) abnormal grading transmission; and S4) ground cooperative response. According to the oil downhole tubing lifting safety analysis method based on artificial intelligence, the manual control can be replaced, the misjudgment rate is less than or equal to 2%, the response delay is less than or equal to 100 ms, the efficiency and accuracy are improved, multi-dimensional full coverage is achieved, the behaviors of the control personnel, the equipment state and the operation process are synchronously controlled, there is no control blind area, the downhole extreme environment is adapted, model quantization and edge calculation are combined, low-power equipment can perform local real-time reasoning, key early warning is preferentially pushed through 5G slicing grading transmission, the packet loss rate is less than or equal to 0.01%, transmission is reliable and low-delay, data preprocessing is refined, the anti-interference capability is high, and the abnormal feature distinction degree is improved to more than 45%; through a federal learning iteration model, data privacy is protected, and the accuracy rate in a small sample scene is still greater than or equal to 90%.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of downhole operation safety analysis technology, and in particular to an artificial intelligence-based method for analyzing the safety of oil well tubing lifting and lowering. Background Technology

[0002] The most fundamental value of petroleum is that it provides efficient energy. Fuel products obtained through refining and processing are the main power source for global transportation, industrial production, and residential heating, accounting for more than 70% of total petroleum consumption.

[0003] After undergoing chemical processes such as cracking and reforming, petroleum can be transformed into basic chemical raw materials, which in turn can be used to produce synthetic materials, fine chemicals, etc., covering almost all aspects of human life, including clothing, food, housing, and transportation. It is the cornerstone of modern chemical industry.

[0004] Therefore, oil extraction is crucial for human energy development and social progress. However, downhole tubing lifting operations involve a variety of safety risks, including blowouts, fires, falling objects, mechanical injuries, poisoning, and derrick collapses.

[0005] Considering the unique working conditions (high temperature, high pressure, high interference) and safety management requirements of downhole tubing jacking operations in oil wells, the existing technologies for tubing jacking safety still have the following problems:

[0006] Manual monitoring is the primary method, resulting in low efficiency and accuracy in control; data preprocessing is crude, and environmental interference leads to distorted feature extraction; AI model design is fragmented, resulting in insufficient adaptability and generalization ability; the architecture relies on the cloud, leading to insufficient real-time performance and reliability; model iteration depends on centralized data, which poses challenges such as privacy leaks and small sample adaptation; and the ability to adapt to extreme underground environments is insufficient.

[0007] Therefore, an artificial intelligence-based method for safety analysis of downhole tubing lifting in oil wells is proposed. Summary of the Invention

[0008] This application aims to at least partially solve one of the technical problems in the aforementioned technologies.

[0009] To achieve the above objectives, the first aspect of this application proposes an artificial intelligence-based method for safety analysis of downhole tubing lift in oil wells, comprising the following steps:

[0010] S1) Multi-source data acquisition: Through explosion-proof cameras, high-precision sensors and process recorders deployed downhole, video data of operator behavior, data of equipment operation sensors such as tubing tension, vibration and pressure, and time-series data of operation process such as lifting speed and pressure regulation are collected simultaneously.

[0011] S2) Local Intelligent Analysis: Deploy the multi-task AI model cluster processed by INT8 in the edge gateway adapted to the extreme downhole environment, and use the edge computing capability to realize the compliance identification of the operator's violation of operation and fatigue status, the detection of the operation anomaly of the tubing and hoisting system, and the standardization of the operation process steps in parallel.

[0012] S3) Anomaly-level transmission: Leveraging the high bandwidth and low latency characteristics of the 5G slicing network, early warning information and corresponding anomaly-related data are transmitted according to preset risk level priorities.

[0013] S4) Ground Coordinated Response: After receiving the early warning information in real time, the ground control center simultaneously pushes it to the on-site operation terminal and management personnel platform, forming a complete closed-loop control process of data collection, local intelligent analysis, hierarchical early warning transmission, and rapid ground response.

[0014] In addition, the artificial intelligence-based oil well tubing lift safety analysis method proposed in this application may also have the following additional technical features:

[0015] As a further description of the above technical solution:

[0016] In step S1), the preprocessing of the sensor data during equipment operation is specifically as follows:

[0017] First, an adaptive Kalman filter is used to reduce noise in the original sensor signal. Its state equation is defined as X(k)=AX(k-1)+BU(k)+W(k), and the observation equation is defined as Z(k)=HX(k)+V(k). The variance Q of the process noise W(k) is set to 0.01 and the variance R of the observation noise V(k) is set to 0.1 to filter out random interference caused by the high temperature and high pressure environment downhole.

[0018] The denoised signal is decomposed into multiple frequency bands by using a 4-layer wavelet packet transform, and the energy entropy of each frequency band is extracted as the core feature. The energy entropy calculation formula is E= -Σp_iln (p_i), which realizes the feature enhancement of abnormal equipment signals.

[0019] The processed continuous signal is time-series sliced ​​with a single slice length of 5s and a step size of 2s to form structured data that meets the input requirements of the AI ​​model.

[0020] As a further description of the above technical solution:

[0021] In step S2), the multi-task AI model cluster consists of three types of specifically designed models, including:

[0022] The personnel behavior recognition model is based on the YOLOv8-nano architecture, with the number of parameters controlled at 1.1M to adapt to edge computing power, and uses the CIoU loss function for training and optimization.

[0023] The equipment status monitoring model adopts a lightweight CNN+LSTM hybrid architecture, in which 3 CNN layers are responsible for extracting local features of sensor data, and 64-dimensional LSTM hidden layers are responsible for capturing temporal dependencies, combined with Focal Loss loss function, where α_t=0.25 and γ=2;

[0024] The operational process compliance judgment model is built based on a temporal LSTM network, with an input dimension of 10, two hidden layers, and a cross-entropy loss function.

[0025] As a further description of the above technical solution:

[0026] In step S2), INT8 quantization adopts a combination optimization scheme of PTQ and QAT. The weight quantization formula is w_int8=round(w_fp32 / scale+zero_point), the scale is calculated as (w_max-w_min) / 255, the zero_point value is 128, and the activation value adopts a symmetric quantization strategy (zero_point=0).

[0027] During the QAT training phase, the number of iterations was set to 50 rounds with a learning rate of 0.0001. The focus was on quantizing the model parameters corresponding to abnormal samples to compensate for the quantization accuracy. After quantization, the total number of model parameters was ≤3.5M, the single model inference time was ≤18ms, and the total latency of three models in parallel inference was ≤40ms.

[0028] As a further description of the above technical solution:

[0029] In step S3), the 5G slice network is a dedicated network slice with a bandwidth of ≥20MHz, which adopts a short-path transmission architecture of downhole edge gateway, oilfield 5G base station, edge cloud UPF node, and ground control center.

[0030] The edge cloud UPF nodes are deployed within a 3km radius of the oilfield operating area;

[0031] The transmission priority is divided into three levels according to the risk level. The first priority level corresponds to emergency scenarios such as major personnel violations and fatal equipment failures, with a transmission delay of ≤50ms.

[0032] Level 2 priority corresponds to routine scenarios such as minor personnel violations and minor equipment malfunctions, with a transmission latency of ≤100ms.

[0033] The third priority level is for minor scenarios such as non-standard operating procedures, with a transmission latency of ≤150ms. At the same time, a QoS guarantee mechanism with GBR bandwidth of ≥10Mbps is configured for each priority level.

[0034] As a further description of the above technical solution:

[0035] After the edge gateway identifies an anomaly through the AI ​​model, it will simultaneously perform local early warning and data caching operations, activate the built-in audible and visual early warning module, with the warning sound intensity between 85dB and 100dB and the light using high-frequency red flashing at a frequency of 2Hz to 5Hz. It will automatically cache anomaly-related data, including video clips lasting 10 seconds before and after the anomaly, and continuous sensor data for 1 minute during the anomaly period. The cached data will be retained for 72 hours. The generated early warning information will clearly include three core parameters: anomaly type, location of occurrence, and risk level. Upon receiving the information, the ground operation terminal will trigger an emergency shutdown command.

[0036] As a further description of the above technical solution:

[0037] It also includes model iteration optimization, collecting real abnormal data, and using the FedAvg algorithm of federated learning to update and optimize the AI ​​model. The number of clients participating in model parameter aggregation is ≥3, the number of model aggregation rounds is ≥10, and the model update formula is W_new=(1 / K)*ΣW_k, where K is the number of clients participating in aggregation and W_k is the model parameters trained locally on each client.

[0038] The model iteration cycle is set to 90 days / cycle. Through continuous iteration, the accuracy of anomaly identification is ensured to be stable at ≥97%, and the false positive rate is controlled at ≤2%.

[0039] As a further description of the above technical solution:

[0040] In step S4), the total latency of the closed-loop control process is ≤100ms, of which the latency of the multi-source data acquisition stage is ≤5ms, the latency of the data preprocessing stage is ≤10ms, the latency of the local model inference stage is ≤40ms, the latency of the 5G slice transmission stage is ≤45ms, and the latency of the ground receiving and processing stage is ≤10ms. This meets the stability requirements of a failure rate of ≤0.1% and an abnormal data transmission success rate of ≥99.99% for continuous 72-hour operation.

[0041] Advantages of this invention:

[0042] The AI-based oil well downhole tubing lifting safety analysis method of this application can replace manual control, with a false judgment rate of ≤2% and a response delay of ≤100ms, thus improving both efficiency and accuracy.

[0043] It provides multi-dimensional and comprehensive coverage, simultaneously managing personnel behavior, equipment status, and operating procedures, leaving no blind spots in management;

[0044] Adaptable to extreme downhole environments, model quantization + edge computing, enabling local real-time inference on low-computing-power devices;

[0045] Through 5G slicing and hierarchical transmission, key early warnings are pushed first, the packet loss rate is ≤0.01%, and the transmission is reliable and has low latency;

[0046] The data preprocessing is refined, the anti-interference ability is strong, and the anomaly feature discrimination is improved to more than 45%;

[0047] By using federated learning to iterate models, data privacy is protected, and the accuracy rate in small sample scenarios is still ≥90%.

[0048] Full-chain closed-loop management and control, integrating early warning, response, and traceability, improves fault handling efficiency by 80%;

[0049] It is compatible with both new and old well scenarios, requires no large-scale modification of existing equipment, and has low deployment costs and strong adaptability.

[0050] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Detailed Implementation

[0051] The embodiments of this application are described in detail below.

[0052] The artificial intelligence-based oil well downhole tubing lift safety analysis method of Embodiment 1 of this application may include the following steps:

[0053] 1) Multi-source data acquisition: Through explosion-proof cameras, high-precision sensors, and process recorders deployed downhole, video data of operator behavior, equipment operation sensor data such as tubing tension, vibration, and pressure, and time-series data of operation processes such as lifting speed and pressure regulation are simultaneously collected. This provides comprehensive data support for subsequent intelligent analysis. The preprocessing of equipment operation sensor data is as follows: To improve the accuracy of subsequent model recognition, adaptive Kalman filtering is first used to reduce noise in the original sensor signals. The state equation is defined as X(k)=AX(k-1)+BU The observation equation is defined as Z(k) = HX(k) + V(k). The variance Q of the process noise W(k) is set to 0.01, and the variance R of the observation noise V(k) is set to 0.1 to filter out random interference caused by the high temperature and high pressure environment downhole. The noise-reduced signal is decomposed into multiple frequency bands through 4-layer wavelet packet transform, and the energy entropy of each frequency band is extracted as the core feature. The energy entropy calculation formula is E = -Σp_iln(p_i), where p_i is the proportion of the energy of a single frequency band to the total energy of all frequency bands, thereby realizing the feature enhancement of abnormal equipment signals. The processed continuous signal is time-series sliced ​​according to a single slice length of 5s and a step size of 2s to form structured data that meets the input requirements of AI models.

[0054] 2) Local intelligent analysis: The multi-task AI model cluster, which has been quantized by INT8, is deployed in an edge gateway adapted to the extreme downhole environment. Through edge computing capabilities, it can realize the compliance identification of operators’ violations and fatigue status, the detection of operational anomalies of key faults in tubing and hoisting systems, and the standardization of operation process steps in parallel.

[0055] The multi-task AI model cluster consists of three types of specifically designed models: a personnel behavior recognition model, which is based on a simplified and optimized YOLOv8-nano architecture with a parameter count controlled at 1.1M to adapt to edge computing power and uses the CIoU loss function for training optimization. It is specifically used to accurately identify violations such as workers not wearing protective equipment or entering dangerous areas, as well as fatigue after continuous work; an equipment condition monitoring model, which adopts a lightweight CNN+LSTM hybrid architecture, where three CNN layers are responsible for extracting local features from sensor data, and 64-dimensional LSTM hidden layers are responsible for capturing temporal dependencies, using the Focal Loss loss function, where α_t=0.25 and γ=2, to solve the problem of imbalanced abnormal samples, and is used to detect faults such as microcracks in oil pipes, jamming, loose joints, and abnormal motor speed in lifting systems; and an operation procedure compliance judgment model, which is built on a temporal LSTM network with an input dimension of 10, including key parameters such as lifting speed and pressure changes, and a hidden layer of 2. The layer uses the cross-entropy loss function to specifically verify whether the processes such as lifting speed control, pressure adjustment gradient, and start-stop operation sequence during operation meet industry standards.

[0056] After the edge gateway identifies an anomaly through the AI ​​model, it will simultaneously perform local early warning and data caching operations, and activate the built-in audible and visual early warning module. The intensity of the warning sound is controlled between 85dB and 100dB, and the light uses high-frequency red flashing with a flashing frequency of 2Hz to 5Hz to quickly remind downhole workers to respond in a timely manner. It automatically caches anomaly-related data, including video clips 10 seconds before and after the anomaly occurs and continuous sensor data for 1 minute during the anomaly period. The cached data is retained for 72 hours to facilitate subsequent fault tracing and analysis. The generated early warning information will clearly include three core parameters: anomaly type, location of occurrence, and risk level. After receiving the information, the ground operation terminal supports one-click triggering of emergency shutdown commands to achieve rapid risk handling.

[0057] 3) Anomaly-level transmission: Utilizing the high bandwidth and low latency characteristics of the oilfield's 5G slicing network, early warning information and corresponding anomaly-related data are transmitted according to the preset risk level priority to ensure rapid reporting of critical risks.

[0058] To ensure low latency and high reliability in the transmission of early warning information, a dedicated 5G network slice with a bandwidth of ≥20MHz is allocated to this safety management system. A short-path transmission architecture is adopted, consisting of downhole edge gateways, oilfield 5G base stations, edge cloud UPF nodes, and the ground control center. The edge cloud UPF nodes are deployed within a 3km radius of the oilfield operating area to shorten data transmission distance. Transmission priority is divided into three levels based on risk level: Level 1 corresponds to emergency scenarios such as major personnel violations and fatal equipment failures, with a transmission latency of ≤50ms; Level 2 corresponds to routine scenarios such as general personnel violations and minor equipment anomalies, with a transmission latency of ≤100ms; and Level 3 corresponds to minor scenarios such as non-standard operating procedures, with a transmission latency of ≤150ms. A QoS guarantee mechanism with a GBR bandwidth of ≥10Mbps is configured for each priority level to prevent transmission latency exceeding the limit due to network congestion.

[0059] 4) Ground-based coordinated response: After receiving the early warning information in real time, the ground control center synchronously pushes it to the on-site operation terminal and management personnel platform, forming a complete closed-loop control process of data collection, local intelligent analysis, hierarchical early warning transmission and ground rapid response.

[0060] The total latency of the closed-loop control process is ≤100ms, the latency of the multi-source data acquisition stage is ≤5ms to ensure real-time data capture, the latency of the data preprocessing stage is ≤10ms to ensure feature extraction efficiency, the latency of the local model inference stage is ≤40ms to achieve rapid anomaly detection, the latency of the 5G slice transmission stage is ≤45ms to ensure timely reporting of early warnings, and the latency of the ground receiving and processing stage is ≤10ms to support rapid response decision-making. The system must meet the stability requirements of a failure rate of ≤0.1% and an abnormal data transmission success rate of ≥99.99% for continuous 72-hour operation to ensure the continuity and reliability of downhole operation safety management.

[0061] The above steps also include model iteration and optimization to continuously improve the system's adaptability and recognition accuracy to different well conditions. Based on real anomaly data collected during the actual operation of pilot wells, the AI ​​model is updated and optimized using the FedAvg algorithm of federated learning. The number of clients participating in model parameter aggregation is ≥3, the number of model aggregation rounds is ≥10, and the model update formula is W_new =(1 / K)*ΣW_k, where K is the number of clients participating in aggregation, and W_k is the model parameters trained locally on each client. The model iteration cycle is set to 90 days / time. Through continuous iteration, the system's anomaly recognition accuracy is ensured to be stable at ≥97%, and the misjudgment rate is controlled at ≤2%, meeting the safety management and control requirements of long-term oilfield operations.

[0062] To further illustrate this application, Example 2 is provided below:

[0063] Taking a northern oilfield as an example, one explosion-proof edge gateway is deployed at each wellhead (a total of 18 wells). It must strictly comply with the ExdIICT6 explosion-proof rating, with a temperature range of -40℃ to 120℃ and a pressure resistance of ≤150MPa, fully adapting to the extreme downhole environment. The gateway has a built-in Intel Celeron N5105 CPU and Xilinx Artix-7 FPGA heterogeneous computing unit, with a total computing power of ≥5TOPS. It supports Modbus TCP / IP and RS485 dual interfaces, and seamlessly connects with the oilfield's existing SCADA system, with a stable data transmission rate of 1.2Mbps.

[0064] An explosion-proof camera with a resolution of 1920×1080 and a frame rate of 30fps is used, increasing the effective night vision distance to 25m, solving the problem of visual recognition during nighttime operations. Tension sensors (with a range of 0~500kN and an accuracy of ±0.1%FS) are installed at the tubing hanger of each well, and vibration sensors (with a frequency response of 1Hz~1kHz) are installed at the wellhead device. The sensor sampling rate is uniformly set to 150Hz to ensure data acquisition accuracy.

[0065] An adaptive Kalman filter algorithm was used to denoise the sensor data. The variance of the process noise W(k) was set to Q=0.01 and the variance of the observation noise V(k) was set to R=0.1. Temperature drift and vibration interference were effectively filtered out, and the signal-to-noise ratio of the data was improved to 55dB. The denoised data was decomposed into multiple frequency bands by a four-layer wavelet packet transform to extract the energy entropy of each frequency band. The calculation formula was E= -Σp_i*ln (p_i), which improved the anomaly feature discrimination to 48%.

[0066] A multi-task AI model cluster with INT8 quantization was loaded, with the total number of parameters controlled at 3.2M. The personnel behavior recognition model was optimized based on the simplified version of YOLOv8-nano, and special training samples of violations in old well operation scenarios were added. The equipment status monitoring model adopted a lightweight CNN+LSTM architecture, and the imbalance of abnormal samples was solved by using the Focal Loss loss function (α_t=0.25, γ=2). After quantization, the inference time of a single model was 16ms, and the latency of parallel inference of three models was 38ms.

[0067] By jointly allocating a dedicated 20MHz bandwidth 5G slice to this block with the operator, and adopting a transmission architecture of downhole edge gateway - oilfield 5G base station - edge cloud UPF - ground control center, edge cloud UPF nodes are deployed within a 3km range of the work area to shorten the transmission path. The transmission priority is divided into three levels according to risk level: Level 1 (major personnel violation / fatal equipment failure) transmission delay ≤50ms, Level 2 (general personnel violation / minor equipment abnormality) ≤100ms, and Level 3 (non-standard process) ≤150ms. A QoS guarantee mechanism with 10Mbps GBR bandwidth is configured for Level 1 early warning. At the same time, to address the signal obstruction problem in the well, intelligent electromagnetic metasurfaces are deployed at key locations in the roadway to fill signal blind spots, achieving 100% 5G signal coverage.

[0068] The edge gateway has a built-in sound and light warning module with a sound intensity set to 95dB and a red high-frequency flashing light (frequency 3Hz). When an anomaly occurs, local warning and data caching are activated simultaneously. It automatically saves 10 seconds of video footage before and after the anomaly and 1 minute of continuous sensor data. The cache is retained for 72 hours. The ground control center builds a visual monitoring platform that is linked with the work team's mobile APP. The warning information clearly includes three core parameters: anomaly type, location of occurrence, and risk level. It supports one-click triggering of emergency shutdown commands.

[0069] The FedAvg algorithm of federated learning is used for model iterative optimization. Data from 5 well sites are aggregated and iterated once every 90 days. The model update formula is W_new = (1 / K)*ΣW_k (K=5). Feature weights are optimized for typical fault samples such as aging tubing and loose joints in old wells.

[0070] In the above scheme, for the preprocessing of personnel behavior video data, the pixel values ​​of video frames are mapped to the [0,1] interval to eliminate the impact of brightness differences on AI model training. The calculation formula is as follows: ,in

[0071]

[0072] The specific calculation process is as follows: Extract video frames captured by the explosion-proof camera (resolution 1920×1080, each frame contains 2,073,600 pixels), calculate the range of pixel values ​​in each frame (e.g., a pixel value of 50~220 for a certain frame), and substitute them into the formula for calculation:

[0073] Iterate through all pixels to complete the normalization and output standardized image data;

[0074] For operational process data preprocessing, the influence of dimensions in operational process data (such as lifting speed and pressure) is eliminated to improve model convergence speed. The calculation formula is as follows:

[0075] ;

[0076] ;

[0077] The specific calculation process is as follows: Collect 1000 data points of rise and fall velocity from a certain well (sampling interval 20ms, duration 20s), and calculate the mean:

[0078]

[0079] Calculate the standard deviation:

[0080]

[0081] Substitute into the formula to calculate:

[0082]

[0083] To reduce noise in data sensor equipment, filter out sensor noise caused by downhole temperature drift and vibration interference, and improve the data signal-to-noise ratio:

[0084] ;

[0085] in:

[0086] ;

[0087] The calculation process is as follows:

[0088]

[0089] For extracting abnormal equipment data, the frequency domain distribution complexity of sensor signals is quantified to enhance the feature differentiation between normal and abnormal signals. The formula is as follows:

[0090]

[0091] in:

[0092] ;

[0093] The calculation process is as follows: Filtered sensor data (5s slice length, 150Hz sampling, 750 data points in total) is taken, and 4-level wavelet packet decomposition is performed to obtain 16 frequency bands (frequency range 1Hz~1kHz). The energy of each frequency band is then calculated.

[0094] ;

[0095] Calculate total energy ;

[0096] Calculate the energy percentage ;

[0097] Substitute into the entropy formula to calculate: such as a normal signal Uniformly distributed, E≈2.7, a certain wear anomaly signal Concentrated in the high-frequency band, E≈1.3.

[0098] Optimize the bounding box regression accuracy of the target detection model to improve the accuracy of locating personnel violations (such as not wearing a helmet). The formula is as follows: ;

[0099]

[0100]

[0101] To address the imbalance between abnormal samples (30%) and normal samples (70%) and improve the recall rate of abnormal samples, the formula is as follows:

[0102]

[0103]

[0104] By aggregating model parameters from multiple well sites, the model's generalization ability can be improved without sharing sensitive data. The formula is as follows:

[0105]

[0106]

[0107]

[0108] The time consumption of the entire link from data acquisition to analysis, transmission, and response is quantified to ensure that real-time requirements are met. The formula is as follows:

[0109]

[0110]

[0111]

[0112] After implementing the above scheme, the accuracy rate of identifying faults such as loose oil pipe joints and corrosion cracks reached 97.8%, and the false judgment rate dropped to 1.7%. Compared with manual monitoring, the number of missed events was reduced by 95%, and the shutdown command was triggered in time, avoiding the risk of oil pipe breakage.

[0113] The end-to-end closed-loop latency is stable at 89ms, including 4ms for data acquisition, 9ms for preprocessing, 36ms for local inference, 32ms for 5G transmission, and 8ms for ground processing. Emergency faults can be detected and triggered to stop in just 89ms, which is 359 times faster than manual response.

[0114] The 5G slicing network has an average transmission latency of 42ms for the first-level early warning system, a packet loss rate of 0.008%, and an abnormal data transmission success rate of 99.992%, completely solving the problems of latency and congestion in traditional networks.

[0115] After federated learning iteration, the model's adaptation accuracy in old wells with different aging levels is ≥92%, requiring no separate training. The system's failure rate is only 0.08% after 72 hours of continuous operation. Under multiple extreme weather and temporary network outage scenarios, the edge gateway's local closed-loop function works normally without any management interruption.

[0116] The specific implementation results are shown in the table below:

[0117] Indicator Categories Specific indicators Before implementation (traditional model) After implementation (this technical solution) Magnitude of change / Improvement of effect Safety control precision Equipment anomaly identification accuracy 65.0% (Manpower + Traditional Equipment) 97.8% (AI + Multi-source Perception) An increase of 32.8 percentage points. Anomaly False Positive Rate 0.35 0.017 Decreased by 33.3 percentage points Omission rate of events (monthly average) Starting from 0.5 / month Starting from 0 / 6 months 100% Elimination Model cross-well adaptation accuracy (old wells) 68.0% (single model) ≥92.0% (Federated learning iterations) An increase of more than 24.0 percentage points. Response speed End-to-end closed-loop delay 21000ms (21 seconds) 89ms Speed ​​increased by 235 times Emergency Fault Response Time (Identification - Shutdown) 32 seconds 89ms Speed ​​increased by 359 times Transmission reliability Level 1 warning transmission delay 210ms 42ms Reduced by 80.0% Data packet loss rate 0.008 0.00008 Reduced by 99.0% Abnormal data transmission success rate 0.992 0.99992 An increase of 0.792 percentage points. Work efficiency Oil pipe lifting operation efficiency 28 roots / hour 42 roots / hour Increased by 50.0% Single well workover cycle Average 48 hours 40 hours on average Shortened by 16.7% Cost and Benefit Average daily manpower input of the work team 10 people 2 people Reduced by 80.0% Annual labor cost savings - 1.44 million yuan Direct cost savings Block annual oil production increase - 432 tons An average daily increase of 1.2 tons of oil Annual revenue increase (crude oil revenue) - ≥2.16 million yuan Significant overall benefits System stability Continuous 72-hour operation failure rate 0.05 0.0008 Reduced by 98.4% Management capabilities during network outages Complete loss Local closed-loop operation is normal Achieve emergency control without network access

[0118] In the description of this specification, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0119] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0120] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.

Claims

1. A safety analysis method for downhole tubing lifting in oil wells based on artificial intelligence, characterized in that, The analysis includes the following steps: S1) Multi-source data acquisition: Through explosion-proof cameras, high-precision sensors and process recorders deployed downhole, video data of operator behavior, data of equipment operation sensors such as tubing tension, vibration and pressure, and time-series data of operation process such as lifting speed and pressure regulation are collected simultaneously. S2) Local Intelligent Analysis: Deploy the multi-task AI model cluster processed by INT8 in the edge gateway adapted to the extreme downhole environment, and use the edge computing capability to realize the compliance identification of the operator's violation of operation and fatigue status, the detection of the operation anomaly of the tubing and hoisting system, and the standardization of the operation process steps in parallel. S3) Anomaly-level transmission: Leveraging the high bandwidth and low latency characteristics of the 5G slicing network, early warning information and corresponding anomaly-related data are transmitted according to preset risk level priorities. S4) Ground Coordinated Response: After receiving the early warning information in real time, the ground control center simultaneously pushes it to the on-site operation terminal and management personnel platform, forming a complete closed-loop control process of data collection, local intelligent analysis, hierarchical early warning transmission, and rapid ground response.

2. The method for safety analysis of oil well downhole tubing lifting based on artificial intelligence according to claim 1, characterized in that, In step S1), the preprocessing of the device operation sensor data is specifically as follows: First, an adaptive Kalman filter is used to reduce noise in the original sensor signal. Its state equation is defined as X(k)=AX(k-1)+BU(k)+W(k), and the observation equation is defined as Z(k)=HX(k)+V(k). The variance Q of the process noise W(k) is set to 0.01 and the variance R of the observation noise V(k) is set to 0.1 to filter out random interference caused by the high temperature and high pressure environment downhole. The denoised signal is decomposed into multiple frequency bands by using a 4-layer wavelet packet transform, and the energy entropy of each frequency band is extracted as the core feature. The energy entropy calculation formula is E= -Σp_iln (p_i), which realizes the feature enhancement of abnormal equipment signals. The processed continuous signal is time-series sliced ​​with a single slice length of 5s and a step size of 2s to form structured data that meets the input requirements of the AI ​​model.

3. The method for safety analysis of oil well downhole tubing lifting based on artificial intelligence according to claim 1, characterized in that, In step S2), the multi-task AI model cluster consists of three types of specifically designed models, including: The personnel behavior recognition model is based on the YOLOv8-nano architecture, with the number of parameters controlled at 1.1M to adapt to edge computing power, and uses the CIoU loss function for training and optimization. The equipment status monitoring model adopts a lightweight CNN+LSTM hybrid architecture, in which 3 CNN layers are responsible for extracting local features of sensor data, and 64-dimensional LSTM hidden layers are responsible for capturing temporal dependencies, combined with Focal Loss loss function, where α_t=0.25 and γ=2; The operational process compliance judgment model is built based on a temporal LSTM network, with an input dimension of 10, two hidden layers, and a cross-entropy loss function.

4. The method for safety analysis of oil well downhole tubing lifting based on artificial intelligence according to claim 1, characterized in that, In step S2), INT8 quantization adopts a combination optimization scheme of PTQ and QAT, where the weight quantization formula is w_int8=round(w_fp32 / scale+zero_point), the scale is calculated as (w_max-w_min) / 255, the zero_point value is 128, and the activation value adopts a symmetric quantization strategy (zero_point=0). During the QAT training phase, the number of iterations was set to 50 rounds with a learning rate of 0.0001. The focus was on quantizing the model parameters corresponding to abnormal samples to compensate for the quantization accuracy. After quantization, the total number of model parameters was ≤3.5M, the single model inference time was ≤18ms, and the total latency of three models in parallel inference was ≤40ms.

5. The method for safety analysis of oil well downhole tubing lifting based on artificial intelligence according to claim 1, characterized in that, In step S3), the 5G slice network is a dedicated network slice with a bandwidth of ≥20MHz, which adopts a short-path transmission architecture of downhole edge gateway, oilfield 5G base station, edge cloud UPF node, and ground control center. The edge cloud UPF nodes are deployed within a 3km radius of the oilfield operating area; The transmission priority is divided into three levels according to the risk level. The first priority level corresponds to emergency scenarios such as major personnel violations and fatal equipment failures, with a transmission delay of ≤50ms. Level 2 priority corresponds to routine scenarios such as minor personnel violations and minor equipment malfunctions, with a transmission latency of ≤100ms. The third priority level is for minor scenarios such as non-standard operating procedures, with a transmission latency of ≤150ms. At the same time, a QoS guarantee mechanism with GBR bandwidth of ≥10Mbps is configured for each priority level.

6. The method for safety analysis of oil well downhole tubing lifting based on artificial intelligence according to claim 1 or 5, characterized in that, After the edge gateway identifies an anomaly through the AI ​​model, it will simultaneously perform local early warning and data caching operations, activate the built-in audible and visual early warning module, where the warning sound intensity is between 85dB and 100dB, and the light uses high-frequency red flashing with a flashing frequency of 2Hz to 5Hz. It will automatically cache anomaly-related data, including video clips lasting 10 seconds before and after the anomaly, and continuous sensor data lasting 1 minute during the anomaly period. The cached data will be retained for 72 hours. The generated early warning information will clearly include three core parameters: anomaly type, location of occurrence, and risk level. Upon receiving the information, the ground operation terminal will trigger an emergency shutdown command.

7. The method for safety analysis of oil well downhole tubing lifting based on artificial intelligence according to claim 1, characterized in that, It also includes model iteration optimization, collecting real abnormal data, and using the FedAvg algorithm of federated learning to update and optimize the AI ​​model. The number of clients participating in model parameter aggregation is ≥3, the number of model aggregation rounds is ≥10, and the model update formula is W_new=(1 / K)*ΣW_k, where K is the number of clients participating in aggregation and W_k is the model parameters trained locally on each client. The model iteration cycle is set to 90 days / cycle. Through continuous iteration, the accuracy of anomaly identification is ensured to be stable at ≥97%, and the false positive rate is controlled at ≤2%.

8. The method for safety analysis of oil well downhole tubing lifting based on artificial intelligence according to claim 1, characterized in that, In step S4), the total latency of the closed-loop control process is ≤100ms, including a latency of ≤5ms for multi-source data acquisition, ≤10ms for data preprocessing, ≤40ms for local model inference, ≤45ms for 5G slice transmission, and ≤10ms for ground receiving and processing. This meets the stability requirements of a failure rate of ≤0.1% and an abnormal data transmission success rate of ≥99.99% for continuous 72-hour operation.