A smart management method and system for pharmaceutical production workshops

By acquiring production sequences in pharmaceutical manufacturing workshops and using image recognition algorithms to identify discrepancies, an image difference model was constructed and matched with equipment types. This solved the problem of identifying issues in pharmaceutical production, improving production scheduling efficiency and product quality.

CN120146688BActive Publication Date: 2025-10-28SHANDONG CHENXIN FODU PHARM CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510276601.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-10
Publication Date
2025-10-28
Estimated Expiration
2045-03-10

AI Technical Summary

Technical Problem

Existing pharmaceutical manufacturing workshop management methods are unable to quickly identify problematic steps in the pharmaceutical production process, resulting in low production scheduling efficiency and reduced product quality.

Method used

By acquiring the workshop production sequence during drug production, image recognition algorithms are used to identify differences in production images, an image difference model is constructed, and the difference analysis results are matched with equipment types to output fault types, ultimately determining the workshop scheduling method.

Benefits of technology

It enables timely traceability and rapid identification of pharmaceutical production problems, improves the accuracy of data analysis in the production process and the targeted nature of fault handling, reduces production delays and resource waste, and ensures product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120146688B_ABST
    Figure CN120146688B_ABST
Patent Text Reader

Abstract

This invention relates to the field of workshop management technology, specifically an intelligent management method and system for pharmaceutical production workshops, comprising: S1, acquiring the workshop production sequence during pharmaceutical production and extracting the equipment type corresponding to the production sequence; S2, acquiring pharmaceutical production images from the production sequence, comparing the pharmaceutical production images with standard images using image recognition algorithms, identifying image differences during production, and setting difference analysis results according to the difference types of the image differences; S3, matching the difference analysis results with the equipment type, setting an image difference model related to the production equipment, and outputting the fault types existing in each piece of equipment during production; S4, matching the fault types output by the image difference model with the workshop production sequence, acquiring at least one production control indicator, and determining the workshop scheduling method based on the production control indicator; thereby improving pharmaceutical production efficiency and quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of workshop management technology, specifically to an intelligent management method and system for pharmaceutical production workshops. Background Technology

[0002] Traditional pharmaceutical manufacturing plant management relies primarily on manual monitoring and assessment. However, with the expansion of production scale and the increasing complexity of manufacturing processes, the efficiency and accuracy of manual monitoring gradually decline. Furthermore, inaccurate fault diagnosis and unreasonable production scheduling lead to production delays, resource waste, and product quality issues. Therefore, an intelligent management method is needed to address these problems.

[0003] For example, Chinese Patent Publication No. CN117114511A discloses an intelligent management system for a soft capsule production workshop based on the Internet of Things. This system includes: a soft capsule shell information analysis module, a soft capsule liquid information analysis module, a cloud database, a soft capsule sealing performance test analysis module, a soft capsule production quality preliminary analysis module, a soft capsule production quality secondary analysis module, and a production workshop anomaly location module. This invention analyzes the shell production quality compliance coefficient, the liquid comprehensive production quality compliance coefficient, and the sealing performance evaluation index to analyze the comprehensive production quality compliance coefficient of the soft capsules at the time of production and after cleaning and drying. It also locates and provides feedback on abnormal processes in the target soft capsule production workshop, thereby accurately locating abnormal production processes, improving the timeliness of abnormal production process detection, ensuring the production progress of soft capsules, and reducing production losses in the production workshop.

[0004] For example, Chinese Patent Publication No. CN118627860A discloses a production workshop management system and method based on data analysis, belonging to the field of production workshop management technology. This invention includes: S10: constructing a dynamic scheduling model for each production line; S20: acquiring the production plan for each production line, predicting the adaptability coefficient of each production line under different production plans, and predicting the dynamic scheduling coefficient of each production line based on the correlation between them, and analyzing whether the production workshop needs to add a new production line based on the prediction results; S30: planning the construction location and specifications of the new production line in the production workshop; S40: managing the production parameters of the new production line in the production workshop based on the planning results.

[0005] Existing technologies allow for the management of pharmaceutical production workshops by following established production patterns or adjusting production line models. However, when defects or problems arise in pharmaceutical production, it is difficult to trace the production process back to its source based on production line data. This makes it impossible to identify the steps that caused the problems, resulting in inefficient scheduling and adjustments to pharmaceutical production and ultimately, reduced product quality. Summary of the Invention

