Luggage handle assembly precision on-line detection method based on laser contour scanning
By acquiring and processing point cloud data frames and process order information of bag handles, and combining a lightweight rule base and incremental learning agent module, automated semantic annotation of the laser contour scanning detection system is realized. This solves the problems of high semantic interpretation cost and insufficient data storage in the existing system, improves detection efficiency and interpretability, and is suitable for small and medium-sized manufacturing scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG AOYONGXING LEATHER GOODS CO LTD
- Filing Date
- 2026-02-02
- Publication Date
- 2026-05-19
AI Technical Summary
Existing laser contour scanning inspection systems lack semantic annotation mechanisms, resulting in high semantic interpretation costs for inspection data. This makes it difficult to support data interpretation and business expansion under changing process environments. Furthermore, the inspection data storage layer has not yet formed a data architecture with schema evolution and semantic enhancement capabilities, leading to broken traceability links and making it difficult to support accountability, reproduction, and process closed-loop optimization.
By acquiring the original point cloud data frame of the bag handle assembly area and simultaneously collecting process work order information, denoising and normalization preprocessing is performed to extract key morphological parameters. Combined with a lightweight context rule base and an edge-side incremental learning agent module, automated semantic annotation is achieved, and semantic tags are embedded in composite meta data packets and written into a time-series database that supports schema evolution.
It achieves automated semantic annotation of point cloud data, improves the business readability and process consistency of inspection results, reduces hardware resource consumption, is suitable for small and medium-sized manufacturing scenarios, has good interpretability and audit traceability capabilities, and supports efficient quality traceability and batch analysis.
Smart Images

