Intelligent detection method and system for medicine packaging defects

Through the construction of multi-view data acquisition and intelligent detection models, the problem of limited recognition ability of drug packaging defect detection for complex packaging is solved, and efficient and accurate defect detection is achieved.

CN119251182AActive Publication Date: 2025-01-03JIANGXI GUANGXIN PHARM CO LTD

Patent Information

Application Number
CN202411341090.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-01-03
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

Reconstruct three-dimensional data through multi-view data acquisition and homologous mapping fitting, combining industrial big data retrieval and knowledge graph, build multi-layer Gaussian scale space, generate intelligent detection models, perform three-dimensional grid division and concurrent processing, and realize drug packaging Accurate detection of defects.

Benefits of technology

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

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119251182A_ABST
    Figure CN119251182A_ABST
Patent Text Reader

Abstract

The invention provides an intelligent detection method and system for medicine packaging defects, and relates to the technical field of intelligent detection, and the method comprises the steps: determining multi-source detection data and carrying out multi-view homologous mapping fitting, carrying out defect information retrieval and confidence verification, determining a defect knowledge graph, constructing a multi-layer Gaussian scale space, and carrying out data-driven modeling. The method comprises the following steps: generating an intelligent detection model, carrying out three-dimensional grid division, determining relative coordinates of grids, carrying out detection branch matching and concurrent processing in the intelligent detection model, determining multiple groups of detection data, carrying out position coupling integration, and determining a defect detection result. The technical problem of poor detection accuracy caused by limited recognition capability of defect detection on complex packages in the prior art can be solved, the processing and analysis capability on a large amount of complex data is enhanced by acquiring data from multiple perspectives and accurately positioning defect positions, and the detection accuracy is improved. The technical effect of improving the efficiency and accuracy of medicine packaging defect detection is 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 technology, and in particular to an intelligent detection method and system for drug packaging defects. Background Art

[0002] With the rapid development of the pharmaceutical industry, quality control of drug packaging has become an important part of ensuring drug safety and effectiveness. Detection of drug packaging defects is a key step in ensuring packaging quality. Traditional drug packaging defect detection mainly relies on manual visual inspection, which is inefficient and easily affected by human factors such as fatigue and subjective judgment, resulting in high rates of missed detection and false detection. In addition, manual inspection methods are difficult to adapt to the needs of large-scale production, limiting the improvement of production efficiency.

[0003] To improve 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 when 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 lighting, the system's recognition ability is limited. In addition, traditional machine vision systems can often only process two-dimensional images and have difficulty accurately capturing and identifying defects in three-dimensional structures.

[0004] In summary, the prior art has a technical problem of poor detection accuracy due to the limited ability of defect detection to identify complex packaging. Summary of the invention

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

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

[0007] In the first aspect, the present application provides an intelligent detection method for drug packaging defects, which is implemented by an intelligent detection system for drug packaging defects, wherein the intelligent detection method for drug packaging defects includes: performing joint acquisition of source devices on the target drug packaging, determining multi-source detection data and performing multi-view homologous mapping fitting to determine the reconstructed three-dimensional data; performing industrial big data retrieval to determine the defect type of the drug packaging and performing defect information retrieval and confidence verification, performing information system reconstruction to determine the defect knowledge graph, wherein the defect knowledge graph corresponds one-to-one to the defect type; based on defect identification requirements, constructing a multi-layer Gaussian scale space, traverse the defect type matching scale layer, combine the defect knowledge graph and perform data-driven modeling to generate an intelligent detection model, wherein the intelligent detection model includes parallel detection branches mapped to defect types; for the target drug packaging, three-dimensional grid division is performed based on the distribution differentiation of defect types, and spatial distribution transformation is performed to determine the relative coordinates of the grid; based on the relative coordinates of the grid, 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; traverse the multiple groups of detection data and perform position coupling integration to determine the defect detection results of the target drug packaging.

[0008] In the 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, wherein the intelligent detection system for drug packaging defects includes: a source-end device joint acquisition module, which is used to perform source-end device joint acquisition on the target drug packaging, determine multi-source detection data and perform multi-perspective homologous mapping fitting, and 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 drug packaging, perform defect information retrieval and confidence verification, and perform information system reconstruction to determine a defect knowledge graph, wherein the defect knowledge graph corresponds one-to-one to the defect type; an intelligent detection model construction module, which is used to construct a multi-layer system based on defect identification requirements. Gaussian scale space, traversing the defect type matching scale layer, combining the defect knowledge graph and performing data-driven modeling to generate an intelligent detection model, wherein the intelligent detection model includes parallel detection branches mapped to defect types; a three-dimensional grid division module, the three-dimensional grid division module is used to perform three-dimensional grid division based on the distribution differentiation of defect types for the target drug packaging, and perform spatial distribution transformation to determine the relative coordinates of the grid; a detection branch matching module, the detection branch matching module is used to mark the reconstructed three-dimensional data based on the relative coordinates of the grid, and 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, the position coupling integration module is used to traverse the multiple groups of detection data and perform position coupling integration to determine the defect detection results of the target drug packaging.