[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: an intelligent management method for pharmaceutical production workshops, including: S1, obtaining the workshop production sequence during pharmaceutical production and extracting the equipment type corresponding to the workshop production sequence.

[0007] S2. Collect images of drug production in the workshop production sequence, use image recognition algorithms to compare drug production images with standard images, identify image differences during production, and set difference analysis results according to the type of difference in the image differences.

[0008] S3. Match the difference analysis results with the equipment type, set up the image difference model related to the production equipment, and output the fault types that exist in each equipment during production.

[0009] S4. Match the fault type output by the image difference model with the workshop production sequence to obtain at least one production control indicator, and determine the workshop scheduling method based on the production control indicator.

[0010] An intelligent management system for a pharmaceutical production workshop includes: a data acquisition module, which is responsible for acquiring the workshop production sequence during pharmaceutical production, including equipment type and operating parameters, and collecting image data during the pharmaceutical production process.

[0011] The image recognition module is used to compare pharmaceutical production images with standard images using image recognition algorithms, identify differences between the images, and set the difference analysis results.

[0012] The fault type matching module is used to match the difference analysis results with the equipment type, construct an image difference model, and output the fault type.

[0013] The production control module is used to match the fault types output by the image difference model with the workshop production sequence, obtain production control indicators, and determine the workshop scheduling method.

[0014] The database management module is used to store standard images, detection configuration tables, anomaly description information, and data corresponding to device types, and provides data retrieval functions.

[0015] The beneficial effects of this invention are as follows: First, by obtaining the workshop production sequence during drug production, this invention links the workshop production sequence with the type of equipment used, and then constructs a mapping relationship between equipment, steps, and images for each production step during drug production. This facilitates timely backtracking to the point of occurrence when corresponding problems occur in drug production, thereby improving the accuracy of data analysis and the completeness of subsequent information processing.

[0016] Second, this invention uses an image recognition algorithm to identify image differences in pharmaceutical production images. Based on these differences, it detects and describes the corresponding differences in appearance, sealing, and filling during pharmaceutical production. This allows for comprehensive detection of problems during the feeding and production of pharmaceuticals, timely identification of defects in appearance, sealing, and filling, and retrieval based on the characteristics of these defects to determine the type of difference at each image difference. This provides a basis for subsequent processing of these differences, reducing production delays, resource waste, and product quality issues during pharmaceutical production.

[0017] Third, this invention matches the difference analysis results with the equipment type to construct an image difference model and output the fault type. It can quickly identify faults where image difference points exist and use the fault type in subsequent workshop sequence matching to identify the production control indicators that need to be adjusted. This makes the adjustment of the production process faster. Furthermore, it quantifies the occurrence of image differences and identifies the differences using multiple nodes according to the difference analysis results and the connection difference network corresponding to the equipment type when differences occur. Based on the corresponding probability values ​​and path lengths on these nodes, it further adjusts the selected fault type, making the handling of fault types more targeted. It can quickly handle problems with many faults and make joint judgments on faults that occur less frequently, thus improving the comprehensiveness of fault handling. Attached Figure Description

[0018] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0019] Figure 1 This is a flowchart illustrating an intelligent management method for a pharmaceutical production workshop.

[0020] Figure 2 This is a flowchart illustrating step S1 of an intelligent management method for a pharmaceutical production workshop.

[0021] Figure 3 This is a flowchart illustrating step S2 of an intelligent management method for a pharmaceutical production workshop.

[0022] Figure 4 This is a flowchart illustrating step S25 of an intelligent management method for a pharmaceutical production workshop.

[0023] Figure 5 This is a flowchart illustrating step S3 of an intelligent management method for a pharmaceutical production workshop.

[0024] Figure 6 This is a flowchart illustrating step S4 of an intelligent management method for a pharmaceutical production workshop.

[0025] Figure 7This is a system framework diagram of an intelligent management system for a pharmaceutical production workshop. Detailed Implementation

[0026] The embodiments of the present invention are described in detail below. The embodiments described below are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention. Where specific techniques or conditions are not specified in the embodiments, they shall be performed in accordance with the techniques or conditions described in the literature in the art or in accordance with the product manual.

[0027] See Figure 1 A smart management method for a pharmaceutical production workshop includes: S1, obtaining the workshop production sequence during pharmaceutical production and extracting the equipment type corresponding to the workshop production sequence.

[0028] S2. Collect images of drug production in the workshop production sequence, use image recognition algorithms to compare drug production images with standard images, identify image differences during production, and set difference analysis results according to the type of difference in the image differences.

[0029] S3. Match the difference analysis results with the equipment type, set up the image difference model related to the production equipment, and output the fault types that exist in each equipment during production.

[0030] S4. Match the fault type output by the image difference model with the workshop production sequence to obtain at least one production control indicator, and determine the workshop scheduling method based on the production control indicator.

[0031] The equipment types mentioned above refer to elevators, bottle unscramblers, pillowcase machines, automatic feeding machines, automatic cartoning machines, and automatic opening, sealing, and palletizing machines used in production. The workshop production sequence describes the working order of these machines in the production of bottled medicines such as glycerin suppositories, as well as the working status of these machines during drug production, such as hardware status, software parameters, and corresponding drug production images before and after production. It should be noted that the image differences mentioned here refer to the differences between the drug production images and standard images, to indicate which process process has a problem when image differences occur.

[0032] When acquiring the production sequence of pharmaceutical products in the workshop, it is also necessary to determine the basic form of the drug. For example, first determine the initial image of products such as glycerin suppositories produced on the production line, the image after liquid filling, and the image after sealing, to compare whether there are any problems with the product at each step. At this time, the images are acquired in real time from the production line and analyzed. Without affecting the overall process, it is possible to identify which link is prone to problems affecting drug quality, such as feeding and sealing. At the same time, it is compared whether the shape of the product itself achieves the designed expansion shape, so that products such as glycerin suppositories can achieve the treatment method of squeezing liquid infusion. Finally, these images are combined into the workshop production sequence according to the production process to complete the control of production quality in the workshop.

