Defect detection system for inner package

By using multi-angle supplemental lighting and Euclidean distance vector analysis, the imaging blurring problem of traditional inner packaging inspection systems under insufficient lighting or reflection interference is solved, realizing accurate inspection and dynamic linkage response control of inner packaging, and improving inspection accuracy and control efficiency.

CN121033064AActive Publication Date: 2025-11-28HANGZHOU KANGHONG IND & TRADE

Patent Information

Application Number
CN202511580215.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-31
Publication Date
2025-11-28
Estimated Expiration
2045-10-31

AI Technical Summary

Technical Problem

Traditional inner packaging defect detection systems suffer from blurred imaging due to insufficient lighting or reflection interference in local areas, making it impossible to accurately identify the specific location and extent of the inner packaging components' deviation. They also lack detailed assessment of defect levels, resulting in low detection accuracy and control feedback efficiency.

Method used

By using multi-angle supplemental lighting sequences and Euclidean distance vector analysis, the boundary offset distribution is identified. Combined with structural hierarchy and functional risk factors, defect levels are mapped to achieve accurate detection and dynamic linkage response control of inner packaging components.

Benefits of technology

It improves the accuracy of defect detection in inner packaging and the timeliness of control decisions, enhances the granularity of defect identification classification, and realizes dynamic linkage response to the inner packaging process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121033064A_ABST
    Figure CN121033064A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of defect detection, in particular to an inner package defect detection system which comprises an illumination control module, a boundary recognition module, a defect gathering module, a grade mapping module and a response linkage module. According to the method, through the convergence degree and Euclidean vector distribution of the boundary contour form, boundary offset distribution information is established, tiny offset or abnormal positions are accurately captured, aggregation extraction and spatial clustering of defect boundaries are achieved, abnormal clusters are screened through distance and number distribution parameters, and the defect detection accuracy is improved. And a defect level is mapped by combining a structure level and a functional risk factor, and differential station response operation is triggered according to level evaluation, so that on the basis of improving image quality, the component identification precision is guaranteed, the space representation capability of defect clustering is enhanced, and the grading judgment granularity of defect detection in multi-component assembly is enhanced. Dynamic linkage response control in the inner packaging process is achieved, and the accuracy of overall defect recognition and the timeliness of control decision making are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of defect detection, in particular to an inner packaging part defect detection system. BACKGROUND

[0002] The technical field of defect detection mainly focuses on the automatic identification and classification of appearance defects, structural abnormalities or functional defects that may occur at various stages of product manufacturing, assembly, packaging, etc. through image processing, machine vision and intelligent recognition algorithms. This field combines the use of optical imaging, deep learning models, template matching, edge detection, three-dimensional reconstruction, pixel-level segmentation and other technical means, aiming to replace manual detection, achieve efficient, stable identification and precise positioning of various types of defects such as workpiece surface cracks, scratches, foreign matter, deformation, misassembly, missing parts, size deviation, etc., improve detection speed and consistency, ensure product quality and optimize production processes. This technology is widely used in electronic manufacturing, food packaging, pharmaceutical assembly, automotive parts, semiconductor processing and other industrial scenarios.

[0003] Among them, the inner packaging part defect detection system is a detection system applied to automatically identify and judge defects of the internal components of product packaging, mainly used to identify whether there are missing parts, misaligned parts, damage, position deviation, etc. inside the packaging. The system obtains internal image data through an industrial camera, combines a deep learning target recognition model and a geometric calibration method to achieve automatic analysis and abnormal marking of the internal assembly state. Its core purpose is to ensure packaging integrity and assembly accuracy, especially suitable for industrial scenarios that require multiple sub-components to be combined into packaging boxes or containers, such as pharmaceutical packaging, consumer electronics assembly, daily chemical product packaging, etc., to improve production quality control level and packaging qualification rate.

[0004] Traditional detection systems have the problem of imaging blur caused by insufficient local area lighting or reflection interference, especially when the boundaries of internal packaging components overlap or the surface material is complex, which can easily lead to loss of boundary pixels or recognition errors, making it difficult to refine the specific location and degree of assembly abnormalities. For example, when there are multiple component deviations within the same packaging unit, traditional systems only mark the overall abnormalities and cannot provide focused judgment indicators, lack evaluation models related to structural criticality and functional impact degree, resulting in rough defect classification, lack of effective linkage of packaging processes, and reduced detection accuracy and control feedback efficiency in actual industrial scenarios. SUMMARY

[0005] The purpose of the present application is to solve the shortcomings in the prior art and to provide an inner packaging part defect detection system.

[0006] In order to achieve the above purpose, the present application adopts the following technical scheme: an inner packaging part defect detection system, the system comprises:

[0007] The illumination control module obtains real-time state information of each product component in the packaging container, multiplies a surface reflectivity value and an included angle change value, compares a product result with a shielding photosensitive threshold, triggers a plurality of light supplement devices numbered differently in a light source matrix, and obtains a multi-angle light supplement illumination sequence.

[0008] The boundary recognition module calls the multi-angle light supplement illumination sequence, calculates an Euclidean distance vector between geometric center reference points set in the boundary point packaging structure, classifies a vector set according to direction difference and distance variation, recognizes whether a closed image form is formed, and obtains boundary offset distribution information.

[0009] The defect aggregation module obtains an Euclidean distance between a centroid and a product component geometric center point set in the packaging structure based on the boundary offset distribution information, screens a cluster whose aggregation index exceeds an interval threshold, and obtains a component centralized abnormal area list.

[0010] The grade mapping module calls the component centralized abnormal area list, extracts a structure level identifier, a function classification label and a defect type label of an associated product component in each abnormal area, calculates a defect abnormality evaluation value, combines a preset defect grade determination interval table, and generates a multi-component grade classification result.

[0011] The multi-angle light supplement illumination sequence includes an excitation angle combination, an illumination intensity setting and a trigger timing scheme, the boundary offset distribution information specifically refers to an edge centripetal difference layer, a boundary direction variation layer and an offset stability determination label, the component centralized abnormal area list includes a cluster number index, a spatial barycenter position and an aggregation intensity identifier, and the multi-component grade classification result specifically refers to a component grade mark, a grade mapping number and a risk coefficient weight value.

[0012] The illumination control module includes:

[0013] The coordinate acquisition sub-module obtains real-time state information of each product component in the packaging container, the real-time state information including a spatial coordinate, a component surface reflectivity, a minimum gap distance between components and a light source direction included angle change value, the light source direction included angle change value is corresponded to the component surface reflectivity item by item, a reflection angle response matrix of each product component is constructed, and an angle response matrix data set is generated.

