Multi-station cooperative sealing ring assembly visual error-proofing detection method and device

By employing a multi-station collaborative inspection method and a data fusion decision model, the problem of misjudgment by single-station visual inspection systems in complex environments was solved, thereby improving the stability and reliability of sealing ring assembly quality inspection and enhancing the transparency and traceability of quality control.

CN121505301APending Publication Date: 2026-02-10NANJING TESTECH TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511698835.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-19
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Existing single-station vision inspection systems are susceptible to misjudgments caused by light fluctuations, workpiece vibrations, or oil contamination in complex industrial environments, resulting in insufficient stability and reliability in the inspection of sealing ring assembly quality.

Method used

A multi-station collaborative inspection method is adopted, which performs image quality assessment and multi-dimensional defect detection at the first inspection station, and performs secondary verification at the second inspection station. Combined with a data fusion decision model, the final inspection judgment is generated, and the data association throughout the process is realized through workpiece identification code binding and quality traceability database.

Benefits of technology

It significantly reduces accidental errors caused by random factors, improves the stability and reliability of testing, reduces the risk of misjudging qualified products, enhances the transparency and traceability of quality control, and ensures the accuracy and consistency of sealing ring assembly quality testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121505301A_ABST
    Figure CN121505301A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-station cooperative sealing ring assembly visual error-proofing detection method and device. The method comprises the following steps: acquiring a workpiece identification code and a product model code of a to-be-detected workpiece at a positioning station, and calling a detection parameter template; when the workpiece arrives at a first detection station, collecting a workpiece image, performing image quality evaluation to obtain an evaluation result, and when the evaluation result is passing, positioning and extracting a sealing ring assembly area image; detecting the seal ring assembly area image to generate a detection result; when a second detection station is reached, secondary verification detection is executed, and a recheck detection result is generated; inputting a detection result and a recheck detection result into the model to obtain a detection judgment conclusion; when the detection and judgment conclusion is qualified, the conveying equipment is controlled for transportation; if not, the conveying equipment is controlled to intercept the workpiece identification code, and the workpiece identification code is associated with the detection result, the recheck detection result and the detection judgment conclusion and then stored. By implementing the technical scheme provided by the invention, the detection accuracy of the assembly quality of the sealing ring is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of automation control, specifically to a visual error-proofing detection method and device for multi-station collaborative sealing ring assembly. Background Technology

[0002] In automated assembly lines for mechanical products, quality inspection is typically required to ensure the correct installation of sealing rings in order to guarantee the product's sealing performance. A commonly used technical solution involves deploying a single-station vision inspection system at a fixed location on the production line. When a workpiece equipped with a sealing ring passes through this station, the system triggers an industrial camera to photograph the area containing the sealing ring, acquiring an image of the workpiece. Subsequently, image processing software executes preset algorithms, such as contour analysis or speckle analysis, to determine the presence, centeredness, and completeness of the sealing ring. Finally, based on these analysis results, the system compares them with fixed standards to determine whether the workpiece is "qualified" or "unqualified."

[0003] However, the aforementioned technical solutions relying on single-station, single-shot judgment face challenges in terms of stability and reliability when operating in complex industrial environments. Production sites often experience random interference factors such as instantaneous fluctuations in lighting, slight vibrations of workpieces on conveyor belts, and accidental oil or water stains on the surface of the sealing rings. These factors may cause a single captured image to fail to accurately reflect the actual assembly state of the sealing ring, leading to misjudgments by the detection system. For example, a qualified product with a slight positional deviation but still within acceptable limits might be judged as unqualified. This uncertainty in decision-making caused by the random errors of a single inspection is a pressing technical problem that needs to be solved to improve the accuracy of sealing ring assembly quality inspection. Summary of the Invention

[0004] To address the aforementioned technical problems, this application provides a visual error-proofing inspection method and device for multi-station collaborative sealing ring assembly.

[0005] The first aspect of this application provides a visual error-proofing inspection method for multi-station collaborative sealing ring assembly, employing the following technical solution: At the positioning station, the workpiece identification code of the workpiece to be inspected is obtained, and the corresponding inspection parameter template is called from the preset inspection parameter database according to the product model code bound in the workpiece identification code. When the workpiece to be inspected arrives at the first inspection station, the workpiece image is acquired according to the inspection parameter template, and the image quality of the workpiece image is evaluated to obtain the evaluation result. When the evaluation result is passed, the sealing ring assembly area image is located and extracted in the workpiece image. The first inspection station is located after the positioning station. The image of the sealing ring assembly area is detected by a preset multi-dimensional defect judgment algorithm to generate detection results; When the workpiece to be inspected arrives at the second inspection station, a secondary verification inspection is performed on the workpiece to be inspected to generate a verification inspection result. The second inspection station is located after the first inspection station. The detection results and the verification detection results are input into a preset detection data fusion decision model to obtain a detection judgment conclusion; When the detection and judgment result is qualified, release data is generated and the preset conveying equipment is controlled to transport the goods based on the release data; When the inspection result is unqualified, interception data is generated, and the conveying equipment is controlled to perform an interception action based on the interception data. The workpiece identification code is then associated with the inspection result, the verification inspection result, and the inspection result and stored in a preset quality traceability database.

[0006] By adopting the above technical solution, the problem of misjudgment caused by single-station, single-inspection errors due to light fluctuations, workpiece vibration, or oil contamination in the background technology is effectively solved. By performing image quality assessment and multi-dimensional defect detection at the first inspection station, and secondary verification at the second inspection station, combined with a data fusion decision model, the random errors caused by stochastic factors are significantly reduced, improving the stability and reliability of the inspection. This method not only reduces the risk of misjudging qualified products as unqualified ones, but also achieves full-process data association through workpiece identification code binding and a quality traceability database, enhancing the transparency and traceability of quality control, thereby ensuring the accuracy and consistency of sealing ring assembly quality inspection in complex industrial environments.

[0007] Optionally, when the workpiece to be inspected arrives at the first inspection station, the step of acquiring a workpiece image according to the inspection parameter template, and performing an image quality assessment on the workpiece image to obtain an assessment result, and locating and extracting the sealing ring assembly area image in the workpiece image when the assessment result is "pass", includes: The average gradient magnitude of the workpiece image is calculated, the image sharpness of the workpiece image is evaluated based on the average gradient magnitude, the image brightness and contrast are evaluated by analyzing the gray-level histogram distribution of the workpiece image, and the evaluation result is generated by combining the image sharpness, the image brightness and the contrast. When the evaluation result is passed, template matching is performed in the workpiece image according to the reference features defined in the detection parameter template to determine the center coordinates of the sealing ring assembly area, and the image of the sealing ring assembly area is extracted according to the center coordinates and the preset area size.

[0008] By adopting the above technical solution, the reliability of image acquisition and processing at the first inspection station is effectively improved. This solution, through multi-dimensional quantitative evaluation of workpiece images in terms of gradient, brightness, and contrast, can proactively identify and filter out unqualified images caused by lighting fluctuations, inaccurate focusing, or momentary shaking, such as blurry, overexposed, or low-contrast images, ensuring the quality of the raw data used for analysis from the source. Based on this, precise template matching using inspection parameter templates enables stable and accurate positioning and extraction of the sealing ring assembly area, effectively overcoming interference caused by minor changes in workpiece position. This provides high-quality, uniformly positioned images of the area to be analyzed for subsequent multi-dimensional defect judgment algorithms, laying a solid foundation for accurate detection.

[0009] Optionally, the step of detecting the image of the sealing ring assembly area using a preset multi-dimensional defect determination algorithm and generating detection results includes: A first-dimensional feature, a second-dimensional feature, and a third-dimensional feature are extracted from the image of the sealing ring assembly area. The first-dimensional feature reflects the presence of the sealing ring in the image of the sealing ring assembly area, the second-dimensional feature reflects the positional accuracy of the sealing ring, and the third-dimensional feature reflects the morphological integrity of the sealing ring. The first dimension feature, the second dimension feature, the third dimension feature, and the preset judgment criteria from the detection parameter template are used to calculate a comprehensive defect score through the multi-dimensional defect judgment algorithm. The overall defect score is compared with a preset defect threshold to generate the detection result.

