A method for positioning a work surface on an oil drill pipe and for reading a steel code

By combining 3D point cloud processing and convolutional neural networks, the challenges of positioning oil drill pipes on the working face and recognizing steel codes were solved, achieving efficient and automated recognition under harsh working conditions and meeting the needs of full life-cycle management of drill pipes.

CN122116085APending Publication Date: 2026-05-29YAMI TECH CHENGDU CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
YAMI TECH CHENGDU CO LTD
Filing Date
2026-03-06
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing technologies are insufficient for achieving precise positioning of the oil drill pipe working face and highly reliable reading of steel codes under harsh working conditions, resulting in low automation recognition rates and failing to meet the needs of full life-cycle management of oil drill pipes.

Method used

By combining 3D point cloud processing with artificial intelligence, point cloud data is acquired through a high-precision 3D industrial camera. Circle and axis fitting are then performed to locate the steel code working surface. Convolutional neural networks are used for recognition, achieving highly reliable automated recognition of the steel code.

Benefits of technology

It improves the accuracy of oil drill pipe working face positioning and the stability of identification, reduces the sensitivity to light and surface cleanliness, realizes the automatic collection and information traceability of drill pipe identification, and enhances the standardization and efficiency of management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122116085A_ABST
    Figure CN122116085A_ABST
Patent Text Reader

Abstract

The application discloses a method for positioning a work surface on a petroleum drill rod and reading a steel code. Three-dimensional point cloud data containing the surface of the drill rod and the steel code area is obtained; the point cloud is cut along a preset coordinate axis to generate multiple cross sections and perform circle fitting, a drill rod space axis is extracted based on cross section circle center straight line fitting, attitude standardization is performed by using a Rodriguez rotation formula, and secondary cutting and circle fitting are performed after standardization; the change rule of the radius of each cross section is analyzed to position a target work surface where the steel code is located and extract a point cloud subset; the steel code point cloud is separated by radius threshold filtering in the target work surface point cloud subset, and is orthogonally projected and mapped into a two-dimensional black and white bitmap; and the bitmap is input into a pre-trained convolutional neural network model to output a steel code reading result. The application can adapt to harsh working conditions, realize accurate positioning of the work surface and stable and reliable reading of the steel code, and is suitable for drill rod whole-process management and tracing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automated detection and identification technology for oil drill pipes, specifically to a method for locating the working face on an oil drill pipe and reading its steel code. Background Technology

[0002] Traditional oil drill pipe numbering management uses a method of striking the steel grade number on the white stop of the external thread. This method makes it difficult to perform refined management and full life-cycle supervision of drill pipes. The main reasons for this are as follows: 1. Since the steel grade is determined by manual tapping, it is difficult to guarantee the force and consistency of the tapping, making it impossible for machines to read the grade.

[0003] 2. After drilling tools are used in the well, the threads will experience some wear. When the threads are worn, they need to be repaired. After repair, the steel mark on the white part of the thread will be removed by CNC lathe, resulting in the loss of the identification number. Therefore, the steel mark needs to be manually re-marked.

[0004] 3. After the drill string is used in the well, thread oil is applied to the threads. However, applying thread oil to the threads makes it difficult to identify the drill pipe steel grade.

[0005] 4. Because drill pipes are sometimes left outdoors unused, the threads of the drill pipes rust due to wind and sun exposure, making it difficult to identify the steel grade of the drill pipes.

[0006] like Figure 1 The diagram shown is a traditional illustration of marking steel grades at the white stop position. Figure 2 The image shows a diagram of the drill pipe thread. Throughout the production, distribution, and maintenance of oil drilling tools, each drill pipe must be uniquely identified to ensure traceability of key information such as its model and serial number. This facilitates the tracking of drill pipe usage history, the retention of inspection records, maintenance records, downhole records, and the prevention of counterfeit products. The selection of drill string materials during drilling design, the downhole working time, the downhole depth records, and the effects of hydrogen embrittlement in sulfide wells are all crucial to the safety and economy of drilling operations. Currently, the industry standard is to use a stamped code—a recessed steel mark formed by striking a specific area on the external thread of the drill pipe—as its identification.