[0014] The occlusion judgment sub-module calls the product component reflection value and the included angle value product result of each group based on the angle response matrix data set, calculates the difference value of the product component reflection value and the included angle value product result and an occlusion photosensitive threshold, aggregates the difference value according to the product component space number, selects the data sequence number continuously exceeding the upper limit of the occlusion judgment interval as an occlusion marker number set, obtains the occlusion offset strength corresponding to the product component, calls the component number set whose offset strength value exceeds the offset threshold, and obtains an occlusion trigger number list;

[0015] The light supplement excitation sub-module locates the space area of each occlusion number corresponding product component in the packaging container according to the occlusion trigger number list, calls the light supplement device bound with the area number in the light source matrix, sets the differential light source excitation angle parameter and the time sequence excitation interval value, combines the multi-angle light source parameters to execute illumination excitation, and obtains a multi-angle light supplement illumination sequence.

[0016] The application improves that the boundary recognition module comprises:

[0017] The reconstruction imaging sub-module calls the multi-angle light supplement illumination sequence, performs spectroscopy angle sequence imaging on each product component in the inner packaging structure, arranges the imaging results according to the light source excitation sequence to construct an imaging atlas, judges the stability of the overlapping area according to the pixel intensity distribution in the atlas, and obtains imaging brightness stability interval information;

[0018] The pixel extraction sub-module screens the edge area in each frame image whose brightness distribution meets the stable interval according to the imaging brightness stability interval information, extracts the two-dimensional coordinate value set of each pixel point in the edge area, calculates the Euclidean distance between the boundary point and the geometric center reference point in the inner packaging structure, and obtains a boundary center offset vector set;

[0019] The contour classification sub-module calls the boundary center offset vector set, merges and groups each vector direction angle and vector length, calculates the included angle difference standard deviation and length variance between vectors in each group, judges whether the product component contour constitutes a closed structure according to the attribution group distribution trend, and outputs the contour variation degree to obtain boundary offset distribution information.

[0020] The application improves that the defect aggregation module comprises:

[0021] The coordinate aggregation sub-module classifies the defect boundary coordinate points of each product component according to the packaging unit number based on the boundary offset distribution information, extracts the three-dimensional space position value of each defect point set after classification, and constructs the coordinates into a unified format data set to obtain a defect three-dimensional coordinate set.

[0022] The spatial clustering submodule calls the three-dimensional coordinate set of the defects, calculates the Euclidean distance between each defect point and the remaining points as the center of the defect point, clusters and merges the distance data, extracts the nearest neighbor distance and the number of points in the cluster for each cluster of defect points, and takes the mean of the coordinates of the points in the cluster as the cluster center, performs difference calculation on the Euclidean distance between the cluster center point and the geometric center point of the product component in the packaging structure, and obtains the aggregation spatial offset strength corresponding to each cluster by calculation.

[0023] The aggregation screening submodule performs numerical difference calculation on the aggregation spatial offset strength of each cluster and the corresponding structure assembly tolerance reference value according to the spatial aggregation feature information, screens the cluster number and the corresponding spatial coordinate range whose aggregation index exceeds the upper limit of the tolerance value interval, establishes the spatial identification index under the corresponding packaging unit, and obtains the component concentrated abnormal area list.

[0024] The level mapping module comprises:

[0025] The label extraction submodule obtains the component concentrated abnormal area list, extracts the structure level identifier, the function classification label and the defect type label corresponding to the associated product component in each abnormal area, classifies and encodes the three types of label data, establishes a unified index mapping table, and obtains a component label code set;

[0026] The weight calculation submodule assigns a structure level weight to the structure level identifier, a function criticality weight to the function classification label, and a defect type risk weight to the defect type label according to the component label code set, and obtains a defect abnormality evaluation value corresponding to each product component by calculation;

[0027] The interval determination submodule compares the defect abnormality evaluation value with each upper limit value in the preset defect level determination interval table one by one, classifies the component numbers falling into the same level interval into a group of level classification indexes, and adds the evaluation value and the interval code, to generate a multi-component level classification result.

[0028] The system further comprises:

[0029] The response linkage module identifies the action item defined in the response control strategy mapping table to which the current level belongs according to the multi-component level classification result, and executes the stop operation on the station state, the task scheduling unit suspension processing and the material packaging path switching operation when the level identifier is in the high-risk level interval, to generate a defect level linkage control instruction set;

[0030] The defect level linkage control instruction set specifically comprises a stop instruction code, a review suspension signal and a station switching command code.

[0031] The application improves that the response linkage module comprises:

[0032] The grade retrieval submodule retrieves the packaging unit number and the station control number corresponding to each grade based on the multi-component grade classification result, groups the number items according to the grade level, calls the packaging station registration table to contrast the grouping list, filters the stations in the running state, and establishes a station grade mapping structure set to obtain station grade mapping information;

[0033] The strategy matching submodule calls the station grade mapping information, matches the response control strategy mapping table according to the grade code of each group of grade mapping items, extracts the action item label and execution condition threshold hung under the corresponding grade code in the control table, judges the value interval of each station grade code and action execution condition, filters the station number set that meets the trigger condition, and obtains a trigger station action index set;

[0034] The instruction generation submodule classifies and indexes each station number corresponding action item according to the trigger station action index set, encapsulates the corresponding stop instruction, task suspension instruction and path switching instruction into a structured control field, assembles an instruction set structure through the control field, and establishes a defect grade linkage control instruction set.

[0035] Compared with the prior art, the application has the advantages and positive effects that:

[0036] In the application, by collecting component space coordinates and surface reflectivity data, combining light source direction changes to construct a gradient model, realizing active differential light compensation in a specific area under lighting conditions, and using multi-angle lighting to improve the reconstruction accuracy of boundary pixels in the image, the boundary offset distribution information is established by means of the convergence degree of the boundary contour shape and the Euclidean vector distribution, the micro shift or abnormal position is accurately captured, the aggregation extraction and spatial clustering of the defect boundary are realized, the abnormal clustering cluster is screened through the distance and quantity distribution parameters, and the defect grade is mapped by combining the structure level and the function risk factor, and the differential station response operation is triggered according to the grade evaluation, so as to improve the image quality, ensure the component recognition accuracy, enhance the spatial representation ability of defect clustering, strengthen the grading judgment granularity of defect detection in multi-component assembly, realize the dynamic linkage response control in the inner packaging process, and improve the accuracy of overall defect recognition and the timeliness of control decision. BRIEF DESCRIPTION OF DRAWINGS

[0037] Figure 1 The system flowchart of the application;

[0038] Figure 2 The flowchart of the illumination control module of the application;

[0039] Figure 3 The flowchart of the boundary identification module of the application;

[0040] Figure 4 Flow chart of the defect aggregation module of the present application;

[0041] Figure 5 Flow chart of the grade mapping module of the present application;

[0042] Figure 6 Flow chart of the response linkage module of the present application. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be further described in detail below in combination with the drawings and examples. It should be understood that the specific examples described herein are only used to explain the present application and do not limit the present application.