[0010] By adopting the above technical solution, a comprehensive and accurate automated assessment of the assembly quality of sealing rings is achieved. This solution overcomes the limitations of single criteria by systematically extracting and comprehensively analyzing multi-dimensional features reflecting the "existence," "positional accuracy," and "morphological integrity" of the sealing rings, effectively identifying various potential defects. Quantifying these multi-dimensional features into a comprehensive defect score and comparing it with a preset threshold makes the assessment process more objective and consistent, significantly reducing the risk of misjudgment caused by accidental fluctuations in single features (such as slight contour deformation due to instantaneous reflection). This allows for the generation of stable and reliable detection results even under complex working conditions, providing a high-quality initial judgment basis for subsequent fusion decisions.

[0011] Optionally, extracting the first-dimensional features, second-dimensional features, and third-dimensional features from the image of the sealing ring assembly area includes: The image of the sealing ring assembly area is subjected to contour extraction processing to obtain the actual contour of the sealing ring, and the first dimension feature is determined based on the presence or absence of the actual contour. When the actual contour exists, the centroid coordinates of the actual contour are calculated, and the second dimension feature is determined based on the deviation between the centroid coordinates and the theoretical center coordinates of the detection parameter template. Calculate the area and perimeter of the actual contour, and determine the third dimension feature based on the roundness value calculated based on the area and perimeter.

[0012] By adopting the above technical solution, efficient, stable, and quantitative extraction of key features of the sealing ring assembly state is achieved. Based on unified contour extraction, this solution logically derives three core criteria: existence, position, and morphology. The presence or absence of the contour directly determines whether the sealing ring is in place; the coordinate deviation between the contour's centroid and the theoretical center is calculated to precisely quantify the correctness of its installation position; and the roundness is calculated using the contour area and perimeter to scientifically assess its integrity, whether it is distorted, or damaged. This multi-dimensional feature extraction method based on unified contour data is not only computationally efficient and logically coupled, but also effectively eliminates interference from irrelevant factors such as image texture and color, making the feature data objective and reliable, laying a solid foundation for the subsequent generation of accurate comprehensive defect scores.

[0013] Optionally, the step of inputting the detection result and the verification detection result into a preset detection data fusion decision model to obtain a detection judgment conclusion includes: When the detection result is inconsistent with the verification detection result, the first feature data of the detection result is extracted, and the second feature data of the verification detection result is extracted. Both the first feature data and the second feature data include target feature parameters extracted from the image of the sealing ring assembly area. Calculate the differential feature vector between the first feature data and the second feature data, wherein the differential feature vector characterizes the deviation pattern between the detection result and the verification detection result; The differentiated feature vector is input into the detection data fusion decision model to obtain a preset defect type that matches the differentiated feature vector; From the quality traceability database, retrieve historical review conclusions associated with the preset defect type, obtain the handling strategy for the preset defect type from the historical review conclusions, and generate the detection judgment conclusion based on the handling strategy.

[0014] By adopting the above technical solution, the decision-making challenge of inconsistent results from two inspection stations is effectively solved, significantly improving the accuracy and intelligence of the final judgment. This method does not simply involve voting on the results, but rather deeply analyzes the deviation patterns between the feature data from the two inspections. Through differentiated feature vectors, it accurately identifies the root causes of the discrepancies (such as specific types of transient interference or potential defects). Furthermore, it combines historical experience in handling defect types to make decisions, enabling the system to distinguish between accidental false detections and genuine defects, much like an experienced quality inspector. This minimizes false interceptions or missed detections caused by single random interference in complex operating conditions, ensuring the final authority of the quality judgment and the rationality of production line processing decisions.

[0015] Optionally, calculating the differential feature vector between the first feature data and the second feature data includes: A first position parameter is determined from the first feature data, and a second position parameter corresponding to the first position parameter is determined from the second feature data; A first morphological parameter is determined from the first feature data, and a second morphological parameter corresponding to the first morphological parameter is determined from the second feature data; The position deviation component is calculated based on the first position parameter and the second position parameter, and the shape deviation component is calculated based on the first shape parameter and the second shape parameter. The positional deviation component and the morphological deviation component are combined in a preset combination method to obtain the differentiated feature vector.

[0016] By employing the aforementioned technical solution, precise quantification and structured analysis of the differences between two inspection results were achieved. This method transforms abstract inconsistencies into concrete, quantifiable features of positional and morphological deviations by separately calculating the deviation components of positional and morphological parameters. This structured decomposition effectively reveals the root cause of the discrepancies in the inspection results—whether it's a minor change in workpiece positioning or deformation or damage to the sealing ring itself. The resulting differentiated feature vector provides clear, physically meaningful input features for the subsequent decision-making model, enabling it to more accurately match current deviation patterns with historical defect types, thereby significantly improving the accuracy and interpretability of data fusion decision-making.

[0017] Optionally, the method further includes: Periodically retrieve traceability records from the quality traceability database where the test results are inconsistent with the verification test results; Based on the workpiece identification code contained in the traceability record, the product model code bound to the workpiece identification code is extracted, and the retrieved traceability records are grouped according to the product model code to obtain at least one product model group. For each product model group, the cumulative number of traceability records contained in the product model group is calculated. When the cumulative number reaches a preset optimization trigger threshold, the product model code corresponding to the product model group is determined as the product model code to be optimized. Extract all the differential feature vectors within the product model group associated with the product model code to be optimized, and update the detection parameter template corresponding to the product model code to be optimized based on the differential feature vectors.

[0018] By adopting the above technical solution, the testing system achieves self-optimization and continuous improvement capabilities. This method, through automatic tracing and analysis of historical cases of inconsistencies between two testing stations, can effectively identify systemic misjudgments caused by testing parameter templates for specific product models being unsuitable for actual production conditions. When the cumulative number of inconsistencies for a particular model reaches a threshold, the system automatically focuses on that model and uses accumulated differentiated feature vector data to optimize its testing parameter template. This closed-loop feedback mechanism enables the system to dynamically adapt to changes in the production line, continuously improving the consistency between the first inspection station and the verification station, thereby fundamentally reducing future testing discrepancies and significantly improving the long-term stability and adaptability of the entire testing system.

[0019] A second aspect of this application provides an electronic device including a processor, a memory, a user interface, and a network interface, wherein the memory is used to store instructions, the user interface and the network interface are both used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method as described in any of the foregoing.

[0020] A third aspect of this application provides a computer-readable storage medium storing instructions that, when executed, perform the method described in any of the preceding descriptions.

[0021] A fourth aspect of this application provides a computer program product that, when run on an electronic device, causes the electronic device to perform the method as described in any of the preceding claims.

[0022] In summary, one or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: By constructing a multi-station collaborative inspection system, and combining image quality assessment, multi-dimensional feature analysis, data fusion decision-making, and self-optimization mechanisms, the system effectively overcomes the shortcomings of single-station inspection which is susceptible to random interference, and significantly improves the stability and accuracy of inspection. At the same time, by utilizing full-process data association and closed-loop optimization, the system achieves transparency in quality traceability and continuous self-improvement of system performance, providing a highly reliable and adaptive solution for the quality inspection of sealing ring assembly in complex industrial environments. Attached Figure Description

[0023] Figure 1 This is a schematic diagram of the system architecture of an embodiment of a multi-station collaborative visual error-proofing inspection method for sealing ring assembly according to this application; Figure 2 This is a flowchart illustrating a multi-station collaborative visual error-proofing inspection method for sealing ring assembly disclosed in an embodiment of this application. Figure 3 This is another schematic diagram of a visual error-proofing inspection method for multi-station collaborative sealing ring assembly disclosed in an embodiment of this application; Figure 4 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application.

[0024] Explanation of reference numerals in the attached figures: 100, System architecture; 101, First terminal device; 102, Second terminal device; 103, Third terminal device; 104, Network; 105, Server; 401, Processor; 402, Communication bus; 403, User interface; 404, Network interface; 405, Memory. Detailed Implementation

