Shaft AI video intelligent inspection method and system

By using the AI ​​video intelligent inspection method for well shafts, and by analyzing the axial displacement of bolts using video acquisition equipment and random forest algorithm, the problem of monitoring minute bolt displacements in complex underground environments has been solved. This has enabled accurate monitoring and dynamic risk assessment of well shaft structures, improving inspection efficiency and safety.

CN121125940APending Publication Date: 2025-12-12徐州众图智控通信科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511300239.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-12
Publication Date
2025-12-12

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately monitor minute axial displacements of wellbore support ring connecting bolts in complex downhole environments, particularly failing to distinguish between normal wear and abnormal loosening, and making it difficult to combine dynamic monitoring with analysis.

Method used

The wellbore AI video intelligent inspection method uses video acquisition equipment to acquire real-time video, extracts the axial displacement of bolts, combines random forest algorithm to analyze dynamic change trends, identifies potential failure risk areas, and performs video resolution enhancement processing to generate inspection paths.

Benefits of technology

It enables precise monitoring and dynamic risk assessment of well shaft structures, significantly improving inspection efficiency and safety, and accurately identifying early bolt loosening conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121125940A_ABST
    Figure CN121125940A_ABST
Patent Text Reader

Abstract

The invention provides a shaft AI video intelligent inspection method and system, and the method comprises the steps: obtaining a real-time video of a shaft support ring connection structure in a preset time period, and extracting the axial displacement of a connection bolt from the real-time video; identifying a potential failure risk area of the connecting bolt by extracting a high deviation value and an abnormal trend in the potential failure risk; determining a focus area of the video acquisition equipment according to the potential failure risk area, performing video resolution enhancement processing on a focus area video, and determining displacement data of a bolt in the focus area; if the displacement data of the bolt in the focus area exceeds a preset displacement threshold value, it is judged that the thread gap is abnormally enlarged, and the early-stage connecting bolt loosening state after the strengthening loosening sign is determined according to the displacement data and the thread gap dynamic change value.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of information technology, and in particular to a wellbore AI video intelligent inspection method and system. BACKGROUND

[0002] The wellbore support ring connection structure plays a key role in ensuring the stability of the wellbore in deep well engineering, and its safety is directly related to the long-term operation of the project and personnel safety. The wellbore support ring is fixed on the well wall by connecting bolts and bears complex geological stress and environmental load. However, the contact surface between the well wall and the support ring may deform slightly due to long-term stress or geological changes, and this deformation can cause a slight axial displacement of the connecting bolts. Although this displacement is slight, it can cause the bolts to loosen, thereby threatening the stability of the entire wellbore structure. Therefore, accurately monitoring and identifying the early loosening state of the connecting bolts is a technical requirement that cannot be ignored in the safety management of deep well engineering. Existing detection methods mainly rely on manual inspection or traditional visual detection equipment. Manual inspection is limited by the complex environment in the well, is inefficient and easily affected by human factors, and is difficult to achieve continuous monitoring. Although traditional visual detection equipment can capture wellbore surface videos, it lacks the ability to detect slight deformation or bolt axial displacement, especially when slight loosening occurs on the well wall contact surface, conventional video analysis is difficult to accurately distinguish between normal wear and abnormal loosening. The slight change in bolt axial displacement is usually only a few tens of microns, which is far below the resolution limit of conventional visual detection, and the light, dust and vibration in the well environment can interfere with the video quality, making high-precision video analysis extremely difficult. More importantly, the dynamic changes of this slight displacement need to be compared with historical data in real time to determine whether it is beyond the normal range, and the existing technology is difficult to combine dynamic monitoring and analysis in a complex environment. Therefore, how to monitor the slight axial displacement of the connecting bolts in real time through high-precision video analysis technology in the complex environment of the well, and accurately distinguish between normal deformation and early loosening state, has become a key problem in intelligent inspection of deep well engineering. SUMMARY

[0003] The present application provides a wellbore AI video intelligent inspection method, mainly including: acquire real-time video of a wellbore support ring connection structure, extract an axial displacement of a connection bolt from the real-time video; compare the axial displacement with a preset historical baseline value to obtain a deviation value, determine a loosening sign according to the deviation value, and determine a preliminary loosening state index; acquire the axial displacement and the preliminary loosening state index in a target time period, input a random forest algorithm, output a dynamic change trend of the connection bolt, and analyze a potential failure risk according to the dynamic change trend; identify a potential failure risk area of the connection bolt by extracting the potential failure risk; determine a focal point area of a video acquisition device according to the potential failure risk area, perform resolution enhancement processing on a video of the focal point area, and determine displacement data of a bolt in the focal point area; determine an early connection bolt loosening state according to an abnormal expansion of a thread gap based on the displacement data; input the early connection bolt loosening state into the random forest algorithm, output position information of a high-risk connection bolt, generate a wellbore inspection intervention point based on the position information, and plan an inspection path based on the wellbore inspection intervention point.

[0004] Further, acquiring real-time video of a wellbore support ring connection structure, and extracting an axial displacement of a connection bolt from the real-time video, includes: acquiring real-time video of a wellbore support ring connection structure, performing frame rate standardization processing on the real-time video, extracting video frames from the standardized video, identifying a bolt outline in the video frames by edge detection, and locating a bolt head center point coordinate; extracting a thread area based on the bolt head center point coordinate, analyzing pixel distribution of a thread gap, and calculating a pixel distance between adjacent thread peaks as a thread gap change value; determining a bolt head offset based on a change in the bolt head center point coordinate between consecutive frames; and determining the axial displacement of the connection bolt based on the bolt head offset and the thread gap change value.

[0005] Further, comparing the axial displacement with a preset historical baseline value to obtain a deviation value, determining a loosening sign according to the deviation value, and determining a preliminary loosening state index, includes: acquiring a data sequence of the axial displacement of the bolt in a historical time period, calculating an average value and a standard deviation value of the data sequence, determining a historical baseline value; subtracting the historical baseline value from the axial displacement to obtain a deviation value; determining a loosening sign according to the deviation value, calculating a deviation amplitude, a loosening trend coefficient, and a displacement frequency, and determining a preliminary loosening state index.

[0006] Further, acquiring the axial displacement and the preliminary loosening state index in a target time period, inputting a random forest algorithm, outputting a dynamic change trend of the connection bolt, and analyzing a potential failure risk according to the dynamic change trend, includes: The axial displacement amount and the preliminary loosening state indicator in the target time period are acquired, and a feature vector including a displacement amount mean value, a variance, a peak value, a change rate, a deviation amplitude, a loosening trend coefficient, and a displacement frequency is constructed; the feature vector is input into a random forest algorithm, a dynamic change trend of the connecting bolt is output through voting of multiple decision trees; a change rate is calculated according to the dynamic change trend, and an accelerated loosening state, a stable loosening state, or a decelerated loosening state is identified; and a potential failure risk level is determined according to the change rate and the preliminary loosening state indicator.