[0007] However, this approach faces two core technological bottlenecks in practical applications, making it difficult for existing solutions to meet the demands of automated production. On the one hand, the steel number identification process is constrained by multiple interferences. The working environment of the drill pipe is harsh, and the surface of the steel number is prone to contaminants such as oil stains, rust, and dirt. Furthermore, the laser welding process itself is prone to defects such as irregular character edges, rough surfaces, and low contrast. Traditional recognition relies on optical character recognition (OCR) technology based on two-dimensional images. This technology has stringent requirements for character clarity, surface cleanliness, and lighting conditions, resulting in extremely low recognition rates under complex working conditions, making it impossible to achieve stable and reliable automated identification. On the other hand, the efficiency and accuracy of the pre-identification work surface positioning process are insufficient. It is necessary to accurately extract the specific work surface, the threaded white stop, from the complex three-dimensional structure of the drill pipe. However, existing technologies lack efficient positioning methods and cannot quickly separate the point cloud data of the target area. This makes subsequent identification susceptible to interference from non-target areas, further restricting the level of automation of the entire process.

[0008] In summary, existing technologies have significant shortcomings in terms of the accuracy of positioning the working face of oil drill pipe threads, the robustness of steel code reading, and the degree of automation of the entire process. There is an urgent need for an integrated technical solution that can adapt to harsh industrial environments and achieve accurate positioning of the working face and highly reliable steel code reading. Summary of the Invention

[0009] The purpose of this invention is to overcome the following problems in the prior art: firstly, it is difficult to quickly and accurately extract the point cloud data of the specific working face used to make steel numbers from the complex three-dimensional structure of the drill pipe; secondly, it is difficult to overcome the interference caused by harsh working conditions and process defects, and to achieve high-accuracy recognition of the steel characters laser-welded on the 18-degree slope of the drill pipe tool joint, thereby providing a stable and reliable automated technical solution.

[0010] To achieve the above objectives, this invention proposes a method for working face positioning and steel code recognition that integrates 3D point cloud processing and artificial intelligence: High-density point cloud data containing complete drill pipe and steel codes is acquired using a high-precision 3D industrial camera; the point cloud is cut along the Y-axis to form a cross-section, and circle fitting and center line fitting are performed to extract the drill pipe axis; further, point cloud standardization is achieved based on the Rodriguez rotation formula; then, a subset of the 18-degree slope point cloud is located and extracted according to the radius variation law of each standardized cross-section; the steel code point cloud is separated from this subset by radius threshold filtering, and its orthogonal projection is mapped into a two-dimensional black and white bitmap; finally, the black and white bitmap is input into a pre-trained convolutional neural network model to output the steel code recognition result, thereby achieving integrated automated operation of precise positioning of the 18-degree slope working face and highly reliable steel code recognition, meeting the actual needs of oil drilling tool production and management.

[0011] To achieve the above objectives, the present invention provides a method for locating a working face on an oil drill pipe and for reading steel code, comprising the following steps: a) Obtain three-dimensional point cloud data of the oil drill pipe, wherein the three-dimensional point cloud data includes the drill pipe surface and the area where the steel lettering is located; b) Process the three-dimensional point cloud data, extract the spatial axis of the drill rod, and standardize the point cloud data based on the spatial axis to align the spatial axis of the drill rod with the preset coordinate axis. c) Based on the standardized point cloud data, analyze the radius variation law of each section along the spatial axis, locate the target working surface where the steel code is located, and extract the point cloud subset of the target working surface; d) In the point cloud subset of the target working surface, filter and separate the steel character code point cloud according to the radius threshold, and orthogonally project and map the steel character code point cloud into a two-dimensional black and white bitmap; e) Input the two-dimensional black and white bitmap into a pre-trained convolutional neural network model and output the recognition result of the steel character code.

[0012] Furthermore, the step of extracting and standardizing the spatial axis of the drill pipe includes: Multiple cross sections are generated by cutting point cloud data along the preset coordinate axis direction; Perform circle fitting on each cross section to obtain the coordinates of the cross section center; The spatial axis of the drill pipe is determined by linear fitting of the coordinates of the center of the cross section. The point cloud data is rotated according to the Rodriguez rotation formula until the drill pipe spatial axis is aligned with the preset coordinate axis, thereby completing the standardization of the point cloud data; The standardized point cloud data is then cut along the preset coordinate axis to generate a cross section and then fitted with a circle.

[0013] Furthermore, the circle fitting is performed using the least squares method.

