A method and system for controlling process parameters in fastener production
By using multi-dimensional defect identification and closed-loop optimization control, the problem of insufficient real-time data acquisition in traditional fastener production has been solved, enabling real-time adjustment and unified management of process parameters, and improving product quality and the level of automation in the production process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHANGZHOU SUPER RAYS AUTO ACCESSORIES CO LTD
- Filing Date
- 2025-08-08
- Publication Date
- 2026-06-26
AI Technical Summary
Traditional fastener manufacturing process parameter control lacks real-time data acquisition and dynamic response capabilities, making it impossible to achieve multi-point detection and parameter linkage control, resulting in poor quality consistency and reliability, and making it difficult to achieve intelligent production.
By acquiring fastener production data, using industrial cameras and laser contour scanners for multi-dimensional defect identification, and combining electroplating anomaly detection, corrosion resistance analysis, and mold clearance control, a closed-loop optimization control system is established to achieve real-time adjustment and unified management of process parameters.
It improves the stability of the fastener production process and the consistency of product quality, enhances the accuracy of testing and the level of automation in the production process, and meets the needs of modern industry for efficient, precise and reliable process control.
Smart Images

Figure CN120779899B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent manufacturing technology, and in particular to a method and system for controlling process parameters in fastener production. Background Technology
[0002] Traditional fastener manufacturing process parameter control lacks comprehensive real-time production data acquisition and dynamic response capabilities, making it impossible to adjust production strategies based on specific product defect information. This leads to delayed process parameter adjustments and easily causes batch quality problems. It primarily relies on single-point inspection, making it difficult to achieve comprehensive defect identification in multiple critical areas such as screw heads and thread sections. In particular, the identification of microscopic anomalies such as plating defects, burrs, and plating peeling depends on manual visual inspection or simple optical devices, resulting in low accuracy and poor repeatability. Existing systems struggle to establish correlation models between defect data and process parameters such as corrosion resistance, electroplating solution concentration, and mold clearance, making it impossible to achieve closed-loop optimization control based on quality results. Traditional control systems are often scattered across multiple stages, lacking a unified integrated management mechanism, resulting in severe data silos and hindering parameter linkage control and overall optimization. This ultimately limits the intelligent development of fastener manufacturing towards higher consistency and higher reliability. Summary of the Invention
[0003] Therefore, it is necessary for the present invention to provide a method and system for controlling fastener manufacturing process parameters to solve at least one of the above-mentioned technical problems.
[0004] To achieve the above objectives, a method for controlling fastener manufacturing process parameters includes the following steps:
[0005] Step S1: Obtain fastener production data; identify surface defects based on the fastener production data to obtain surface defect data; detect electroplating anomalies based on the surface defect data to obtain electroplating anomaly data.
[0006] Step S2: Analyze the corrosion resistance degradation of fasteners based on the electroplating anomaly data to obtain corrosion resistance degradation data; detect coating peeling based on the corrosion resistance degradation data to obtain coating peeling data; optimize the electroplating solution ratio based on the coating peeling data to obtain optimized electroplating solution ratio data.
[0007] Step S3: Perform geometric structure division based on fastener production data to obtain bolt-type fastener data and screw-type fastener data; perform porosity detection based on bolt-type fastener data to obtain porosity data; perform thread rolling defect detection based on screw-type fastener data to obtain thread rolling defect data.
[0008] Step S4: Control the rolling die clearance based on the porosity data and thread rolling defect data to obtain the rolling die clearance data; transmit the rolling die clearance data and heat treatment process adjustment parameters to the fastener production system to execute the production process parameter control task.
[0009] This invention achieves precise identification of fastener surface defects by acquiring fastener production data. It comprehensively covers multi-dimensional defect information in key areas such as screw heads and threaded sections, significantly improving detection accuracy and coverage. This effectively replaces the inefficiency and low accuracy of traditional manual visual inspection and simple optical devices. Electroplating anomaly detection based on surface defect data can promptly capture various abnormal phenomena during the electroplating process, providing a reliable basis for subsequent corrosion resistance assessment. By analyzing corrosion resistance decay in electroplating anomaly data and combining it with coating peeling detection, the system can dynamically monitor changes in the corrosion resistance of fasteners in real-world environments, providing scientific data support for product quality assurance. Furthermore, optimizing the electroplating solution ratio based on coating peeling data enables precise adjustment of electroplating process parameters, thereby improving coating quality and extending fastener lifespan. By using geometric structure to differentiate between bolt-type and screw-type fasteners, and conducting porosity and thread rolling defect detection separately, the system ensures the targeted and effective detection of defects in different product types, improving the detail and professionalism of defect identification. Based on this, a comprehensive analysis of porosity data and thread rolling defect data was conducted, and rolling die clearance control was implemented. This further facilitated the refined adjustment of process parameters and reduced the risk of product defects caused by improper die clearance. The rolling die clearance data and heat treatment process adjustment parameters were transmitted to the production system in a timely manner, achieving real-time closed-loop control of production process parameters. This broke through the limitations of traditional data silos, improved the automation and intelligence level of the production process, and thus promoted the development of fastener manufacturing towards intelligent manufacturing with high consistency, high reliability, and high efficiency. Overall, this method achieved real-time acquisition and dynamic response of multi-point, multi-parameter data in the fastener production process. Through the close linkage between defect information and process parameters, a closed-loop optimization control system based on quality results was constructed, significantly improving the stability of the production process and the uniformity of product quality, meeting the needs of modern industrial intelligent manufacturing for efficient, precise, and reliable process control.
[0010] Preferably, this specification also provides a fastener manufacturing process parameter control system for executing the fastener manufacturing process parameter control method described above. The fastener manufacturing process parameter control system includes:
[0011] The electroplating anomaly detection module is used to acquire fastener production data; identify surface defects based on the fastener production data to obtain surface defect data; and detect electroplating anomalies based on the surface defect data to obtain electroplating anomaly data.
[0012] The electroplating solution ratio optimization module is used to analyze the decay of fastener corrosion resistance based on electroplating anomaly data to obtain corrosion resistance decay data; to detect coating peeling based on corrosion resistance decay data to obtain coating peeling data; and to optimize the electroplating solution ratio based on the coating peeling data to obtain optimized electroplating solution ratio data.
[0013] The thread rolling defect detection module is used to divide the geometric structure according to the fastener production data to obtain bolt-type fastener data and screw-type fastener data; to perform porosity detection based on the bolt-type fastener data to obtain porosity data; and to perform thread rolling defect detection based on the screw-type fastener data to obtain thread rolling defect data.
[0014] The production process parameter control module is used to control the rolling die clearance based on porosity data and thread rolling defect data to obtain rolling die clearance data; the rolling die clearance data and heat treatment process adjustment parameters are transmitted to the fastener production system to execute the production process parameter control task.
[0015] The fastener production process parameter control system of the present invention can implement any of the fastener production process parameter control methods of the present invention. It is used as a medium for coordinating the operation and signal transmission between various modules to complete the fastener production process parameter control method. The internal modules of the system cooperate with each other to improve the product qualification rate and corrosion resistance in the fastener production process. Attached Figure Description
[0016] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0017] Figure 1 This is a schematic diagram of the steps of a fastener manufacturing process parameter control method according to the present invention;
[0018] Figure 2 This is a detailed flowchart of step S1 in the present invention;
[0019] Figure 3 This is a detailed flowchart of step S12 in the present invention;
[0020] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0021] The technical method of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this invention.
[0022] Furthermore, the accompanying drawings are merely illustrative of the invention and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor methods and / or microcontroller methods.
[0023] It should be understood that although the terms "first," "second," etc., may be used herein to describe various units, these units should not be limited by these terms. These terms are used merely to distinguish one unit from another. For example, without departing from the scope of the exemplary embodiments, a first unit may be referred to as a second unit, and similarly, a second unit may be referred to as a first unit. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0024] To achieve the above objectives, please refer to Figures 1 to 3 This invention provides a method for controlling fastener manufacturing process parameters, the method comprising the following steps:
[0025] Step S1: Obtain fastener production data; identify surface defects based on the fastener production data to obtain surface defect data; detect electroplating anomalies based on the surface defect data to obtain electroplating anomaly data.
[0026] In this embodiment, an industrial camera (resolution not less than 1600×1200) and a laser profile scanner (measurement accuracy of ±10μm) supporting the fastener production line are used to collect the images and contour data of screws and bolts at different production stages, forming complete fastener production data. The image acquisition frequency is set to 30 frames per minute, and a ring-shaped cold light source is used as the light source to enhance the surface feature contrast. Subsequently, based on the Canny edge detection algorithm and the HSV color space analysis method, the acquired image data is used for surface defect recognition. The surface defect judgment criteria are as follows: the reflection intensity of the bright spot exceeds 1.5 times the average brightness of the image; the continuous edge perturbation exceeds 3 pixel widths; the surface color difference ΔE is greater than 2.5. Locate the above abnormal areas and output the coordinates and corresponding defect type labels. The identified surface defect data will be input into the feature screening module to further eliminate the pseudo-defect areas with a size less than 0.1mm 2 After that, structured surface defect data is obtained. Then, based on the judgment rule: if the defect area is within the range of the plating standard area (the preset range is the area of the head diameter × 80%), and the area exceeds 1.2mm 2 , it is regarded as electroplating abnormality. Number and mark the above data for each station, and output the electroplating abnormality data for subsequent analysis.
[0027] Step S2: Perform an analysis on the decay of the anti-corrosion ability of the fasteners based on the electroplating abnormality data to obtain anti-corrosion ability decay data; perform a coating peeling detection based on the anti-corrosion ability decay data to obtain coating peeling data; optimize the electroplating solution ratio based on the coating peeling data to obtain optimized electroplating solution ratio data;
[0028] In this embodiment, using the output electroplating abnormality data, extract the coordinates of each abnormal point therein and map them into a three-dimensional modeling system to establish a spatial distribution model of the defect area. Subsequently, an equivalent corrosion analysis unit with a size not less than 10mm×10mm is set for each abnormal area. According to the standard of GB / T 10125-2021 "Neutral Salt Spray Test", set the salt spray environment parameters: the concentration of sodium chloride solution is 5±0.5%, the sedimentation rate is 1.5ml / 80cm 2 ·h, and the temperature is 35±2°C. Perform a 72-hour corrosion simulation through a simulation software (such as the fluid-structure interaction module in ANSYS Fluent). The corrosion points are defined by the points where the pitting depth on the metal surface exceeds 0.02mm in the simulation. Count the corrosion points in each electroplating abnormal area, calculate the total area and compare it with the area of the standard anti-corrosion area (≥95% without corrosion). If it is lower than this ratio, it is recorded as an anti-corrosion ability decay area. In the anti-corrosion ability decay area, extract the cross-sectional profile of the coating thickness through a scanning electron microscope image, identify the warped edge of the coating (the edge thickness change rate exceeds 20%), and output the warped profile map. If there is a continuous area exceeding 2mm in the warped area 2If the coating shows cracks, it is considered as coating detachment. The exposed metal substrate area is calculated for all detached areas, and the surface oxide signal peak intensity is detected using XPS energy dispersive spectroscopy to determine the degree of oxidation. Combining the detachment location, oxidation level, and original solution parameters (including metal ion concentration and pH value), the optimized electroplating solution metal ion concentration (adjustment range ±0.1 mol / L) and pH (adjustment range pH ±0.5) are fitted using partial least squares regression (PLSR), outputting the optimized electroplating solution ratio data.
[0029] Step S3: Perform geometric structure division based on fastener production data to obtain bolt-type fastener data and screw-type fastener data; perform porosity detection based on bolt-type fastener data to obtain porosity data; perform thread rolling defect detection based on screw-type fastener data to obtain thread rolling defect data.
[0030] In this embodiment, the original design parameters of the fasteners, including shank length, head diameter, and pitch, are obtained from the production line data acquisition system. The structure is classified by comparing the shank length data with a classification threshold: shank lengths greater than 25mm are classified as bolt-type fasteners, and those less than or equal to 25mm are classified as screw-type fasteners (referencing ISO 898-1 standard). The bolt-type fastener image data is imported into a porosity detection system, which uses micron-level X-ray non-destructive testing equipment (resolution ≤5μm) to perform tomographic scanning of the bolt's internal density. The lower limit of the porosity grayscale value is set to the average background grayscale × 0.65, and the volume of a single hole is greater than 0.02mm. 3 The areas identified are considered valid pores, and the number, distribution coordinates, and volume distribution data of pores are output. For screw-type fastener images, a visual inspection system combined with texture analysis and edge gradient methods is used to identify discontinuous protruding areas in the thread profile. The criteria for poor rolling are: thread outer diameter fluctuation exceeding ±0.05mm; cumulative pitch error exceeding 0.1mm / 10 pitch; and profile tooth height deviation exceeding ±15%. All unqualified profile areas and parameter indicators are extracted, and thread rolling failure data are output.
[0031] Step S4: Control the rolling die clearance based on the porosity data and thread rolling defect data to obtain the rolling die clearance data; transmit the rolling die clearance data and heat treatment process adjustment parameters to the fastener production system to execute the production process parameter control task.
[0032] In this embodiment, based on the pore data, cluster analysis (DBSCAN algorithm, minimum cluster number set to 5, maximum distance set to 1mm) is used to identify concentrated pore areas, recording their location and volume percentage. The analysis results are input to the rolling die clearance adjustment module to control the reduction of the die clearance. The reduction range is set according to the following rules: if the pore volume percentage exceeds 2%, the current die clearance is reduced by 10μm; if it exceeds 5%, it is reduced by 20μm. Clearance measurement uses a laser displacement sensor (accuracy ±1μm) for real-time feedback control. Thread rolling defect data is used to evaluate the die clearance uniformity. Specifically, by comparing the diameter deviations of the left, middle, and right thread segments, if the diameter difference exceeds 0.08mm, the die symmetry adjustment mechanism is corrected to control the clamping force adjustment value of the upper and lower dies within the range of 50±5N. Finally, the rolling die clearance reduction data and uniformity control data are merged to form unified rolling die clearance data. This data, along with heat treatment process parameters (such as heating temperature 650℃, holding time 45 minutes, and cooling rate 10℃ / min), will be transmitted to the PLC control system via the Modbus industrial protocol. The PLC will automatically adjust the rolling pressure, electroplating solution supply flow rate, and heat treatment time according to the received parameter instructions, thereby realizing automated closed-loop control of the production process parameters.
[0033] Preferably, step S1 includes the following steps:
[0034] Step S11: Obtain fastener production data;
[0035] In this embodiment, high-speed industrial vision acquisition equipment is deployed at the downstream station of the fastener forming line to acquire production data. The equipment used includes a 2-megapixel industrial camera (Basler acA1920-40gc) and a 5mm fixed-focus lens, illuminated by a coaxial ring LED light source (6500K color temperature). The acquisition system captures images of the screw head, thread segment, and side profile, with an image size of at least 1600×1200 pixels and a frame rate of 30fps. Synchronous acquisition is achieved through PLC-conveyor signal linkage, with trigger time error controlled within ±5ms. Image acquisition data is stored according to workpiece number and compressed in JPEG format with a compression ratio not exceeding 1:10 to ensure no loss of image detail.
[0036] Step S12: Based on fastener production data, perform screw head plating defect detection to obtain screw head plating defect data;
[0037] In this embodiment, the screw head image is input to the image analysis module. First, image enhancement processing based on gray-level histogram equalization is performed. Then, the GrabCut segmentation algorithm is used to extract the hexagonal notch region in the head area, obtaining the notch image region ROI. Subsequently, the surface roughness Ra value of the notch region is calculated, and texture orientation, contrast, and entropy features are extracted using the gray-level co-occurrence matrix method. The roughness Ra threshold is set to 0.35μm, and regions with orientation changes greater than 15° are marked as roughness anomalous areas. The Sobel operator is used to calculate boundary sharpness and identify grain boundaries. Binary boundary detection is used to mark grain feature points in roughness anomalous areas. The grain exposure judgment criteria are that the grain boundary length is greater than 5px and the grain area accounts for more than 20% of the total area. Finally, if the grain exposure area overlaps within the effective electroplating area of the hexagonal notch of the screw head (the preset range is 90% of the top surface of the screw head) and the area is greater than 1.5mm, then the grain exposure is considered an exposed area. 2 If the area is found to be unplated, it is determined to be an area with unplated coating. The image coordinates, area, and brightness feature values of this area are output as the unplated coating data for the screw head.
[0038] Step S13: Detect burrs on the threaded section based on fastener production data to obtain burr data for the threaded section;
[0039] In this embodiment, the acquired thread segment image is input to the surface defect recognition module. First, specular reflection suppression is performed using a combination of bilateral filtering and high-pass filtering to remove background reflections. Then, image gradient analysis is used to identify the root contour of the thread segment based on changes in grayscale gradient direction. The thread peak-valley distribution is extracted using Fourier transform filtering followed by polar coordinate expansion analysis. For each thread segment, gradient anomalies (grayscale change rate exceeding 0.8) and their neighboring texture direction angle anomalies (change range greater than 20°) are statistically analyzed. If the number of anomalies in a local area exceeds 5 and is linearly distributed, the area is marked as a texture distortion region. Edge irregularities are extracted from the texture distortion region, and the burr morphology is obtained by calculating the edge curvature (fitting a third-order polynomial for differentiation). If the number of curvature abrupt change points is greater than 3, and the serration depth is greater than 0.15mm, it is determined to be a burr region. The coordinates of the burr region's center point, maximum depth, width, and texture anomaly characteristics are output as the thread segment burr data.
[0040] Step S14: Integrate the screw head plating data and the thread section burr data to obtain surface defect data;
[0041] In this embodiment, the data on missing plating at the screw head and the data on burrs in the thread section are structurally fused. The data integration method is based on defect location coordinates (based on a unified coordinate system within the image), timestamp matching (error not exceeding 20ms), and workpiece number consistency verification. Each defect point in the two data sources is classified by type, and the defect location, area, and intensity value (reflection intensity or texture disturbance index) are labeled and distinguished as "head defects" or "thread defects". Finally, a unified surface defect data table is constructed, containing fields including defect type, location coordinates (x, y), and area / mm. 2 This table includes morphological indicators (Ra value, boundary sharpness, jaggedness depth, etc.) and image file path indexes. It is used for subsequent electroplating anomaly analysis.
[0042] Step S15: Perform electroplating anomaly detection based on surface defect data to obtain electroplating anomaly data.
[0043] In this embodiment, surface defect data is imported into the electroplating anomaly analysis module. This module determines whether defects interfere with the standard plating structure based on the electroplating standard area (e.g., the coverage rate of the head area must be greater than 98%, and the integrity rate of the thread section must be greater than 95%). A judgment rule is set for each defect point: for example, a head defect area > 1.5 mm. 2 If the edge sharpness is greater than 0.7, or the burr depth exceeds 0.2mm and is located within the effective conductive area of the thread, it is marked as an electroplating abnormality influence point. The number of abnormal influence points, total influence area, and influence area location information for each workpiece are counted. Data determined to be abnormal is marked as electroplating abnormal data, including fields such as abnormality type, influence area number, abnormal area, intensity value, and corresponding image number, serving as input for subsequent corrosion resistance degradation assessment.
[0044] Preferably, step S12 includes the following steps:
[0045] Step S121: Extract screw head production images based on fastener production data;
[0046] In this embodiment, a high-speed industrial camera (Basler acA2440-35uc) with a resolution of 2448×2048 pixels is installed on the fastener production line. It is equipped with a 12mm fixed-focus lens and a ring LED fill light, with a color temperature set to 5500K to ensure uniform illumination without shadows. The camera is synchronized with the conveyor belt, triggering image acquisition via a photoelectric sensor. The acquisition time is positioned when the screw enters the detection area, capturing an image of the front of the screw head. The acquisition frequency is set to 50fps to ensure no missed shots at a production speed of 1200 pieces / minute. The image data is transmitted to an edge computing device via industrial Ethernet. The image format is lossless TIFF, and the image identifier includes the workpiece number, timestamp, and acquisition device ID. The screw head production image data obtained in this step serves as the basic input for subsequent processing.
[0047] Step S122: Segment the hexagonal slot area based on the screw head production image to obtain the hexagonal slot image;
[0048] In this embodiment, the production image of the screw head is first converted to a grayscale image using a color space conversion. Then, adaptive thresholding based on the Otsu algorithm is applied to initially separate the edges of the hexagonal notch from the background. To accurately extract the hexagonal notch region, Canny edge detection is used with a threshold set to an upper limit of 80 and a lower limit of 40 to obtain the edge contour of the hexagonal notch. Then, morphological closing operations (using a 5×5 rectangular kernel for dilation of the structuring element) are used to connect the broken edges, forming a complete notch region. A contour detection algorithm is used to extract the largest hexagonal contour, with a contour polygon approximation error threshold set to 3 pixels to ensure the hexagonal characteristics of the contour. Finally, based on the pixel coordinates of the region within the contour, the hexagonal notch image is cropped and output as a separate image file, maintaining the same resolution as the original. Figure 1 To.
[0049] Step S123: Calculate the roughness based on the hexagonal notch image to obtain roughness data;
[0050] In this embodiment, high-frequency noise is first filtered out using a 3×3 median filter on the hexagonal notch image. Then, roughness-related parameters are calculated based on the Gray-Level Co-occurrence Matrix (GLCM). Specifically, the contrast, correlation, and entropy values in four directions (0°, 45°, 90°, and 135°) are calculated, with the contrast in the 0° direction used as the primary roughness indicator. A threshold of a roughness Ra value greater than 0.35 μm is set as the baseline for abnormal roughness determination. To achieve micro-roughness measurement, image gradient calculation is used, employing the Sobel operator to calculate the gradient magnitude in the x and y directions, and the gray-level standard deviation within the calculated region is used as the roughness value. Finally, the roughness data for this region is output, including the average roughness value, maximum value, and standard deviation, in a structured data format for easy subsequent analysis.
[0051] Step S124: Identify the grain region in the hexagonal slot image based on the roughness data to obtain grain region data;
[0052] In this embodiment, based on roughness, a region growing method is used to identify grain regions in the hexagonal notch image. Initial seed points are selected based on a grayscale threshold of 90 to 130 (image grayscale range 0-255), and the growth threshold is set to ±15 grayscale fluctuation. The area, boundary length, and average grayscale value of each grown region are calculated. To ensure the accuracy of grain region identification, boundary detection (based on the Sobel operator) is used to identify the region boundary contours, with boundary errors controlled within ±2 pixels. Grain regions with an area less than 20 pixels are discarded to avoid noise interference. Finally, a set of grain region data is formed, including the spatial coordinates, area, average grayscale, and boundary length of each region. The data format is vector layer data, facilitating subsequent sharpness calculation.
[0053] Step S125: Calculate the boundary sharpness based on the grain region data; determine the degree of grain exposure based on the boundary sharpness to obtain grain exposure data;
[0054] In this embodiment, the boundary sharpness index is used to quantify the grain boundaries for the grain region data. Boundary sharpness is defined as the average value of the boundary gradient magnitude. It is calculated by first applying the Sobel operator to the boundary pixels to obtain the gradient magnitude, and then averaging these values. A boundary sharpness threshold of 0.6 is set; sharpness exceeding this threshold is considered an exposed grain boundary. The degree of grain exposure is comprehensively judged by combining boundary length and sharpness. The degree of grain exposure is defined as the proportion of the exposed boundary length to the total grain boundary length, with a threshold of greater than 50% considered high exposure. Grain exposure data is output, including grain number, boundary sharpness, exposed boundary length, and exposure ratio. The data format is a structured table, facilitating the location of specific grain exposure.
[0055] Step S126: Detect missing plating on the screw head based on the grain exposure data to obtain missing plating data for the screw head.
[0056] In this embodiment, screw head plating defects are detected based on grain exposure data. The defective plating determination rule is that grains with an exposure ratio greater than 50% and an exposure boundary length exceeding 10 pixels are considered defective plating areas. The area of all defective plating areas is accumulated; if the cumulative defective plating area exceeds 1.5 mm... 2 If a defect is found in the screw head, it is determined that there is an incomplete plating defect. During the incomplete plating detection process, the area-weighted method is used to calculate the incomplete plating area of each grain, and the coordinate range of the incomplete plating area is marked. The final output of screw head incomplete plating data includes the number of incomplete plating areas, the area of a single area, the total incomplete plating area, the spatial distribution coordinates of the areas, and the corresponding image number. The data is stored in CSV file format for easy adjustment of subsequent production parameters and quality traceability.
[0057] Preferably, step S13 includes the following steps:
[0058] Step S131: Extract the production image of the thread root based on the fastener production data;
[0059] In this embodiment, on the fastener production line, high-speed industrial cameras (such as Basler acA2440-35uc, 2448×2048 pixel resolution) are used to acquire production images of the thread root. Linear or area array cameras are used for acquisition, paired with a macro lens (12mm focal length, F4 aperture), and equipped with a directional ring LED light source with a color temperature set to 5500K to ensure uniform illumination and reduce glare. Image acquisition is precisely triggered by a photoelectric sensor, with the trigger timing locked at the fastener thread root entering the detection field of view, ensuring clear images without motion blur. The image format is lossless TIFF, including timestamps and workpiece batch numbers for subsequent traceability. The acquisition frequency is set to 50fps to meet the production line speed requirement of 1200 pieces / minute and prevent image loss. The acquired thread root image data is directly transmitted to image processing equipment for subsequent analysis.
[0060] Step S132: Calculate the reflection intensity based on the production image of the thread root to obtain the reflection intensity data;
[0061] In this embodiment, based on the production image of the thread root, it is first converted into a grayscale image to simplify calculations. Image histogram equalization is used to improve contrast and enhance details. The grayscale value of each pixel is measured, ranging from 0 to 255, to calculate the reflection intensity. To remove noise interference, a 3×3 median filter is applied to smooth the image. The reflection intensity data is stored in matrix form, with each element corresponding to the reflection intensity of an image pixel. A reflection intensity threshold of 150 is set; pixels exceeding this threshold are considered high-reflectivity areas. The reflection intensity distribution of the entire image is statistically analyzed, and the mean, maximum, and standard deviation are calculated to provide basic data for subsequent bright spot area identification.
[0062] Step S133: Identify bright spot areas in the production image of the thread root based on the reflection intensity data to obtain bright spot area data; perform texture distortion analysis based on the bright spot area data to obtain texture distortion data;
[0063] In this embodiment, a threshold-based segmentation method is applied to identify bright spot regions based on reflection intensity data. The threshold is set as the set of pixels with a reflection intensity greater than 150. Bright spot regions are extracted through connected component analysis, requiring that the area of connected regions be no less than 50 pixels, and isolated noise points are removed. Morphological dilation operation (3×3 structuring element) is used to fill small holes within the bright spots, and closing operation is performed to ensure boundary continuity. Bright spot regions are stored in the form of boundary polygons, recording their spatial location, area, and shape characteristics. For bright spot regions, local texture direction analysis is used to calculate the texture features of the bright spot regions based on the gray-level co-occurrence matrix (GLCM), including directionality, energy, and contrast. Texture distortion analysis calculates the change angle of local texture direction and uses a sliding window technique (window size 15×15 pixels, step size 5 pixels) to scan the bright spot regions and statistically analyze the texture direction deviation. The degree of texture distortion is measured by the average direction deviation, with a value range of 0° to 90°. Regions with a deviation greater than 30° are defined as abnormal texture distortion regions. Texture distortion data is output, including region location, mean texture direction, and degree of distortion.
[0064] Step S134: Detect burr shape based on texture distortion data to obtain burr shape data;
[0065] In this embodiment, texture distortion anomaly regions are used as preliminary detection areas. An edge detection algorithm (Sobel operator, threshold set to 80) is applied to these regions to extract edge contours. Contour refinement is performed by combining bright spot reflection intensity data, employing sub-pixel-level edge localization technology to improve contour accuracy. The contour curvature of the extracted edges is calculated; curvature greater than 0.8 is considered a burr protrusion. Further analysis of the burr morphology is conducted, calculating burr length, width, and area. Edge length is required to be greater than 15 pixels, and width greater than 5 pixels. Burr morphology is classified into jagged, wavy, and irregular protrusion types based on edge continuity, curvature distribution, and other indicators. Finally, burr morphology data is generated, including the spatial coordinates, size parameters, and morphology classification label for each burr, and the data is stored in a structured format.
[0066] Step S135: Calculate the sawtooth depth based on the burr morphology data to obtain the sawtooth depth data; perform thread segment burr analysis on the burr morphology data based on the sawtooth depth data to obtain the thread segment burr data.
[0067] In this embodiment, the sawtooth depth is defined as the vertical distance from the edge of the burr protrusion to the corresponding standard profile of the thread root. A profile fitting technique is used to fit the normal thread root profile curve, with a fitting error threshold set to ±2 pixels. For each burr profile point, the shortest distance to the fitted curve is calculated, and the maximum distance is recorded as the sawtooth depth. The sawtooth depth is measured in micrometers, with a standard setting of a depth greater than 30 μm considered a significant sawtooth. Combined with the sawtooth depth data, thread segment burr analysis is performed on the burr morphology data. The burr determination rule is that areas with a burr length exceeding 20 pixels and a sawtooth depth greater than 30 μm are considered burrs. The number, distribution location, and size of burrs are statistically analyzed, and thread segment burr data is output. The data format includes the spatial coordinates of the burr area, length, sawtooth depth, and number, facilitating use by the quality control system.
[0068] Preferably, step S2, which involves analyzing the decay of fastener corrosion resistance based on electroplating anomaly data, includes:
[0069] Identify abnormal electroplating areas based on abnormal electroplating data;
[0070] In this embodiment, based on electroplating anomaly data collected during fastener production, the electroplating anomaly data is first imported into the image processing system in the form of images or two-dimensional coordinate points. A region growing algorithm is used to spatially cluster the anomaly points, setting the growth starting point to the pixel with the highest electroplating anomaly intensity and setting the threshold to an electroplating anomaly intensity greater than 0.6 (normalized intensity) to ensure that only obviously abnormal areas are included. During region growing, neighboring pixels (8-neighborhood) must meet the requirement of an intensity not less than 0.5 to avoid excessive region diffusion. After region growing is completed, morphological closing operations (structural element is a 3×3 square) are applied to fill small holes to ensure the continuity of the anomaly region boundaries. The calibrated electroplating anomaly regions are stored as polygonal outlines, along with geometric parameters such as area and perimeter. The coordinates and size of this region are used for the region definition in subsequent salt spray environment testing simulations.
[0071] A salt spray environment simulation was conducted based on an abnormal electroplating area, with the salt spray deposition rate set at 1.0-2.0 ml / 80 cm. 2 ·h, to obtain salt spray environment test data;
[0072] In this embodiment, an artificial salt spray test chamber was used to simulate the salt spray environment. The internal temperature of the test chamber was maintained at 35±2℃, and the relative humidity was controlled above 95%. The calibrated electroplating abnormality area sample was fixed on a support inside the test chamber, ensuring that the abnormal area faced the spray direction. The salt spray solution was prepared as a 5% (by weight) sodium chloride aqueous solution, and the spray flow rate was adjusted to ensure that the salt spray settling rate was maintained at 1.0 to 2.0 ml / 80cm. 2Within an hourly timeframe, the salt spray deposition rate was calculated by periodically collecting the volume of salt spray droplets using a collector and then converting the droplet weight using an electronic balance. The test duration was set at 72 hours, with the salt spray environmental conditions recorded every 6 hours. After completion, the samples were removed and the electroplating abnormal areas were observed using a high-resolution digital microscope (500× magnification), and images were acquired for corrosion point recording. The salt spray environmental test data, including spray time, deposition rate, ambient temperature and humidity, and salt spray droplet weight, were recorded in detail for subsequent analysis.
[0073] Corrosion points were recorded based on salt spray environment test data to obtain corrosion point data;
[0074] In this embodiment, images of abnormal electroplating areas after salt spray testing, acquired using a microscope, are imported into an image analysis system. Image binarization is performed, with a threshold set at a grayscale value below 80 (within the range of 0-255) to identify corrosion points. This threshold is determined using a pre-calibrated reference sample. Connected components are labeled in the binary image, and noise points with a connected component area less than 10 pixels are removed. Corrosion points are marked using the center coordinates and area of the connected components, and the spatial distribution density of each corrosion point is calculated, expressed as the number of corrosion points per square millimeter. The data recording format includes corrosion point number, location coordinates (x, y), and area (μm²). 2 The data on corrosion spots and their density are used for subsequent calculations of the rust area.
[0075] The rust area is calculated based on the corrosion point data to obtain the rust area data;
[0076] In this embodiment, the spatial distribution information of corrosion points is imported into the rust area calculation module. Pixel clustering and fusion technology is used to treat adjacent corrosion points (with a pixel spacing of less than 5 pixels) as the same rust patch. The area is calculated based on the circumscribed polygon of the patch, with the area unit being square micrometers (μm). 2 The area and number of each patch were statistically analyzed. The total corrosion area of the entire abnormal electroplating area was obtained by summing the areas of all patches. A corrosion area threshold of 5000 μm was set. 2 Patches below this threshold are considered micro-rust and are not included in the total rust area. The data output includes the total rust area, the area and number of individual rust patches, and the location of the patches.
[0077] Coating peeling data was obtained by conducting coating peeling detection based on rust area data.
[0078] In this embodiment, coating peeling detection is based on the rust area and its morphological characteristics. First, the peeling area is identified using the boundary features of the rust patches. The peeling area is defined as having a boundary curvature greater than 0.7 (normalized curvature) and a patch area exceeding 10000 μm. 2The rust patches were identified as areas of coating peeling. The thickness of the peeled layer was confirmed using scanning electron microscopy (SEM), typically ranging from 5 to 20 μm. The peeled areas were marked as two-dimensional polygons, and the peeling area and corresponding thickness data were recorded. The peeling areas were correlated with the rust patches, and the data was integrated to generate coating peeling data, including the coordinates, area, thickness, and peeling ratio (peeling area / total electroplated area).
[0079] The corrosion resistance degradation of fasteners was assessed based on coating peeling data, and corrosion resistance degradation data was obtained.
[0080] In this embodiment, the assessment of corrosion resistance degradation is calculated based on the area ratio and distribution characteristics of coating peeling data. The percentage of peeled area to the total fastener surface area is used as the main indicator, and the calculation formula is: degradation rate (%) = (peeled area / total surface area) × 100%. The degradation rate is weighted and adjusted according to the uniformity of the peeled area distribution (calculated by the standard deviation of the distance between the center points of the peeled areas; a standard deviation less than 10 mm is considered uniform distribution), with a weight of 0.7 for uniform distribution and 0.3 for non-uniform distribution. Combined with peeling thickness information, the performance of the remaining protective layer is estimated using a thickness loss model. The corrosion resistance degradation data is finally output in the form of structured data including degradation rate (percentage), mean peeling thickness, and distribution uniformity indicators for subsequent process adjustments in the production control system.
[0081] Preferably, step S2, which involves detecting coating peeling based on corrosion resistance degradation data, includes:
[0082] Identify areas with low corrosion resistance based on corrosion resistance degradation data;
[0083] In this embodiment, after assessing the corrosion resistance degradation on the fastener surface, the corrosion resistance degradation value per unit area is compared with a preset standard, and a critical corrosion resistance value of 25% is set. When the corrosion resistance degradation rate of a certain area exceeds this value, the area is determined to be a low corrosion resistance area. The entire fastener surface is divided into 5mm × 5mm grid cells, and the degradation rate of each cell is calculated. If the proportion of the peeling area in any cell exceeds 25% of the cell area, and three or more consecutive adjacent abnormal cells (Euclidean adjacency) appear, a low corrosion resistance area is defined based on the connected component. The spatial clustering algorithm (DBSCAN) is used to extract the region boundaries, with parameters set to a minimum sample size of 3 and a maximum neighborhood radius of 6mm. The final output of the low corrosion resistance area is stored in the form of a coordinate set and area information for subsequent image processing.
[0084] Coating peeling detection was performed in areas with low corrosion resistance to obtain coating peeling data.
[0085] In this embodiment, within the identified low-corrosion-resistance area, a microscopic contour image of the area is acquired. A three-dimensional laser confocal microscope system is used for surface contour scanning, with a scanning accuracy set to a vertical resolution of 1 μm and a horizontal scanning interval of 5 μm. The acquired surface morphology data is used for warping region detection by calculating the local surface protrusion height and edge slope. A threshold of 5 μm for protrusion height and 60° for edge slope are set. If any protrusion exceeds the threshold in height and meets the edge slope condition, the area is determined to be a warping region. Warping regions are marked in the form of a three-dimensional surface model, recording the warping height, area, boundary coordinates, and location number. In addition, a color interferogram is used for auxiliary confirmation. Warping regions exhibit obvious ring-like features in the interferogram, which can be cross-validated with the three-dimensional morphology data to improve detection accuracy.
[0086] Based on the coating warping data, the exposed base metal was analyzed to obtain the exposed base metal data;
[0087] In this embodiment, the exposed metal composition of the identified plating warped areas is detected using an energy dispersive spectroscopy (EDS) instrument equipped with a scanning electron microscope (SEM) for elemental scanning. Three points at the center and three points at the edge of each warped area are selected for composition measurement. The difference in metal element content between the detected area and the complete electroplated area is compared. If the content of electroplated elements such as Ni and Zn decreases by more than 40%, while the content of matrix elements such as Fe and Cr increases by more than 30%, the matrix metal at that point is determined to be exposed. These points are then used as seed points, and a region growing algorithm is employed to expand and identify the complete exposed area in the scanned image, with a growth threshold set at electroplated metal content <20%. Finally, the exposed matrix metal data is output in a structured format, including exposed area, elemental change rate, and coordinate position, for use in subsequent oxidation simulations to set boundary conditions.
[0088] Oxidation simulations were performed based on the exposed matrix metal data, with oxygen partial pressure set to 0.2-1 atm and relative humidity set to 30%-90%, to obtain metal oxidation data;
[0089] In this embodiment, an oxidation experimental environment was set based on the exposed metal substrate region. The exposed sample was placed in a temperature- and humidity-controlled oxidation reaction chamber. The temperature was set at 35°C, and the oxygen partial pressure was adjusted to 0.2-1.0 atm (using three stages: 0.2, 0.6, and 1.0 atm) by introducing high-purity oxygen. The relative humidity was set at three levels: 30%, 60%, and 90%. A total of nine oxidation experiments were conducted. Each experiment lasted 24 hours, and changes on the sample surface were recorded at 2-hour intervals using an optical interferometer and X-ray photoelectron spectroscopy (XPS). The oxide layer thickness was calculated using interference fringes with an accuracy of ±5 nm; the oxide type and proportion were quantitatively calculated using the peak positions of O1s and Fe2p in XPS. The oxidation simulation results included oxide layer thickness over time curves, oxide type composition ratios, and oxidation growth rates, summarized as metal oxidation data.
[0090] Oxidation spot distribution analysis was performed based on metal oxidation data to obtain oxidation spot distribution data;
[0091] In this embodiment, high-resolution imaging of the sample surface was performed after the oxidation simulation, achieving an image pixel accuracy of 1 μm. The K-Means clustering algorithm was used to segment the oxidation color distribution, with a cluster number of 4 (corresponding to unoxidized, lightly oxidized, moderately oxidized, and heavily oxidized areas). The average grayscale and color channels (a and b components in the CIELab color space) of the segmented regions were used to further confirm the boundaries of spots with different oxidation levels. Each oxidation spot was encapsulated using the smallest circumcircle, and its center coordinates and area were extracted. The spot density (number of spots per unit area) and average diameter were statistically analyzed. The oxidation spot distribution data includes information such as spot location, area, oxidation level, and distribution image to support subsequent electroplating layer peeling analysis.
[0092] The degree of electroplating peeling is identified based on the distribution data of oxide spots, and plating peeling data is obtained.
[0093] In this embodiment, the oxide spot distribution data is mapped to the coating peeling area, and the spot density, average spot diameter, and overlap with the peeling area are analyzed by overlay. The judgment criteria are set as follows: spot density exceeds 0.8 spots / mm. 2 Areas with an average diameter exceeding 100 μm and an overlap rate with the peeling area exceeding 50% are classified as severely peeling areas; the rest are considered as mild or moderate peeling areas. The peeling level of each area is filtered by logical conditions, and a peeling level label map is output. Simultaneously, the three-dimensional peeling volume (area × peeling height) is calculated based on the peeling data. Finally, the electroplating layer peeling degree data is represented as a structure, including location coordinates, area, volume, peeling level label, and oxidation correlation indicators, providing input data for optimizing the electroplating solution ratio.
[0094] Preferably, step S2, which optimizes the electroplating solution ratio based on coating peeling data, includes:
[0095] The number of peeling spots was calculated based on coating peeling data;
[0096] In this embodiment, after electroplating is completed on the fastener surface, a surface image acquisition device (such as an 8-megapixel industrial camera) is used to photograph the sample. The illumination angle is maintained at 30° to ensure that the defective areas of the plating layer produce obvious grayscale contrast. After image processing, the image is imported into an image recognition system to extract areas with obvious grayscale jumps. The minimum area for region recognition is set to 200μm. 2 Image resolution was controlled to within 1μm per pixel to ensure accurate region identification. The identification logic was based on area and boundary integrity, numbering independent regions. If the shortest distance between two regions was less than 15μm, they were merged into the same spot region. Finally, the number of all detached spots meeting the area and spacing requirements was counted to obtain detached spot quantity data for subsequent analysis.
[0097] The concentration of metal ions in the electroplating solution was adjusted based on the number of flaking spots, and the adjusted concentration data of metal ions was obtained.
[0098] In this embodiment, the current concentration of metal ions in the corresponding batch of electroplating solution is retrieved based on the number of flaking spots. Taking zinc plating as an example, the commonly used target concentration is 22-25 g / L Zn. 2+ Existing concentration data is acquired using inductively coupled plasma optical emission spectrometry (ICP-OES). If the current concentration is below the target range and the number of spots exceeds 30, the addition procedure is initiated. A zinc-containing mother liquor (ZnSO4 solution, concentration set at 200 g / L) is added quantitatively using an automated dispensing device, with each addition not exceeding 1% of the total liquid volume. After addition, a sample is taken again for testing to confirm that the concentration has been adjusted to the target range. Throughout the process, the initial concentration, target concentration, and amount added are recorded for each batch, generating metal ion concentration adjustment data, which is then submitted to the process control platform.
[0099] The material brittleness data is obtained by calculating the coating peeling data.
[0100] In this embodiment, three points were selected from both the delaminated area and the adjacent intact coating area for nanoindentation testing. A diamond triangular pyramid indenter was used, with a maximum load of 500 μN, an indentation speed of 50 μN / s, and a holding time of 10 seconds. The indentation depth and unloading curve at each point were measured to evaluate its plastic deformation capacity. The presence, number, and morphology of cracks at the indentation edge were observed under a microscope to reflect the degree of brittleness. If more than three radial cracks were present at the indentation edge and the indentation depth was less than 120 nm, it was recorded as a high-brittleness area. All test results were averaged to form the brittleness data for this batch of material, labeled with descriptive values (high / medium / low) and evaluation labels (whether acidity / alkalinity adjustment was needed).
[0101] The acidity and alkalinity of the electroplating solution were adjusted based on the material brittleness data to obtain acidity and alkalinity adjustment data;
[0102] In this embodiment, the current pH value of the electroplating solution is analyzed and monitored in real time using an online pH meter, with the error controlled within ±0.05. If the material brittleness is detected as "high" and the current pH is higher than 6.5, the pH value is lowered by adding acid dropwise. A 0.5 mol / L dilute sulfuric acid solution is selected and added at a rate of 0.2 ml per minute using a precision acid pump, while maintaining a stirring speed of 50 rpm to prevent local acid accumulation. After each adjustment, wait 5 minutes to ensure the solution reacts uniformly before measuring the pH value. Conversely, if the material exhibits excessively low brittleness and the pH is lower than 5.5, sodium hydroxide solution is used for alkalinity compensation. Finally, the pH values before and after adjustment, the name of the added reagent, and the amount added are recorded as acid-base adjustment data and linked to the batch process number.
[0103] By integrating data on metal ion concentration adjustment and acid-base adjustment, optimized data for electroplating solution ratios are obtained.
[0104] In this embodiment, the data on metal ion concentration adjustment and pH adjustment are uniformly summarized in the electroplating solution control panel, establishing a corresponding relationship table. The information includes batch number, electroplating solution type, original concentration, adjusted concentration, original pH value, adjusted pH value, name of added reagent, and volume added. Based on this information, the system generates a complete electroplating solution ratio optimization form, exports it to the electroplating equipment control module, and archives it for future reference. After the optimization data is generated, the batch ratio parameters are locked to prevent misoperation from interfering with subsequent products. A fully automatic parameter control device is then activated to precisely control the material addition and pH value for the next round of production, achieving a closed-loop optimization task.
[0105] Preferably, step S3 includes the following steps:
[0106] Step S31: Calculate the length of the rod based on the fastener production data to obtain the rod length data;
[0107] In this embodiment, a dual-station high-precision laser measurement system is used to perform non-contact length scanning on finished fasteners. The laser probe model selected is Keyence LS-9001M, and the measurement accuracy is controlled within ±1μm. During the measurement process, the fastener is fed into a rotating fixture by an automatic feeder. After the fixture is stabilized, the laser probe scans the positioning points at both ends of the fastener along the Z-axis, measuring the actual length from the bottom surface of the fastener head to the end of the thread. After deducting the head thickness, the shank length is obtained. To improve data accuracy, each fastener is measured three times and the average value is taken. The system automatically removes outliers, with a threshold set at ±0.05mm. The measured shank length data is transmitted to the database in real time and archived by batch number as the basis data for subsequent geometric structure classification.
[0108] Step S32: Based on the rod length data, perform geometric structure division on the fastener production data to obtain bolt-type fastener data and screw-type fastener data;
[0109] In this embodiment, after the rod length statistics are completed, the structural classification standard is retrieved for judgment: if the rod length is greater than or equal to 30mm, it is classified as a bolt-type fastener; if the rod length is less than 30mm, it is classified as a screw-type fastener. This length threshold is based on the classification standard for M6-M12 specification parts set in the process design manual. The system performs batch judgment and labeling of the rod length data for each batch of fasteners, and the classification results are automatically bound to the corresponding fastener production number. The structural classification operation does not rely on manual labor, but is completed collaboratively by the MES system and the database, and records the classification timestamp and judgment basis to ensure complete traceability.
[0110] Step S33: Perform porosity detection based on bolt-type fastener data to obtain porosity data;
[0111] In this embodiment, fastener samples labeled "bolt type" are imported into an industrial CT scanning chamber, and volumetric defect imaging is performed using an X-ray CT scanner with a resolution of 5 μm (such as a Yxlon FF35 CT). Scanning parameters are set as follows: 80 kV voltage, 150 μA current, exposure time of 300 ms, rotation angle of 360°, and step angle of 0.5°. After obtaining complete volumetric data, pore areas are extracted using grayscale differences. The grayscale threshold range for identification is set to be below 0.6 times the average density of the raw material, for areas smaller than 10 μm. 3 Isolated cavities are not recorded to prevent misidentification. The system outputs the number, volume, shape (sphericity factor), and spatial distribution information of pores as structured data, uniformly named "pore data," and stored in the quality tracking system database.
[0112] Of particular importance, step S33 includes the following steps:
[0113] Step S331: Extract bolt-type fastener images based on bolt-type fastener data;
[0114] In this embodiment, an industrial CCD camera is used to acquire images of the bolt shank surface during the image acquisition stage after bolt forming. The image acquisition resolution is set to 0.01 mm / pixel, and the acquisition angle is set within ±10 degrees of the direction perpendicular to the shank axis. The illumination system uses a ring LED light source with a wavelength of 530 nm, and the incident angle is controlled at 45° to enhance the contrast of the metal surface microstructure. After image acquisition, the image preprocessing module performs grayscale equalization and Gaussian filtering on the image. The filter kernel size is 5×5, and the standard deviation is 1.0, thereby obtaining a bolt-type fastener image with stable clarity and enhanced contrast, and removing background interference and edge ghosting.
[0115] Step S333: Identify the elliptical region based on the bolt-type fastener image;
[0116] In this embodiment, based on the aforementioned image, a region-growing and contour closure determination algorithm is used to identify closed elliptical structural regions in the image. First, the initial seed point identification threshold is set to ±15 of the image's average grayscale value, and the region growth is controlled by setting the grayscale gradient threshold within the range of 5–20. Then, an elliptical contour fitting technique (based on the least squares method) is used to fit all closed regions, and regions with a fitting error of less than 0.5 pixels are selected as candidate elliptical morphological regions. All identified regions must meet the criteria of a contour perimeter greater than 20 pixels and a major-to-minor axis ratio less than 1.5, excluding abnormal image regions that are not pore-like.
[0117] Step S334: Calculate the grayscale value based on the elliptical region; identify the pore region based on the grayscale value to obtain the pore region data;
[0118] In this embodiment, the grayscale values of the pixels inside the elliptical region are extracted, and the mean and standard deviation of the grayscale are calculated. If the average grayscale value of the region is less than 30 units lower than the overall grayscale value of the image (based on an 8-bit grayscale image, ranging from 0 to 255), and the standard deviation is less than 5, the region is identified as a low-reflectivity region. Subsequently, the elliptical region is binarized using the Otsu binary segmentation method based on the local maximum inter-class variance method, and a mask image is generated. The white areas in the mask image represent suspected hole areas. Through edge contour extraction and contour closure verification (the edge closure index is set to ≥90% closed boundary), the data of pore regions that meet the pore characteristics are further filtered out, and their image position coordinates are recorded.
[0119] Step S335: Calculate the stomatal diameter based on the stomatal region data to obtain stomatal diameter data; calculate the stomatal area based on the stomatal region data to obtain stomatal area data;
[0120] In this embodiment, morphological analysis is performed based on the binary image of the pore region data. After removing isolated noise points using an opening operation (structural element is a 3×3 cross shape), the minimum circumcircle of the region contour points is fitted. The radius of the fitted circle multiplied by 2 is the pore diameter. The diameter calculation is rounded to two decimal places, with the unit being millimeters. The area is calculated by counting the number of white pixels in the mask image and multiplying it by the square of the image resolution (e.g., 0.01 mm / pixel²) to obtain the actual pore area, with the unit being mm. 2 All calculation results are stored in a structured data table, with fields including: region index number, diameter value, area value, and location coordinate index.
[0121] Step S336: Integrate the pore diameter data and pore area data to obtain pore data.
[0122] In this embodiment, the aforementioned pore diameter data and pore area data are merged. For each pore region, a complete record is created in the database based on a unique image index number, and the corresponding diameter (in mm) and area (in mm) are integrated. 2 The system collects pore data (in pixels) including the major and minor axes of the ellipse and their position coordinates in the image. Through data structure field standardization, the output format is: pore number, image ID, X / Y coordinates, diameter, area, major axis, minor axis, and roundness (roundness = 4π × area / circumference²). This results in a set of clearly structured and accurately parameterized pore data, serving as the foundational data source for subsequent assessment of the degree of internal defects in fasteners.
[0123] Step S34: Detect thread rolling defects based on screw-type fastener data to obtain thread rolling defect data.
[0124] In this embodiment, fasteners classified as "screw-type" are automatically fed into the thread inspection module via a line. The inspection module includes a line-structured 3D laser scanning system that uses a line laser (wavelength 660nm) combined with a CCD camera to acquire the thread profile cross-section. The inspection focus is controlled in the pitch direction, and the height, angle, and symmetry of each thread cross-section are analyzed. The inspection focuses on the symmetry of the thread tip and root, and whether the forming height is lower than the standard limit. The allowable error range for standard rolled thread height is controlled within ±0.08mm. If the inspection results show that the thread indentation depth is lower than the set value of 0.35mm or the angle deviation exceeds 15° for three or more consecutive turns, it is marked as poor rolling. All inspection data, including the thread segment position coordinates, indentation shape, and angle data, are summarized into thread rolling failure data, which is used to evaluate the working status of the rolling die or thread rolling machine and for subsequent process control steps.
[0125] Of particular importance, step S34 includes the following steps:
[0126] Step S341: Extract screw-type fastener images based on screw-type fastener data;
[0127] In this embodiment, based on the positional information and image acquisition node information in the screw-type fastener data, an industrial camera system is invoked to capture images. The image acquisition area is limited to the visible area of the threaded section, with a length controlled between 20mm and 40mm. The viewing angle uses a combination of axial illumination and 45° side supplementary lighting. The image resolution is set to 4096×3000 pixels, the sampling frequency is set to 20Hz, and a global shutter method is used to avoid image blurring caused by high-speed rotating workpieces. The acquired image is then sharpened using OpenCV's image enhancement module to enhance boundary clarity and undergo grayscale normalization (grayscale range controlled between 0–255) to obtain clear screw-type fastener image data.
[0128] Step S342: Identify the thread edge contour based on the screw-type fastener image to obtain thread edge contour data;
[0129] In this embodiment, the image is input to the edge extraction module, which calls the Canny edge detection algorithm, setting a low threshold of 50 and a high threshold of 150 to perform edge tracking based on the multi-period morphology of the thread features. To accurately obtain the thread edge contour, gradient enhancement processing is performed on the X-axis and Y-axis of the image based on the Sobel operator, then unstructured noise is removed through morphological erosion, and finally, a contour approximation algorithm (approxPolyDP, setting the approximation accuracy coefficient ε to 0.01 times the contour perimeter) is used to extract the edge contour points into multiple continuous boundary line segments. The final output thread edge contour data includes the two-dimensional coordinate sequence of each thread peak and valley and contour symmetry markers.
[0130] Step S343: Calculate the thread pitch based on the thread edge profile data to obtain the thread pitch data;
[0131] In this embodiment, based on the extracted thread peak-valley coordinate data, the pixel spacing between adjacent thread peaks in the axial direction is calculated and converted into physical distance using camera calibration parameters (pixel density set to 5 μm / pixel), thus obtaining the thread pitch value. To ensure accuracy, the number of pitch calculation samples must be no less than 5 sets of thread cycles. The calculation formula uses the average pitch calculation method, and a standard thread specification table (such as ISO 261 standard) is introduced to compare the calculated deviation value. If the deviation value exceeds 0.05 mm, it is marked as abnormal. The final thread pitch data includes the average pitch value, pitch fluctuation range, maximum pitch difference, and deviation from the standard pitch.
[0132] Step S344: Detect thread rolling deformation based on thread pitch data to obtain thread rolling deformation data;
[0133] In this embodiment, a rule for judging thread rolling deformation is constructed based on the fluctuation range and peak-valley misalignment degree in the pitch data. First, using thread morphology symmetry analysis, peak-valley deformation caused by uneven rolling load is identified by mirror comparison of the left and right contour data. Second, the thread height compression is judged. The thread height is obtained by calculating the maximum vertical difference between the upper and lower boundaries of the contour. If the height value deviates from the standard value by more than 0.1 mm, it is judged as rolling indentation deformation. The above features are combined into a multi-index judgment through logical comparison rules. The output thread rolling deformation data includes misalignment type, pitch variation category, deformation direction, and contour asymmetry parameters.
[0134] Step S345: Evaluate thread rolling defects based on thread rolling deformation data to obtain thread rolling defect data.
[0135] In this embodiment, the rolling defect assessment rule set is invoked, and a comprehensive judgment is made based on indicators such as pitch deviation (greater than 0.05 mm), profile skew angle (skew angle exceeding 3°), and peak offset (greater than 0.1 mm) in the rolling deformation data. Each set of thread inspection results corresponds to a scoring item, and the scoring weight is implemented according to the national standard GB / T 869.2, forming a five-level scoring standard. If the evaluation score is less than 60, it is marked as severe rolling defect; the score between 60 and 80 is marked as moderate defect; and the score greater than 80 is marked as normal. The output thread rolling defect data includes defect level, defect item details, deformation part annotation diagram, and corresponding image position index.
[0136] Preferably, step S4 includes the following steps:
[0137] Step S41: Perform stomatal aggregation analysis based on the stomatal data to obtain stomatal aggregation data;
[0138] In this embodiment, the location coordinates (X, Y, Z) of the stomatal data are used as input variables, and the DBSCAN clustering method is employed to determine the spatial density of the stomatal points. The clustering algorithm sets the minimum number of sample points to 5 and the maximum radius distance to 0.2 mm. The core objective of clustering is to identify multiple groups of stomatal points that are continuously distributed within the same radius. If the clustering result shows a distance of 1 mm... 3 If there are more than three pore clusters in the volume, it is recorded as a high concentration area, and pore concentration data is generated. The data includes parameters such as the coordinate range of the concentration location, the concentration volume, the number of pores contained, and the maximum pore volume. All results are stored in the quality tracking database for reference in subsequent mold clearance adjustment.
[0139] Step S42: Based on the concentrated porosity data, reduce the gap of the rolling die to obtain the reduced gap data of the rolling die;
[0140] In this embodiment, the corresponding die rolling trajectory position is derived based on the coordinate region of concentrated pores, and the area of insufficient die rolling is identified by structural map comparison. The gap data mapped to the die processing position is recalibrated. The original setting value of the rolling gap is 0.32mm. In the concentrated pore region, the target setting value of the die gap is lowered to 0.26mm, with an adjustment amount of 0.06mm. A high-precision thread rolling die adjustment device is used for gap adjustment. The adjustment adopts a double-sided micro-screw mechanism, with a minimum resolution of 0.01mm for each adjustment, and the gap change before and after adjustment is recorded by a position encoder. The die gap value measured after adjustment is fed back in real time by a displacement sensor to ensure that the control error does not exceed ±0.005mm. Finally, rolling die gap reduction data containing die number, reduced gap position, adjustment value, and timestamp is generated.
[0141] Step S43: Control the uniformity of the rolling die clearance based on the thread rolling defect data to obtain rolling die clearance uniformity control data;
[0142] In this embodiment, defective thread rolling data is extracted, focusing on the distribution of thread indentation depth and the sequence of defect locations. The average thread indentation depth is set as the target reference value, with a standard of 0.35mm and an allowable deviation within ±0.05mm. Each screw thread segment is divided into 10 equal-length segments along the axial direction. The thread indentation depth of each segment is statistically analyzed. If the average indentation depth of three consecutive segments deviates from the standard value beyond the allowable range, it is considered that the rolling clearance is uneven. Based on the thread rolling die structure and the mapping relationship between indentation deviation and thread segment position, the die contact angle or pressing force is precisely adjusted to achieve a consistent die clearance within ±0.01mm in different areas. The adjusted data records the die number, original clearance distribution, target equilibrium value, and adjustment strategy, forming rolling die clearance uniformity control data.
[0143] Step S44: Integrate the data on the reduction of the rolling die clearance and the data on the uniformity of the rolling die clearance to obtain the rolling die clearance data;
[0144] In this embodiment, the data generated in steps S42 and S43 is uniformly summarized by the data fusion module. The integration logic uses the mold number as the primary key field for matching. If the same mold has both reduction adjustment and uniform control operations, the minimum gap value is used as the final reference, and the gap gradient is redefined for all gap areas. The final rolling die gap data includes the mold number, the target gap value for each contact area, the adjustment source (S42 or S43), the adjustment time, the implementer's number, the verification equipment number, etc. The data structure adopts a structured JSON format and is written to the production line control unit through the MES system.
[0145] Step S45: Transmit the rolling die clearance data and heat treatment process adjustment parameters to the fastener production system to execute the production process parameter control task.
[0146] In this embodiment, the rolling die gap data and the previously adjusted heat treatment process parameters (including temperature gradient adjustment values, holding time correction values, cooling rate correction values, etc.) are written into the production control system via PLC communication protocol. The OPCUA protocol is used for data structure mapping to ensure error-free data exchange in the industrial Ethernet environment. Before data transmission, a CRC check is performed. After successful check, the data enters the controller's cache queue and is then distributed by the production management system to the rolling mill and heat treatment furnace control terminals according to the equipment number, forming a closed-loop feedback adjustment mechanism. During the rolling process, the die performs micron-level real-time compensation, and during the heat treatment process, temperature control logic adjusts and executes PID correction, achieving bidirectional parameter linkage control between rolling and heat treatment.
[0147] Preferably, this specification also provides a fastener manufacturing process parameter control system for executing the fastener manufacturing process parameter control method described above. The fastener manufacturing process parameter control system includes:
[0148] The electroplating anomaly detection module is used to acquire fastener production data; identify surface defects based on the fastener production data to obtain surface defect data; and detect electroplating anomalies based on the surface defect data to obtain electroplating anomaly data.
[0149] The electroplating solution ratio optimization module is used to analyze the decay of fastener corrosion resistance based on electroplating anomaly data to obtain corrosion resistance decay data; to detect coating peeling based on corrosion resistance decay data to obtain coating peeling data; and to optimize the electroplating solution ratio based on the coating peeling data to obtain optimized electroplating solution ratio data.
[0150] The thread rolling defect detection module is used to divide the geometric structure according to the fastener production data to obtain bolt-type fastener data and screw-type fastener data; to perform porosity detection based on the bolt-type fastener data to obtain porosity data; and to perform thread rolling defect detection based on the screw-type fastener data to obtain thread rolling defect data.
[0151] The production process parameter control module is used to control the rolling die clearance based on porosity data and thread rolling defect data to obtain rolling die clearance data; the rolling die clearance data and heat treatment process adjustment parameters are transmitted to the fastener production system to execute the production process parameter control task.
[0152] Therefore, the embodiments should be considered as exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of the equivalents of the application are intended to be included within the invention.
[0153] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features of the invention herein.
Claims
1. A method for controlling fastener manufacturing process parameters, characterized in that, Includes the following steps: Step S1: Obtain fastener production data; Surface defect identification is performed based on fastener production data to obtain surface defect data; Based on the surface defect data, electroplating anomaly detection is performed to obtain electroplating anomaly data. Step S1 includes the following steps: Step S11: Obtain fastener production data; Step S12: Based on fastener production data, perform screw head plating defect detection to obtain screw head plating defect data; Step S13: Detect burrs on the threaded section based on fastener production data to obtain burr data for the threaded section; Step S14: Integrate the screw head plating data and the thread section burr data to obtain surface defect data; Step S15: Perform electroplating anomaly detection based on surface defect data to obtain electroplating anomaly data; Step S2: Analyze the corrosion resistance degradation of fasteners based on the electroplating anomaly data to obtain corrosion resistance degradation data; detect coating peeling based on the corrosion resistance degradation data to obtain coating peeling data; optimize the electroplating solution ratio based on the coating peeling data to obtain optimized electroplating solution ratio data. Step S3: Perform geometric structure division based on fastener production data to obtain bolt-type fastener data and screw-type fastener data; perform porosity detection based on bolt-type fastener data to obtain porosity data; perform thread rolling defect detection based on screw-type fastener data to obtain thread rolling defect data. Step S4: Control the rolling die clearance based on the porosity data and thread rolling defect data to obtain the rolling die clearance data; transmit the rolling die clearance data and heat treatment process adjustment parameters to the fastener production system to execute the production process parameter control task.
2. The fastener manufacturing process parameter control method according to claim 1, characterized in that, Step S12 includes the following steps: Step S121: Extract screw head production images based on fastener production data; Step S122: Segment the hexagonal slot area based on the screw head production image to obtain the hexagonal slot image; Step S123: Calculate the roughness based on the hexagonal notch image to obtain roughness data; Step S124: Identify the grain region in the hexagonal slot image based on the roughness data to obtain grain region data; Step S125: Calculate the boundary sharpness based on the grain region data; determine the degree of grain exposure based on the boundary sharpness to obtain grain exposure data; Step S126: Detect missing plating on the screw head based on the grain exposure data to obtain missing plating data for the screw head.
3. The fastener manufacturing process parameter control method according to claim 1, characterized in that, Step S13 includes the following steps: Step S131: Extract the production image of the thread root based on the fastener production data; Step S132: Calculate the reflection intensity based on the production image of the thread root to obtain the reflection intensity data; Step S133: Identify bright spot areas in the production image of the thread root based on the reflection intensity data to obtain bright spot area data; perform texture distortion analysis based on the bright spot area data to obtain texture distortion data; Step S134: Detect burr shape based on texture distortion data to obtain burr shape data; Step S135: Calculate the sawtooth depth based on the burr morphology data to obtain the sawtooth depth data; perform thread segment burr analysis on the burr morphology data based on the sawtooth depth data to obtain the thread segment burr data.
4. The fastener manufacturing process parameter control method according to claim 1, characterized in that, Step S2, which involves analyzing the decay of fastener corrosion resistance based on electroplating anomaly data, includes: Identify abnormal electroplating areas based on abnormal electroplating data; Salt spray environment test simulation was conducted based on the abnormal electroplating area, in which the salt spray deposition rate was set to 1.0-2.0 ml / 80 cm²·h, and salt spray environment test data were obtained; Corrosion points were recorded based on salt spray environment test data to obtain corrosion point data; The rust area is calculated based on the corrosion point data to obtain the rust area data; Coating peeling data was obtained by conducting coating peeling detection based on rust area data. The corrosion resistance degradation of fasteners was assessed based on coating peeling data, and corrosion resistance degradation data was obtained.
5. The fastener manufacturing process parameter control method according to claim 1, characterized in that, Step S2, which involves detecting coating peeling based on corrosion resistance degradation data, includes: Identify areas with low corrosion resistance based on corrosion resistance degradation data; Coating peeling detection was performed in areas with low corrosion resistance to obtain coating peeling data. Based on the coating warping data, the exposed base metal was analyzed to obtain the exposed base metal data; Oxidation simulations were performed based on the exposed matrix metal data, with oxygen partial pressure set to 0.2-1 atm and relative humidity set to 30%-90%, to obtain metal oxidation data; Oxidation spot distribution analysis was performed based on metal oxidation data to obtain oxidation spot distribution data; The degree of electroplating peeling is identified based on the distribution data of oxide spots, and plating peeling data is obtained.
6. The fastener manufacturing process parameter control method according to claim 1, characterized in that, Step S2, which optimizes the electroplating solution ratio based on coating peeling data, includes: Calculate the number of peeling spots based on coating peeling data; The concentration of metal ions in the electroplating solution was adjusted based on the number of flaking spots, and the adjusted concentration data of metal ions was obtained. The material brittleness is calculated based on the coating peeling data to obtain the material brittleness data; The acidity and alkalinity of the electroplating solution were adjusted based on the material brittleness data to obtain acidity and alkalinity adjustment data; By integrating data on metal ion concentration adjustment and acid-base adjustment, optimized data for electroplating solution ratios are obtained.
7. The fastener manufacturing process parameter control method according to claim 1, characterized in that, Step S3 includes the following steps: Step S31: Calculate the length of the rod based on the fastener production data to obtain the rod length data; Step S32: Based on the rod length data, perform geometric structure division on the fastener production data to obtain bolt-type fastener data and screw-type fastener data; Step S33: Perform porosity detection based on bolt-type fastener data to obtain porosity data; Step S34: Detect thread rolling defects based on screw-type fastener data to obtain thread rolling defect data.
8. The fastener manufacturing process parameter control method according to claim 1, characterized in that, Step S4 includes the following steps: Step S41: Perform stomatal aggregation analysis based on the stomatal data to obtain stomatal aggregation data; Step S42: Based on the concentrated porosity data, reduce the gap of the rolling die to obtain the reduced gap data of the rolling die; Step S43: Control the uniformity of the rolling die clearance based on the thread rolling defect data to obtain rolling die clearance uniformity control data; Step S44: Integrate the data on the reduction of the rolling die clearance and the data on the uniformity of the rolling die clearance to obtain the rolling die clearance data; Step S45: Transmit the rolling die clearance data and heat treatment process adjustment parameters to the fastener production system to execute the production process parameter control task.
9. A fastener manufacturing process parameter control system, characterized in that, For executing the fastener manufacturing process parameter control method as described in claim 1, the fastener manufacturing process parameter control system includes: The electroplating anomaly detection module is used to acquire fastener production data; identify surface defects based on the fastener production data to obtain surface defect data; and detect electroplating anomalies based on the surface defect data to obtain electroplating anomaly data. The electroplating solution ratio optimization module is used to analyze the decay of fastener corrosion resistance based on electroplating anomaly data to obtain corrosion resistance decay data; to detect coating peeling based on corrosion resistance decay data to obtain coating peeling data; and to optimize the electroplating solution ratio based on the coating peeling data to obtain optimized electroplating solution ratio data. The thread rolling defect detection module is used to divide the geometric structure according to the fastener production data to obtain bolt-type fastener data and screw-type fastener data; to perform porosity detection based on the bolt-type fastener data to obtain porosity data; and to perform thread rolling defect detection based on the screw-type fastener data to obtain thread rolling defect data. The production process parameter control module is used to control the rolling die clearance based on porosity data and thread rolling defect data to obtain rolling die clearance data; the rolling die clearance data and heat treatment process adjustment parameters are transmitted to the fastener production system to execute the production process parameter control task.