A method for preventing repeated printing of product markings on the surface of steel pipes
By constructing a closed-loop verification system based on visual recognition and PaddleOCR, the problem of lack of closed-loop feedback in steel pipe printing equipment was solved, the uniqueness detection of steel pipe surface identifiers was realized, the hidden dangers of repeated printing quality were eliminated, and the quality management and intelligent manufacturing level of the steel pipe industry were improved.
Patent Information
- Application Number
- CN202610141165.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-02
- Publication Date
- 2026-06-16
AI Technical Summary
Existing steel pipe inkjet printing equipment lacks a closed-loop feedback function, which makes it impossible to detect repeated printing of identifiers in a timely manner, posing potential quality hazards and personal safety risks.
Visual recognition technology and the PaddleOCR framework are used to detect steel pipe surface identifiers in real time, and a closed-loop verification system is built. Hikvision cameras and Baidu PaddleOCR are used to identify printed characters and compare serial numbers with system standards in real time to ensure uniqueness.
This technology enables the unique detection of surface identifiers on steel pipes, eliminates the risk of repeated printing, and improves quality management and intelligent manufacturing levels.
Abstract
Description
Technical Field
[0001] This invention relates to the field of steel pipe surface marking printing technology, specifically to a method for preventing repeated printing of product markings on steel pipe surfaces, namely a method for preventing repeated printing of product markings based on the PaddleOCR framework for real-time detection of product markings on steel pipe surfaces. Background Technology
[0002] Currently, the steel pipe industry commonly uses inkjet printing equipment to mark the surface of steel pipes to identify products and maintain traceability. However, this inkjet printing equipment is generally an open system without closed-loop feedback. The equipment lacks a function to detect and alarm for repeated printing of identifiers, relying solely on manual inspection. If manual inspection fails to detect printing anomalies in a timely manner, abnormally printed products may enter the market, posing a significant product quality hazard. Even if manual inspection does detect abnormal printing, the handling of such products still presents significant safety risks for personnel involved in hoisting operations. Summary of the Invention
[0003] The purpose of this invention is to overcome the problems existing in the prior art and to provide a method for preventing repeated printing of product markings on the surface of steel pipes.
[0004] The technical solution provided by this invention is: a method for preventing repeated printing of product markings on the surface of steel pipes, characterized by the following steps: Step 1, Visual Recognition: Based on the distribution characteristics of the characters printed on the pipe surface, the position of the fixed camera is adjusted appropriately. Then, the camera SDK is downloaded, and a Winform visual interface is created in VS2022. When the host computer detects the PLC printing completion signal, it calls the camera SDK to take a picture and sends the image to Baidu PaddleOCR for data recognition. The recognized data is then combined into a string. Step 2, reading the printed content: The host computer detects the signal received by the PLC through Hslcommunication, and reads the "serial number and trial batch number" through Hslcommunication instructions and calculates the character length of these two strings respectively; Step 3, Data Filtering: First, process the string acquired by visual recognition in Step 1, removing useless spaces to form the target string; then, based on the batch number identified in Step 2, locate and calculate the index of the batch number in the target string, and then search and read the characters of the specified target serial number length before the batch number based on the index, thus completing the reading of the unique identifier string of the tube body; finally, compare the searched serial number string with the "serial number" read in Step 2 one by one. If the strings are completely consistent, the recognition is considered successful; otherwise, the recognition is considered unsuccessful and an alarm is triggered, indicating an abnormality in the tube body printing.
[0005] The beneficial effects of this invention are: 1. This invention relates to data identification and data filtering, directly identifying characters on the surface of the pipe, identifying the unique identifier of each steel pipe and comparing it with the identifier sent by the host computer in real time, and rejecting unqualified printed products, so as to completely eliminate the quality risks caused by repeated printing of characters on the surface of the steel pipe. 2. The visual recognition steel pipe serial number closed-loop verification system constructed by this invention fundamentally eliminates the quality monitoring defects of the existing pipe body printing system, improves the level of on-site quality management, and enhances the level of intelligent manufacturing in the steel pipe industry. Detailed Implementation
[0006] To better understand and implement this invention, the following detailed description is provided.
[0007] A method for preventing repeated printing of product markings on the surface of steel pipes specifically includes the following steps: Step 1, Visual Recognition: Based on the distribution characteristics of the characters printed on the pipe surface, the position of the Hikvision camera is adjusted and fixed appropriately. Then, the camera SDK is downloaded from the Hikvision website, and a Winform visual interface is created in VS2022. When the host computer detects the PLC printing completion signal through Hslcommunication, the visual interface calls the Hikvision SDK to take a picture and sends the image to Baidu PaddleOCR for data recognition. The recognized data is then combined into a string. Step 2, Reading the Printed Content: The host computer detects the signal received by the PLC via Hslcommunication. The host computer then reads the "serial number and trial batch number" using Hslcommunication instructions and calculates the length of the received serial number characters. Serial Number OperateResult<byte[]> L2_xuLieHao = siemensTcpNet.Read("DBx.x", 10); if (L2_xuLieHao.IsSuccess) { xuLieHao HMI = Encoding.ASCII.GetString(L2_xuLieHao.Content, 0, 8).Trim().ToString();} Trial batch number OperateResult<byte[]> L2_shiPiHao = siemensTcpNet.Read("DB520.22",10); if (L2_shiPiHao.IsSuccess) { shiPiHaoHMI = Encoding.ASCII.GetString(L2_ shiPiHao.Content, 0, 8).Trim().ToString();}; Step 3, Data Filtering: First, process the string acquired by visual recognition in Step 1, removing useless spaces to form the target string. Then, based on the batch number identified in Step 2, locate and calculate the index of the batch number in the target string. Next, search and read the characters of the specified target position serial number length before the batch number based on the index, thus completing the reading of the unique identifier string for the tube. Finally, compare the searched serial number string with the serial number string read in Step 2 one by one. If the strings are completely identical, the recognition is considered successful; otherwise, the recognition is considered unsuccessful and an alarm is triggered, indicating an abnormality in the tube printing. In case of an abnormality, directly lock the equipment and trigger an alarm until manual intervention is required before proceeding to the next process.
[0008] This invention provides a method for preventing duplicate printing of product markings on steel pipe surfaces. Based on repeated research of the printing strings, it was discovered that each steel pipe corresponds to a unique serial number, which appears before or after a fixed batch number string. Based on the characteristics of the printing strings, Baidu PaddleOCR is used to detect and identify the unique serial number printed on the pipe surface in real time via video. This is then compared in real time with the L2 system standard string read by Hslcommunication. If the visual inspection matches the L2 system string, the printing is considered correct. Based on the PaddleOCR real-time visual inspection system, a closed-loop, full-process quality inspection system for pipe printing is formed with the existing printing system, completely eliminating potential quality issues in the pipe printing system and thus improving the level of intelligent manufacturing in the steel pipe industry.
[0009] It should be understood that any technical features not elaborated in detail in this specification belong to the prior art. Although the embodiments of this application have been described, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make more forms under the guidance of this application without departing from the spirit and scope of protection of the claims, and these all fall within the scope of protection of this application.
Claims
1. A method for preventing repeated printing of product markings on the surface of steel pipes, characterized in that, Includes the following steps: Step 1, Visual Recognition: Based on the distribution characteristics of the characters printed on the pipe surface, the position of the fixed camera is adjusted appropriately. Then, the camera SDK is downloaded, and a Winform visual interface is created in VS2022. When the host computer detects the PLC printing completion signal, it calls the camera SDK to take a picture and sends the image to Baidu PaddleOCR for data recognition. The recognized data is then combined into a string. Step 2, Reading the printed content: The host computer detects the signal received by the PLC through Hslcommunication, and reads the "serial number and trial batch number" through Hslcommunication instructions and calculates the character length of these two strings respectively; Step 3, Data filtering: First, the string collected by visual recognition in Step 1 is processed to remove useless spaces and form the target string; Subsequently, based on the test batch number identified in step two, the index of the test batch number in the target string is located and calculated. Then, based on the index, the characters with the specified target serial number character length before the test batch number are searched and read, thus completing the reading of the unique identifier string of the tube body. Finally, the searched serial number string is compared one by one with the "serial number" read in step two. If the strings are completely consistent, the identification is considered successful; otherwise, the identification is considered to have failed and an alarm is triggered, indicating that the tube body printing is abnormal.