An intelligent detection method and system for drug packaging defects

The method and system enhance drug packaging defect detection by integrating multi-source data and knowledge graphs to build intelligent models, addressing the limitations of existing technologies in recognizing complex defects, thereby improving accuracy and efficiency.

CN119251182BActive Publication Date: 2025-07-15JIANGXI GUANGXIN PHARM CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411341090.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-07-15
Estimated Expiration
2044-09-25

AI Technical Summary

Technical Problem

In the prior art, drug packaging defect detection has limited ability to identify complex packaging, resulting in poor detection accuracy.

Method used

Through multi-view data acquisition and reconstruction of three-dimensional data, combined with industrial big data retrieval and defect knowledge graph, multi-layer Gaussian scale space and three-dimensional grid division are built, intelligent detection models are generated, concurrent processing and position coupling integration are carried out, and defect locations are accurately positioned.

Benefits of technology

It improves the efficiency and accuracy of drug packaging defect detection and enhances the processing and analysis capabilities of complex data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119251182B_ABST
    Figure CN119251182B_ABST
Patent Text Reader

Abstract

The present application provides an intelligent detection method and system for drug packaging defects, relating to the field of intelligent detection technology, including: determining multi-source detection data and performing multi-perspective homologous mapping fitting, performing defect information retrieval and confidence verification, determining a defect knowledge graph, constructing a multi-layer Gaussian scale space, performing data-driven modeling, generating an intelligent detection model, performing three-dimensional grid division, determining grid relative coordinates, performing detection branch matching and concurrent processing in the intelligent detection model, determining multiple groups of detection data for position coupling integration, and determining defect detection results. Through the present application, the technical problem in the prior art that the detection accuracy is poor due to the limited ability of defect detection to recognize complex packaging can be solved. By obtaining data from multiple perspectives, accurately positioning the defect location, and enhancing the processing and analysis capabilities of a large amount of complex data, the technical effects of improving the efficiency and accuracy of drug packaging defect detection are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent detection technologies, and particularly to an intelligent detection method and system for drug packaging defects. Background Art

[0002] With the rapid development of the pharmaceutical industry, the quality control of drug packaging has become an important link in ensuring the safety and effectiveness of drugs. The detection of drug packaging defects is a key step in ensuring packaging quality. Traditional drug packaging defect detection mainly relies on manual visual inspection. This method is inefficient and is easily affected by human factors such as fatigue and subjective judgment, resulting in relatively high rates of missed detection and misdetection. In addition, the manual detection method is difficult to meet the requirements of large-scale production, restricting the improvement of production efficiency.

[0003] To improve the detection efficiency and accuracy, some automated detection technologies such as machine vision systems have been introduced into drug packaging defect detection. However, existing automated detection technologies have limitations in dealing with complex packaging defects. For example, when the defect features are not obvious, the packaging surface texture is complex, or there are problems such as uneven illumination, the recognition ability of the system is restricted. In addition, traditional machine vision systems can often only process two-dimensional images and are difficult to accurately capture and identify defects in three-dimensional structures.

[0004] In summary, there is a technical problem in the prior art that due to the limited recognition ability of complex packaging for defect detection, the detection accuracy is poor. Summary of the Invention

[0005] The purpose of the present application is to provide an intelligent detection method and system for drug packaging defects to solve the technical problem in the prior art that due to the limited recognition ability of complex packaging for defect detection, the detection accuracy is poor.

[0006] In view of the above problems, the present application provides an intelligent detection method and system for drug packaging defects.

[0007] In a first aspect, the present application provides an intelligent detection method for drug packaging defects. The intelligent detection method for drug packaging defects is implemented through an intelligent detection system for drug packaging defects. Among them, the intelligent detection method for drug packaging defects includes: jointly collecting data from source devices for the target drug packaging, determining multi-source detection data and performing multi-perspective homologous mapping fitting to determine reconstructed three-dimensional data; performing industrial big data retrieval, determining the defect types of the drug packaging and performing defect information retrieval and confidence verification, and executing information system reconstruction to determine a defect knowledge graph, where the defect knowledge graph corresponds one-to-one with the defect type; based on the defect recognition requirements, constructing a multi-layer Gaussian scale space, traversing the scale layer matching the defect type, combining the defect knowledge graph and performing data-driven modeling to generate an intelligent detection model, where the intelligent detection model includes parallel detection branches mapped to the defect type; for the target drug packaging, performing three-dimensional grid division based on the distribution difference of the defect type, executing spatial distribution conversion to determine the grid relative coordinates; based on the grid relative coordinates, marking the reconstructed three-dimensional data, transmitting it to the intelligent detection model for detection branch matching and concurrent processing, determining multiple groups of detection data; traversing the multiple groups of detection data and performing position coupling integration to determine the defect detection result of the target drug packaging.