[0014] Furthermore, the process of locating the target working surface in step c) includes: determining the starting and ending sections of the target working surface by detecting a first key section where the cross-sectional radius begins to increase significantly and a second key section where the cross-sectional radius returns to a stable state, and extracting the point cloud between the first key section and the second key section as a subset of the point cloud of the target working surface.

[0015] Furthermore, the radius threshold in step d) is dynamically calculated based on the average radius value and standard deviation of the target working surface point cloud subset.

[0016] Furthermore, the convolutional neural network model is LeNet-5 or a variant thereof, and is trained on the EMNIST dataset, with data augmentation techniques employed to improve readability robustness.

[0017] Furthermore, the three-dimensional point cloud data is acquired using a structured light camera or a laser line scan camera.

[0018] Furthermore, the central processing unit (CPU) and the graphics processing unit (GPU) work together to complete steps a) to e), thereby achieving real-time processing.

[0019] Furthermore, the target working surface is the 18-degree slope at the end of the drill pipe.

[0020] Furthermore, the preset coordinate axis is the Y-axis.

[0021] Furthermore, the three-dimensional point cloud data is high-density point cloud data.

[0022] Furthermore, the steel lettering is formed by laser welding.

[0023] Furthermore, the two-dimensional black and white bitmap is a 200×50 pixel bitmap.

[0024] Compared with the prior art, the present invention, by adopting the above-described technical solution, has at least the following beneficial effects: This invention performs cross-sectional cutting and circle fitting on three-dimensional point cloud data to extract the spatial axis of the drill pipe. Then, it standardizes the point cloud posture based on the spatial axis, enabling the drill pipe to perform cross-sectional radius analysis under a unified coordinate reference. This allows for more accurate positioning of the target working face where the steel code is located and extraction of the corresponding point cloud subset. This effectively reduces positioning deviations caused by changes in the drill pipe's placement posture and improves the consistency and reliability of working face positioning.

[0025] In the target operation surface point cloud subset, this invention dynamically determines the radius threshold based on the average radius value and standard deviation of the target area, and achieves effective separation of the steel character code point cloud from the background point cloud through threshold filtering. This can suppress interference caused by surface noise, non-target area point clouds and contaminant adhesion, improve the purity and separability of the steel character code point cloud, and provide a more reliable data foundation for subsequent reading.

[0026] This invention orthogonally projects the point cloud of steel-coded characters into a two-dimensional black-and-white bitmap, which is then input into a pre-trained convolutional neural network model for recognition. Data augmentation is combined to improve the model's adaptability to character deformation and noise. Compared to traditional OCR methods that rely on two-dimensional optical imaging, this invention significantly reduces sensitivity to factors such as lighting conditions, surface reflection, and uneven texture. It can better adapt to low-contrast scenes caused by irregular character edges due to laser welding, rough surfaces, and contamination such as oil stains and rust, thereby improving recognition stability and accuracy.

[0027] This invention uses the spatial axis of the drill pipe as the attitude calibration benchmark and utilizes the standardized cross-sectional radius variation law to achieve rapid positioning of the target working surface. Simultaneously, it improves adaptability to different drill pipe specifications, different target working surfaces, and different shapes of steel markings through a dynamic threshold strategy. In a preferred embodiment, the target working surface is an 18-degree slope at the end of the drill pipe. This invention is also compatible with various 3D acquisition devices such as structured light cameras and laser line scanning cameras, exhibiting good versatility and portability, facilitating engineering-scale application.

[0028] This invention streamlines the process of point cloud acquisition, work surface positioning, steel code extraction, two-dimensional mapping, and neural network recognition, which can reduce manual intervention and lower labor costs. Furthermore, it can combine CPU and GPU collaborative computing to achieve rapid processing and inference recognition, meeting the efficiency requirements of online and automated inspection in industrial production lines.

[0029] By enabling stable and reliable automatic recognition of steel code, this invention can support the automatic collection and information traceability of drill pipe identification during production, circulation, and maintenance management, reduce human error in identification, provide reliable technical support for drill pipe life cycle management, maintenance record retention, and prevention of counterfeit and substandard products, and improve the standardization and efficiency of drill tool management. Attached Figure Description

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

[0031] Figure 1 This is a schematic diagram of the traditional method of marking steel marks at the white stop position.

[0032] Figure 2 This is a diagram of the drill pipe thread section.

[0033] Figure 3 This is a flowchart of the method for locating the working face and reading steel code on an oil drill pipe according to the present invention.

