Preparation method and system of instant cubilose
By dividing the real-time grayscale image of the ready-to-eat bird's nest mixture and calculating the shadow area factor, and injecting markers for microbial counting, the problem of inability to be real-time early warning in the prior art is solved, and real-time sterility early warning and safety guarantee of the ready-to-eat bird's nest mixture is realized.
Patent Information
- Application Number
- CN202411651390.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2044-11-19
AI Technical Summary
The prior art cannot provide real-time sterility warnings for ready-to-eat bird's nest mixture, resulting in the inability to ensure the safety of the product.
By receiving the real-time grayscale image of ready-to-eat bird's nest mixture, area division and shadowed area factor calculation are performed, markers are injected based on the degree value of the shadowed area, and microorganisms are specifically labeled and counted to determine whether a sterile alarm is issued.
Real-time sterile warning of ready-to-eat bird's nest mixture is realized, which can quickly detect the existence of microorganisms and ensure the safety of the product.
Smart Images

Figure CN119904407A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of aseptic preparation, and in particular to a method and system for preparing instant bird's nest. Background Art
[0002] Instant bird's nest mixture is a drug used to treat upper gastrointestinal bleeding caused by peptic ulcer, gastric and duodenal mucosal erosion and bleeding caused by various reasons other than tumors and esophageal and gastric fundus varices. It helps to reduce inflammation of the stomach and duodenum by inhibiting gastric acid secretion, thereby promoting ulcer healing. Therefore, its sterility is crucial to patient safety. Since instant bird's nest mixture may be contaminated by microorganisms during production and storage, ensuring its sterility is a strict requirement in drug production.
[0003] Traditional sterility testing methods usually involve bacterial culture technology, which takes a long time to obtain results and can often only be performed in the final stage of drug production, which means that once contamination is discovered, the entire batch of products may have been affected, resulting in waste of resources and potential health risks. In addition, traditional methods cannot provide real-time monitoring and early warning, which makes the sterility control of the production process lag behind. Summary of the invention
[0004] In view of this, the present invention proposes a method and system for preparing instant bird's nests, aiming to solve the problem in the current technology that it is impossible to provide real-time sterility warning for the instant bird's nest mixture and the safety of the instant bird's nest mixture cannot be guaranteed.
[0005] The present invention provides a method for preparing instant bird's nest, comprising:
[0006] Receiving a real-time grayscale image of the instant bird's nest mixture, determining a shadow area on the real-time grayscale image, and dividing all the shadow areas into regions to obtain a plurality of separate shadow areas, wherein there is no overlapping region between each separate shadow area;
[0007] Determine the pixel points of each individual shadow area, and calculate the shadow area factor of the individual shadow area based on all the pixel points;
[0008] Extracting all shadow area factors, and calculating the shadow area degree value of the real-time grayscale image according to the shadow area factors;
[0009] Injecting a marker into the instant bird's nest mixture based on the shaded area degree value, and specifically marking the microorganisms in the instant bird's nest mixture based on the marker;
[0010] The specifically marked microorganisms are counted according to a preset analysis method, and it is determined whether to issue an alarm based on the determined number of microorganisms. When it is determined that an alarm is issued, a corresponding sterility alarm is responded to.
[0011] Furthermore, before receiving the real-time grayscale image of the instant bird's nest mixture, the method further includes:
[0012] Acquire an original image of the instant bird's nest mixture, and preprocess the original image, wherein the preprocessing includes eliminating noise and outliers;
[0013] The preprocessed original image is divided into multiple sub-regions based on a non-overlapping window strategy;
[0014] Enhance the contrast in the sub-region based on the local histogram equalization algorithm;
[0015] According to a preset grayscale conversion function, the pixel value of each sub-region is mapped to a new grayscale level;
[0016] Grayscale conversion is performed on each sub-region based on the new grayscale level, and the sub-regions are recombined to obtain the real-time grayscale image.
[0017] Furthermore, when determining the pixel points of each separate shadow area and calculating the shadow area factor of the separate shadow area based on all the pixel points, it includes:
[0018] Extract all pixel points and construct a pixel value set based on the pixel values corresponding to all pixel points;
[0019] Determine the cluster center of the pixel value set 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 respectively, and construct a pixel distance set;
[0021] Calculate the shadow area factor of the individual shadow areas based on the set of pixel distances:
[0022]
[0023] Among them, G is the shadow area factor of the individual shadow area, c1 is the weight of the individual shadow area, n is the number of pixel distances in the pixel distance set, e i is the i-th pixel distance in the pixel distance set, e 均 is the average value of all pixel distances in the pixel distance set, h i is the weight corresponding to the i-th pixel distance.
[0024] Further, when all shadow area factors are extracted and the shadow area degree value of the real-time grayscale image is calculated according to the shadow area factors, it includes:
[0025] Obtaining a preset shadow area factor, and generating a first coding mark for all shadow area factors that are smaller than the preset shadow area factor;
[0026] Generating a second coding mark from all shadow area factors that are equal to the preset shadow area factor;
[0027] Generating a third coding mark for all shadow area factors that are smaller than the preset shadow area factor;
[0028] Count the number of the first coding marks, the number of the second coding marks, and the number of the third coding marks, and calculate the shadow area degree value of the real-time grayscale image:
[0029]
[0030] Wherein, K is the shadow area degree value of the real-time grayscale image, L1 is the number of first coding marks, L2 is the number of second coding marks, and L3 is the number of third coding marks.
[0031] Further, when a marker is injected into the instant bird's nest mixture based on the shaded area degree value, it includes:
[0032] Presetting a plurality of degree value intervals, wherein each degree value interval includes a corresponding first preset degree value and a second preset degree value;
[0033] Preset multiple injection amount values, wherein the injection amount values and degree value intervals are set in one-to-one correspondence;
[0034] Traversing the degree value of the shadow area in all degree value intervals, determining the degree value interval that matches the degree value of the shadow area, and determining the corresponding injection amount value;
[0035] The determined injection volume value is used as the initial injection volume of the marker.
[0036] Furthermore, when the determined injection volume value is used as the initial injection volume of the marker, the method further includes:
[0037] Analyzing the marker to determine characteristic data of the marker;
[0038] Analyze all feature data based on the pre-trained influence value model and output the corresponding injection influence value;
[0039] Extracting the same injection impact value from all injection impact values, and obtaining a plurality of same injection impact value intervals;
[0040] Count the number of first intervals with the same injection impact value interval;
[0041] Extracting a same injection impact value from all the same injection impact value intervals respectively, and calculating a first injection impact sum value;
[0042] Obtaining a preset injection influence value, eliminating all intervals with the same injection influence value that are smaller than the preset injection influence value, and counting the number of second intervals of the remaining intervals with the same injection influence value;
[0043] Extracting one same injection impact value from each of the remaining same injection impact value intervals, and calculating a second injection impact sum value;
[0044] Calculate the injection volume influence value of the marker according to the first interval number, the second interval number, the first injection influence sum value and the second injection influence sum value;
[0045] The impact value of the injection amount of the marker was calculated according to the following formula:
[0046]
[0047] Wherein, P is the injection amount influence value of the marker, Q2 is the second interval number, Q1 is the first interval number, S1 is the first injection influence sum value, S2 is the second injection influence sum value, and r is the preset injection influence value;
[0048] The initial injection volume is optimized according to the injection volume influence value to obtain the target injection volume of the marker, and the marker is injected into the instant bird's nest mixture based on the target injection volume.
[0049] Furthermore, when the initial injection volume is optimized according to the injection volume influence value to obtain the target injection volume of the marker, it includes:
[0050] Presetting a plurality of injection volume influence value intervals, wherein each injection volume influence value interval includes a corresponding first preset injection volume influence value and a second preset injection volume influence value;
[0051] Presetting a plurality of optimization coefficient values, wherein the optimization coefficient values are set in one-to-one correspondence with the injection volume influence value intervals;
[0052] Traversing the injection volume influence value in all injection volume influence value intervals, determining an injection volume influence value interval that matches the injection volume influence value, and determining a corresponding optimization coefficient value;
[0053] The product value of the optimization coefficient value and the initial injection amount is calculated, and the product value is used as the target injection amount of the marker.
[0054] Furthermore, when determining whether to issue an alarm based on the determined number of microorganisms, it includes:
[0055] Obtaining a preset number of microorganisms, and determining whether to issue an alarm reminder based on the relationship between the number of microorganisms and the preset number of microorganisms;
[0056] When the number of microorganisms is less than the preset number of microorganisms, it is determined that no alarm reminder 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 present invention has the following beneficial effects:
[0059] The invention discloses a method and system for preparing instant bird's nests. The method comprises the steps of receiving a real-time grayscale image of an instant bird's nest mixture, dividing the real-time grayscale image into regions, obtaining a plurality of separate shadow regions, greatly shortening the detection time, improving the detection efficiency, determining the pixel points of the separate shadow regions, calculating the shadow region factors of the separate shadow regions, extracting all the shadow region factors, and calculating the shadow region degree values of the real-time grayscale image, thereby laying a foundation for the accurate injection of markers and ensuring the injection amount of the markers. The markers are injected into the instant bird's nest mixture based on the shadow region degree values, and microorganisms in the instant bird's nest mixture are specifically marked based on the markers; the specifically marked microorganisms are counted, and the microorganisms are specifically marked and counted by the markers, so that the number of microorganisms can be accurately quantified, and whether to issue an alarm is determined according to the determined number of microorganisms. When an alarm is issued, the corresponding sterility alarm is responded to, so that the presence of the microorganisms can be quickly detected at the early stage of contamination, and the real-time sterility warning of the instant bird's nest mixture can be achieved, thereby ensuring the safety of consumption by users.
[0060] On the other hand, the present application also provides a system for preparing instant bird's nest, comprising:
[0061] A region division module is used to receive a real-time grayscale image of the instant bird's nest mixture, determine the shadow area on the real-time grayscale image, and divide all the shadow areas into regions to obtain a plurality of separate shadow areas, wherein there is no overlapping area between each separate shadow area;
[0062] A first calculation module, used for determining the pixel points of each individual shadow area, and calculating the shadow area factor of the individual shadow area based on all the pixel points;
[0063] A second calculation module is used to extract all shadow area factors and calculate the shadow area degree value of the real-time grayscale image according to the shadow area factors;
[0064] A specific marking module, used for injecting a marker into the instant bird's nest mixture based on the shaded area degree value, and specifically marking the microorganisms in the instant bird's nest mixture based on the marker;
[0065] The sterility warning module is used to count specifically marked 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 sterility alarm when it is determined that an alarm should be issued.
[0066] Furthermore, it also includes:
[0067] An image processing module, used for acquiring an original image of the instant bird's nest mixture and preprocessing the original image, wherein the preprocessing includes eliminating noise and outliers;
[0068] A second division module is used to divide the preprocessed original image into multiple sub-regions based on a non-overlapping window strategy;
[0069] An image enhancement module, used to enhance the contrast in the sub-region based on a local histogram equalization algorithm;
[0070] A grayscale conversion module, used for mapping the pixel value 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 recombines to obtain the real-time grayscale image.
[0072] It is understandable that the instant bird's nest preparation system and method provided above have the same beneficial effects and will not be described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0074] Figure 1 A schematic diagram of a process for preparing instant bird's nest provided by an embodiment of the present invention;
[0075] Figure 2 A schematic structural diagram of a system for preparing instant bird's nest provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0076] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art. It should be noted that, in the absence of conflict, the embodiments of the present invention and the features described in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0077] As an illustration, the instant bird's nest mixture of the embodiment of the present invention is a pre-made product of edible bird's nest, which is a canned food, usually a gel-state mixture, transparent or nearly transparent. In order to ensure the sterility of the preparation and filling process, the following sterile warning preparation method is used in the preparation.
[0078] like Figure 1 As shown, in some embodiments of the present application, this embodiment provides a method for preparing instant bird's nest, which is used to perform sterility detection and early warning on the preparation process of the instant bird's nest, including:
[0079] S110: receiving a real-time grayscale image of the instant bird's nest mixture, determining shadow areas on the real-time grayscale image, and dividing all shadow areas into regions to obtain a plurality of separate shadow areas, wherein there is no overlapping region between each separate shadow area;
[0080] In this embodiment, the shadow boundary in the image can be identified by an edge detection algorithm, such as the Canny operator or the Sobel operator. The edge detection can determine the boundary between the shadow and non-shadow areas, and grow inward from the identified edge to determine a continuous shadow area.
[0081] In this example, the individually shaded areas indicate the possible presence of microorganisms.
[0082] In some embodiments of the present application, before receiving the real-time grayscale image of the instant bird's nest mixture, the method further includes:
[0083] Acquire an original image of the instant bird's nest mixture, and preprocess the original image, wherein the preprocessing includes eliminating noise and outliers;
[0084] The preprocessed original image is divided into multiple sub-regions based on a non-overlapping window strategy;
[0085] Enhance the contrast in the sub-region based on the local histogram equalization algorithm;
[0086] According to a preset grayscale conversion function, the pixel value of each sub-region is mapped to a new grayscale level;
[0087] Grayscale conversion is performed on each sub-region based on the new grayscale level, and the sub-regions are recombined to obtain the real-time grayscale image.
[0088] In this embodiment, the original image of the instant bird's nest mixture is obtained from an imaging device (such as a camera or a scanner), and the resolution of the image is ensured to be high enough so that the details in the injection can be clearly observed.
[0089] In this embodiment, noise elimination: applying noise elimination techniques such as Gaussian blur, 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: 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, and using non-overlapping windows can ensure that each region can be processed independently to avoid boundary effects. The size and shape of each sub-region should be determined according to actual needs and the goal of image processing.
[0091] In this embodiment, local histogram equalization: a local histogram equalization algorithm is applied to each sub-region to enhance the contrast of the local region 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, which can map the pixel value of each sub-region to a new grayscale level. It can be a linear or nonlinear function, depending on the expected image processing effect and application scenario, to ensure that all sub-regions are grayscale converted according to the same standard to maintain 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 technology to avoid obvious seams or unnatural transitions at the sub-region boundaries and ensure that the quality of the reassembled image meets the requirements of subsequent analysis, such as microbial detection or contaminant identification.
[0094] The beneficial effect of the above technical solution is that the present invention makes the grayscale distribution in the sub-area more uniform, and can effectively obtain a high-quality real-time grayscale image from the original image of the instant bird's nest mixture, providing a reliable and accurate basis for further image analysis and processing.
[0095] S120: determining pixel points of each individual shadow area, and calculating a shadow area factor of the individual shadow area based on all pixel points;
[0096] In some embodiments of the present application, when determining the pixel points of each separate shadow area and calculating the shadow area factor of the separate shadow area based on all the pixel points, the following steps are included:
[0097] Extract all pixel points and construct a pixel value set based on the pixel values corresponding to all pixel points;
[0098] Determine the cluster center of the pixel value set 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 respectively, and construct a pixel distance set;
[0100] Calculate the shadow area factor of the individual shadow areas based on the set of pixel distances:
[0101]
[0102] Where G is the shadow area factor of the individual shadow area, c1 is the weight of the individual shadow area, n is the number of pixel distances in the pixel distance set, ei is the i-th pixel distance in the pixel distance set, and e 均 is the average value of all pixel distances in the pixel distance set, hi is the weight corresponding to the ith pixel distance. c1 is generally determined according to the total number of shadow areas N, c1 = 1 / N, hi is determined according to the ith pixel distance and the average value of each pixel distance, hi = Si / (n×S0), S0 is the average value of each pixel distance.
[0103] In this embodiment, the cluster center of a set is determined based on the K-Means clustering algorithm. The specific determination process is complicated and mature, and in order to save space, it is not introduced in detail here.
[0104] In this embodiment, the pixel distance from each pixel value in the pixel value set to the cluster center is determined by the Euclidean distance.
[0105] The beneficial effect of the above technical solution is that the present invention calculates the shadow area factor of a single shadow area according to the pixel distance set, which can realize the accurate calculation of the shadow area factor, and at the same time lays the foundation for the microbial detection of instant bird's nest mixture and provides reliable data support.
[0106] S130: extracting all shadow area factors, and calculating the shadow area degree value of the real-time grayscale image according to the shadow area factors;
[0107] In some embodiments of the present application, when all shadow area factors are extracted and the shadow area degree value of the real-time grayscale image is calculated according to the shadow area factors, the method includes:
[0108] Obtaining a preset shadow area factor, and generating a first coding mark for all shadow area factors that are smaller than the preset shadow area factor;
[0109] Generating a second coding mark from all shadow area factors that are equal to the preset shadow area factor;
[0110] Generating a third coding mark for all shadow area factors that are smaller than the preset shadow area factor;
[0111] Count the number of the first coding marks, the number of the second coding marks, and the number of the third coding marks, and calculate the shadow area degree value of the real-time grayscale image:
[0112]
[0113] Wherein, K is the shadow area degree value of the real-time grayscale image, L1 is the number of first coding marks, L2 is the number of second coding marks, and L3 is the number of third coding marks.
[0114] In this embodiment, the preset shadow area factor is obtained by summarizing historical data, and is preferably determined by calculating the shadow area factor of image data of several sterile instant bird's nests to obtain the average value or extreme value of each data, and is preferably 5.5 here.
[0115] In this embodiment, ln is the sign of a logarithmic function.
[0116] The beneficial effect of the above technical solution is: the present invention counts the number of first coding marks, the number of second coding marks and the number of third coding marks, and calculates the shadow area degree value of the real-time grayscale image. By calculating the shadow area degree value, an injection basis is provided for the injection of the marker, ensuring the accurate quantification of the number of microorganisms, which helps to issue an alarm in time when the number of microorganisms exceeds the safety threshold, so as to take corresponding measures.
[0117] S140: injecting a marker into the instant bird's nest mixture based on the shaded area degree value, and specifically marking the microorganisms in the instant bird's nest mixture based on the marker;
[0118] In some embodiments of the present application, when a marker is injected into the instant bird's nest mixture based on the shaded area degree value, the method includes:
[0119] Presetting a plurality of degree value intervals, wherein each degree value interval includes a corresponding first preset degree value and a second preset degree value;
[0120] Preset multiple injection amount values, wherein the injection amount values and degree value intervals are set in one-to-one correspondence;
[0121] Traversing the degree value of the shadow area in all degree value intervals, determining the degree value interval that matches the degree value of the shadow area, and determining the corresponding injection amount value;
[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 use any dye that can distinguish the color from the instant bird's nest mixture as a marker, and generally a specific nucleic acid dye that can mark Escherichia coli can be selected.
[0124] In this embodiment, the first degree value interval Z1, Z1 = [0, 1), the second degree value interval Z2, Z2 = [1, 2), the third degree value interval Z3, Z3 = [2, 3), the fourth degree value interval Z4, Z4 = [3, 4), the fifth degree value interval Z5, Z5 = [4, 5), the sixth degree value interval Z6, Z6 = [6, 7), and the remaining ones are no longer shown one by one and are set according to the specific situation.
[0125] In this embodiment, the injection volume numerical value is set in one-to-one correspondence with the degree value interval. The injection volume corresponding to the first degree value interval Z1 is 0.35μg / mL, the injection volume corresponding to the second degree value interval Z2 is 0.4μg / mL, the injection volume corresponding to the third degree value interval Z3 is 0.45μg / mL, the injection volume corresponding to the fifth degree value interval Z5 is 0.5μg / mL, and the injection volume corresponding to the sixth degree value interval Z6 is 0.55μg / mL. The remaining examples are not given one by one and are set according to the specific situation.
[0126] The beneficial effect of the above technical solution is: the present invention traverses the degree value of the shadow area in all degree value intervals, determines the degree value interval that matches the degree value of the shadow area, and determines the corresponding injection volume value, and uses the determined injection volume value as the initial injection volume of the marker, which can realize the initialization setting of the injection volume, avoid the errors and delays caused by manual participation in the setting, and ensure the real-time nature of microbial detection.
[0127] In some embodiments of the present application, when the determined injection volume value is used as the initial injection volume of the marker, it also includes:
[0128] Analyzing the marker to determine characteristic data of the marker;
[0129] Analyze all feature data based on the pre-trained influence value model and output the corresponding injection influence value;
[0130] Extracting the same injection impact value from all injection impact values, and obtaining a plurality of same injection impact value intervals;
[0131] Count the number of first intervals with the same injection impact value interval;
[0132] Extracting a same injection impact value from all the same injection impact value intervals respectively, and calculating a first injection impact sum value;
[0133] Obtaining a preset injection influence value, eliminating all intervals with the same injection influence value that are smaller than the preset injection influence value, and counting the number of second intervals of the remaining intervals with the same injection influence value;
[0134] Extracting one same injection impact value from each of the remaining same injection impact value intervals, and calculating a second injection impact sum value;
[0135] Calculate the injection volume influence value of the marker according to the first interval number, the second interval number, the first injection influence sum value and the second injection influence sum value;
[0136] The impact value of the injection amount of the marker was calculated according to the following formula:
[0137]
[0138] Wherein, P is the injection amount influence value of the marker, Q2 is the second interval number, Q1 is the first interval number, S1 is the first injection influence sum value, S2 is the second injection influence sum value, and r is the preset injection influence value;
[0139] The initial injection volume is optimized according to the injection volume influence value to obtain the target injection volume of the marker, and the marker is injected into the instant bird's nest mixture based on the target injection volume.
[0140] In this embodiment, characteristic data refers to data that affects the injection volume, including sample type (such as bacteria, bacteriophages, fungi, and viruses, etc.), experimental purpose, staining efficiency, labeling cost, etc., which are not shown one by one here. The injection impact value is the degree of influence of each characteristic data on the injection volume. If the influence of a single characteristic data on the injection volume is greater, the injection impact value is greater, and each characteristic data has a positive correlation or negative correlation with the injection volume to varying degrees. As for the value of the injection impact value, it is not set here, as long as it can characterize the relationship between each characteristic data and the injection volume, it is not limited here.
[0141] In this embodiment, the influence value model is obtained by pre-training, and the specific training is as follows:
[0142] Obtain historical data, including marker injection data, marker experimental data, injection volume under various conditions and experimental results, etc.
[0143] Build a dataset based on historical data;
[0144] Sampling to obtain training subsets and test subsets: The entire data set is divided into two parts according to a preset ratio: training subset and test subset. The training subset is used to train the neural network model, while the test subset is used to evaluate the performance of the trained model.
[0145] Obtain a pre-selected neural network model, and iteratively train the neural network model according to the training subset, and evaluate the iteratively trained neural network model according to the test subset. If the evaluation value of the neural network model after the current iterative training is greater than or equal to the evaluation value of the neural network model after the previous iterative training, stop the iterative training and obtain the influence value model, where the evaluation indicators include accuracy, loss function value, recall rate, etc., which are used to measure the performance of the model.
[0146] In this embodiment, if all the impact values are {2,2,4,6,6,7,8,8,9}, then the same injection impact value intervals are {2,2}, {6,6}, {8,8}, the number of first intervals is 3, the first injection impact sum = 2+6+8, the preset injection impact value is 5, the remaining same injection impact value intervals are {6,6}, {8,8}, the number of second intervals is 2, and the second injection impact sum is 6+8.
[0147] The beneficial effect of the above technical solution is: the present invention calculates the injection amount influence value of the marker according to the first interval number, the second interval number, the first injection influence sum value and the second injection influence sum value, which can provide data support for the optimization adjustment of the initial injection amount and ensure the accurate adjustment of the initial injection amount.
[0148] In some embodiments of the present application, when the initial injection volume is optimized according to the injection volume influence value to obtain the target injection volume of the marker, it includes:
[0149] Presetting a plurality of injection volume influence value intervals, wherein each injection volume influence value interval includes a corresponding first preset injection volume influence value and a second preset injection volume influence value;
[0150] Presetting a plurality of optimization coefficient values, wherein the optimization coefficient values are set in one-to-one correspondence with the injection volume influence value intervals;
[0151] Traversing the injection volume influence value in all injection volume influence value intervals, determining an injection volume influence value interval that matches the injection volume influence value, and determining a corresponding optimization coefficient value;
[0152] The product value of the optimization coefficient value and the initial injection amount is calculated, and the product value is used as the target injection amount of the marker.
[0153] In this embodiment, the first injection amount influence value interval is W1, W1=[0, 1.25), the second injection amount influence value interval is W2, W2=[1.25, 1.55), the third injection amount influence value interval is W3, W3=[1.55, 1.75), the fourth injection amount influence value interval is W4, W4=[1.75, 2), the fifth injection amount influence value interval is W5, W5=[2, 2.25), the sixth injection amount influence value interval is W6, W6=[2.25, 2.55), and the rest are no longer shown one by one by examples, and are set according to specific circumstances.
[0154] In this embodiment, the optimization coefficient value is set in one-to-one correspondence with the injection volume influence value interval. 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 examples are not given one by one 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, the target injection volume is 0.475 μg / mL.
[0156] The beneficial effect of the above technical solution is: the present invention determines the corresponding optimization coefficient value, calculates the product value of the optimization coefficient value and the initial injection amount, and uses the product value as the target injection amount of the marker, which can ensure the accurate injection of the marker, avoid excessive injection, resulting in excessive staining and cost waste, avoid insufficient injection, insufficient staining, and inaccurate microbial counts. At the same time, the initial injection amount is dynamically adjusted through the optimization coefficient value, which ensures the comprehensiveness and accuracy of the injection amount setting and avoids the setting process being too single.
[0157] S150: Count the specifically marked 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 sterility alarm when it is determined that an alarm should be issued.
[0158] In this embodiment, the preset analysis method includes flow cytometry, fluorescence microscope or other automatic imaging analysis system, which can be selected according to actual conditions. It is applicable to any technical means of counting microorganisms using flow cytometry and fluorescence microscope in the prior art. As long as the automatic imaging analysis system can obtain the number of microorganisms by comparing the image chromaticity / grayscale of the collected image with the preset chromaticity / grayscale, it is also applicable to the prior art and will not be described in detail here.
[0159] In some embodiments of the present application, when determining whether to issue an alarm based on the determined number of microorganisms, the method includes:
[0160] Obtaining a preset number of microorganisms, and determining whether to issue an alarm reminder based on the relationship between the number of microorganisms and the preset number of microorganisms;
[0161] When the number of microorganisms is less than the preset number of microorganisms, it is determined that no alarm reminder 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 number of microorganisms refers to a safety threshold or warning line of the number of microorganisms in the instant bird's nest mixture, which is preset according to pharmaceutical production and quality control standards, and is preferably 0 here.
[0164] The beneficial effect of the above technical solution is that 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, can quickly detect the presence of microorganisms at the early stage of contamination, and realize real-time sterile warning of instant bird's nest mixture, thereby ensuring the safety of users' consumption.
[0165] like Figure 2 As shown, in another preferred embodiment based on the above embodiment, this embodiment provides a system for preparing instant bird's nest, comprising:
[0166] A region division module is used to receive a real-time grayscale image of the instant bird's nest mixture, determine the shadow area on the real-time grayscale image, and divide all the shadow areas into regions to obtain a plurality of separate shadow areas, wherein there is no overlapping area between each separate shadow area;
[0167] A first calculation module, used for determining the pixel points of each individual shadow area, and calculating the shadow area factor of the individual shadow area based on all the pixel points;
[0168] A second calculation module is used to extract all shadow area factors and calculate the shadow area degree value of the real-time grayscale image according to the shadow area factors;
[0169] A specific marking module, used for injecting a marker into the instant bird's nest mixture based on the shaded area degree value, and specifically marking the microorganisms in the instant bird's nest mixture based on the marker;
[0170] The sterility warning module is used to count specifically marked 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 sterility alarm when it is determined that an alarm should be issued.
[0171] In some embodiments of the present application, it also includes:
[0172] An image processing module, used for acquiring an original image of the instant bird's nest mixture and preprocessing the original image, wherein the preprocessing includes eliminating noise and outliers;
[0173] A second division module is used to divide the preprocessed original image into multiple sub-regions based on a non-overlapping window strategy;
[0174] An image enhancement module, used to enhance the contrast in the sub-region based on a local histogram equalization algorithm;
[0175] A grayscale conversion module, used for mapping the pixel value 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 recombines to obtain the real-time grayscale image.
[0177] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0178] The present application is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0179] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0180] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions 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 rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does 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 instant bird's nest, characterized in that: include: Receiving a real-time grayscale image of the instant bird's nest mixture, determining a shadow area on the real-time grayscale image, and dividing the shadow area into multiple separate shadow areas, wherein there is no overlapping area between each separate shadow area; Determine the pixel points of each individual shadow area, and calculate the shadow area factor of the individual shadow area based on all the pixel points; Extracting each of the shadow area factors, and calculating the shadow area degree value of the real-time grayscale image according to the shadow area factor; Injecting a marker into the instant bird's nest mixture based on the shaded area degree value, and specifically marking the microorganisms in the instant bird's nest mixture based on the marker; The specifically marked microorganisms are counted according to a preset analysis method, and it is determined whether to issue an alarm based on the determined number of microorganisms. When it is determined that an alarm is issued, a corresponding sterility alarm is responded to.
2. The method for preparing instant bird's nest according to claim 1, characterized in that: Before receiving the real-time grayscale image of the instant bird's nest mixture, it also includes: Acquire an original image of the instant bird's nest mixture, and preprocess the original image, wherein the preprocessing includes eliminating noise and outliers; The preprocessed original image is divided into multiple sub-regions based on a non-overlapping window strategy; Enhance the contrast in the sub-region based on the local histogram equalization algorithm; According to a preset grayscale conversion function, the pixel value of each sub-region is mapped to a new grayscale level; Grayscale conversion is performed on each sub-region based on the new grayscale level, and the sub-regions are recombined to obtain the real-time grayscale image.
3. The method for preparing instant bird's nest according to claim 1, characterized in that: When determining the pixel points of each individual shadow area and calculating the shadow area factor of the individual shadow area based on all the pixel points, it includes: Extract all pixel points and construct a pixel value set based on the pixel values corresponding to all pixel points; Determine the cluster center of the pixel value set based on the K-Means clustering algorithm; Determine the pixel distance from each pixel value in the pixel value set to the cluster center respectively, and construct a pixel distance set; Calculate the shadow area factor of the individual shadow areas based on the set of pixel distances: Among them, G is the shadow area factor of the individual shadow area, c1 is the weight of the individual shadow area, n is the number of pixel distances in the pixel distance set, e i is the i-th pixel distance in the pixel distance set, e 均 is the average value of all pixel distances in the pixel distance set, h i is the weight corresponding to the i-th pixel distance.
4. The method for preparing instant bird's nest according to claim 3, characterized in that: When all shadow area factors are extracted and the shadow area degree value of the real-time grayscale image is calculated according to the shadow area factors, it includes: Obtaining a preset shadow area factor, and generating a first coding mark for all shadow area factors that are smaller than the preset shadow area factor; Generating a second coding mark from all shadow area factors that are equal to the preset shadow area factor; Generating a third coding mark for all shadow area factors that are smaller than the preset shadow area factor; Count the number of the first coding marks, the number of the second coding marks, and the number of the third coding marks, and calculate the shadow area degree value of the real-time grayscale image: Wherein, K is the shadow area degree value of the real-time grayscale image, L1 is the number of first coding marks, L2 is the number of second coding marks, and L3 is the number of third coding marks.
5. The method for preparing instant bird's nest according to claim 1, characterized in that: When a marker is injected into the instant bird's nest mixture based on the shaded area degree value, the method comprises: Presetting a plurality of degree value intervals, wherein each degree value interval includes a corresponding first preset degree value and a second preset degree value; Preset multiple injection amount values, wherein the injection amount values and degree value intervals are set in one-to-one correspondence; Traversing the degree value of the shadow area in all degree value intervals, determining the degree value interval that matches the degree value of the shadow area, and determining the corresponding injection amount value; The determined injection volume value is used as the initial injection volume of the marker.
6. The method for preparing instant bird's nest according to claim 5, characterized in that: When the determined injection volume value is used as the initial injection volume of the marker, it also includes: Analyzing the marker to determine characteristic data of the marker; Analyze all feature data based on the pre-trained influence value model and output the corresponding injection influence value; Extracting the same injection impact value from all injection impact values, and obtaining a plurality of same injection impact value intervals; Count the number of first intervals with the same injection impact value interval; Extracting a same injection impact value from all the same injection impact value intervals respectively, and calculating a first injection impact sum value; Obtaining a preset injection influence value, eliminating all intervals with the same injection influence value that are smaller than the preset injection influence value, and counting the number of second intervals of the remaining intervals with the same injection influence value; Extracting one same injection impact value from each of the remaining same injection impact value intervals, and calculating a second injection impact sum value; Calculate the injection volume influence value of the marker according to the first interval number, the second interval number, the first injection influence sum value and the second injection influence sum value; The impact value of the injection amount of the marker was calculated according to the following formula: Wherein, P is the injection amount influence value of the marker, Q2 is the second interval number, Q1 is the first interval number, S1 is the first injection influence sum value, S2 is the second injection influence sum value, and r is the preset injection influence value; The initial injection volume is optimized according to the injection volume influence value to obtain the target injection volume of the marker, and the marker is injected into the instant bird's nest mixture based on the target injection volume.
7. The method for preparing instant bird's nest according to claim 6, characterized in that: When the initial injection volume is optimized according to the injection volume influence value to obtain the target injection volume of the marker, the method includes: Presetting a plurality of injection volume influence value intervals, wherein each injection volume influence value interval includes a corresponding first preset injection volume influence value and a second preset injection volume influence value; Presetting a plurality of optimization coefficient values, wherein the optimization coefficient values are set in one-to-one correspondence with the injection volume influence value intervals; Traversing the injection volume influence value in all injection volume influence value intervals, determining an injection volume influence value interval that matches the injection volume influence value, and determining a corresponding optimization coefficient value; The product value of the optimization coefficient value and the initial injection amount is calculated, and the product value is used as the target injection amount of the marker.
8. The method for preparing instant bird's nest according to claim 1, characterized in that: When deciding whether to issue an alarm based on the number of microorganisms determined, it includes: Obtaining a preset number of microorganisms, and determining whether to issue an alarm reminder based on the relationship between the number of microorganisms and the preset number of microorganisms; When the number of microorganisms is less than the preset number of microorganisms, it is determined that no alarm reminder will be issued; When the number of microorganisms is greater than or equal to the preset number of microorganisms, an alarm is issued.
9. A system for preparing instant bird's nest, applied to the method for preparing instant bird's nest as claimed in any one of claims 1 to 8, characterized in that: include: A region division module is used to receive a real-time grayscale image of the instant bird's nest mixture, determine the shadow area on the real-time grayscale image, and divide all the shadow areas into regions to obtain a plurality of separate shadow areas, wherein there is no overlapping area between each separate shadow area; A first calculation module, used for determining the pixel points of each individual shadow area, and calculating the shadow area factor of the individual shadow area based on all the pixel points; A second calculation module is used to extract all shadow area factors and calculate the shadow area degree value of the real-time grayscale image according to the shadow area factors; A specific marking module, used for injecting a marker into the instant bird's nest mixture based on the shaded area degree value, and specifically marking the microorganisms in the instant bird's nest mixture based on the marker; The sterility warning module is used to count the specifically marked 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 sterility alarm when it is determined that an alarm should be issued.
10. The system for preparing instant bird's nest according to claim 9, characterized in that: Also includes: An image processing module, used for acquiring an original image of the instant bird's nest mixture and preprocessing the original image, wherein the preprocessing includes eliminating noise and outliers; A second division module is used to divide the preprocessed original image into multiple sub-regions based on a non-overlapping window strategy; An image enhancement module, used to enhance the contrast in the sub-region based on a local histogram equalization algorithm; A grayscale conversion module, used for mapping the pixel value 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 recombines to obtain the real-time grayscale image.
Citation Information
Patent Citations
Real-time marine microorganism monitoring method
CN103177243A
Peanut aflatoxin detection method and system based on machine vision
CN114240807A
Tobacco leaf detection method, device and system and storage medium
CN115128033A
Food foreign matter rapid detection method and system based on image features
CN118470024A
Composite probiotic production safety monitoring method and system
CN118932118A