[0009] One or more technical solutions provided in this application have at least the following technical effects or advantages: By jointly collecting source-end equipment on the target drug packaging, multi-source detection data is determined and multi-view homology mapping fitting is performed to determine the reconstructed three-dimensional data; industrial big data retrieval is performed to determine the defect type of the drug packaging and defect information retrieval and confidence verification are performed, and the information system reconstruction is performed to determine the defect knowledge graph, wherein the defect knowledge graph corresponds to the defect type one by one; based on the defect identification requirements, a multi-layer Gaussian scale space is constructed, the defect type matching scale layer is traversed, the defect knowledge graph is combined and data-driven modeling is performed to generate an intelligent detection model, wherein the intelligent detection model includes parallel detection branches mapped to the defect type; for the target drug packaging, three-dimensional grid division is performed based on the distribution differentiation of the defect type, and spatial distribution conversion is performed to determine the relative coordinates of the grid; based on the relative coordinates of the grid, 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 performed to determine the defect detection results of the target drug packaging. In other words, by acquiring data from multiple perspectives, accurately locating defect locations, and enhancing the ability to process and analyze large amounts of complex data, the technical effect of improving the efficiency and accuracy of drug packaging defect detection is achieved.

[0010] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented according to the contents of the specification, and in order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are specifically cited below. It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easy to understand through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0012] Figure 1 A schematic diagram of a process for an intelligent detection method of drug packaging defects in this application; Figure 2 This is a schematic diagram of the structure of an intelligent detection system for drug packaging defects in this application.

[0013] Explanation of the accompanying drawings: source-end equipment joint 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 DESCRIPTION

[0014] This application provides an intelligent detection method and system for drug packaging defects, which solves the technical problem in the prior art that defect detection has limited recognition ability for complex packaging, resulting in poor detection accuracy. By acquiring data from multiple perspectives, accurately locating defect locations, and enhancing the processing and analysis capabilities of large amounts of complex data, the technical effect of improving the efficiency and accuracy of drug packaging defect detection is achieved.

[0015] Below, the technical solutions in the present application will be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments of the present application. It should be understood that the present application is not limited to the example embodiments described herein. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application. It should also be noted that, for the convenience of description, only the parts related to the present application are shown in the accompanying drawings, rather than all of them.

[0016] For example, please refer to the attached Figure 1 The present application provides an intelligent detection method for drug packaging defects, wherein the intelligent detection method for drug packaging defects is applied to an intelligent detection system for drug packaging defects, and the intelligent detection method for drug packaging defects specifically includes the following steps: Step 1: Perform joint collection of source-end equipment on the target drug packaging, determine multi-source detection data, perform multi-view homologous mapping fitting, and determine the reconstructed three-dimensional data.

[0017] Specifically, multiple source devices (such as different types of sensors, cameras or other detection devices) are used to collect data from the target drug packaging, and the packaging is observed from different angles and distances to obtain comprehensive detection data. For example, two cameras at different angles and an infrared sensor are used to detect drug packaging to obtain information about the appearance, structure and temperature of the packaging. Data from different sources are synchronized in time to ensure data consistency. Data fusion technology, such as multi-sensor data fusion algorithm, is used to integrate data from different sources into a unified data set. The collected data is pre-processed by denoising, calibration, and standardization to improve data quality. Data collected from different perspectives are mapped to the same spatial position, and multi-source data are fitted using mathematical models or algorithms (such as least squares method, neural network, etc.) to reduce errors caused by perspective differences and data heterogeneity. The fitted data is used to construct a three-dimensional model of the target drug packaging. The use of multi-angle and multi-source data can capture the details of the packaging more comprehensively and reduce 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.

[0018] Step 2: Conduct industrial big data retrieval, determine the defect type of drug packaging and perform defect information retrieval and confidence verification, perform information system reconstruction to determine the defect knowledge graph, wherein the defect knowledge graph corresponds one-to-one to the defect type.