[0034] Figure 4 This is a schematic diagram of the original point cloud acquired by the 3D industrial camera of this invention.

[0035] Figure 5 This is a schematic diagram of the point cloud extraction of steel character codes according to the present invention.

[0036] Figure 6 This is a schematic diagram of the two-dimensional mapping result of the present invention. Detailed Implementation

[0037] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.

[0038] Example 1

[0039] like Figure 3 As shown, this embodiment provides a method for locating the working face and reading steel code on an oil drill pipe, including the following steps: a) Obtain three-dimensional point cloud data of the oil drill pipe, wherein the three-dimensional point cloud data includes the drill pipe surface and the area where the steel lettering is located; In this embodiment, the three-dimensional point cloud data can be obtained by scanning the outer surface of the drill rod once or multiple times. The scanned point cloud includes the overall outline of the drill rod's outer surface and the point cloud of the area where the steel markings may be distributed. To facilitate subsequent processing, the point cloud can be stored in a unified coordinate system and a structured data format (e.g., saved as a set of point coordinates). By acquiring three-dimensional point cloud data containing the drill rod surface and the steel marking area, the sensitivity issues of illumination, reflection, and occlusion caused by relying solely on two-dimensional imaging can be avoided, providing a more stable data foundation for subsequent geometric positioning and identification.

[0040] b) The 3D point cloud data is processed to extract the spatial axis of the drill rod, and the point cloud data is standardized based on the spatial axis to align the drill rod spatial axis with a preset coordinate axis. In this embodiment, "extracting the spatial axis of the drill rod" is used to establish the geometric reference of the drill rod, so that subsequent cross-sectional radius analysis, target working face positioning, and character region extraction are all performed under a unified coordinate reference. "Standardization processing" is used to eliminate the posture differences of the drill rod during scanning, making the data collected under different work positions and different placement postures comparable. By establishing the axis reference and posture standardization, the impact of drill rod placement posture changes on the positioning results can be significantly reduced, improving the stability and consistency of working face positioning and character extraction.

[0041] c) Based on the standardized point cloud data, analyze the radius variation pattern of each cross-section along the spatial axis, locate the target working surface where the steel code is located, and extract the point cloud subset of the target working surface. In this embodiment, the "cross-sectional radius variation pattern" can be obtained by sequentially calculating the cross-sectional radius of multiple cross-sections generated along the axial direction of the standardized point cloud. The point cloud subset corresponding to the target working surface can be understood as: a set of point clouds located between the start and end boundaries of the target working surface and satisfying the geometric characteristics of the working surface. Using the cross-sectional radius variation for target working surface positioning can quickly lock the area where the steel code is located in the complex three-dimensional shape of the drill pipe, reduce interference from point clouds in non-target areas, and improve positioning efficiency and accuracy.

[0042] d) In the point cloud subset of the target work surface, the steel character code point cloud is separated according to the radius threshold filtering, and the steel character code point cloud is orthogonally projected and mapped into a two-dimensional black and white bitmap. In this embodiment, the "radius threshold filtering" is used to distinguish the steel character code point cloud from the work surface background point cloud in the point cloud subset of the target work surface; the "orthogonal projection mapping" is used to convert the three-dimensional character point cloud into a two-dimensional representation that is convenient for neural network input. The two-dimensional black and white bitmap can be formed by the rasterization result on the projection plane, where the pixel value is used to indicate whether there is a character point in the corresponding raster or whether the character point density exceeds a preset criterion. Through three-dimensional point cloud threshold separation and two-dimensional bitmap mapping, the separability and readability of the character region can be improved, and the impact of steel character code surface roughness, irregular edges and contamination on reading can be reduced, providing a more robust input for subsequent CNN recognition.

[0043] e) Input the two-dimensional black and white bitmap into a pre-trained convolutional neural network model to output the recognition result of the steel character code. In this embodiment, the two-dimensional black and white bitmap can be size-matched and normalized according to the input requirements of the convolutional neural network (e.g., unified input size, unified pixel value range); the recognition result can be a character sequence, and the network output can be obtained through classification output or sequence combination, ultimately forming the steel character code content. Using a pre-trained CNN for recognition can utilize the neural network's tolerance to deformation, noise, and local defects, improving recognition stability and reducing sensitivity to cleanliness and lighting conditions, which are relied upon by traditional OCR.