[0044] In the description of the present application, it should be understood that the terms "length", "width", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer" and the like indicate the orientation or positional relationship shown in the drawings, which are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application. In addition, in the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise explicitly and specifically limited.

[0045] Please refer to Figure 1 The present application provides a technical scheme: a packaging piece defect detection system, the system includes a light control module, a boundary identification module, a defect aggregation module, a grade mapping module and a response linkage module;

[0046] The light control module obtains real-time state information of each product component in the packaging container, the real-time state information includes spatial coordinates, component surface reflectivity, minimum gap distance between components, light source direction angle change value, based on the change gradient formed by the coordinate point and the light source direction angle, the surface reflectivity value is multiplied by the angle change value, and the product result is compared with the shielding photosensitive threshold value, when the ratio continuously exceeds the upper limit section of the threshold value sequence, the multiple light supplement devices with number difference in the light source matrix are triggered, the corresponding area is executed with different timing excitation, and a multi-angle light supplement illumination sequence is obtained;

[0047] The minimum gap distance refers to the nearest edge distance between any two product components in the packaging structure in three-dimensional space, which is usually calculated using Euclidean distance; the surface reflectivity is the reflection ratio of light intensity, which is a material physical property; the shielding photosensitive threshold value can be set by experiment as a corresponding threshold point at which the image shadow area boundary identification failure probability is greater than the set threshold value when the illuminance is lower than a specified level;

[0048] The boundary recognition module calls a multi-angle light compensation lighting sequence, performs multi-light source reconstruction imaging on each product component in the inner packaging structure, extracts a boundary pixel point coordinate set from the imaging data, calculates an Euclidean distance vector between the set geometric center reference points in the inner packaging structure, classifies the vector set according to direction difference and distance variation, identifies whether the boundary convergence constitutes a closed image form, judges the contour stability offset range, and obtains the boundary offset distribution information;

[0049] The geometric center reference point can be obtained by calculating the center coordinates of the three-dimensional contour boundary of the packaging container, and is usually defined as the average center point of the length, width and height of the packaging. The contour stability offset range is a comprehensive value of the length variance and the included angle variance between the multiple boundary centripetal vectors, which is used to judge the edge offset consistency.

[0050] The defect aggregation module aggregates the defect boundary coordinate points corresponding to the product components based on the boundary offset distribution information, obtains the three-dimensional coordinate data of the defect points in each packaging unit, calculates the Euclidean distance between the defect points, constructs a spatial clustering matrix, counts the nearest neighbor distance, the number of points in the cluster, and the cluster centroid coordinates of each cluster, obtains the Euclidean distance between the centroid and the geometric center point of the product component set in the packaging structure, compares it with the structure assembly tolerance value, selects the clustering clusters whose aggregation index exceeds the interval threshold, and obtains the component concentrated abnormal area list.

[0051] The spatial clustering matrix is a cluster division table based on the Euclidean distance, which is suitable for the intermediate state of K-means or DBSCAN clustering. The structure assembly tolerance value is the structure allowed error given by the product design file, which is generally provided by the assembly engineering.

[0052] The grade mapping module calls the component concentrated abnormal area list, extracts the structure level identifier, functional classification label and defect type label of the associated product component in each abnormal area, respectively assigns the structure level weight coefficient, functional criticality weight coefficient and defect type risk coefficient to the three labels, calculates the defect abnormal evaluation value, compares it with the preset defect grade judgment interval table, and generates a multi-component grade classification result.

[0053] The structure level weight coefficient is used to reflect the position priority of the component in the assembly structure, for example, the weight of the bottom bearing part is greater than that of the surface covering part. The functional criticality weight coefficient is quantified according to the key role of the component to the packaging integrity, which can be extracted from the design BOM table. The defect type risk coefficient is defined according to the influence score of each type of defect (such as misplacement, damage) on function, which is generally set by quality control standards. The defect grade judgment interval table is usually a multi-section score interval, which is mapped to the grade label.

[0054] The response linkage module retrieves the packaging unit number and the station control number corresponding to the mapping level according to the multi-component level classification result, identifies the action item defined in the response control strategy mapping table to which the current level belongs, and when the level identifier is in the high-risk level interval, performs the stop operation on the station state, the task scheduling unit suspension processing, and the material packaging path switching operation, and generates a defect level linkage control instruction set;

[0055] The response control strategy mapping table is a preset action response decision matrix, recording the mapping rules between levels and action categories; the packaging path switching operation refers to switching the current material from the main line to the bypass or maintenance line by modifying the PLC control signal of the production line;

[0056] The multi-angle light compensation illumination sequence includes an excitation angle combination, an illumination intensity setting, and a trigger timing scheme, the boundary offset distribution information specifically includes an edge-to-center difference layer, a boundary direction variation layer, and an offset stability judgment label, the component cluster abnormal area list includes a cluster number index, a spatial barycenter position, and a clustering intensity identifier, the multi-component level classification result specifically refers to a component level marker, a level mapping number, and a risk coefficient weight value, and the defect level linkage control instruction set specifically includes a stop instruction code, a review suspension signal, and a station switching command code.

[0057] Please refer to Figure 2 , the illumination control module includes:

[0058] The coordinate acquisition submodule acquires real-time state information of each product component in the packaging container, and the real-time state information includes spatial coordinates, component surface reflectivity, minimum gap distance between components, and light source direction angle change value. The light source direction angle change value is correspondingly compared with the component surface reflectivity, a reflection angle response matrix of each product component is constructed, and an angle response matrix data set is generated.

[0059] The three-dimensional spatial coordinates, surface reflectivity, minimum gap distance between components, and the angle change value of the light source direction of each product component in the packaging container are obtained. The product components numbered A1, A2, and A3 in the packaging station are arranged in different station areas. The spatial position data is obtained by using a coordinate sensor and numbered to establish a coordinate data table. Under three groups of directions with light source angles of 30°, 45°, and 60°, the reflectivity measurement values are obtained by using a photoelectric acquisition module and converted into normalized values. For example, the reflectivity of component A1 under direction 1 is 0.72, the corresponding angle is 0.82, and the product is 0.5904. At the same time, the minimum gap distance between the adjacent components is 28 mm, the diagonal line of the packaging container is 200 mm, the normalized gap distance is 0.14, the light source offset is 10 mm, the light source arrangement width is 200 mm, the corresponding Δx is 0.05, and the normalized reflectivity and angle change value of all components under all angle directions are matched and a plurality of matrix data sets are generated to establish the angle response matrix data set.

[0060] Table 1 Product component reflectivity and shielding data table under multiple light source directions

[0061] Product component number Light source direction number j Surface reflectivity Rij Change in angle value θij (normalized) Minimum gap distance dij (normalized) Offset distance Δx (normalized) A1 1 0.72 0.82 0.14 0.05 A2 1 0.55 0.61 0.18 0.05 A3 1 0.68 0.76 0.12 0.05