[0019] Specifically, a large amount of drug packaging data is collected from the production line, including normal products and defective products. A large amount of industrial data is accessed and analyzed to obtain relevant information about drug packaging defects, including historical defect data, production process data, quality inspection data, etc. The data is cleaned, formatted and standardized to ensure data quality. Key features such as the color, shape, size, texture, etc. of the packaging are extracted from the preprocessed data, and machine learning algorithms (such as random forest, support vector machine, deep learning, etc.) are used to analyze the features to identify different defect types, such as surface scratches, breakage, deformation, air leakage, etc. Further retrieve detailed information about these defects, build query conditions based on the determined defect type, and search for information related to the defect type, such as historical defect records, cause analysis, solutions, etc. Confidence assessment is performed 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 analytical methods to evaluate the confidence of the retrieved information. Based on the retrieved defect information, a structured knowledge graph is constructed, with each defect type corresponding to a node, and the connections between nodes represent the relationship between them. Ensure that each defect type has corresponding entities and relationships in the knowledge graph. Through big data retrieval and knowledge graph construction, accurate identification and classification of drug packaging defects can be achieved, improving the accuracy and efficiency of detection.

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

[0021] Specifically, according to the identification requirements of different defect types, the data features and information required for each defect type are determined, and then a multi-layer Gaussian scale space is constructed. In this space, the data features of each layer are more abstract than the previous layer and contain less information, but still retain 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 defects on drug packaging. The model contains parallel detection branches mapped to defect types, that is, the model can handle detection tasks of multiple defect types at the same time. The construction of multi-layer Gaussian scale space and data-driven modeling improve the recognition ability of the intelligent detection model for various defect types, enabling it to more accurately detect different types of packaging defects.

[0022] Step 4: For the target drug package, three-dimensional grid division is performed based on the distribution differentiation of defect types, and spatial distribution transformation is performed to determine the relative coordinates of the grid.

[0023] Specifically, the distribution of different defect types is analyzed for the target drug packaging. The distribution density and distribution pattern of different defect types in space may be different. According to the distribution of different defect types on the drug packaging, the packaging is divided into multiple three-dimensional grids. Each grid corresponds to a specific area on the drug packaging and can contain multiple defect types. The three-dimensional space of the target drug packaging is converted into a grid system composed of grids, each grid represents a small spatial unit for storing data and information related to the unit. The relative position and direction of each grid on the drug packaging are determined, and the grid is mapped to the three-dimensional coordinate system of the drug packaging to locate and identify the defect position in the target drug packaging. Three-dimensional grid division and spatial distribution transformation help to accurately locate the defect position on the packaging and provide accurate positioning information for subsequent inspections.

[0024] Step 5: 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.

[0025] Specifically, the reconstructed three-dimensional data is marked according to the determined relative coordinates of the grid. Each mark represents a specific grid position and contains data and information related to the position. The intelligent detection model is a system containing multiple detection branches, each of which is responsible for detecting one or more defect types. The marked three-dimensional data is transmitted to the intelligent detection model, and the corresponding detection branch is automatically matched according to the data characteristics, defect type and relative coordinates of the grid. The intelligent detection model can handle the tasks of multiple detection branches at the same time, and can detect multiple defect types at the same time, thereby improving the detection efficiency. The transmitted three-dimensional data is processed and multiple sets of detection results are generated, including information such as the defect type and location 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, thereby improving the speed and accuracy of detection.

[0026] Step 6: traverse the multiple groups of detection data and perform position coupling integration to determine the defect detection result of the target drug package.

[0027] Specifically, each set of test data contains the test results for a specific defect type, and each set of test data obtained from the intelligent detection model is traversed. By comparing the defect locations and types in different test results, the most likely defect type and location at each location are found, and the defect information about the same location in different test results is integrated. The position information in each set of test data is matched with the three-dimensional spatial position of the target drug packaging, and the defect information in each set of test data is merged, filtered or adjusted to obtain more accurate and comprehensive defect detection results. Based on the position coupling integration results, a complete test report on all defects on the drug packaging is generated, including information such as the location, type and possible cause of each defect. Based on the final defect detection results, decision support is provided to determine whether the target drug packaging needs to be further processed or repaired. By integrating multiple sets of test data, more comprehensive and accurate defect detection results can be obtained, thereby improving the quality control level of drug packaging.

[0028] Furthermore, step one of this application includes: The multi-source detection data are traversed, and the multi-source detection data are mapped based on the same spatial position to determine a plurality of mapping data sequences, wherein each mapping data sequence has data heterogeneity and perspective difference; a first mapping data sequence is identified, and heterogeneous feature fusion and multi-perspective stitching are performed to determine a three-dimensional reconstruction result of a first spatial position; the multiple mapping data sequences are traversed to determine a plurality of three-dimensional reconstruction results, and stitching is performed based on the relative spatial position to determine the reconstructed three-dimensional data.