[0008] Second aspect, the present application also provides an intelligent detection system for drug packaging defects, which is used to execute an intelligent detection method for drug packaging defects as described in the first aspect. Among them, the intelligent detection system for drug packaging defects includes: a source device joint acquisition module, which is used to perform joint acquisition of source devices on the target drug packaging, determine multi-source detection data and perform multi-perspective homologous mapping fitting to determine reconstructed three-dimensional data; a defect information verification module, which is used to perform industrial big data retrieval, determine the defect type of the drug packaging and perform defect information retrieval and confidence verification, and execute information system reconstruction to determine a defect knowledge graph, where the defect knowledge graph corresponds one-to-one with the defect type; an intelligent detection model construction module, which is used to construct a multi-layer Gaussian scale space based on defect recognition requirements, traverse the scale layer matching the defect type, combine the defect knowledge graph and perform data-driven modeling to generate an intelligent detection model, where the intelligent detection model includes parallel detection branches mapped to the defect type; a three-dimensional grid division module, which is used to perform three-dimensional grid division on the target drug packaging based on the distribution difference of the defect type, and execute spatial distribution conversion to determine the grid relative coordinates; a detection branch matching module, which is used to mark the reconstructed three-dimensional data based on the grid relative coordinates, transmit it to the intelligent detection model for detection branch matching and concurrent processing, and determine multiple groups of detection data; a position coupling integration module, which is used to traverse the multiple groups of detection data and perform position coupling integration to determine the defect detection result of the target drug packaging.

[0009] One or more technical solutions provided in the present application have at least the following technical effects or advantages:

[0010] Through the joint acquisition of source devices for the target drug packaging, multi-source detection data is determined and multi-perspective homologous mapping fitting is carried out to determine the reconstructed three-dimensional data; industrial big data retrieval is performed to determine the defect types of the drug packaging and defect information retrieval and confidence verification are carried out, and information system reconstruction is executed to determine the defect knowledge graph, where the defect knowledge graph corresponds one-to-one with the defect types; based on the defect recognition requirements, a multi-layer Gaussian scale space is constructed, the scale layer matching the defect types is traversed, and data-driven modeling is carried out in combination with the defect knowledge graph to generate an intelligent detection model, where the intelligent detection model includes parallel detection branches mapped to the defect types; for the target drug packaging, three-dimensional grid division is carried out based on the distribution difference of the defect types, and spatial distribution conversion is executed to determine the grid relative coordinates; based on the grid relative coordinates, the reconstructed three-dimensional data is marked and transmitted to the intelligent detection model for detection branch matching and concurrent processing to determine multiple groups of detection data; the multiple groups of detection data are traversed and position coupling integration is carried out to determine the defect detection result of the target drug packaging. That is to say, by obtaining data from multiple perspectives, accurately positioning the defect location, and enhancing the processing and analysis capabilities of a large amount of complex data, the technical effects of improving the efficiency and accuracy of drug packaging defect detection are achieved.

[0011] The above description is only an overview of the technical solution of this application. In order to be able to understand the technical means of this application more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features and advantages of this application more obvious and understandable, the following specifically illustrates the specific embodiments of this application. It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of this application, nor is it used to limit the scope of this application. Other features of this application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the technical solutions in this application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings described below are only exemplary, and for those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.

[0013] Figure 1 It is a schematic flow chart of an intelligent detection method for drug packaging defects in this application;

[0014] Figure 2 It is a schematic structural diagram of an intelligent detection system for drug packaging defects in this application.

[0015] Description of the drawing reference numerals: Source device combined acquisition module 11, defect information verification module 12, intelligent detection model construction module 13, three-dimensional grid division module 14, detection branch matching module 15, position coupling integration module 16. Detailed implementation manners

[0016] By providing an intelligent detection method and system for drug packaging defects, the present application solves the technical problem in the prior art that due to the limited ability of defect detection to recognize complex packaging, the detection accuracy is poor. By obtaining data from multiple perspectives, accurately positioning the defect location, and enhancing the processing and analysis capabilities of a large amount of complex data, the technical effects of improving the efficiency and accuracy of drug packaging defect detection are achieved.

[0017] Next, the technical solutions in the present application will be described clearly and completely with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. It should be understood that the present application is not limited by the exemplary embodiments described herein. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts fall within the scope of protection of the present application. Additionally, it should be noted that for the sake of description, only the parts related to the present application are shown in the accompanying drawings rather than all of them.

[0018] Embodiment 1. Please refer to the attached Figure 1 , the present application provides an intelligent detection method for drug packaging defects. Among them, the intelligent detection method for drug packaging defects is applied to an intelligent detection system for drug packaging defects. The intelligent detection method for drug packaging defects specifically includes the following steps:

[0019] Step 1: Perform combined acquisition of source devices on the target drug packaging, determine multi-source detection data, and perform multi-perspective homologous mapping fitting to determine the reconstructed three-dimensional data.

[0020] Specifically, for the packaging of the target drug, multiple source devices (such as different types of sensors, cameras, or other detection devices) are used for data collection. The packaging is observed from different angles and distances to obtain comprehensive detection data. For example, two cameras with different angles and an infrared sensor are used to detect the drug packaging to obtain information about the packaging appearance, structure, and temperature. The data from different sources are time-synchronized to ensure data consistency. Data fusion techniques, such as multi-sensor data fusion algorithms, are used to integrate the data from different sources into a unified dataset. The collected data is preprocessed, such as denoising, calibration, and standardization, to improve data quality. The data collected from different perspectives is mapped to the same spatial position, and mathematical models or algorithms (such as the least squares method, neural networks, etc.) are used to fit the multi-source data to reduce the errors caused by perspective differences and data heterogeneity. The three-dimensional model of the target drug packaging is constructed using the fitted data. The use of multi-angle and multi-source data can capture the details of the packaging more comprehensively and reduce the detection blind spots. Through multi-source data collection and multi-perspective mapping, the three-dimensional data of the drug packaging can be reconstructed more accurately, providing a detailed information basis for subsequent defect detection.

[0021] Step 2: Conduct industrial big data retrieval, determine the defect types of the drug packaging, retrieve and confidence-check the defect information, and execute information system reconstruction to determine the defect knowledge graph, where the defect knowledge graph corresponds one-to-one with the defect types.