[0033] like Figure 2 As shown, the implementation of step S1 also includes: S11, obtaining the standard sequence of drug production, and recording the equipment type, operating parameters and expected output required for each production step according to the progress of the standard sequence.

[0034] S12: Obtain the status information for each production step and construct a mapping relationship between equipment type and production step. The status information obtained at this time indicates whether the corresponding equipment is operating normally under the standard sequence of drug production. Then, construct the mapping relationship between these production steps and equipment types to ensure that there are no equipment errors or execution omissions in the production process.

[0035] S13, based on the mapping relationship between equipment type and production steps, acquire images of each step in the production process, including initial sample image, feeding image, and sealing image; the initial sample image refers to the soft bottle used when producing the drug, the feeding image represents the image before and after filling the drug, and the sealing image represents the image before and after sealing; combine the images of each step into a drug production image.

[0036] S14 outputs the mapping relationship between drug production images and equipment types and production steps as a workshop production sequence.

[0037] In one embodiment of the invention, the pharmaceutical production images include images before and during production. Image processing algorithms (such as edge detection and contour analysis) are used to compare the images before and after production to identify any physical changes or anomalies, such as bottle damage or poor sealing. The data collected in the pharmaceutical production images will differ depending on the process in the current workshop production sequence. For example, the collected pharmaceutical production images will check the integrity and cleanliness of the bottle opening seal, as well as the presence of wrinkles, air bubbles, or unsealed parts. Simultaneously, the dosage and air bubbles present will be compared to identify any problems with the produced products, such as glycerin suppositories.

[0038] To address issues in pharmaceutical production images, noise filtering is applied to the images, converting them into grayscale histograms. These histograms are then used with Canny edge detection, the Sobel operator, and OpenCV's findContours function to detect the bottle neck edge contour, identifying any discontinuities or deviations from the standard template. If these are found, a poor seal is considered. Next, the bottle's integrity is checked, such as analyzing the bottle's contour area and perimeter ratio to identify cracks and gaps. If the contour area and perimeter ratio deviate from the standard template... If the versions are different, it indicates that the bottle is damaged. In this case, the identification of the outline and bottle integrity is done by image difference. The difference between the pixels in the pharmaceutical production image and the standard template is calculated and identified to detect whether there is a missing label or a misalignment on the bottle. The wrinkled parts are identified by the difference calculated from the pixels. Generally, when there is no wrinkle, the difference between the pixels in the pharmaceutical production image and the standard template at the corresponding position is 0. If there is a wrinkle, there will be a corresponding difference. The proportion of the number of pixels with differences to the total number of pixels is recorded to identify wrinkles and unsealed parts. For existing liquid bubbles, pixel-level thresholding is used to segment and extract highlight areas. These highlight areas are then compared with the drug production image and the standard template; areas that remain after image subtraction are identified. The total area of ​​these highlights is calculated to determine the total area of ​​the bubbles. For drug dosage, the dosage is determined by thresholding the drug production image based on the liquid values ​​in the standard template. The corresponding dosage is then obtained by comparing the boundary line representing this dosage with the boundary line in the standard image to detect any increases or decreases in dosage. This dosage boundary line represents the liquid level within the corresponding bottle. If the bottle in the drug production image uses a circular cap, the cap shape can be matched using techniques such as Hough circle detection to identify whether the sealed cap has a circular curve. This can also be done through pixel-level calculations to detect defects and their size.

[0039] When setting image difference points for corresponding equipment types, the images of the current drug production are identified before and after each production step, and compared with standard images to identify any discrepancies. These discrepancies might include marks inside or outside the drug bottle, poor transparency, liquid level deviation, protrusions, or tilted angles or heights at the sealing point after loading. These issues can lead to a decrease in drug quality and a reduced user experience. The images are then sampled from a fixed angle on the production line to check the number of defective products and problems that exist in the production workshop after prolonged operation.

[0040] So, regarding these existing problems, such as Figure 3As shown, the implementation of step S2 includes: S21, comparing the drug production image with the standard image to identify the image differences during drug production. The image differences include appearance differences, sealing differences, and filling differences. These differences mainly address issues such as shaking, uneven feeding, and liquid waste that occur during drug filling, leading to differences in the state of drug production. This identifies potential problems during drug production, provides data support for subsequent drug production management, facilitates the construction of fault models for drug production workshops, and improves the ability to trace and handle drug production problems.

[0041] The differences in appearance refer to whether there are internal or external scratches or other marks on the bottle before and after filling, as well as whether there are obvious rough parts or protrusions on the outside of the bottle. These points will affect the user's actual experience with the medicine. At the same time, since products like glycerin suppositories need to be smooth on the outside, the appearance of the bottle containing the medicine needs to be identified separately to prevent scratches during use.

[0042] For differences in sealing, the images of the bottles containing the medicine are compared at the sealing point after filling to identify whether there are any cases of incomplete or improper sealing, and whether the expansion of the bottle during sealing is consistent with expectations, in order to detect whether there is any leakage.