[0062] As shown in Table 1, the normalized parameter input values of A1, A2, and A3 product components under the first light source direction are listed.

[0063] The shielding determination submodule calls the product of the reflectivity value and the angle value of each group of product components based on the angle response matrix data set, performs difference calculation with the shielding photosensitive threshold value, aggregates the difference values according to the spatial number of the product components to obtain the average value, and selects the data sequence number continuously exceeding the upper limit of the shielding judgment interval as the shielding marker number set. The formula is:

[0064] ;

[0065] The shielding offset strength corresponding to the product component is obtained by operation, the component number set whose offset strength value exceeds the offset threshold value is called, and the shielding trigger number list is obtained.

[0066] wherein, P i is the shielding offset strength of the i th product component, which is used to measure the illumination shielding effect, R ij is the surface reflectivity normalized value of the i th product component under the j th light source direction, θ ij is the light source angle change normalized value of the i th product component under the j th light source direction, T s is the normalized value of the shielding photosensitive threshold value, which is set as the median value in the reference range affecting the abnormal photosensitivity of the component, and d ijThe minimum gap distance normalized value of the ith product component in the jth direction is obtained by dividing the original space distance by the longest diagonal length of the packaging structure, and Δx is the normalized value of the light source direction offset distance, which is the ratio of the actual offset distance to the total width of the light source arrangement;

[0067] Based on the obtained angle response matrix data set, the reflectivity of component A1 in direction 1 is 0.72, the included angle is 0.82, and the shielding photosensitive threshold T is set to 0.5 s , which is established according to the fact that when the brightness in the packaging line image distribution is lower than the 10% gray threshold, the system misjudgment rate exceeds 30%, which is the critical point leading to image feature shielding under the reflection-angle combination. Generally, the median value of the product of the reflectivity and angle of all components is taken as a reference, and the median value in the sample is 0.498, so it is set to 0.5. The corresponding shielding formula is:

[0068] ;

[0069] In the formula, the numerator part represents the absolute value of the deviation of the reflection-angle combination in each light source direction from the shielding reference. The larger this value is, the more serious the shielding is. The denominator part is used to normalize the shielding space influence, where suppresses the exaggeration of the influence of the gap shrinkage on the offset, Δx compensates for the stretching of the light compensation blind area caused by the angle change of the light source itself, and a offset intensity index for quantifying the shielding degree is formed through ratio calculation. Finally, P i is obtained as a dimensionless normalized value.

[0070] Substituting the data of A1, the calculation is as follows:

[0071] ;

[0072] Similarly, the calculation result of A2 is as follows:

[0073] ;

[0074] A3 is calculated as follows:

[0075] ;

[0076] The upper limit of the shielding judgment interval is set to 0.18, which is derived from the recognition failure probability caused by the profile missing of part of the structure at the misjudgment rate critical point. The fluctuation range of this value is obtained through a large number of detection image sample tests, and it fluctuates between 0.17 and 0.19. The average value of the current system stable period is 0.18, which is used as the shielding trigger boundary under this working condition. Therefore, A2 and A1 exceed the upper limit and are included in the shielding number set.

[0077] The results show that by constructing the offset intensity index combined with the change of the reflection angle and the product item, and performing spatial distance normalization correction, the component area affected by the image acquisition under the current shielding state can be effectively screened out, and the relative severity in the shielding space is quantified, thereby providing clear target identification for subsequent light compensation actions.

[0078] The light compensation excitation submodule locates the spatial area of each shielding number corresponding to the product component in the packaging container according to the shielding trigger number list, calls the light compensation device bound to the area number in the light source matrix, sets the differentiated light source excitation angle parameters and time sequence excitation interval values, combines the multi-angle light source parameters to perform lighting excitation, and obtains a multi-angle light compensation lighting sequence.

[0079] According to the generated shielding trigger number list, the product components numbered A1 and A2 are identified, and their spatial coordinate points are located in the edge area number of the packaging container. The corresponding area setting number in the light source matrix control module is matched, the light compensation lamp with the corresponding number is set to the excitation angle sequence of 30°, 45° and 60°, according to the packaging conveying line speed of 0.8 m / s and the unit spacing of 0.4 m, the excitation interval of the light compensation device is set to 0.5 seconds, and the light compensation is performed three times in this time, each time using a different angle and controlling the light flux to be between 200 and 300 Lux to ensure uniform exposure. The time stamp, area number, excitation power and target component binding code are configured for each excitation instruction, and the instruction data packet is uniformly generated. Finally, the above excitation sequence, angle configuration and brightness range are integrated and recorded as a light action sequence, and a time control parameter group is established and pushed to the lighting execution unit to obtain a multi-angle light compensation lighting sequence for shielding compensation.

[0080] Please refer to Figure 3 , the boundary recognition module comprises:

[0081] The reconstruction imaging submodule calls the multi-angle light compensation lighting sequence, performs light angle sequence imaging on each product component in the inner packaging structure, arranges and constructs an imaging atlas according to the imaging results according to the light source excitation sequence, judges the stability of the overlapping area according to the pixel intensity distribution in the atlas, and obtains the imaging brightness stability interval information.

[0082] In the reconstruction imaging sub-module, the light source parameters required for calling the multi-angle light compensation lighting sequence need to cover the light source number, lighting angle and lighting timing. The light source number corresponds to the component number in the packaging structure one by one. The lighting angle ranges from 0° to 180°. The typical selection angles are 0°, 45°, 90°, 135° and 180°. Five frames of light sequence images are formed by sequentially exciting and collecting images under each angle. The image collection uses a CMOS image sensor with a resolution of 1920x1080 and an image frame rate of 30fps. The data acquisition period is set to 0.5s. Each frame of image is arranged in sequence according to the lighting angle to form an atlas matrix. Each frame of image in the atlas matrix corresponds to an excitation angle number. Then all the pixel points in the atlas are scanned. A detection unit is set as 10x10 pixels. The average pixel intensity and standard deviation of each detection unit in the five frames of images are calculated. If the standard deviation is less than the set brightness stability judgment threshold , the region is determined as an imaging brightness stable interval region, which is set to 10 gray levels, and the maximum standard deviation value derived from the image background gray level fluctuation under static lighting. For example, if the pixel values of a detection region in five frames of images are {130, 132, 128, 129, 131}, the average value is 130, and the standard deviation is about 1.41, which is less than the threshold value 10, so it meets the stable interval judgment standard, and the imaging brightness stable interval information is finally obtained. The threshold value is set according to the image background brightness experimental data. The same scene is sampled for static light compensation for 50 times. The maximum standard deviation value is 12, and the minimum is 8. The median value is set to 10 to cover the normal deviation range.