[0007] Further, a potential failure risk area of the connecting bolt is identified by extracting the potential failure risk, including: A bolt position coordinate corresponding to a high deviation value is extracted from the potential failure risk, a deviation value change rate is calculated, and a risk feature vector is constructed; a center point and a boundary range of a risk aggregation area are determined through spatial clustering of the risk feature vector, and a potential failure risk area is identified.

[0008] Further, a focal point area of a video acquisition device is determined according to the potential failure risk area, a resolution enhancement process is performed on the video of the focal point area, and displacement data of the bolt in the focal point area are determined, including: A geometric center point is calculated according to the boundary coordinates of the potential failure risk area, the pan-tilt angle and the focal length of the video acquisition device are adjusted, the potential failure risk area is brought into the field of view, and focal point area video is acquired; the resolution of the focal point area video is enhanced, the bolt profile is identified, the bolt head coordinate change and the thread gap change are tracked, and the displacement data of the bolt in the focal point area are determined.

[0009] Further, according to the displacement data, it is determined that the thread gap abnormally expands, and an early connecting bolt loosening state is determined, including: The displacement data is compared with a preset displacement threshold value to determine whether the thread gap abnormally expands; the displacement data is used to calculate an over-limit proportion and a change amount, and the early connecting bolt loosening state is determined.

[0010] Further, the early connecting bolt loosening state is input into a random forest algorithm, and position information of a high-risk connecting bolt is output, an inspection intervention point of a wellbore is generated according to the position information, and an inspection path is planned through the inspection intervention point of the wellbore, including: The early connecting bolt loosening state is constructed as a feature vector, input into a random forest algorithm, and position information of a high-risk connecting bolt is output; the position information is used to mark a point, the distance between points is calculated, and the points are merged into an intervention area to generate an inspection intervention point of a wellbore; a connected graph is constructed through the inspection intervention point of the wellbore, a minimum spanning tree algorithm is used to generate an inspection path.

[0011] This invention provides an AI video intelligent inspection system for well shafts, mainly comprising: The video acquisition and displacement extraction module is used to acquire real-time video of the well support ring connection structure within a preset time period, and extract the axial displacement of the connecting bolts from the real-time video. The loosening sign determination module is used to compare the axial displacement of the bolt with the preset historical baseline value to obtain the deviation value of the axial displacement exceeding the preset historical baseline value. If there is a deviation between the axial displacement and the preset historical baseline value, it is determined that there is a loosening sign, and a preliminary loosening status index is determined based on the deviation value of the axial displacement exceeding the preset historical baseline value. The dynamic trend analysis module is used to obtain the axial displacement and preliminary loosening status indicators within the target time period, and input them into the random forest algorithm for analysis. The output is the dynamic change trend of the connecting bolts. Based on the preliminary loosening status indicators and the dynamic change trend of the connecting bolts, the potential failure risk of the connecting bolts is analyzed. The risk area identification module is used to identify potential failure risk areas of connecting bolts by extracting high deviation values ​​and abnormal trends in potential failure risks. The focus area enhancement module is used to determine the focus area of ​​the video acquisition device based on the potential failure risk area, perform video resolution enhancement processing on the video in the focus area, and determine the displacement data of the bolts in the focus area. The early loosening state determination module is used to determine the early loosening state of the connecting bolts after the signs of loosening are reinforced if the displacement data of the bolts in the focal area exceeds the preset displacement threshold. The inspection path planning module is used to input the early loosening status of the connecting bolts after reinforcement of loosening signs into the random forest algorithm for analysis, output the location information of high-risk connecting bolts, generate well shaft inspection intervention points based on the location information of high-risk connecting bolts, and plan the inspection path based on the well shaft inspection intervention points.

[0012] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects: This invention discloses an AI-powered video intelligent inspection method and system for wellbore structures. Addressing the potential failure risk caused by bolt loosening in the long-term operation of wellbore support ring connection structures, the method acquires real-time video using video acquisition equipment, extracts the axial displacement of the bolts, compares it with historical baseline values, identifies signs of loosening, and generates preliminary loosening status indicators. A random forest algorithm is used to analyze the displacement data and indicators, outputting the dynamic change trend of the bolts, identifying high-risk areas, and optimizing the resolution of the video focus area to accurately extract bolt displacement data. If the displacement data exceeds a threshold, it is determined that the thread gap has abnormally widened, further confirming the early loosening state. The random forest algorithm then outputs the locations of high-risk bolts, generating inspection intervention points and planning paths. This invention, through the deep integration of video analysis and machine learning, achieves accurate monitoring and dynamic risk assessment of bolt loosening status, significantly improving the safety of wellbore structures and inspection efficiency. Attached Figure Description

[0013] Fig. 1 This is a flowchart of the wellbore AI video intelligent inspection method of the present invention.

[0014] Fig. 2 This is a structural schematic diagram of an AI video intelligent inspection system for well shafts according to the present invention. Detailed Implementation

[0015] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.

[0016] like Figs. 1-2 The wellbore AI video intelligent inspection method and system of this embodiment may specifically include: S101. Obtain real-time video of the wellbore support ring connection structure within a preset time period, and extract the axial displacement of the connecting bolts from the real-time video.

[0017] Real-time video streams of the well support ring connection structure are acquired at preset time intervals using video acquisition equipment inside the well shaft. The video stream is standardized to 25 frames per second. Keyframes are uniformly extracted from the standardized video, and edge detection is used to identify the bolt contours in the keyframes. The bolt head position is located using circular feature detection, and a coordinate system for the bolt head center point is established. For the bolt head center point coordinate system, image segmentation technology is used to extract the thread region. The pixel distribution of the thread gap is analyzed using grayscale histogram, and the pixel distance between adjacent thread peaks is calculated as the thread gap reference value. The coordinate changes of the bolt head center point between consecutive frames are compared to obtain the pixel value of the bolt head offset. Based on the pixel value of the bolt head offset and the pre-acquired pixel physical conversion ratio, the actual axial displacement value of the bolt is calculated. If the axial displacement value exceeds a preset displacement threshold, it is determined to be an abnormal displacement state. The displacement values ​​of consecutive frames are smoothed using a moving average method to obtain the bolt axial displacement time series. By analyzing the changing trend of the bolt axial displacement time series, the gap change rate is calculated from the thread gap pixel distribution. Combined with the bolt head offset and the dynamic change value of the thread gap, the axial displacement of the connecting bolt is determined.

[0018] For example, in one embodiment, a video monitoring system for the wellbore support ring connection structure is deployed in an area with a well depth of 500 to 1500 meters, where significant geostress and temperature variations occur. The video acquisition equipment uses an industrial camera encased in an explosion-proof housing, equipped with an infrared supplemental light to adapt to the low-light environment downhole. The camera is aimed at a fixed angle at the connection point between the support ring and the well wall, ensuring the entire bolt assembly is within the field of view.