[0043] Filling difference points identify the liquid level inside the bottle by using cross-sectional images to detect changes in the liquid level. It also records the location and time of feeding, as well as the number of times the liquid has been fed during production, to identify when problems mainly occur during the equipment's operation. At this time, it also records the hydraulic pressure data of the remaining liquid in the feeding machine to analyze the type and label of filling difference points in the image when there are excessively large air bubbles or incorrect filling volume.

[0044] The processing method for identifying appearance differences in pharmaceuticals during production in step S21 further includes: based on the acquired pharmaceutical production image, performing edge recognition on the pharmaceuticals, sequentially acquiring feature description points of the edge regions, and considering the corresponding feature description points as appearance difference points according to their pixel values ​​and distribution locations. These feature description points at this stage represent features corresponding to scratches or bumps present on the pharmaceuticals.

[0045] The processing method for identifying sealing difference points during drug production in step S21 further includes: based on the acquired drug production image, identifying the drug sealing area, obtaining the offset area and offset position of the sealing area relative to the standard image, and setting sealing difference points according to the offset area and offset position of the sealing area.

[0046] The offset area at this point represents the part of the drug production image and the standard image that does not overlap at the corresponding position of the sealing area. Under normal circumstances, the current drug image should overlap with the standard image. If there is a non-overlapping part, there may be a problem with the seal or the sealing angle may be skewed. At the same time, the offset area can also represent the offset of the drug image itself. These contents are regarded as sealing difference points processed at this time according to area and position to determine whether there are differences in the image under the corresponding sealing steps, so as to identify the corresponding problems.

[0047] The processing method for identifying filling difference points during drug production in step S21 further includes: based on the acquired drug generation image, identifying the liquid level of the drug, determining the time point when the liquid level difference occurs, and using the feature corresponding to the liquid level at the corresponding time point as the filling difference point.

[0048] S22, perform difference detection on appearance differences, sealing differences, and filling differences, and obtain the detection configuration table and anomaly description information corresponding to the image difference points; the detection configuration table is a table that sets the content to be detected for appearance differences, sealing differences, and filling differences, such as bottle edge detection, internal and external scratch detection, bottle loading trace detection, bottle sealing height detection, bottle sealing angle detection, bottle liquid level detection, bottle air bubble detection, bottle expansion detection, etc.; the anomaly description information is information describing the detection results corresponding to the content in the detection configuration table.

[0049] S23, generate multiple target detection objects based on the detection configuration table, and obtain the first detection information from the database according to the target detection objects. At this time, the detection configuration table focuses on the detection task itself, that is, to detect the image difference points appearing in the drug production image according to the predetermined detection content, to obtain data that is the same or similar to these, and to compare whether these detections are completed normally; that is, the first detection information is to obtain the image corresponding to the detection task at this time, and to use these corresponding images to compare with the features and description information of the subsequent problems one by one to obtain the difference type that needs to be identified.

[0050] S24. Generate multiple anomaly detection objects based on the anomaly description information, and obtain second detection information from the database according to the anomaly detection objects. At this time, the anomaly description information focuses on the corresponding situation and problem when the corresponding anomaly description is detected. That is, after an anomaly is detected according to the detection configuration table, the features related to these anomaly detection contents are obtained as the second detection information at this time.

[0051] S25, determine the difference type of the image difference points based on the first detection information and the second detection information.

[0052] The obtained image difference types indicate the main problems existing in current drug production, which will be reflected in the produced drugs. These situations are then summarized to obtain a difference analysis result. Using first and second detection information, the difference types of image difference points can be determined through a comparative approach. The features of the first and second detection information are compared, progressively using pixel comparison and distance calculation between features to compare corresponding features in the first and second detection information, filtering out obvious difference points. Then, the difference type is determined according to the form of the difference points, such as color change, texture change, shape change, etc., to describe the difference types present in the image difference points.

[0053] When performing difference detection on image differences, the main targets are appearance difference detection, sealing difference detection, and filling difference detection.

[0054] The appearance difference detection includes detecting bottle edges, scratches, material loading marks, and label misalignment. Edge detection and morphological analysis are used, employing Canny / Sobel edge detection to extract the bottle contour, comparing its shape and continuity with a standard template. Scratch detection utilizes high-contrast enhancement (CLAHE algorithm) and threshold segmentation to identify scratch areas, primarily those with elongated, irregular shapes. The current bottle image is then aligned with a defect-free standard template, and pixel difference detection is used to detect scratches or foreign objects. Simultaneously, for material loading marks, regions of interest are defined, and abnormal grayscale fluctuations are statistically analyzed. These statistically analyzed grayscale values, along with the areas of the defined scratch regions and bottle contours, are labeled to complete the appearance detection of differences in the image.