[0083] The pixel extraction sub-module filters the edge region in each frame of image whose brightness distribution meets the stable interval according to the imaging brightness stable interval information, extracts the two-dimensional coordinate value set of each pixel point in the edge region, calculates the Euclidean distance between the boundary point and the geometric center reference point in the inner packaging structure, and obtains the boundary center offset vector set.

[0084] In the pixel extraction sub-module, according to the imaging brightness stable interval information obtained in the foregoing, all detection regions in each frame of image are screened. The regions with a standard deviation exceeding are excluded, and the brightness fluctuation stable regions are retained. The boundary pixel points are extracted by calling the edge recognition process. The edge recognition is based on the image gradient method. The gradient intensity threshold is set to 30 gray level difference. Whether the boundary point pixel gray gradient exceeds the threshold is judged. For example, when the gray difference between the pixel point (135, 215) and its surrounding points is greater than 30, it is recognized as a boundary point to form an edge coordinate point set . The geometric center reference point of the packaging structure is set as . The Euclidean distance from the edge point to the center point is calculated based on the center point. The formula is:

[0085] ;

[0086] Take the point (120, 220) as an example, the distance is Pixels, repeat to get the distance value of all boundary points, and form the boundary center offset vector set.

[0087] Table 2: Euclidean distance between edge points and center points

[0088] Edge point coordinates Center point coordinates Euclidean distance (pixels) (120,220) (135,215) 15.81 (145,230) (135,215) 18.03 (150,210) (135,215) 15.81 (125,205) (135,215) 14.14

[0089] As shown in Table 2, the distance values between all edge points and the center point are in the range of 14 to 18 pixels, forming the basis vector length input value, facilitating subsequent contour structure calculation.

[0090] The contour classification submodule calls the boundary center offset vector set, merges each vector direction angle with the vector length, calculates the standard deviation of the included angle difference and the length variance between the vectors in each group, judges whether the product component contour constitutes a closed structure according to the distribution trend of the belonging group, and outputs the contour variation degree, and obtains the boundary offset distribution information;

[0091] In the contour classification submodule, the aforementioned boundary center offset vector set is called, and the reference point is taken as the starting point to construct the vector , the direction angle of each vector is calculated respectively, and its length is recorded, all vectors are divided into eight groups according to the direction angle interval every 45°, and the direction angle difference and length difference between all vectors in the same group are compared pairwise, the standard deviation of the direction angle difference and the length difference are calculated respectively, when the group meets and pixels, it is determined that the vector group structure converges and has the trend of constituting a closed boundary, if all direction segments appear this trend and there is a complete path surrounding the center area, it is confirmed that it constitutes a closed structure, otherwise it is determined that the structure is variable, and finally the boundary offset distribution information is output according to the variance trend of each direction segment; wherein and are set according to the measurement results of 20 normal product component boundary structure samples, the standard deviation of the direction angle is usually below 12°, and the standard deviation of the length does not exceed 4.5 pixels, and the standard is set to 15° and 5 pixels respectively, so as to fully cover the natural offset interval.

[0092] Formula calculation logic description:

[0093] In the contour classification process, the standard deviation of the direction angle The calculation of the length standard deviation is used to measure the consistency of a group of vectors in the spatial direction, reflecting whether there is a concentrated directional trend in the boundary, while the length standard deviation characterizes the stability of the boundary distance distribution, and the two jointly judge whether the structure is complete and closed. When the vector direction converges and the length changes little, it represents a regular closed boundary, otherwise it represents boundary deformation or local anomaly, and then the boundary offset distribution information is output, reflecting the component boundary change trend and contour variation in the packaging structure. This result will be directly used as input basis for subsequent aggregation recognition and offset clustering modules.

[0094] Please refer to Figure 4 , the defect aggregation module comprises:

[0095] The coordinate collection submodule classifies the defect boundary coordinate points of each product component according to the packaging unit number based on the boundary offset distribution information, extracts the three-dimensional spatial position value of each item in the classified defect point set, and constructs the coordinates into a unified format data set to obtain a defect three-dimensional coordinate set;

[0096] In the coordinate collection submodule, based on the boundary offset distribution information obtained in the previous stage, first, the defect boundary coordinate set corresponding to each product component is extracted according to the packaging unit number. Each data point in the boundary coordinate set is represented as (x, y) in two-dimensional coordinates. Combined with the imaging light source number corresponding to the point and its imaging depth data, the two-dimensional coordinates are mapped to three-dimensional coordinates. The depth information is obtained by parallax ranging method. The original resolution is 1920x1080, and the depth accuracy of each pixel is 0.1mm. After conversion, three-dimensional coordinates (x, y, z) are formed, where z value is converted from camera calibration matrix. The maximum range of depth is 500mm, which is normalized to a proportion value in the interval [0, 1] in millimeter units. Then all the collected coordinate points are grouped according to the packaging unit number, and the defect three-dimensional point set in each group is output. The data format is unified as a three-column array, and the arrangement order is coordinate number, normalized x, y, z three-dimensional coordinate value. This format is convenient for subsequent clustering analysis operation, and finally a defect three-dimensional coordinate set is obtained.

[0097] The spatial clustering submodule calls the defect three-dimensional coordinate set, calculates the Euclidean distance between each defect point and the remaining points with the defect point as the center, clusters and merges the distance data, extracts the nearest neighbor distance and the number of points in each cluster, and takes the mean value of the cluster center point coordinates as the cluster center. The Euclidean distance between the cluster center point and the geometric center point of the product component in the packaging structure is calculated by the formula:

[0098] ;

[0099] The operation obtains the aggregation space offset strength corresponding to each clustering cluster, numbers and marks each cluster offset strength, and aggregates and filters to obtain spatial aggregation feature information;

[0100] wherein G k represents the aggregation space offset intensity of the kth cluster, m k is the number of defect points in the kth cluster, x k,f , y k,f , z k,f are the normalized values of the fth defect point in the kth cluster in three-dimensional coordinates, x k,c , y k,c , z k,c are the normalized values of the three-dimensional centroid coordinates of the kth cluster, r k is the normalized value of the maximum distance between defect points in the kth cluster, D k is the normalized value of the assembly spacing of the product components of the kth packaging unit.

[0101] In the spatial clustering submodule, the aforementioned set of three-dimensional coordinates of defects is called, and the three-dimensional Euclidean distances from each point to the remaining points are calculated in turn, and according to the set threshold , clustering merging operations are performed to form multiple clusters, and the clustering process outputs the set of point numbers contained in each cluster. It is assumed that there are m k =5 points in the kth cluster, and their coordinate values are as follows.

[0102] Table 3: Three-dimensional coordinate data table of clustering cluster