[0022] Specifically, collect a large amount of drug packaging data from the production line, including normal products and defective products. Access and analyze a large amount of industrial data to obtain relevant information about drug packaging defects, including historical defect data, production process data, quality inspection data, etc. Clean, format, and standardize the data to ensure data quality. Extract key features from the preprocessed data, such as the color, shape, size, texture, etc. of the packaging, and use machine learning algorithms (such as random forest, support vector machine, deep learning, etc.) to analyze the features and identify different defect types, such as surface scratches, breakages, deformations, air leaks, etc. Further retrieve detailed information about these defects, construct query conditions based on the determined defect types, and search for information related to the defect types, such as historical defect records, cause analysis, solutions, etc. Conduct a confidence assessment on the retrieved defect information. Confidence verification refers to verifying the accuracy and reliability of the retrieved information, and using statistical methods, data mining techniques, or other analysis methods to evaluate the confidence of the retrieved information. Based on the retrieved defect information, construct a structured knowledge graph, where each defect type corresponds to a node, and the connections between the nodes represent the relationships between them. Ensure that each defect type has corresponding entities and relationships in the knowledge graph. Through big data retrieval and the construction of the knowledge graph, accurate identification and classification of drug packaging defects can be achieved, improving the accuracy and efficiency of detection.

[0023] Step 3: Based on the defect identification requirements, construct a multi-layer Gaussian scale space, traverse the scale layers matching the defect types, combine the defect knowledge graph, and perform data-driven modeling to generate an intelligent detection model, where the intelligent detection model includes parallel detection branches mapped to the defect types.

[0024] Specifically, according to the identification requirements of different defect types, determine the data features and information required for each defect type, and then construct a multi-layer Gaussian scale space. In this space, the data features of each layer are more abstract than those of the previous layer, containing less information but still retaining the key features related to defect detection. Traverse the defect types and find the scale layer corresponding to each defect type in the constructed multi-layer Gaussian scale space. Combine the defect knowledge graph with the multi-layer Gaussian scale space, and use the data features in the multi-layer Gaussian scale space and the information in the defect knowledge graph for data-driven modeling. Use sample data containing defect labels to train the detection model so that it can accurately identify and classify the defects on the drug packaging. The model includes parallel detection branches mapped to the defect types, that is, the model can simultaneously handle the detection tasks of multiple defect types. The construction of the multi-layer Gaussian scale space and data-driven modeling improve the identification ability of the intelligent detection model for various defect types, enabling it to more accurately detect different types of packaging defects.

[0025] Step 4: For the target drug packaging, perform three-dimensional grid division based on the distribution differentiation of defect types, and execute spatial distribution conversion to determine the relative coordinates of the grids.

[0026] Specifically, analyze the distribution of different defect types in the target drug packaging. The distribution density and distribution pattern of different defect types in space may vary. According to the distribution of different defect types on the drug packaging, divide the packaging into multiple three-dimensional grids. Each grid corresponds to a specific area on the drug packaging and may contain multiple defect types. Convert the three-dimensional space of the target drug packaging into a grid system composed of grids. Each grid represents a small spatial unit for storing data and information related to that unit. Determine the relative position and orientation of each grid on the drug packaging, map the grids to the three-dimensional coordinate system of the drug packaging, and locate and identify the defect positions in the target drug packaging. The three-dimensional grid division and spatial distribution conversion help to accurately locate the defect positions on the packaging and provide accurate positioning information for subsequent detection.

[0027] Step 5: Based on the relative coordinates of the grids, label the reconstructed three-dimensional data, transmit it to the intelligent detection model for detection branch matching and concurrent processing, and determine multiple sets of detection data.

[0028] Specifically, according to the determined relative coordinates of the grids, label the reconstructed three-dimensional data. Each label represents a specific grid position and contains data and information related to that position. The intelligent detection model is a system containing multiple detection branches, and each branch is specifically responsible for detecting one or more defect types. Transmit the labeled three-dimensional data to the intelligent detection model. According to the data characteristics, defect types, and relative coordinates of the grids, automatically match the corresponding detection branches. The intelligent detection model can simultaneously process the tasks of multiple detection branches, can detect multiple defect types simultaneously, and improves the detection efficiency. Process the transmitted three-dimensional data and generate multiple sets of detection results, including information such as the defect types and positions detected in each grid. Through concurrent processing and the integration of multiple sets of detection data, the intelligent detection model can efficiently identify and process multiple defects, improving the speed and accuracy of detection.

[0029] Step 6: Traverse the multiple sets of detection data and perform position coupling integration to determine the defect detection result of the target drug packaging.

[0030] Specifically, each set of detection data contains the detection results for a specific defect type. Traverse each set of detection data obtained from the intelligent detection model. By comparing the defect positions and types in different detection results, find the most likely defect type and position at each location, and integrate the defect information about the same location in different detection results. Correspond the position information in each set of detection data with the three-dimensional spatial position of the target drug package, merge, screen, or adjust the defect information in each set of detection data to obtain a more accurate and comprehensive defect detection result. Based on the position coupling integration result, generate a complete detection report on all defects on the drug package, including information such as the position, type, and possible causes of each defect. Based on the final defect detection result, provide decision support to determine whether further processing or repair of the target drug package is required. By integrating multiple sets of detection data, a more comprehensive and accurate defect detection result can be obtained, thereby improving the quality control level of drug packages.

[0031] Further, step one of this application includes:

[0032] Traverse the multi-source detection data, map the multi-source detection data based on the same spatial position, and determine multiple mapped data sequences. Among them, there are data heterogeneity and perspective differences in each mapped data sequence; identify the first mapped data sequence, perform heterogeneous feature fusion and multi-perspective splicing, and determine the three-dimensional reconstruction result of the first spatial position; traverse the multiple mapped data sequences, determine multiple three-dimensional reconstruction results, and splice them based on the relative spatial position to determine the reconstructed three-dimensional data.

[0033] Specifically, analyze each piece of detection data collected from different devices or sensors one by one. Each data source provides information about the drug package obtained from different perspectives or using different technologies. Correlate the data in different data sources according to their positions in space, and match the images, signals, or other types of data collected by different devices for the same part of the drug package. Based on the mapping, determine multiple mapped data sequences, and each sequence represents the performance of a spatial position in different data sources. These sequences have data heterogeneity and perspective differences, that is, differences in data types and observation angles. Identify the first sequence from the multiple mapped data sequences, and this sequence contains multi-source data about a specific spatial position of the drug package.

[0034] Heterogeneous feature fusion refers to integrating the features in different types of data (such as images, signals, etc.), and using specific algorithms and technologies to process and fuse this data in order to better describe and identify the defects of drug packaging. Multi-view stitching refers to combining data from different perspectives to create a more comprehensive three-dimensional view. After completing heterogeneous feature fusion and multi-view stitching, the three-dimensional reconstruction result of the first spatial position can be determined, that is, a three-dimensional model of a specific part of the drug packaging is created, and this model integrates the detection data from multiple source devices. For example, the images collected by two cameras at different angles are stitched together to obtain a more comprehensive three-dimensional view. These data are used to determine the three-dimensional reconstruction result of the first spatial position, that is, to create a three-dimensional model of a specific part of the drug packaging.

[0035] Analyze each of the previously determined multiple mapping data sequences one by one. Each data sequence represents the information of different spatial positions on the drug packaging. For each mapping data sequence, perform heterogeneous feature fusion and multi-view stitching, determine its corresponding three-dimensional reconstruction result, and display the three-dimensional morphology of different parts on the drug packaging. Stitch according to the relative spatial positions of the three-dimensional reconstruction results on the drug packaging, and use spatial positioning and matching technologies to accurately combine these three-dimensional models into a whole to form a finally determined reconstructed three-dimensional data. The reconstructed three-dimensional data is a comprehensive three-dimensional representation of the entire drug packaging, containing all the key features and structural information of the packaging. Through multi-source data, overcoming the limitations of a single data source or perspective, three-dimensional reconstruction can more intuitively observe and analyze the defects of drug packaging, thereby improving the accuracy of detection.

[0036] Furthermore, step two of this application includes:

[0037] Define the entity features of the atlas layer and determine the atlas architecture; based on the defect type, perform clustering processing on the defect information to determine multiple groups of defect information; identify a group of defect information and perform entity feature and entity relationship extraction, and deploy the extracted information based on the atlas architecture to determine the first defect knowledge graph.

[0038] Specifically, clarify the characteristics of entities (such as nodes) at each level in the knowledge graph, including the type, attributes, relationships, etc. of the entities. In the knowledge graph of drug packaging defects, the entities include drug packaging, defect types, causes, consequences, solutions, etc., and each entity has its specific attributes and relationships with other entities. For example, defect types include characteristics such as size, shape, occurrence frequency, etc. Define the relationships and structures between various entities in the graph. The graph architecture includes the connection methods between entities, the hierarchical structure of entities, the types of relationships between entities, etc. In the knowledge graph of drug packaging defects, define the association relationship between drug packaging and defect types, as well as the relationships between defect types and causes, consequences. The hierarchical structure of entities can also be defined. For example, drug packaging can be used as the top-level entity, defect types as secondary entities, and causes and consequences as lower-level entities.

[0039] According to the defect types, group the defect information with similar characteristics. Clustering is an unsupervised learning method, such as K-means, hierarchical clustering, DBSCAN, etc. It groups similar defect information together to identify different defect patterns or categories. Identify a group of defect information from multiple groups of defect information for in-depth analysis, and identify the entities and their characteristics and relationships therein. The entities can be drug packaging, defect types, defect locations, defect sizes, etc. The relationship describes the association between entities. For example, a certain defect is caused by a specific equipment failure. Organize the extracted entity characteristics and entity relationships according to the graph architecture to form the basic structure of the knowledge graph. Use knowledge graph construction tools (such as Neo4j, Apache Jena, etc.) to import the entities and relationships into the knowledge graph database. After completing the deployment of the extracted information, a knowledge graph about drug packaging defects is obtained, which shows the defects on the drug packaging and their characteristics and relationships, helping to better understand and analyze the defects on the drug packaging. For example, for "packaging damage", extract features such as "damage area" and "damage location", and determine that it is caused by "machine wear". Create an entity of "packaging damage" in the knowledge graph, associate "machine wear" as the cause, and record the corresponding solution. Through the extraction of entities and relationships, the causes and impacts of defects can be understood more deeply.

[0040] Further, step three of this application includes:

[0041] Traverse the defect types to determine the defect recognition requirements, and the defect recognition requirements include multiple data scales; construct the initial scale layer; based on the Gaussian filter, guided by the defect recognition requirements, perform multi-level preprocessing on the initial scale layer, and integrate to determine the multi-layer Gaussian scale space.

