Torque control method and system of intelligent wrench and intelligent wrench

By acquiring and analyzing the sleeve QR code image and the fastener physical image, combined with the edge detection algorithm, the problem of difficult to accurately determine the torque value of the wrench in the construction of the power tower is solved, efficient and reliable torque control is achieved, and construction quality and safety are improved.

CN120580486APending Publication Date: 2025-09-02GUANGDONG POWER GRID CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510689921.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2025-09-02

AI Technical Summary

Technical Problem

In the prior art, it is difficult to accurately determine the output torque of the wrench during construction of electric towers, which makes it difficult to ensure construction quality and safety. Especially when manually inputting torque values ​​in multiple bolt models is prone to errors, and the automatic identification and verification functions are lacking.

Method used

By obtaining the QR code image on the sleeve and the real image of the fastener, pre-processing and analysis, combining the edge detection algorithm to identify the fastener type and diameter, accurately calculate the torque value, and ensure the accuracy and reliability of the torque value through multiple verification.

Benefits of technology

It realizes accurate determination of the output torque of the wrench during the construction of the electric tower, improves construction efficiency and quality control level, reduces manual errors and time costs, and ensures the reliability and safety of construction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120580486A_ABST
    Figure CN120580486A_ABST
Patent Text Reader

Abstract

The invention discloses a torque control method and system of an intelligent wrench and the intelligent wrench, and belongs to the field of power construction, and the method comprises the steps: carrying out the image preprocessing of a two-dimensional code image on a sleeve and a real object image of a fastener, and obtaining a first preprocessing result and a second preprocessing result; analyzing the first preprocessing result to obtain an analysis result so as to determine a first torque value; detecting the contour information of the fastener in the second preprocessing result through an edge detection algorithm, determining the type of the fastener based on the contour information, selecting a corresponding calculation method according to the type of the fastener to calculate the diameter of the corresponding fastener, and determining a second torque value if the diameter of the fastener meets a second preset condition; and determining a target torque value of the intelligent wrench based on the first torque value and the second torque value, and controlling the intelligent wrench to work at the target torque value. Therefore, the problem that the output torque of the wrench is difficult to accurately determine in the prior art can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electric power construction, and in particular to a torque control method and system for an intelligent wrench, and the intelligent wrench. Background Art

[0002] During power tower construction, various bolt types are used in different parts of the tower, requiring correspondingly different sleeve sizes and tightening torques. Therefore, there is an urgent need to develop a method that can automatically identify bolt types and control torque values. This automated method can improve construction accuracy and efficiency, ensure the reliability and safety of power tower construction, and meet the high-quality, high-efficiency, and high-safety requirements of modern power engineering construction.

[0003] The existing technology mostly uses the manual input method of APP to set the torque value, thereby controlling the output torque of the electric smart wrench and the adaptability of the socket. However, this manual input method has obvious defects. On the one hand, when faced with many different types of bolts, it is difficult for operators to accurately input each corresponding torque value, especially when the construction schedule is tight and the workload is large, the probability of error will increase further. On the other hand, manual input lacks the automatic verification and identification function of the bolt model, and cannot promptly detect and correct the wrong settings caused by the operator's negligence, making it difficult to effectively guarantee the construction quality and unable to meet the high-precision and high-reliability requirements of power tower construction. Summary of the Invention

[0004] The present invention provides a torque control method and system for an intelligent wrench, and an intelligent wrench, which can solve the problem in the prior art that it is difficult to accurately determine the output torque of the wrench.

[0005] An embodiment of the present invention provides a torque control method for an intelligent wrench, comprising:

[0006] Obtaining a QR code image on a sleeve and a physical image of a fastener, and performing image preprocessing on the QR code image and the physical image to obtain a first preprocessing result and a second preprocessing result, wherein the sleeve and the fastener are both provided on the head of the smart wrench, and the fastener includes a bolt and a nut;

[0007] parsing the first preprocessing result to obtain an analysis result, and determining a first torque value based on the analysis result;

[0008] detecting contour information of the fastener in the second preprocessing result using an edge detection algorithm, determining a fastener type based on the contour information, selecting a corresponding calculation method based on the fastener type to calculate a corresponding fastener diameter, and determining a second torque value if the fastener diameter satisfies a second preset condition, wherein the fastener diameter includes a bolt diameter and a nut diameter;

[0009] Based on the first torque value and the second torque value, a target torque value of the smart wrench is determined, and the smart wrench is controlled to operate at the target torque value so that the socket on the smart wrench performs a screwing operation on the bolt and the nut.

[0010] The embodiment of the present application obtains the QR code image and the physical image of the fastener on the sleeve and pre-processes them, which can provide a clear and accurate image basis for subsequent analysis and identification; by parsing the QR code image, the pre-stored information on the sleeve can be quickly obtained, reducing the errors and time cost of manual input, and then preliminarily determining the first torque value, providing a reference basis for the subsequent determination of the target torque value; by detecting the contour information of the fastener, it is convenient to subsequently select an appropriate calculation method to calculate the diameter of the fastener, so that a more accurate second torque value can be obtained later; based on the first torque value and the second torque value, a comprehensive analysis is performed to minimize the errors or uncertainties that may be caused by a single source, providing a more accurate and reliable target torque value, thereby improving construction efficiency. Compared with the existing technology, the present application can accurately determine the output torque of the wrench, thereby improving construction efficiency.

[0011] Furthermore, the determining of the first torque value based on the analytical result is specifically as follows:

[0012] Filtering the analysis results to obtain a screening result, and determining whether the screening result meets a first preset condition;

[0013] If the conditions are met, the parameters of the screening results are extracted to obtain the sleeve model and torque reference value, and it is determined whether the torque reference value falls within the preset safe torque value range;

[0014] If yes, it is determined whether the sleeve model matches an element in a preset torque mapping table; if so, the torque reference value is used as the first torque value.

[0015] By determining whether the screening results meet the first pre-set condition and then performing parameter extraction and verification if they do, the accuracy and reliability of the torque reference value obtained from the QR code image are ensured. Further verification of whether the torque reference value is within the safe range and whether the socket model matches helps prevent construction quality issues or safety accidents caused by using the wrong socket or unreasonable torque value.

[0016] Furthermore, the torque control method of the intelligent wrench further includes:

[0017] If the screening result does not meet the first preset condition, determining a corresponding material strength coefficient based on the fastener type;

[0018] A corresponding first torque value is determined based on the material strength coefficient and a fastener diameter, wherein the fastener diameter includes the bolt diameter and the nut diameter.

[0019] In this way, when the screening result does not meet the first preset condition, an alternative method is provided to determine the first torque value, namely, calculation based on the type of fastener, material strength coefficient and fastener diameter. This ensures that even if the QR code image parsing fails, a reasonable torque value can be calculated based on the physical properties of the fastener.

[0020] Furthermore, the detecting of the contour information of the fastener in the second preprocessing result by an edge detection algorithm is specifically as follows:

[0021] Calculating the gradient magnitude and gradient direction of each pixel in the second preprocessed image;

[0022] Performing a non-maximum suppression operation on each pixel in the image to obtain a seventh preprocessing result;

[0023] A plurality of edge points corresponding to the fastener in the seventh preprocessing result are determined by a dual threshold algorithm, and the edge points are connected using a contour tracking algorithm to obtain contour information of the fastener.

[0024] This helps to accurately extract the outline of the fastener, providing an accurate basis for further determining the fastener type and calculating the fastener diameter, thereby ensuring the reliability of the second torque value.

[0025] Furthermore, when the fastener is a bolt, the corresponding calculation method is selected according to the fastener type to calculate the corresponding fastener diameter, specifically:

[0026] traversing the potential circular area in the contour information by using the Hough circle transform algorithm, screening out the circumscribed circle contour closest to the bolt head, and determining the circumscribed circle parameters;

[0027] The bolt diameter is calculated based on the circumscribed circle parameters.

[0028] In this way, the Hough circle transform algorithm is used to accurately determine the circumscribed circle contour of the bolt head, and the bolt diameter is calculated based on this, providing accurate dimensional data for the subsequent calculation of the torque value based on the bolt diameter.

[0029] Furthermore, when the fastener is a nut, the corresponding calculation method is selected according to the fastener type to calculate the corresponding fastener diameter, specifically:

[0030] Based on the contour information, the least square method is used to calculate the geometric center and vertex distribution;

[0031] Based on the geometric center and the vertex distribution, an equivalent circle of the nut is determined, and based on the equivalent circle, the nut diameter is determined.

[0032] In this way, the least squares method is used to calculate the geometric center and vertex distribution, and the equivalent circle of the nut is determined, thereby calculating the nut diameter, which provides accurate dimensional data for the subsequent calculation of the torque value based on the nut diameter.

[0033] Furthermore, the image preprocessing is performed on the two-dimensional code image and the physical object image respectively to obtain a first preprocessing result and a second preprocessing result, specifically:

[0034] Denoising the two-dimensional code image and the physical object image respectively to obtain a third preprocessing result and a fourth preprocessing result;

[0035] The third preprocessing result and the fourth preprocessing result are respectively gray-scaled to obtain a fifth preprocessing result and a sixth preprocessing result, and the fifth preprocessing result and the sixth preprocessing result are respectively binarized using the Otsu algorithm to obtain a first preprocessing result and a second preprocessing result.

[0036] In this way, through image preprocessing, the image quality can be effectively improved, interference information can be removed, and target features can be highlighted, providing a clear and accurate image basis for subsequent QR code parsing and edge detection.

[0037] Furthermore, the torque control method of the smart wrench also includes: if the number of times that the screening result fails to meet the first preset condition reaches a preset number threshold, the first preprocessing result is analyzed to determine the cause of failure, and the smart wrench is adjusted based on the cause of failure to obtain a clear target QR code image.

[0038] This automatically adjusts the image acquisition and analysis process based on actual conditions, rather than relying solely on manual intervention, improving work efficiency and convenience. By continuously optimizing image acquisition quality and analysis, delays and repetitive operations caused by image issues can be reduced throughout the entire process, enabling the smart wrench to more quickly and accurately determine output torque, improving overall construction efficiency and quality control.

[0039] Another embodiment of the present invention further provides a torque control system for an intelligent wrench, comprising: an acquisition module, a first determination module, a second determination module, and a third determination module;

[0040] The acquisition module is configured to acquire a QR code image on the sleeve and a physical image of the fastener, and perform image preprocessing on the QR code image and the physical image to obtain a first preprocessing result and a second preprocessing result, wherein the sleeve and the fastener are both provided on the head of the smart wrench, and the fastener includes a bolt and a nut;

[0041] The first determining module is configured to analyze the first preprocessing result to obtain an analysis result, and determine a first torque value based on the analysis result;