[0044] Furthermore, the step of extracting and standardizing the spatial axis of the drill pipe includes: Multiple cross sections are generated by cutting point cloud data along the preset coordinate axis direction; Perform circle fitting on each cross section to obtain the coordinates of the cross section center; The spatial axis of the drill pipe is determined by linear fitting of the coordinates of the center of the cross section. The point cloud data is rotated according to the Rodriguez rotation formula until the drill pipe spatial axis is aligned with the preset coordinate axis, thereby completing the standardization of the point cloud data; The standardized point cloud data is then cut along the preset coordinate axis to generate a cross section and then fitted with a circle.

[0045] In this embodiment: multiple cross-sections are generated by cutting along a preset coordinate axis, which can be understood as sampling multiple cross-sections axially at preset intervals to obtain stable cross-sectional geometric features; circle fitting obtains the center coordinates to extract the geometric center of each cross-section, thus obtaining a circle center sequence; circle center line fitting is used to fit the circle center sequence as a whole to obtain the direction and position of the drill pipe spatial axis; rotation based on the Rodrigues rotation formula is used to construct an attitude transformation that rotates the axis direction to align with the preset coordinate axis, so that the point cloud attitude is unified; after standardization, secondary cutting and circle fitting are used to further calibrate the cross-sectional geometric parameters after attitude unification, reducing fitting deviations caused by initial attitude, noise, or incomplete cross-sections. Through cross-section fitting, axis fitting, rotation standardization, and secondary calibration, the stability of axis extraction and cross-section radius calculation can be enhanced, improving the accuracy and consistency of subsequent target working face positioning.

[0046] As one implementation method, the circle fitting in this embodiment uses the least squares method. In this embodiment, the least squares circle fitting obtains the circle parameters by minimizing the error from the cross-section point to the fitted circle. This method can be used to obtain relatively stable estimates of the circle center and radius even when there is measurement noise or local missing data in the point cloud, thereby improving the stability of the cross-section geometric parameter estimation and enhancing the reliability of axis fitting and radius variation analysis.

[0047] Furthermore, the process of locating the target work surface in step c) includes: determining the starting and ending sections of the target work surface by detecting a first key section where the cross-sectional radius begins to increase significantly and a second key section where the cross-sectional radius returns to a stable state; and extracting the point cloud between the first and second key sections as a subset of the point cloud of the target work surface. In this embodiment, the first and second key sections can be identified from a sequence of cross-sectional radii arranged along the axial direction: when the cross-sectional radius changes significantly relative to the preceding cross-section, it can be determined that the target work surface has been entered; when the cross-sectional radius returns to a relatively stable range, it can be determined that the target work surface has been left; based on this, the axial range of the target work surface is determined, and the point cloud within this range is extracted as a subset of the point cloud of the target work surface. Using radius change as the boundary criterion avoids reliance on manual selection of regions or complex segmentation algorithms, enabling rapid locking of the target work surface range in complex shapes and reducing the risk of mis-extraction and omission.

[0048] As one implementation method, the radius threshold in step d) of this embodiment is dynamically calculated based on the average radius value and standard deviation of the target working surface point cloud subset. In this embodiment, the dynamic determination of the radius threshold can be understood as: statistically analyzing the radial distance of each point in the target working surface point cloud to obtain the average level and dispersion, and setting a threshold for distinguishing between background point clouds and character point clouds accordingly, thereby adapting to different drill pipe specifications and different surface conditions. The dynamic threshold can adaptively adjust with the statistical characteristics of the target working surface point cloud, enhancing the adaptability to different drill pipe specifications, different surface roughness, and contamination adhesion, and improving the robustness of steel character point cloud separation.

[0049] As one implementation method, the convolutional neural network model described in this embodiment is LeNet-5 or a variant thereof, trained on the EMNIST dataset, and employs data augmentation techniques to improve readability robustness. In this embodiment, LeNet-5 or its variants are used for feature extraction and classification of two-dimensional black and white bitmaps; training on the EMNIST dataset enables the model to possess basic character shape recognition capabilities; data augmentation is used to expand the sample shape coverage during the training phase to improve the model's adaptability to character deformation, local defects, and noise disturbances. Using a pre-trained and data-augmented CNN model can improve its tolerance to irregular character edges, rough surfaces, and low contrast, thereby improving the stability and consistency of readability.

