Preparation method and system of instant bird's nest
By performing real-time grayscale image processing and counting of specific markers on ready-to-eat bird's nest mixture, the problem of real-time aseptic early warning for ready-to-eat bird's nest mixture was solved, achieving rapid detection and safety assurance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 广东润康药业有限公司
- Filing Date
- 2024-11-19
- Publication Date
- 2026-05-29
AI Technical Summary
Existing technologies cannot provide real-time aseptic warnings for ready-to-eat bird's nest mixtures, thus failing to guarantee their safety. Traditional testing methods also suffer from delays and potential health risks.
By receiving real-time grayscale images of ready-to-eat bird's nest mixture, the system performs region segmentation and shadow area factor calculation, injects markers for specific labeling, uses specific nucleic acid dyes to count microorganisms, and combines a sterile alarm to achieve real-time early warning.
It enables real-time aseptic warning for ready-to-eat bird's nest mixture, allowing for rapid detection in the early stages of microbial contamination, ensuring product safety, and avoiding resource waste and health risks.
Smart Images

Figure CN119904407B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of aseptic preparation technology, and more specifically, to a method and system for preparing ready-to-eat bird's nest. Background Technology
[0002] Ready-to-eat bird's nest mixture is a medication used to treat upper gastrointestinal bleeding caused by peptic ulcers, as well as bleeding from gastric and duodenal mucosal erosions caused by various reasons other than tumors and esophageal and gastric varices. It promotes ulcer healing by inhibiting gastric acid secretion and helping to reduce inflammation of the stomach and duodenum. Therefore, its sterility is crucial for patient safety. Because ready-to-eat bird's nest mixture can be contaminated with microorganisms during production and storage, ensuring its sterility is a stringent requirement in pharmaceutical manufacturing.
[0003] Traditional aseptic testing methods typically involve bacterial culture techniques, which require a considerable amount of time to obtain results and are often only performed in the final stages of drug production. This means that once contamination is detected, the entire batch of products may already be affected, resulting in wasted resources and potential health risks. Furthermore, traditional methods cannot provide real-time monitoring and early warning, leading to a lag in aseptic control during the production process. Summary of the Invention
[0004] In view of this, the present invention proposes a method and system for preparing ready-to-eat bird's nest, aiming to solve the problem that the current technology cannot provide real-time aseptic warning for ready-to-eat bird's nest mixture and cannot guarantee the safety of using ready-to-eat bird's nest mixture.
[0005] This invention proposes a method for preparing ready-to-eat bird's nest, comprising:
[0006] Receive a real-time grayscale image of ready-to-eat bird's nest mixture, determine the shadow areas on the real-time grayscale image, and divide all the shadow areas into multiple individual shadow areas, wherein there is no overlap between each individual shadow area;
[0007] Identify the pixels in each individual shadow region, and calculate the shadow region factor for each individual shadow region based on all the pixels;
[0008] Extract all shadow region factors and calculate the shadow region severity value of the real-time grayscale image based on the shadow region factors;
[0009] Based on the shaded area degree value, a marker is injected into the ready-to-eat bird's nest mixture, and the microorganisms in the ready-to-eat bird's nest mixture are specifically marked based on the marker.
[0010] The system counts the specifically labeled microorganisms according to the preset analysis method, determines whether to issue an alarm based on the determined number of microorganisms, and responds to the corresponding sterility alarm when an alarm is issued.
[0011] Furthermore, before receiving the real-time grayscale image of the ready-to-eat bird's nest mixture, the following steps are also included:
[0012] The original image of the ready-to-eat bird's nest mixture is obtained, and the original image is preprocessed, wherein the preprocessing includes noise removal and outlier removal;
[0013] The preprocessed original image is divided into multiple sub-regions based on a non-overlapping window strategy;
[0014] Enhance contrast within sub-regions based on local histogram equalization algorithm;
[0015] Based on the preset grayscale conversion function, the pixel values of each sub-region are mapped to a new grayscale level;
[0016] The grayscale of each sub-region is converted based on the new grayscale level and then recombined to obtain the real-time grayscale image.
[0017] Furthermore, in determining the pixels of each individual shadow region and calculating the shadow region factor of each individual shadow region based on all pixels, the process includes:
[0018] Extract all pixels and construct a pixel value set based on the pixel values corresponding to all pixels;
[0019] The cluster centers of the pixel value set are determined based on the K-Means clustering algorithm;
[0020] Determine the pixel distance from each pixel value in the pixel value set to the cluster center, and construct a pixel distance set;
[0021] Calculate the shadow region factor for each individual shadow region based on the pixel distance set:
[0022]
[0023] Where G is the shadow region factor of a single shadow region, c1 is the weight of a single shadow region, n is the number of pixel distances in the pixel distance set, and e i e is the distance to the i-th pixel in the pixel distance set. 均 h is the average of all pixel distances in the pixel distance set. i The weight is the distance to the i-th pixel.
[0024] Furthermore, when extracting all shadow region factors and calculating the shadow region severity value of the real-time grayscale image based on the shadow region factors, the process includes:
[0025] Obtain a preset shadow area factor, and generate a first encoding mark for all shadow area factors smaller than the preset shadow area factor;
[0026] Generate a second encoding tag for all shadow region factors that are equal to the preset shadow region factor;
[0027] Generate a third encoding tag for all shadow region factors smaller than the preset shadow region factor;
[0028] Count the number of the first, second, and third coding tags, and calculate the shadow area severity value of the real-time grayscale image:
[0029]
[0030] Where K is the shaded area intensity value of the real-time grayscale image, L1 is the number of first coding tags, L2 is the number of second coding tags, and L3 is the number of third coding tags.
[0031] Furthermore, when injecting the marker into the ready-to-eat bird's nest mixture based on the shaded area degree value, the process includes:
[0032] Multiple degree value ranges are preset, wherein each degree value range includes a corresponding first preset degree value and a second preset degree value;
[0033] Multiple injection volume values are preset, with each injection volume value corresponding to a different intensity range.
[0034] The shaded area severity value is traversed through all severity value intervals to determine the severity value interval that matches the shaded area severity value, and the corresponding injection amount value is determined.
[0035] The determined injection volume value is used as the initial injection volume of the marker.
[0036] Furthermore, when using the determined injection volume as the initial injection volume of the marker, it also includes:
[0037] The markers are analyzed to determine their characteristic data;
[0038] The model analyzes all feature data based on a pre-trained impact value model and outputs the corresponding injection impact value.
[0039] Extract the same injection impact value from all injection impact values to obtain multiple intervals of the same injection impact value;
[0040] Count the number of the first intervals with the same injection impact value intervals;
[0041] Extract a single injection influence value from each of the intervals containing the same injection influence value, and calculate the sum of the first injection influence values.
[0042] Obtain a preset injection influence value, remove all injection influence value intervals that are smaller than the preset injection influence value, and count the number of second intervals of the remaining injection influence value intervals.
[0043] Extract one identical injection influence value from each of the remaining identical injection influence value intervals, and calculate the second injection influence sum value;
[0044] The injection amount influence value of the marker is calculated based on the quantity of the first interval, the quantity of the second interval, the sum of the first injection influence value, and the sum of the second injection influence value.
[0045] The effect of the injected amount of marker is calculated using the following formula:
[0046]
[0047] Where P is the influence value of the injected amount of marker, Q2 is the number of the second interval, Q1 is the number of the first interval, S1 is the sum of the first injection influence value, S2 is the sum of the second injection influence value, and r is the preset injection influence value.
[0048] The initial injection amount is optimized based on the injection amount influence value to obtain the target injection amount of the marker, and the marker is injected into the ready-to-eat bird's nest mixture based on the target injection amount.
[0049] Further, when optimizing the initial injection amount based on the injection amount influence value to obtain the target injection amount of the marker, the following steps are included:
[0050] Multiple injection volume influence value ranges are preset, wherein each injection volume influence value range includes a corresponding first preset injection volume influence value and a second preset injection volume influence value;
[0051] Multiple optimization coefficient values are preset, and each optimization coefficient value is set to correspond one-to-one with the range of values affected by the injection volume.
[0052] The injection amount influence value is traversed through all injection amount influence value intervals to determine the injection amount influence value interval that matches the injection amount influence value, and the corresponding optimization coefficient value is determined.
[0053] Calculate the product of the optimization coefficient value and the initial injection amount, and use the product value as the target injection amount of the marker.
[0054] Furthermore, when determining whether to issue an alarm based on the determined number of microorganisms, this includes:
[0055] Obtain a preset number of microorganisms, and determine whether to issue an alarm based on the relationship between the number of microorganisms and the preset number of microorganisms;
[0056] If the number of microorganisms is less than the preset number of microorganisms, then it is determined that no alarm will be issued;
[0057] When the number of microorganisms is greater than or equal to the preset number of microorganisms, an alarm is issued.
[0058] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0059] This invention discloses a method and system for preparing ready-to-eat bird's nest. The method involves receiving a real-time grayscale image of a ready-to-eat bird's nest mixture, dividing the image into multiple individual shadow regions to significantly shorten detection time and improve efficiency. The method identifies pixels within each shadow region, calculates shadow region factors, extracts all shadow region factors, and calculates the shadow region severity value of the real-time grayscale image. This provides a foundation for precise injection of markers, ensuring the correct amount of markers injected. Markers are injected into the ready-to-eat bird's nest mixture based on the shadow region severity value, and the markers specifically label the microorganisms within the mixture. The specifically labeled microorganisms are counted. This precise quantification of microbial quantity is achieved through specific labeling and counting of microorganisms. An alarm is triggered based on the determined number of microorganisms. When an alarm is triggered, a corresponding sterility alarm is activated, enabling rapid detection of microorganisms at the initial stage of contamination. This provides real-time sterility warning for the ready-to-eat bird's nest mixture, ensuring the safety of the consumer.
[0060] On the other hand, this application also provides a preparation system for ready-to-eat bird's nest, comprising:
[0061] The region segmentation module is used to receive a real-time grayscale image of the ready-to-eat bird's nest mixture, determine the shadow regions on the real-time grayscale image, and segment all the shadow regions to obtain multiple individual shadow regions, wherein there is no overlap between each individual shadow region;
[0062] The first calculation module is used to determine the pixels of each individual shadow region and calculate the shadow region factor of each individual shadow region based on all the pixels.
[0063] The second calculation module is used to extract all shadow area factors and calculate the shadow area degree value of the real-time grayscale image based on the shadow area factors.
[0064] A specific labeling module is used to inject a marker into the ready-to-eat bird's nest mixture based on the shaded area intensity value, and to specifically label the microorganisms in the ready-to-eat bird's nest mixture based on the marker.
[0065] The aseptic early warning module is used to count specifically labeled microorganisms according to a preset analysis method, determine whether to issue an alarm based on the determined number of microorganisms, and respond to the corresponding aseptic alarm when an alarm is determined to be issued.
[0066] Furthermore, it also includes:
[0067] An image processing module is used to acquire the original image of the ready-to-eat bird's nest mixture and preprocess the original image, wherein the preprocessing includes noise and outlier removal;
[0068] The second partitioning module is used to divide the preprocessed original image into multiple sub-regions based on a non-overlapping window strategy.
[0069] The image enhancement module is used to enhance the contrast within a sub-region based on a local histogram equalization algorithm;
[0070] The grayscale conversion module is used to map the pixel values of each sub-region to a new grayscale level according to a preset grayscale conversion function.
[0071] The image combination module is used to perform grayscale conversion on each sub-region based on the new grayscale level and recombine them to obtain the real-time grayscale image.
[0072] It is understandable that the preparation system and method for ready-to-eat bird's nest provided above have the same beneficial effects, and will not be repeated here. Attached Figure Description
[0073] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0074] Figure 1 A schematic flowchart illustrating the preparation method of ready-to-eat bird's nest provided in an embodiment of the present invention;
[0075] Figure 2 This is a schematic diagram of the structure of the ready-to-eat bird's nest preparation system provided in an embodiment of the present invention. Detailed Implementation
[0076] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the disclosure to those skilled in the art. It should be noted that, unless otherwise specified, embodiments and features in the embodiments of the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0077] For illustrative purposes, the ready-to-eat bird's nest mixture in this embodiment of the invention is a pre-processed edible bird's nest, which is a packaged food and is typically a gel-like mixture that is transparent or nearly transparent. To ensure aseptic conditions during the preparation and packaging process, the following aseptic warning preparation method is used in the preparation.
[0078] like Figure 1 As shown in some embodiments of this application, this embodiment provides a method for preparing ready-to-eat bird's nest, used for aseptic detection and early warning of the preparation process of ready-to-eat bird's nest, including:
[0079] S110: Receive a real-time grayscale image of the ready-to-eat bird's nest mixture, determine the shadow areas on the real-time grayscale image, and divide all the shadow areas into multiple individual shadow areas, wherein there is no overlap between each individual shadow area;
[0080] In this embodiment, the shadow boundaries in the image can be identified by edge detection algorithms, such as the Canny operator or the Sobe operator. Edge detection can determine the boundary between shadow and non-shadow areas and grow inward from the identified edge to determine continuous shadow areas.
[0081] In this embodiment, a single shaded area indicates the possible presence of microorganisms.
[0082] In some embodiments of this application, before receiving a real-time grayscale image of the ready-to-eat bird's nest mixture, the method further includes:
[0083] The original image of the ready-to-eat bird's nest mixture is obtained, and the original image is preprocessed, wherein the preprocessing includes noise removal and outlier removal;
[0084] The preprocessed original image is divided into multiple sub-regions based on a non-overlapping window strategy;
[0085] Enhance contrast within sub-regions based on local histogram equalization algorithm;
[0086] Based on the preset grayscale conversion function, the pixel values of each sub-region are mapped to a new grayscale level;
[0087] The grayscale of each sub-region is converted based on the new grayscale level and then recombined to obtain the real-time grayscale image.
[0088] In this embodiment, raw images of the ready-to-eat bird's nest mixture are acquired from an imaging device (such as a camera or scanner). The image resolution is ensured to be high enough to clearly observe details within the injection solution.
[0089] In this embodiment, noise is eliminated by applying noise reduction techniques such as Gaussian blurring, median filtering, or bilateral filtering to reduce random noise in the image, which is caused by the imaging sensor or external environmental factors. Outlier removal involves identifying and replacing pixel values that deviate from the normal range, which may be caused by instantaneous changes in the light source or erroneous responses of the sensor.
[0090] In this embodiment, the non-overlapping window strategy includes dividing the denoised image into multiple sub-regions according to a predetermined size and shape. Using non-overlapping windows ensures that each region can be processed independently, avoiding boundary effects. The size and shape of each sub-region should be determined based on actual needs and the image processing objectives.
[0091] In this embodiment, local histogram equalization is applied to each sub-region to enhance the contrast of local areas of the image, improve the visual effect of the image, and make hidden details more obvious.
[0092] In this embodiment, a grayscale conversion function is designed that maps the pixel values of each sub-region to a new grayscale level. This function can be linear or non-linear, depending on the expected image processing effect and application scenario, ensuring that all sub-regions undergo grayscale conversion according to the same standard, thus maintaining the overall consistency of the image.
[0093] In this embodiment, all processed sub-regions are reassembled into a complete image, i.e., a real-time grayscale image. This process requires precise stitching techniques to avoid obvious seams or unnatural transitions at the boundaries of sub-regions, ensuring that the quality of the reassembled image meets the needs of subsequent analysis, such as microbial detection or contaminant identification.
[0094] The beneficial effects of the above technical solution are: the present invention makes the gray level distribution in the sub-region more uniform, and can effectively obtain high-quality real-time grayscale images from the original images of ready-to-eat bird's nest mixture, providing a reliable and accurate basis for further image analysis and processing.
[0095] S120: Determine the pixels of each individual shadow region and calculate the shadow region factor of each individual shadow region based on all pixels;
[0096] In some embodiments of this application, determining the pixels of each individual shadow region and calculating the shadow region factor of the individual shadow region based on all pixels includes:
[0097] Extract all pixels and construct a pixel value set based on the pixel values corresponding to all pixels;
[0098] The cluster centers of the pixel value set are determined based on the K-Means clustering algorithm;
[0099] Determine the pixel distance from each pixel value in the pixel value set to the cluster center, and construct a pixel distance set;
[0100] Calculate the shadow region factor for each individual shadow region based on the pixel distance set:
[0101]
[0102] Where G is the shadow region factor of a single shadow region, c1 is the weight of a single shadow region, n is the number of pixel distances in the pixel distance set, ei is the distance of the i-th pixel in the pixel distance set, and e 均 Let be the average of all pixel distances in the pixel distance set, and let hi be the weight corresponding to the i-th pixel distance. c1 is generally determined based on the total number of shadow regions N, c1 = 1 / N, and hi is determined based on the average of the i-th pixel distance and the average of all pixel distances, hi = Si / (n × S0), where S0 is the average of all pixel distances.
[0103] In this embodiment, the cluster center of a set is determined based on the K-Means clustering algorithm. The specific determination process is complex and well-established, and will not be described in detail here to save space.
[0104] In this embodiment, the distance from each pixel value in the pixel value set to the cluster center is determined by Euclidean distance.
[0105] The beneficial effects of the above technical solution are: the present invention calculates the shadow area factor of a single shadow area based on the pixel distance set, which can realize the accurate calculation of the shadow area factor, and at the same time lay the foundation for the microbial detection of ready-to-eat bird's nest mixture, providing reliable data support.
[0106] S130: Extract all shadow area factors and calculate the shadow area severity value of the real-time grayscale image based on the shadow area factors;
[0107] In some embodiments of this application, when extracting all shadow region factors and calculating the shadow region severity value of the real-time grayscale image based on the shadow region factors, the process includes:
[0108] Obtain a preset shadow area factor, and generate a first encoding mark for all shadow area factors smaller than the preset shadow area factor;
[0109] Generate a second encoding tag for all shadow region factors that are equal to the preset shadow region factor;
[0110] Generate a third encoding tag for all shadow region factors smaller than the preset shadow region factor;
[0111] Count the number of the first, second, and third coding tags, and calculate the shadow area severity value of the real-time grayscale image:
[0112]
[0113] Where K is the shaded area intensity value of the real-time grayscale image, L1 is the number of first coding tags, L2 is the number of second coding tags, and L3 is the number of third coding tags.
[0114] In this embodiment, the preset shadow area factor is obtained by summarizing historical data. Preferably, it is determined by the average or extreme value of each data obtained by calculating the shadow area factor of several sterile ready-to-eat bird's nest image data. Here, 5.5 is preferred.
[0115] In this embodiment, ln represents the logarithmic function symbol.
[0116] The beneficial effects of the above technical solution are: the present invention counts the number of the first coded marker, the number of the second coded marker and the number of the third coded marker, and calculates the shadow area degree value of the real-time grayscale image. By calculating the shadow area degree value, it provides an injection basis for the injection of markers, ensures the accurate quantification of the number of microorganisms, and helps to issue an alarm in time when the number of microorganisms exceeds the safety threshold, so as to take corresponding measures.
[0117] S140: Inject a marker into the ready-to-eat bird's nest mixture based on the shaded area degree value, and specifically mark the microorganisms in the ready-to-eat bird's nest mixture based on the marker;
[0118] In some embodiments of this application, injecting a marker into the ready-to-eat bird's nest mixture based on the shaded area degree value includes:
[0119] Multiple degree value ranges are preset, wherein each degree value range includes a corresponding first preset degree value and a second preset degree value;
[0120] Multiple injection volume values are preset, with each injection volume value corresponding to a different intensity range.
[0121] The shaded area severity value is traversed through all severity value intervals to determine the severity value interval that matches the shaded area severity value, and the corresponding injection amount value is determined.
[0122] The determined injection volume value is used as the initial injection volume of the marker.
[0123] In this embodiment, the marker is preferably a specific nucleic acid dye, which can be any dye that can be distinguished from the color of the ready-to-eat bird's nest mixture. Generally, a specific nucleic acid dye that can mark Escherichia coli can be selected.
[0124] In this embodiment, the first degree value interval is Z1, Z1 = [0, 1), the second degree value interval is Z2, Z2 = [1, 2), the third degree value interval is Z3, Z3 = [2, 3), the fourth degree value interval is Z4, Z4 = [3, 4), the fifth degree value interval is Z5, Z5 = [4, 5), the sixth degree value interval is Z6, Z6 = [6, 7), and the remaining ones are not listed one by one, and are set according to the specific situation.
[0125] In this embodiment, the injection volume values are set to correspond one-to-one with the intensity ranges. The injection volume corresponding to the first intensity range Z1 is 0.35 μg / mL, the injection volume corresponding to the second intensity range Z2 is 0.4 μg / mL, the injection volume corresponding to the third intensity range Z3 is 0.45 μg / mL, the injection volume corresponding to the fifth intensity range Z5 is 0.5 μg / mL, and the injection volume corresponding to the sixth intensity range Z6 is 0.55 μg / mL. The remaining values are not listed in detail and are set according to specific circumstances.
[0126] The beneficial effects of the above technical solution are: the present invention traverses the shaded area degree value in all degree value intervals, determines the degree value interval that matches the shaded area degree value, and determines the corresponding injection amount value. The determined injection amount value is used as the initial injection amount of the marker, which can realize the initial setting of the injection amount, avoid the error and delay that exist in manual setting, and ensure the real-time performance of microbial detection.
[0127] In some embodiments of this application, when using a determined injection amount as the initial injection amount of the marker, the method further includes:
[0128] The markers are analyzed to determine their characteristic data;
[0129] The model analyzes all feature data based on a pre-trained impact value model and outputs the corresponding injection impact value.
[0130] Extract the same injection impact value from all injection impact values to obtain multiple intervals of the same injection impact value;
[0131] Count the number of the first intervals with the same injection impact value intervals;
[0132] Extract a single injection influence value from each of the intervals containing the same injection influence value, and calculate the sum of the first injection influence values.
[0133] Obtain a preset injection influence value, remove all injection influence value intervals that are smaller than the preset injection influence value, and count the number of second intervals of the remaining injection influence value intervals.
[0134] Extract one identical injection influence value from each of the remaining identical injection influence value intervals, and calculate the second injection influence sum value;
[0135] The injection amount influence value of the marker is calculated based on the quantity of the first interval, the quantity of the second interval, the sum of the first injection influence value, and the sum of the second injection influence value.
[0136] The effect of the injected amount of marker is calculated using the following formula:
[0137]
[0138] Where P is the influence value of the injected amount of marker, Q2 is the number of the second interval, Q1 is the number of the first interval, S1 is the sum of the first injection influence value, S2 is the sum of the second injection influence value, and r is the preset injection influence value.
[0139] The initial injection amount is optimized based on the injection amount influence value to obtain the target injection amount of the marker, and the marker is injected into the ready-to-eat bird's nest mixture based on the target injection amount.
[0140] In this embodiment, feature data refers to data that affects the injection volume, including sample type (such as bacteria, bacteriophages, fungi, and viruses), experimental purpose, staining efficiency, labeling cost, etc., which are not listed here. The injection impact value is the degree of influence of each feature data on the injection volume. The greater the influence of a single feature data on the injection volume, the greater the injection impact value. Each feature data has a positive or negative correlation with the injection volume to varying degrees. The value of the injection impact value is not set here, as long as it can characterize the relationship between each feature data and the injection volume, and is not limited here.
[0141] In this embodiment, the influence value model is pre-trained, and the specific training is as follows:
[0142] Acquire historical data, including marker injection data, marker experimental data, injection volume and experimental results under various conditions, etc.
[0143] Build a dataset based on historical data;
[0144] Sampling yields training and testing subsets: The entire dataset is divided into two parts according to a preset ratio: a training subset and a testing subset. The training subset is used to train the neural network model, while the testing subset is used to evaluate the performance of the trained model.
[0145] A pre-selected neural network model is obtained, and the neural network model is iteratively trained based on the training subset. The neural network model after iterative training is evaluated based on the test subset. If the evaluation value of the neural network model after the current iteration is greater than or equal to the evaluation value of the neural network model after the previous iteration, the iterative training is stopped, and the influence value model is obtained. The evaluation metrics include accuracy, loss function value, recall, etc., which are used to measure the performance of the model.
[0146] In this embodiment, if all the influence values are {2,2,4,6,6,7,8,8,9}, then the intervals of the same injection influence values are {2,2}, {6,6}, and {8,8}. The number of the first interval is 3, the sum of the first injection influence values is 2 + 6 + 8, the preset injection influence value is 5, the remaining intervals of the same injection influence values are {6,6} and {8,8}, the number of the second interval is 2, and the sum of the second injection influence values is 6 + 8.
[0147] The beneficial effects of the above technical solution are: the present invention calculates the injection amount influence value of the marker based on the number of the first interval, the number of the second interval, the sum of the first injection influence value and the sum of the second injection influence value, which can provide data support for the optimization and adjustment of the initial injection amount and ensure the accurate adjustment of the initial injection amount.
[0148] In some embodiments of this application, optimizing the initial injection amount based on the injection amount influence value to obtain the target injection amount of the marker includes:
[0149] Multiple injection volume influence value ranges are preset, wherein each injection volume influence value range includes a corresponding first preset injection volume influence value and a second preset injection volume influence value;
[0150] Multiple optimization coefficient values are preset, and each optimization coefficient value is set to correspond one-to-one with the range of values affected by the injection volume.
[0151] The injection amount influence value is traversed through all injection amount influence value intervals to determine the injection amount influence value interval that matches the injection amount influence value, and the corresponding optimization coefficient value is determined.
[0152] Calculate the product of the optimization coefficient value and the initial injection amount, and use the product value as the target injection amount of the marker.
[0153] In this embodiment, the first injection amount influence value range is W1, W1 = [0, 1.25), the second injection amount influence value range is W2, W2 = [1.25, 1.55), the third injection amount influence value range is W3, W3 = [1.55, 1.75), the fourth injection amount influence value range is W4, W4 = [1.75, 2), the fifth injection amount influence value range is W5, W5 = [2, 2.25), the sixth injection amount influence value range is W6, W6 = [2.25, 2.55), and the remaining ranges are not listed one by one and are set according to specific circumstances.
[0154] In this embodiment, the optimization coefficient values are set in a one-to-one correspondence with the injection volume influence value intervals. The optimization coefficient value corresponding to the first injection volume influence value interval W1 is 0.75, the optimization coefficient value corresponding to the second injection volume influence value interval W2 is 0.85, the optimization coefficient value corresponding to the third injection volume influence value interval W3 is 0.95, the optimization coefficient value corresponding to the fourth injection volume influence value interval W4 is 1.05, the optimization coefficient value corresponding to the fifth injection volume influence value interval W5 is 1.15, and the optimization coefficient value corresponding to the sixth injection volume influence value interval W6 is 1.25. The remaining values are not listed in detail and are set according to specific circumstances.
[0155] In this embodiment, if the initial injection volume is 0.5 μg / mL and the selected optimization coefficient value is 0.95, then the target injection volume is 0.475 μg / mL.
[0156] The beneficial effects of the above technical solution are as follows: This invention determines the corresponding optimization coefficient value, calculates the product of the optimization coefficient value and the initial injection amount, and uses the product value as the target injection amount of the marker. This can ensure the accurate injection of the marker, avoid excessive injection, which would cause over-staining and cost waste, and avoid insufficient injection, which would lead to inaccurate microbial count. At the same time, by dynamically adjusting the initial injection amount through the optimization coefficient value, the comprehensiveness and accuracy of the injection amount setting are ensured, and the setting process is not too simplistic.
[0157] S150: Counts the specifically labeled microorganisms according to the preset analysis method, determines whether to issue an alarm based on the determined number of microorganisms, and responds to the corresponding sterility alarm when an alarm is issued.
[0158] In this embodiment, the preset analysis method includes flow cytometry, fluorescence microscopy, or other automated imaging analysis systems, which can be selected according to the actual situation. It is applicable to any existing technology that uses flow cytometry or fluorescence microscopy to count microorganisms. The automated imaging analysis system only needs to be able to obtain the number of microorganisms by comparing the color / grayscale of the acquired image with the preset color / grayscale, and it is also applicable to existing technologies, so it will not be elaborated further here.
[0159] In some embodiments of this application, determining whether to issue an alarm based on a determined number of microorganisms includes:
[0160] Obtain a preset number of microorganisms, and determine whether to issue an alarm based on the relationship between the number of microorganisms and the preset number of microorganisms;
[0161] If the number of microorganisms is less than the preset number of microorganisms, then it is determined that no alarm will be issued;
[0162] When the number of microorganisms is greater than or equal to the preset number of microorganisms, an alarm is issued.
[0163] In this embodiment, the preset microbial quantity refers to the safe threshold or warning line for the number of microorganisms in the ready-to-eat bird's nest mixture, which is set in advance according to pharmaceutical production and quality control standards. Here, it is preferably 0.
[0164] The beneficial effects of the above technical solution are: the present invention determines whether to issue an alarm reminder based on the relationship between the number of microorganisms and the preset number of microorganisms, and can quickly detect the presence of microorganisms in the early stage of contamination, thereby realizing real-time aseptic early warning of ready-to-eat bird's nest mixture and ensuring the safety of users' consumption.
[0165] like Figure 2 As shown, in another preferred embodiment based on the above embodiments, this embodiment provides a ready-to-eat bird's nest preparation system, comprising:
[0166] The region segmentation module is used to receive a real-time grayscale image of the ready-to-eat bird's nest mixture, determine the shadow regions on the real-time grayscale image, and segment all the shadow regions to obtain multiple individual shadow regions, wherein there is no overlap between each individual shadow region;
[0167] The first calculation module is used to determine the pixels of each individual shadow region and calculate the shadow region factor of each individual shadow region based on all the pixels.
[0168] The second calculation module is used to extract all shadow area factors and calculate the shadow area degree value of the real-time grayscale image based on the shadow area factors.
[0169] A specific labeling module is used to inject a marker into the ready-to-eat bird's nest mixture based on the shaded area intensity value, and to specifically label the microorganisms in the ready-to-eat bird's nest mixture based on the marker.
[0170] The aseptic early warning module is used to count specifically labeled microorganisms according to a preset analysis method, determine whether to issue an alarm based on the determined number of microorganisms, and respond to the corresponding aseptic alarm when an alarm is determined to be issued.
[0171] In some embodiments of this application, it also includes:
[0172] An image processing module is used to acquire the original image of the ready-to-eat bird's nest mixture and preprocess the original image, wherein the preprocessing includes noise and outlier removal;
[0173] The second partitioning module is used to divide the preprocessed original image into multiple sub-regions based on a non-overlapping window strategy.
[0174] The image enhancement module is used to enhance the contrast within a sub-region based on a local histogram equalization algorithm;
[0175] The grayscale conversion module is used to map the pixel values of each sub-region to a new grayscale level according to a preset grayscale conversion function.
[0176] The image combination module is used to perform grayscale conversion on each sub-region based on the new grayscale level and recombine them to obtain the real-time grayscale image.
[0177] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program goods. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program goods embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0178] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program goods according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0179] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0180] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0181] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for preparing ready-to-eat bird's nest, characterized in that, include: Receive a real-time grayscale image of ready-to-eat bird's nest mixture, determine the shadow region on the real-time grayscale image, and divide the shadow region into multiple individual shadow regions, wherein there is no overlap between each individual shadow region; Identify the pixels in each individual shadow region, and calculate the shadow region factor for each individual shadow region based on all pixels, including... Extract all pixels and construct a pixel value set based on the pixel values corresponding to all pixels; The cluster centers of the pixel value set are determined based on the K-Means clustering algorithm; Determine the pixel distance from each pixel value in the pixel value set to the cluster center, and construct a pixel distance set; Calculate the shadow region factor for each individual shadow region based on the pixel distance set: ; Where G is the shadow region factor of a single shadow region, c1 is the weight of a single shadow region, n is the number of pixel distances in the pixel distance set, and e i The distance to the i-th pixel in the pixel distance set. e 均 h is the average of all pixel distances in the pixel distance set. i The weight corresponding to the distance of the i-th pixel; Extract each of the aforementioned shadow region factors, and calculate the shadow region severity value of the real-time grayscale image based on the shadow region factors. Calculating the shadow region severity value of the real-time grayscale image includes: Obtain a preset shadow area factor, and generate a first encoding mark for all shadow area factors smaller than the preset shadow area factor; Generate a second encoding tag for all shadow region factors that are equal to the preset shadow region factor; Generate a third encoding tag for all shadow region factors smaller than the preset shadow region factor; Count the number of the first, second, and third coding tags, and calculate the shadow area severity value of the real-time grayscale image: Where K is the shaded area intensity value of the real-time grayscale image, L1 is the number of the first coding markers, L2 is the number of the second coding markers, and L3 is the number of the third coding markers; Based on the shaded area degree value, a marker is injected into the ready-to-eat bird's nest mixture, and the microorganisms in the ready-to-eat bird's nest mixture are specifically marked based on the marker. The system counts the specifically labeled microorganisms according to the preset analysis method, determines whether to issue an alarm based on the determined number of microorganisms, and responds to the corresponding sterility alarm when an alarm is issued.
2. The method for preparing ready-to-eat bird's nest according to claim 1, characterized in that, Before receiving the real-time grayscale image of the ready-to-eat bird's nest mixture, the following is also included: The original image of the ready-to-eat bird's nest mixture is obtained, and the original image is preprocessed, wherein the preprocessing includes noise removal and outlier removal; The preprocessed original image is divided into multiple sub-regions based on a non-overlapping window strategy; Enhance contrast within sub-regions based on local histogram equalization algorithm; Based on the preset grayscale conversion function, the pixel values of each sub-region are mapped to a new grayscale level; Based on the new gray level, each sub-region is converted to gray level and then recombined to obtain the real-time grayscale image.
3. The method for preparing ready-to-eat bird's nest according to claim 1, characterized in that, When injecting a marker into the ready-to-eat bird's nest mixture based on the shaded area degree value, the following is included: Multiple degree value ranges are preset, wherein each degree value range includes a corresponding first preset degree value and a second preset degree value; Multiple injection volume values are preset, with each injection volume value corresponding to a different intensity range. The shaded area severity value is traversed through all severity value intervals to determine the severity value interval that matches the shaded area severity value, and the corresponding injection amount value is determined. The determined injection volume value is used as the initial injection volume of the marker.
4. The method for preparing ready-to-eat bird's nest according to claim 3, characterized in that, When using a determined injection volume as the initial injection volume of the marker, the following is also included: The markers are analyzed to determine their characteristic data; The model analyzes all feature data based on a pre-trained impact value model and outputs the corresponding injection impact value. Extract the same injection impact value from all injection impact values to obtain multiple intervals of the same injection impact value; Count the number of the first intervals with the same injection impact value intervals; Extract a single injection influence value from each of the intervals containing the same injection influence value, and calculate the sum of the first injection influence values. Obtain a preset injection influence value, remove all injection influence value intervals that are smaller than the preset injection influence value, and count the number of second intervals of the remaining injection influence value intervals. Extract one identical injection influence value from each of the remaining identical injection influence value intervals, and calculate the second injection influence sum value; The injection amount influence value of the marker is calculated based on the quantity of the first interval, the quantity of the second interval, the sum of the first injection influence value, and the sum of the second injection influence value. The effect of the injected amount of marker is calculated using the following formula: ; Where P is the influence value of the injected amount of marker, Q2 is the number of the second interval, Q1 is the number of the first interval, S1 is the sum of the first injection influence value, S2 is the sum of the second injection influence value, and r is the preset injection influence value. The initial injection amount is optimized based on the injection amount influence value to obtain the target injection amount of the marker, and the marker is injected into the ready-to-eat bird's nest mixture based on the target injection amount.
5. The method for preparing ready-to-eat bird's nest according to claim 4, characterized in that, When optimizing the initial injection amount based on the injection amount influence value to obtain the target injection amount of the marker, the following steps are included: Multiple injection volume influence value ranges are preset, wherein each injection volume influence value range includes a corresponding first preset injection volume influence value and a second preset injection volume influence value; Multiple optimization coefficient values are preset, and each optimization coefficient value is set to correspond one-to-one with the range of values affected by the injection volume. The injection amount influence value is traversed through all injection amount influence value intervals to determine the injection amount influence value interval that matches the injection amount influence value, and the corresponding optimization coefficient value is determined. Calculate the product of the optimization coefficient value and the initial injection amount, and use the product value as the target injection amount of the marker.
6. The method for preparing ready-to-eat bird's nest according to claim 1, characterized in that, When determining whether to issue an alarm based on a confirmed number of microorganisms, the following should be included: Obtain a preset number of microorganisms, and determine whether to issue an alarm based on the relationship between the number of microorganisms and the preset number of microorganisms; If the number of microorganisms is less than the preset number of microorganisms, then it is determined that no alarm will be issued; When the number of microorganisms is greater than or equal to the preset number of microorganisms, an alarm is issued.
7. A system for preparing ready-to-eat bird's nest, applied to the method for preparing ready-to-eat bird's nest as described in any one of claims 1-6, characterized in that, include: The region segmentation module is used to receive a real-time grayscale image of the ready-to-eat bird's nest mixture, determine the shadow regions on the real-time grayscale image, and segment all the shadow regions to obtain multiple individual shadow regions, wherein there is no overlap between each individual shadow region; The first calculation module is used to determine the pixels of each individual shadow region and calculate the shadow region factor of each individual shadow region based on all the pixels. The second calculation module is used to extract all shadow area factors and calculate the shadow area degree value of the real-time grayscale image based on the shadow area factors. A specific labeling module is used to inject a marker into the ready-to-eat bird's nest mixture based on the shaded area intensity value, and to specifically label the microorganisms in the ready-to-eat bird's nest mixture based on the marker. The aseptic early warning module is used to count specifically labeled microorganisms according to a preset analysis method, determine whether to issue an alarm based on the determined number of microorganisms, and respond to the corresponding aseptic alarm when an alarm is determined to be issued.
8. The ready-to-eat bird's nest preparation system according to claim 7, characterized in that, Also includes: An image processing module is used to acquire the original image of the ready-to-eat bird's nest mixture and preprocess the original image, wherein the preprocessing includes noise and outlier removal; The second partitioning module is used to divide the preprocessed original image into multiple sub-regions based on a non-overlapping window strategy. The image enhancement module is used to enhance the contrast within a sub-region based on a local histogram equalization algorithm; The grayscale conversion module is used to map the pixel values of each sub-region to a new grayscale level according to a preset grayscale conversion function. The image combination module is used to perform grayscale conversion on each sub-region based on the new grayscale level and recombine them to obtain the real-time grayscale image.