[0025] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0026] In the description of the embodiments of this application, the words "for example" or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design that is described as "for example" or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design options. Rather, the use of the words "for example" or "for instance" is intended to present the relevant concepts in a specific manner.

[0027] In the description of the embodiments of this application, the term "multiple" means two or more. For example, multiple systems means two or more systems, and multiple screen terminals means two or more screen terminals. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0028] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0029] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as model training applications, video recognition applications, web browser applications, social platform software, etc.

[0030] Terminal devices 101, 102, and 103 can be either hardware or software. When terminal devices 101, 102, and 103 are hardware, they can be various electronic devices with displays, including but not limited to smartphones, tablets, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III) players, MP4 (Moving Picture Experts Group Audio Layer IV) players, laptops, and desktop computers, etc. When terminal devices 101, 102, and 103 are software, they can be installed in the aforementioned electronic devices. They can be implemented as multiple software programs or software modules (e.g., multiple software programs or software modules used to provide distributed services) or as a single software program or software module. No specific limitations are imposed here.

[0031] This embodiment discloses a visual error-proofing inspection method for multi-station collaborative sealing ring assembly. Figure 2 This is a flowchart illustrating a multi-station collaborative visual error-proofing inspection method for sealing ring assembly disclosed in an embodiment of this application. Figure 2 As shown, the method includes the following steps: S201. At the positioning station, obtain the workpiece identification code of the workpiece to be inspected, and call the corresponding inspection parameter template from the preset inspection parameter database according to the product model code bound in the workpiece identification code. A positioning station is not a general work area, but rather a precisely designed station on an automated production line or material handling system. Its core function is to guide and fix a moving workpiece, whose position and orientation are uncertain, to a pre-set, precise, and repeatable three-dimensional spatial coordinate and orientation using a series of mechanical and sensor devices. A typical positioning station is usually integrated into a conveyor line (such as a conveyor belt, roller conveyor, or chain conveyor) and includes at least the following cooperating components: 1) a conveying and carrying mechanism responsible for transporting the workpiece to the station; 2) a blocking and positioning mechanism, such as a pneumatic or electric stopper controlled by a PLC (Programmable Logic Controller), which rises from the side or under the conveyor line when the workpiece arrives, forming a physical barrier to precisely stop the workpiece's direction of travel. Simultaneously, it may also be equipped with lateral guide rails or clamps for correcting the lateral position and rotation angle of the workpiece; 3) position detection sensors, such as paired photoelectric sensors or proximity switches, one for detecting that the workpiece is about to arrive, triggering deceleration or preparing to block, and the other for confirming that the workpiece is fully in place and close to the blocker, indicating that the positioning process is complete. One specific implementation is through optical barcode reading. In this scheme, a one-dimensional or two-dimensional code containing structured information is pasted or engraved on a preset position on the workpiece body or its carrying tray. When the workpiece is transported to the positioning station and stabilized, a fixed industrial barcode scanner deployed at the station is triggered to scan and decode the barcode area, thereby quickly obtaining the string of the workpiece identification code. Another alternative is to use radio frequency identification (RFID) technology. In this solution, each workpiece or its pallet integrates an RFID tag storing the workpiece identification code. RFID readers installed at the positioning station can stably read tag information entering its radio frequency field range under non-contact, non-line-of-sight conditions. This solution has strong anti-interference capabilities against on-site contaminants such as oil and dust. Another solution is based on Optical Character Recognition (OCR) technology. This involves using an industrial camera to photograph character sequences (such as product models or serial numbers) directly engraved or sprayed on the workpiece surface, and then using OCR software to analyze and recognize the images, extracting the character information as the workpiece identification code. Regardless of the solution used, the system will parse the identification code after obtaining it to extract the product model code.

[0032] After successfully acquiring and parsing the product model code, the system immediately executes the operation of calling the corresponding detection parameter template. This operation is typically completed collaboratively by the main control system of the production line (such as an industrial computer) and the vision processing system of the core inspection station. The detection parameter template is essentially a complete, structured digital inspection standard and algorithm configuration scheme for a specific product model. It defines in detail the rules to be followed at every stage from image acquisition to final judgment. Several technical solutions exist for deploying and calling the detection parameter database in this step. The first solution is a localized database solution, where the detection parameter templates for different product models are stored as independent files on the local hard drive of the vision processing system. The system directly searches and loads the templates locally based on the received product model code. This solution has extremely fast response speed and does not rely on a network connection. The second solution is a centralized server database solution, where a relational database is established on the factory's manufacturing execution system or a dedicated parameter management server to centrally manage the detection parameter templates for all products. The vision system connects via industrial Ethernet and sends query requests to obtain the parameters. This solution facilitates unified maintenance, version control, and access control. The third approach is a hybrid caching scheme that combines the advantages mentioned above. When the vision system starts up or changes models, it pre-downloads the parameter templates that may be used from the central server and caches them locally. During detection, it calls them from the local server at high speed, while synchronizing with the central server at a preset period (e.g., every 10 minutes) to obtain the latest parameter updates, thus balancing response speed and data consistency.

[0033] S202. When the workpiece to be inspected arrives at the first inspection station, the workpiece image is acquired according to the inspection parameter template, and the image quality of the workpiece image is evaluated to obtain the evaluation result. When the evaluation result is passed, the sealing ring assembly area image is located and extracted in the workpiece image. The first inspection station is located after the positioning station. The first inspection station refers to an automated workstation physically deployed downstream of the positioning station. It is delivered to the workpiece by a conveyor (e.g., a conveyor belt) and integrates a complete vision system, including an industrial camera, a light source, and software for processing workpiece images. When the workpiece arrives at this station, the system does not acquire arbitrary images, but rather controls the imaging process based on the inspection parameter template called in the previous step. This template is a digital inspection formula preset for a specific product model, specifying parameters such as imaging brightness and camera exposure in detail. The acquired raw data is the workpiece image. Immediately afterwards, the system initiates an image quality assessment program, an automated software algorithm designed to quantify image sharpness by calculating the average gradient amplitude, or to determine whether the image brightness and contrast meet standards by analyzing the grayscale histogram. Its output assessment result (e.g., pass or fail) is a critical gate signal determining whether the process can continue. Only when the assessment result is pass will the program proceed to the next step: locating and extracting the sealing ring assembly area image from the high-quality workpiece image. This area, often called the region of interest, is a local image containing the sealing ring to be inspected.

[0034] To achieve this precise positioning, a preferred approach is to first identify a stable and unchanging reference feature on the workpiece (e.g., a positioning hole). This positioning can be achieved using a template matching algorithm to achieve ultra-high accuracy down to the sub-pixel level. After finding the reference feature, the system calculates and extracts the final image of the sealing ring assembly area based on the relative position information stored in the parameter template. Alternatively, a pre-trained object detection model can be used to directly identify and select the region. The purpose of this entire process is to ensure that subsequent analysis is based on a clear, standard, and highly relevant local image, thus providing the most reliable data foundation for the accuracy of the final detection.

[0035] Optionally, when the workpiece to be inspected arrives at the first inspection station, the step of acquiring a workpiece image according to the inspection parameter template, and performing an image quality assessment on the workpiece image to obtain an assessment result, and locating and extracting the sealing ring assembly area image in the workpiece image when the assessment result is passed, includes: calculating the average gradient amplitude of the workpiece image, assessing the image clarity of the workpiece image based on the average gradient amplitude, assessing the image brightness and contrast by analyzing the grayscale histogram distribution of the workpiece image, and generating the assessment result by combining the image clarity, the image brightness, and the contrast; when the assessment result is passed, performing template matching in the workpiece image according to the reference features defined in the inspection parameter template to determine the center coordinates of the sealing ring assembly area, and extracting the sealing ring assembly area image according to the center coordinates and a preset area size.