[0103] Point number x k,f ]]> [[ y k,f ]]> z k,f ]]> P1 0.48 0.22 0.38 P2 0.52 0.25 0.40 P3 0.50 0.24 0.39 P4 0.49 0.23 0.37 P5 0.51 0.21 0.41

[0104] The mean value of the three-dimensional coordinates of all points in Table 3 is calculated to obtain the centroid coordinates (x k,c , y k,c , z k,c )=(0.5, 0.23, 0.39). Then the sum of the absolute values of the coordinate differences between each point and the centroid is calculated, for example, the difference between point P1 and the centroid is |0.45-0.5|+|0.22-0.23|+|0.38-0.39|=0.02+0.01+0.01=0.04. The sum is then calculated and substituted into the following formula:

[0105] ;

[0106] Let the maximum distance within the cluster be r k =0.07, and the normalized value of the product component assembly spacing be D k =0.10. Substitute the root term , and the sum of the differences of the five points is 0.04+0.04+0.02+0.04+0.04=0.18. Substituting gives:

[0107] ;

[0108] The final operation obtains the aggregation space offset strength of the kth cluster as 0.0873, which is used to measure the degree of the defect point deviating from the center in the three-dimensional space.

[0109] Formula logic description:

[0110] The formula calculates the three-dimensional offset of each point in the cluster relative to the centroid by taking the absolute sum of the coordinate difference, adjusts the amplitude by the square root of the cluster distribution scale, reflects the tightness of the point group, and the denominator represents the cluster structure scale, standardizes the spatial distribution difference between different clusters, so that the result is not dependent on the number of points or the size of the cluster, and the overall structure makes the aggregation index G k can reflect the abnormal dense trend, which is convenient for subsequent risk screening.

[0111] Parameter setting description:

[0112] Where r k The value is derived from the maximum Euclidean distance between any two points in the current cluster. Taking sample points P2 and P5 as an example, the distance is calculated as:

[0113] ;

[0114] The maximum value of multiple combinations is 0.07, which is set as r k , and the assembly spacing D k is a normalized value set in the structure design. According to the minimum design tolerance of 1.5mm, the normalized value is 0.1 under the maximum structure width of 15mm, which is fixed.

[0115] The aggregation screening submodule calculates the numerical difference between the aggregation space offset strength of each cluster and the corresponding structure assembly tolerance reference value according to the spatial aggregation characteristic information, selects the cluster number and the corresponding spatial coordinate range whose aggregation index exceeds the upper limit of the tolerance value interval, establishes the spatial identification index under the corresponding packaging unit, and obtains the list of abnormal areas in the component set;

[0116] In the aggregation screening submodule, the aggregation space offset strength value G k =0.0873 is called, and compared with the structure assembly tolerance reference value corresponding to the packaging unit to which the cluster belongs. The assembly tolerance reference value is set as , which is set according to the maximum allowable offset error of adjacent components on the structure drawing. The normalized range is in the interval [0.05, 0.1], and the median value 0.08 is used as the tolerance reference value. The difference value operation is performed:

[0117] ;

[0118] If the difference is greater than the threshold value 0.005, it is determined that the cluster is an offset anomaly cluster, and the cluster number and the covered three-dimensional space range are marked to form an abnormal space index, and finally an abnormal area list of the component set is constructed. The list will be used for subsequent structure stability evaluation and response control strategy triggering.

[0119] Please refer to Figure 5 , the level mapping module comprises:

[0120] The label extraction submodule obtains the abnormal area list of the component set, extracts the structure level identifier, functional classification label and defect type label corresponding to the associated product component in each abnormal area, classifies and encodes the three types of label data, establishes a unified index mapping table, and obtains a component label code set;

[0121] Obtain the abnormal area list of the component set, retrieve the corresponding product component number in each group of abnormal areas, and then read the structure level identifier, functional classification label and defect type label corresponding to the number from the product structure file. The structure level identifier is distinguished by nesting depth, the functional classification label is assigned according to the process flow function area, and the defect type label is derived from the defect identification result in the previous detection link. Each type of label is uniformly numbered according to the total number of the category. For example, the structure level is mapped to the code value 0 to 5 according to the 0-5 layer, the functional label such as "pressure bearing", "connection" and "transmission" is assigned the code 1, 2 and 3 respectively, and the defect type such as "crack", "wear" and "offset" is assigned the code value 101, 102 and 103. For the convenience of subsequent calculation and processing, a unified index mapping table is established using a three-bit structure, as shown in the following table:

[0122] Table 4 Component label index mapping table

[0123] Product number Structure level code Function tag code Defect tag code A001 3 2 101 A002 4 1 102 A003 2 3 103

[0124] As shown in Table 4, after the codes are unified, each component label can directly participate in weight calculation and subsequent operation to obtain a component label code set.

[0125] The weight calculation submodule assigns a structure level weight to the structure level identifier, a functional criticality weight to the functional classification label, and a defect type risk weight to the defect type label according to the component label code set, using the formula:

[0126] ;

[0127] The operation obtains a defect anomaly evaluation value corresponding to each product component.

[0128] Wherein, L represents the defect anomaly evaluation value, W s is the structure level weight coefficient, W q is the functional criticality weight coefficient, and W t is the defect type risk weight coefficient, and Vs , V q , V t are structure level code value, function classification code value, defect type code value respectively, Z is the structure risk coefficient under the arrangement of component structure, which represents the normalized value of the probability of the structure area where the target component is located being involved or collateral damage;

[0129] According to the component label code set, the structure level, function label and defect type label corresponding to the structure level weight W s , function criticality weight W q , and defect type risk weight W t are respectively assigned to each code, for example, for the structure level, the deeper the nesting, the greater the impact, and the weight range is set to , the function criticality is set according to the function failure probability, the range is , the defect type risk weight is set according to the historical defect evolution damage ratio statistical value, the range is , in addition, the structure risk coefficient Z is introduced according to the evaluation of collateral damage of product structure, and the value range is , and the following exponential modulation formula operation is performed on the basis:

[0130] ;

[0131] In the formula, the first term calculates the difference value fluctuation intensity between the structure label item and the structure risk item, the second term evaluates the function label stable weight, and the third term reflects the influence amplitude of the defect label, and the three are averaged to form the defect anomaly evaluation value, for example, the weight and code of a component are W s =0.7, V s =4, W q =0.8, V q =2, W t =1.1, V t =101, Z=1.2, and the following is obtained:

[0132] ;

[0133] Finally, the defect anomaly evaluation value of the component is 4.51, which can be directly input into the downstream interval judgment module for processing;

[0134] The beneficial effect of the formula is that by introducing the logarithmic modulation term and the absolute value and square root superposition processing, the non-linear difference between the structure influence item and the defect item is dynamically adjusted, and the risk contribution is converted into an evaluation quantity in a unified dimension, which improves the sensitivity and robustness of the overall judgment;