[0019] Specifically, the frame rate normalization of the video stream is achieved through a frame interpolation algorithm. When the original video frame rate is below 25 frames per second, motion compensation interpolation is used to generate intermediate frames; when the frame rate is above 25 frames per second, uniform frame extraction is performed. Keyframe extraction is performed at a frequency of one frame every five frames to avoid computational burden caused by oversampling. Edge detection uses a combination of the Sobel operator and morphological operations. First, the gradient image is obtained through the Sobel operator, then noise is removed using opening operations, and broken edges are filled using closing operations, thereby obtaining a complete bolt outline.

[0020] It should be noted that establishing the coordinate system for the bolt head center point involves several key steps. When identifying bolt heads using circular feature detection, the system first searches for closed curves in the contour image and calculates the roundness index of each curve. The roundness index is determined by the ratio of the curve's circumference to the circumference of a circle of equal area. When the roundness index is close to 1, it is identified as a candidate region for the bolt head. Least-squares circle fitting is performed on the candidate region to obtain the center coordinates of the circle, which are then used as the bolt head center point. A local coordinate system is established with the first detected bolt center point as the origin, the horizontal direction as the X-axis, and the vertical direction as the Y-axis.

[0021] In one possible implementation, image segmentation of the threaded region is based on the coordinate system for localization. Using the center point of the bolt head as a reference, a preset pixel distance is extended downwards to define the region of interest (ROI) of the threaded region. During grayscale histogram analysis, the system converts the threaded region image into a grayscale image and statistically analyzes the pixel distribution at each grayscale level. Thread peaks correspond to local maxima in the histogram, and thread gaps correspond to local minima. By finding consecutive maxima points, the positions of adjacent thread peaks are determined, and the pixel distance between peaks is calculated. Under normal conditions, the pixel distance of the thread gap remains relatively stable; when the bolt loosens, the gap gradually increases. The thread gap value in each frame is recorded to form time-series data, and the rate of change of the gap is detected through differential operations. When the rate of change of the gap exceeds a preset threshold for multiple consecutive frames, it is determined that there is abnormal expansion in the threaded region. This pixel-level analysis method can detect sub-millimeter-level gap changes, providing a quantitative basis for early loosening identification.

[0022] Preferably, the pixel physical conversion ratio is obtained through a calibration plate. During initial installation, a calibration plate of known size is placed on the plane where the bolts are located. The calibration plate contains precisely spaced circular markers. The pixel coordinates of the markers are identified through image processing, and the conversion relationship between pixels and millimeters is calculated by combining this with the known physical distance. Considering the differences in imaging conditions at different depths of the wellbore, the system stores independent conversion ratio parameters for each monitoring point.

[0023] For example, when processing axial displacement values ​​using the moving average method, a window width of 5 frames is used. The displacement values ​​within the window are weighted and averaged, with the center frame having a weight of 0.4, adjacent frames having a weight of 0.2, and edge frames having a weight of 0.1. This weighting method preserves the trend characteristics of displacement changes while effectively suppressing the interference of random noise. The smoothed displacement values ​​form a time series, where each data point corresponds to the bolt displacement state at a specific moment.

[0024] For example, when analyzing the trend of axial displacement time series, the first-order difference is used to calculate the displacement velocity, and the second-order difference is used to calculate the displacement acceleration. When the displacement velocity is consistently positive and the acceleration gradually increases, it indicates that the bolt loosening process is intensifying. The gap change rate is calculated based on the statistical characteristics of the thread gap pixel distribution, obtained by calculating the mean difference of the gap distribution between adjacent time points.

[0025] Understandably, the final axial displacement incorporates information from multiple measurement dimensions. Bolt head offset reflects the overall spatial displacement of the bolt, while the dynamic change in thread clearance reflects the evolution of the bolt-nut mating state. A weighted fusion algorithm is used to integrate these two types of data, with the bolt head offset weighted at 0.6 and the thread clearance change weighted at 0.4, to obtain a comprehensive axial displacement assessment.

[0026] S102. Compare the axial displacement of the bolt with the preset historical baseline value to obtain the deviation value of the axial displacement exceeding the preset historical baseline value. If there is a deviation between the axial displacement and the preset historical baseline value, it is determined that there are signs of loosening, and the preliminary loosening status index is determined based on the deviation value of the axial displacement exceeding the preset historical baseline value.

[0027] A sequence of axial displacement data of bolts within a preset historical time period is acquired. The arithmetic mean and standard deviation of the data sequence are calculated. The weighted sum of the mean and standard deviation is used as a preset historical baseline value. The preset historical baseline value is subtracted from the currently collected axial displacement to obtain the deviation value. If the deviation value is greater than zero, it is determined that there are signs of loosening. The percentage of deviation amplitude is obtained by dividing the deviation value by the historical baseline value. The deviation value sequence within the preset time window is fitted using the least squares method, and the slope of the fitted line is used as the loosening trend coefficient. The direction of loosening development is determined based on the sign of the loosening trend coefficient. The displacement frequency is obtained by statistically analyzing the ratio of the number of times the axial displacement exceeds the baseline value per unit time to the total number of samples. Combining the three dimensions of data—the amplitude of the deviation value, the loosening trend coefficient, and the displacement frequency—a preliminary loosening status index is determined.

[0028] For example, in one implementation, the preset historical time period is set to 720 hours of continuous monitoring, covering the complete variation cycle of the wellbore support ring under different geostress conditions. The historical data sequence contains axial displacement values ​​collected once per hour, forming a time series of 720 data points. The arithmetic mean is obtained by summing all historical displacement values ​​and dividing by the total number of data points, and the standard deviation is calculated using the Bessel correction formula to reflect the dispersion of the data.

[0029] Specifically, the weighted sum of preset historical baseline values ​​is calculated using the average value plus twice the standard deviation. This value represents the upper limit threshold of axial displacement under normal operating conditions. When the real-time axial displacement is subtracted from the baseline value to obtain a positive deviation, it indicates that the bolt displacement has exceeded the normal fluctuation range. The percentage deviation is obtained by multiplying the ratio of the deviation value to the baseline value by 100, intuitively reflecting the relative magnitude of the deviation.

[0030] It should be noted that the least squares fitting process is performed on a continuous sequence of deviation values ​​within a preset time window. The time window is set to 168 hours, containing 168 deviation value data points. A linear relationship equation between the time sequence and the deviation value is constructed, and the regression coefficient is solved by minimizing the sum of squared residuals. The slope of the fitted line is the loosening trend coefficient; a positive slope indicates that the loosening is gradually intensifying, while a negative slope indicates that the loosening state is stabilizing. The absolute value of the slope reflects the rate of change. This coefficient quantifies the development trend of bolt loosening, providing data support for predicting future loosening risks.