[0042] The second determination module is configured to detect the profile information of the fastener in the second preprocessing result using an edge detection algorithm, determine the type of the fastener based on the profile information, select a corresponding calculation method according to the fastener type to calculate a corresponding fastener diameter, and determine a second torque value if the fastener diameter satisfies a second preset condition, wherein the fastener diameter includes a bolt diameter and a nut diameter;

[0043] The third determination module is used to determine a target torque value of the smart wrench based on the first torque value and the second torque value, and control the smart wrench to operate at the target torque value so that the socket on the smart wrench performs a tightening operation on the bolt and nut.

[0044] The embodiment of the present application obtains the QR code image and the physical image of the fastener on the sleeve and pre-processes them, which can provide a clear and accurate image basis for subsequent analysis and identification; by parsing the QR code image, the pre-stored information on the sleeve can be quickly obtained, reducing the errors and time cost of manual input, and then preliminarily determining the first torque value, providing a reference basis for the subsequent determination of the target torque value; by detecting the contour information of the fastener, it is convenient to subsequently select an appropriate calculation method to calculate the diameter of the fastener, so that a more accurate second torque value can be obtained later; based on the first torque value and the second torque value, a comprehensive analysis is performed to minimize the errors or uncertainties that may be caused by a single source, providing a more accurate and reliable target torque value, thereby improving construction efficiency. Compared with the existing technology, the present application can accurately determine the output torque of the wrench, thereby improving construction efficiency.

[0045] Another embodiment of the present invention further provides a smart wrench, comprising: a wrench and a controller, wherein the wrench is communicatively connected to the controller, the wrench includes a main body and a head, the head is provided with a sleeve, the main body is connected to a bolt or nut via the sleeve, and the controller implements the steps of the torque control method of the smart wrench as described in the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for use in the implementation. Obviously, the drawings described below are only some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0047] Figure 1 This is a flow chart of an embodiment of the torque control method of the smart wrench provided by the present application;

[0048] Figure 2 This is a schematic structural diagram of an embodiment of a torque control system for an intelligent wrench provided in the present application;

[0049] Figure 3 This is a schematic structural diagram of an embodiment of the smart wrench provided in this application. DETAILED DESCRIPTION

[0050] To make the objectives, technical solutions, and advantages of this application more clear, the technical solutions in this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this application.

[0051] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned figure descriptions are intended to cover non-exclusive inclusions.

[0052] In the description of the embodiments of this application, the technical terms "first" and "second" are used only to distinguish different objects and should not be understood to indicate or imply relative importance or implicitly specify the quantity, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, the meaning of "plurality" is more than two, unless otherwise clearly and specifically defined.

[0053] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0054] In the description of the embodiments of this application, the term "and / or" is simply a description of the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent the following three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this document generally indicates that the associated objects are in an "or" relationship.

[0055] In the description of the embodiments of the present application, the term "multiple" refers to more than two (including two). Similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple pieces" refers to more than two pieces (including two pieces).

[0056] In the description of the embodiments of the present application, unless otherwise expressly specified or limited, technical terms such as "installed," "connected," "connected," and "fixed" should be understood in a broad sense. For example, they can refer to fixed connections, detachable connections, or integration; mechanical connections or electrical connections; direct connections or indirect connections through an intermediate medium; internal connections between two components or interactions between two components. Those skilled in the art can understand the specific meanings of the above terms in the embodiments of the present application based on specific circumstances.

[0057] See also Figure 1 In order to solve the problem in the prior art that it is difficult to accurately determine the output torque of a wrench, an embodiment of the present invention provides a torque control method for an intelligent wrench, comprising: steps S101 to S104;

[0058] Step S101: Acquire a QR code image on a sleeve and a physical image of a fastener, and perform image preprocessing on the QR code image and the physical image to obtain a first preprocessing result and a second preprocessing result, wherein the sleeve and the fastener are both provided on the head of the smart wrench, and the fastener includes a bolt and a nut;

[0059] In some embodiments, a QR code image on the sleeve and a physical image of the fastener are obtained, specifically: a high-resolution camera is installed in the smart wrench and the camera is initialized. When construction begins, the smart wrench is brought close to the sleeve and bolt / nut to scan the QR code image on the sleeve through the camera and take a physical image of the fastener.

[0060] It should be noted that the camera should cover both the sleeve and fastener areas. If the field of view of a single camera is insufficient, time-sharing shooting or a dual-camera layout can be used.

[0061] It should be noted that when the camera is actually used, the camera has a switch. When recognition is required, the camera can be turned on to scan or shoot. When recognition is not required, the camera can be turned off.

[0062] It should be noted that the QR code image contains information such as the sleeve model and the corresponding torque value. The QR code image has fast recognition speed, high accuracy, and a certain fault tolerance. Even if it is partially damaged (important identification information is not damaged), the information can still be read.