[0055] The sealing difference detection includes aspects such as sealing height, angle, and sealing ring integrity. Sealing height is detected through contour analysis and geometric measurement, such as using Hough linear transformation to locate the bottle mouth baseline and calculating the pixel distance from the sealing ring to the baseline. Sealing angle detection involves extracting the sealing ring contour and calculating the tilt angle using the minimum bounding rectangle. If the angle of the minimum bounding rectangle of the sealing ring contour deviates from the standard value (e.g., ±2°), an anomaly is triggered. Similarly, if the sealing height is found to be within the standard range, an anomaly is also triggered, thus completing the sealing detection process.

[0056] The detection of fill difference includes liquid level, number of air bubbles, and bottle expansion. Technical methods used include liquid level detection, which involves segmenting the liquid area in the HSV color space using thresholding and edge localization, and locating the liquid surface edge using horizontal projection. If the liquid level is more than 3mm (pixel conversion) below the standard line, it is considered insufficient dosage.

[0057] Bubble detection uses a spot detection method to detect bright circular areas and noise with too small a filter area. If the total area of ​​bubbles exceeds 1% of the bottle's cross-sectional area, it is considered abnormal.

[0058] Bottle expansion detection involves contour comparison, analyzing the curvature changes of the bottle contour before and after production, and using 3D imaging (such as a ToF camera) to detect local expansion. The area of ​​local expansion is recorded to determine the content of the filling detection at that time.

[0059] The detection configuration table and anomaly description information can then be explained, as shown in Table 1 and Table 2.

[0060] Table 1: Detection Configuration Table

[0061]

[0062] Table 2: Anomaly Description Information

[0063]

[0064] Tables 1 and 2 explain the anomaly description information and detection configuration tables used in the current solution. After determining the drug production image, the system selects from these set configuration values ​​and methods according to the different recognition requirements at this time to identify whether there are problems with the currently produced drugs. Then, it outputs the identified areas to obtain the form of the defects. In addition to the technical means shown above, other methods that can achieve the same effect as the technical means indicated above can also be used to perform difference detection on the drug production image in the current solution.

[0065] like Figure 4 As shown, the implementation method for determining the difference type of image difference points in step S25 also includes: S251, based on the first detection information and the second detection information, determining whether the first detection information and the second detection information include selectable fields. Selectable fields represent specific fields outside of normal detection, such as bottle size, bottle material, production date, etc. in normal detection information. However, fields such as bottle surface gloss and bottle color uniformity are generally adjusted according to customer needs and are special fields. In this case, it is necessary to first determine whether there are corresponding fields in the first detection information and the second detection information to determine the occurrence of the data corresponding to these selectable fields, so as to explain the difference type of image difference points.

[0066] S252, if no selectable field is included, extract texture features from the data associated with the first detection information and the second detection information, and set the difference type of the image difference points according to the value of the texture features and the corresponding area.

[0067] If no selectable field is included at this time, it means that the current first and second detection information belong to the conventional detection method. These detection methods will identify the texture of the corresponding drug in the collected drug production image. For example, for appearance difference points, the texture features of whether there are scratches or other texture defects on the appearance are obtained; for sealing difference points, the wrinkles at the sealing position and the texture features during sealing are obtained; for filling difference points, the texture features corresponding to the air bubbles are obtained. These are the main contents detected in normal detection. At this time, it is necessary to determine the main difference type on the image difference points at this time according to the values ​​of these texture features and the area represented by the texture features.

[0068] These texture features can be identified using methods such as gray-level co-occurrence matrix and local binary pattern analysis to analyze the texture features on the bottle surface, identify irregular rough areas or protrusions, and thus complete the basic image recognition of the current medicine.

[0069] S253, if optional fields are included, perform correlation detection on the data associated with the first detection information and the second detection information, and divide them into strong correlation categories and weak correlation categories in turn; adjust the difference type of the image difference points according to the strong correlation category and the weak correlation category.

[0070] If selectable fields are included, it indicates that the current image difference detection process considers several non-routine detection methods, such as the bottle's transparency, shape accuracy, edge smoothness, surface smoothness, expansion, and liquid level threshold compliance. These are non-routine detection methods, typically used less frequently in production sample verification scenarios. This data serves as an evaluation of routine detection methods. When verifying pharmaceutical products based on these criteria, the system identifies strongly correlated and weakly correlated components. Strongly correlated components are easily identified using the features that generate strong correlations, while weakly correlated components require traversing all relevant data for identification. The classification of strong and weak correlation categories indicates the subsequent processing method. Then, the difference types identified using texture features are adjusted according to these two categories, and corresponding strong and weak correlation markers are added to these difference types.

[0071] Regarding the reasons for using strong and weak correlation categories, and how these two categories are verified, the implementation method for correlation detection of data associated with the first and second detection information includes: extracting the average distribution distance and average area difference of the texture features of the first and second detection information; when both the average distribution distance and average area difference of the texture features are greater than preset distribution distance and preset area difference, the data corresponding to the texture feature is set as a weak correlation category; when both the average distribution distance and average area difference of the texture features are less than preset distribution distance and preset area difference, the data corresponding to the texture feature is set as a strong correlation category. Here, the average distribution distance represents the average relative distance of texture features during image recognition, and the average area difference is also the average area corresponding to the texture feature. When both the average distribution distance and average area difference are greater than preset values, it indicates that the relative distance of the texture features is far during recognition, and the correlation is weak; while when they are less than preset values, it indicates that they are relatively close, and the correlation is strong, and these features are easily identified together. At this time, using strong and weak correlation categories can improve the traceability of subsequent data processing, thereby improving the accuracy and traceability of drug identification.