[0029] Specifically, the detection data collected from different devices or sensors are analyzed one by one. Each data source provides information about drug packaging from different perspectives or using different technologies. The data in different data sources are matched according to their positions in space, and the images, signals or other types of data collected by different devices about the same part of the drug packaging are matched. Based on the mapping, multiple mapping data sequences are determined, 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. The first sequence is identified from multiple mapping data sequences, which contains multi-source data about a specific spatial position of the drug package.

[0030] Heterogeneous feature fusion refers to the integration of features from different types of data (such as images, signals, etc.), and the use of specific algorithms and technologies to process and fuse these data in order to better describe and identify defects in drug packaging. Multi-view stitching refers to the combination of 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, which integrates the detection data from multiple source devices. For example, images collected by cameras from two different angles are stitched together to obtain a more comprehensive three-dimensional view. Use these data 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.

[0031] The multiple previously determined mapping data sequences are analyzed one by one, and each data sequence represents the information of different spatial positions on the drug packaging. For each mapping data sequence, heterogeneous feature fusion and multi-view stitching are performed to determine its corresponding three-dimensional reconstruction result, which shows the three-dimensional morphology of different parts on the drug packaging. The three-dimensional reconstruction results are spliced ​​according to the relative spatial position on the drug packaging, and spatial positioning and matching technology are used to accurately combine these three-dimensional models into a whole to form a final reconstructed three-dimensional data. The reconstructed three-dimensional data is a comprehensive three-dimensional representation of the entire drug packaging, which contains all the key features and structural information of the packaging. Through multi-source data, the limitations of a single data source or perspective are overcome, and the three-dimensional reconstruction can more intuitively observe and analyze the defects of the drug packaging, thereby improving the accuracy of detection.

[0032] Further, step 2 of this application includes: Limit the entity features of the graph layer and determine the graph architecture; based on the defect type, cluster the defect information to determine multiple groups of defect information; identify a group of defect information and extract entity features and entity relationships, deploy the extracted information based on the graph architecture, and determine the first defect knowledge graph.

[0033] Specifically, clarify the characteristics of entities (such as nodes) at each level in the knowledge graph, including the type, attributes, and relationships of the entities. In the drug packaging defect knowledge graph, entities include drug packaging, defect type, cause, consequence, solution, etc. Each entity has its specific attributes and relationships with other entities. For example, defect types include characteristics such as size, shape, and frequency of occurrence. Define the relationship and structure between each entity in the graph. The graph architecture includes the connection method between entities, the hierarchical structure of entities, the relationship type between entities, etc. In the drug packaging defect knowledge graph, define the association between drug packaging and defect type, as well as the relationship between defect type and cause and consequence. You can also define the hierarchical structure of entities, such as taking drug packaging as the top-level entity, defect type as the secondary entity, and cause and consequence as lower-level entities.

[0034] According to the defect type, defect information with similar characteristics is divided into a group. Clustering is an unsupervised learning method, such as K-means, hierarchical clustering, DBSCAN, etc., which puts similar defect information together and groups defect information to identify different defect patterns or categories. Identify a group of defect information from multiple groups of defect information for in-depth analysis to identify the entities and their characteristics and relationships. Entities can be drug packaging, defect types, defect locations, defect sizes, etc. Relationships describe the association between entities, such as a defect is caused by a specific equipment failure. The extracted entity features and entity relationships are organized according to the graph architecture to form the basic structure of the knowledge graph. Use knowledge graph building tools (such as Neo4j, Apache Jena, etc.) to import entities and relationships into the knowledge graph database. After the deployment of the extracted information is completed, a knowledge graph about drug packaging defects is obtained, which shows the defects on the drug packaging and their characteristics and relationships, which helps to better understand and analyze the defects on the drug packaging. For example, for "package damage", features such as "damage area" and "damage location" are extracted, and it is determined that it is caused by "machine wear". A "package damage" entity is created in the knowledge graph, "machine wear" is associated as the cause, and the corresponding solution is recorded. By extracting entities and relationships, we can have a deeper understanding of the causes and effects of defects.

[0035] Further, step three of this application includes: The defect types are traversed to determine defect identification requirements, wherein the defect identification requirements include multiple data scales; an initial scale layer is constructed; based on a Gaussian filter, the initial scale layer is preprocessed in multiple stages with the defect identification requirements as a guide, and the multi-layer Gaussian scale space is determined by integration.