[0036] Specifically, after the workpiece to be inspected arrives at the first inspection station and its image is acquired, the system first performs a multi-dimensional image quality assessment. This assessment process includes: First, image sharpness assessment. For example, the system can perform gradient operator operations such as Sobel or Scharr on the entire workpiece image or its key areas to calculate the gradient magnitude of each pixel, and then calculate the average gradient magnitude of the entire area. This average is compared with a preset lower sharpness threshold in the same inspection parameter template. If it is higher than this threshold, the image is considered sufficiently sharp and free from unacceptable blurring due to vibration or defocusing. Second, image brightness and contrast assessment. The system generates a grayscale histogram of the workpiece image and makes a judgment by analyzing the distribution pattern of the histogram. For example, the parameter template can define a lower brightness limit (e.g., grayscale value 10) and an upper brightness limit (e.g., grayscale value 245). The system calculates the proportion of pixels with grayscale values ​​below the lower limit and above the upper limit to the total number of pixels. If this proportion is less than a preset overexposure / underexposure ratio threshold (e.g., 1%), the brightness is considered appropriate.

[0037] Furthermore, the system calculates the width of the grayscale range covering, for example, 98% of the pixels in the histogram. If this width is greater than a preset minimum contrast width threshold, the contrast is considered to meet the requirements. Finally, the system performs a logical AND operation on the three evaluation results of image sharpness, image brightness, and image contrast. Only when all three simultaneously meet the preset standards is the final evaluation result judged as "passed". Once the evaluation result is "passed", the system immediately initiates a high-precision region localization and extraction process. This process relies on predefined information in the detection parameter template. Specifically, the template stores a template image of a "reference feature" (e.g., an image of a stable and unchanging positioning hole on the workpiece) and the precise geometric offset vector (Δx, Δy) from the center point of the reference feature to the center point of the sealing ring assembly area. The system uses a template matching algorithm, such as Normalized Cross-Correlation (NCC), to search for the region most similar to the reference feature template image in the workpiece image that has just passed the quality evaluation. After finding the integer pixel location with the highest relevance score, the system can further refine this location using sub-pixel interpolation techniques such as parabolic fitting or Gaussian fitting to obtain the center coordinates (X_center, Y_center) of the sealing ring assembly area with floating-point precision. Subsequently, the system reads the preset size information (width W and height H) of this area from the parameter template, and based on the calculated center coordinates and dimensions, accurately extracts a rectangular image of size W×H pixels from the workpiece image. This is the sealing ring assembly area image required for subsequent analysis. Through this two-step method of "comprehensive evaluation first, then precise extraction," this application not only avoids invalid or even erroneous analysis of low-quality images, but also greatly improves the repeatability and anti-interference capability of the region of interest extraction by using sub-pixel localization based on stable benchmark features.

[0038] S203. The image of the sealing ring assembly area is detected by a preset multi-dimensional defect judgment algorithm, and a detection result is generated; The multi-dimensionality here does not refer to a single detection standard, but rather to the algorithm's comprehensive evaluation of the sealing ring's assembly state from multiple orthogonal or complementary perspectives. These dimensions include at least: First, the existence dimension, which determines whether the sealing ring exists within its proper assembly groove through image segmentation or feature extraction; second, the positional dimension, which, based on confirmed existence, precisely measures the sealing ring's positional offset and / or rotation angle relative to the center of the assembly groove by fitting its contour or calculating its centroid, to determine if it exceeds tolerance limits; third, the integrity and shape dimension, which analyzes whether the extracted sealing ring contour is continuous and closed, and whether there are any abnormal deformations such as breaks, gaps, twists, or "flanging" caused by local compression; and fourth, the surface quality dimension, which analyzes the visible surface area of ​​the sealing ring to detect surface defects such as scratches, burrs, bubbles, oil stains, or attached foreign matter. The defect judgment algorithm is a collection of specific technical methods to achieve the above multi-dimensional detection. For example, existence and location detection can be performed using Hough circle transform or edge-based geometric fitting algorithms; shape integrity analysis can be performed using contour analysis algorithms to calculate descriptors such as perimeter, area, and roundness of the contour and compare them with standard values; surface quality detection can be performed using background subtraction or Otsu's method for threshold segmentation followed by spot analysis, or more advanced deep learning-based segmentation networks can be used to identify small and irregular defects.

[0039] Optionally, the step of detecting the sealing ring assembly area image using a preset multi-dimensional defect judgment algorithm to generate a detection result includes: extracting a first-dimensional feature, a second-dimensional feature, and a third-dimensional feature from the sealing ring assembly area image, wherein the first-dimensional feature reflects the presence of the sealing ring in the sealing ring assembly area image, the second-dimensional feature reflects the positional accuracy of the sealing ring, and the third-dimensional feature reflects the morphological integrity of the sealing ring; calculating a comprehensive defect score by using the first-dimensional feature, the second-dimensional feature, the third-dimensional feature, and a preset judgment standard derived from the detection parameter template through the multi-dimensional defect judgment algorithm; and comparing the comprehensive defect score with a preset defect threshold to generate the detection result.

[0040] Parallel feature extraction is performed on the input image of the sealing ring assembly area to obtain three different quantitative indicators. Specifically: First, to obtain the first-dimensional feature reflecting the existence of the sealing ring, the system can, for example, use image binarization and contour lookup to count the number of closed contours in the image that match the approximate size and shape of the sealing ring. One implementation is that the first-dimensional feature is assigned a value of 1 (indicating existence) if and only if two approximately concentric closed circular or elliptical contours (corresponding to the inner and outer rings of the sealing ring, respectively) are detected; otherwise, it is assigned a value of 0 (indicating absence). This is the most basic "presence or absence" judgment. Second, to obtain the second-dimensional feature reflecting the accuracy of the sealing ring's position, after confirming the existence of the sealing ring, the system will accurately calculate the geometric center coordinates of the sealing ring through, for example, Hough circle transform or least squares fitting. At the same time, the standard center coordinates of the workpiece of this model are read from the detection parameter template. Then, by calculating the Euclidean distance, the center position offset of the sealing ring is obtained, and this offset is the second-dimensional feature. Third, to obtain the third-dimensional feature reflecting the integrity of the sealing ring's shape, the system extracts the outer contour of the sealing ring and calculates its roundness (1). When the sealing ring is twisted, compressed, "flanged," or has a gap, its circumference will increase abnormally or its shape will deviate from a circle, resulting in a significant decrease in the roundness value. This roundness value can then be used as the third-dimensional feature. After extracting the above three features, the algorithm enters the comprehensive scoring stage.

[0041] These three feature values, along with the preset judgment criteria for each dimension read from the detection parameter template (e.g., the expected value of the existence feature is 1, the positional offset is d, the maximum allowable value of the positional offset is d_max, the morphological roundness is C, and the minimum allowable value of the morphological roundness is C_min), are substituted into a weighted scoring formula to calculate the comprehensive defect score. A typical calculation scheme is: Comprehensive Defect Score = w1 × f_exist + w2 × (d / d_max) + w3 × ((1-C) / (1-C_min)). Here, f_exist is the existence penalty term (if the existence feature is 0, then f_exist is a maximum value, directly leading to non-compliance; otherwise, it is 0), and w1, w2, and w3 (w1+w2+w3=1) are the weight coefficients for defects in different dimensions, which are also provided by the parameter template to adapt to the sensitivity requirements for different defect types. Finally, the system compares the calculated comprehensive defect score with a preset defect threshold, also provided by the parameter template. If the score is higher than the threshold, the test result is judged as NG (not acceptable), and the scores of each sub-item can be attached for diagnosis; if the score is lower than or equal to the threshold, it is judged as OK (acceptable).

[0042] Optionally, extracting the first-dimensional feature, the second-dimensional feature, and the third-dimensional feature from the image of the sealing ring assembly area includes: performing contour extraction processing on the image of the sealing ring assembly area to obtain the actual contour of the sealing ring, and determining the first-dimensional feature based on the presence or absence of the actual contour; when the actual contour exists, calculating the centroid coordinates of the actual contour, and determining the second-dimensional feature based on the deviation value between the centroid coordinates and the theoretical center coordinates of the detection parameter template; calculating the area and perimeter of the actual contour, and determining the third-dimensional feature based on the roundness value calculated based on the area and the perimeter.