[0072] In one embodiment of the present invention, an image difference model is set up to analyze existing image difference points together with equipment type to identify problems that arise during the production of drugs such as glycerin suppositories when common image differences occur. The problems mainly lie in which equipment is used in the production process and which specific step in the production process is problematic. Based on these contents, an image difference model is set up to establish drug production prediction, thereby improving the safety of drug production.

[0073] like Figure 5 As shown, the implementation of the image difference model in step S3 includes: S31, connecting the difference analysis result with the device type, and determining multiple connection difference labels after connecting the difference analysis result with the device type; the connection difference label indicates whether the device type will have a corresponding difference type when the difference type in the difference analysis result is connected with the device type. For example, if the currently identified difference type is the difference on the appearance edge, then if the device type corresponds to the device that produces or involves operations on the corresponding position of the difference point, then a connection difference label is set to determine whether the currently used device is the source or one of the sources of the current drug production problem; the connection difference label is set according to the probability value of the current device type and the difference analysis result co-occurring.

[0074] In order to improve the matching degree between the difference analysis results and the device type, when matching these two values, it is also necessary to connect the nodes corresponding to the difference analysis results with the nodes corresponding to the device type in sequence according to the identification time of the difference type.

[0075] S32, using connection difference labels, construct a connection difference network corresponding to the difference analysis results and equipment types. In the connection difference network, nodes can represent difference analysis results or equipment types. Edges represent the connection relationship between difference points and equipment types, i.e., connection difference labels. The resulting connection difference network will be used for image difference analysis as an image difference model related to the current production equipment. Then, based on the analysis results of the connection difference network, the fault types that need to be prioritized are determined.

[0076] S33, select any two nodes in the connection difference network, and determine the shortest path between each node in turn; divide the shortest path between each node according to the difference type and the value of the connection difference label to obtain multiple sub-paths.

[0077] The shortest path between nodes is determined using Dijkstra's algorithm or Breadth-First Search (BFS) to partition the nodes in the connection difference network. Then, the shortest paths are initially classified according to the difference type of each node. Finally, these paths are further divided according to the value of the connection difference label to obtain multiple sub-paths.

[0078] S34. Calculate the path probability and path length of each sub-path, and select the corresponding fault type based on the path probability and path length of each sub-path. The path probability of each sub-path represents the sum of the probability values ​​corresponding to the connection difference labels on this sub-path, and the path length represents the number of edges on the sub-path. After obtaining the path probability and path length of each sub-path, these values ​​are compared with the preset fault types in the database, and the fault type with the largest calculated cosine similarity or Euclidean distance value is taken as the fault type of these sub-paths. The data represented by these sub-paths will be classified under the corresponding fault type. At the same time, the nodes on each sub-path have difference types or equipment types, which facilitates subsequent data backtracking for these fault types to obtain the source of the problem in the current drug production.

[0079] Based on the path probability and path length of each sub-path, selecting the corresponding fault type also includes: determining the number of times each sub-path is constructed, identifying the neighbor nodes corresponding to each sub-path under different construction counts, extracting the texture features of the neighbor nodes of each sub-path, calculating the texture feature differences of the neighbor nodes corresponding to each sub-path under different construction counts, and using the texture feature differences of the neighbor nodes to classify the selected fault type to obtain multiple fault types with texture differences. The number of times a sub-path is constructed is represented as the number of times the sub-path is formed or identified in the construction of the entire connection difference network. The number indicated here is biased towards the number of times the sub-path is considered to be a specific difference type and connection difference label when the shortest path is used to divide each sub-path. At this time, the nodes corresponding to these counts are identified, and the corresponding neighbor nodes are identified. After obtaining the differences of these neighbor nodes, the fault type corresponding to these node differences can be known, which improves the accuracy and detail of fault type classification, enabling more information to be obtained during subsequent data backtracking, and helping to locate the specific source of problems in drug production.

[0080] In one embodiment of the present invention, after processing the fault type in step S4, the fault type is matched with the data collected in the workshop production sequence to determine the distribution of the fault type in the collected data, so as to understand where the faults are mainly distributed. At this time, the production control indicators obtained not only include the efficiency of the equipment in producing medicines and the normal production time, but also the fault distribution ratio and filling deviation of defective products existing per unit time. For example, if a fault type of poor sealing is detected, the occurrence of this fault type at the corresponding time and the proportion of the corresponding defective quantity to the total will be calculated, and the control indicators will be generated to represent the calculated values. Then, the workshop scheduling method is determined according to the values ​​of the production control indicators.

[0081] like Figure 6 As shown, the implementation of step S4 includes: S41, judging the workshop production status based on the acquired fault type, and determining the fault node in the workshop production sequence that corresponds to the fault type.