[0050] As one implementation method, the 3D point cloud data in this embodiment is acquired using a structured light camera or a laser line scan camera. In this embodiment, the structured light camera obtains depth information by projecting structured light and analyzing deformation, while the laser line scan camera obtains surface contours and reconstructs the 3D point cloud by laser line scanning; both can be used to obtain point cloud data that meets the requirements for subsequent geometric fitting and character separation. Compatibility with multiple 3D acquisition devices facilitates the selection of appropriate hardware based on site conditions and cost, improving the engineering adaptability and deployability of the solution.

[0051] As one implementation method, this embodiment employs a central processing unit (CPU) and a graphics processing unit (GPU) to collaboratively compute steps a) to e), thereby achieving real-time processing. In this embodiment, the CPU can be used for process control, data management, and some geometric calculations, while the GPU can be used for parallel acceleration of computationally intensive tasks such as matrix operations, point cloud processing, and neural network inference, thus achieving efficient operation of the entire process. The collaboration between the CPU and GPU can improve the speed of point cloud processing and recognition inference, meeting the requirements of online inspection or production line cycle time, and improving the system's real-time performance and engineering availability.

[0052] As one implementation method, the target working surface in this embodiment is (e.g., an 18-degree slope at the end of the drill pipe). An 18-degree slope is generally preferred, but this slope is not limited.

[0053] In this embodiment, an 18-degree slope is one of the typical working surfaces for steel code production and recognition. Using it as the target working surface gives the process of "radius change positioning - threshold filtering separation - two-dimensional mapping recognition" a clear engineering focus. Simultaneously, the target working surface can also be set as other surface areas of the drill rod that can be used for marking, depending on actual needs. Using a typical working surface as the implementation method enhances the feasibility and engineering relevance of the solution, while retaining adaptability to different working surface configurations.

[0054] As one implementation method, the preset coordinate axis in this embodiment is the Y-axis. In this embodiment, selecting the Y-axis as the preset coordinate axis is a coordinate system convention used to unify the cutting direction and axial sorting method of the cross-sections, facilitating radius analysis and key cross-section location for the cross-section sequence. A unified coordinate axis convention reduces implementation complexity and enhances reproducibility and consistency between different data batches.

[0055] As one implementation method, the 3D point cloud data described in this embodiment is high-density point cloud data. In this embodiment, high-density point cloud data can be understood as having a sufficient number of sampling points in the target working surface and character area to ensure the stability of cross-sectional circle fitting, axis fitting, and character detail extraction; the point cloud density can be determined comprehensively based on factors such as camera resolution, scanning distance, and scanning speed. Sufficient point cloud density is beneficial to improving the accuracy of fitting and separation, reducing character stroke breaks or edge distortion caused by sparse sampling, and improving recognition stability.

[0056] As one implementation method, the steel characters described in this embodiment are formed by laser welding. In this embodiment, the steel characters formed by laser welding typically exhibit certain three-dimensional protrusions or surface morphology changes. Threshold filtering and projection mapping can utilize these three-dimensional morphological differences to achieve character region separation and two-dimensional representation. Utilizing the three-dimensional morphological features of the welded characters helps improve the separability of characters from the background and reduces the instability in reading caused by relying solely on color or lighting contrast.

[0057] As one implementation method, the two-dimensional black and white bitmap described in this embodiment is a 200×50 pixel bitmap. In this embodiment, the 200×50 pixel bitmap can be understood as a discrete representation of the projected area of ​​the steel character code after rasterization. Setting the pixel resolution can control the input scale while ensuring the detailed expression of character strokes, so as to balance the inference efficiency and recognition accuracy of the neural network. Using a bitmap input with a preset pixel resolution is beneficial to stabilizing the network input dimension, improving inference efficiency, and facilitating unified model training and deployment in engineering implementation.

[0058] Example 2

[0059] In the production and management of oil drilling tools, each drill pipe requires a unique identifier. Currently, this identifier is typically achieved by laser welding a raised steel code onto a specific area of ​​the drill pipe (such as an 18-degree slope). These steel codes contain key information such as the drill pipe's model and serial number, which is crucial for tracking the drill pipe's usage history, maintenance records, and preventing counterfeit products.