[0043] The system first performs a series of preprocessing operations on the image of the sealing ring assembly area, such as, but not limited to, converting it to a grayscale image and applying a Gaussian filter to smooth the image and suppress random noise. Subsequently, the system performs contour extraction processing on the preprocessed image. A typical implementation uses the Canny edge detection algorithm to generate an edge map of the image, and then runs a contour finding algorithm such as Suzuki on the edge map to identify all closed or open contours.

[0044] Furthermore, to accurately separate the actual contour representing the sealing ring, the system filters all found contours based on preset geometric constraints (such as minimum / maximum perimeter and minimum / maximum area) in the detection parameter template, eliminating pseudo-contours generated by noise or background textures. On this basis, the system determines the first dimension feature (existence) based on whether at least one actual contour meets the conditions after filtering: if it exists, the feature is set to "1" or "True"; otherwise, if no contour meeting the conditions is found, the sealing ring is considered missing, and the feature is set to "0" or "False". The system continues to calculate subsequent dimension features only if the existence of the actual contour is determined (i.e., the first dimension feature is 1). For the second dimension feature (positional accuracy), the system calculates the image moments of the actual contour and calculates the centroid coordinates (Cx, Cy) of the contour based on the first and zeroth moments. These centroid coordinates represent the geometric center of the actually assembled sealing ring in the image. The system then reads the theoretical center coordinates (Xt, Yt) defined for the current workpiece model from the detection parameter template. These theoretical coordinates represent the ideal position of the sealing ring in the assembly area image.

[0045] Further, the second-dimensional feature is determined by calculating the Euclidean distance between the actual centroid and the theoretical center (i.e., the deviation value dev = sqrt((Cx - Xt)² + (Cy - Yt)²)). For the third-dimensional feature (morphological integrity), the system directly uses the contour analysis function to calculate the area (A) enclosed by the actual contour and its own perimeter (P). Then, these two values are substituted into the standard roundness calculation formula (4πA) / P² to obtain a roundness value between 0 and 1. For a circular sealing ring with a perfect morphology, its roundness value will be very close to 1, while any distortion, folding, or defect will cause its perimeter to increase disproportionately relative to the area, resulting in a significant decrease in the roundness value. This calculated roundness value itself constitutes the third-dimensional feature.

[0046] S204. When the workpiece to be detected reaches the second detection station, perform a secondary verification test on the workpiece to be detected to generate a review test result. The second detection station is located after the first detection station. The second detection station generally refers to an independent station in the automated production line that is physically separated from the first detection station and located downstream of its transmission path. The execution method of the secondary verification test is flexible and diverse, aiming to form complementary or redundant confirmation of capabilities. A basic solution is to fully reproduce the process of the first detection station; more preferably, differential detection technologies can be adopted. For example, if 2D vision is used in the first station, a 3D vision system based on laser triangulation can be deployed in the second station to detect three-dimensional defects, or an algorithm based on deep learning can be used to identify complex defects that are difficult to cover by traditional algorithms. Another alternative solution is to change the physical conditions or perspectives of the detection. For example, a camera with an inclined perspective can be configured at the second station to observe the side wall of the sealing ring, or low-angle dark field illumination can be used to highlight surface scratches and edge contours. In addition, an adaptive review strategy can also be adopted, that is, dynamically adjust the mode of the second detection according to the result of the first detection (such as OK or NG), and optimize the detection rhythm on the premise of ensuring reliability.

[0047] Regardless of which of the above solutions is adopted, step S204 will ultimately generate a review test result. This result will be sent to the central control system together with the test result generated for the first time, and the final state of the workpiece will be determined by the preset review judgment logic. This logic is configurable. For example, it can be set as an AND logic, that is, the workpiece is finally determined to be a qualified product only when both results are OK; it can also be set as a more stringent OR logic, that is, if any one of the results is NG, the workpiece is determined to be unqualified. For the special case where the two results are inconsistent (such as one OK and one NG), the system can automatically sort the workpiece to the area to be rechecked for manual confirmation.

[0048] S205. Input the detection results and the verification detection results into a preset detection data fusion decision model to obtain a detection judgment conclusion; The inspection data fusion decision model is a key technical component. Essentially, it's a pre-configured logical processing unit or algorithm set. Its core function isn't simply comparing two results for consistency, but rather comprehensively analyzing, arbitrating, and intelligently judging two independent data sources: the inspection result from the first inspection station and the review inspection result from the second inspection station. This ultimately leads to a more reliable and comprehensive conclusion. Specific implementation methods for this model include, but are not limited to, the following: The first method is a rule-based decision engine, which is the most direct implementation. This engine pre-defines a series of explicit if-then-other logic rules, such as: Rule 1) If both inspection results are qualified, the conclusion is that the product is qualified; Rule 2) If either inspection result is unqualified, the conclusion is that the product is unqualified; Rule 3) If one result is qualified and the other is unqualified, the conclusion is that it needs re-inspection, and the workpiece is automatically sorted to the manual review station. These rules can be further refined, for example, by setting different arbitration priorities for different defect types. The second method is a weighted scoring-based decision model, which assigns different trust weights to different stations or different inspection items. For example, if the 3D inspection system at the second station is proven to have higher accuracy in identifying edge-flipping defects (edge-flipping refers to the abnormal flipping or lifting of the edge of a flexible object), then the weight of its detection result will be set higher when determining whether edge-flipping exists. The model weights and sums the sub-scores of the two stations according to their weights, and compares the final total score with a preset pass / fail threshold to draw a conclusion. The third approach is based on machine learning classification models, such as Support Vector Machines (SVM), decision trees, or small neural networks. By using a large amount of historical inspection data (including the original data / features of the two inspections, as well as the final correct judgment given by quality inspection experts), the model is trained offline, enabling it to automatically learn and master the complex correlation patterns between the two inspection results, thus achieving a more intelligent and adaptive judgment than fixed rules.

[0049] Optionally, the step of inputting the detection result and the verification detection result into a preset detection data fusion decision model to obtain a detection judgment conclusion includes: when the detection result and the verification detection result are inconsistent, extracting the first feature data of the detection result and extracting the second feature data of the verification detection result, wherein both the first feature data and the second feature data include target feature parameters extracted from the image of the sealing ring assembly area; calculating the differential feature vector between the first feature data and the second feature data, wherein the differential feature vector characterizes the deviation pattern between the detection result and the verification detection result; inputting the differential feature vector into the detection data fusion decision model to obtain a preset defect type that matches the differential feature vector; retrieving historical verification conclusions associated with the preset defect type from the quality traceability database, obtaining a handling strategy for the preset defect type from the historical verification conclusions, and generating the detection judgment conclusion based on the handling strategy.

[0050] Feature data is not simply an OK / NG conclusion, but rather the raw quantitative basis for generating that conclusion. Specifically, the target feature parameters are a series of values ​​calculated by image processing algorithms from the raw images captured by the first and second detection stations. For example, these parameters may include, but are not limited to: geometric parameters of the sealing ring (such as the center coordinates, radius, roundness, and circumference of the fitted circle), positional parameters (such as the minimum / maximum / average distance between the sealing ring contour and the edge of the groove), surface texture parameters (such as the mean, variance, and contrast of the grayscale value of the sealing ring image area), and contour morphology parameters (such as the edge gradient intensity and direction distribution extracted by the edge detection operator). By extracting this underlying quantitative data, the system prepares accurate and comparable input information for subsequent differential analysis.

[0051] After acquiring the quantitative feature data from the two workstations, the method proceeds to the next step: calculating the differential feature vector between the first and second feature data. This differential feature vector characterizes the deviation pattern between the detection result and the review detection result. The differential feature vector is a core mathematical construct designed to express the differences between the two detection results using a single vector. There are several ways to calculate it: a simple implementation is to subtract the first and second feature data vectors element-wise, obtaining the difference vector as the differential feature vector. For example, if the radius of the first feature data is R1 and the radius of the second feature data is R2, then the component of the differential feature vector along the radius dimension is (R1-R2). A more preferred approach is to calculate the normalized difference to eliminate the influence of different parameter dimensions. Each dimension of this vector represents the degree and direction of deviation for a specific feature parameter. Therefore, this vector acts like a unique deviation fingerprint, not only indicating the existence of a difference but also precisely characterizing its essence. For example, a vector with a large value in the height or sidewall grayscale component may point to a deviation pattern of flange defects; while a vector with a large value in the center coordinate component may point to a deviation pattern of workpiece positioning offset.