[0036] Specifically, identify and classify different defect types, and understand the characteristics and manifestations of each defect. Analyze the characteristics of each defect type and determine the image scale under its optimal extraction state. The image scale under the optimal extraction state of different defect types is different. For example, for some features with low fineness, such as slight scratches, filter smoothing is used to reduce the clarity of the image, making it easier to extract in a blurred state. This is because the more detailed the image information is, the more refined some features may affect the accuracy of recognition. In the drug packaging image, an initial scale layer is established to represent the initial features of the image. Based on the extraction requirements, that is, the type, the initial scale layer is adjusted in 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, and the image scale required under the optimal extraction state. For example, if a defect type is easier to identify when it is blurred in the image, then when adjusting the scale layer, a processing method that makes the image blurred is selected. On the contrary, if a defect type is easier to identify when it is clear in the image, 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 performed to reduce the complexity of the data. Downsampling can be achieved by removing certain parts of the data, such as sampling and extracting alternate lines, which can reduce the amount of data while retaining 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, each scale layer corresponding 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 of different scales. Through this multi-layer Gaussian scale space, comprehensive and multi-angle detection of drug packaging defects can be achieved.

[0037] Furthermore, the present application also includes the following steps: Identify a first data scale, determine a first filtering method and a first downsampling method, filter the initial scale layer and perform downsampling to determine a first scale layer; traverse the multiple data scales, iteratively adjust parameters of the initial scale layer, and determine an Nth scale layer; hierarchically integrate the first scale layer to the Nth scale layer to generate the multi-layer Gaussian scale space.

[0038] Specifically, according to the needs of defect identification, the first data processing level is determined, which is an abstract level that represents the roughest or most basic representation of the data. At the first data scale, a data processing method is selected to simplify the data and reduce noise or irrelevant information. Filtering refers to the use of a mathematical operation to remove noise, blur or other undesirable features. At the same time, a "downsampling" method is determined to reduce the dimension, filter or extract the data to reduce the complexity of the data. Downsampling can be achieved by removing certain parts of the data, such as sampling and extracting alternate lines, reducing the amount of data while retaining key information related to the defect type.

[0039] 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, adjust the filtering and downsampling parameters according to the detection requirements to better adapt to the characteristics and requirements of the scale. This is done in an iterative manner, that is, in each iteration, adjust the parameters according to the previous results until a satisfactory detection effect is achieved. Find the optimal parameter settings for each feature layer through iterative parameter configuration. 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.

[0040] The first scale layer to the Nth scale layer determined by iterative parameter configuration are orderly integrated to form a hierarchical feature space, and each scale layer corresponds to different features and detail levels of the drug packaging image. A multi-layer Gaussian scale space is generated, and feature layers of different scales reflect different levels of features of the drug packaging image, such as edges, textures, shapes, etc. According to the needs of defect identification, the data is processed and analyzed at multiple levels to meet the needs of feature extraction at different levels. Through filtering processing and downsampling for dimensionality reduction, scratches, breakages, deformations and other defects on the surface of the medicine bottle can be quickly and accurately detected, thereby ensuring the quality of drug packaging.

[0041] Furthermore, the present application also includes the following steps: Based on the multi-layer Gaussian scale space, a target scale layer based on the first defect type is matched; a set of defect information of the first defect type is determined, and sample data is integrated to determine, including data samples and detected defect samples; based on the first defect knowledge graph and the sample data, the target scale layer is supervisedly trained until convergence, and a first detection branch is determined.

[0042] Specifically, according to the defect type to be detected, a suitable scale layer is selected. This scale layer should be able to effectively detect and identify the first defect type. In the constructed multi-layer Gaussian scale space, a scale layer corresponding to the target scale layer is found. Through this matching, effective detection of the first defect type is achieved. A set of defect information is extracted from the first defect type, including the size, shape, position, etc. of the defect. The defect information of the identified first defect type is combined with the original data sample to form a set containing data samples and detected defect samples. According to the first defect knowledge graph, the target scale layer is supervised and trained using sample data so that it can accurately identify and classify the first defect type on the drug packaging. When the training reaches a 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 practical applications. The supervised training method based on multi-layer Gaussian scale space and sample data can detect and identify the first defect type more accurately and efficiently, which helps to improve the accuracy of detection.

[0043] Furthermore, the present application also includes the following steps: The defect types are traversed, and a first weight distribution based on the defect types and a second weight distribution of the defect feature matrix within each defect type are performed based on the defect influence coefficient and the defect recognition difficulty; based on the first weight distribution, computing power network allocation is performed on the parallel detection branches, wherein the allocated computing power is positively correlated with the weight; based on the second weight distribution, self-attention level identification is performed on the defect knowledge graph, wherein the self-attention level is positively correlated with the weight; wherein drug packaging defects and drug label defects have the highest weight values.