[0042] Specifically, different defect types are identified and classified, and the characteristics and manifestations of each defect are understood. The characteristics of each defect type are analyzed to determine the image scale in its optimal extraction state. The optimal extraction state image scales for different defect types are different. For example, for some features with lower fineness, such as slight scratches, the clarity of the image is reduced through filtering and smoothing processing, making it easier to extract in a blurred state. This is because the more detailed the image information, certain refined features may affect the recognition accuracy. In the drug packaging image, an initial scale layer is established to represent the initial features of the image. Based on the extraction requirements, i.e., the type, the initial scale layer is adjusted at multiple levels to adapt to the optimal extraction state of different defect types. Based on the in-depth analysis of the characteristics and manifestations of different defect types, as well as the image scale required in the optimal extraction state. For example, if a certain defect type is more easily recognized when the image is blurred, then when adjusting the scale layer, a processing method that blurs the image is selected. On the contrary, if a certain defect type is more easily recognized when the image is clear, then when adjusting the scale layer, a processing method that makes the image clearer is selected. Based on the extraction requirements, i.e., the defect type, targeted matching analysis is performed, and downsampling operations are carried out to reduce the complexity of the data. Downsampling can be achieved by removing certain parts of the data, such as sampling and extracting line by line, which can reduce the amount of data while retaining the key information related to the defect type. The image scale layers that have undergone multi-level preprocessing are integrated to form a multi-layer Gaussian scale space, and each scale layer corresponds to different image clarity and feature details. In the multi-layer Gaussian scale space, features can be extracted from different levels, and features at different levels can capture defect features at different scales. Through this multi-layer Gaussian scale space, comprehensive and multi-angle detection of drug packaging defects is achieved.

[0043] Furthermore, the present application also includes the following steps:

[0044] Identify the first data scale, determine the first filtering method and the first downsampling method, perform filtering processing on the initial scale layer and execute downsampling to determine the first scale layer; traverse the multi-data scales, perform iterative parameter configuration on the initial scale layer to determine the Nth scale layer; hierarchically integrate the first scale layer to the Nth scale layer to generate the multi-layer Gaussian scale space.

[0045] Specifically, according to the requirements of defect identification, the first data processing level is determined, which is an abstract level representing the coarsest or most basic representation of data. At the first data scale, a data processing method is selected to simplify the data, reduce noise or irrelevant information. Filtering processing refers to removing noise, blur or other unwanted features through a certain mathematical operation. At the same time, a "downsampling" method is determined to perform dimensionality reduction, screening or extraction of data to reduce the complexity of the data. Downsampling can be achieved by removing certain parts of the data, such as sampling and extracting every other line, reducing the amount of data while retaining the key information related to the defect type.

[0046] Apply the first filtering method and the first downsampling method to the initial data scale layer to obtain the processed first scale layer. Select multiple different feature layers to cover the detection requirements of different features and details. At each new data scale, according to the detection requirements, adjust the parameters of filtering and downsampling to better adapt to the features and requirements of this scale. This is carried out in an iterative manner, that is, in each iteration, adjust the parameters according to the results of the previous iteration until a satisfactory detection effect is achieved. Through iterative parameter configuration, find the optimal parameter settings for each feature layer. After traversing multiple feature layers and completing the iterative parameter configuration, determine the Nth scale layer, that is, the feature layer that achieves the best detection effect under the current detection requirements.

[0047] Integrate the first scale layer to the Nth scale layer determined through iterative parameter configuration in an orderly manner to form a hierarchical feature space, and each scale layer corresponds to different feature and detail levels of the drug packaging image. Generate a multi-layer Gaussian scale space, and the feature layers of different scales reflect different hierarchical features of the drug packaging image, such as edges, textures, shapes, etc. According to the requirements of defect identification, perform multi-level processing and analysis of the data to adapt to the feature extraction requirements of different levels. Detect defects such as scratches, damages, and deformations on the surface of the medicine bottle quickly and accurately through filtering processing and performing downsampling for dimensionality reduction, so as to ensure the quality of drug packaging.

[0048] Furthermore, the present application further includes the following steps:

[0049] Based on the multi-layer Gaussian scale space, match the target scale layer based on the first defect type; determine a set of defect information of the first defect type, and integrate and determine the sample data, including data samples and detected defect samples; based on the first defect knowledge graph and the sample data, perform supervised training on the target scale layer until convergence, and determine the first detection branch.

[0050] Specifically, according to the type of defect to be detected, a suitable scale layer is selected. This scale layer should be able to effectively detect and identify the first type of defect. In the constructed multi-layer Gaussian scale space, the scale layer corresponding to the target scale layer is found. Through this matching, the effective detection of the first type of defect is achieved. A set of defect information is extracted from the first type of defect, including the size, shape, location, etc. of the defect. The defect information of the identified first type of defect is combined with the original data sample to form a set containing the data sample and the detected defect sample. According to the first defect knowledge graph, the target scale layer is supervised and trained using the sample data so that it can accurately identify and classify the first type of defect on the drug package. When the training reaches the convergence state, that is, when the performance of the detection system on the training data is stable, the first detection branch can be determined, and this detection branch will be used for defect detection in actual applications. The supervised training method based on the multi-layer Gaussian scale space and sample data can detect and identify the first type of defect more accurately and efficiently, which helps to improve the accuracy of detection.

[0051] Furthermore, the present application further includes the following steps:

[0052] Traverse the types of defects, and perform the first weight distribution based on the defect influence coefficient and the defect recognition difficulty for each type of defect, and the second weight distribution for the defect feature matrix within each type of defect; based on the first weight distribution, perform computing power network allocation for the parallel detection branches, where the allocated computing power is positively correlated with the weight; based on the second weight distribution, perform self-attention level identification for the defect knowledge graph, where the self-attention level is positively correlated with the weight; among them, the drug encapsulation defect and the drug label defect have the highest weight values.