[0031] Preferably, the statistical period for the displacement frequency is set to 24 hours, during which the axial displacement of each sample is compared with the baseline value. When a sampled value exceeds the baseline value, it is recorded as an over-limit event. The cumulative number of over-limit events divided by the total number of samples yields the displacement frequency. This frequency value is between 0 and 1, reflecting the probability of abnormal bolt displacement.

[0032] In one possible implementation, the initial loosening status index is constructed using normalized three-dimensional data. The deviation amplitude is used directly as a percentage, the loosening trend coefficient is mapped to the -1 to 1 range using a tangent function, and the displacement frequency retains its original ratio. The three dimensions are assigned weights of 0.4, 0.3, and 0.3 respectively, and a weighted sum is obtained to obtain a comprehensive score. When the comprehensive score exceeds 0.5, the bolt is determined to be in an initial loosening state, requiring increased monitoring frequency.

[0033] S103. Obtain the axial displacement and preliminary loosening status indicators within the target time period, and input them into the random forest algorithm for analysis. Output the dynamic change trend of the connecting bolts, and analyze the potential failure risk of the connecting bolts based on the preliminary loosening status indicators and the dynamic change trend of the connecting bolts.

[0034] A time-series dataset is generated by acquiring continuously collected axial displacement sequences and corresponding preliminary loosening status indicators within a target time period. These sequences are arranged chronologically to form a time-series dataset. The mean, variance, peak value, and rate of change of the displacement are extracted as basic features. These features are combined with the deviation amplitude, loosening trend coefficient, and displacement frequency from the preliminary loosening status indicators to construct a seven-dimensional feature vector. This seven-dimensional feature vector is then trained using a random forest algorithm containing multiple decision trees. Each decision tree independently judges a subset of features, and the prediction results from each decision tree are aggregated through a voting mechanism to output the displacement change trend curve of the bolt within a future time window. The first derivative of the displacement change trend curve is calculated to obtain the rate of change. If the rate of change continuously increases, it is identified as an accelerating loosening state; if the rate of change remains constant, it is identified as a stable loosening state; and if the rate of change gradually decreases, it is identified as a decelerating loosening state. When an accelerating loosening state is identified, a high failure risk is determined. The risk coefficient is obtained by multiplying the rate of change of the accelerating loosening state by the current value of the preliminary loosening status indicator. The risk level is determined based on the preset interval in which the risk coefficient falls, and the potential failure risk level of the connecting bolt is output.

[0035] For example, in one implementation, the target time period is set as a continuous 7-day monitoring cycle, covering the complete change process of the wellbore support ring under different working conditions. The axial displacement sequence is acquired at a frequency of once per hour, forming a time series of 168 data points. Preliminary loosening status indicators are recorded synchronously with the displacement data, including values ​​for three dimensions: deviation amplitude, loosening trend coefficient, and displacement frequency.

[0036] Specifically, the construction of the seven-dimensional feature vector involves the calculation of multiple statistics. The mean is obtained by summing all displacement data points and dividing by the total number of data points, reflecting the average level of displacement. The variance is calculated using a standard statistical formula to measure the dispersion of the displacement data. The peak value is determined by finding the maximum value through traversing the time series, representing the limit displacement during the monitoring period. The rate of change is calculated by dividing the difference in displacement between adjacent time points by the time interval, reflecting the dynamic characteristics of the displacement. These four basic features, together with the three dimensions of the preliminary loosening state index, constitute the feature vector. Each feature is normalized and mapped to the interval between 0 and 1.

[0037] It should be noted that the Random Forest algorithm implementation comprises 100 decision trees, each constructed using a different subset of features and training samples. The feature subset is formed by randomly selecting five features from a seven-dimensional feature set, and the training samples are obtained through sampling with replacement. Each decision tree is trained independently without pruning during its growth, until the number of samples in a leaf node falls below a preset threshold or the maximum depth is reached. In the prediction phase, each decision tree outputs a displacement trend value, and the final trend curve is obtained by calculating the average of the outputs from all decision trees. This ensemble learning method effectively reduces the overfitting risk of a single decision tree and improves the stability and accuracy of predictions.

[0038] Preferably, the displacement trend curve is smoothed using a piecewise linear interpolation method to eliminate local noise interference. Each point on the curve represents the predicted displacement value at a future time, with the time span covering the next 72 hours.

[0039] In one possible implementation, the identification of the loosening state is based on the mathematical characteristics of the trend curve. The first derivative of the trend curve is calculated using numerical differentiation to obtain the rate of change at each time step. When the rate of change shows an increasing trend for 12 consecutive time steps, it is determined to be an accelerating loosening state, indicating that the bolt loosening is rapidly deteriorating. When the rate of change fluctuates within a preset range, and the fluctuation amplitude does not exceed 10% of the average, it is identified as a stable loosening state, indicating that the loosening process is in a relatively balanced stage. When the rate of change shows a decreasing trend and the decrease exceeds 30% of the initial rate, it is determined to be a decelerating loosening state, possibly due to stress redistribution causing the loosening to slow down.

[0040] For example, the determination of accelerated loosening also needs to be verified by combining the second derivative of the rate of change. When both the first and second derivatives are positive, the bolt is confirmed to be in an accelerated deterioration stage. At this time, the system automatically increases the monitoring frequency from once per hour to once every 15 minutes to closely track the development of loosening. The bolt's load-bearing capacity decreases sharply under accelerated loosening conditions, indicating a potential risk of structural failure.

[0041] For example, the risk coefficient is calculated by multiplying the rate of change by the current value of the preliminary loosening status indicator. The rate of change reflects the speed of loosening development, while the preliminary loosening status indicator represents the current degree of loosening. Multiplying the two yields the comprehensive risk assessment value. The risk coefficient is divided into four intervals: less than 0.3 indicates low risk, 0.3 to 0.5 indicates medium risk, 0.5 to 0.7 indicates high risk, and greater than 0.7 indicates extremely high risk.

[0042] Understandably, the risk level determination also considers the position of the bolts within the support ring. Bolts in critical load-bearing locations are assigned a weighting factor of 1.2, while those in less critical locations are assigned a weighting factor of 0.8. The risk level is determined using a weighted risk factor, and the output includes a risk level identifier and recommended maintenance measures. Furthermore, the subsequent monitoring strategy is automatically adjusted based on the risk level. Low-risk bolts maintain a regular monitoring frequency, medium-risk bolts have their monitoring frequency doubled, high-risk bolts are continuously monitored and early warning information is generated, and extremely high-risk bolts immediately trigger an alarm and recommend shutdown for maintenance.

[0043] S104. Identify potential failure risk areas for connecting bolts by extracting high deviation values ​​and abnormal trends in potential failure risks.