[0082] S42 records the number of faulty nodes under different fault types, and retrieves the first control index from the database using the number and distribution probability of faulty nodes as search criteria. The first control index mainly reflects the macroscopic statistical characteristics of faults in the workshop production sequence, such as the total number of faulty nodes and the proportional distribution of various types of faults. This information helps to grasp the production status of the workshop from a macroscopic perspective.

[0083] S43, calculate the fault distribution ratio and filling deviation degree of the faulty node, and use the fault distribution ratio and filling deviation degree of the faulty node as search conditions to retrieve the second control index from the database. The second control index focuses more on the micro-analysis of the faulty node. Through indicators such as the fault distribution ratio and filling deviation degree, we can gain a deeper understanding of the specific situation of each faulty node and the production details of the workshop.

[0084] The failure distribution ratio typically refers to the proportion of a particular type of failure among different types or causes of failure. This ratio reflects the main types and causes of system failures, helps identify failure modes, analyze failure mechanisms, and provides a basis for developing failure prevention and maintenance strategies.

[0085] The degree of filling deviation is a more specific concept. It is usually used to describe the degree of difference between the actual value and the ideal or expected value of a specific parameter or indicator. Here, the degree of filling deviation is used to represent the difference value of the feature corresponding to the difference point in the image when filling the drug, or the difference value between the filling liquid and the normal standard. After standardizing this value and eliminating the corresponding dimensions, it is used to describe whether the corresponding fault type will affect the quantity and accuracy of the filling liquid.

[0086] S44, perform fitness testing on the first control index and the second control index, and use the first control index and the second control index that meet the fitness test as the production control index.

[0087] The implementation method for fitness testing of the first and second control indicators includes: calculating fitness scores for the first and second control indicators respectively; for example, setting a standard value for the first and second control indicators under different fault types, which is based on the average value calculated for normal products under the corresponding control indicators in historical data; subtracting the actual values ​​of the first and second control indicators at this time from the standard value, and finding the ratio between the standard value and the minimum acceptable value; finally, subtracting this ratio from one to obtain a fitness score; then constructing a mapping relationship between the first and second control indicators according to their data sources, and calculating the average fitness score according to the mapping relationship between the first and second control indicators, thus completing the fitness test; when the average fitness score exceeds a preset fitness value, the corresponding first and second control indicators are used as production control indicators; the preset fitness value is the average fitness score in historical data, indicating that only when the values ​​of the two indicators meet the standard will they be used as control indicators for subsequent major adjustments to the production process.

[0088] Once the production control indicators are obtained, the corresponding equipment in the current pharmaceutical workshop is adjusted according to the values ​​of the production control indicators, thereby realizing the workshop scheduling method. For example, the production control indicators are used to search for the corresponding scheduling methods in the database, and the scheduling method with the highest correlation is used as the workshop scheduling method. The method with the highest correlation can be determined by using correlation coefficients, such as Pearson's rank coefficient, Kendall's rank correlation coefficient, etc. The part with the largest value of the corresponding scheduling method in the database and the current production control indicator is output to obtain the final workshop scheduling method.

[0089] like Figure 7 As shown, in one embodiment of the present invention, the present invention also provides an intelligent management system for a pharmaceutical production workshop, including: a data acquisition module, an image recognition module, a fault type matching module, a production control module, and a database management module.

[0090] The output of the data acquisition module is connected to the image recognition module, the output of the image recognition module is connected to the fault type matching module, the output of the fault type matching module is connected to the production control module, and the output of the production control module is connected to the database management module.

[0091] The data acquisition module is responsible for acquiring the workshop production sequence during drug production, including equipment type and operating parameters, and collecting image data during the drug production process.

[0092] The image recognition module is used to compare pharmaceutical production images with standard images using image recognition algorithms, identify differences between the images, and set the difference analysis results.

[0093] The fault type matching module is used to match the difference analysis results with the equipment type, construct an image difference model, and output the fault type.

[0094] The production control module is used to match the fault types output by the image difference model with the workshop production sequence, obtain production control indicators, and determine the workshop scheduling method.

[0095] The database management module is used to store standard images, detection configuration tables, anomaly description information, and data corresponding to device types, and provides data retrieval functions.

[0096] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention, which are still covered within the protection scope of the present invention.

Claims

1. An intelligent management method for a pharmaceutical production workshop, characterized in that, include: S1. Obtain the workshop production sequence during drug production and extract the equipment type corresponding to the workshop production sequence; S2. Collect images of drug production in the workshop production sequence, use image recognition algorithms to compare drug production images with standard images, identify image differences during production, and set difference analysis results according to the type of difference in the image differences. S3. Match the difference analysis results with the equipment type, set up the image difference model related to the production equipment, and output the fault types of each equipment during production. S4. Match the fault type output by the image difference model with the workshop production sequence to obtain at least one production control indicator, and determine the workshop scheduling method based on the production control indicator. Step S3 includes: S31, Connect the difference analysis results with the equipment type, and determine multiple connection difference labels after connecting the difference analysis results with the equipment type; S32, using connectivity difference labels, construct a connectivity difference network corresponding to the difference analysis results and device types; S33, select any two nodes in the connection difference network, and determine the shortest path between each node in turn; divide the shortest path between each node according to the difference type and the value of the connection difference label to obtain multiple sub-paths; S34, calculate the path probability and path length of each sub-path, and select the corresponding fault type based on the path probability and path length of each sub-path. Based on the path probability and path length of each sub-path, selecting the appropriate fault type also includes: Determine the number of times each sub-path is constructed, identify the neighbor nodes corresponding to each sub-path under different construction counts, extract the texture features of the neighbor nodes of each sub-path, calculate the texture feature differences of the neighbor nodes corresponding to each sub-path under different construction counts, and use the texture feature differences of the neighbor nodes to classify the selected fault types.