[0053] Specifically, traverse the types of defects to understand the characteristics and manifestations of each defect. According to the degree of influence of the defect on the drug package and the difficulty of defect recognition, a weight is assigned to each type of defect. This weight reflects the degree of attention paid to each type of defect during the detection process. Inside each type of defect, according to the importance and recognition difficulty of the defect features, a weight is assigned to each feature in the feature matrix. This weight reflects the importance of each feature when identifying each type of defect. The parallel detection branches refer to multiple detection modules running in parallel in the detection system, and each module is responsible for detecting one or more types of defects. When allocating computing power, according to the weight of each type of defect, the corresponding computing resources are allocated to the corresponding detection branch. Ensure that the allocated computing power is positively correlated with the weight, and more computing resources should be allocated to the defect type with a higher weight, while less computing resources can be allocated to the defect type with a lower weight.

[0054] Each node in the defect knowledge graph represents a defect feature, and these features are connected by edges. According to the feature importance of the defect feature matrix within each defect type, a weight value is assigned to each feature to determine the self-attention level of the feature. Self-attention is a technique commonly used in natural language processing to help the model better understand and process sequential data. In the defect knowledge graph, the self-attention level identification helps the model better understand and process the relationships between different features, thereby improving the accuracy and efficiency of detection. Features with higher weights should have higher self-attention levels, while features with lower weights can have lower self-attention levels, ensuring that when the model processes defect features, it can give priority to focusing on and processing features that have a greater impact on drug safety. During the evaluation process, drug packaging defects and drug label defects are given the highest weight values due to their significant impact on product quality or production processes and their high recognition difficulty.

[0055] In a specific example, according to the defect impact coefficient and the defect recognition difficulty, a first weight distribution is performed and computing power is allocated to it. For each defect type, key features are extracted and a weight value is assigned to them according to their importance in defect recognition. For example, the shape feature of the packaging defect is considered the most important and is therefore given the highest weight value. Based on the weight values of the defect types, computing resources are allocated to each parallel detection branch. The higher the weight value, the more computing power is allocated. The specific data is as follows: for the packaging defect, the impact coefficient is 0.9, the recognition difficulty is 0.8, the first weight value assigned is 0.72, and the computing power allocation is 30%; for the label defect, the impact coefficient is 0.8, the recognition difficulty is 0.9, the first weight value assigned is 0.72, and the computing power allocation is 30%; for the shape defect, the impact coefficient is 0.7, the recognition difficulty is 0.6, the first weight value assigned is 0.42, and the computing power allocation is 15%; for the color defect, the impact coefficient is 0.6, the recognition difficulty is 0.7, the first weight value assigned is 0.42, and the computing power allocation is 15%; for the position defect, the impact coefficient is 0.5, the recognition difficulty is 0.5, the first weight value assigned is 0.25, and the computing power allocation is 10%. According to the importance of the features in the feature matrix for defect recognition, a weight value is assigned to each feature. Taking the packaging defect as an example: the second weight value of the shape feature is 0.4, and the self-attention level is high; the second weight value of the color feature is 0.3, and the self-attention level is medium; the second weight value of the position feature is 0.2, and the self-attention level is low. The self-attention level identification is performed on the defect knowledge graph to adaptively adjust the attention degree to different features, thereby more accurately identifying and processing different types of defects.

[0056] In summary, the intelligent detection method for drug packaging defects provided by this application has the following technical effects:

[0057] By jointly collecting data from source devices for the target drug packaging, determining multi-source detection data, performing multi-perspective homologous mapping fitting, and determining the reconstructed three-dimensional data; conducting industrial big data retrieval, determining the defect types of the drug packaging, retrieving and confidence-checking defect information, and performing information system reconstruction to determine the defect knowledge graph, where the defect knowledge graph corresponds one-to-one with the defect types; based on the defect recognition requirements, constructing a multi-layer Gaussian scale space, traversing the scale layers matching the defect types, combining the defect knowledge graph and performing data-driven modeling to generate an intelligent detection model, where the intelligent detection model includes parallel detection branches mapped to the defect types; for the target drug packaging, performing three-dimensional grid division based on the distribution differences of the defect types, performing spatial distribution conversion to determine the grid relative coordinates; based on the grid relative coordinates, marking the reconstructed three-dimensional data, transmitting it to the intelligent detection model for detection branch matching and concurrent processing, and determining multiple groups of detection data; traversing the multiple groups of detection data and performing position coupling integration to determine the defect detection result of the target drug packaging. That is to say, by obtaining data from multiple perspectives, accurately locating the defect positions, and enhancing the processing and analysis capabilities of a large amount of complex data, the technical effects of improving the efficiency and accuracy of drug packaging defect detection are achieved.

[0058] Embodiment 2. Based on the same inventive concept as the intelligent detection method for a drug packaging defect in the foregoing embodiment, the present application also provides an intelligent detection system for a drug packaging defect. Please refer to the appendix Figure 2 , the intelligent detection system for a drug packaging defect includes:

[0059] The source device joint collection module 11 is used to jointly collect data from source devices for the target drug packaging, determine multi-source detection data, perform multi-perspective homologous mapping fitting, and determine the reconstructed three-dimensional data.