[0060] However, due to the harsh working environment of oil drill pipes, the surface of the steel characters is often covered with oil stains, rust, and dirt, and the laser welding process itself may result in irregular character edges and low contrast. Traditional two-dimensional image-based character recognition (OCR) methods have extremely low recognition rates in this scenario, making it difficult to meet actual production needs. Therefore, a stable and reliable automated recognition method is urgently needed.

[0061] This embodiment aims to illustrate the deployment method, processing flow, and effect verification of the present invention in an online production line scenario, and further explain the technical solutions adopted by the present invention to address the following two core issues: (1) The problem of precise positioning of the working face (18-degree slope): How to quickly and accurately extract the point cloud data of the specific area of ​​the 18-degree slope used to make steel characters from the complex three-dimensional structure of the drill pipe; (2) Problem of accurate reading of steel characters: How to overcome the interference caused by harsh working conditions and process defects, and to read the steel characters laser-welded on the 18-degree slope with high accuracy.

[0062] To address the aforementioned problems, this invention proposes a novel method integrating 3D point cloud processing and artificial intelligence. In this embodiment, in online production line applications, the following process is used to achieve work surface positioning and steel code recognition: 1. Point cloud data acquisition (corresponding to step A, see appendix) Figure 4 ) A steel code recognition system based on this invention has been deployed on an oil drilling tool production line. The core of the system is a high-precision structured light 3D industrial camera (or other 3D industrial camera), which is installed above the drill pipe conveyor belt to ensure complete acquisition of 3D point cloud data of the drill pipe end area.

[0063] A high-precision 3D industrial camera was used to scan the oil drill pipe, acquiring high-density point cloud data including the complete drill pipe and the steel lettering on an 18-degree slope. (Attached) Figure 4 A schematic diagram of the point cloud appearance of the drill pipe end area is shown, where the steel lettering is located on the end working surface (an 18-degree slope in this embodiment).

[0064] 2. Point cloud preprocessing and drill pipe axis extraction (corresponding to step B, see appendix) Figure 3 (corresponding to the process) After the camera scans and acquires the drill pipe point cloud, the software automatically performs point cloud preprocessing and drill pipe axis extraction: (1) Cutting and fitting: Cut the point cloud along the original Y-axis to form a series of point cloud cross sections; (2) Circle fitting: Perform circle fitting on the point cloud on each cross section, and calculate the center coordinates and fitting radius (or cross section radius) of each cross section. (3) Axis fitting: Perform linear fitting on all center coordinates to obtain the axis equation of the drill pipe in three-dimensional space; (4) Spatial transformation: A rotation matrix is ​​constructed using the Rodrigues' Rotation Formula to rotate the drill pipe axis to be parallel to the Y-axis, thereby standardizing the point cloud. After standardization, the point cloud is recut along the Y-axis, and each section is fitted with a circle again to provide a precise reference for subsequent steps.

[0065] The above process is used to eliminate differences in drill pipe posture during scanning, ensuring that subsequent face positioning and steel code area extraction are performed under a unified coordinate reference. (Appendix) Figure 5 The diagram illustrates the process of locating and capturing the target region based on standardization and cross-sectional analysis.

[0066] 3. 18-degree slope localization and point cloud subset extraction (corresponding to step C, see appendix) Figure 5 ) Based on the standardized circle fitting results in step B, the starting and ending sections of the 18-degree slope are accurately located by analyzing the variation law of the radius of each section, thereby extracting the complete point cloud subset of the 18-degree slope region.

[0067] In this embodiment, by analyzing the radius change, the system successfully located the 18-degree slope area within 0.5 seconds and obtained a subset of the point cloud of the 18-degree slope working surface. (Appendix) Figure 5 The location and extraction results of the target working face area in the drill pipe point cloud are shown in a schematic manner.

[0068] 4. Extraction and 2D mapping of the steel character code region (corresponding to step D, see appendix) Figure 5 With appendix Figure 6 ) (1) Region extraction: In the point cloud subset of the 18-degree slope, by setting a reasonable radius threshold, the background noise is effectively filtered out and the point cloud of the steel character code is accurately separated; (2) Two-dimensional mapping: The three-dimensional steel character code point cloud data is mapped onto a two-dimensional plane through orthogonal projection and transformed into a high-resolution black and white bitmap to provide standard input for the character recognition model.