[0052] Furthermore, the system will utilize this deviation fingerprint to infer the root cause: the differential feature vector is input into the detection data fusion decision model to obtain a preset defect type that matches the differential feature vector. In this scenario, the detection data fusion decision model is trained as a specialized classifier. This model internally stores the mapping relationships between various deviation patterns and preset defect types. This mapping relationship can be established in two ways: the first is based on a rule base of expert knowledge, for example, a preset rule that if the Z-axis height component of the differential feature vector is greater than a threshold A, it is determined to be a flanged seal; the second is based on machine learning methods, by collecting a large amount of historical data (including differential feature vectors under various inconsistent conditions, and the actual defect types confirmed by quality inspection experts afterward), and training a classification model (such as the K-nearest neighbor algorithm, SVM, or a small neural network). When a new differential feature vector is input, the model calculates which known defect pattern in the training library it is most similar to, and outputs a specific and understandable preset defect type, such as: seal ring flange, seal ring damage, workpiece positioning offset, camera field of view dirt or light source brightness attenuation, etc., realizing intelligent diagnosis from inconsistent results to what might be the cause of the inconsistency.

[0053] Furthermore, after identifying possible causes, the system will automatically generate a final handling plan based on historical experience: It retrieves historical review conclusions associated with the preset defect type from the quality traceability database, obtains the handling strategy for the preset defect type from these historical review conclusions, and generates the detection judgment conclusion based on the handling strategy. The quality traceability database here is a dynamically updated knowledge base that records the defect type diagnosed by the system, the final true conclusion of manual review, and the handling measures taken each time an inconsistency occurs. When the system diagnoses a preset defect type (such as a sealing ring flange), it queries all historical records related to sealing ring flanges in the database, calculates its historical review conclusions (e.g., finding that 95% of such cases were ultimately confirmed as true defects by humans), and retrieves the corresponding handling strategy (e.g., the historical strategy was to determine it as a non-conforming product and sort it into a scrap box). The system then automatically generates the final detection judgment conclusion, such as non-conforming product - flange, based on this optimal strategy verified by historical data. If the historical strategy is to await manual review and trigger a calibration alarm on the upstream assembly robotic arm, the system will also generate the corresponding conclusion and instructions.

[0054] Optionally, calculating the differential feature vector between the first feature data and the second feature data includes: determining a first position parameter from the first feature data and determining a second position parameter corresponding to the first position parameter from the second feature data; determining a first morphological parameter from the first feature data and determining a second morphological parameter corresponding to the first morphological parameter from the second feature data; calculating a positional deviation component based on the first position parameter and the second position parameter, and calculating a morphological deviation component based on the first morphological parameter and the second morphological parameter; and combining the positional deviation component and the morphological deviation component according to a preset combination method to obtain the differential feature vector.

[0055] Position parameters are a set of data specifically used to describe the spatial position of the sealing ring in the equipment coordinate system or workpiece coordinate system. For example, these parameters may include: the two-dimensional coordinates (X, Y) of the geometric center of the sealing ring identified by an image processing algorithm; in the case of a 3D inspection system, it may also include its average height value (Z); or, the distance values ​​of the sealing ring contour from multiple key points on the inner wall of its mounting groove. Determining the corresponding position parameters is crucial in this step, meaning the system needs to ensure that the comparison is of the measurement results of the same physical feature under different inspection systems—for example, both being the geometric center of the sealing ring, rather than one center relative to the edge of another.

[0056] Furthermore, unlike positional parameters, morphological parameters are intrinsic properties describing the geometry, integrity, and assembly state of the seal itself. Theoretically, these parameters should not change with the workpiece's position. Specific examples of these parameters may include: the radius, diameter, or circumference of the fitted circle, used to characterize the seal's dimensions; roundness or ellipticity, used to characterize whether its shape is standard; integrity parameters for the contour, such as whether the contour is broken or has gaps; and parameters for characterizing surface quality, such as the presence of scratches, burrs, or oil stains. In particular, for defects such as flanges, morphological parameters can be more advanced features, such as the curvature of the seal's sidewall profile extracted from a tilted-view camera image, or the height profile of the seal's cross-section extracted from 3D scan data.

[0057] Furthermore, the two sets of abstract parameters are transformed into deviation values ​​with concrete physical meaning. The calculation methods for the positional deviation component can vary. One approach is to calculate the Euclidean distance between the coordinates of the two center points (X1, Y1) and (X2, Y2) to obtain a scalar value representing the overall positional offset. More preferably, a two-dimensional vector (X1-X2, Y1-Y2) can be calculated, which includes not only the magnitude of the offset but also its direction. The calculation of the morphological deviation component is more complex. It can be a vector containing multiple elements, each representing a difference in a morphological parameter. For example, element one might be the radius difference (R1-R2), element two the roundness difference, and element three the XOR result of the contour integrity flag. Through this step, the system transforms the inconsistency of the fuzzy results into two quantifiable parts: one describing the positional deviation of the workpiece, and the other describing the morphological deviation indicating a problem with the sealing ring itself.

[0058] Furthermore, the combination method defines how to package different types of deviation information into a standard-format vector for processing by subsequent decision models. A simple combination method is vector concatenation: concatenating the vector representing positional deviation and the vector representing morphological deviation end-to-end to form a higher-dimensional vector. For example, if positional deviation is a 2-dimensional vector and morphological deviation is a 5-dimensional vector, then the combined differential feature vector is a 7-dimensional vector. Another more refined combination method can introduce weighting, that is, multiplying different components by different weight coefficients before combination to reflect the different importance of different deviation types in diagnosis. Through this structured combination, the final generated differential feature vector is no longer a bunch of scattered values, but a deviation profile with a clear structure. The values ​​of different segments correspond to the specific situations of positional and morphological deviations, providing unprecedentedly rich, clear, and easily interpretable input information for subsequent decision models to perform accurate defect pattern classification.

[0059] S206. When the detection and determination conclusion is qualified, generate release data and control a preset conveying device to transport based on the release data; Specifically, when the detection and determination conclusion is qualified, whether it is due to the initial detection result being consistently qualified or finally determined to be qualified through the detection data fusion decision model, the system will first generate a structured release data. This release data is not just a simple "OK" signal, but a data packet that can be used for quality traceability and process control. It may include the unique identifier of the current workpiece, a clear "qualified" conclusion, an accurate timestamp, the production line and station numbers, and optionally, the measured values of key characteristic parameters for statistical process control analysis, and send it to the manufacturing execution system for archiving. After generating this data, the system will then control the preset conveying device to transport the qualified workpiece based on this release data. The implementation method of this step can vary flexibly according to the automation level and layout of the production line. For example, in a conveyor-based assembly line, the conveying device can be a conveyor belt and a sorting mechanism on the side. At this time, the control instruction is usually "do not perform any action", allowing the qualified workpiece to continue to flow along the main conveyor belt; while in a more flexible manufacturing cell, the conveying device can be a multi-axis industrial robot, which will grab and place the qualified workpiece into the designated downstream station or the qualified product bin according to the accurate coordinate information contained in the release data; in addition, for the scenario of batch processing, the conveying device can also be a complete pallet exchange system. After confirming that all the workpieces on the pallet are qualified, the control instruction will trigger the entire pallet to be transported to the next process.

[0060] S207. When the detection and determination conclusion is unqualified, generate interception data, control the conveying device to perform an interception action based on the interception data, and store the workpiece identification code associated with the detection result, the re-inspection result, and the detection and determination conclusion in a preset quality traceability database.