[0060] The defect information verification module 12 is used to conduct industrial big data retrieval, determine the defect types of the drug packaging, retrieve and confidence-check defect information, and perform information system reconstruction to determine the defect knowledge graph, where the defect knowledge graph corresponds one-to-one with the defect types.

[0061] The intelligent detection model construction module 13 is used to construct a multi-layer Gaussian scale space based on the defect recognition requirements, traverse the scale layers matching the defect types, combine the defect knowledge graph and perform data-driven modeling to generate an intelligent detection model, where the intelligent detection model includes parallel detection branches mapped to the defect types.

[0062] 3D grid division module 14, which is used to perform 3D grid division on the target drug packaging based on the distribution difference of defect types, and execute spatial distribution conversion to determine the grid relative coordinates.

[0063] Detection branch matching module 15, which is used to mark the reconstructed 3D data based on the grid relative coordinates, transmit it to the intelligent detection model for detection branch matching and concurrent processing, and determine multiple groups of detection data.

[0064] Position coupling integration module 16, which is used to traverse the multiple groups of detection data and perform position coupling integration to determine the defect detection result of the target drug packaging.

[0065] Furthermore, the source device joint acquisition module 11 in the intelligent detection system for drug packaging defects is also used for:

[0066] Traverse the multi-source detection data, map the multi-source detection data based on the same spatial position, and determine multiple mapped data sequences, where there are data heterogeneity and perspective differences in each mapped data sequence; identify the first mapped data sequence, perform heterogeneous feature fusion and multi-perspective stitching to determine the 3D reconstruction result of the first spatial position; traverse the multiple mapped data sequences, determine multiple 3D reconstruction results, and perform stitching based on the relative spatial position to determine the reconstructed 3D data.

[0067] Furthermore, the defect information verification module 12 in the intelligent detection system for drug packaging defects is also used for:

[0068] Define the entity features of the atlas layer to determine the atlas architecture; perform clustering processing on the defect information based on the defect type to determine multiple groups of defect information; identify a group of defect information and perform entity feature and entity relationship extraction, and deploy the extracted information based on the atlas architecture to determine the first defect knowledge graph.

[0069] Furthermore, the intelligent detection model construction module 13 in the intelligent detection system for drug packaging defects is also used for:

[0070] Traverse the defect types to determine the defect recognition requirements, where the defect recognition requirements include multiple data scales; construct the initial scale layer; based on the Gaussian filter, and guided by the defect recognition requirements, perform multi-level preprocessing on the initial scale layer, and integrate to determine the multi-layer Gaussian scale space.

[0071] Furthermore, the intelligent detection system for drug packaging defects further includes a Gaussian scale space generation module, which is used for:

[0072] Identify the first data scale, determine the first filtering method and the first downsampling method, perform filtering on the initial scale layer and execute downsampling to determine the first scale layer; traverse the multiple data scales, perform iterative parameter tuning and configuration on the initial scale layer to determine the Nth scale layer; hierarchically integrate the first scale layer to the Nth scale layer to generate the multi-layer Gaussian scale space.

[0073] Further, the intelligent detection model construction module 13 in the intelligent detection system for drug packaging defects is further configured to:

[0074] Based on the multi-layer Gaussian scale space, match the target scale layer based on the first defect type; determine a set of defect information of the first defect type, and integrally determine the sample data, including data samples and detected defect samples; based on the first defect knowledge graph and the sample data, perform supervised training on the target scale layer until convergence to determine the first detection branch.

[0075] Further, the intelligent detection model construction module 13 in the intelligent detection system for drug packaging defects is further configured to:

[0076] Traverse the defect types, and perform the first weight distribution based on the defect type with the defect influence coefficient and the defect recognition difficulty, and the second weight distribution of the defect feature matrix within each defect type; based on the first weight distribution, perform computing power network allocation on the parallel detection branches, where the allocated computing power is positively correlated with the weight; based on the second weight distribution, perform self-attention level identification on the defect knowledge graph, where the self-attention level is positively correlated with the weight; among them, drug encapsulation defects and drug label defects have the highest weight values.

[0077] Each embodiment in this specification is described in a progressive manner. The key point of each embodiment is the difference from other embodiments. The Figure 1 Intelligent detection method and specific example in Embodiment 1 are equally applicable to the intelligent detection system for drug packaging defects in this embodiment. Through the detailed description of the intelligent detection method for drug packaging defects above, those skilled in the art can clearly know the intelligent detection system for drug packaging defects in this embodiment. Therefore, for the sake of brevity of the specification, it will not be elaborated here. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method part.

[0078] The foregoing description of the disclosed embodiments enables those skilled in the art to practice or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0079] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the present application and its equivalent technologies, the present application is also intended to include these changes and modifications.

Claims

1. An intelligent detection method for drug packaging defects, characterized in that, Including: Jointly collect data from source devices for the target drug packaging, determine multi-source detection data, perform multi-perspective homologous mapping fitting, and determine the reconstructed three-dimensional data; Conduct industrial big data retrieval, determine the defect types of the drug packaging, perform defect information retrieval and confidence verification, and execute information system reconstruction to determine the defect knowledge graph, where the defect knowledge graph corresponds one-to-one with the defect types; Based on the defect recognition requirements, construct a multi-layer Gaussian scale space, traverse the scale layers matching the defect types, combine the defect knowledge graph, and perform data-driven modeling to generate an intelligent detection model, where the intelligent detection model includes parallel detection branches mapped to the defect types; For the target drug packaging, perform three-dimensional grid division based on the distribution difference of the defect types, and execute spatial distribution conversion to determine the grid relative coordinates; Based on the grid relative coordinates, mark the reconstructed three-dimensional data, transmit it to the intelligent detection model for detection branch matching and concurrent processing, and determine multiple groups of detection data; Traverse the multiple groups of detection data and perform position coupling integration to determine the defect detection result of the target drug packaging; The generating of the intelligent detection model includes: Traverse the defect types, and perform the first weight distribution based on the defect impact coefficient and defect recognition difficulty for each defect type, and the second weight distribution of the defect feature matrix within each defect type; Based on the first weight distribution, allocate the computing power network for the parallel detection branches, where the allocated computing power is positively correlated with the weight; Based on the second weight distribution, perform self-attention level identification on the defect knowledge graph, where the self-attention level is positively correlated with the weight; Among them, the drug encapsulation defect and the drug label defect have the highest weight values.