[0044] Bolt location coordinates with deviation values ​​exceeding a preset threshold are extracted from potential failure risk data. The rate of change of deviation value for each bolt location is calculated as a trend feature, and a risk feature vector is constructed based on the magnitude of the deviation value and the trend feature. The risk feature vector is spatially clustered using the K-means clustering algorithm. The center point and boundary range of the risk clustering region are determined based on the Euclidean distance between bolts and the cosine similarity of the risk feature vector. The risk region outline is delineated using the center point and boundary range, and the ratio of the number of bolts within the region to the total number of bolts is statistically analyzed to identify potential failure risk areas for the connecting bolts.

[0045] For example, in one implementation, the potential failure risk data includes risk assessment values ​​and spatial location information for all monitored bolts within the wellbore. The deviation value is calculated as the difference between the current risk value and the historical average risk value, with a preset threshold set at 1.5 times the historical average. When the deviation value of a bolt exceeds this threshold, the three-dimensional spatial coordinates of that bolt are recorded, including wellbore depth, circumferential angle, and radial position.

[0046] Specifically, the trend characteristics are calculated based on a sequence of deviation values ​​over five consecutive monitoring periods. A curve representing the change in deviation values ​​over time is fitted using the least squares method, and the slope of the fitted line represents the rate of change of the deviation values. A positive rate of change indicates a continuous increase in risk, while a negative rate of change indicates a gradual decrease in risk. The risk feature vector is composed of the absolute value of the deviation and the rate of change, forming data points in a two-dimensional feature space.

[0047] It should be noted that the K-means clustering algorithm involves multiple iterative steps. In the initialization phase, three feature vectors are randomly selected as cluster centers, representing low, medium, and high risk levels. The Euclidean distance between each bolt's feature vector and each cluster center is calculated, using the formula: the square root of the sum of the squared differences in deviation values ​​and the squared differences in the rates of change. The feature vector is then assigned to the cluster of the nearest cluster center. After one round of assignment, the mean of all feature vectors within each cluster is recalculated as the new cluster center. This distance calculation and center update process is repeated until the change in cluster center positions is less than a preset convergence threshold.

[0048] Preferably, the cosine similarity of the risk feature vectors is used to verify the rationality of the clustering results. The cosine similarity is calculated by dividing the inner product of two vectors by the product of their magnitudes, and its value ranges from -1 to 1. Bolts with a similarity greater than 0.8 are considered to have similar failure risk characteristics.

[0049] In one possible implementation, the risk region contour is defined using a convex hull algorithm. The convex hull is calculated for the coordinates of all bolt positions within the same cluster, resulting in a minimal convex polygon containing all high-risk bolts. The vertex coordinates of this polygon define the boundary of the risk region, and the interior of the polygon represents the potential failure risk area.

[0050] For example, the ratio of the number of bolts in a region to the total number of bolts reflects the degree of risk concentration. When the ratio exceeds 0.2, it indicates that there is a significant clustering of failure risks in the region, requiring close attention and enhanced monitoring.

[0051] S105. Determine the focal area of ​​the video acquisition device based on the potential failure risk area, perform video resolution enhancement processing on the video of the focal area, and determine the displacement data of the bolts in the focal area.

[0052] Based on the boundary coordinates of the potential failure risk area, the arithmetic mean of all coordinate points within the area is calculated to obtain the geometric center point. The horizontal and vertical angles are calculated using the difference between the center point coordinates and the video acquisition device's position coordinates. The device's pan-tilt unit is adjusted to the corresponding angle, and the lens focal length is set to ensure the entire risk area is within the field of view, obtaining the original video stream of the focal area. Super-resolution reconstruction is performed on the original video stream. A bicubic interpolation algorithm is used to insert new pixels between adjacent pixels, increasing the video resolution from the original value to four times. The Laplacian sharpening operator is used to enhance the image edge contrast, resulting in a resolution-enhanced video of the focal area. Bolt contour features are identified from the resolution-enhanced video. The coordinate changes of the bolt head center point between consecutive frames are tracked, and the bolt head offset is calculated by calculating the coordinate difference between adjacent time points. The grayscale distribution of the threaded area is extracted, and the pixel distance between adjacent thread ridges is measured. The rate of change is calculated based on the time series of the pixel distance between adjacent thread ridges. This rate of change is used as the dynamic change value of the thread gap. Combined with the numerical sequence of the bolt head offset, the displacement data of the bolt in the focal area is determined.

[0053] For example, in one implementation, the boundary coordinates of the potential failure risk area are obtained through a prior risk identification process, and include the three-dimensional coordinate values ​​of multiple boundary points. The geometric center point is calculated by averaging the coordinates of all boundary points in the X, Y, and Z dimensions to obtain the spatial location of the center point. The video acquisition device is fixedly installed at a preset position on the inner wall of the well, and its coordinates are known and remain unchanged.

[0054] Specifically, the calculation of horizontal and vertical angles is based on spatial geometric relationships. The horizontal angle is determined by the angle between the center point and the projection of the device position onto the horizontal plane, and the ratio of the difference in the X-axis direction to the difference in the Y-axis direction is calculated using the arctangent function. The vertical angle is calculated using the height difference and horizontal distance between the center point and the device position, and the elevation or depression angle is obtained using the arctangent function as well. After receiving the angle control signal, the pan-tilt unit (PTZ) is driven by a stepper motor to rotate to the target angle, achieving a positioning accuracy of 0.1 degrees. The lens focal length is automatically adjusted according to the spatial range of the risk area, and the relative position of the lens group is controlled by a zoom motor to achieve continuous changes from wide-angle to telephoto.

[0055] It should be noted that the application of bicubic interpolation in super-resolution reconstruction involves a complex pixel value calculation process. This algorithm utilizes the grayscale values ​​of 16 original pixels in a 4×4 grid surrounding the point to be interpolated, and performs interpolation calculations using a cubic polynomial function. The interpolation process is divided into two stages: first, cubic interpolation is performed on the four pixels in each row horizontally to obtain four intermediate values; then, these four intermediate values ​​are interpolated cubically in the vertical direction to obtain the final interpolation result. The weighting coefficients of the interpolation function are determined based on the distance between the point to be interpolated and the original pixels; the closer the distance, the greater the weight. In this way, a video frame with an original resolution of 640×480 is expanded to 2560×1920, increasing the number of pixels to 16 times the original. The interpolated image maintains the continuity and smoothness of the original image, avoiding the blocky effects produced by simple interpolation methods.

[0056] Preferably, the Laplacian sharpening operator processes the image using a 3×3 convolution kernel. The center element of the kernel has a value of 8, and the surrounding 8 elements have a value of -1. This operator enhances edge features by calculating the difference between each pixel and its neighboring pixels.