2. The intelligent management method for a pharmaceutical production workshop according to claim 1, characterized in that, The implementation of step S1 also includes: S11, Obtain the standard sequence of drug production, and record the equipment type, operating parameters and expected output required for each production step according to the standard sequence. S12, obtain the status information of each production step, and construct the mapping relationship between equipment type and production step; S13, based on the mapping relationship between equipment type and production steps, acquire images of each step in the production process, including initial sample image, feeding image, and sealing image; S14 outputs the mapping relationship between drug production images and equipment types and production steps as a workshop production sequence.

3. The intelligent management method for a pharmaceutical production workshop according to claim 1, characterized in that, Step S2 can be implemented in the following ways: S21, compare the drug production image with the standard image to identify the image differences during drug production. The image differences include appearance differences, sealing differences, and filling differences. S22, perform difference detection on appearance difference points, sealing difference points and filling difference points, and obtain the detection configuration table and anomaly description information corresponding to the image difference points; S23, generate multiple target detection objects based on the detection configuration table, and obtain the first detection information from the database according to the target detection objects; S24, generate multiple anomaly detection objects based on anomaly description information, and obtain second detection information from the database based on the anomaly detection objects; S25, determine the difference type of the image difference points based on the first detection information and the second detection information.

4. The intelligent management method for a pharmaceutical production workshop according to claim 3, characterized in that, Step S25 also includes: S251, Based on the first detection information and the second detection information, determine whether the first detection information and the second detection information include selectable fields; S252, if there is no selectable field, extract texture features from the data associated with the first detection information and the second detection information, and set the difference type of the image difference points according to the value of the texture features and the corresponding area. S253, if optional fields are included, perform correlation detection on the data associated with the first detection information and the second detection information, and divide them into strong correlation categories and weak correlation categories in turn; adjust the difference type of the image difference points according to the strong correlation category and the weak correlation category.

5. The intelligent management method for a pharmaceutical production workshop according to claim 4, characterized in that, The methods for performing correlation detection on data associated with the first and second detection information include: Extract the average distribution distance and average area difference of the texture features of the first detection information and the second detection information; when the average distribution distance and average area difference of the texture features are both greater than the preset distribution distance and preset area difference, set the data corresponding to the texture feature as a weak correlation category; when the average distribution distance and average area difference of the texture features are both less than the preset distribution distance and preset area difference, set the data corresponding to the texture feature as a strong correlation category.

6. The intelligent management method for a pharmaceutical production workshop according to claim 1, characterized in that, Step S4 can be implemented in the following ways: S41, Based on the acquired fault type, determine the workshop production status and identify the fault node in the workshop production sequence that corresponds to the fault type; S42, record the number of fault nodes under different fault types, and use the number and distribution probability of fault nodes as search conditions to retrieve the first control index from the database; S43, calculate the fault distribution ratio and filling deviation of the faulty nodes, and use the fault distribution ratio and filling deviation of the faulty nodes as search conditions to retrieve the second control index from the database. S44, perform fitness testing on the first control index and the second control index, and use the first control index and the second control index that meet the fitness test as the production control index.

7. The intelligent management method for a pharmaceutical production workshop according to claim 6, characterized in that, The methods for implementing fitness testing using the first and second control indices include: Fitness scores are calculated for the first control index and the second control index respectively. A mapping relationship is constructed between the first control index and the second control index according to their data sources. The average fitness score is calculated according to the mapping relationship between the first control index and the second control index. When the average fitness score exceeds the preset fitness value, the corresponding first control index and the second control index are used as production control indicators.

8. An intelligent management system for a pharmaceutical production workshop, characterized in that, include: The data acquisition module is responsible for acquiring the workshop production sequence during drug production, including equipment type and operating parameters, and collecting image data during the drug production process. The image recognition module is used to compare pharmaceutical production images with standard images using image recognition algorithms, identify differences between the images, and set the difference analysis results. The fault type matching module is used to match the difference analysis results with the equipment type, construct an image difference model, and output the fault type; The production control module is used to match the fault types output by the image difference model with the workshop production sequence, obtain production control indicators, and determine the workshop scheduling method. The database management module is used to store standard images, detection configuration tables, anomaly description information, and data corresponding to device types, and provides data retrieval functions.

Citation Information

Patent Citations

  • Intelligent management system for soft capsule production workshop based on Internet of Things

    CN117114511A

  • Production workshop management system and method based on data analysis

    CN118627860A

  • Defective product analysis method and system for intelligent manufacturing

    CN114219799A