[0063] In some embodiments, the image preprocessing is performed on the QR code image and the physical image respectively to obtain a first preprocessing result and a second preprocessing result, including: denoising the QR code image and the physical image respectively to obtain a third preprocessing result and a fourth preprocessing result; grayscale processing is performed on the third preprocessing result and the fourth preprocessing result respectively to obtain a fifth preprocessing result and a sixth preprocessing result, and binarization processing is performed on the fifth preprocessing result and the sixth preprocessing result respectively by the Otsu algorithm to obtain a first preprocessing result and a second preprocessing result. Specifically, first, the two-dimensional code image and the physical image are smoothed respectively using mean filtering to eliminate random noise and make the image clearer, thereby obtaining the corresponding third preprocessing result and fourth preprocessing result; then, the third preprocessing result and the fourth preprocessing result are grayscaled using the maximum value method, that is, the maximum value of the R, G, and B channels of the RGB pixels of the third preprocessing result and the fourth preprocessing result are calculated, and the maximum value is used as the grayscale value to realize grayscale processing, thereby obtaining the fifth preprocessing result and the sixth preprocessing result; finally, the Otsu algorithm is used to automatically calculate the optimal threshold and perform binarization processing to separate the image into foreground (two-dimensional code) and background, thereby obtaining the first preprocessing result and the second preprocessing result.

[0064] It should be noted that the Otsu algorithm is a commonly used image binarization method, which is used to automatically determine the optimal threshold of an image and segment the image into foreground and background.

[0065] In this way, through image preprocessing, the image quality can be effectively improved, interference information can be removed, and target features can be highlighted, providing a clear and accurate image basis for subsequent QR code parsing and edge detection.

[0066] Step S102, analyzing the first preprocessing result to obtain an analysis result, and determining a first torque value based on the analysis result;

[0067] In some embodiments, the first preprocessing result is parsed to obtain a parsing result, specifically: the preprocessed QR code image (i.e., the first preprocessing result) is parsed using the open source library ZXing to extract the original character string, i.e., the parsing result, wherein the parsing result may include, but is not limited to: (1) sleeve model: such as M45, for tool parameter matching; (2) reference torque value: such as 1900N·m, as an operating benchmark; (3) allowable adjustment range: automatically calculated ±5% (e.g., 1805-1995N·m); (4) production batch code: to support quality traceability; (5) verification validity period: anti-counterfeiting verification to prevent expired or illegal data.

[0068] It should be noted that after obtaining the analysis results, if there is damaged data, the Reed-Solomon algorithm needs to be used to repair the locally damaged data. If the damage exceeds the fault tolerance, the analysis failure is returned and an alarm or retry process is triggered.

[0069] In some embodiments, the first torque value is determined based on the analysis result, specifically: the analysis result is filtered to obtain a filtering result, and it is determined whether the filtering result meets a first preset condition; if so, parameter extraction is performed on the filtering result to obtain a sleeve model and a torque reference value, and it is determined whether the torque reference value falls within a preset safety torque value range; if so, it is determined whether the sleeve model matches an element in a preset torque mapping table, and if so, the torque reference value is used as the first torque value. Specifically, first, in order to quickly filter out useful information, a regular expression is used to filter the parsing results to filter out the required information (such as the socket model and the torque reference value) to obtain the filtering results; then, a first preset condition is defined, that is, whether the text strictly matches the regular expression, and then whether the filtering result meets the first preset condition is judged. If the format of the filtering result strictly matches the regular expression, it means that the condition is met; then, the socket model and the torque reference value are extracted from the filtering results that meet the condition, and it is checked whether the extracted torque reference value (such as 1900) is within the preset safe torque value range (such as 100 to 3000 N·m); finally, if the torque reference value is within the safe range, it is further judged whether the socket model (such as M45) matches the element in the preset torque mapping table to compare whether the socket model is legal. If the socket model matches the torque mapping table, the torque reference value is used as the first torque value (such as 1900).

[0070] The torque mapping table of the bolts is shown in Table 1:

[0071] Bolt specifications Bolt torque value (N·m) M39 1100 M42 1400 M45 1900 M48 2100 M52 2300 M56 2500

[0072] It should be noted that if there are missing fields in the parsing results, errors in the format of the screening results, torque reference values ​​outside the safe range, or mismatched models, the QR code will need to be re-scanned for parsing or an alarm will be triggered to block invalid data transmission. This ensures that the data format is standardized, the values ​​are reasonable, and the models are legal, thereby ensuring the accuracy and safety of the device parameter configuration. Different errors should be assigned corresponding error handling methods to address the corresponding issues.

[0073] It should be noted that the parsing is successful when the screening results meet the following conditions simultaneously: ① The regular expression completely matches the socket model (such as M45) and the torque value field; ② The model exists in the local encrypted mapping table and the torque value is within the safety threshold (100-3000N·m); ③ The production batch code is verified to be consistent with the socket entity through SHA-256 hash verification; ④ Multimodal verification (such as the magnetic code and QR code information match >95%).

[0074] It should be noted that the main process of the multimodal verification is: QR code parsing → newly added triple verification, among which, the first level: QR code parsing: can decode and extract the model (such as M45) and torque value (such as 1900N·m). If it fails, the camera will be triggered to rescan; the second level: RFID verification: the card reader verifies the consistency of the sleeve model and the QR code parsing value. If it fails, it will prompt "the sleeve does not match"; the third level: sleeve physical verification: image recognition of tooth shape / inner diameter features, AI-assisted model classification, if it fails, it will prompt "the sleeve is worn or the model is wrong"; the fourth level: bolt compatibility detection: image detection of bolt diameter, comparison of sleeve model standard value, if it fails, it will prompt "the bolt and sleeve are incompatible". By cross-verifying multimodal data (QR code / RFID / image / AI) and adding dynamic error handling (retry → warning → lock-machine graded response), the accuracy of torque value setting and operational safety can be improved, and interference such as oil pollution / obstruction in industrial sites can be dealt with. Single data collection errors can be eliminated, and hardware errors such as camera focus deviation and RFID signal drift can be compensated. At the same time, mismatches between sleeves and bolt models can be intercepted to prevent malicious replacement of QR codes (combined with RFID encryption and physical feature verification), thereby ensuring the reliability of torque setting in high-risk scenarios such as power towers.