[0057] In one possible implementation, bolt contour feature recognition employs a template matching method. A circular template of a standard bolt head is pre-established, containing bolt head features of different sizes. A sliding window approach is used to search for regions similar to the template in the enhanced video frames, with the similarity measured using normalized cross-correlation coefficients. A bolt location is considered found when the similarity exceeds 0.85. The center of the bolt head is determined through least-squares circle fitting. A circle equation is fitted to the identified bolt contour edge points, and the center coordinates with the smallest fitting error are identified as the bolt head center. Center tracking between consecutive frames is achieved using a Kalman filter, predicting the center position of the next frame and performing a precise search near the predicted position, reducing computational load while improving tracking stability.

[0058] For example, the location of the threaded region is based on a fixed pixel distance extending downwards from the center of the bolt head. The thread ridges appear as periodic bright and dark stripes in the image, and the positions of these stripes are identified using grayscale projection. Grayscale projection is performed on the threaded region along the bolt axial direction to obtain a one-dimensional grayscale curve, where the peaks of the curve correspond to the positions of the thread ridges, and the valleys correspond to the positions of the thread grooves.

[0059] For example, the pixel distance between adjacent thread ridges is measured using a peak detection algorithm. The grayscale projection curve is smoothed and filtered to remove noise, and then local maxima are found. The number of pixels between adjacent maxima is the thread pitch. Under normal conditions, the thread pitch of a standard M20 bolt corresponds to approximately 15 pixels.

[0060] Understandably, the dynamic change in thread clearance reflects the evolution of the thread fit state during bolt loosening. By establishing a time series to record the thread clearance value at each monitoring moment, the change in clearance between adjacent moments is calculated using difference operations. The rate of change is obtained by linearly fitting the clearance time series using the least squares method; the slope of the fitted line is the clearance expansion rate. Furthermore, the bolt head offset and the dynamic change in thread clearance together constitute a complete description of the displacement data. The offset value series records the bolt's movement trajectory in space, while the clearance change value series reflects the change in the tightness of the threaded connection. Comprehensive analysis of these two types of data can accurately determine the bolt's loosening state and failure risk level.

[0061] S106. If the displacement data of the bolt in the focal area exceeds the preset displacement threshold, it is determined that the thread gap has expanded abnormally. Then, the early loosening state of the connecting bolt after the signs of loosening are determined based on the displacement data and the dynamic change value of the thread gap.

[0062] Displacement data of bolts in the focal area is acquired, including bolt head offset and thread clearance change. This displacement data is compared with a preset displacement threshold. If the bolt head offset exceeds the preset offset threshold or the thread clearance change exceeds the preset clearance threshold, an abnormal increase in thread clearance is determined. Based on the determination of abnormal thread clearance increase, the ratio of the difference between the displacement data exceeding the threshold and the threshold is calculated as the over-limit ratio. The change per unit time is calculated using the time series of the dynamic change value of the thread clearance. The over-limit ratio is multiplied by the change per unit time to obtain a loosening strengthening index. This loosening strengthening index is compared with preset grading intervals. Different intervals correspond to different degrees of loosening, determining the early loosening state of the connecting bolts after strengthening the loosening signs.

[0063] For example, in one implementation, the displacement data of the bolt in the focal region is obtained through a preceding video analysis process, including millimeter-level values ​​of bolt head offset and micrometer-level data of thread clearance variation. A preset offset threshold is set according to the bolt specification and load requirements; for M20 bolts, the offset threshold is set to 0.5 mm, and the preset clearance threshold is set to 1.2 times the standard thread clearance.

[0064] Specifically, the determination of abnormal expansion of thread clearance adopts a dual standard. When the bolt head offset alone exceeds a preset offset threshold, it indicates that the bolt as a whole has undergone significant displacement; when the thread clearance change value alone exceeds a preset clearance threshold, it indicates that the thread fit is loose. Meeting either condition constitutes an abnormal expansion state.

[0065] It should be noted that the calculation method for the excess ratio involves normalization. For bolt head offset, the difference between the actual offset value and the offset threshold is calculated, and then divided by the offset threshold to obtain the excess ratio. For thread clearance variation, the clearance excess ratio is calculated using the same method. The larger of the two ratios is taken as the final excess ratio, reflecting the severity of loosening. The time series of dynamic thread clearance variation values ​​is obtained through continuous monitoring, with clearance values ​​recorded hourly. The change per unit time is calculated using the difference between two adjacent measurements, representing the rate of clearance expansion. The loosening strengthening index is equal to the product of the excess ratio and the change per unit time, comprehensively reflecting the degree and rate of development of loosening.

[0066] Preferably, the preset grading range is determined based on engineering experience and safety standards. A loosening strengthening index of less than 0.3 corresponds to a slightly loose state, 0.3 to 0.6 corresponds to a moderately loose state, 0.6 to 1.0 corresponds to a severely loose state, and greater than 1.0 corresponds to a critical failure state.

[0067] In one possible implementation, the determination of the early loosening state of the connecting bolts also considers the duration of the loosening. Only when the loosening reinforcement index remains within a certain range for more than three monitoring cycles is the corresponding loosening state level finally determined. This method avoids misjudgments caused by instantaneous fluctuations.

[0068] For example, for bolts in a moderately loose state, the system automatically adjusts the monitoring frequency to once every 30 minutes and records the loosening trend. When two consecutive monitoring sessions show an increase in the loosening strengthening index, an early warning is issued that the bolt may enter a severely loose state, providing a time window for maintenance decisions.

[0069] S107. Input the early loosening status of the connecting bolts after strengthening the loosening signs into the random forest algorithm for analysis, and output the location information of high-risk connecting bolts. Generate wellbore inspection intervention points based on the location information of high-risk connecting bolts, and plan the inspection path through the wellbore inspection intervention points.

[0070] The early loosening status data of connecting bolts after reinforcement of loosening signs are constructed into a feature vector containing loosening level, displacement, and rate of change values. This vector is input into a decision tree set of a random forest algorithm. The risk category is determined by voting among the decision trees, and the bolt numbers and their three-dimensional coordinate positions classified as high-risk are output. Based on the three-dimensional coordinate positions of the high-risk bolts, corresponding points are marked in the wellbore spatial coordinate system. The Euclidean distance between each point is calculated to form a distance matrix. Hierarchical clustering is used to merge points with distances less than a preset threshold into intervention areas. The arithmetic mean of the coordinates of all points within each intervention area is calculated as the wellbore inspection intervention point. An undirected connected graph is constructed using these wellbore inspection intervention points. With points as nodes and distances between points as edge weights, the minimum spanning tree algorithm is used to select the set of edges with the smallest total weight, obtaining the shortest path scheme connecting all intervention points. Based on the connection order of each side in the shortest path scheme, combined with the vertical structure constraints of the well shaft and the movement range of the inspection equipment, an inspection path that conforms to the actual inspection constraints is generated by smoothing sharp turns by inserting intermediate path points and adjusting the slope of vertical climbing sections.