[0061] Specifically, the system generates a clear interception data set. This interception data is a structured instruction package, not just a simple "NG" signal. It may include, but is not limited to, the unique identifier of the current workpiece, the non-conforming judgment, and diagnostic information such as the specific defect type output by the decision model (e.g., "sealing ring flange" or "position offset exceeding limits"). Based on this detailed interception data, the system will then control the conveyor to execute a precise interception action, aiming to physically isolate the non-conforming product from the main production flow. The implementation of this interception action can vary depending on the automation configuration of the production line: in one specific implementation, a pneumatic pusher or swing arm on the conveyor receives an instruction and is activated, pushing the non-conforming workpiece from the main conveyor belt into a designated non-conforming product bin; in another more advanced implementation, an industrial robot will grab the workpiece based on the precise coordinates that may be contained in the interception data and place it in a specific rework station or isolation area, awaiting further manual processing. During or after physical interception, the system performs a crucial data archiving operation: forcibly associating the workpiece's unique identifier with the original inspection result that triggered the judgment (i.e., the result of the first inspection station), the verification inspection result (i.e., the result of the second inspection station), and the final inspection judgment conclusion, and storing this complete data record in a pre-set quality traceability database. This operation constructs a complete and detailed electronic file for each non-conforming product, not only achieving irrefutable quality traceability but also providing a valuable data foundation for subsequent root cause analysis, evaluation of testing equipment stability, and continuous optimization of production processes.

[0062] Please see Figure 3 This is another flowchart illustrating a multi-station collaborative visual error-proofing inspection method for sealing ring assembly, as described in this application.

[0063] S301. Periodically retrieve traceability records from the quality traceability database where the test results are inconsistent with the verification test results; Periodicity is not a rigid limitation; its execution method can be flexibly configured according to actual production needs and system load. In a preferred implementation, the retrieval task can be a time-based pre-scheduled task, for example, automatically triggered by the background monitoring module every hour, at the end of each production shift, or during fixed off-peak hours (such as midnight) each day to perform routine system health scans. In another optional implementation, the retrieval task can also be event-triggered, for example, activated after a preset number (e.g., 1000) of records have been stored in the quality traceability database, or when the number of consecutive inconsistent records reaches a preset alarm threshold (e.g., 5 consecutive occurrences). This approach can respond more promptly to potential abnormal fluctuations. When performing this step, the system's analysis module initiates an automated query request to the quality traceability database. Its core query logic is to filter out all records where the results from the first inspection station differ from those from the results from the second inspection station. This "inconsistency" includes at least two situations: the first is a direct contradiction in the judgment conclusions, where one station judges the result as "qualified (OK)" while the other judges it as "unqualified (NG)"; the second is more nuanced, where even if both stations judge the result as "qualified," but the difference in their quantitative detection values ​​for the same key feature (such as size, grayscale value, coordinates, etc.) exceeds a preset "consistency tolerance threshold," this situation is also considered "inconsistent" because it may indicate that the sensor or algorithm at one of the inspection stations has begun to deviate.

[0064] S302. Based on the workpiece identification code contained in the traceability record, extract the product model code bound to the workpiece identification code, and group the retrieved traceability records according to the product model code to obtain at least one product model group. Specifically, the system categorizes and organizes these filtered inconsistent traceability records. This process first requires determining the specific product model corresponding to each traceability record. Based on the workpiece identification code contained in each traceability record, the system extracts or queries the product model code uniquely bound to that workpiece identification code. This extraction process has several specific technical implementation schemes: In one implementation, the product model code can be directly encoded in a specific field of the workpiece identification code. For example, for an identification code like "P08A-SN20231115-001", the system can directly extract the prefix "P08A" as its product model code using preset parsing rules. In another, more general and flexible implementation, the workpiece identification code may be a semantically meaningless unique serial number. In this case, the system needs to use this identification code as a key index to query an external management system, such as a manufacturing execution system or enterprise resource planning system's production work order database, to obtain the product model code associated with the workpiece from the work order information. After obtaining the product model code corresponding to each traceability record, the system will group all retrieved traceability records according to this code. For example, the system can create a hash map or dictionary structure with product model codes as keys and traceable record lists as values, iterating through all inconsistent records and adding them one by one to the list corresponding to the model code. Through this step, the original, mixed set of disputed records is organized into at least one product model group, where each group precisely contains all records belonging to the same product model with inconsistent test results. This model-based grouping preprocessing is crucial; it effectively isolates variables, ensuring that subsequent statistical analysis is based on data from similar products. This allows for a more precise identification of whether the root cause of the problem is related to the testing procedure of a specific model or a general equipment problem affecting all models, laying a solid and reliable data foundation for subsequent fault diagnosis and system self-optimization.

[0065] S303. For each product model group, calculate the cumulative number of traceability records contained in the product model group. When the cumulative number reaches a preset optimization trigger threshold, determine the product model code corresponding to the product model group as the product model code to be optimized. The system iterates through each product model group generated in the previous step and calculates the cumulative number of traceability records contained within each group. The calculation of the cumulative number can be varied, aiming to quantify the potential instability of a particular product model's detection scheme. In a straightforward implementation, the cumulative number can refer to the total number of inconsistent records belonging to that product model discovered within the current periodic retrieval window. In a more preferred implementation, to reflect the persistence and cumulative effect of the problem, the system can maintain a long-term inconsistency counter for each product model, adding the number of newly discovered inconsistent records to the historical total for the corresponding model after each retrieval. In another more refined approach, this step calculates not an absolute number, but rather the proportion of inconsistent records to the total production volume of that product model during the same period, such as the "inconsistency rate." This method eliminates the natural difference in the absolute number of errors between high-volume and low-volume products, making the judgment more fair and scientific. When the calculated cumulative number or inconsistency rate reaches a preset optimization trigger threshold, the system identifies and marks the product model code (e.g., P08A) corresponding to that product model group as the "product model code to be optimized." The optimization trigger threshold is a parameter that can be flexibly configured by technicians or administrators according to actual quality control standards. For example, it can be set to an absolute value (such as "50 records") or a relative proportion (such as "0.5%)", without specific limitations here.

[0066] S304. Extract all the differential feature vectors within the product model group associated with the product model code to be optimized, and update the detection parameter template corresponding to the product model code to be optimized based on the differential feature vectors.

[0067] The differentiated feature vector is not simply raw data, but a structured dataset designed to describe the specific differences between the detection results of the first and second inspection stations. For example, this vector can be structured data containing multiple dimensions of information, such as: differences in judgment results (e.g., one is OK, the other NG), numerical deviations of key detection features (e.g., coordinate differences Δx, Δy, size differences Δs, grayscale mean differences Δg, etc.), and specific feature identifiers that led to the initial non-compliance judgment. The system iterates through the group determined in the previous steps that belongs to the product model to be optimized, and extracts this pre-stored differentiated feature vector from each traceability record of that group, thus forming a "set of incorrect questions" regarding all historical inspection objections for that product model.

[0068] Furthermore, based on this aggregated set of incorrect test cases (i.e., the collection of all extracted differentiated feature vectors), the system will intelligently update the detection parameter template corresponding to the product model code to be optimized. The detection parameter template here is a set of preset rules and parameters that guide the inspection station on how to inspect a specific product model. For example, it may include the coordinates and dimensions of each inspection area, brightness / contrast thresholds for image processing, similarity score thresholds for template matching, gradient thresholds for edge detection, and pass / fail judgment logic, etc. Specific technical solutions for updating this template include, but are not limited to, the following: The first approach uses statistical analysis. The system can perform statistical analysis on all extracted differential feature vectors, calculating the mean, standard deviation, and distribution interval of various numerical deviations. If the analysis reveals a significant systematic shift in the deviation of a certain feature (e.g., a certain size measurement value is generally 0.05mm smaller), the system can automatically make compensatory adjustments to the corresponding size detection standard (lower limit or center value) in the product model template to eliminate this systematic bias. The second approach is based on machine learning. In a more advanced implementation, the detection parameter template itself may be a machine learning model (e.g., a classifier, neural network). In this case, the update process is the retraining or fine-tuning of the model. The system can combine all extracted differential feature vectors and their corresponding verification results (i.e., the correct answers confirmed by the second detection station or manually) to form a new fine-tuning training set. Then, this new dataset is used to incrementally train the original detection model, allowing it to learn and adapt to these marginal cases or difficult samples that previously led to inconsistent judgments, thereby improving the model's accuracy in handling similar situations in the future.