[0075] It should be noted that the regular expression can be ^SOCKET_INFO:([AZ]\d+)\|TORQUE:(\d{3,4})$, where the sleeve model: a combination of uppercase letters and numbers (such as M45) is extracted through the first capture group, and the torque reference value: a 3-4 digit integer (such as 1900) is extracted through the second capture group. The text format of the obtained screening result is: SOCKET_INFO: model | TORQUE: torque value format. For example, if the screening result is SOCKET_INFO:M45|TORQUE:1900, the sleeve model (such as M45) can be extracted from the ([AZ]\d+) capture group, and the torque reference value (such as 1900) can be extracted from the (\d{3,4}) capture group.

[0076] In this way, through double verification of format and value range, the transmission of dirty data can be prevented, the accuracy and consistency of data can be ensured, and the parameter configuration requirements of automation equipment can be adapted.

[0077] By determining whether the screening results meet the first pre-set condition and then performing parameter extraction and verification if they do, the accuracy and reliability of the torque reference value obtained from the QR code image are ensured. Further verification of whether the torque reference value is within the safe range and whether the socket model matches helps prevent construction quality issues or safety accidents caused by using the wrong socket or unreasonable torque value.

[0078] In some embodiments, the torque control method of the smart wrench further includes: if the screening result does not meet the first preset condition, determining the corresponding material strength coefficient based on the fastener type; and determining the corresponding first torque value based on the material strength coefficient and the fastener diameter, wherein the fastener diameter includes the bolt diameter and the nut diameter. Specifically, if the format of the screening result does not strictly match the regular expression, it means that the condition is not met. In this case, it is necessary to determine the specific type of the fastener based on the image, whether it is a bolt or a nut. Then, based on the material and grade of the fastener, the material strength coefficient is searched from the relevant standards or material manuals. Then, the corresponding fastener diameter, i.e., the bolt diameter or the nut diameter, is determined according to the ASME standard. Finally, the first torque value is calculated according to the formula, and the relevant calculation formula is: first torque value = k × material strength coefficient × fastener diameter2, where k is the preset coefficient.

[0079] It should be noted that the corresponding third torque value must be retrieved from a locally stored model-torque mapping table based on the socket signal. If the table lookup is successful, the third torque value is directly used as the first torque value. If the table lookup fails, the first torque value is derived based on the physical parameters of the socket model. If the calculated first torque value conflicts with the national standard or the manufacturer's preset third torque value, the data conflict priority is: national standard > manufacturer preset > calculated value.

[0080] It should be noted that during this process, the operator can also re-determine whether the socket model and torque value are correct. Combined with multiple verifications such as the socket QR code to identify the torque value and the bolt diameter and nut diameter feature identification, it can automatically determine whether it is correct. For example, if the bolt diameter is 36 and the socket QR code parsing result is M45, the judgment fails (the QR code may be pasted incorrectly) to ensure the accuracy of the torque value setting. The specific judgment method is not the focus of this application, so it will not be expanded here.

[0081] In this way, when the screening result does not meet the first preset condition, an alternative method is provided to determine the first torque value, namely, calculation based on the type of fastener, material strength coefficient and fastener diameter. This ensures that even if the QR code image parsing fails, a reasonable torque value can be calculated based on the physical properties of the fastener.

[0082] Step S103: detecting the contour information of the fastener in the second preprocessing result using an edge detection algorithm, determining the type of the fastener based on the contour information, and selecting a corresponding calculation method according to the fastener type to calculate a corresponding fastener diameter. If the fastener diameter meets a second preset condition, determining a second torque value, wherein the fastener diameter includes a bolt diameter and a nut diameter.

[0083] In some embodiments, detecting the contour information of the fastener in the second preprocessing result using an edge detection algorithm includes: calculating the gradient strength and gradient direction of each pixel in the second preprocessing image; performing a non-maximum suppression operation on each pixel in the image to obtain a seventh preprocessing result; determining a plurality of edge points corresponding to the fastener in the seventh preprocessing result using a dual threshold algorithm, and connecting the edge points using a contour tracking algorithm to obtain the contour information of the fastener. Specifically, first, applying a gradient operator to the second preprocessing result image to calculate the gradient strength and gradient direction of each pixel in the image, wherein the gradient strength reflects the rate of change of the image grayscale value at that point, and the gradient direction indicates the direction of the fastest grayscale change; then, based on the gradient calculation results, performing a non-maximum suppression operation on each pixel in the image to remove pixels whose gradient strength is not a local maximum, thereby refining the edge and making the edge line clearer, to obtain the seventh preprocessing result; then, selecting two thresholds, one as a high threshold and the other as a low threshold, and marking pixels whose gradient strength is greater than the high threshold as strong edge pixels, and marking pixels whose gradient strength is between the high and low thresholds as weak edge pixels. Finally, by checking the connection relationship between weak edge pixels and strong edge pixels, the weak edge pixels connected to the strong edge pixels are retained, and finally a complete edge contour is formed, that is, the contour information of the fastener is obtained.

[0084] It should be noted that the gradient operator may include but is not limited to the Sobel operator, the Prewitt operator, and the Roberts operator.