2. The intelligent detection method for drug packaging defects according to claim 1, characterized in that, The determining of the multi-source detection data and performing multi-perspective homologous mapping fitting includes: Traverse the multi-source detection data, and based on the same spatial position as the benchmark, map the multi-source detection data to determine multiple mapped data sequences, where there are data heterogeneity and perspective differences in each mapped data sequence; Identify the first mapped data sequence, perform heterogeneous feature fusion and multi-perspective stitching to determine the three-dimensional reconstruction result at the first spatial position; Traverse the multiple mapped data sequences, determine multiple three-dimensional reconstruction results, and perform stitching based on the relative spatial position to determine the reconstructed three-dimensional data.

3. The intelligent detection method for drug packaging defects according to claim 1, characterized in that, The executing of the information system reconstruction to determine the defect knowledge graph includes: Define the entity features of the graph layer to determine the graph architecture; Based on the defect types, perform clustering processing on the defect information to determine multiple groups of defect information; Identify a group of defect information, extract entity features and entity relationships, and deploy the extracted information based on the graph architecture to determine the first defect knowledge graph.

4. The intelligent detection method for drug packaging defects according to claim 1, characterized in that, The constructing of the multi-layer Gaussian scale space includes: Traverse the defect types to determine the defect recognition requirements, which include multi-data scales; Construct the initial scale layer; Based on the Gaussian filter, guided by the defect recognition requirements, perform multi-level preprocessing on the initial scale layer, and integrate to determine the multi-layer Gaussian scale space.

5. The intelligent detection method for drug packaging defects according to claim 4, characterized in that Guided by the defect recognition requirements, perform multi-level preprocessing on the initial scale layer, including: Identify the first data scale, determine the first filtering method and the first downsampling method, perform filtering processing on the initial scale layer and execute downsampling to determine the first scale layer; Traverse the multi-data scales, perform iterative parameter tuning and configuration on the initial scale layer to determine the Nth scale layer; Hierarchically integrate the first scale layer to the Nth scale layer to generate the multi-layer Gaussian scale space.

6. The intelligent detection method for drug packaging defects according to claim 3, characterized in that, The generation of the intelligent detection model includes: Based on the multi-layer Gaussian scale space, match the target scale layer based on the first defect type; Determine a set of defect information for the first defect type, and integrate and determine the sample data, including data samples and detected defect samples; Based on the first defect knowledge graph and the sample data, perform supervised training on the target scale layer until convergence to determine the first detection branch.

7. An intelligent detection system for drug packaging defects, characterized in that, Steps for implementing the intelligent detection method for a drug packaging defect according to any one of claims 1 to 6, the intelligent detection system for a drug packaging defect includes: A source device joint acquisition module, which is used to jointly acquire the target drug packaging by source devices, determine multi-source detection data and perform multi-view homologous mapping fitting to determine the reconstructed three-dimensional data; A defect information verification module, which is used to perform industrial big data retrieval, determine the defect type of the drug packaging and perform defect information retrieval and confidence verification, and execute information system reconstruction to determine the defect knowledge graph, where the defect knowledge graph corresponds one-to-one with the defect type; An intelligent detection model construction module, which is used to construct a multi-layer Gaussian scale space based on defect recognition requirements, traverse the defect type matching scale layer, combine the defect knowledge graph and perform data-driven modeling to generate an intelligent detection model, where the intelligent detection model includes parallel detection branches mapped to defect types; A three-dimensional grid division module, which is used to perform three-dimensional grid division on the target drug packaging based on the distribution difference of defect types, and execute spatial distribution conversion to determine the grid relative coordinates; A detection branch matching module, which is used to mark the reconstructed three-dimensional data based on the grid relative coordinates, transmit it to the intelligent detection model for detection branch matching and concurrent processing to determine multiple groups of detection data; A position coupling integration module, which is used to traverse the multiple groups of detection data and perform position coupling integration to determine the defect detection result of the target drug packaging; The intelligent detection model construction module is also used for: Traverse the defect types, and perform the first weight distribution based on the defect type according to the defect impact coefficient and the defect recognition difficulty, and the second weight distribution of the defect feature matrix within each defect type; based on the first weight distribution, perform computing power network allocation for the parallel detection branches, where the allocated computing power is positively correlated with the weight; based on the second weight distribution, perform self-attention level identification on the defect knowledge graph, where the self-attention level is positively correlated with the weight; among them, the drug packaging defect and the drug label defect have the highest weight values.

Citation Information

Patent Citations

  • Small sample product surface defect identification method and system

    CN115908350A

  • Virtual reality and augmented reality fusion method based on indoor three-dimensional reconstruction

    CN118485796A

  • X-ray-based nondestructive testing method and system for internal defects of power supply equipment

    CN118566266A