[0069] This embodiment also discloses an electronic device, as shown in the reference. Figure 4 The electronic device may include: at least one processor 401, at least one communication bus 402, user interface 403, network interface 404, and at least one memory 405.

[0070] The communication bus 402 is used to enable communication between these components.

[0071] The user interface 403 may include a display screen and a camera. Optionally, the user interface 403 may also include a standard wired interface and a wireless interface.

[0072] The network interface 404 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).

[0073] The processor 401 may include one or more processing cores. The processor 401 connects to various parts of the server using various interfaces and lines, and performs various server functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory 405, and by calling data stored in memory 405. Optionally, the processor 401 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 401 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the processor 401.

[0074] exist Figure 4 In the electronic device shown, the user interface 403 is mainly used to provide an input interface for the user and to obtain the user input data; while the processor 401 can be used to call the application program stored in the memory 405 for a multi-station collaborative sealing ring assembly visual error prevention detection method. When executed by one or more processors 401, the electronic device performs one or more methods as described in the above embodiments.

[0075] In some embodiments of this application, a computer-readable storage medium is provided, including instructions that, when executed on the electronic device, cause the electronic device to perform a multi-station collaborative visual error-proofing inspection method for sealing ring assembly according to an embodiment of this application.

[0076] In some embodiments of this application, a computer program product is also provided, which, when run on an electronic device, causes the electronic device to execute a multi-station collaborative visual error-proofing detection method for sealing ring assembly according to an embodiment of this application.

[0077] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory 305 and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned memory 305 includes various media capable of storing program code, such as a USB flash drive, external hard drive, magnetic disk, or optical disk.

[0078] The foregoing description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Other embodiments of this disclosure will be readily apparent to those skilled in the art upon consideration of the disclosure in this specification. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described in this disclosure. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.

Claims

1. A visual error-proofing inspection method for multi-station collaborative sealing ring assembly, characterized in that, Applied to a server, the method includes: At the positioning station, the workpiece identification code of the workpiece to be inspected is obtained, and the corresponding inspection parameter template is called from the preset inspection parameter database according to the product model code bound in the workpiece identification code. When the workpiece to be inspected arrives at the first inspection station, the workpiece image is acquired according to the inspection parameter template, and the image quality of the workpiece image is evaluated to obtain the evaluation result. When the evaluation result is passed, the sealing ring assembly area image is located and extracted in the workpiece image. The first inspection station is located after the positioning station. The image of the sealing ring assembly area is detected by a preset multi-dimensional defect judgment algorithm to generate detection results; When the workpiece to be inspected arrives at the second inspection station, a secondary verification inspection is performed on the workpiece to be inspected to generate a verification inspection result. The second inspection station is located after the first inspection station. The detection results and the verification detection results are input into a preset detection data fusion decision model to obtain a detection judgment conclusion; When the detection and judgment result is qualified, release data is generated and the preset conveying equipment is controlled to transport the goods based on the release data; When the inspection result is unqualified, interception data is generated, and the conveying equipment is controlled to perform an interception action based on the interception data. The workpiece identification code is then associated with the inspection result, the verification inspection result, and the inspection result and stored in a preset quality traceability database.

2. The method according to claim 1, characterized in that, When the workpiece to be inspected arrives at the first inspection station, an image of the workpiece is acquired according to the inspection parameter template, and the image quality of the workpiece image is evaluated to obtain an evaluation result. When the evaluation result is "pass," locating and extracting the sealing ring assembly area image in the workpiece image includes: The average gradient magnitude of the workpiece image is calculated, the image sharpness of the workpiece image is evaluated based on the average gradient magnitude, the image brightness and contrast are evaluated by analyzing the gray-level histogram distribution of the workpiece image, and the evaluation result is generated by combining the image sharpness, the image brightness and the contrast. When the evaluation result is passed, template matching is performed in the workpiece image according to the reference features defined in the detection parameter template to determine the center coordinates of the sealing ring assembly area, and the image of the sealing ring assembly area is extracted according to the center coordinates and the preset area size.

3. The method according to claim 1, characterized in that, The step of detecting the image of the sealing ring assembly area using a preset multi-dimensional defect determination algorithm and generating detection results includes: A first-dimensional feature, a second-dimensional feature, and a third-dimensional feature are extracted from the image of the sealing ring assembly area. The first-dimensional feature reflects the presence of the sealing ring in the image of the sealing ring assembly area, the second-dimensional feature reflects the positional accuracy of the sealing ring, and the third-dimensional feature reflects the morphological integrity of the sealing ring. The first dimension feature, the second dimension feature, the third dimension feature, and the preset judgment criteria from the detection parameter template are used to calculate a comprehensive defect score through the multi-dimensional defect judgment algorithm. The overall defect score is compared with a preset defect threshold to generate the detection result.

4. The method according to claim 3, characterized in that, The extraction of the first-dimensional features, the second-dimensional features, and the third-dimensional features from the image of the sealing ring assembly area includes: The image of the sealing ring assembly area is subjected to contour extraction processing to obtain the actual contour of the sealing ring, and the first dimension feature is determined based on the presence or absence of the actual contour. When the actual contour exists, the centroid coordinates of the actual contour are calculated, and the second dimension feature is determined based on the deviation between the centroid coordinates and the theoretical center coordinates of the detection parameter template. Calculate the area and perimeter of the actual contour, and determine the third dimension feature based on the roundness value calculated based on the area and perimeter.

5. The method according to claim 1, characterized in that, The step of inputting the detection result and the verification detection result into a preset detection data fusion decision model to obtain a detection judgment conclusion includes: When the detection result is inconsistent with the verification detection result, the first feature data of the detection result is extracted, and the second feature data of the verification detection result is extracted. Both the first feature data and the second feature data include target feature parameters extracted from the image of the sealing ring assembly area. Calculate the differential feature vector between the first feature data and the second feature data, wherein the differential feature vector characterizes the deviation pattern between the detection result and the verification detection result; The differentiated feature vector is input into the detection data fusion decision model to obtain a preset defect type that matches the differentiated feature vector; From the quality traceability database, retrieve historical review conclusions associated with the preset defect type, obtain the handling strategy for the preset defect type from the historical review conclusions, and generate the detection judgment conclusion based on the handling strategy.

6. The method according to claim 5, characterized in that, The calculation of the differential feature vector between the first feature data and the second feature data includes: A first position parameter is determined from the first feature data, and a second position parameter corresponding to the first position parameter is determined from the second feature data; A first morphological parameter is determined from the first feature data, and a second morphological parameter corresponding to the first morphological parameter is determined from the second feature data; The position deviation component is calculated based on the first position parameter and the second position parameter, and the shape deviation component is calculated based on the first shape parameter and the second shape parameter. The positional deviation component and the morphological deviation component are combined in a preset combination method to obtain the differentiated feature vector.

7. The method according to claim 5, characterized in that, The method further includes: Periodically retrieve traceability records from the quality traceability database where the test results are inconsistent with the verification test results; Based on the workpiece identification code contained in the traceability record, the product model code bound to the workpiece identification code is extracted, and the retrieved traceability records are grouped according to the product model code to obtain at least one product model group. For each product model group, the cumulative number of traceability records contained in the product model group is calculated. When the cumulative number reaches a preset optimization trigger threshold, the product model code corresponding to the product model group is determined as the product model code to be optimized. Extract all the differential feature vectors within the product model group associated with the product model code to be optimized, and update the detection parameter template corresponding to the product model code to be optimized based on the differential feature vectors.

8. An electronic device, characterized in that, The device includes a processor, a memory, a user interface, and a network interface. The memory is used to store instructions. The user interface and the network interface are both used to communicate with other devices. The processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method as described in any one of claims 1-7.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed, perform the method as described in any one of claims 1-7.

10. A computer program product, characterized in that, When the computer program product is run on an electronic device, it causes the electronic device to perform the method as described in any one of claims 1-7.