[0085] This helps to accurately extract the outline of the fastener, providing an accurate basis for further determining the fastener type and calculating the fastener diameter, thereby ensuring the reliability of the second torque value.

[0086] In some embodiments, the fastener type is determined based on the contour information, specifically: the specific fastening type is determined according to the number of contour edges in the contour information, wherein the number of circular edges of the bolt head is ≈ infinite, and the number of hexagonal edges of the nut is 6, so it can be determined whether it is a bolt or a nut.

[0087] In some embodiments, the fastener type is determined based on the profile information. Specifically, the fastener's geometric features, such as circumference, area, and circularity, are calculated based on the profile information to determine the fastener type. Then, based on the profile features, the fastener is determined to be a bolt or a nut. For example, circularity is a dimensionless value that measures the circularity of a profile. For a perfect circle, the circularity is 1; for other shapes, the circularity is less than 1. If the circularity is greater than 0.8, it is considered a bolt; otherwise, it is considered a nut.

[0088] In some embodiments, when the fastener is a bolt, the corresponding calculation method is selected according to the fastener type to calculate the corresponding fastener diameter, including: traversing the potential circular area in the contour information through the Hough circle transform algorithm, screening out the circumscribed circle contour closest to the bolt head to determine the circumscribed circle parameters; and calculating the bolt diameter based on the circumscribed circle parameters. Specifically, first, the Hough circle transform algorithm is used to detect potential circular areas in the contour information, and the circumscribed circle contour closest to the bolt head is screened out according to certain standards (such as circularity, area, etc.) (assuming that the bolt head is the largest circular contour in the image, the circle with the largest radius is screened out), then, the coordinates of the center of the circumscribed circle and the radius and other parameters are obtained, and finally, the diameter of the bolt is calculated based on the radius of the circumscribed circle, that is, the bolt diameter is twice the radius of the circumscribed circle, and the bolt diameter = 2×detection circle radius.

[0089] It's important to note that the Hough Circle Transform (Hough Circle Transform) is an algorithm for detecting circles in images, widely used in computer vision and image processing. Its basic idea is to vote on edge points in an image in a parameter space to determine the parameter combination that is most likely to form a circle.

[0090] In this way, the Hough circle transform algorithm is used to accurately determine the circumscribed circle contour of the bolt head, and the bolt diameter is calculated based on this, providing accurate dimensional data for the subsequent calculation of the torque value based on the bolt diameter.

[0091] In some embodiments, when the fastener is a nut, the calculation method corresponding to the fastener type is selected to calculate the corresponding fastener diameter, including: based on the contour information, using the least squares method to calculate the geometric center and vertex distribution; based on the geometric center and the vertex distribution, determining the equivalent circle of the nut, and determining the nut diameter based on the equivalent circle. Specifically, first, based on the contour information, the least squares method is used to fit the contour points, the geometric center is calculated, and the contour points are converted into a numpy array, and the distance from each point to the geometric center, that is, the vertex distribution, is calculated. Then, the average distance from each point to the geometric center is used as the radius of the equivalent circle. Finally, the diameter of the nut is calculated based on the radius of the equivalent circle, that is, the nut diameter is twice the radius of the equivalent circle.

[0092] In some embodiments, when the fastener is a nut, polygonal approximation can be performed on the nut contour information to detect the vertices of the contour. After that, the Euclidean distance between each two adjacent vertices is calculated, and the maximum distance is found as the width across the side. Finally, the maximum width across the side is used as the equivalent diameter of the nut.

[0093] In this way, the least squares method is used to calculate the geometric center and vertex distribution, and the equivalent circle of the nut is determined, thereby calculating the nut diameter, which provides accurate dimensional data for the subsequent calculation of the torque value based on the nut diameter.

[0094] In this way, the corresponding torque value is obtained by pre-processing the bolt (nut) image, identifying the edge of the bolt (nut) contour, and calculating the corresponding diameter; thereby avoiding the situation where the operator may make an error in setting the torque value when there are many bolt models.

[0095] Step S104: determining a target torque value of the smart wrench based on the first torque value and the second torque value, and controlling the smart wrench to operate at the target torque value so that the socket on the smart wrench performs a screwing operation on the bolt and nut.

[0096] In some embodiments, the target torque value of the smart wrench is determined based on the first and second torque values. Specifically, the first and second torque values ​​are cross-validated. If the first and second torque values ​​are consistent, the target torque value is directly set. If they are inconsistent, an alarm is triggered and a verification failure notification is displayed on the handheld device. Furthermore, the dynamic verification process requires a step-by-step process: first, reading the QR code, then using the bolt and nut dimensional characteristics to determine the corresponding torque values, and then comparing the torque values.

[0097] In some embodiments, the smart wrench is controlled to work at the target torque value so that the socket on the smart wrench performs a screwing operation on the bolt and nut. Specifically, the calculated target torque value is set into the smart wrench, triggering the smart wrench to start working and enter the screwing mode. The smart wrench will screw the bolt and nut through the socket according to the set target torque value until the target torque value is reached.