[0135] The interval determination sub-module calls the defect anomaly evaluation value, compares it with each upper limit value in the preset defect level determination interval table one by one, classifies the component numbers falling into the same level interval into a group of level classification indexes, and appends the evaluation value and the interval code to generate a multi-component level classification result;

[0136] The defect anomaly evaluation value is called, and the preset defect level determination interval table is read in order. The interval division refers to a large number of defect damage level experimental statistical results, and the following standard intervals are set: first level [0, 2), second level [2, 4), third level [4, 6), fourth level [6, 8), and fifth level [8, +∞). The defect anomaly evaluation value of each product component is compared with the upper limit value of each interval, and the corresponding level interval is determined. According to the component number, the same level classification index is grouped, and the evaluation value and the determination interval code are combined to form a complete classification item. For example, if the evaluation value of the last component is 4.51, it is located in the third level interval, and it is classified into the third level. Finally, a multi-component level classification result is generated. This result will be used as an input item for the subsequent control strategy linkage module.

[0137] Please refer to Figure 6 , the response linkage module includes:

[0138] The level retrieval sub-module retrieves the packaging unit number and the station control number corresponding to each level based on the multi-component level classification result, groups the number items according to the level level, calls the packaging station registration table to compare the grouping list, filters the stations in the running state, and establishes a station level mapping structure set to obtain station level mapping information;

[0139] Based on the multi-component level classification result, the component number set under each level group is read one by one, the packaging unit number and the assembly station number field corresponding to the component are called according to the product assembly binding relationship, a level comparison mapping list is formed, and the level level field is sorted in ascending order and aggregated. Then, the packaging station registration table is called, the station number field contained in each group is compared, and the records with the field "station running state" as "running" are filtered, and finally a data structure in which each level group and the station number in the running state are one-to-one mapped in the mapping table structure is formed, which is constructed as station level mapping information. The basic fields are shown in the following table:

[0140] Table 5: Example of station registration table structure

[0141] Station number Packaging unit number Current state Station type Last state update time W010 U001 Running Main assembly 2025-07-1610:12 W011 U002 Idle Attached assembly 2025-07-1609:45 W012 U001 Running Detection station 2025-07-1610:08

[0142] As shown in Table 5, only the station number with the state field value as "running" is filtered and matched to the level mapping set to realize cross-retrieval of level grouping and station state;

[0143] The policy matching submodule calls the station level mapping information, matches the response control policy mapping table according to the level code of each group of level mapping items, extracts the action item tag and execution condition threshold value hung under the corresponding level code in the control table, judges the value interval of each station level code and action execution condition, filters the station number set that meets the trigger condition, and obtains the trigger station action index set;

[0144] The station level mapping information is called, a mapping relationship is established between each group of level code field values and the level code field in the control policy mapping table, the "action tag" field and the "execution condition threshold value" field in the table are read item by item in groups. The value interval of the current station level code is judged, and the condition is set as follows: if the station level code is within the activation threshold interval of the specified action item in the policy table, it is determined to be triggered, the corresponding station number is filtered, and the trigger station action index set is constructed. If levels 3 to 5 in the policy mapping table are set as the path switching trigger interval, levels 2 to 4 are set as the task suspension interval, and levels 5 and above are set as the stop trigger interval, then the station number W010 of the station level code 3 meets the first two conditions, and is added to the corresponding trigger station action index list. To enhance the rationality of the conditions, the "execution condition threshold value" is set as follows:

[0145] Level stop trigger threshold: level >= 5;

[0146] Level task suspension trigger threshold: level [2, 4];

[0147] Level path switching trigger threshold: level [3, 5];

[0148] The setting logic is based on the experience statistical interval of the response frequency of the control policy influence level, and takes the median value in the component defect influence weight interval as the reference;

[0149] The instruction generation submodule classifies and indexes each station number corresponding to the action item according to the trigger station action index set, encapsulates the corresponding stop instruction, task suspension instruction and path switching instruction as a structured control field, assembles the instruction set structure through the control field, and establishes the defect level linkage control instruction set;

[0150] According to the trigger station action index set, the action item corresponding to each station number is grouped and classified according to the trigger type, an independent control field code value is assigned to each type of action, the set stop instruction field value is "C01", the task suspension is "C02", and the path switching is "C03". A structured data table containing the station number, action label field and control code field is constructed in the order of the fields, and each record in the table is converted into a binary control instruction format. For example, the station number W010 triggers "task suspension", and the control field "W010-C02" is generated. Finally, all control fields are combined to generate a defect level linkage control instruction set, and the instruction set contains the field format:

[0151] Station number (6 bits) + control field (3 bits) + check bit (1 bit);

[0152] The total field length is fixed at 10 bits of binary structure, ensuring the consistency of the control execution synchronization structure;

[0153] At this point, the response link between the level identification and the structure control execution is established, and the action trigger is realized by encapsulating the control instruction at the end.

[0154] The above is only a preferred embodiment of the present application, and does not limit the present application in other forms. Any skilled person in the art can modify or change the above disclosed technical content to equivalent embodiments applied to other fields, but any simple modification, equivalent change and modification made according to the technical essence of the present application to the above embodiments without departing from the technical solution content of the present application still belongs to the protection scope of the present application.

Claims

1. A defect detection system for inner packaging, characterized in that, The system includes: The illumination control module acquires real-time status information of each product component in the packaging container, calculates the product of the surface reflectivity value and the angle change value, compares the product result with the occlusion photosensitive threshold, and triggers multiple supplementary lighting devices with different numbers in the light source matrix to obtain a multi-angle supplementary lighting sequence. The boundary recognition module calls the multi-angle supplementary lighting sequence, calculates the Euclidean distance vector between the geometric center reference points set in the packaging structure within the boundary point, and classifies the vector set according to the direction difference and distance variability to identify whether it constitutes a closed image shape and obtain boundary offset distribution information; Based on the boundary offset distribution information, the defect clustering module obtains the Euclidean distance between the centroid and the geometric center point of the product component set in the packaging structure, filters clusters whose clustering index exceeds the interval threshold, and obtains a list of concentrated abnormal areas of the component. The grade mapping module calls the list of abnormal areas in the component set, extracts the structural hierarchy identifier, functional classification label, and defect type label of the associated product components in each abnormal area, calculates the defect anomaly assessment value, and generates multi-component grade classification results by combining the preset defect grade judgment interval table.

2. The inner packaging defect detection system according to claim 1, characterized in that, The multi-angle supplementary lighting sequence includes excitation angle combination, lighting intensity setting and trigger timing scheme. The boundary offset distribution information specifically includes edge centripetal difference layer, boundary direction variation layer and offset stability judgment label. The component concentrated abnormal area list includes cluster number index, spatial centroid position and cluster intensity identifier. The multi-component level classification result specifically refers to component level mark, level mapping number and risk coefficient weight value.

