A probiotic tablet production traceability method and system
By adopting the watershed algorithm and SHA-256 encryption technology in the production of probiotic tablets and integrating production process data with colony image features, the problems of incomplete data and insufficient security in traditional traceability methods are solved, a full-process, dynamic traceability system is realized, and the accuracy of product quality assessment and data security are improved.
Patent Information
- Application Number
- CN202510748281.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-06-06
AI Technical Summary
Among the existing traceability methods for probiotic tablet production, traditional traceability technology mainly relies on static data and ignores the dynamic information in colony images, resulting in the inability to accurately identify the true boundaries of colonies and affecting the accuracy of product quality assessment.
Combined with image processing technology, the watershed algorithm is used for dynamic threshold segmentation to extract the geometric and texture features of the colonies. A unique traceability code is formed through SHA-256 encryption. The production process data and the image features of the pilot amplified colonies are integrated to build a full-process, dynamic traceability system.
It realizes full-process data tracking and encrypted traceability of the probiotic tablet production process, improves the accuracy and anti-tampering capability of product traceability, and ensures the integrity and security of the data.
Smart Images

Figure CN120259676B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and in particular to a probiotic tablet production traceability method and system. Background Art
[0002] With increasing demands for health and food safety, probiotic tablets, as a functional food with the potential to regulate intestinal flora and enhance immunity, are attracting widespread attention from consumers and regulators. The production process of probiotic tablets involves multiple steps, making the establishment of a comprehensive, real-time, and accurate traceability system crucial. However, traditional traceability methods primarily focus on collecting single production parameters such as temperature, humidity, pH, equipment number, and pressure, with limited research on real-time dynamic monitoring of colony growth during the production process. Existing technologies typically employ fixed sampling frequencies and static data acquisition methods, overlooking the rich information contained in colony images, such as colony geometry, edge texture, and changes in growth rate. Due to complexities such as uneven colony distribution and noise during probiotic expansion and cultivation, single parameter collection cannot fully capture subtle changes during the production process, hindering accurate assessment of final product quality. Therefore, the urgent technical challenge of integrating data and enabling real-time traceability by combining traditional traceability parameters with image processing techniques to extract colony features has become a pressing issue.
[0003] Currently, some existing technologies use sensors to monitor production environment parameters in real time and upload the data to traceability databases. However, these methods have significant deficiencies in image information processing. For example, when processing bacterial colony images, fixed threshold segmentation algorithms are often used. This is prone to segmentation errors caused by noise or grayscale fluctuations, making it impossible to accurately identify the true boundaries of bacterial colonies, resulting in incomplete and inaccurate traceability data. Summary of the Invention
[0004] In response to the above-mentioned problem of being unable to accurately identify the true boundaries of colonies, in the first aspect, the present invention proposes a method for tracing the production of probiotic tablets, comprising: obtaining relevant parameters of each process in the production process of probiotic tablets to obtain a traceability data matrix; collecting a colony image at set intervals in the probiotic pilot amplification process, and using a watershed algorithm to segment the colony image to obtain a corresponding colony segmentation image; extracting the geometric features and texture features of multiple colonies in the colony segmentation image, and using the geometric features and texture features as supplementary traceability parameters to splice with the traceability data matrix to obtain a complete traceability set; using an encryption algorithm to process the complete traceability set to obtain a traceability code and spraying the code on the minimum packaging unit of the probiotic tablet. ; The watershed algorithm also includes multiplying the basic threshold of the H transform by the adjustment value to obtain a dynamic threshold, and the adjustment value is obtained by a series of predetermined mathematical operations including logarithmic operations and hyperbolic tangent operations on the growth rate gradient, the colony space density and the set adjustment coefficient; obtaining multiple connected domains in the colony image, and taking the geometric center of each connected domain as the coordinate of the initial planting point of the colony; calculating the coordinate variance and coordinate mean of all coordinates, obtaining the Euclidean distance of each coordinate and the coordinate mean, and obtaining the colony space density according to the ratio of the Euclidean distance to the coordinate variance; calculating the difference between the edge gradient amplitude of each colony in the colony image and the colony image before the set time interval to obtain the growth rate gradient.
[0005] This method integrates production process data with geometric and textural features extracted from pilot-scale amplified bacterial colony images, employs a dynamic threshold watershed algorithm to precisely segment the images, and then uses SHA-256 encryption to create a unique traceability code, enabling full-process data tracking and encrypted traceability. This method effectively overcomes the shortcomings of traditional technologies that rely solely on static production parameters, lack dynamic image monitoring, and suffer from incomplete data and insufficient security, significantly improving the accuracy and tamper-proofing of product traceability.
[0006] Furthermore, the dynamic threshold is calculated as follows:
[0007] ;
[0008] in Indicates the base threshold of H transformation; represents the adjustment coefficient; and represent the growth rate gradient and colony spatial density, respectively; represents the hyperbolic tangent function; Represents a symbolic function.
[0009] Furthermore, the calculation method of the colony space density is specifically as follows:
[0010] ;
[0011] in Indicates the spatial density of the colony; Represents the estimated number of colonies, specifically the number of independent connected domains in the colony image; ( ) represents the natural exponential function; Indicates the The coordinates of the initial planting point of each colony; represents the coordinate mean of all initial planting points; represents the coordinate variance of all initial planting points; represents the Euclidean norm.
[0012] The present invention quantitatively analyzes the initial planting points of the colony by adopting the natural exponential function and mean and variance calculations, thereby achieving accurate calculation of the spatial density of the colony. Compared with the traditional rough estimation method, it more objectively reflects the colony distribution characteristics and provides accurate data support for subsequent dynamic feature extraction.
[0013] Furthermore, the calculation method of the growth rate gradient is specifically as follows:
[0014] ;
[0015] in represents the growth rate gradient of the colony; Indicates the set time interval; Indicates the The coordinates of the colony image at the moment The Sobel gradient amplitude at ; Indicates the area in the colony image where the gradient amplitude is greater than the set threshold; represents the Euclidean norm; Represents a very small positive number.
[0016] The present invention uses the edge gradient changes in images at adjacent time points to calculate the colony growth rate gradient, effectively capturing the colony growth dynamics, overcoming the deficiency of the existing technology that cannot reflect the colony growth status in real time, and thus realizing the fine monitoring of the dynamic process.
[0017] Furthermore, the relevant parameters of each process include:
[0018] The strain number of the strain selection process; the temperature, humidity and pH value of the culture and amplification process; the fermentation tank number of the fermentation process; the drying equipment number and the drying method code of the drying and powder making process; the mass ratio of bacterial powder to each excipient in the formulation design and excipient mixing process; the granulation equipment number, tablet pressing equipment number and the tablet pressing equipment pressure in the granulation and tablet forming process; the coating equipment number and coating thickness in the coating process; the number of viable bacteria after random inspection in the quality inspection process; the packaging equipment number and packaging date in the packaging and storage process.
[0019] Furthermore, it also includes preprocessing operations on the colony image, specifically: performing HSV space conversion on the colony image to obtain an HSV colony image; performing threshold segmentation using the Otsu algorithm based on the S channel in the HSV colony image to obtain a segmented image; and performing a morphological opening operation on the segmented image.
[0020] Image preprocessing is performed using HSV color space conversion, Otsu algorithm segmentation, and morphological opening operations to effectively remove noise and highlight colony features. Compared with traditional unprocessed images, the segmentation results are clearer and more accurate, laying a solid foundation for subsequent feature extraction.
[0021] Furthermore, obtaining multiple connected domains in the colony image further includes: performing 8-neighborhood connectivity analysis on the preprocessed colony image to obtain multiple connected domains.
[0022] Furthermore, extracting the geometric features and texture features of multiple colonies in the colony segmentation image also includes: using the cv2.findContours() function in openCV to extract the contour of each colony and using cv2.contourArea() to calculate the contour area; using cv2.arcLength() to calculate the contour perimeter; using the Sobel operator to extract the edge gradient and calculate the mean; using the LBP algorithm to extract the texture features of each colony to obtain the LBP value.
[0023] By using cv2.findContours, cv2.contourArea, cv2.arcLength, Sobel operator and LBP algorithm to comprehensively extract colony contour, area, perimeter, edge gradient and texture features, the present invention provides a comprehensive and quantitative description of colony morphology. Compared with traditional technologies that only collect a single parameter, it significantly enhances the uniqueness and identification accuracy of traceability data.
[0024] Furthermore, the encryption algorithm is the SHA-256 hash encryption algorithm.
[0025] In a second aspect, the present invention provides a probiotic tablet production traceability system, comprising a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the probiotic tablet production traceability method of the present invention is implemented.
[0026] The technical effects of the present invention are:
[0027] The present invention integrates the traditional parameter data of each key link in production with the dynamic features extracted from the colony image in the pilot amplification stage. It accurately segments the image through the dynamic threshold watershed algorithm and uses a quantitative method to calculate the colony space density and growth rate gradient, thereby achieving comprehensive capture of colony characteristics. Combining SHA-256 encryption and blockchain evidence storage technology, a full-process, dynamic, and tamper-proof probiotic tablet traceability system has been constructed. Compared with existing traceability solutions that rely only on static data, the present invention greatly improves the integrity, security, and traceability accuracy of the data, providing a new technical solution for functional food quality supervision. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an illustrative and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0029] Figure 1 is a flow chart schematically illustrating a method for tracing the production of probiotic tablets according to an embodiment of the present invention;
[0030] Figure 2 The figure schematically shows the structural block diagram of the probiotic tablet production traceability system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0031] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work shall fall within the scope of protection of the present invention.
[0032] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0033] An embodiment of a probiotic tablet production traceability method:
[0034] like Figure 1 As shown, the probiotic tablet production traceability method of the present invention includes:
[0035] S1. Based on the production process of probiotic tablets, the traceability parameters of each process are obtained to obtain the traceability data matrix.
[0036] As a functional food, the quality and safety of probiotic tablets are directly related to the health of consumers. The production process of probiotic tablets typically involves multiple steps, such as strain selection, amplification culture, and fermentation, all of which may affect the viable count, stability, and safety of the final product. Therefore, in this embodiment, a comprehensive traceability system can be established to track every production step of probiotic tablets from raw materials to finished product, ensuring the controllability and consistency of product quality while providing consumers with transparent product information and enhancing their trust.
[0037] For common probiotic tablets, the production process usually includes the following processes: strain selection, culture and amplification, fermentation, drying and powdering, formula design and auxiliary material mixing, granulation and tablet forming, coating, quality inspection, packaging and storage, as well as output and transportation.
[0038] In one embodiment, the selected strain number can be recorded in the strain selection process And upload it to the traceability database; during the culture and amplification process, the temperature of the incubator is regularly monitored by temperature and humidity sensors and humidity , and regularly collect pH values through a pH meter After obtaining the above multiple parameters to form the parameter time series, the Kalman filter algorithm is used to smooth the temperature time series and humidity time series to eliminate sensor noise and obtain as well as The pH value time series was normalized using the Z-score algorithm to obtain , so far the traceability parameter set of the culture and amplification process has been obtained , and there are , and the collection Upload to the traceability database; record the fermentation tank number in the fermentation process And upload it to the traceability database; record the number of the drying equipment in the drying and milling process , and then use One-Hot coding to record the drying method , for example: freeze drying can be coded as [1,0], and spray drying can be coded as [0,1], then the traceability parameter set of drying and milling process is recorded as , and there are And upload it to the traceability database; record the mass ratio of bacterial powder to each excipient in the formula design and excipient mixing process ,in Represents the total number of excipient categories. Here, the traceability parameter set of the formula design and excipient mixing process is recorded as , and there are And upload it to the traceability database; in the granulation and tablet forming process, record the granulation equipment number and tablet pressing equipment number Then, the pressure of the tablet pressing equipment is obtained through the pressure sensor at regular intervals. After obtaining the corresponding pressure time series, the noise generated by the equipment vibration is removed by wavelet transform. , then the granulation and tablet forming processes have a traceability parameter set , and there are And upload it to the traceability database; record the coating equipment number in the coating process and coating thickness , then the coating process has a traceability parameter set , and there are And upload it to the traceability database; use the plate count method to record the number of viable bacteria after random inspection during the quality inspection process And upload it to the traceability database; record the packaging equipment number in the packaging storage process and packaging date , then the packaging storage process has a traceability parameter set , and there are And upload it to the traceability database; finally, since the probiotic tablets leave the factory and are transported after the traceability code is printed, this process no longer obtains relevant data. The preprocessing algorithm involved in collecting the traceability parameters of each process is well known in the art and will not be described here.
[0039] It should be noted that if traceability parameters need to be recorded regularly during the production process of the above-mentioned probiotic tablets, such as temperature, humidity, pH value of the culture and amplification process, and pressure of the granulation and tablet forming process, the collection frequency can be set to once every two hours in this embodiment. The implementer can also set the collection frequency to every half hour, every hour, or every four hours according to the culture time of different probiotics.
[0040] At this point, all traceability parameter sets of the probiotic tablet production process have been obtained and uploaded to the traceability database. The traceability parameter sets of each process are obtained from the traceability database and spliced to obtain the traceability data matrix. , and there is:
[0041] ;
[0042] in Indicates the traceability parameters of strain selection; Indicates traceability parameters for culture and amplification, Indicates the traceability parameters of fermentation; Indicates traceability parameters for drying and milling; Traceability parameters indicating formulation design and excipient mixing; Indicates traceability parameters for granulation and tablet forming; Indicates the traceability parameters of the coating; Indicates the traceability parameters of quality inspection; Indicates the traceability parameters of packaging storage; Indicates data splicing symbol.
[0043] S2. Capture the colony image during the pilot expansion process; obtain the colony spatial density by estimating the coordinates of the initial colony planting point and the number of colonies; obtain the colony growth rate gradient based on the gradient amplitude of the colony image; obtain the control factor based on the colony spatial density and growth rate gradient; adjust the threshold H through the control factor and complete the colony image segmentation based on the watershed algorithm of the dynamic threshold H to obtain a colony segmentation image.
[0044] In the production process of probiotic tablets, pilot expansion is a key process. The colony image of this process reflects the growth status of probiotics during the expansion culture process, and its quality determines the success rate of subsequent fermentation tank culture, and also determines the quality of the probiotic tablets produced subsequently. Therefore, in this embodiment, the pilot expansion process of probiotics can be used as a key traceability step.
[0045] S2.1. Take images of the colonies during the pilot expansion process; obtain the spatial density of the colonies by estimating the coordinates of the initial colony planting point and the number of colonies.
[0046] First, the characteristics of different colonies can be obtained by obtaining colony images during the pilot amplification process and segmenting them. The characteristics of different colonies are then used as supplementary traceability parameters. Finally, the traceability data matrix and the supplementary traceability parameters are used together as a complete traceability set. It is clear that the growth process of different batches of probiotics cannot remain the same. Therefore, the probiotic colony characteristics obtained through pilot amplification are unique, which can ensure the uniqueness of the final traceability code. In addition, after segmenting the colony image to obtain different colonies, the status of the colonies in that batch can also be evaluated and analyzed to determine whether they can be used for fermentation culture.
[0047] In this embodiment, the watershed algorithm can be used to segment the pilot-scale amplified colony image. The watershed algorithm regards the image as a topographic map, regards areas with lower grayscale values as "basins", and areas with higher grayscale values as "peaks", and simulates the flow of water from low to high, eventually forming a "watershed" at the junction of the basins. In practical applications, in order to avoid unnecessary segmentation due to noise or slight grayscale fluctuations, H-minima transformation is usually combined to suppress local minima. However, when the initial planting points of the colony are unevenly distributed, the mycelium growth rate is different, or the edge is interfered by gray light, the fixed threshold H cannot accurately distinguish between real colonies and false candidate areas, which may lead to unsatisfactory segmentation results.
[0048] The spatial distribution of the initial colony planting point is a key factor affecting the segmentation difficulty. Therefore, in this embodiment, the colony spatial density can be evaluated by estimating the coordinates of the initial colony planting point and the number of colonies. , the specific calculation methods are:
[0049] First, a high-definition macro lens with a resolution of no less than 1080p was used to capture the RGB colony image of the pilot amplification. The RGB colony image was then converted to the HSV spatial format to extract the saturation S channel to enhance the contrast between the colony and the background. The Otsu algorithm was then used to generate a binary mask image based on the S channel, setting the colony area to 0 and the background area to 1. Morphological opening was then used to remove tiny noise points and retain the complete colony area. The image after the opening operation was then subjected to 8-neighborhood connectivity analysis to mark each independent region, and the total number of independent connected domains was recorded as ; Finally, calculate the geometric center of each independent connected domain as the initial cluster center set of the K-means clustering algorithm Then use the K-means clustering algorithm to obtain multiple clusters and set the cluster centers of the clusters The coordinate set of the final planting point.
[0050] The input of the K-means clustering algorithm includes the image after the opening operation, the number of clusters, the initial centroid, the distance measurement method, the maximum number of iterations, and the convergence threshold. In this embodiment, the number of clusters can be set to the total number of independent connected domains. , set the initial centroid to , set the distance metric to Euclidean distance, set the maximum number of iterations to the empirical value of 100, and set the convergence threshold to the empirical value of 1e-4; the output of the algorithm is the cluster and the center of the cluster, and the cluster center coordinate set can be As the coordinates of each planting point. The above-mentioned K-means clustering algorithm, Otsu algorithm and morphological opening operation are well-known technologies and will not be described here. Then the colony space density is:
[0051] ;
[0052] in Indicates the spatial density of the colony; Indicates the estimated number of colonies; ( ) represents the natural exponential function; Indicates the The coordinates of the initial planting point of each colony; Represents the coordinate mean of all planting points, , which reflects the overall position center; It represents the variance of the planting point coordinates and reflects the degree of distribution dispersion. ; represents the Euclidean norm.
[0053] When the planting points are more concentrated, The smaller, The closer it is to 0, the smaller the distance between each point and the mean. ( ) approaches 1, then The closer it is to 1, the more dense the colonies are and the easier it is to form adhesions. On the contrary, when the planting points are more dispersed, The larger the exponential function ( ) approaches 0, then The closer it is to 0, the more independent the distribution of colonies.
[0054] S2.2. Obtaining a colony growth rate gradient based on the gradient amplitude of the colony image; and obtaining a control factor based on the colony spatial density and the growth rate gradient.
[0055] The growth rate and edge expansion of the colony can be reflected by the change of the image gradient. Therefore, in this embodiment, the edge gradient change rate can be calculated by using the images of adjacent time points to obtain the dynamic growth information of the colony edge and calculate the growth rate gradient of the colony. , specifically:
[0056] ;
[0057] in represents the growth rate gradient of the colony; Indicates the set time interval, which can be set to an empirical value of 120 minutes in this embodiment; Indicates the The coordinates of the colony image at the moment The Sobel gradient amplitude at is used to reflect the edge strength; Indicates the selected high-effective area. In this embodiment, it can be set to the area with the top 10% gradient value in the colony image to ensure that the main edge is focused; represents the Euclidean norm; It represents a very small positive number to prevent the denominator from being 0. In this embodiment, it can be set to an empirical value of 1e-6.
[0058] When the edge of the colony grows rapidly, the gradient amplitude increases. ,but is also greater than 0, indicating that the image edge density is enhanced; when the growth stagnates or slows down, the gradient changes tend to 0. ; Close to 0 or negative. Further quantify the segmentation reliability based on the colony growth status and construct a regulatory factor , specifically:
[0059] ;
[0060] in represents regulatory factors; Represents a sign function used to indicate the growth direction. A positive value indicates accelerated growth; represents the natural logarithm function; represents the growth rate gradient of the colony; Indicates the spatial density of the colony.
[0061] when is positive, and the colony space density The closer it is to 1, The larger the value, the denser the colony and the faster the growth rate. The bigger; when is negative or 0, and the colony space density The closer it is to 0, The closer it is to 0, the colony is relatively dispersed and growth is stagnant, and the regulatory factor The smaller it is and closer to 0.
[0062] S2.3. Adjust the threshold H through the control factor and complete the segmentation of the colony image based on the watershed algorithm of the dynamic threshold H to obtain the colony segmentation image.
[0063] In order to make the suppression threshold of H-minima transformation better adapt to different bacterial colony images, in this embodiment, the control factor The baseline threshold is dynamically modified. The improved dynamic threshold calculation formula is as follows:
[0064] ;
[0065] in represents the dynamic threshold; represents the baseline threshold; represents the adjustment coefficient, which is used to limit the amplitude of the threshold change. In this embodiment, it can be set to an empirical value of 0.5; Represents the hyperbolic tangent function, which is used to adjust the control factor Mapped to the interval [-1,1].
[0066] when When the value is positive and the larger it is, the more dense the colonies are and the faster the growth rate is. In this case, the threshold H should be increased to avoid the adhesion of adjacent colonies due to blurred edges. The bigger; and when When it approaches 0, it means that the colony is relatively independent and grows slowly. A relatively low threshold H should be maintained to capture subtle boundaries. Relatively small; when When it is a negative value, it indicates that the colony may be deteriorating and shrinking, and the threshold H needs to be further lowered to identify potential separation points. Smaller.
[0067] So far, the dynamic threshold of H-minima transformation has been obtained During the pilot expansion of probiotics, colony images were collected every two hours and dynamic thresholding was used. The watershed algorithm is used to segment it and obtain the corresponding colony segmentation image.
[0068] S3. Extract colony features based on the colony segmentation image obtained in step S2 to obtain supplementary traceability parameters, combine the supplementary traceability parameters with the traceability data matrix obtained in step S1 to obtain a complete traceability set, use a hash function to encrypt the complete traceability set to generate a traceability code, and print it on the smallest packaging unit of the probiotic tablets, and upload it to the blockchain for evidence storage.
[0069] After obtaining the colony segmentation image in step S2, the area of each colony can be counted ,perimeter , edge average gradient and texture features In this embodiment, the cv2.findContours() function in openCV can be used to extract the contour of each colony and use cv2.contourArea() to calculate the contour area, and use cv2.arcLength() to calculate the contour perimeter. Further, the Sobel operator can be used to extract the edge gradient and calculate the mean, and the LBP algorithm can also be used to extract the texture features of each colony. The above algorithms are well-known technologies, and the specific calculation methods will not be repeated here.
[0070] So far, the feature set of the colony segmentation image has been obtained , and there are ,in The total number of colonies in the colony segmentation image can also be recorded as a supplementary traceability parameter. Since colony images of pilot amplification are collected every two hours, multiple colony images and corresponding colony segmentation images will be obtained during the pilot amplification of the same batch of probiotics. In this embodiment, the colony image at the 24th hour of the pilot culture process can be selected as the image for obtaining the supplementary traceability parameter. In actual practice, the implementer can also adjust the time for obtaining images to 12 hours, 36 hours, or 48 hours, etc., based on the selected strain and the required duration of the pilot culture process.
[0071] The traceability data matrix obtained in step S1 and supplementary traceability parameters The complete traceability set is obtained by splicing:
[0072] ;
[0073] in Represents a complete traceability set; represents the traceability data matrix; Indicates supplementary traceability parameters. Afterwards, the SHA-256 hash algorithm is used to encrypt and generate a unique traceability code. This code is then printed onto the smallest packaging unit of the probiotic tablets, such as a plastic bottle, allowing consumers, manufacturers, or regulatory authorities to scan and obtain the product's full traceability information. The complete traceability set and its corresponding traceability code can also be uploaded to a blockchain platform for storage, enabling tamper-proof, open, and transparent traceability management.
[0074] Example description:
[0075] During the strain selection process, a batch of lactic acid bacteria strains were selected, and their strain numbers were BS2023-001, BS2023-002, and BS2023-003. The strain numbers were uploaded to the traceability database and recorded as After strain selection, suitable and healthy strains were selected for cultivation and amplification. During this process, the temperature time series data obtained were: 36.8°C, 37.0°C, ..., 37.1°C; the humidity time series data were: 60%, 62%, ..., 60%; the humidity and temperature time series data were smoothed by Kalman filtering and uploaded to the traceability database; after obtaining the pH time series data, the Z-score normalization was performed to obtain a standardized sequence of 0.98, 1.02, ..., 1.00 and uploaded to the traceability database as ; The same batch of probiotics after pilot amplification was implanted into the fermentation tank to start fermentation. During this process, the fermentation tank number F-001 was recorded and uploaded to the traceability database as After fermentation is completed, drying and powdering are started. The drying equipment number D-02 and the drying method are recorded. Here, freeze drying is used, which is coded as [1,0]. The traceability database is uploaded and recorded as After the powder making process, the formula is designed and mixed with the excipients. The ratio of bacterial powder to excipients is recorded, such as the ratio of bacterial powder to filler is 1:0.5, the ratio of bacterial powder to binder is 1:1, and the ratio of bacterial powder to disintegrant is 1:0.3. The ratios in this process are uploaded to the traceability database and recorded as The mixed excipients are granulated and tableted, and the granulation equipment number G-01 and the tablet pressing equipment number T-03 are recorded. The pressure time series of the tablet pressing equipment is collected as 100kPa, 105kPa, ..., 100kPa, and after noise reduction by wavelet transform, it is uploaded to the traceability database and recorded as ; After tableting, coating is performed, and the coating equipment number C-05 and the set coating thickness of 0.5mm are recorded, uploaded to the traceability database and recorded as After coating, the viable bacteria count of some samples was determined by plate count method, which was 1×10 9 CFU / plate, 1.02×10 9 CFU / plate, 1.035×10 9 CFU / plate,…,0.988×10 9 CFU / plate, upload all viable bacteria counts to the traceability database and record them as After random inspection, all probiotic tablets of the batch are packaged, and the packaging equipment number P-08 and the packaging date 2023-02-15 are recorded. These two parameters are uploaded to the traceability database and recorded as .
[0076] Furthermore, a colony image was obtained at the 24th hour during the pilot amplification process of this batch of probiotic tablets. Then, based on the watershed algorithm in step S2, a colony segmentation image was obtained, and relevant parameters including the area, perimeter, average edge gradient, and texture features of each colony were extracted: (250µm², 60µm, 5.6, 134), (360µm², 50µm, 4.9, 40), … (330µm², 55µm, 8.1, 98).
[0077] Then for this batch of probiotic tablets, the complete traceability set is:
[0078] [BS2023-001,BS2023-002,BS2023-003,(36.8,37.0,…,37.1),(60,62,…,60),(0.98,1.02,…,1 .00),F-001,D-02,(1,0),(1:0.5,1:1,1:0.3),G-01,T-03,(100,105,…,100),C-05,0.5,(1×10 9 ,1.02×10 9 ,1.035×10 9 ,0.988×10 9 ),P-08,2023-02-15,{(250,60,5.6,134),(360µm,50µm,4.9,40),…,(330,55µm,8.1,98)];
[0079] The complete traceability set is then encrypted using the SHA-256 hash function, and the generated traceability code is sprayed on the surface of the probiotic plastic packaging bottle during the packaging process.
[0080] An embodiment of a probiotic tablet production traceability system:
[0081] On the other hand, the present invention also provides a probiotic tablet production traceability system. Figure 2 As shown, the probiotic tablet production traceability system includes a processor and a memory, and the memory stores computer program instructions. When the computer program instructions are executed by the processor, a probiotic tablet production traceability method according to the first aspect of the present invention is implemented.
[0082] The probiotic tablet production traceability system also includes other components familiar to those skilled in the art, such as a communication interface. The configuration and functions of these components are known in the art and will not be described in detail here.
[0083] In the present invention, the aforementioned memory can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, the computer-readable storage medium can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc., or any other medium that can be used to store the required information and can be accessed by an application, module, or both. Any such computer storage medium can be part of, accessible to, or connectable to a device. Any application or module described in the present invention can be implemented using computer-readable / executable instructions stored or otherwise maintained by such a computer-readable medium.
Claims
1. A method for tracing the production of probiotic tablets, characterized in that: The method comprises: During the production of probiotic tablets, relevant parameters of each process are obtained to obtain the traceability data matrix; During the pilot expansion process of probiotics, colony images are collected at set intervals, and the colony images are segmented using a watershed algorithm to obtain corresponding colony segmentation images. The geometric features and texture features of multiple colonies in the colony segmentation images are extracted, and the geometric features and texture features are used as supplementary traceability parameters to be spliced with the traceability data matrix to obtain a complete traceability set. The complete traceability set is processed using an encryption algorithm to obtain a traceability code, which is then sprayed on the smallest packaging unit of the probiotic tablets. The watershed algorithm further includes multiplying the basic threshold of the H transform by an adjustment value to obtain a dynamic threshold, wherein the adjustment value is obtained by a series of predetermined mathematical operations including logarithmic operations and hyperbolic tangent operations based on the growth rate gradient, the colony space density and the set adjustment coefficient; Acquire multiple connected domains in the colony image, and use the geometric center of each connected domain as the coordinate of the initial planting point of the colony; calculate the coordinate variance and coordinate mean of all coordinates, obtain the Euclidean distance of each coordinate and the coordinate mean, and obtain the colony space density according to the ratio of the Euclidean distance to the coordinate variance; calculate the difference between the edge gradient amplitude of each colony in the colony image and the colony image before a set time interval to obtain the growth rate gradient.
2. The method for tracing the production of probiotic tablets according to claim 1, characterized in that: The calculation method of the dynamic threshold is specifically as follows: ; in Indicates the base threshold of H transformation; represents the adjustment coefficient; and represent the growth rate gradient and colony spatial density, respectively; represents the hyperbolic tangent function; Represents a symbolic function.
3. A probiotic tablet production traceability method according to claim 2, characterized in that: The calculation method of the colony space density is specifically as follows: ; in Indicates the spatial density of the colony; Represents the estimated number of colonies, specifically the number of independent connected domains in the colony image; ( ) represents the natural exponential function; Indicates the The coordinates of the initial planting point of each colony; represents the coordinate mean of all initial planting points; represents the coordinate variance of all initial planting points; represents the Euclidean norm.
4. A probiotic tablet production traceability method according to claim 2, characterized in that: The calculation method of the growth rate gradient is specifically as follows: ; in represents the growth rate gradient of the colony; Indicates the set time interval; Indicates the The coordinates of the colony image at the moment The Sobel gradient amplitude at ; Indicates the area in the colony image where the gradient amplitude is greater than the set threshold; represents the Euclidean norm; Represents a very small positive number.
5. The method for tracing the production of probiotic tablets according to claim 1, characterized in that: The relevant parameters of each process include: The strain number of the strain selection process; the temperature, humidity and pH value of the culture and amplification process; the fermentation tank number of the fermentation process; the drying equipment number and the drying method code of the drying and powder making process; the mass ratio of bacterial powder to each excipient in the formulation design and excipient mixing process; the granulation equipment number, tablet pressing equipment number and the tablet pressing equipment pressure in the granulation and tablet forming process; the coating equipment number and coating thickness in the coating process; the number of viable bacteria after random inspection in the quality inspection process; the packaging equipment number and packaging date in the packaging and storage process.
6. The method for tracing the production of probiotic tablets according to claim 1, characterized in that: The method further includes performing a pre-processing operation on the bacterial colony image, specifically: An HSV colony image obtained by performing HSV space conversion on the colony image; Based on the S channel in the HSV colony image, the Otsu algorithm is used to perform threshold segmentation to obtain a segmented image; A morphological opening operation is performed on the segmented image.
7. A probiotic tablet production traceability method according to claim 6, characterized in that: Acquiring multiple connected domains in the bacterial colony image, including: The preprocessed colony image was subjected to 8-neighborhood connectivity analysis to obtain multiple connected domains.
8. The method for tracing the production of probiotic tablets according to claim 1, characterized in that: Extracting geometric features and texture features of multiple colonies in the colony segmentation image, including: Use the cv2.findContours() function in openCV to extract the contours of each colony and use cv2.contourArea() to calculate the area of the contours; Calculate the perimeter of the contour using cv2.arcLength(); Use the Sobel operator to extract edge gradients and calculate the mean; The LBP algorithm was used to extract the texture features of each colony and obtain the LBP value.
9. The method for tracing the production of probiotic tablets according to claim 1, characterized in that: The encryption algorithm is the SHA-256 hash encryption algorithm.
10. A probiotic tablet production traceability system, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a probiotic tablet production traceability method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Segmentation method for overlapping cells in cervical smear image
CN104732229A
Prefabricated dish tracing method based on two-dimensional identification code
CN117611197A