[0044] Specifically, traverse the defect types to understand the characteristics and manifestations of each defect. Assign a weight to each defect type based on the degree of impact of the defect on the drug packaging and the difficulty of defect identification. This weight reflects the degree of attention paid to each defect type during the detection process. Within each defect type, assign a weight to each feature in the feature matrix based on the importance of the defect feature and the difficulty of identification. This weight reflects the importance of each feature when identifying each defect type. Parallel detection branches refer to multiple parallel detection modules in the detection system, each module is responsible for detecting one or more defect types. When allocating computing power, allocate corresponding computing resources to the corresponding detection branches based on the weight of each defect type. Ensure that the allocated computing power is positively correlated with the weight. Defect types with higher weights should be allocated more computing resources, while defect types with lower weights can be allocated fewer computing resources.

[0045] Each node in the defect knowledge graph represents a defect feature, which is 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 commonly used technique in natural language processing to help models better understand and process sequence data. In the defect knowledge graph, self-attention level identification helps models better understand and process the relationship 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 the model can give priority to and process features that have a greater impact on drug safety when processing defect features. During the evaluation process, drug packaging defects and drug label defects were given the highest weight values ​​due to their significant impact on product quality or production processes and their higher identification difficulty.

[0046] In a specific example, a first weight distribution is performed based on the defect impact coefficient and the defect identification difficulty, and computing power is allocated to it. For each defect type, key features are extracted and weight values ​​are assigned to them according to their importance in defect identification. For example, the shape feature of the package defect is considered to be the most important and is therefore assigned the highest weight value. Based on the weight value of the defect type, computing resources are allocated to each parallel detection branch. The higher the weight value, the more computing power is allocated. The specific data are as follows: for package defects, the influence coefficient is 0.9, the recognition difficulty is 0.8, and the first weight value assigned is 0.72, so the computing power allocation is 30%; for label defects, the influence coefficient is 0.8, the recognition difficulty is 0.9, and the first weight value assigned is 0.72, so the computing power allocation is 30%; for shape defects, the influence coefficient is 0.7, the recognition difficulty is 0.6, and the first weight value assigned is 0.42, so the computing power allocation is 15%; for color defects, the influence coefficient is 0.6, the recognition difficulty is 0.7, and the first weight value assigned is 0.42, so the computing power allocation is 15%; for position defects, the influence coefficient is 0.5, the recognition difficulty is 0.5, and the first weight value assigned is 0.25, so the computing power allocation is 10%. According to the importance of the features in the feature matrix to defect recognition, weight values ​​are assigned to each feature. Taking package defects 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 defect knowledge graph is marked with self-attention levels, and the degree of attention to different features is adaptively adjusted to more accurately identify and handle different types of defects.

[0047] In summary, the intelligent detection method for drug packaging defects provided by this application has the following technical effects: By jointly collecting source-end equipment on the target drug packaging, multi-source detection data is determined and multi-view homology mapping fitting is performed to determine the reconstructed three-dimensional data; industrial big data retrieval is performed to determine the defect type of the drug packaging and defect information retrieval and confidence verification are performed, and the information system reconstruction is performed to determine the defect knowledge graph, wherein the defect knowledge graph corresponds to the defect type one by one; based on the defect identification requirements, a multi-layer Gaussian scale space is constructed, the defect type matching scale layer is traversed, the defect knowledge graph is combined and data-driven modeling is performed to generate an intelligent detection model, wherein the intelligent detection model includes parallel detection branches mapped to the defect type; for the target drug packaging, three-dimensional grid division is performed based on the distribution differentiation of the defect type, and spatial distribution conversion is performed to determine the relative coordinates of the grid; based on the relative coordinates of the grid, 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 performed to determine the defect detection results of the target drug packaging. In other words, by acquiring data from multiple perspectives, accurately locating defect locations, and enhancing the ability to process and analyze large amounts of complex data, the technical effect of improving the efficiency and accuracy of drug packaging defect detection is achieved.

[0048] Embodiment 2: Based on the same inventive concept as the intelligent detection method for drug packaging defects in the aforementioned embodiment, the present application also provides an intelligent detection system for drug packaging defects. Figure 2 , the intelligent detection system for drug packaging defects comprises: The source-end device joint acquisition module 11 is used to perform joint acquisition of source devices on target drug packages, determine multi-source detection data, perform multi-view homology mapping fitting, and determine reconstructed three-dimensional data.