[0069] In this embodiment, the extracted steel character code point cloud is converted into a 200×50 pixel black and white bitmap. (See attached image) Figure 6 An example of a two-dimensional black and white bitmap (showing the stroke shape of a character) obtained by orthogonal projection and transformation of the steel character point cloud is shown, which serves as the input for subsequent character recognition.

[0070] 5. Character recognition and output (corresponding to step E) The black and white bitmap obtained in step D is input into a pre-trained convolutional neural network (CNN) model. This CNN model is trained using the EMNIST (extended MNIST) handwritten character dataset and has strong generalization ability, enabling it to accurately recognize steel characters with unique stroke features formed by laser welding.

[0071] In this embodiment, the CNN model completes the recognition within 0.1 seconds and outputs the characters "API 5DP NC50 20250822-001".

[0072] During a week-long test, 1,000 drill rods from different batches and with different surface conditions were identified, and the average recognition accuracy reached 99.2%, far exceeding that of traditional OCR methods.

[0073] Therefore, the technical effects embodied in this embodiment include at least the following: (1) High positioning accuracy: Through precise processing of three-dimensional point cloud, millimeter-level positioning of the 18-degree slope working surface is achieved, effectively solving the problem of target area extraction in complex background; (2) High recognition accuracy. Combined with the CNN model trained by EMNIST, it has strong robustness to low-quality, low-contrast character images, which significantly improves the recognition accuracy. (3) It is highly adaptable. The entire process does not depend on specific lighting conditions and surface cleanliness, and can operate stably in real industrial environments. (4) It has a high degree of automation, realizing full automation from data collection to result output, which greatly reduces labor costs and labor intensity.

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

Claims

1. A method for locating a working face and reading steel code on an oil drill pipe, characterized in that: Includes the following steps: a) Obtain three-dimensional point cloud data of the oil drill pipe, wherein the three-dimensional point cloud data includes the drill pipe surface and the area where the steel lettering is located; b) Process the three-dimensional point cloud data, extract the spatial axis of the drill rod, and standardize the point cloud data based on the spatial axis to align the spatial axis of the drill rod with the preset coordinate axis. c) Based on the standardized point cloud data, analyze the radius variation law of each section along the spatial axis, locate the target working surface where the steel code is located, and extract the point cloud subset of the target working surface; d) In the point cloud subset of the target working surface, filter and separate the steel character code point cloud according to the radius threshold, and orthogonally project and map the steel character code point cloud into a two-dimensional black and white bitmap; e) Input the two-dimensional black and white bitmap into a pre-trained convolutional neural network model and output the recognition result of the steel character code.

2. The method according to claim 1, characterized in that: The steps for extracting and standardizing the spatial axis of the drill pipe include: Multiple cross sections are generated by cutting point cloud data along the preset coordinate axis direction; Perform circle fitting on each cross section to obtain the coordinates of the cross section center; The spatial axis of the drill pipe is determined by linear fitting of the coordinates of the center of the cross section. The point cloud data is rotated according to the Rodriguez rotation formula until the drill pipe spatial axis is aligned with the preset coordinate axis, thereby completing the standardization of the point cloud data; The standardized point cloud data is then cut along the preset coordinate axis to generate a cross section and then fitted with a circle.

3. The method according to claim 2, characterized in that: The circle fitting was performed using the least squares method.

4. The method according to claim 1, characterized in that: The process of locating the target working surface in step c) includes: determining the starting and ending sections of the target working surface by detecting a first key section where the cross-sectional radius begins to increase significantly and a second key section where the cross-sectional radius returns to a stable state, and extracting the point cloud between the first key section and the second key section as a subset of the point cloud of the target working surface.

5. The method according to claim 1, characterized in that: The radius threshold in step d) is dynamically calculated based on the average radius value and standard deviation of the target working surface point cloud subset.

6. The method according to claim 1, characterized in that: The convolutional neural network model is LeNet-5 or a variant thereof, and is trained on the EMNIST dataset, with data augmentation techniques employed to improve readability robustness.

7. The method according to claim 1, characterized in that: The 3D point cloud data is acquired using a structured light camera or a laser line scan camera.

8. The method according to claim 1, characterized in that: Steps a) to e) are completed by the collaborative computing of the central processing unit (CPU) and the graphics processing unit (GPU).

9. The method according to claim 1, characterized in that: The target working surface is the 18-degree slope at the end of the drill pipe.

10. The method according to any one of claims 1 to 9, characterized in that: The steel lettering is formed by laser welding.