Figure CN122065048A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of manufacturing quality traceability technology for industrial inspection data management, and in particular to an online detection method for the assembly accuracy of bag handles using laser contour scanning. Background Technology
[0002] As the luggage manufacturing industry increasingly demands automated quality inspection and digitalization of assembly processes, online inspection technology based on laser contour scanning has become one of the mainstream methods for quality control in luggage handle assembly. Such systems can collect real-time 3D point cloud data of the assembly area, automatically determine whether the handle assembly precision meets standards, and to a certain extent achieve standardization and traceability of the assembly process. Currently, most laser contour scanning inspection systems used in the industry rely primarily on raw point clouds or geometric feature calculations as data carriers, combining machine vision or simple logical rules to determine assembly status. These systems typically record basic information such as inspection time, equipment number, and assembly batch, and store measurement data in structured tables or databases. However, existing technologies generally lack semantic annotation mechanisms for inspection data. Inspection data often only reflects the numerical deviation of geometric parameters, failing to embed sufficient business context and assembly semantic tags. For example, an inspection system might output "end diameter deviation 0.35mm," but cannot clearly identify business semantic events such as "assembly offset exceeds standard" or "abnormal tilt angle." This results in users needing to repeatedly parse raw point cloud data and manually compare historical work orders, model, or batch information during subsequent quality traceability and problem reproduction queries, leading to low retrieval efficiency and high semantic interpretation costs. In recent years, some studies have attempted to automate semantic annotation of detection data by integrating deep learning models and knowledge graph reasoning. However, such solutions rely on massive computing resources and huge amounts of manually annotated corpora, resulting in high deployment barriers and complex model maintenance, making them unsuitable for the current industrial scenarios of small and medium-sized manufacturing enterprises. While traditional rule-based judgment can achieve efficient qualification determination, it lacks dynamic context binding capabilities, and its semantic tag content is limited, making it difficult to support data interpretation and business expansion under changing process environments. Furthermore, the detection data storage layer has not yet formed a data architecture with schema evolution and semantic enhancement capabilities. Raw data and complex semantic information are often managed separately, leading to broken traceability links and making it difficult to support accountability, reproduction, and process closed-loop optimization. Summary of the Invention
[0003] In order to solve the above-mentioned technical problems, the present invention provides an online detection method for the assembly accuracy of bag handles by laser contour scanning.
[0004] The technical solution of this invention is implemented as follows: an online detection method for the assembly accuracy of a bag handle using laser contour scanning, comprising: S1: Obtain the original point cloud data frame of the bag handle assembly area and simultaneously collect the corresponding process work order information. The process work order information includes product model, assembly timestamp, robot action number and detection equipment ID, forming an initial data input with spatiotemporal and business context identifiers. S2: Perform denoising and normalization preprocessing on the original point cloud data frame to eliminate outliers and non-uniform sampling deviations introduced by environmental jitter or reflection interference during the scanning process, and generate a standardized point cloud dataset as the basic input for subsequent geometric feature extraction. S3: Based on the standardized point cloud dataset, perform local geometric feature extraction, calculate the key morphological parameters of the handle profile, including radian curvature, end diameter and mounting surface flatness, and quantize the above parameters into a set of numerical feature vectors to form a discriminable structured feature representation; S4: Retrieve the corresponding assembly feature template from the preset lightweight context rule base according to the product model. The assembly feature template is generated based on the statistics of historical qualified samples and managed by version. It contains the nominal values and tolerance ranges of each key morphological parameter under the model, which are used to support subsequent semantic matching judgment. S5: Perform weighted similarity matching between the numerical feature vector and the assembly feature template of the corresponding model, use the weighted Euclidean distance algorithm to calculate the degree of deviation between the two, and generate a matching score as the basis for judging whether the current assembly state falls within the coverage of known semantic tags. S6: Determine whether the matching score is higher than a preset threshold. If the condition is met, bind the successfully matched semantic label to the current detection record. If the condition is not met, trigger the edge-side incremental learning agent module. This module performs fast nearest neighbor comparison based on the simplified KNN graph index constructed from historical labeled samples and recommends the closest historical semantic label as supplementary output. S7: Embed the selected semantic tags in key-value pairs into the composite meta data package containing the original point cloud, geometric feature vectors and process order information to form a structured detection result data unit with complete contextual association and interpretability; S8: Write the structured detection result data units into a time series database that supports schema evolution, so that the subsequent quality traceability system can directly retrieve them based on semantic conditions, thereby achieving efficient problem reproduction and batch analysis without re-parsing the original point cloud.
[0005] The present invention provides an online detection method for the assembly accuracy of bag handles using laser contour scanning, which has the following advantages: (1) This invention achieves automated semantic annotation of point cloud data by constructing a lightweight context rule base and a dynamic binding mechanism for process work order information. This invention uses structured metadata such as product model, timestamp, and equipment ID as initial context input, and combines it with extracted key geometric feature vectors such as radian curvature, end diameter, and flatness. It then uses a weighted Euclidean distance algorithm to match these vectors with pre-set templates, automatically assigning interpretable labels such as "normal assembly," "offset exceeding standards," and "abnormal tilt angle" without deploying complex deep learning models. This design significantly improves the business readability and process consistency of the inspection results, providing a direct and usable high-level judgment basis for quality traceability.
[0006] (2) This invention introduces an edge-side incremental learning agent module and adopts a simplified KNN graph indexing mechanism to achieve localized low-latency auxiliary decision-making. This invention only retains boundary cases and typical misjudgment anchors in historical samples to construct a lightweight similarity retrieval structure, and completes label recommendation in unknown or ambiguous states without increasing the computational burden on edge devices. This mechanism avoids strong dependence on real-time communication links and ensures the continuous adaptability of the system when a small number of new samples flow in, greatly improving the robustness and closed-loop autonomy of semantic annotation. At the same time, all generated semantic labels are embedded in the meta data package in the form of key-value pairs to form a composite data structure that includes the original point cloud, geometric features, process context and semantic judgment, and is written into a time series database that supports schema evolution, so that subsequent retrieval can be directly and efficiently carried out through natural semantic conditions (such as "all handles with abnormal tilt angles in a certain batch"), completely getting rid of the inefficient paradigm of "first restore the point cloud and then re-analyze" in the traditional process; (3) This invention abandons the heavy knowledge graph reasoning and end-to-end deep learning architecture, and instead adopts a hybrid intelligent path of rule-driven and lightweight learning collaboration. While ensuring technological advancement, it greatly reduces hardware resource consumption and engineering deployment threshold, making it particularly suitable for rapid deployment and flexible iteration in small and medium-scale manufacturing scenarios. By deeply coupling the semantic tag generation process with the specific process context, it not only enhances the consistency between the discrimination logic and actual production, but also endows the system with good interpretability and audit traceability, meeting the core requirements of industrial quality management for transparency and compliance. In addition, the schema's evolvable data storage design reserves interfaces for future expansion of new defect types or access to multi-source sensor information, possessing excellent scalability and long-term evolution potential. Attached Figure Description
[0007] Figure 1 A flowchart of an online detection method for the assembly accuracy of a bag handle using laser contour scanning according to the present invention; Figure 2This is a sub-flowchart of a laser contour scanning method for online detection of assembly accuracy of bag handles according to the present invention; Figure 3 This is another sub-flowchart of the online detection method for the assembly accuracy of a bag handle using laser contour scanning according to the present invention. Detailed Implementation
[0008] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0009] The following disclosure provides many different embodiments or examples for implementing different structures of the invention. To simplify the disclosure, specific examples of components and arrangements are described below. Of course, these are merely examples and are not intended to limit the invention. Furthermore, reference numerals and / or letters may be repeated in different examples; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.
[0010] like Figure 1 As shown, this invention provides an online detection method for the assembly accuracy of bag handles using laser contour scanning, specifically including: S1: Obtain the original point cloud data frame of the bag handle assembly area and simultaneously collect the corresponding process work order information. The process work order information includes product model, assembly timestamp, robot action number and detection equipment ID, forming an initial data input with spatiotemporal and business context identifiers. S2: Perform denoising and normalization preprocessing on the original point cloud data frame to eliminate outliers and non-uniform sampling deviations introduced by environmental jitter or reflection interference during the scanning process, and generate a standardized point cloud dataset as the basic input for subsequent geometric feature extraction. S3: Based on the standardized point cloud dataset, perform local geometric feature extraction, calculate the key morphological parameters of the handle profile, including radian curvature, end diameter and mounting surface flatness, and quantize the above parameters into a set of numerical feature vectors to form a discriminable structured feature representation; S4: Retrieve the corresponding assembly feature template from the preset lightweight context rule base according to the product model. The assembly feature template is generated based on the statistics of historical qualified samples and managed by version. It contains the nominal values and tolerance ranges of each key morphological parameter under the model, which are used to support subsequent semantic matching judgment. S5: Perform weighted similarity matching between the numerical feature vector and the assembly feature template of the corresponding model, use the weighted Euclidean distance algorithm to calculate the degree of deviation between the two, and generate a matching score as the basis for judging whether the current assembly state falls within the coverage of known semantic tags. S6: Determine whether the matching score is higher than a preset threshold. If the condition is met, bind the successfully matched semantic label to the current detection record. If the condition is not met, trigger the edge-side incremental learning agent module. This module performs fast nearest neighbor comparison based on the simplified KNN graph index constructed from historical labeled samples and recommends the closest historical semantic label as supplementary output. S7: Embed the selected semantic tags in key-value pairs into the composite meta data package containing the original point cloud, geometric feature vectors and process order information to form a structured detection result data unit with complete contextual association and interpretability; S8: Write the structured detection result data units into a time series database that supports schema evolution, so that the subsequent quality traceability system can directly retrieve them based on semantic conditions, thereby achieving efficient problem reproduction and batch analysis without re-parsing the original point cloud.
[0011] Step S1: Obtain the original point cloud data frame of the bag handle assembly area and simultaneously collect the corresponding process order information. The process order information includes the product model, assembly timestamp, robot action number, and detection equipment ID, forming initial data input with spatiotemporal and business context identifiers. Specifically, this includes: S1.1: Based on the laser contour scanner, the three-dimensional point cloud signal of the bag handle assembly area is collected. The original scan frame is processed with timestamp alignment to eliminate the data time sequence offset caused by sensor sampling delay and generate an original point cloud data frame with time sequence identifier as geometric information input. The 3D acquisition module based on the laser contour scanner sets the wavelength parameters and sampling frequency, and applies them to the surface of the assembly area of the bag handle to realize the generation and digital output of point cloud signals in the corresponding spatial range. Furthermore, by using a synchronous trigger controller (parameter: trigger delay controlled within 1 millisecond), the scan cycle start signal is precisely synchronized with the system master clock, and a scan data stream with a preliminary sampling time identifier is obtained; Furthermore, a timestamp alignment algorithm (window length: 200 milliseconds, sliding step: 10 milliseconds) is adopted to correct the offset between the scan data stream and the sensor's local clock record, and to generate a timing mapping table under a globally unified time reference. Furthermore, by using a cross-device clock skew estimation algorithm (parameters: the reference synchronization source is the IEEE 1588 protocol clock, with an allowable error of ±2 microseconds), the phase alignment between the scanner's internal time base and the main control time base of the detection system is achieved, resulting in an absolute timestamp sequence that eliminates the influence of sampling delay. Furthermore, through the index embedding module, the above absolute timestamp sequence is bound to the corresponding 3D point cloud signal frame to construct the original point cloud data frame with clear temporal identification, thereby achieving precise coupling between geometric data and time base; By using timestamp alignment algorithms and cross-device deviation correction, the scanning signal results from the previous step are transformed into three-dimensional geometric data with a unified time reference, achieving the technical effect of temporal consistency and comparability of the original point cloud. For example, on a luggage handle assembly line, the sampling frequency of a laser contour scanner is set to 20kHz, the wavelength to 650nm, and the acquisition coverage area to a 150mm × 50mm assembly area. The synchronous trigger controller is configured with a trigger delay of 0.5 milliseconds to ensure that the scanning cycle matches the main control PLC command cycle. The timestamp alignment algorithm window length is set to 200 milliseconds, the sliding step size is 10 milliseconds, and the difference between the sensor recording time and the PLC system time is calculated in real time, resulting in an average offset of 3.2 milliseconds. The cross-device deviation correction stage uses the IEEE 1588 clock synchronization protocol, and the deviation correction constant is set to... This reduces the corrected time error to 1.5 microseconds by 3.2 milliseconds. The index embedding module binds the corrected absolute timestamp to each frame of point cloud data through a hash mapping; for example, the timestamp corresponding to the 100th frame of point cloud data is... This configuration enables spatiotemporal consistency identification. Under this configuration, the output raw point cloud data frames maintain a geometric accuracy of ±0.02mm while significantly improving timestamp consistency, meeting the millisecond-level alignment requirements of subsequent process correlation analysis. S1.2: Read the process order information of the current workstation in real time from the Manufacturing Execution System (MES), trigger the data subscription mechanism based on the product model code, and synchronously obtain the product model, assembly timestamp, robot action number and inspection equipment ID associated with the current inspection task to form a structured business context dataset; Based on the real-time data interface of the Manufacturing Execution System (MES), an event-driven data retrieval method is adopted (parameter: product model code = current inspection task input) to realize the data retrieval function of process work order information; Furthermore, through a subscription mechanism based on the message queue protocol (parameter: MQTT topic is workstation number / product model), the business data packets associated with the current inspection task are received in real time, and the original process work order record containing product model, assembly timestamp, robot action number and inspection equipment ID is obtained; Furthermore, a data parsing algorithm (parameter: JSON pattern parsing template version = latest process standard version number) is used to extract fields and validate types in the received original process work order records, realize the structured decomposition of each business field, and generate a field set with clear data type labels; Furthermore, the time domain validity of the assembly timestamp is verified by a consistency check method (parameter: timestamp field format = ISO8601) and cross-time zone or daylight saving time offset is corrected to ensure that the time data is correct in subsequent matching processes with the original laser scanning time series. Furthermore, by adopting an index mapping processing method (parameters: primary index key = product model code, secondary index key = detection equipment ID), the four key pieces of information, namely product model, assembly timestamp, robot action number, and detection equipment ID, are organized into a set of key-value pairs with fast retrieval capabilities, forming a structured business context dataset; By using event-driven data subscription and field parsing processing, the MES data call results from the previous step are transformed into structured business context data with a unified format, clear fields, and direct time and space matching, thus realizing the logical binding preparation of process work order information and laser scanning data. For example, on a bag production line, the product model code for the current inspection task is "HB202304", and the workstation number is "ST05". Upon receiving the product model code, the event-driven interface of the MES system pushes a process order data packet with the subject "ST05 / HB202304". This data packet contains the product model "HB202304", the assembly timestamp "2023-06-18T14:32:15Z", the robot action number "RBT-ACT-233", and the inspection equipment ID "LD-SCN-05". Using JSON template version "v3.2", the data packet is parsed, the values of the four fields are extracted and their types are labeled, and the assembly timestamp is confirmed to be valid through ISO8601 format validation. During the index mapping process, a primary index key "HB202304" and an auxiliary index key "LD-SCN-05" are established. The fields are organized in key-value pairs as a dataset of {"ProductModel":"HB202304","AssemblyTimestamp":"2023-06-18T14:32:15Z","RobotActionID":"RBT-ACT-233","DeviceID":"LD-SCN-05"}. This dataset will be aligned with the original laser scanning point cloud time series at the millisecond level in S1.3, which will significantly improve the reliability and efficiency of subsequent spatiotemporal matching. S1.3: The original point cloud data frame and process work order information are spatiotemporally matched using industrial communication protocols. A millisecond-level alignment relationship is established based on the assembly timestamp to eliminate data lag between heterogeneous systems and generate a joint data unit with a unified time reference. S1.4: Perform context encapsulation processing on the joint data unit, use the product model as the primary key index, bind the corresponding timestamp, robot action number and detection device ID, and construct a context identifier tuple containing spatial location, device identity and process path to support subsequent rule base calls and semantic mapping; S1.5: The original point cloud data frame and the context identifier tuple are serialized and packaged to generate an initial data input package with both spatiotemporal and business identifiers. This package serves as the unified input interface for subsequent denoising, normalization, and feature extraction modules, ensuring the consistency and traceability of the data stream.
[0012] Step S2: The original point cloud data frame undergoes denoising and normalization preprocessing to eliminate outliers and non-uniform sampling biases introduced during scanning due to environmental jitter or reflection interference, generating a standardized point cloud dataset as the basic input for subsequent geometric feature extraction. Specifically, this includes: S2.1: Obtain the original point cloud data frame of the bag handle assembly area. The original point cloud data frame is acquired by a laser contour scanner within a single trigger cycle and contains a three-dimensional spatial coordinate sequence and corresponding intensity information, which serves as the input object for noise reduction processing. For the 3D point cloud signal of the bag handle assembly area acquired by a single trigger cycle of a laser contour scanner, a high-speed data acquisition interface module (parameter: bandwidth ≥ 1Gbps) is used to realize the lossless real-time reading of the original coordinate sequence and intensity information. Furthermore, by using the sensor's built-in clock synchronization mechanism (parameter: timing accuracy ≤ 1ms), each point cloud record is bound to the acquisition time identifier, and complete timestamp-marked point cloud frame data is obtained; Furthermore, a transport layer data framing algorithm (parameter: fixed frame length N=2048 points) is adopted to realize the frame division processing of the original point cloud stream, which divides the continuously acquired three-dimensional coordinates and intensity values into independent data frames and generates an addressable set of frame sequence numbers. Furthermore, by using a channel noise detection algorithm (parameter: noise threshold τ is determined by sensor dark current testing), abnormal intensity values in the input data stream are detected, and the marked noise points are added to the frame data, providing a location basis for subsequent denoising processing; Through the above data acquisition and framing processing, the continuous raw signals output by the sensor are transformed into raw point cloud data frames with consistent timestamps, structured three-dimensional coordinate sequences, and intensity information, achieving the effect of preprocessing technology that can be directly used as input for denoising algorithms. For example, a production line deploys an LS-800 laser profile scanner at the bag handle assembly and inspection station. The acquisition parameters are configured as follows: sampling frequency 20kHz, single trigger cycle 0.5s, 10,000 points per frame, and intensity resolution 12-bit. In actual operation, the data acquisition interface connects to the edge computing node with a bandwidth of 1.25Gbps. All acquisition points are bound to millisecond-level timestamps via a built-in GPS timing module. Frame division is set to 2048 points per frame, generating a data structure of approximately 5 frames per cycle. During the inspection process, the channel noise threshold τ is set to 5% of the maximum intensity value based on dark field test results. The noise detection module marks approximately 15 intensity anomalies per frame on average. These processed raw point cloud data frames are encapsulated in a unified JSON format, containing a coordinate matrix, intensity array, timestamp sequence, and anomaly index. This data is then directly input into the Statistical Outlier Removal (SOR) denoising algorithm, achieving a seamless data link from sensor acquisition to algorithm input. S2.2: Perform denoising processing based on Statistical Outlier Removal (SOR) on the original point cloud data frame. Set the threshold k of the number of neighboring points and the standard deviation multiple σ, calculate the average Euclidean distance from each point to its k nearest neighbors, identify and remove outliers whose mean distance exceeds σ times the standard deviation, so as to suppress abnormal coordinate drift caused by environmental jitter and instantaneous reflection interference, and generate denoised point cloud data. S2.3: Construct a KD tree index structure based on the denoised point cloud data, execute an adaptive radius search strategy, uniformly sample and redistribute the point cloud density difference region, use the moving least squares (MLS) method to fit the local surface manifold, optimize the consistency of point cloud spatial distribution, eliminate non-uniform sampling deviation caused by scanning angle changes, and generate a spatially balanced point cloud dataset. S2.4: The spatially equalized point cloud dataset is normalized to the coordinate system. Principal component analysis (PCA) is performed based on the handle design reference axis. The directions of the first and second principal components are extracted as the local coordinate system X and Y axes. A rotation matrix is constructed to achieve point cloud attitude alignment. Then, the coordinates are translated with the nominal installation center as the origin to unify all samples under the standard spatial reference frame, generating attitude-aligned and position-normalized point cloud data. Using a spatially equalized point cloud dataset as input, a coordinate system normalization method based on principal component analysis (PCA) is adopted (parameter settings are based on the nominal reference axis of the handle design) to achieve consistent point cloud pose processing under different scanning batches. Furthermore, the coordinate matrix of the spatially equalized point cloud dataset is centered using the PCA method to calculate the covariance matrix of the three-dimensional coordinates. ,in The point cloud coordinate matrix, This is a vector of mean values for each coordinate dimension. The number of points is used to achieve numerical quantization of the covariance matrix; Furthermore, the covariance matrix is analyzed using the eigenvalue decomposition method. Find the eigenvalues and eigenvectors, sort them by eigenvalue size and extract the eigenvectors of the first and second principal components, and use them as the X-axis and Y-axis direction vectors of the local coordinate system, respectively, to generate a set of reference coordinate basis vectors; Furthermore, based on the set of reference coordinate basis vectors, a three-dimensional rotation matrix is constructed to achieve linear coordinate transformation processing for point cloud pose alignment; Furthermore, by performing a translation operation, an offset vector relationship is established between the centroid coordinates of the rotated and aligned point cloud and the nominal installation center, and the translation vector is calculated. ,in The coordinates of the nominal installation center are... The coordinates of the centroid of the point cloud after rotation are used to achieve position normalization. Through the above rotation and translation processing, the spatial equalization point cloud result of the previous step is transformed into normalized point cloud data with posture alignment and uniform position, so as to achieve spatial reference consistency under different production batches and scanning conditions. For example, in the scenario of bag handle assembly inspection, the MLS-equalized point cloud dataset is input into the PCA normalization module. A single batch of point cloud contains 5000 three-dimensional coordinate points. The reference axis is set to the longitudinal direction of the handle in the design drawing. When calculating the covariance matrix using PCA, the three-dimensional matrix elements are 0.0024, 0.0018, and 0.0031, corresponding to eigenvalues sorted as 0.0031, 0.0024, and 0.0018, with eigenvectors of [0.96, 0.12, 0.24], [0.11, 0.98, 0.08], and [0.25, 0.05, 0.97], respectively. A rotation matrix is constructed based on the first two principal component eigenvectors and applied to the point cloud data. After rotation, the centroid coordinates are (12.4, 5.2, 3.8), the nominal installation center coordinates are (10.0, 5.0, 4.0), and the translation vector is calculated as (…). 2.4, After normalization, the pose deviation angle of each detection sample under the same reference frame converges to within 0.5°, and the position deviation is within 0.5mm, which significantly improves the consistency and reliability of subsequent geometric feature extraction. S2.5: Perform resolution-uniform downsampling on the normalized point cloud data, using the VoxelGrid Filtering algorithm. Set a fixed voxel side length, aggregate all points within each voxel and replace them with centroid coordinates to reduce data redundancy and ensure that point clouds in different batches have the same spatial resolution. The final output is a standardized point cloud dataset with uniform structure, geometric stability, and suitable for subsequent feature extraction.
[0013] like Figure 2 As shown, step S3 involves: performing local geometric feature extraction based on the standardized point cloud dataset, calculating key morphological parameters of the handle profile, including radian curvature, end diameter, and mounting surface flatness, and quantizing these parameters into a set of numerical feature vectors to form a discriminable structured feature representation. Specifically, this includes: S3.1: Construct a local neighborhood for the standardized point cloud dataset. Based on the K-nearest neighbor algorithm, search for the k nearest neighbors of each sampling point in the key region of the handle profile (including the grip section, the connecting end and the mounting base) to establish a spatial local topological relationship and generate a local neighborhood point cloud cluster as the basic input for subsequent differential geometric attribute estimation. For the standardized point cloud dataset, the K-nearest neighbor search algorithm (parameter: the value of k is adaptively set based on the local density of the point cloud) is used to construct the local neighborhood for the key region of the handle outline; Furthermore, by using a region mask segmentation method (parameters: the spatial boundaries of the three types of regions—holding segment, connecting end, and mounting base—are determined by design reference parameters), the geometric regions to which each point in the input point cloud dataset belongs are accurately divided, and region classification labels are obtained; Furthermore, a fast nearest neighbor retrieval method based on KD-tree indexing is used (parameters: Euclidean distance metric, search range limited to a specified k value) to extract the set of k nearest neighbors of each sampling point within its region and generate a local point set data structure; Furthermore, by constructing a spatial connectivity matrix, the index relationships of each sampling point and its k nearest neighbors are mapped into a topological adjacency matrix, forming a spatial topological structure that can reflect the local morphology, which is then used for subsequent differential geometric property estimation. By clustering local nearest point sets by point index, local neighborhood point cloud clusters are generated for the gripping segment, end, and mounting base area, thus transforming the region classification and nearest search results of the previous step into spatial data units that can directly support geometric feature calculations. For example, in a standardized point cloud dataset of a certain type of handle, the region mask segmentation threshold is set to a grip length of 50mm, an end length of 10mm, and a mounting base width of 20mm, with a k value of 15. A KD-tree index is used to retrieve the 15 nearest neighbors of each point, with an Euclidean distance threshold of 3mm. For the grip point cloud, the local point set obtained from the nearest neighbor retrieval contains an average of 16 points (including itself), exhibiting a dense connection relationship with an average degree of 14 in the topological adjacency matrix. The average Euclidean distance between nearest neighbors in the end region is within 2.5mm, and the topological matrix shows a circular distribution characteristic. The nearest neighbor distribution in the mounting base region presents a planar lattice connection pattern. The local neighborhood point cloud clusters generated under this configuration, after subsequent S3.2 differential geometry analysis, can significantly improve the stability of curvature and flatness calculations, reduce the impact of high-noise area errors on feature parameters, and the final output local neighborhood structure is used to support the accurate quantification of arc curvature, diameter, and flatness. S3.2: Based on the local neighborhood point cloud cluster, perform covariance matrix analysis, calculate the 3×3 covariance matrix for the coordinate distribution in the neighborhood of each point, solve its eigenvalues and eigenvectors, extract the principal direction, secondary direction and normal information, and then fit the local tangent plane and normal vector field to generate a local geometric differential attribute set, which is used to support the quantitative calculation of curvature and flatness. For the local neighborhood point cloud clusters generated by step S3.1, a covariance matrix analysis method based on three-dimensional coordinate distribution is used (parameter: neighborhood point set). This enables statistical characterization of the spatial distribution of the neighborhood; Furthermore, by mean centering (parameter: the arithmetic mean of the x, y, z coordinates of each point), the original coordinates are translated and normalized, resulting in a coordinate matrix with a mean of zero. , as input data for covariance calculation; Furthermore, the 3×3 covariance matrix C of the neighborhood of each point is calculated based on the following formula:
[0014] in, The number of neighboring points, This is a k×3 coordinate matrix after mean centering. This represents the matrix transpose operation; Furthermore, by using eigenvalue decomposition methods (parameters: Jacobi iteration or QR decomposition), the eigenvalues and eigenvectors of the covariance matrix C are solved, resulting in three sets of orthogonal eigenvectors. and their corresponding eigenvalues ; Furthermore, the eigenvalues are arranged in order of magnitude, and the eigenvector with the largest eigenvalue is extracted as the principal direction, the eigenvector with the second largest eigenvalue as the secondary direction, and the eigenvector with the smallest eigenvalue as the normal information, thereby realizing the identification of the principal axis and normal direction of the local point cloud. Furthermore, utilizing the normal information, a least-squares plane fitting method is employed (parameters: target normal n, base point). ( ), to realize the equation expression of the local tangent plane Based on this, a local normal vector field is established, providing a geometric differential property basis for the subsequent quantitative calculation of curvature and flatness; By using covariance matrix analysis and eigenvalue decomposition, the local neighborhood spatial topological relationship from the previous step is transformed into a structured set of geometric differential attributes, enabling the accurate acquisition of principal direction, secondary direction, and normal vector. For example, in the grip area of a certain type of bag handle, with the number of K nearest neighbors set to k=30, mean centering is performed on the extracted local neighborhood points within this area, resulting in a coordinate matrix M with an element mean of approximately 0. Applying the covariance calculation formula described above, the typical element range of matrix C is calculated to be... to Eigenvalues are obtained using QR decomposition. =2.87, =1.95, =0.14, corresponding to the principal direction vector Pointing to the major axis of the handle, normal vector The normal vectors are aligned with the mounting base surface. Using these normal vector field data can significantly improve the stability of the mean and variance of curvature in the subsequent S3.3 curvature calculation, and significantly reduce the fitting residuals in the S3.5 flatness analysis. The verification results show that the extraction of this geometric differential attribute set can improve the interpretability and reliability of assembly accuracy anomaly identification. S3.3: Based on the maximum and minimum eigenvalues in the local geometric differential attribute set, the Gaussian curvature and average curvature of each point are calculated using the Weingarten mapping approximation method. Then, the continuous curvature distribution of the handle grip section is integrated by a sliding window to extract the mean of the average curvature and the variance of curvature change of its main arc segment, generating arc curvature feature parameters that characterize the consistency of the handle arc. S3.4: Perform cylindrical surface least squares fitting on the local neighborhood point cloud clusters of the end region, use a nonlinear optimization algorithm to iteratively solve for the best fitting cylinder axis and radius parameters, extract the diameter measurement values of the connection parts at both ends, calculate the diameter difference between the left and right ends and the deviation from the nominal value, and generate end diameter feature parameters as input for assembly symmetry criteria; For the local neighborhood point cloud clusters in the end region, the cylindrical surface least squares fitting method (parameters: initial radius r0, iteration tolerance ε, maximum number of iterations Nmax) is used to achieve parametric modeling of the end geometry and establish the mapping relationship between point cloud coordinates and cylindrical parameters. Furthermore, a nonlinear optimization algorithm (Levenberg-Marquardt, parameters: initial value of damping factor λ, update rate η) is used to jointly iteratively solve the cylinder axis direction vector and radius parameter, and obtain the optimal fitting cylinder's central axis vector and radius value, ensuring that the fitting residual converges within a preset threshold. Furthermore, the diameter measurements of the connecting parts at both ends are calculated by fitting the radius parameters of the cylinder, expressed by the following formula:
[0015] in The end diameter, To fit the radius of the cylinder; Furthermore, the difference calculation method is adopted (parameter: left end diameter). right end diameter ), to achieve the difference in diameter between the left and right ends The quantitative measurement is expressed by the formula:
[0016] And in conjunction with the nominal diameter value The deviation of the nominal value is calculated from the difference between the actual measured diameter and the actual diameter. The formula is:
[0017] The above calculation results generate a set of end diameter characteristic parameters, including left end diameter, right end diameter, diameter difference, and nominal deviation value, to achieve a quantitative criterion for assembly symmetry and end dimension consistency. By using cylindrical fitting and difference analysis, the local neighborhood point cloud morphology information from the previous step is transformed into end diameter geometric feature data, thereby achieving high-precision construction and parameterized output of assembly symmetry criteria. For example, in the detection of a batch of bag handles of model A123, the local neighborhood point cloud clusters in the end region are extracted by radius search r=5mm, with an initial radius of... Set the value to 10mm, the iteration tolerance ε to 0.01mm, and the maximum number of iterations. Set to 50. In the least-squares fitting process for the cylindrical surface, the initial value of the damping factor λ in the Levenberg-Marquardt algorithm is 0.001, the update rate η is 10, and the fitting residual converges to 0.005 mm. The fitted left-end radius is 9.95 mm, and the right-end radius is 10.02 mm, according to the formula... The diameter of the left end is calculated to be 19.90 mm, and the diameter of the right end is 20.04 mm. The diameter difference is... mm. Nominal value is 20.00 mm, nominal deviation. It is -0.10mm. The value is +0.04mm. After being output by the feature parameter set, it is used to determine the assembly symmetry. The result shows that the diameter difference at the end of the handle is lower than the qualified threshold of 0.5mm and the nominal deviation is within the allowable range, so it can be determined that the symmetry is qualified. S3.5: Based on the local geometric differential attribute set of the mounting base area, perform planar least squares fitting on the point cloud of the area, calculate the root mean square error of the fitting residual, and generate mounting surface flatness feature parameters by combining the standard deviation of the normal vector; combine the three parameters of radian curvature, end diameter and mounting surface flatness according to the preset dimensions, quantize them into a unified and normalized numerical feature vector, and form a structured feature representation with discriminative ability.
[0018] like Figure 3 As shown, step S4 involves retrieving the corresponding assembly feature template from a pre-set lightweight context rule base based on the product model. This assembly feature template is generated statistically based on historical qualified samples and managed by version. It includes the nominal values and tolerance ranges of key morphological parameters for that model, used to support subsequent semantic matching and determination. Specifically, this includes: S4.1: Based on the labeled point cloud dataset in the historical qualified sample database, extract the standardized geometric feature vector sequence corresponding to various product models under stable production conditions, and use it as the initial input data for constructing assembly feature templates to ensure that the template source has statistical representativeness and process consistency. S4.2: Perform grouping and aggregation processing on the standardized geometric feature vector sequence corresponding to each product model, calculate the group mean and standard deviation of each key morphological parameter, so as to determine the nominal values of arc curvature, end diameter and mounting surface flatness and their ±3σ tolerance range, form the original assembly feature template of the model, and output as a set of structured parameters; For the standardized geometric feature vector sequence obtained by step S4.1, which is distinguished by product model, a grouping aggregation analysis method (grouping condition: product model code) is used to realize the batch aggregation processing of feature data of different models. Furthermore, by using the mean calculation method (parameters: radian curvature, end diameter, and mounting surface flatness of each model's feature sequence), the group centrality trend of the three types of key morphological parameters within the same model's feature set is estimated, and the corresponding mean vector is obtained. Furthermore, by using the standard deviation calculation method (parameters: radian curvature, end diameter, and mounting surface flatness of each model's feature sequence), the dispersion of the above parameters within the same model's feature set is estimated, and the corresponding standard deviation vector is generated. Furthermore, using a tolerance range determination algorithm (parameters: mean vector, standard deviation vector, tolerance factor setting value = 3), the upper and lower limits of the tolerance for each morphological parameter are calculated using the following formula:
[0019]
[0020] in, For this model number The population mean of the morphological parameters. Standard deviation and These represent the upper and lower tolerance limits, respectively. Furthermore, a structured parameter set generation method is adopted to encapsulate the average values of the three types of morphological parameters and their ±3σ tolerance range corresponding to each product model into an original assembly feature template, and output a structured data set containing model identifier, parameter nominal value, and tolerance range; By performing group aggregation analysis, calculating the mean and standard deviation, and determining the tolerance range, the results of the previous step are transformed into original assembly feature templates that conform to statistical representativeness, thereby providing accurate support for subsequent semantic matching judgments. For example, in the feature vector sequence of a certain model of handle assembly, the radian curvature data is [0.015, 0.016, 0.014, 0.015, 0.017], the end diameter data is [32.00, 32.05, 31.98, 32.02, 32.01], and the mounting surface flatness data is [0.0020, 0.0021, 0.0019, 0.0020, 0.0022]. The mean radian curvature is obtained using the mean value calculation method. Average end diameter Average flatness of mounting surface The standard deviations of the three types of parameters were obtained using the standard deviation calculation method: radian curvature. End diameter Flatness of the mounting surface The upper limit of the formula for calculating the curvature of radians is determined by the tolerance range. Lower limit Upper limit of end diameter Lower limit Upper limit of the flatness of the mounting surface Lower limit The aforementioned nominal values and corresponding tolerance ranges are encapsulated in JSON format as an original assembly feature template and bound to a model code. This enables rapid threshold comparison and automatic label generation for subsequent inspection data of this model. Verification results show that the template can correctly determine all qualified parts within the production batch and can significantly distinguish abnormal parts. S4.3: Embed the generated original assembly feature template into the lightweight context rule base and associate it with the product model code, applicable process version number and effective timestamp to establish a lookup mechanism based on model-version dual index to support accurate matching of corresponding templates in scenarios of parallel production of multiple generations of products; S4.4: Implement an incremental update mechanism for assembly feature templates in the rule base. When a new batch of qualified samples accumulates to a preset quantity threshold, the template parameter recalculation process is triggered. The template status under different iteration cycles is distinguished by version increment markers to ensure that the templates continuously meet the current production line process standards. The input for implementing the incremental update mechanism for assembly feature templates in the rule base is the original assembly feature templates embedded in the lightweight context rule base and their associated historical qualified sample database records. Each sample record contains the product model code, applicable process version number, effective timestamp, and standardized geometric feature vector. The sample accumulation monitoring method is adopted (parameter: preset number threshold). This enables real-time statistics and threshold comparison of the number of samples for each product model template in the rule base; Furthermore, by using a batch-triggered detection algorithm (parameters: time window Δt, model filtering conditions), the identification of new qualified sample batches that meet the same product model and are within the same time window is realized, and a new sample set is obtained to drive the template recalculation process. Furthermore, based on the parameter recalculation method (algorithm: re-estimation of population mean and standard deviation), the newly added sample set and the historical sample set are merged and statistically processed to generate updated nominal values and tolerance ranges for radian curvature, end diameter, and mounting surface flatness. The tolerance range is set to mean ± 3σ, where σ is the standard deviation. The formula is as follows:
[0021]
[0022] in The mean of the parameters, The standard deviation of the parameter; Furthermore, by using a version increment marking algorithm (parameters: version number field ver, increment step size Δver), the version number of the updated assembly feature template is automatically incremented, and a version mark is generated to distinguish the template state under different iteration cycles. By using the template validity verification process (method: comparing the threshold deviation with the current production line process standard), the results of the previous step are transformed into assembly feature templates that conform to the current process standard, thereby achieving the expected technical effect of continuous template adaptation to production line quality control. For example, in the production scenario of a certain model of bag handle, the number of historical qualified samples corresponding to the template of this model in the rule base is 450 pieces, and the preset quantity threshold is... The batch size is set at 500 pieces. A sample accumulation monitoring method is used. After a new batch is produced, if the testing system determines that 60 new qualified samples have been added, the batch trigger detection algorithm will identify the new sample set for that model. Based on a parameter recalculation method, the mean curvature of the arc is... with standard deviation The tolerance range was recalculated, resulting in the upper limit of the tolerance. = The lower limit of tolerance is = The end diameter and mounting surface flatness are also calculated and updated. The version increment marking algorithm increments the template version number from 1.3 to 1.4, and records the update date and update batch number in the template metadata. The template validity verification process confirms that the deviation range is within the requirements of the current process standard. The new version template is officially adopted by the rule base and applied in subsequent testing tasks, ensuring the effective synchronization and traceability of the new batch data in the quality judgment logic. S4.5: Based on the product model information in the current detection record, perform a fast retrieval operation in the lightweight context rule base using the model-version dual index, retrieve the corresponding assembly feature template as the reference benchmark for weighted similarity matching, and output the target matching template containing the nominal value and tolerance range.
[0023] Step S5: Perform weighted similarity matching between the numerical feature vector and the corresponding model's assembly feature template, calculate the degree of deviation between the two using a weighted Euclidean distance algorithm, and generate a matching score, which serves as the basis for determining whether the current assembly state falls within the coverage of known semantic tags. Specifically, this includes: S5.1: Based on the numerical feature vector output by the previous step S3 and the assembly feature template retrieved by S4, a weighted similarity matching model is constructed. The assembly feature template contains the nominal values and tolerance ranges of each key morphological parameter. The weight coefficients of each parameter dimension are assigned using the tolerance inverse ratio function to reflect the relative sensitivity of different geometric features in assembly quality judgment and generate weighted feature space mapping rules. S5.2: Normalize the numerical feature vector and the nominal value vector in the assembly feature template respectively to eliminate the distance measurement deviation caused by the difference in dimensions of parameters such as radian curvature, end diameter and mounting surface flatness, and generate standardized feature vector and standardized nominal vector as the input basis for weighted Euclidean distance calculation. S5.3: Based on the weighted feature space mapping rules constructed in S5.1 and the standardized vector generated in S5.2, the weighted Euclidean distance algorithm is executed to calculate the comprehensive deviation between the current feature vector and the template nominal value, and the weighted deviation value is output. Based on the weighted feature space mapping rules constructed in S5.1 and the standardized feature vectors and standardized nominal vectors generated in S5.2, a weighted Euclidean distance algorithm is used (parameter: weight coefficients). The value is determined according to the inverse tolerance rule, and the feature dimension n corresponds to three types of parameters: radian curvature, end diameter, and mounting surface flatness. This enables the calculation of the comprehensive deviation between the current feature vector and the template nominal value. Furthermore, by uniformly using standardized eigenvalues in weighted distance calculations... Compared with nominal value And combining the weighting coefficients, the following weighted Euclidean distance formula is constructed:
[0024] in To calculate the weighted deviation value, the square root of the sum of squares of the weighted differences of each feature dimension is calculated, and the weighted deviation value is obtained. Furthermore, by multiplying the deviation of each feature dimension by the weight coefficients one by one, it is ensured that the contribution of small differences to the final deviation is amplified on highly sensitive geometric features (such as the flatness of the mounting surface), so as to improve the algorithm's ability to distinguish key process links. Furthermore, by controlling the numerical precision of the calculation results, using double-precision floating-point operations, and introducing an error correction term, when the difference between the eigenvalue and the nominal value is close to the quantization resolution, the correction term suppresses numerical jitter and ensures the stability of the deviation. By using the weighted Euclidean distance algorithm, the weighted feature space mapping result of the previous step is transformed into a single numerical deviation index, which realizes a quantitative description of the distance between the current detected feature and the target template, and provides accurate basic data for subsequent matching score mapping. For example, when detecting the assembly status of a certain model of bag handle, the standardized feature vector is [0.98, 1.02, 0.99], the standardized nominal vector is [1.00, 1.00, 1.00], and the tolerance ranges are ±0.05, ±0.10, and ±0.02, respectively. According to the inverse tolerance rule, the weighting coefficients are set to [20.0, 10.0, 50.0]. Substituting these values into the weighted Euclidean distance formula, the corresponding calculations are: feature 1 difference - 0.02 multiplied by weight 20 equals 0.008; feature 2 difference 0.02 multiplied by weight 10 equals 0.004; feature 3 difference - 0.01 multiplied by weight 50 equals 0.005. Squaring these values, summing them, and then taking the square root yields a weighted deviation of approximately 0.122. The matching score corresponding to this deviation in the subsequent mapping function is in the high confidence interval. Verification shows that in multiple batches of detection records, the weighted Euclidean distance algorithm with the above weight configuration can significantly improve the recognition accuracy of the installation surface micro-tilt problem and maintain output stability in low noise scenarios. S5.4: The weighted deviation value output by S5.3 is converted into a matching score in the range of 0 to 1 through a non-linear mapping function to ensure that the score is interpretable, that is, a high score corresponds to a normal assembly mode with high confidence, and a quantitative matching score that can be used for threshold comparison is generated. For the weighted deviation value output by S5.3, a nonlinear function transformation method based on probability distribution mapping is adopted (parameters: mean μ of the deviation distribution of historical qualified samples, standard deviation σ, mapping function type Sigmoid) to project the deviation value to the standard matching score domain in the interval [0,1]. Furthermore, by using a normalization method based on the cumulative probability distribution (parameter: cumulative distribution function CDF), the deviation value is converted into the matching confidence level, and probabilistic matching confidence value data is obtained, which is used to measure the degree of approximation between the current detection sample and the standard template. Furthermore, a Sigmoid mapping algorithm based on empirical distribution fitting (parameters: inflection point position μ, curvature coefficient β) is adopted to achieve nonlinear compression of deviation value to matching score, and to generate a score distribution in which high scores are concentrated in normal assembly mode and low scores are dispersed in abnormal assembly mode. Furthermore, the function mapping from the deviation score to the matching score is achieved through the following formula:
[0025] in, To match scores, This is the weighted deviation value. This represents the mean of the deviation distribution of historical qualified samples. For curvature control parameters; Furthermore, based on the output of this formula, upper and lower limit saturation value truncation processing is implemented (parameters: lower limit 0.0, upper limit 1.0) to achieve numerical stability control of the matching score in the whole domain and generate a quantitative matching score index for subsequent threshold comparison; The above nonlinear mapping algorithm transforms the weighted deviation value from the previous step into a matching confidence index within the interval [0,1], thereby making the deviation measurement interpretable and the judgment conditions intuitive. For example, in the assembly inspection of a batch of bag handles, the weighted deviation value... The mean of historical qualified samples curvature coefficient Substituting the above parameters into the Sigmoid mapping formula:
[0026] The matching score is approximately The set acceptable threshold for this batch is... At this point, the sample's matching degree is within the high confidence range, so it directly enters the rule base label binding path and is marked as "normal assembly". Meanwhile, another sample's weighted bias is... Substituting into the same mapping formula, the score is approximately If the value is below a threshold, the edge-side incremental learning and recognition process is triggered, and the value is marked as "abnormal tilt angle" after retrieval of nearest neighbor feature anchor points. This embodiment verifies the distinguishing ability of nonlinear mapping in high and low confidence scenarios and its effective connection with subsequent judgment logic; S5.5: Output the matching score generated in S5.4 to the subsequent judgment logic module as the basis for judging whether the current detected record meets the preset threshold condition. If the score is higher than the threshold, it is determined that it falls within the coverage of known semantic labels and triggers the direct label binding process; otherwise, it enters the edge-side incremental learning agent module for supplementary recognition and completes the transformation from geometric features to semantically discriminable structured output.
[0027] Step S6: Determine whether the matching score is higher than a preset threshold. If the condition is met, bind the successfully matched semantic label to the current detection record; if not, trigger the edge-side incremental learning agent module. This module performs fast nearest neighbor comparison based on a simplified KNN graph index constructed from historical labeled samples, recommending the closest historical semantic label as supplementary output. Specifically, it includes: S6.1: Based on the matching score output in the previous step S5, obtain the numerical feature vector, product model and process order information corresponding to the current detection record, as the input basis for subsequent judgment and label recommendation, to ensure contextual consistency; use the matching score as the discrimination condition, perform binary logic judgment operation to determine whether the current assembly state falls within the coverage of known semantic labels, generate Boolean judgment result, and provide a decision basis for semantic label binding path selection; Based on the matching score, corresponding numerical feature vector, product model and process order information output by the previous step S5, a data binding processing method is adopted to establish a one-to-one association between the matching score and all context information of the detection record, so as to realize the unified semantic context binding of the input object for judgment. Furthermore, a feature-context consistency verification algorithm (parameters: product model code, process order timestamp, and testing equipment ID) is used to verify the consistency of the bound data and output a valid judgment input vector to ensure that the logical association between the judgment conditions and the context parameters is correct. Furthermore, the binary logic decision model (parameters: matching score, preset threshold) is invoked, and a Boolean decision result is generated using comparison operations. The core decision formula of this model is expressed as:
[0028] in, The result is a Boolean value. To match scores, The preset judgment threshold is used; Furthermore, by determining the output encoding process, the Boolean result is transformed into a subsequent semantic tag binding path selection signal, where the true value corresponds to the direct binding path of the rule base tag, and the false value corresponds to the path of the edge-side incremental learning agent module. Through the above logical judgment and context binding processing method, the matching score and detection record parameters of the previous step are transformed into executable tag binding path selection control signals, so as to achieve dual protection of context consistency and judgment logic. For example, in the detection process of a certain model of bag handle, the matching score calculated by S5 is: The preset threshold is The product model code is "HB-MODEL-A1", the process order timestamp is "2024-05-08T14:25:36.000Z", and the testing equipment ID is "LSSC-03". Through data binding processing, the input object {matching score:} is formed. Model: HB-MODEL-A1, Timestamp: 2024-05-08T14:25:36.000Z, Device ID: LSSC-03. Perform a consistency check to confirm that the model and device are within the coverage of the preset rule base and that the timestamp conforms to the process cycle. Call the binary logic judgment formula. If the judgment result is true, the encoded output signal path points to the direct label binding process of the rule base. In performance verification, after the path selection signal is triggered, there is no need to enter the incremental learning agent module; high-confidence label binding is completed directly, which significantly improves the judgment and labeling efficiency. S6.2: If the judgment result in S6.1 is true (i.e. the matching score is higher than the preset threshold), then extract the standard semantic label candidate set bound to the assembly feature template associated with the current product model from the lightweight context rule base, select the semantic label item with the highest matching degree; bind the semantic label to the current detection record in the form of key-value pairs, generate the detection record data unit with preliminary annotation, and use it as the standard output in the high confidence scenario; Based on the execution condition when the Boolean judgment result output by S6.1 is true, the product model code contained in the current detection record is extracted as the index input, and the model-version dual index retrieval mechanism of the lightweight context rule base is called to realize the location and search of the target assembly feature template. Using the template association function in the rule base, a standard semantic label candidate set is read from the located assembly feature template structure. This candidate set contains predefined semantic label items for different geometric feature deviation patterns, and the association similarity parameters between each label and the template are stored in vector form to form a candidate label parameter matrix. Furthermore, the maximum matching degree selection algorithm (parameters: candidate label parameter matrix, matching score weight coefficient) is used to perform weighted sorting on the label items in the candidate set. The weighting coefficient comes from the matching score of the current detection record and the historical adoption frequency of each label in the template, generating a sorted list of high confidence labels. Furthermore, a Top-1 filtering strategy is adopted to select the tag item with the highest matching degree from the sorted list, and the semantic content of the tag item is bound to the unique identifier of the current detection record to generate a key-value pair structure containing tag key and tag value, so as to ensure the consistency and machine readability of semantic annotation data. Through the data binding interface, the generated tag key-value pairs are injected into the data unit structure of the current detection record, so that they form a one-to-one correspondence with the original point cloud, geometric feature vector and process work order information, generating the detection record data unit with preliminary annotation, and realizing standardized semantic tag output in high confidence scenarios; For example, in the assembly inspection task of the bag handle of model M202, the matching score is The lightweight context rule base contains assembly feature templates for the corresponding models, including three standard semantic label candidates: "normal assembly," "slight offset," and "abnormal end diameter." The historical matching parameters stored within the templates for these candidate labels are as follows: , and The maximum matching degree selection algorithm is invoked to calculate the comprehensive weighted value of the current detection record and each tag, where the weight coefficient is set as the product of the matching score and the historical adoption frequency. The calculated comprehensive weighted value of the "normal assembly" tag is... Ranked first. The Top-1 strategy was adopted to select this tag, and the key-value pair {"assembly status":"normal assembly"} was bound to the record unit with inspection record ID R20230512001. The generated preliminary labeled data unit contains the original point cloud file reference, three-dimensional geometric feature vector, process order information and this semantic tag. Actual verification shows that the subsequent quality retrieval system can respond to the query condition "assembly status = normal assembly" in milliseconds and return all qualified records of this batch, realizing efficient and interpretable quality inspection data output; S6.3: If the judgment result in S6.1 is false (i.e., the matching score is lower than or equal to the preset threshold), the initialization process of the edge-side incremental learning agent module is triggered; based on the historical labeled sample database, a simplified KNN graph index is constructed. The graph index only retains the feature anchor point set of boundary cases and typical misjudged samples. Each feature anchor point contains a standardized numerical feature vector, corresponding semantic label, product model and timestamp metadata; the feature space is bucketed using the Locality Sensitive Hash (LSH) algorithm to optimize the nearest neighbor search efficiency, generate a sparse KNN graph structure that supports fast retrieval, and reduce the computing load of edge devices; Upon receiving a judgment result where the matching score is lower than or equal to a preset threshold, the input object is the standardized numerical feature vector of the current detection record and its associated product model and process order information; A historical labeled sample filtering method is adopted (parameters: sample source = historical detection database, filtering conditions = abnormal label set) to achieve the sample screening function of retaining only boundary cases and typical misjudged samples; Furthermore, through the feature vector standardization algorithm (parameters: mean normalization, variance standardization), the dimensionality of all retained samples in each morphological parameter dimension is unified, and a set of feature anchor points is generated; Furthermore, a feature anchor metadata binding method (parameters: binding fields = semantic tag, product model, timestamp) is adopted to realize the structured association between each anchor and its context information, and to obtain a feature anchor data structure with context integrity; Furthermore, the Locality Sensitive Hash (LSH) bucket mapping algorithm (parameters: hash function family selection = cosine distance sensitive hash, number of buckets = dynamically adjusted according to sample size) is used to realize bucket mapping of the feature space and output a bucket index table to optimize the efficiency of nearest neighbor search. Furthermore, a sparse KNN structure generation algorithm is executed based on the bucket index table (parameters: k value range = 1~5, sparsity threshold = 0.2) to construct an adjacency relation matrix that retains only necessary connections, thereby generating a sparse KNN graph structure that supports fast retrieval. By combining Locality Sensitive Hashing (LSH) with Sparse KNN, the boundary sample anchor point set from the previous step is transformed into a fast nearest neighbor retrieval index that can run efficiently on edge devices, thereby enabling supplementary semantic tag recommendation capabilities under low computational load. For example, in a batch of bag handle inspection scenarios, the total number of historical labeled samples was 10,000, with 320 abnormal label samples, including 180 boundary case samples and 140 typical misjudged samples. After filtering, mean normalization and variance standardization were used to normalize the three-dimensional features of curvature, end diameter, and mounting surface flatness to zero mean and unit variance range, respectively. Semantic labels "tilting angle anomaly" or "assembly offset" were bound to each feature anchor point, and associated with the product model code "A12" and the timestamp "2024-06-01T10:25:33Z". Ten families of hash functions were constructed using cosine distance (LSH), generating 40 buckets with an average of 8 samples per bucket. A sparse adjacency matrix was generated with a sparsity threshold of 0.2, retaining only the shortest distance connecting edges. This structure has an average response time of 5ms for performing k=1 nearest neighbor queries on edge computing units, which significantly improves the response speed compared to the non-sparse structure. It outputs a sparse KNN graph index, which can directly support subsequent nearest neighbor label recommendation logic. S6.4: Input the numerical feature vector of the current detection record into the simplified KNN graph index constructed in S6.3, perform a nearest neighbor search operation with k=1, and find the historical feature anchor point with the closest geometric features based on the weighted Euclidean distance metric; obtain the semantic label and its context information associated with the nearest neighbor anchor point to form a recommended semantic label suggestion; perform context compatibility verification on the suggestion to verify whether its product model is consistent with the current work order information or belongs to a compatible version. If the verification passes, the recommended label is adopted. S6.5: For cases in S6.4 that fail context verification or have no valid neighbors, activate the default semantic fallback mechanism and call the default semantic tag template preset according to the product model (such as "assembly anomaly to be reviewed"). Write the final determined semantic tag—whether it is directly matched by the rule base, adopted by KNN recommendation, or generated by default fallback—into the metadata field of the current detection record to generate a complete detection record with semantic annotation status identifier, which can be embedded into the composite metadata data package in the subsequent S7 step.
[0029] Step S7: The selected semantic tags are embedded in key-value pairs into a composite meta-data package containing the original point cloud, geometric feature vectors, and process order information, forming a structured detection result data unit with complete contextual association and interpretability. Specifically, this includes: S7.1: Obtain the selected semantic label output by S6. The semantic label is the final judgment result obtained by weighted similarity matching or edge-side incremental learning agent module recommendation. Construct a standard key-value pair structure based on the semantic label, where the key is the predefined semantic category field name and the value is the corresponding specific label content, so as to realize the formal expression of semantic information. S7.2: Retrieve the multi-source heterogeneous data set output from S1 to S3, including the original point cloud data frame, the standardized geometric feature vector, and the process work order information; perform unified timestamp alignment and data source identifier binding on the above data to generate a basic data body with spatiotemporal consistency, which serves as the original input of the composite meta data package; S7.3: Based on the basic data body generated by S7.2, perform data structure fusion operation, inject the semantic tag key-value pairs constructed by S7.1 as new attribute fields into the data body; use a lightweight JSON Schema template to define the data type and hierarchical relationship of each field to form a complete composite meta data package containing 'original point cloud + geometric feature vector + process work order information + semantic tags', ensuring the structured and scalable nature of the data units; For the basic data body with spatiotemporal consistency generated by S7.2, a field fusion mapping algorithm (parameters: field path mapping table, data type mapping rules) is adopted to realize the structured injection operation of semantic tag key-value pairs in the data body. The key field is mapped to the predefined semantic category field position, and the value field is bound to the corresponding tag enumeration or string constant, ensuring the parsability and retrieval of tags in the data body. Furthermore, through a lightweight JSON Schema template definition method (parameters: Schema version number, field type definition, hierarchical relationship configuration), the structure of the basic data body and the newly added semantic tag fields is integrated to generate a composite data structure containing the original point cloud field (type: binary data block), the geometric feature vector field (type: floating-point array), the process work order information field (type: object structure), and the semantic tag field (type: string or enumeration). A field validator is automatically generated to ensure that the data type of the inserted field matches the Schema definition. Furthermore, through the hierarchical tree merging algorithm (parameters: node merging rules, conflict resolution strategy), the hierarchical positioning and sequential arrangement of fields from different sources within the output data body are realized. Geometric features and the original point cloud are kept under the same parent node. Process order information and semantic tags are placed in associated nodes to reflect the contextual relationship. Field path indexes that can be called across systems are generated, supporting external modules to directly locate semantic tag fields. Furthermore, by extending the field attributes (parameters: optional attribute dictionary, metadata binding rules), version stamps, source identifiers, and confidence scores are added to the semantic tag fields to achieve traceability of tag source and interpretability of quality. The confidence score is obtained through a weighted matching score normalization operation, as shown in the following formula:
[0030] in For the confidence score normalization result, The current match score, , These are the maximum and minimum matching scores for historical samples, respectively; Through the above-mentioned fusion and expansion processing methods, the basic data volume of the previous step is transformed into a complete composite data package containing the original point cloud, geometric features, process work order information and semantic tags with context identifiers, thereby realizing the structuring and scalability of data units. For example, in the online detection scenario of bag handles, the semantic label "end diameter deviation exceeds the standard" output by S7.1 is injected into the data body generated by S7.2 in the form of key-value pairs. The key field is "assemblySemanticLabel" and the value field is "end diameter deviation exceeds the standard". The field type (string), position (semantic label child node under the process work order information node), and constraint (enumeration value set) are defined by the lightweight JSON Schema template. The original point cloud field is defined as byte[] type, the geometric feature vector field is defined as float[3] array (corresponding to radian curvature, end diameter, and mounting surface flatness), and the process work order information field is defined as a nested object containing model, timestamp, and device ID. In the field fusion process, the semantic label is placed under the process work order information node by the node merging rule and logically associated with the product model field. The attribute "confLevel" is added to the child node, and its value is calculated by the confidence formula. The result of approximately 0.846 indicates that the tag has high matching reliability. Schema verification shows that the generated composite metadata data package has a complete structure and standardized fields, enabling direct retrieval of relevant batch data based on the "end diameter deviation exceeds standard" tag in subsequent database writes and quality traceability queries, significantly improving the efficiency of problem reproduction. S7.4: Perform integrity and consistency verification on the generated composite data packets. Based on preset rules, check whether there are any missing or logical conflicts in each key field, such as whether the semantic tags fall within the allowed tag domain range for the product model and whether the geometric feature vector dimension matches the template definition. If an anomaly is found, mark the data unit and trigger alarm log recording to ensure the business compliance of the output data. S7.5: Convert the verified composite data packet into a universal serialization format that supports cross-system exchange, compress and encapsulate it using Protocol Buffers encoding, and generate structured detection result data units with high read and write performance and low transmission overhead, which are then written to the time series database by S8 to achieve persistent storage and subsequent traceable access of semantically enhanced detection data.
[0031] Step S8: The structured detection result data units are written into a time-series database that supports schema evolution, allowing subsequent quality traceability systems to directly retrieve data based on semantic conditions, achieving efficient problem reproduction and batch analysis without re-parsing the original point cloud. Specifically, this includes: S8.1: Based on the generated structured detection result data unit, extract the composite metadata content contained therein. The composite metadata includes the original point cloud data frame, the standardized geometric feature vector, the process order information, and the bound semantic tag key-value pairs, which serve as the input dataset for the write operation to ensure that the multi-dimensional context information in the detection process is completely preserved. S8.2: Perform serialization processing on the composite metadata content, use the lightweight binary encoding format Protobuf for structured encapsulation, and encode non-fixed length point cloud data and fixed length feature vectors into data blocks that can be efficiently transmitted and parsed, generating serialized data packets with compact storage characteristics, which serve as the intermediate representation for database writing; S8.3: Based on the access protocol of the target time series database, establish a persistent connection channel compatible with InfluxDB, and automatically divide the time partition of data writing according to the timestamp field of the current detection record. Utilize its natively supported tag indexing mechanism to register product model, detection device ID and semantic tags as queryable metadata tags, and generate an index structure that supports multi-dimensional semantic retrieval. S8.4: Submit the serialized data packet along with the constructed index structure to the database write queue, and perform batch insertion operations through an asynchronous batch processing mechanism to avoid I / O bottlenecks caused by writing a single record in high-frequency detection scenarios, output high-throughput, low-latency data persistence results, and ensure the real-time requirements of the online detection system; S8.5: After the data is written, the schema version verification process on the database side is triggered to compare the consistency between the field structure of the currently written data and the latest schema definition. If new semantic tags or feature parameters are found, the schema evolution mechanism is automatically started to dynamically expand the data model without affecting the compatibility of historical data and generate an elastic data architecture that supports the evolution of future semantic queries.
[0032] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.
[0033] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and rules of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for online detection of assembly accuracy of bag handles using laser contour scanning, characterized in that, Includes the following steps: S1: Acquire the original point cloud data frame of the bag handle assembly area and simultaneously collect the corresponding process order information; S2: Perform denoising and normalization preprocessing on the original point cloud data frame to generate a standardized point cloud dataset; S3: Based on the standardized point cloud dataset, perform local geometric feature extraction, calculate the key morphological parameters of the handle contour, and quantize the key morphological parameters into numerical feature vectors; S4: Based on the product model in the process work order information, retrieve the corresponding assembly feature template from the preset context rule base. The assembly feature template is generated based on historical qualified sample statistics and managed by version. S5: Perform weighted similarity matching between the numerical feature vector and the assembly feature template of the corresponding model to generate a matching score; S6: When the matching score is higher than the preset threshold, the successfully matched semantic label is bound to the current detection record; when the matching score is lower than or equal to the preset threshold, the initialization process of the edge-side incremental learning agent module is triggered. The edge-side incremental learning agent module performs fast nearest neighbor comparison based on the simplified KNN graph index constructed from historical labeled samples and outputs the selected semantic label. S7: Embed the selected semantic tags into the composite element data packet in the form of key-value pairs to form a structured detection result data unit; S8: Write the structured detection result data unit into a time series database that supports schema evolution, so that the subsequent quality traceability system can directly retrieve it based on semantic conditions.
2. The method for online detection of assembly accuracy of bag handles using laser contour scanning according to claim 1, characterized in that, The original point cloud data frame is acquired by a laser contour scanner within a single trigger cycle and contains a three-dimensional spatial coordinate sequence and corresponding intensity information.
3. The method for online detection of assembly accuracy of bag handles using laser contour scanning according to claim 1, characterized in that, The process order information includes product model, assembly timestamp, robot action number, and testing equipment ID.
4. The method for online detection of assembly accuracy of bag handles using laser contour scanning according to claim 1, characterized in that, Step S3 specifically includes: Local neighborhoods are constructed on the standardized point cloud dataset. Based on the K-nearest neighbor algorithm, the k nearest neighbors of each sampling point are searched in the key region of the handle contour. The search of the key region of the handle contour includes the grip section region, the connecting end region and the mounting base region. Spatial local topological relationships are established to generate local neighborhood point cloud clusters. Based on the local neighborhood point cloud cluster, covariance matrix analysis is performed. The covariance matrix is calculated for the coordinate distribution in the neighborhood of each point, and its eigenvalues and eigenvectors are solved. The principal direction, secondary direction and normal information are extracted, and then the local tangent plane and normal vector field are fitted to generate a local geometric differential attribute set. Based on the maximum and minimum eigenvalues in the local geometric differential attribute set, the Gaussian curvature and average curvature of each point are calculated using the Weingarten mapping approximation method. The continuous curvature distribution of the gripping segment region is integrated by a sliding window, and the mean curvature and curvature variation variance of its main arc segment are extracted to generate radian curvature feature parameters. A cylindrical surface least squares fitting is performed on the local neighborhood point cloud clusters of the connection end region. The best fitting cylinder axis and radius parameters are iteratively solved using a nonlinear optimization algorithm. The diameter measurement values of the connection parts at both ends are extracted, and the diameter difference between the left and right ends and the deviation from the nominal value are calculated to generate end diameter feature parameters. Based on the local geometric differential attribute set of the mounting base area, planar least squares fitting is performed on the point cloud of the area, the root mean square error of the fitting residual is calculated, and the mounting surface flatness feature parameters are generated by combining the normal vector consistency standard deviation; the radii curvature feature parameters, the end diameter feature parameters and the mounting surface flatness feature parameters are combined according to a preset dimension and quantized into a unified normalized numerical feature vector.
5. The method for online detection of assembly accuracy of bag handles using laser contour scanning according to claim 1, characterized in that, Step S4 specifically includes: Based on the labeled point cloud dataset in the historical qualified sample database, extract the standardized geometric feature vector sequence corresponding to various product models; The standardized geometric feature vector sequence is subjected to grouping and aggregation processing to calculate the group mean and standard deviation of each key morphological parameter, forming the original assembly feature template; The original assembly feature template is embedded into the context rule base and associated with the product model code, applicable process version number and effective timestamp to establish a search mechanism based on dual indexes of model and version; An incremental update mechanism is implemented for the assembly feature templates in the context rule base. When a new batch of qualified samples accumulates to a preset number threshold, the template parameter recalculation process is triggered, and the template status under different iteration cycles is distinguished by version increment markers. Based on the product model information in the current detection record, the search mechanism is used to perform a fast retrieval operation in the context rule base, retrieve the corresponding assembly feature template as a reference benchmark for weighted similarity matching, and output the target matching template.
6. The method for online detection of assembly accuracy of bag handles using laser contour scanning according to claim 5, characterized in that, The original assembly feature template is formed by statistically analyzing the feature sequences of qualified samples from each production batch. The three parameters of arc curvature, end diameter and mounting surface flatness are defined by the population mean and ±3 times the standard deviation as nominal values and tolerance ranges, respectively. The parameter adaptability is maintained through automatic version increment marking and sample number threshold update mechanism.
7. The method for online detection of assembly accuracy of bag handles using laser contour scanning according to claim 1, characterized in that, Step S5 specifically includes: Based on the numerical feature vector output in step S3 and the assembly feature template retrieved in step S4, a weighted similarity matching model is constructed. The weight coefficients of each parameter dimension are assigned using the tolerance inverse ratio function to generate a weighted feature space mapping rule. The numerical feature vector and the nominal value vector in the assembly feature template are normalized respectively to generate a standardized feature vector and a standardized nominal vector. Based on the weighted feature space mapping rule, the standardized feature vector, and the standardized nominal vector, calculate the comprehensive deviation between the current feature vector and the template nominal value, and output the weighted deviation value. The weighted deviation value is converted into a matching score within a unified interval through a nonlinear mapping function to generate a quantified matching score.
8. The method for online detection of assembly accuracy of bag handles using laser contour scanning according to claim 7, characterized in that, The nonlinear mapping function is determined based on the statistical distribution of deviations from historical qualified samples.
9. The method for online detection of assembly accuracy of bag handles using laser contour scanning according to claim 1, characterized in that, The simplified KNN graph index retains only the feature anchor set of boundary cases and typical misjudged samples. Each feature anchor contains a standardized numerical feature vector, corresponding semantic label, product model, and timestamp metadata.
10. The method for online detection of assembly accuracy of bag handles using laser contour scanning according to claim 1, characterized in that, The composite metadata uses a lightweight JSON Schema template to define field types and levels, which contain original point clouds, feature vectors, process order information and semantic tags. The tag field includes a confidence attribute.