[0049] The defect information verification module 12 is used to perform industrial big data retrieval, determine the defect type of drug packaging and perform defect information retrieval and confidence verification, perform information system reconstruction to determine the defect knowledge graph, wherein the defect knowledge graph corresponds one-to-one to the defect type.

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

[0051] The three-dimensional grid division module 14 is used to perform three-dimensional grid division on the target drug package based on the distribution differentiation of defect types, and perform spatial distribution conversion to determine grid relative coordinates.

[0052] The detection branch matching module 15 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.

[0053] The position coupling integration module 16 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 package.

[0054] Furthermore, the source device joint acquisition module 11 in the intelligent detection system for drug packaging defects is also used for: The multi-source detection data are traversed, and the multi-source detection data are mapped based on the same spatial position to determine a plurality of mapping data sequences, wherein each mapping data sequence has data heterogeneity and perspective difference; a first mapping data sequence is identified, and heterogeneous feature fusion and multi-perspective stitching are performed to determine a three-dimensional reconstruction result of a first spatial position; the multiple mapping data sequences are traversed to determine a plurality of three-dimensional reconstruction results, and stitching is performed based on the relative spatial position to determine the reconstructed three-dimensional data.

[0055] Furthermore, the defect information verification module 12 in the intelligent detection system for drug packaging defects is also used for: Limit the entity features of the graph layer and determine the graph architecture; based on the defect type, cluster the defect information to determine multiple groups of defect information; identify a group of defect information and extract entity features and entity relationships, deploy the extracted information based on the graph architecture, and determine the first defect knowledge graph.

[0056] Furthermore, the intelligent detection model building module 13 in the intelligent detection system for drug packaging defects is also used for: The defect types are traversed to determine defect identification requirements, wherein the defect identification requirements include multiple data scales; an initial scale layer is constructed; based on a Gaussian filter, the initial scale layer is preprocessed in multiple stages with the defect identification requirements as a guide, and the multi-layer Gaussian scale space is determined by integration.

[0057] Furthermore, the intelligent detection system for drug packaging defects also includes a Gaussian scale space generation module, which is used to: Identify a first data scale, determine a first filtering method and a first downsampling method, filter the initial scale layer and perform downsampling to determine a first scale layer; traverse the multiple data scales, iteratively adjust parameters of the initial scale layer, and determine an Nth scale layer; hierarchically integrate the first scale layer to the Nth scale layer to generate the multi-layer Gaussian scale space.

[0058] Furthermore, the intelligent detection model building module 13 in the intelligent detection system for drug packaging defects is also used for: Based on the multi-layer Gaussian scale space, a target scale layer based on the first defect type is matched; a set of defect information of the first defect type is determined, and sample data is integrated to determine, including data samples and detected defect samples; based on the first defect knowledge graph and the sample data, the target scale layer is supervisedly trained until convergence, and a first detection branch is determined.

[0059] Furthermore, the intelligent detection model building module 13 in the intelligent detection system for drug packaging defects is also used for: The defect types are traversed, and a first weight distribution based on the defect types and a second weight distribution of the defect feature matrix within each defect type are performed based on the defect influence coefficient and the defect recognition difficulty; based on the first weight distribution, computing power network allocation is performed on the parallel detection branches, wherein the allocated computing power is positively correlated with the weight; based on the second weight distribution, self-attention level identification is performed on the defect knowledge graph, wherein the self-attention level is positively correlated with the weight; wherein drug packaging defects and drug label defects have the highest weight values.

[0060] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. Figure 1 The intelligent detection method and specific examples of a drug packaging defect in the first embodiment are also applicable to the intelligent detection system of a drug packaging defect in the present embodiment. Through the detailed description of the intelligent detection method of a drug packaging defect, those skilled in the art can clearly understand the intelligent detection system of a drug packaging defect in the present embodiment, so for the sake of brevity of the specification, it will not be described in detail 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.

[0061] The above description of the disclosed embodiments enables those skilled in the art to implement 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. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

[0062] 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 belong to the scope of the present application and its equivalent technology, the present application is also intended to include these modifications and variations.

Claims

1. An intelligent detection method for drug packaging defects, characterized in that: include: Conduct joint acquisition of source-end equipment on target drug packaging, determine multi-source detection data, perform multi-view homology mapping fitting, and determine the reconstructed three-dimensional data; Conduct industrial big data retrieval, determine the defect type of drug packaging and perform defect information retrieval and confidence verification, perform information system reconstruction to determine the defect knowledge graph, wherein the defect knowledge graph corresponds to the defect type one by one; Based on the defect recognition requirements, a multi-layer Gaussian scale space is constructed, the defect type matching scale layer is traversed, the defect knowledge graph is combined and data-driven modeling is performed to generate an intelligent detection model, wherein the intelligent detection model includes parallel detection branches mapped to defect types; For the target drug package, three-dimensional grid division is performed based on the distribution differentiation of defect types, and spatial distribution conversion is performed to determine the relative coordinates of the grid; 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 coupled integration is performed to determine the defect detection result of the target drug package.