[0071] For example, in one implementation, the early bolt loosening status data after reinforcing signs of loosening includes multiple quantitative indicators. The loosening level is assigned values ​​of 1, 2, 3, and 4, representing four levels: slight, moderate, severe, and critical, respectively. The displacement value is a normalized composite value of the bolt head offset in millimeters and the thread clearance change in micrometers. The rate of change value is calculated as the increment of displacement per unit time. This feature vector, composed of these three values, represents the current risk status of each bolt.

[0072] Specifically, the implementation of the random forest algorithm involves constructing 100 decision trees. Each decision tree uses a different subset of training samples, randomly selecting samples of the same size as the original dataset from historical bolt loosening data using a bootstrap sampling method, allowing for repeated sampling. For each decision node, two features are randomly selected from three features for splitting, choosing the feature with the highest information gain and the split point. The decision tree grows until the leaf nodes contain only samples of the same risk category or reach a minimum sample size threshold. In the prediction phase, the feature vector of the bolt to be judged is input into each decision tree, obtaining 100 risk category judgment results. The number of votes for each category is counted, and the category with more than 60 votes is determined as the final risk category. Bolts corresponding to high-risk categories are marked, and their numbers and three-dimensional coordinate position information are output results.

[0073] It should be noted that the hierarchical clustering process employs a bottom-up agglomeration strategy. Initially, each high-risk bolt is treated as an independent cluster. The Euclidean distance between all cluster pairs is calculated, using the formula: the square root of the sum of the squares of the differences in the three-dimensional coordinates. The two clusters with the smallest distance are merged to form a new cluster. The position of the new cluster is determined by the arithmetic mean of the coordinates of all bolts within the original two clusters. This process of calculating inter-cluster distances and merging is repeated until all inter-cluster distances are greater than a preset threshold. The preset threshold is set based on the effective operating radius of the inspection equipment, typically 2 meters. Each final cluster represents an intervention area, with its center point serving as the inspection intervention point. This clustering method can group spatially similar high-risk bolts into the same intervention area, reducing the number of inspection points and improving inspection efficiency.

[0074] Preferably, the undirected connected graph is constructed by using all intervention points as vertices of the graph, and the straight-line distance between any two points as the weight of the edge. When the number of intervention points is n, the complete graph contains n×(n-1) / 2 edges.

[0075] In one possible implementation, the minimum spanning tree algorithm is implemented using Prim's algorithm. Starting with any intervention point, add it to the set of selected points. Calculate the weights of all edges from points in the selected set to unselected points, select the edge with the smallest weight, and add the unselected point connected to that edge to the set of selected points. Repeat this process, each time selecting the edge with the smallest weight connecting the selected and unselected sets, until all points are selected. The final result is a tree structure consisting of n-1 edges, where the sum of the edge weights is minimized, representing the shortest total path traversing all intervention points.

[0076] For example, path smoothing is optimized for sharp turns. A sharp turn is considered to exist when the angle between two adjacent edges is less than 90 degrees. An intermediate path point is inserted before and after the vertex of the turn. The intermediate point is located outside the original path, and the distance from the vertex is 0.7 times the turning radius. A smooth turning path is formed by connecting the point before the original vertex, the first intermediate point, the vertex, the second intermediate point, and the point after the vertex using a Bézier curve.

[0077] For example, the slope adjustment for vertical climbing sections takes into account the climbing capacity limitations of the inspection equipment. When the height difference between two adjacent points exceeds 5 meters, a spiral ascent path point is inserted between the two points. The spiral radius is set to 1 meter, and the pitch is calculated based on the equipment's maximum climbing angle of 30 degrees.

[0078] Understandably, wellbore structural constraints include factors such as wellbore wall obstacles, pipeline distribution, and the location of support beams. Path planning requires checking whether each path segment intersects with obstacles; if so, a detour strategy is adopted, setting detour points around the obstacle. Furthermore, the mobility of the inspection equipment includes parameters such as maximum speed, turning radius, and climbing angle. Based on these parameters, the feasibility of the theoretical shortest path is verified, and adjustments are made to sections exceeding the equipment's capabilities. The final generated inspection path ensures traversal of all high-risk bolt areas while also meeting actual inspection constraints, achieving a balance between inspection efficiency and feasibility.

[0079] This invention provides an AI video intelligent inspection system for well shafts, mainly comprising: The video acquisition and displacement extraction module is used to acquire real-time video of the well support ring connection structure within a preset time period, and extract the axial displacement of the connecting bolts from the real-time video. The loosening sign determination module is used to compare the axial displacement of the bolt with the preset historical baseline value to obtain the deviation value of the axial displacement exceeding the preset historical baseline value. If there is a deviation between the axial displacement and the preset historical baseline value, it is determined that there is a loosening sign, and a preliminary loosening status index is determined based on the deviation value of the axial displacement exceeding the preset historical baseline value. The dynamic trend analysis module is used to obtain the axial displacement and preliminary loosening status indicators within the target time period, and input them into the random forest algorithm for analysis. The output is the dynamic change trend of the connecting bolts. Based on the preliminary loosening status indicators and the dynamic change trend of the connecting bolts, the potential failure risk of the connecting bolts is analyzed. The risk area identification module is used to identify potential failure risk areas of connecting bolts by extracting high deviation values ​​and abnormal trends in potential failure risks. The focus area enhancement module is used to determine the focus area of ​​the video acquisition device based on the potential failure risk area, perform video resolution enhancement processing on the video in the focus area, and determine the displacement data of the bolts in the focus area. The early loosening state determination module is used to determine the early loosening state of the connecting bolts after the signs of loosening are reinforced if the displacement data of the bolts in the focal area exceeds the preset displacement threshold. The inspection path planning module is used to input the early loosening status of the connecting bolts after reinforcement of loosening signs into the random forest algorithm for analysis, output the location information of high-risk connecting bolts, generate well shaft inspection intervention points based on the location information of high-risk connecting bolts, and plan the inspection path based on the well shaft inspection intervention points.

[0080] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that this application can be implemented in other specific forms without departing from the spirit or essential characteristics of this application. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of this application is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within this application. No reference numerals in the claims should be construed as limiting the scope of the claims.

Claims