[0098] In some embodiments, the torque control method of the smart wrench further includes: if the number of times that the screening result does not meet the first preset condition reaches a preset number threshold, the first preprocessing result is analyzed to determine the cause of failure, and the smart wrench is adjusted based on the failure cause to obtain a clear target QR code image. Specifically, each time a screening result is obtained, it is necessary to determine whether the parsing is successful. If the parsing fails, the failure count is increased. When the number of failures reaches a preset threshold (for example, three times), the image analysis process is triggered, and complex image analysis logic is added according to actual needs to determine whether the parsing failure is caused by image quality problems, angle problems, or other reasons. The analyzed failure cause and correction method are displayed to the operator through printout or GUI interface, and corresponding adjustment instructions are sent according to the failure cause, such as adjusting the camera angle, distance, etc.

[0099] It should be noted that if the analysis fails due to an inappropriate distance or angle between the camera module and the sleeve, the handheld device screen will display: "Please adjust the angle and distance." If the analysis fails due to partial image damage exceeding the image tolerance, the handheld device screen will display: "Image damaged, please replace the image immediately." If the calculation is correct, the bolt and nut diameters and corresponding torque values ​​will be displayed. During this process, the operator can also cross-verify the torque values ​​with the QR code analysis results to ensure the accuracy of the torque values. If the calculation is incorrect, the handheld device analyzes multiple acquired images, determines the cause of the calculation failure, and displays the cause and solution on the screen. If the calculation fails due to unclear outlines of the bolt and nut, the handheld device screen will display: "Adjust the angle and distance."

[0100] This automatically adjusts the image acquisition and analysis process based on actual conditions, rather than relying solely on manual intervention, improving work efficiency and convenience. By continuously optimizing image acquisition quality and analysis, delays and repetitive operations caused by image issues can be reduced throughout the entire process, enabling the smart wrench to more quickly and accurately determine output torque, improving overall construction efficiency and quality control.

[0101] The embodiment of the present application obtains the QR code image and the physical image of the fastener on the sleeve and pre-processes them, which can provide a clear and accurate image basis for subsequent analysis and identification; by parsing the QR code image, the pre-stored information on the sleeve can be quickly obtained, reducing the errors and time cost of manual input, and then preliminarily determining the first torque value, providing a reference basis for the subsequent determination of the target torque value; by detecting the contour information of the fastener, it is convenient to subsequently select an appropriate calculation method to calculate the diameter of the fastener, so that a more accurate second torque value can be obtained later; based on the first torque value and the second torque value, a comprehensive analysis is performed to minimize the errors or uncertainties that may be caused by a single source, providing a more accurate and reliable target torque value, thereby improving construction efficiency. Compared with the existing technology, the present application can accurately determine the output torque of the wrench, thereby improving construction efficiency.

[0102] like Figure 2 As shown, based on the above method embodiment, a corresponding device embodiment is provided;

[0103] An embodiment of the present invention provides a torque control system for an intelligent wrench, comprising: an acquisition module 100, a first determination module 200, a second determination module 300, and a third determination module 400;

[0104] The acquisition module 100 is configured to acquire a QR code image on a sleeve and a physical image of a fastener, and perform image preprocessing on the QR code image and the physical image to obtain a first preprocessing result and a second preprocessing result, wherein the sleeve and the fastener are both provided on the head of the smart wrench, and the fastener includes a bolt and a nut;

[0105] The first determination module 200 is configured to analyze the first preprocessing result to obtain an analysis result, and determine a first torque value based on the analysis result;

[0106] The second determination module 300 is configured to detect the profile information of the fastener in the second preprocessing result using an edge detection algorithm, determine the type of the fastener based on the profile information, select a corresponding calculation method based on the fastener type to calculate a corresponding fastener diameter, and determine a second torque value if the fastener diameter satisfies a second preset condition, wherein the fastener diameter includes a bolt diameter and a nut diameter;

[0107] The third determination module 400 is configured to determine a target torque value of the smart wrench based on the first torque value and the second torque value, and control the smart wrench to operate at the target torque value so that the socket on the smart wrench performs a tightening operation on the bolt and nut.

[0108] It can be understood that the above-mentioned device embodiment corresponds to the method embodiment of the present invention, which can implement the torque control method of the smart wrench provided by any of the above-mentioned method embodiments of the present invention.

[0109] It should be noted that the device embodiments described above are merely illustrative, and some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. Furthermore, in the drawings of the device embodiments provided by the present invention, the connection relationship between modules indicates that they have a communication connection, which may be implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement the present invention without inventive effort.

[0110] like Figure 3 As shown, based on the embodiment of the torque control method of the smart wrench described above, another embodiment of the present invention provides a smart wrench, including: a wrench and a controller, wherein the wrench is communicatively connected to the controller, the wrench includes a main body and a head, the head is provided with a sleeve, the main body is connected to a bolt or a nut through the sleeve, and the controller implements the steps of the torque control method of the smart wrench as described in the present invention.

[0111] For example, in this embodiment, the computer program may be divided into one or more modules, which are stored in the memory and executed by the processor to implement the present invention. The one or more module elements may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program in the terminal device.

[0112] The terminal device may be a computing device such as a desktop computer, a notebook computer, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.

[0113] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, connecting various parts of the entire terminal device using various interfaces and lines.

[0114] Based on the above method embodiments, another embodiment of the present invention provides a computer-readable storage medium, including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the torque control method of the smart wrench described in any one of the above method embodiments of the present invention.