2. The intelligent detection method for drug packaging defects according to claim 1, characterized in that: The step of determining a multi-source detection image and performing multi-view homology mapping fitting includes: Traversing the multi-source detection data, mapping the multi-source detection data based on the same spatial position, and determining a plurality of mapping data sequences, wherein each mapping data sequence has data heterogeneity and perspective difference; Identify the first mapping data sequence, perform heterogeneous feature fusion and multi-view stitching, and determine the three-dimensional reconstruction result of the first spatial position; The plurality of mapping data sequences are traversed to determine a plurality of three-dimensional reconstruction results, and the three-dimensional reconstruction results are spliced ​​based on relative spatial positions to determine the reconstructed three-dimensional data.

3. The intelligent detection method for drug packaging defects according to claim 1, characterized in that: The execution information system reconstructs and determines the defect knowledge graph, including: Define the entity features of the graph layer and determine the graph architecture; Based on the defect type, clustering the defect information to determine multiple groups of defect information; Identify a set of defect information and extract entity features and entity relationships, deploy the extracted information based on the graph architecture, and determine a first defect knowledge graph.

4. The intelligent detection method for drug packaging defects according to claim 1, characterized in that: The constructing of a multi-layer Gaussian scale space comprises: Traversing the defect types to determine defect identification requirements, the defect identification requirements including multiple data scales; Construct the initial scale layer; Based on the Gaussian filter and guided by the defect recognition requirement, the initial scale layer is preprocessed at multiple levels, and the multi-layer Gaussian scale space is determined by integration.

5. The intelligent detection method for drug packaging defects according to claim 4, characterized in that: Guided by the defect identification requirements, the initial scale layer is subjected to multi-level preprocessing, including: Identify a first data scale, determine a first filtering method and a first downsampling method, filter and downsample the initial scale layer, and determine a first scale layer; Traversing the multiple data scales, iteratively adjusting parameters of the initial scale layer, and determining the Nth scale layer; The first scale layer to the Nth scale layer are hierarchically integrated 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 generating of the intelligent detection model comprises: Based on the multi-layer Gaussian scale space, matching a target scale layer based on a first defect type; Determine a set of defect information of the first defect type, and integrate and determine sample data, including data samples and detected defect samples; Based on the first defect knowledge graph and the sample data, supervised training is performed on the target scale layer until convergence, and a first detection branch is determined.

7. The intelligent detection method for drug packaging defects according to claim 1, characterized in that: The generating of the intelligent detection model comprises: Traversing the defect types, performing a first weight distribution based on the defect types and a second weight distribution of the defect feature matrix within each defect type according to the defect influence coefficient and the defect recognition difficulty; Based on the first weight distribution, performing computing power network allocation on the parallel detection branch, wherein the allocated computing power is positively correlated with the weight; Based on the second weight distribution, marking the self-attention level of the defect knowledge graph, wherein the self-attention level is positively correlated with the weight; Among them, drug packaging defects and drug label defects have the highest weight values.

8. An intelligent detection system for drug packaging defects, characterized in that: The steps for implementing the intelligent detection method for drug packaging defects according to any one of claims 1 to 7, wherein the intelligent detection system for drug packaging defects comprises: A source-end device joint acquisition module, which is used to perform joint acquisition of source devices on target drug packages, determine multi-source detection data, perform multi-view homology mapping fitting, and determine reconstructed three-dimensional data; A defect information verification module, which is used to perform industrial big data retrieval, determine the defect type of drug packaging and perform defect information retrieval and confidence verification, and perform information system reconstruction to determine a defect knowledge graph, wherein the defect knowledge graph corresponds one-to-one to 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, wherein the intelligent detection model includes parallel detection branches mapped to defect types; A three-dimensional grid division module, the three-dimensional grid division module is used to perform three-dimensional grid division based on the distribution differentiation of defect types for the target drug package, and perform spatial distribution conversion to determine grid relative coordinates; A detection branch matching module, the detection branch matching module 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 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 package.

Citation Information

Patent Citations

  • A surface defect sample generation tool

    CN111047576A

  • Model training method and device and defect detection method and device

    CN111861966A

  • 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

Cited By

  • Inner package detection and identification method based on visual inspection

    CN121962158A