1. A wellbore AI video intelligent inspection method, characterized in that, The method includes: Real-time video of the wellbore support ring connection structure is acquired, and the axial displacement of the connecting bolts is extracted from the real-time video. The axial displacement is compared with a preset historical baseline value to obtain a deviation value. Based on the deviation value, signs of loosening are determined, and a preliminary loosening state index is identified. The axial displacement and the preliminary loosening state index within a target time period are acquired, input into a random forest algorithm, and the dynamic change trend of the connecting bolts is output. The potential failure risk is analyzed based on the dynamic change trend. Potential failure risk areas of the connecting bolts are identified by extracting the potential failure risk. The focus area of ​​the video acquisition device is determined based on the potential failure risk area, and the video of the focus area is processed to enhance resolution to determine the displacement data of the bolts in the focus area. Based on the displacement data, abnormal expansion of thread clearance is determined, and the early loosening state of the connecting bolts is identified. The early loosening state of the connecting bolts is input into a random forest algorithm, and the location information of high-risk connecting bolts is output. Based on the location information, wellbore inspection intervention points are generated, and inspection paths are planned based on the wellbore inspection intervention points.

2. The wellbore AI video intelligent inspection method according to claim 1, characterized in that, The process of acquiring real-time video of the wellbore support ring connection structure and extracting the axial displacement of the connecting bolts from the real-time video includes: Real-time video of the wellbore support ring connection structure is acquired. The real-time video is then subjected to frame rate normalization processing. Video frames are extracted from the normalized video, and edge detection is used to identify the bolt outline in the video frames to locate the coordinates of the bolt head center point. Based on the bolt head center point coordinates, the threaded region is extracted, the pixel distribution of the thread gap is analyzed, and the pixel distance between adjacent thread peaks is calculated as the thread gap variation value. Based on the change in the bolt head center point coordinates between consecutive frames, the bolt head offset is determined. Combining the bolt head offset and the thread gap variation value, the axial displacement of the connecting bolt is determined.

3. The wellbore AI video intelligent inspection method according to claim 1, characterized in that, The step of comparing the axial displacement with a preset historical baseline value to obtain a deviation value, and determining signs of loosening based on the deviation value to identify preliminary loosening status indicators includes: Obtain the axial displacement data sequence of the bolt within a historical time period, calculate the average value and standard deviation of the data sequence, and determine the historical baseline value; subtract the historical baseline value from the axial displacement to obtain the deviation value; determine the loosening signs based on the deviation value, calculate the deviation amplitude, loosening trend coefficient and displacement frequency, and determine the preliminary loosening status index.

4. The wellbore AI video intelligent inspection method according to claim 1, characterized in that, The process involves acquiring the axial displacement and preliminary loosening status indicators within a target time period, inputting them into a random forest algorithm, outputting the dynamic change trend of the connecting bolts, and analyzing potential failure risks based on the dynamic change trend, including: The axial displacement and preliminary loosening state index within the target time period are obtained, and a feature vector is constructed including the mean, variance, peak value, rate of change, deviation amplitude, loosening trend coefficient, and displacement frequency of the displacement. The feature vector is input into a random forest algorithm, and the dynamic change trend of the connecting bolts is output through voting by multiple decision trees. The rate of change is calculated based on the dynamic change trend to identify the accelerated loosening state, stable loosening state, or decelerated loosening state. The potential failure risk level is determined based on the rate of change and the preliminary loosening state index.

5. The wellbore AI video intelligent inspection method according to claim 1, characterized in that, The process of identifying potential failure risk areas for connecting bolts by extracting the potential failure risks includes: Extract the bolt position coordinates corresponding to high deviation values ​​from the potential failure risks, calculate the rate of change of deviation values, and construct a risk feature vector; perform spatial clustering on the risk feature vector to determine the center point and boundary range of the risk clustering area, and identify potential failure risk areas.

6. The wellbore AI video intelligent inspection method according to claim 1, characterized in that, The process of determining the focal area of ​​the video acquisition device based on the potential failure risk area, performing resolution enhancement processing on the video of the focal area, and determining the displacement data of the bolt in the focal area includes: Based on the boundary coordinates of the potential failure risk area, the geometric center point is calculated, and the pan-tilt angle and focal length of the video acquisition device are adjusted to bring the potential failure risk area into the field of view, thereby acquiring the video of the focal area. The video of the focal area is then subjected to resolution enhancement processing to identify the bolt outline, track the changes in bolt head coordinates and thread clearance, and determine the displacement data of the bolt in the focal area.

7. The wellbore AI video intelligent inspection method according to claim 1, characterized in that, The step of determining abnormal expansion of thread clearance based on the displacement data and identifying the early loosening state of the connecting bolts includes: By comparing the displacement data with a preset displacement threshold, it is determined that the thread gap has expanded abnormally; based on the displacement data, the over-limit ratio and change amount are calculated to determine the early loosening state of the connecting bolts.

8. The wellbore AI video intelligent inspection method according to claim 1, characterized in that, The process involves inputting the early loosening status of the connecting bolts into a random forest algorithm, outputting the location information of high-risk connecting bolts, generating wellbore inspection intervention points based on the location information, and planning inspection paths using the wellbore inspection intervention points, including: The early loosening status of the connecting bolts is constructed as a feature vector, input into a random forest algorithm, and the location information of high-risk connecting bolts is output. Points are marked according to the location information, the distance between points is calculated, and they are merged into intervention areas to generate wellbore inspection intervention points. A connected graph is constructed through the wellbore inspection intervention points, and the minimum spanning tree algorithm is used to generate inspection paths.

9. A wellbore AI video intelligent inspection system, characterized in that, The system includes: The video acquisition and displacement extraction module is used to acquire real-time video of the well support ring connection structure within a preset time period, and extract the axial displacement of the connecting bolts from the real-time video. The loosening sign determination module is used to compare the axial displacement of the bolt with the preset historical baseline value to obtain the deviation value of the axial displacement exceeding the preset historical baseline value. If there is a deviation between the axial displacement and the preset historical baseline value, it is determined that there is a loosening sign, and a preliminary loosening status index is determined based on the deviation value of the axial displacement exceeding the preset historical baseline value. The dynamic trend analysis module is used to obtain the axial displacement and preliminary loosening status indicators within the target time period, and input them into the random forest algorithm for analysis. The output is the dynamic change trend of the connecting bolts. Based on the preliminary loosening status indicators and the dynamic change trend of the connecting bolts, the potential failure risk of the connecting bolts is analyzed. The risk area identification module is used to identify potential failure risk areas of connecting bolts by extracting high deviation values ​​and abnormal trends in potential failure risks. The focus area enhancement module is used to determine the focus area of ​​the video acquisition device based on the potential failure risk area, perform video resolution enhancement processing on the video in the focus area, and determine the displacement data of the bolts in the focus area. The early loosening state determination module is used to determine the early loosening state of the connecting bolts after the signs of loosening are reinforced if the displacement data of the bolts in the focal area exceeds the preset displacement threshold. The inspection path planning module is used to input the early loosening status of the connecting bolts after reinforcement of loosening signs into the random forest algorithm for analysis, output the location information of high-risk connecting bolts, generate well shaft inspection intervention points based on the location information of high-risk connecting bolts, and plan the inspection path based on the well shaft inspection intervention points.