3. The inner packaging defect detection system according to claim 2, characterized in that, The illumination control module includes: The coordinate acquisition submodule acquires real-time status information of each product component in the packaging container. The real-time status information includes spatial coordinates, component surface reflectivity, minimum gap distance between components, and change value of the angle of light source direction. The change value of the angle of light source direction is matched with the surface reflectivity of the component item by item to construct the reflection angle response matrix of each product component and generate the angle response matrix dataset. The occlusion determination submodule, based on the angle response matrix dataset, calls the product of the reflection value and the included angle value of each product component, calculates the difference with the occlusion photosensitive threshold, aggregates the difference according to the spatial number of the product component and calculates the mean, and selects the data sequence number that continuously exceeds the upper limit of the occlusion determination interval as the occlusion mark number set, calculates the occlusion offset intensity corresponding to the product component, calls the component number set whose offset intensity value exceeds the offset threshold, and obtains the occlusion trigger number list. The supplementary lighting excitation submodule locates the spatial area of ​​the product component corresponding to each occlusion trigger number in the packaging container according to the occlusion trigger number list, calls the supplementary lighting device bound to the area number in the light source matrix, sets differentiated light source excitation angle parameters and timing excitation interval values, and combines the multi-angle light source parameters to perform lighting excitation to obtain a multi-angle supplementary lighting sequence.

4. The inner packaging defect detection system according to claim 3, characterized in that, The boundary recognition module includes: The reconstruction imaging submodule calls the multi-angle supplementary lighting sequence to perform beam-splitting sequence imaging on each product component in the inner packaging structure. The imaging results are arranged according to the excitation order of the light source to construct an imaging atlas. The stability of the overlapping area is judged according to the pixel intensity distribution in the atlas, and the information of the stable range of imaging brightness is obtained. The pixel extraction submodule filters the edge regions in each frame of the image whose brightness distribution satisfies the stable range based on the imaging brightness stability range information, extracts the set of two-dimensional coordinate values ​​of each pixel in the edge region, calculates the Euclidean distance between the boundary point and the geometric center reference point in the inner packaging structure, and obtains the boundary center offset vector set. The contour classification submodule calls the boundary center offset vector set, merges and groups the direction angle and length of each vector, calculates the standard deviation of the angle difference and the length variance between vectors in each group, determines whether the contour of the product component constitutes a closed structure based on the distribution trend of the group, and outputs the degree of contour variation to obtain boundary offset distribution information.

5. The inner packaging defect detection system according to claim 4, characterized in that, The defect aggregation module includes: Based on the boundary offset distribution information, the coordinate collection submodule classifies the defect boundary coordinate points of each product component according to the packaging unit number, extracts the three-dimensional spatial position values ​​of each defect point set after classification, and constructs the coordinates into a unified format dataset to obtain the defect three-dimensional coordinate set. The spatial clustering submodule calls the set of three-dimensional coordinates of the defects, calculates the Euclidean distance between each defect point and the other points, clusters and merges the distance data, extracts the nearest neighbor distance and the number of points in each cluster, and uses the mean coordinates of the points in the cluster as the centroid of the cluster. It performs difference calculation on the Euclidean distance between the center point of the cluster and the geometric center point of the product component in the packaging structure, calculates the spatial offset intensity of each cluster, and performs numbering, labeling and aggregation filtering on the offset intensity of each cluster to obtain spatial clustering feature information. The clustering and filtering submodule calculates the numerical difference between the spatial offset intensity of each cluster and the corresponding structural assembly tolerance benchmark value based on the spatial clustering feature information. It filters the cluster numbers and corresponding spatial coordinate ranges of clustering indices that exceed the upper limit of the tolerance range, establishes a spatial identifier index under the corresponding packaging unit, and obtains a list of component clustering abnormal areas.

6. The inner packaging defect detection system according to claim 5, characterized in that, The level mapping module includes: The tag extraction submodule obtains the list of abnormal areas in the component set, extracts the structural hierarchy identifier, functional classification tag and defect type tag corresponding to the product component in each abnormal area, performs classification and coding processing on the three types of tag data, establishes a unified index mapping table, and obtains the component tag code set. The weight calculation submodule assigns structural level weights to structural level identifiers, functional criticality weights to functional classification labels, and defect type risk weights to defect type labels based on the component label coding set, and calculates and obtains the defect anomaly assessment value corresponding to each product component. The interval determination submodule calls the defect anomaly evaluation value and compares it one by one with the upper limit value of each interval in the preset defect level determination interval table. The component numbers that fall into the same level interval are grouped into a set of level classification indexes, and the evaluation value and interval code are attached to generate multi-component level classification results.

7. The inner packaging defect detection system according to claim 6, characterized in that, The system also includes: Based on the multi-component level classification results, the response linkage module identifies the action items defined in the response control strategy mapping table to which the current level belongs. When the level identifier is in the high-risk level range, it performs operations such as stopping the workstation status, suspending the task scheduling unit, and switching the material packaging path, thereby generating a defect level linkage control instruction set. The defect level linkage control instruction set specifically includes stop instruction codes, review suspension signals, and workstation switching command codes.

8. The inner packaging defect detection system according to claim 7, characterized in that, The response linkage module includes: The grade retrieval submodule retrieves the packaging unit number and workstation control number corresponding to each grade based on the multi-component grade classification results. It then groups the number items according to the grade level, calls the packaging workstation registration table to compare with the group list, filters the workstations that are in operation, and establishes a workstation grade mapping structure set to obtain workstation grade mapping information. The strategy matching submodule calls the workstation level mapping information, matches the response control strategy mapping table according to the level code of each group of level mapping items, extracts the action item label and execution condition threshold attached to the corresponding level code in the control table, judges the value range of each current workstation level code and action execution condition, filters the set of workstation numbers that meet the triggering conditions, and obtains the triggering workstation action index set. The instruction generation submodule classifies and indexes the action items corresponding to each workstation number according to the trigger workstation action index set, encapsulates the corresponding stop instruction, task suspension instruction and path switching instruction into structured control fields, assembles the instruction set structure through the control fields, and establishes a defect level linkage control instruction set.

Citation Information

Patent Citations

  • Surface defect detection method based on fine-grained prototype online learning

    CN117576434A

  • Industrial equipment anomaly detection method and system based on machine vision

    CN120339254A

  • Visual large model PCB defect detection system based on YOLOv10 deep learning network

    CN120510342A

  • Paper product packaging defect real-time detection system based on edge calculation

    CN120689285A

  • Steel coil end edge damage detection method based on machine vision

    CN120726391A

Cited By

  • Industrial flat plate shell production control method

    CN121767310A

  • Traffic monitoring video anomaly detection method and system based on line feature matching

    CN122244813A

  • Line feature matching-based traffic monitoring video anomaly detection method and system

    CN122244813B