[0115] Wherein, the module / unit integrated in the device / terminal equipment, if implemented in the form of a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0116] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A torque control method for an intelligent wrench, characterized in that: include: Obtaining a QR code image on a sleeve and a physical image of a fastener, and performing image preprocessing on the QR code image and the physical image to obtain a first preprocessing result and a second preprocessing result, wherein the sleeve and the fastener are both provided on the head of the smart wrench, and the fastener includes a bolt and a nut; parsing the first preprocessing result to obtain an analysis result, and determining a first torque value based on the analysis result; detecting contour information of the fastener in the second preprocessing result using an edge detection algorithm, determining a fastener type based on the contour information, selecting a corresponding calculation method based on the fastener type to calculate a corresponding fastener diameter, and determining a second torque value if the fastener diameter satisfies a second preset condition, wherein the fastener diameter includes a bolt diameter and a nut diameter; Based on the first torque value and the second torque value, a target torque value of the smart wrench is determined, and the smart wrench is controlled to operate at the target torque value so that the socket on the smart wrench performs a screwing operation on the bolt and the nut.

2. The torque control method of the intelligent wrench according to claim 1, characterized in that: The determining of the first torque value based on the analytical result is specifically as follows: Filtering the analysis results to obtain a screening result, and determining whether the screening result meets a first preset condition; If the conditions are met, the parameters of the screening results are extracted to obtain the sleeve model and torque reference value, and it is determined whether the torque reference value falls within the preset safe torque value range; If yes, it is determined whether the sleeve model matches an element in a preset torque mapping table; if so, the torque reference value is used as the first torque value.

3. The torque control method of the intelligent wrench according to claim 2, characterized in that: Also includes: If the screening result does not meet the first preset condition, determining a corresponding material strength coefficient based on the fastener type; A corresponding first torque value is determined based on the material strength coefficient and a fastener diameter, wherein the fastener diameter includes the bolt diameter and the nut diameter.

4. The torque control method of the intelligent wrench according to claim 1, characterized in that: The detecting of the contour information of the fastener in the second preprocessing result by using an edge detection algorithm is specifically as follows: Calculating the gradient magnitude and gradient direction of each pixel in the second preprocessed image; Performing a non-maximum suppression operation on each pixel in the image to obtain a seventh preprocessing result; A plurality of edge points corresponding to the fastener in the seventh preprocessing result are determined by a dual threshold algorithm, and the edge points are connected using a contour tracking algorithm to obtain contour information of the fastener.

5. The torque control method of the intelligent wrench according to claim 1, characterized in that: When the fastener is a bolt, the corresponding calculation method is selected according to the fastener type to calculate the corresponding fastener diameter, specifically: traversing the potential circular area in the contour information by using the Hough circle transform algorithm, screening out the circumscribed circle contour closest to the bolt head, and determining the circumscribed circle parameters; The bolt diameter is calculated based on the circumscribed circle parameters.

6. The torque control method of the intelligent wrench according to claim 1, characterized in that: When the fastener is a nut, the corresponding calculation method is selected according to the type of the fastener to calculate the corresponding fastener diameter, specifically: Based on the contour information, the least square method is used to calculate the geometric center and vertex distribution; Based on the geometric center and the vertex distribution, an equivalent circle of the nut is determined, and based on the equivalent circle, the nut diameter is determined.

7. The torque control method of the intelligent wrench according to claim 1, characterized in that: The image preprocessing is performed on the two-dimensional code image and the physical object image respectively to obtain a first preprocessing result and a second preprocessing result, specifically: Denoising the two-dimensional code image and the physical object image respectively to obtain a third preprocessing result and a fourth preprocessing result; The third preprocessing result and the fourth preprocessing result are respectively gray-scaled to obtain a fifth preprocessing result and a sixth preprocessing result, and the fifth preprocessing result and the sixth preprocessing result are respectively binarized using the Otsu algorithm to obtain a first preprocessing result and a second preprocessing result.

8. The torque control method of an intelligent wrench according to any one of claims 2 to 7, characterized in that: Also includes: If the number of times that the screening result fails to meet the first preset condition reaches a preset number threshold, the first preprocessing result is analyzed to determine the failure cause, and the smart wrench is adjusted based on the failure cause to obtain a clear target QR code image.

9. A torque control method system for an intelligent wrench, characterized in that: include: an acquisition module, a first determination module, a second determination module, and a third determination module; The acquisition module is configured to acquire a QR code image on the sleeve and a physical image of the fastener, and perform image preprocessing on the QR code image and the physical image to obtain a first preprocessing result and a second preprocessing result, wherein the sleeve and the fastener are both provided on the head of the smart wrench, and the fastener includes a bolt and a nut; The first determining module is configured to analyze the first preprocessing result to obtain an analysis result, and determine a first torque value based on the analysis result; The second determination module is configured to detect the profile information of the fastener in the second preprocessing result using an edge detection algorithm, determine the type of the fastener based on the profile information, select a corresponding calculation method according to the fastener type to calculate a corresponding fastener diameter, and determine a second torque value if the fastener diameter satisfies a second preset condition, wherein the fastener diameter includes a bolt diameter and a nut diameter; The third determination module is used to determine a target torque value of the smart wrench based on the first torque value and the second torque value, and control the smart wrench to operate at the target torque value so that the socket on the smart wrench performs a tightening operation on the bolt and nut.

10. An intelligent wrench, characterized in that: include: A wrench and a controller, wherein the wrench is communicatively connected to the controller, the wrench includes a main body and a head, the head is provided with a sleeve, the main body is connected to a bolt or a nut through the sleeve, and the controller implements the steps of the torque control method of the smart wrench according to any one of claims 1-7.

Citation Information

Cited By

  • Anti-loose mechanical connection system and construction method

    CN121760456A