Image recognition-based quality monitoring method and system for cordyceps militaris fermented beverage
By collecting dynamic data in the production of Cordyceps militaris fermented beverages to establish a benchmark model and combining it with polarized structured light detection, the detection sensitivity is dynamically adjusted, solving the problem that existing technologies cannot identify potential quality problems. This enables early identification and warning of potential quality problems and improves the quality control effect.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HEYUAN YUYU SHANGPIN BIOTECHNOLOGY CO LTD
- Filing Date
- 2025-11-25
- Publication Date
- 2026-06-30
AI Technical Summary
Existing image recognition-based quality monitoring systems for Cordyceps militaris fermented beverages are unable to provide early warnings or identify potential, delayed-onset quality issues, leading to the continued flow of potentially problematic products into the market and impacting brand reputation and consumer satisfaction.
By collecting dynamic data on temperature, pH, and dissolved oxygen concentration during the fermentation process, a dynamic benchmark model is established. Combined with polarized structured light penetrating the bottled beverage, microscopic aerodynamic characteristic parameters of the beverage are generated, the detection sensitivity is dynamically adjusted, and the potential quality risk index is calculated.
It enables early identification and warning of potential quality problems, prevents substandard products from entering the market, improves quality control, and protects brand reputation and consumer satisfaction.
Smart Images

Figure CN121298604B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of food quality monitoring technology, and more specifically, to a method and system for monitoring the quality of Cordyceps militaris fermented beverages based on image recognition. Background Technology
[0002] In the production of Cordyceps militaris fermented beverages, automated quality monitoring systems based on image recognition have gradually replaced manual inspections to improve inspection efficiency, reduce errors, and meet the real-time feedback requirements of large-scale production. This system uses a high-resolution camera to capture images of filled and capped beverages, analyzing appearance features such as color, transparency, and visible suspended matter. It can quickly identify defects such as insufficient filling, bottle damage, label errors, or obvious foreign objects, ensuring consistent appearance.
[0003] However, the bio-fermentation process is complex. Minor non-visual process fluctuations (such as a brief deviation of the fermenter temperature from the optimal range due to sensor drift) may not trigger a serious alarm, but they can affect the highly sensitive metabolism of Cordyceps militaris, causing the fermentation broth to generate small amounts of unstable byproducts or incompletely converted active ingredients. These substances are uniformly dissolved at the molecular or nanoscale, with low concentrations and no visible particles, flocculent matter, or color differences. Their appearance is indistinguishable from qualified products, and existing visual systems cannot detect them, so they are still judged as qualified and released.
[0004] Once in storage and transportation, these unstable components gradually decompose or aggregate, forming visible flocculent precipitates at the bottom of the bottle within the shelf life and causing a decline in flavor. Despite consumer feedback, the system continues to release qualified products based on appearance standards, resulting in a continuous influx of potentially problematic batches into the market, damaging brand reputation and consumer satisfaction. The existing system lacks correlation analysis of fermentation process parameters, making it difficult to provide early warnings of such delayed-onset inherent quality problems. Summary of the Invention
[0005] This application provides a method and system for quality monitoring of Cordyceps militaris fermented beverages based on image recognition. It aims to solve the technical problem that existing image recognition systems that rely solely on appearance features cannot provide early warnings or identify potential, delayed-appearing quality problems, leading to the continuous influx of potentially problematic products into the market and negatively impacting brand reputation and consumer satisfaction.
[0006] On the one hand, this application provides a method for quality monitoring of Cordyceps militaris fermented beverages based on image recognition, including:
[0007] Dynamic data on temperature, pH and dissolved oxygen concentration were collected during the fermentation of Cordyceps militaris, and a dynamic benchmark model including the temperature range, pH range and dissolved oxygen range was established based on the dynamic data.
[0008] The current fermentation state is determined by comparing real-time fermentation state parameters with a dynamic benchmark model; wherein the current fermentation state is at least one of the following: process stability state, temperature fluctuation risk state, pH fluctuation risk state, or dissolved oxygen abnormal risk state.
[0009] Polarized structured light is used to penetrate the filled beverage, and images of the beverage after the polarized structured light penetrates the beverage are acquired. Based on the images, microscopic aerodynamic feature parameters of the beverage are generated.
[0010] Based on the current fermentation state, the detection sensitivity of microscopic optics characteristic parameters is dynamically adjusted. The dynamic benchmark model and microscopic optics characteristic parameters are integrated to calculate the potential quality risk index, and the long-term quality risk of the beverage is judged based on the index.
[0011] Optionally, the step of dynamically adjusting the detection sensitivity of the microscopic optics characteristic parameters according to the current fermentation state includes:
[0012] Before filling, the modulation characteristics of the empty bottle to polarized structured light are collected to generate the optical features of the empty bottle, and the optical features of the empty bottle are bound to the unique identifier of the empty bottle.
[0013] After filling, the unique identifier of the beverage bottle is read, and the corresponding optical features of the empty bottle are retrieved;
[0014] Based on the optical characteristics of empty bottles, the corresponding areas of the beverage images after filling are compensated to obtain microscopic optical characteristic parameters that purely reflect the internal state of the liquid.
[0015] Based on the optical characteristics of empty bottles, an optical compensation algorithm is used to process images of beverages after filling to obtain liquid characteristic data that reflects the internal state of the liquid.
[0016] Based on the current fermentation status, the parameters of the compensation algorithm are dynamically adjusted, and the discrimination threshold and weight of the liquid characteristic data are adaptively corrected to calculate the potential quality risk index.
[0017] Optionally, the steps of dynamically adjusting the parameters of the compensation algorithm based on the current fermentation state and adaptively correcting the discrimination threshold and weight of the liquid characteristic data to calculate the potential quality risk index include:
[0018] Identify the correlation between various features in the dynamic benchmark model, Cordyceps militaris characteristics and liquid characteristic data, as well as the mapping relationship between each feature and product flocculation risk;
[0019] Based on the current fermentation status, the corresponding sensitivity adjustment factor is calculated according to the correlation and mapping relationships.
[0020] The discrimination thresholds and weights of each feature in the liquid feature data are corrected by applying a sensitivity adjustment factor; and the potential quality risk index is calculated based on the corrected discrimination thresholds and weights.
[0021] Optionally, the steps of identifying the correlation between various features in the dynamic baseline model, Cordyceps militaris characteristics, and liquid characteristic data, as well as the mapping relationship between each feature and product flocculation risk, include:
[0022] The correlation mode update is initiated according to a preset period or when a decrease in prediction accuracy is detected;
[0023] Based on the current production batch of Cordyceps militaris strain, culture medium composition, environmental microclimate, or equipment status, weighted historical data is used.
[0024] By analyzing weighted historical data, we can identify the correlations between various features in the dynamic benchmark model, Cordyceps militaris characteristics and liquid characteristic data, as well as the mapping relationship between each feature and product flocculation risk.
[0025] Based on the current fermentation state, the steps for calculating the corresponding sensitivity adjustment factor, according to the correlation and mapping relationships, include:
[0026] Determine the set of microscopic optics features to be adjusted;
[0027] Based on the correlation model, the initial adjustment factor of each feature in the feature set is calculated. The initial adjustment factor reflects the independent contribution of each feature to the product flocculation risk.
[0028] The interaction effects of the initial adjustment factors under the current fermentation state were evaluated, including synergistic and antagonistic effects.
[0029] By iteratively optimizing the balance interaction effect, the risk index can maintain stable sensitivity when the state changes and accurately reflect the risk level when multiple parameters are abnormal.
[0030] Output the optimized set of sensitivity adjustment factors.
[0031] Optionally, the step of estimating the interaction effect of the initial adjustment factor under the current fermentation state includes:
[0032] Continuously monitor the long-term changing trends of fermentation environmental parameters and the actual flocculation risk feedback when multiple parameters are abnormal. Among them, fermentation environmental parameters include at least one of humidity parameters and air pressure parameters.
[0033] When a deviation is detected between the long-term trend and the actual flocculation risk feedback, or when the prediction accuracy declines, the interaction effect assessment model is updated.
[0034] Based on the current fermentation status, dynamically adjust the weights of historical data related to environmental humidity and gas pressure fermentation environmental parameters;
[0035] By analyzing weighted historical data, we can identify the dynamic changes in the intensity of synergistic and antagonistic effects among the initial adjustment factors under different combinations of environmental humidity and air pressure.
[0036] Based on the identified dynamic change patterns, the evaluation functions for synergistic and antagonistic effects are modified to assess the interaction effects of the initial adjustment factors under the current fermentation state.
[0037] Optionally, the steps for iteratively optimizing the balanced interaction effects include:
[0038] Identify high-risk feature combinations under the current fermentation state. High-risk feature combinations are those where multiple microscopic optics parameters show abnormalities simultaneously in historical data, leading to a significant increase in actual flocculation risk.
[0039] For high-risk feature combinations, enhance the local search strength of the optimization algorithm;
[0040] During the iterative optimization process, a state-aware penalty function is introduced. When the optimization result deviates from the historical true risk, the penalty weight is increased to guide the optimization process to converge toward the global optimal solution, so as to balance the synergistic and antagonistic effects.
[0041] Optionally, the steps for identifying high-risk combinations of characteristics in the current fermentation state include:
[0042] When a deviation is detected in the correlation between long-term trends and historical high-risk feature combinations, or when the accuracy of predictions declines, the high-risk feature combination update mechanism is activated.
[0043] Based on the current fermentation status, weighted historical data;
[0044] The dynamic correlation between microscopic optics characteristic parameter sets and flocculation risk under different parameter combinations was analyzed.
[0045] Update high-risk parameter combinations and their risk weights.
[0046] This technical solution ensures that the identification of high-risk feature combinations is dynamic and accurate. Through timely update mechanisms and weighted historical data, the system can better adapt to changes in the fermentation process, thereby improving the effectiveness of risk warning.
[0047] Optionally, for high-risk feature combinations, steps to enhance the local search strength of the optimization algorithm include:
[0048] When a deviation is detected in the correlation between long-term trends and historical high-risk feature combinations, or when the accuracy of predictions declines, the high-risk feature combination update mechanism is activated.
[0049] Based on the current fermentation status, weighted historical data;
[0050] The algorithm identifies and explores the optimal parameter configuration under different combinations of fermentation environment parameters.
[0051] Based on the optimal configuration, enhance the local search strength of the optimization algorithm.
[0052] Secondly, this application also discloses a quality monitoring system for Cordyceps militaris fermented beverages based on image recognition, the system comprising:
[0053] The data acquisition module is used to collect dynamic change data on temperature, pH and dissolved oxygen concentration during the fermentation process of Cordyceps militaris, and to establish a dynamic benchmark model based on the dynamic change data, which includes the temperature change range, pH change range and dissolved oxygen change range.
[0054] The fermentation state determination module is used to determine the current fermentation state by comparing real-time fermentation state parameters with a dynamic benchmark model; wherein the current fermentation state is at least one of the following: process stability state, temperature fluctuation risk state, pH fluctuation risk state, or dissolved oxygen abnormal risk state.
[0055] The image acquisition and analysis module is used to use polarized structured light to penetrate the filled beverage, acquire images of the beverage after the polarized structured light has penetrated it, and generate microscopic aerodynamic feature parameters of the beverage based on the images.
[0056] The quality risk calculation module is used to dynamically adjust the detection sensitivity of microscopic optics characteristic parameters based on the current fermentation state, integrate the dynamic benchmark model with the microscopic optics characteristic parameters, calculate the potential quality risk index, and judge the long-term quality risk of the beverage based on the index.
[0057] Beneficial effects
[0058] This application discloses a method for quality monitoring of Cordyceps militaris fermented beverages based on image recognition. By collecting dynamic data on temperature, pH, and dissolved oxygen concentration changes during the fermentation process of Cordyceps militaris, and establishing a dynamic benchmark model, the current fermentation state can be determined in real time. Simultaneously, polarized structured light is used to penetrate the bottled beverage and acquire images to generate microscopic optics parameters of the beverage's interior. Based on this, the detection sensitivity of the microscopic optics parameters is dynamically adjusted according to the current fermentation state, and the dynamic benchmark model and microscopic optics parameters are integrated to calculate a potential quality risk index, thereby assessing the long-term quality risk of the beverage. This method overcomes the limitations of existing technologies that rely solely on appearance features and cannot predict or identify potential, delayed-onset quality problems. Through real-time monitoring of macroscopic parameters during the fermentation process and in-depth analysis of the beverage's internal microscopic optics characteristics, combined with dynamically adjusted detection sensitivity, this application can effectively identify potential quality problems that are initially invisible to the naked eye due to subtle process fluctuations during fermentation, such as flocculent sedimentation and flavor deviations. This enables the system to provide early warnings and identify potential problems before products leave the factory, thereby preventing potentially problematic products from entering the market, effectively protecting brand reputation and consumer satisfaction, and significantly improving the quality control level of Cordyceps militaris fermented beverages. Attached Figure Description
[0059] To illustrate this application more clearly, the accompanying drawings used in the embodiments will be briefly described below. Obviously, those skilled in the art can obtain other drawings based on these drawings without any creative effort.
[0060] Figure 1 The diagram above illustrates a process flow chart for a method of quality monitoring of Cordyceps militaris fermented beverage based on image recognition.
[0061] Figure 2 The diagram above illustrates a structural schematic of a Cordyceps militaris fermented beverage quality monitoring system based on image recognition.
[0062] Figure labeling: 100, Image recognition-based Cordyceps militaris fermented beverage quality monitoring system; 10, Acquisition module; 20, Fermentation status judgment module; 30, Image acquisition and analysis module; 40, Quality risk calculation module. Detailed Implementation
[0063] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments. The components of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0064] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, the terms "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0065] On large-scale production lines for Cordyceps militaris fermented beverages, existing automated quality monitoring systems primarily utilize industrial image recognition technology to perform rapid, non-contact visual quality checks on filled and capped beverages. The system captures images of each bottle using high-resolution industrial cameras and analyzes the color depth, overall transparency, and the presence of visible suspended matter. However, this monitoring method, relying solely on visual characteristics, cannot anticipate or identify potential, delayed-onset quality issues before the product leaves the factory. This results in batches of potentially problematic products continuously entering the market, causing sustained negative impacts on brand reputation and consumer satisfaction.
[0066] like Figure 1 The diagram illustrates an exemplary process for quality monitoring of Cordyceps militaris fermented beverages based on image recognition. This application proposes a quality monitoring method for Cordyceps militaris fermented beverages based on image recognition, comprising:
[0067] S10, collect dynamic change data on temperature, pH and dissolved oxygen concentration during the fermentation process of Cordyceps militaris, and establish a dynamic benchmark model based on the dynamic change data, including the temperature change range, pH change range and dissolved oxygen change range.
[0068] S20, by comparing the real-time fermentation state parameters with the dynamic benchmark model, the current fermentation state is determined; wherein the current fermentation state is at least one of the following: process stability state, temperature fluctuation risk state, pH fluctuation risk state, or dissolved oxygen abnormal risk state.
[0069] S30, using polarized structured light to penetrate the filled beverage, and acquiring an image of the polarized structured light penetrating the beverage, and generating microscopic aerodynamic feature parameters of the beverage interior based on the image;
[0070] S40, based on the current fermentation state, dynamically adjust the detection sensitivity of the microscopic optics characteristic parameters, integrate the dynamic benchmark model and the microscopic optics characteristic parameters, calculate the potential quality risk index, and judge the long-term quality risk of the beverage based on the index.
[0071] Among them, polarized structured light is a type of light with a specific polarization state and spatial intensity distribution, used to penetrate beverages to obtain information about their internal microstructure.
[0072] Microscopic optical characteristic parameters refer to parameters that reflect the internal microstructure and component distribution of a beverage, extracted by analyzing images obtained after polarized structured light penetrates the beverage. These parameters include particle size, distribution uniformity, and refractive index changes.
[0073] The Potential Quality Risk Index is a quantitative indicator calculated by combining a dynamic benchmark model and micro-optical characteristic parameters. It is used to assess the likelihood of quality problems occurring in beverages during storage and transportation.
[0074] Long-term quality risks refer to problems such as flocculation, sedimentation, and flavor changes that may occur in beverages during their shelf life due to minor fluctuations in the fermentation process.
[0075] The implementation methods described in this application will elaborate on each step of the above method.
[0076] First, during fermentation, dynamic data on the *Cordyceps militaris* fungus needs to be collected, and a dynamic baseline model needs to be established based on this data. Dynamic data can include temperature, pH, and dissolved oxygen concentration. This data can be collected in real time by installing appropriate sensors in the fermenter. For example, temperature sensors can be thermocouples or resistance temperature detectors (RTDs), pH sensors can be glass electrodes or solid electrodes, and dissolved oxygen sensors can use fluorescence or electrochemical methods. The collected data is transmitted to a data processing unit for storage and analysis. The establishment of the dynamic baseline model can be accomplished through statistical analysis of historical batch fermentation data. For example, under normal fermentation conditions, the average value and standard deviation of temperature, pH, and dissolved oxygen concentration at different fermentation stages can be calculated to determine their respective ranges of variation. These ranges constitute the dynamic baseline model, which is used to subsequently determine the fermentation status.
[0077] Secondly, the current fermentation state can be determined by comparing real-time fermentation state parameters with the dynamic baseline model. Real-time fermentation state parameters refer to the temperature, pH value, and dissolved oxygen concentration acquired from the fermenter at the monitoring point in time. For example, if the real-time temperature exceeds the temperature variation range set in the dynamic baseline model, the current fermentation state can be determined to be in a temperature fluctuation risk state. Similarly, if the real-time pH value or dissolved oxygen concentration exceeds its corresponding variation range, it is determined to be a pH fluctuation risk state or a dissolved oxygen abnormality risk state, respectively. If all real-time parameters are within the range of the dynamic baseline model, the process is determined to be in a stable state. This determination can be made using simple threshold comparisons or more complex statistical methods, such as control chart analysis.
[0078] Next, polarized structured light is used to penetrate the filled beverage, and images of the penetrating beverage are captured. Based on these images, microscopic optical characteristic parameters of the beverage's interior are generated. Polarized structured light can be generated using a laser combined with a polarizer and a spatial light modulator. For example, linearly polarized or circularly polarized light can be used, and specific structured light patterns (such as stripes, grids, etc.) can be generated using gratings or digital micromirror devices (DMDs). When this light penetrates the filled beverage, the microstructure within the beverage (such as undissolved particles, protein aggregates, polysaccharide chains, etc.) affects the polarization state and intensity distribution of the light. These effects can be captured by a high-resolution camera, forming a penetration image. Subsequently, image processing algorithms, such as Fourier transform, wavelet analysis, or machine learning algorithms, are used to extract microscopic optical characteristic parameters from these images, such as scattering intensity, degree of polarization, birefringence, and particle size distribution.
[0079] Finally, based on the current fermentation state, the detection sensitivity of microscopic aerodynamic parameters is dynamically adjusted. The dynamic benchmark model and microscopic aerodynamic parameters are then integrated to calculate a potential quality risk index, which is used to determine the long-term quality risk of the beverage. For example, when the fermentation state is determined to be at risk of temperature fluctuations, it indicates a potential risk of generating unstable substances during fermentation. In this case, the detection sensitivity of microscopic aerodynamic parameters related to protein aggregation or polysaccharide degradation can be increased. This means that when calculating the potential quality risk index, the weights of these specific parameters will be increased, or their discrimination thresholds will be tightened. The integration of the dynamic benchmark model and microscopic aerodynamic parameters can be achieved by establishing a multivariate statistical model or a machine learning model. For example, models such as Support Vector Machines (SVM), neural networks, or decision trees can be used, taking fermentation state information (from the dynamic benchmark model) and microscopic aerodynamic parameters as input, and outputting a potential quality risk index. This index can be a continuous value or a discrete risk level (such as low, medium, and high risk). When the calculated potential quality risk index exceeds a preset threshold, it can be determined that the beverage has a long-term quality risk, allowing for timely measures to prevent problematic products from entering the market.
[0080] The overall working principle of this application lies in combining macroscopic dynamic data during the fermentation process with the microscopic optics and microscopic characteristics of the beverage after bottling to achieve a comprehensive and real-time assessment of the potential quality risks of Cordyceps militaris fermented beverages. Traditional methods rely solely on monitoring parameters during the fermentation process or visual inspection after bottling, which cannot effectively capture the potential impact of subtle fluctuations during fermentation on the long-term quality of the product. This application first collects dynamic change data on temperature, pH value, and dissolved oxygen concentration during the fermentation process and establishes a dynamic benchmark model, thereby enabling real-time judgment of the current fermentation state. This step provides important background information for subsequent microscopic detection, allowing the system to perceive potential hazards during the fermentation process.
[0081] When a fermentation state is identified as posing a risk (such as a temperature fluctuation risk), the system dynamically adjusts the detection sensitivity of its microscopic optical characteristic parameters. This means that, for different types of fermentation risks, the system focuses on specific microscopic optical characteristics within the beverage that are related to that risk. For example, if fermentation temperature fluctuations may lead to protein denaturation, the system will increase the detection sensitivity for optical characteristics related to protein aggregates. This dynamic adjustment mechanism allows the system to more accurately capture microscopic changes associated with potential quality issues, avoiding missed detections or false alarms that might result from a one-size-fits-all detection approach.
[0082] Subsequently, the system uses polarized structured light to penetrate the filled beverage and acquires the penetration image, thereby generating microscopic optical characteristic parameters of the beverage's interior. Polarized structured light can provide richer microscopic structural information than ordinary light, such as particle shape, orientation, and birefringence, which is crucial for identifying early signs of flocculation and sedimentation. By fusing these microscopic optical characteristic parameters with fermentation state information (from a dynamic baseline model), the system can calculate a potential quality risk index. This fusion mechanism allows macroscopic fermentation process information and microscopic product internal structure information to corroborate each other, improving the accuracy and reliability of risk assessment. Ultimately, the long-term quality risk of the beverage is determined based on this index, enabling early warning and identification of products that may experience flocculation and sedimentation during storage and transportation before the product leaves the factory, effectively solving the problem of delayed manifestation of quality problems in existing technologies.
[0083] The core innovation of this application lies in its organic integration of dynamic monitoring of the fermentation process with microscopic and optical detection of the beverage after bottling, and the introduction of a mechanism for dynamically adjusting detection sensitivity based on the fermentation state. Compared to existing image recognition systems that rely solely on appearance features, this application has significant advantages. Existing systems often fail to detect subtle, non-visual process fluctuations during fermentation, which can have a delayed but significant impact on product quality. For example, when the temperature control system of the fermentation tank experiences a slight drift, resulting in the formation of a small amount of unstable byproducts in the fermentation liquid, existing systems, focusing only on appearance, will classify these beverages as acceptable and release them, ultimately leading to flocculent sedimentation within the product's shelf life.
[0084] This application establishes a dynamic benchmark model to assess potential risks during fermentation, such as temperature fluctuation risks, in real time. Based on this, the system dynamically adjusts the detection sensitivity of microscopic optical characteristic parameters according to the current fermentation state. This means that when a specific risk occurs during fermentation, the system will more specifically focus on microscopic changes within the beverage related to that risk, thereby improving early warning capabilities. For example, under temperature fluctuation risk conditions, the system will increase the detection sensitivity of optical features that may lead to protein aggregation or polysaccharide degradation, even if these changes are macroscopically invisible to the naked eye. This dynamic adjustment and fusion mechanism enables this application to more comprehensively and accurately assess the potential quality risks of beverages, effectively identifying products that appear acceptable in appearance but have long-term quality risks. Therefore, this application can significantly improve the quality monitoring level of Cordyceps militaris fermented beverages, reduce product recall risks, and protect brand reputation and consumer rights.
[0085] In some embodiments, this application further proposes the step of dynamically adjusting the detection sensitivity of microscopic optics characteristic parameters according to the current fermentation state, including:
[0086] Before filling, the modulation characteristics of the empty bottle to polarized structured light are collected to generate the optical features of the empty bottle, and the optical features of the empty bottle are bound to the unique identifier of the empty bottle.
[0087] After filling, the unique identifier of the beverage bottle is read, and the corresponding optical features of the empty bottle are retrieved;
[0088] Based on the optical characteristics of the empty bottle, the corresponding area of the image of the beverage after filling is compensated to obtain microscopic optical characteristic parameters that purely reflect the internal state of the liquid.
[0089] Based on the optical characteristics of the empty bottle, the image of the beverage after filling is processed by an optical compensation algorithm to obtain liquid characteristic data reflecting the internal state of the liquid.
[0090] Based on the current fermentation status, the parameters of the compensation algorithm are dynamically adjusted, and the discrimination threshold and weight of the liquid characteristic data are adaptively corrected to calculate the potential quality risk index.
[0091] Specifically, before filling, empty bottles are scanned using specialized optical inspection equipment to collect their modulation characteristics for polarized structured light. These modulation characteristics can include the bottle's transmittance for polarized light, birefringence, scattering properties, and any technical features that might affect the optical path. This collected data is processed to generate optical features for the empty bottles, the purpose of which is to quantify the impact of each empty bottle on polarized structured light. To ensure the accuracy of subsequent traceability and compensation, these optical features are uniquely linked to a unique identifier for that empty bottle, such as through a QR code, RFID tag, or serial number.
[0092] After the beverage is filled, the system first reads the unique identifier of the current beverage bottle. Based on this unique identifier, the system retrieves the optical characteristics of the empty bottle corresponding to that beverage bottle from a pre-stored database. This step ensures the targetedness and accuracy of subsequent compensation operations.
[0093] In practical applications, compensation processing is performed on the corresponding areas of the image of the filled beverage based on the retrieved optical features of the empty bottle. This compensation aims to eliminate or reduce the influence of the empty bottle itself on the polarized structured light, thereby enabling the compensated image data to more purely reflect the microstructure and optical properties of the beverage liquid. This yields microscopic optical characteristic parameters that purely reflect the internal state of the liquid, and these parameters more accurately represent the quality information of the beverage itself.
[0094] Furthermore, based on the optical characteristics of the empty bottle, the image of the filled beverage is processed using an optical compensation algorithm. This optical compensation algorithm can be a pre-defined mathematical model or a machine learning model, which can correct the original image data according to the optical characteristics of the empty bottle to remove interference introduced by the bottle. After processing, liquid characteristic data reflecting the internal state of the liquid can be obtained, which serves as the basis for subsequent quality risk assessment.
[0095] Furthermore, the system dynamically adjusts the parameters of the optical compensation algorithm based on the current fermentation state. For example, when the fermentation state is under temperature fluctuation risk, the compensation algorithm may be adjusted to more sensitively detect temperature-related optical changes. Simultaneously, the system adaptively corrects the discrimination threshold and weights of the liquid feature data. The discrimination threshold defines whether the liquid feature data is within the normal range, while the weights reflect the degree to which different liquid feature data contribute to the potential quality risk index. Through this dynamic adjustment and adaptive correction, the potential quality risk index can be calculated more accurately, thereby improving the accuracy and real-time performance of quality monitoring.
[0096] Through the above technical solution, this application can effectively eliminate the interference of beverage bottles on optical detection results, significantly improving the purity and accuracy of microscopic optical characteristic parameters. This results in more accurate identification of the internal state of the beverage, avoiding misjudgments caused by bottle factors. Simultaneously, by dynamically adjusting the compensation algorithm parameters based on the current fermentation state and adaptively correcting the discrimination threshold and weights, the quality risk assessment system possesses higher adaptability and robustness, enabling more accurate and timely identification of potential quality risks. This provides a more reliable and refined monitoring method for the quality control of Cordyceps militaris fermented beverages.
[0097] For example, suppose that before bottling a batch of Cordyceps militaris fermented beverage, each empty bottle is first subjected to polarization structured light scanning. For instance, a polarization structured light emitter and a high-resolution CCD camera are used to scan the empty bottle from multiple angles, recording its transmittance, reflectance, and scattering mode for light of different polarization states. This data is then processed to generate an optical feature file for the empty bottle containing information such as a transmittance distribution map and a birefringence intensity map, and is then linked to an RFID tag on the bottom of the bottle.
[0098] After the beverage is filled, the bottle is identified by an RFID reader on the production line. The system then retrieves the corresponding optical feature file of the empty bottle from the database based on this identifier. Subsequently, when polarized structured light penetrates the filled beverage and is captured by a camera, a pre-defined optical compensation algorithm uses the retrieved optical features of the empty bottle to perform pixel-level corrections on the captured image. For example, if the empty bottle has high absorption or scattering of specific polarized light in a certain area, the compensation algorithm will adjust the image brightness or contrast of that area accordingly to offset the influence of the bottle.
[0099] Furthermore, assuming the current fermentation state assessment module indicates the fermentation process is under temperature fluctuation risk, the quality risk calculation module dynamically adjusts the parameters of the optical compensation algorithm based on this state. For example, it might enhance the compensation intensity for microstructural features related to temperature-sensitive protein aggregation or microbial activity in the image and increase the weight of these features in the liquid feature data. Simultaneously, the discrimination thresholds for these features are tightened, allowing even minute anomalies to be identified promptly. In this way, even when there are potential risks in the fermentation process, the system can accurately calculate the potential quality risk index through precise compensation and sensitivity adjustment, thereby effectively providing early warning of long-term quality risks in the beverage.
[0100] In some embodiments, this application further proposes the following steps for calculating the potential quality risk index: dynamically adjusting the parameters of the compensation algorithm based on the current fermentation state and adaptively correcting the discrimination threshold and weight of the liquid characteristic data.
[0101] Identify the correlation between the dynamic benchmark model, the characteristics of Cordyceps militaris, and the liquid characteristic data, as well as the mapping relationship between each characteristic and the product flocculation risk;
[0102] Based on the current fermentation state, and using the correlation and mapping relationships, calculate the corresponding sensitivity adjustment factor;
[0103] The sensitivity adjustment factor is applied to correct the discrimination threshold and weight of each feature in the liquid feature data; and the potential quality risk index is calculated based on the corrected discrimination threshold and weight.
[0104] Specifically, identifying the correlations between the dynamic benchmark model, the characteristics of Cordyceps militaris, and the various features in the liquid characteristic data refers to revealing the mutual influence and dependence between dynamic changes in data such as temperature, pH, and dissolved oxygen concentration during fermentation and the growth and metabolic characteristics of Cordyceps militaris (e.g., cell morphology, metabolites), as well as the microscopic and fluoroscopic characteristic parameters within the beverage (e.g., particle size, distribution, aggregation state). Simultaneously, identifying the mapping relationship between each feature and the product's flocculation risk refers to establishing a quantitative relationship between these correlated features and the probability or severity of flocculation in the final beverage, aiming to provide a data-driven basis for subsequent risk assessment.
[0105] Specifically, based on the current fermentation state and the aforementioned correlations and mappings, a corresponding sensitivity adjustment factor is calculated. This can be understood as dynamically calculating a set of coefficients to adjust the detection sensitivity of microscopic spectroscopy parameters based on the specific state of the current fermentation process (e.g., stable process state, temperature fluctuation risk state, pH fluctuation risk state, or dissolved oxygen anomaly risk state), utilizing the identified correlations and mappings. This sensitivity adjustment factor aims to reflect the contribution and sensitivity changes of different microscopic spectroscopy parameters to the product flocculation risk under the current specific fermentation state. Its purpose is to enable the risk assessment system to more accurately focus on the most critical risk indicators under the current state.
[0106] In practical applications, the sensitivity adjustment factor is used to correct the discrimination thresholds and weights of each feature in the liquid feature data. Specifically, the calculated sensitivity adjustment factor is applied to the preset discrimination thresholds and weights of each microscopic and optical characteristic parameter in the liquid feature data, for example, through multiplication or addition operations. The corrected discrimination thresholds and weights will be used for subsequent calculation of the potential quality risk index. The purpose is to ensure that the system can adaptively adjust the identification criteria for abnormal features and their importance in risk assessment under different fermentation states, thereby improving the accuracy and real-time performance of risk judgment.
[0107] Through the above technical solution, this application can significantly improve the intelligent and precise level of quality monitoring of Cordyceps militaris fermentation drinks. Specifically, by establishing the correlation relationship between the dynamic benchmark model, the characteristics of Cordyceps militaris and the liquid characteristic data, as well as the mapping relationship with the flocculation risk, the system can understand the complexity of the fermentation process at a deeper level, thus overcoming the problems of inaccurate or lagging risk assessment that may be caused by fixed or empirical parameter adjustment in the above basic solution when facing a complex and changeable fermentation environment. Further, the sensitivity adjustment factor is dynamically calculated according to the current fermentation state, and the discrimination threshold and weight are corrected accordingly, so that the risk assessment model can adaptively focus on the most critical risk indicators at present, greatly improving the early identification ability and warning accuracy of potential quality risks, especially flocculation risks, effectively reducing the yield of unqualified products, and ensuring the stability of product quality.
[0108] Exemplarily, the following is illustrated by a specific example. Suppose that in the production process of Cordyceps militaris fermentation drinks, the system first identifies through means such as historical data analysis and machine learning algorithms that among the microscopic optical characteristic parameters inside the drink, the particle aggregation degree within a specific particle size range has a high positive correlation with the product flocculation risk under the temperature fluctuation risk state, while the correlation of other characteristics (such as color and transparency) is relatively low. At the same time, it is also identified that under the pH fluctuation risk state, some optical characteristics related to protein denaturation have a more obvious indication effect on the flocculation risk.
[0109] When the system monitors that the current fermentation state is in the temperature fluctuation risk state, based on the identified correlation relationship and mapping relationship, the system will calculate a sensitivity adjustment factor for the particle aggregation degree characteristic, which will make the discrimination threshold of the particle aggregation degree become more stringent (for example, a slight increase in the aggregation degree is regarded as abnormal), and increase its weight in the calculation of the potential quality risk index. On the contrary, for the characteristics with a relatively low correlation with the flocculation risk in the current state, their discrimination thresholds may be appropriately relaxed or the weights may be reduced.
[0110] Specifically, if the threshold of the particle aggregation degree in the normal state is X and the weight is W1, when entering the temperature fluctuation risk state, the sensitivity adjustment factor calculated by the system may make the new threshold become X' (X'<X) and the weight become W1' (W1'>W1). At the same time, for the optical characteristics related to protein denaturation, the weight may be adjusted from W2 to W2' (W2'<W2). Through this dynamic adjustment, the system can more sensitively capture the early signs of flocculation that may be caused by temperature fluctuations, so as to issue a warning before the potential risk evolves into an actual quality problem, guiding the production personnel to take intervention measures in a timely manner.
[0111] In some embodiments, this application further proposes the following steps for identifying the correlation between the dynamic benchmark model, the characteristics of Cordyceps militaris fungus and the liquid characteristic data, and the mapping relationship between each characteristic and the product flocculation risk:
[0112] The correlation mode update is initiated according to a preset period or when a decrease in prediction accuracy is detected;
[0113] Based on the current production batch of Cordyceps militaris strain, culture medium composition, environmental microclimate, or equipment status, weighted historical data is used.
[0114] By analyzing the weighted historical data, the correlation between the dynamic benchmark model, the characteristics of Cordyceps militaris fungus and liquid characteristics data, and the mapping relationship between each characteristic and the product flocculation risk are identified.
[0115] Specifically, the preset cycle can be flexibly set according to actual production needs. For example, it can be set to update the correlation model every 24 hours, weekly, or monthly. The purpose is to ensure that the correlation model can regularly and proactively adapt to potential changes in the production process. Furthermore, when the system detects a decrease in prediction accuracy—for example, when there is a significant deviation between the calculated potential quality risk index and the actually observed product flocculation risk, or when the model's prediction error for future flocculation risk exceeds a preset threshold—the correlation model update should be triggered immediately. This performance feedback-based update mechanism can promptly correct model biases and avoid misjudgments caused by model lag.
[0116] Among these factors, the current production batch of *Cordyceps militaris* strain, culture medium composition, environmental microclimate, and equipment status are key factors affecting the fermentation process and the quality of the final product. Specifically, the batch of *Cordyceps militaris* strain may affect the activity and metabolites of the strain; minor adjustments to the culture medium composition may alter the nutrient composition of the fermentation broth; environmental microclimate, such as humidity and air pressure parameters, directly affects the growth environment of the microorganisms; and equipment status, such as the cleaning and disinfection of the fermentation tank and the stirring speed, may affect the uniformity and stability of the fermentation. By weighting these parameters, historical data can be made more targeted and effective in identifying correlations. For example, when a new batch of strain is detected and put into use, historical data related to that batch will be given higher weight; when the environmental microclimate changes significantly, historical data related to these environmental factors will also be weighted accordingly.
[0117] In practical applications, the weighted historical data refers to the adjustment of past fermentation process data, quality testing data, and related environmental and equipment data after considering the specific conditions of the current production batch. This weighted processing more accurately reflects the interrelationships between various features in the dynamic baseline model parameters (such as temperature range, pH range, and dissolved oxygen range), the growth characteristics of Cordyceps militaris (such as metabolites and morphological changes), and liquid characteristic data (such as microscopic optics parameters) under current production conditions. Simultaneously, it allows for a more precise establishment of the mapping relationship between these features and the flocculation risk of the final product, thus providing a solid data foundation for subsequent sensitivity adjustments and risk index calculations.
[0118] Through the above technical solution, this application can achieve dynamic and accurate identification of the correlation between various features in the dynamic benchmark model, Cordyceps militaris characteristics, and liquid characteristic data, as well as the mapping relationship between each feature and product flocculation risk. This not only improves the model's adaptability to changes in the production process and avoids misjudgments caused by model lag, but also, through weighted historical data, enables the model to more accurately reflect the specific situation of the current production batch. This provides more reliable and refined data support for subsequent sensitivity adjustments and the calculation of potential quality risk indices, significantly improving the accuracy and real-time performance of Cordyceps militaris fermented beverage quality monitoring.
[0119] In some embodiments, this application further proposes that the steps for calculating the corresponding sensitivity adjustment factor include:
[0120] Determine the set of microscopic optics features to be adjusted;
[0121] Based on the correlation model, the initial adjustment factor of each feature in the feature set is calculated, and the initial adjustment factor reflects the independent contribution of each feature to the product flocculation risk.
[0122] The interaction effects of the initial adjustment factors under the current fermentation state were evaluated, including synergistic and antagonistic effects.
[0123] By iteratively optimizing the balance interaction effect, the risk index can maintain stable sensitivity when the state changes and accurately reflect the risk level when multiple parameters are abnormal.
[0124] Output the optimized set of sensitivity adjustment factors.
[0125] Specifically, the set of microscopic optics parameters to be adjusted refers to a combination of one or more features selected from the microscopic optics parameters of the beverage that are significantly correlated with the product's flocculation risk. These features may include, but are not limited to, particle size distribution, particle density, light scattering intensity, and polarization degree variation. The determination of this set can be based on historical data analysis, expert experience, or machine learning models.
[0126] The initial adjustment factor for each feature in the feature set, calculated based on the correlation model, refers to quantifying the independent influence of each microscopic optics feature parameter on the product's flocculation risk using a pre-established correlation model. This correlation model can be trained through regression analysis, correlation analysis, or machine learning algorithms (such as decision trees, random forests, etc.), and its purpose is to assess the contribution of a single feature to flocculation risk without considering the influence of other features. The initial adjustment factor can be a weight value or a scaling factor, used to initially adjust the detection sensitivity of that feature.
[0127] In practical applications, evaluating the interaction effects of the initial adjustment factors under the current fermentation state refers to analyzing how different microscopic and optochemical characteristic parameters influence each other and jointly affect the product flocculation risk under specific combinations of fermentation environmental parameters (such as temperature, pH, dissolved oxygen concentration, etc.). Interaction effects include synergistic and antagonistic effects. Synergistic effects refer to the situation where, when two or more characteristics are present simultaneously, their combined impact on flocculation risk is greater than the sum of their individual effects; antagonistic effects refer to the situation where, when they are present simultaneously, their combined impact on flocculation risk is less than the sum of their individual effects, or even cancels each other out. This evaluation can be achieved through multivariate statistical analysis, complex system modeling, or deep learning methods to capture the nonlinear relationships between characteristics.
[0128] Furthermore, iterative optimization of the balanced interaction effect refers to repeatedly adjusting and optimizing the sensitivity adjustment factor using optimization algorithms (such as genetic algorithms, particle swarm optimization, or gradient descent) after considering the initial adjustment factor and its interaction effects. The optimization goal is to ensure that the calculated potential quality risk index maintains stable sensitivity when the fermentation state changes, i.e., responding to risk changes promptly and accurately; simultaneously, when multiple microscopic and optometry characteristic parameters show anomalies simultaneously, the risk index can accurately reflect the actual risk level, avoiding false alarms or missed alarms. This optimization process aims to find a set of optimal sensitivity adjustment factors so that the risk assessment model can exhibit robustness and accuracy under various complex scenarios.
[0129] Therefore, the optimized sensitivity adjustment factor set is a set of final sensitivity adjustment factors obtained through iterative optimization and balancing of interaction effects, provided to the subsequent quality risk calculation module. This factor set will be used to correct the discrimination threshold and weights of liquid characteristic data, thereby more accurately calculating the potential quality risk index.
[0130] Through the above technical solution, this application can significantly improve the accuracy and robustness of quality monitoring of Cordyceps militaris fermented beverages. Compared with methods that calculate sensitivity adjustment factors based solely on independent contributions, this solution, by deeply evaluating the synergistic and antagonistic effects between microscopic optics parameters, allows the sensitivity adjustment factor to more precisely and comprehensively reflect the true impact of each feature on the product's flocculation risk under the current fermentation state. This consideration of interaction effects effectively avoids risk assessment bias caused by ignoring the complex relationships between features. Furthermore, through an iterative optimization process, it ensures that the risk index maintains stable sensitivity when fermentation states change, meaning that the ability to identify potential risks does not decrease due to environmental fluctuations; simultaneously, when multiple microscopic optics parameters show anomalies simultaneously, it can more accurately determine the risk level, thereby effectively reducing the probability of false alarms and missed alarms. Therefore, this solution can provide a more accurate and reliable potential quality risk index, providing stronger data support for long-term quality risk assessment of beverages, thereby improving product quality control levels.
[0131] For example, suppose that during the production of a batch of Cordyceps militaris fermented beverage, the system determines through a dynamic benchmark model that the current fermentation state is under risk of temperature fluctuations. In this case, it is necessary to dynamically adjust the detection sensitivity of the microscopic optics characteristic parameters.
[0132] First, the system determines the set of microscopic aerodynamic characteristic parameters to be adjusted, including, for example, three features that are highly correlated with flocculation risk: particle size distribution, particle density, and light scattering intensity.
[0133] Next, based on the pre-trained association model, the system calculates the initial adjustment factors for these three features. For example, the initial adjustment factor for particle size distribution is 1.2 (indicating its significant independent contribution to the product's flocculation risk), particle density is 1.0, and light scattering intensity is 1.1.
[0134] Subsequently, the system assessed the interaction effects among the three initial adjustment factors under the current temperature fluctuation risk state. By analyzing historical and real-time monitoring data, the system found that: during temperature fluctuations, there is a significant synergistic effect between particle size distribution and light scattering intensity, meaning that when both are abnormal simultaneously, the increase in flocculation risk far exceeds the sum of their individual contributions; while there is a slight antagonistic effect between particle density and light scattering intensity, meaning that under certain conditions, they may partially offset each other's risks.
[0135] Based on the assessment of these interaction effects, the system initiates an iterative optimization algorithm. The algorithm repeatedly modifies the initial adjustment factors according to the current fermentation state and the identified synergistic and antagonistic effects. For example, due to the synergistic effect of particle size distribution and light scattering intensity, their adjustment factors may be further increased to enhance sensitivity to potential risks; while the adjustment factor for particle density may be fine-tuned based on its antagonistic effect. The optimization process continues until the risk index maintains a stable and accurate risk response capability under simulated state changes and multi-parameter anomaly scenarios.
[0136] Finally, the system outputs a set of optimized sensitivity adjustment factors, such as an adjustment factor of 1.35 for particle size distribution, 0.95 for particle density, and 1.25 for light scattering intensity. These optimized factors will be applied to correct the discrimination threshold and weights of liquid characteristic data, thereby calculating a more accurate potential quality risk index and providing a reliable basis for subsequent quality decisions.
[0137] In some embodiments, this application further proposes a step for evaluating the interaction effect of the aforementioned initial adjustment factor under the current fermentation state, including:
[0138] Continuously monitor the long-term changing trends of fermentation environmental parameters and the actual flocculation risk feedback when multiple parameters are abnormal. Among them, fermentation environmental parameters include at least one of humidity parameters and air pressure parameters.
[0139] When a deviation is detected between the long-term trend and the actual flocculation risk feedback, or when the prediction accuracy decreases, the interaction effect assessment mode is updated.
[0140] Based on the current fermentation status, dynamically adjust the weights of historical data related to environmental humidity and gas pressure fermentation environmental parameters;
[0141] By analyzing weighted historical data, we can identify the dynamic changes in the intensity of synergistic and antagonistic effects among the initial adjustment factors under different combinations of environmental humidity and air pressure.
[0142] Based on the identified dynamic change patterns, the evaluation functions for synergistic and antagonistic effects are modified to assess the interaction effects of the initial adjustment factors under the current fermentation state.
[0143] Specifically, continuous monitoring of the long-term trends of fermentation environmental parameters refers to the system's uninterrupted collection and recording of environmental data such as humidity and air pressure parameters around the fermentation workshop or specific fermenters, and performing time-series analysis on this data to understand its fluctuation patterns and evolution trends over time. Simultaneously, feedback on actual flocculation risk during multi-parameter anomalies refers to obtaining feedback information on the actual flocculation phenomena and their severity when multiple fermentation state parameters (such as temperature, pH, dissolved oxygen concentration, and microscopic optical characteristic parameters) simultaneously become abnormal, through subsequent product testing or manual observation. These fermentation environmental parameters may include, but are not limited to, relative humidity data collected by humidity sensors and atmospheric pressure data collected by air pressure sensors.
[0144] When a discrepancy is detected between long-term trends and actual flocculation risk feedback—for example, environmental parameters showing a long-term trend, but the actual product flocculation risk not changing as expected, or when the system's accuracy in predicting flocculation risk decreases—an update to the interaction effect assessment model is triggered. This means the system needs to relearn and adjust its understanding model of interaction effects.
[0145] Dynamically adjusting the weights of environmental parameters related to humidity and atmospheric pressure in historical data based on the current fermentation state means assigning different levels of importance to historical data related to humidity and atmospheric pressure during historical data analysis, depending on the specific state of the current fermentation batch (e.g., whether it is under risk of temperature fluctuations or pH fluctuations). For example, if the current fermentation state is particularly sensitive to changes in humidity, historical data related to humidity will be given higher weight.
[0146] The analysis of weighted historical data aims to identify the dynamic changes in the intensity of synergistic and antagonistic effects among initial adjustment factors under different combinations of environmental humidity and air pressure. Synergistic effect refers to the situation where the combined impact of two or more initial adjustment factors on flocculation risk is greater than the sum of their individual effects; antagonistic effect, conversely, refers to the situation where their combined effect is less than the sum of their individual effects. This analysis can reveal how environmental conditions modulate the interactions between these factors.
[0147] Based on the identified dynamic patterns, the evaluation functions for synergistic and antagonistic effects are revised. This means that the mathematical models or algorithms used to quantify synergistic and antagonistic effects are adjusted according to the dynamic changes in environmental parameters, enabling them to more accurately reflect the true interaction effects under current environmental conditions. In this way, the interaction effects of initial adjustment factors under the current fermentation state can be assessed more precisely.
[0148] Through the above technical solutions, this application can significantly improve the accuracy and robustness of assessing the potential quality risks of Cordyceps militaris fermented beverages. Specifically, by continuously monitoring fermentation environmental parameters and combining them with actual flocculation risk feedback, this application can promptly identify and correct potential biases in the assessment model, avoiding misjudgments of risk due to environmental changes. Dynamically adjusting the weights of historical data and identifying the dynamic modulation patterns of environmental parameters on interaction effects allows the system to more precisely capture the real interactions of different microscopic and optical characteristic parameters in complex environments, thereby overcoming the limitations of traditional methods in handling the interactive effects of multiple factors. As a result, the modified assessment function can more accurately quantify synergistic and antagonistic effects, making the calculation of the potential quality risk index closer to reality, providing a more reliable basis for the quality control of fermented beverages, and effectively reducing the risk of product flocculation.
[0149] For example, suppose that during the production of Cordyceps militaris fermented beverage, the system continuously monitors the relative humidity and air pressure parameters in the fermentation workshop. Over a period of time, the system finds that the relative humidity parameter shows a slow upward trend over a long period. However, at the same time, through actual testing of the bottled beverage, it is found that the feedback on the product flocculation risk has not increased significantly as expected, or the accuracy of the flocculation risk predicted by the system based on the existing model has decreased.
[0150] At this point, the system will initiate an update to the interaction effect assessment mode. Specifically, if the current fermentation state is judged to be at risk of temperature fluctuations, the system will assign higher weights to fermentation batch data related to high humidity and high pressure in historical data, as these environmental conditions may have a stronger correlation with temperature fluctuation risk. Subsequently, the system will analyze this weighted historical data, for example, using machine learning algorithms (such as decision trees, random forests, or neural networks) to identify how the strength of synergistic and antagonistic effects among the initial adjustment factors of microscopic optics characteristic parameters dynamically changes under different combinations of humidity (e.g., low, medium, high humidity) and pressure (e.g., low, normal, high pressure). For example, under low humidity and high pressure conditions, the initial adjustment factors of certain particle aggregation characteristics may exhibit stronger synergistic effects, while under high humidity and low pressure conditions, they may exhibit antagonistic effects.
[0151] Based on these identified dynamic patterns, the system modifies the evaluation function used to calculate synergistic and antagonistic effects. For example, if the original evaluation function was a simple linear superposition model, it might now be modified into a nonlinear model that incorporates environmental parameters as moderating variables. Through this modification, when new real-time fermentation environmental parameters are input, the evaluation function can more accurately calculate the true interaction effects between the initial adjustment factors under the current environment. This results in a more precise calculation of the potential quality risk index, enabling more effective prediction and management of long-term beverage quality risks.
[0152] In some embodiments, the steps described above for iteratively optimizing the balanced interaction effect include:
[0153] Identify high-risk feature combinations under the current fermentation state, wherein the high-risk feature combination is a feature combination in historical data in which multiple microscopic optics feature parameters are abnormal at the same time and lead to a significant increase in the actual flocculation risk.
[0154] For the aforementioned high-risk feature combinations, the local search intensity of the optimization algorithm is enhanced;
[0155] During the iterative optimization process, a state-aware penalty function is introduced. When the optimization result deviates from the historical true risk, the penalty weight is increased to guide the optimization process to converge toward the global optimal solution, so as to balance the synergistic and antagonistic effects.
[0156] Specifically, identifying high-risk characteristic combinations under the current fermentation state means that the system continuously analyzes historical fermentation data and quality feedback data to identify combinations of microscopic and optical characteristic parameters that have previously led to a significant increase in actual flocculation risk. These combinations typically manifest as multiple characteristics exhibiting abnormalities simultaneously, and their effects are not simply additive but involve complex synergistic or antagonistic effects. By identifying these high-risk combinations, the optimization process can be more focused on key risk factors.
[0157] Specifically, enhancing the local search strength of the optimization algorithm for the high-risk feature combinations can be understood as dynamically adjusting its search strategy when the optimization algorithm encounters or approaches these identified high-risk feature combinations during the iteration process. This can be achieved by reducing the search step size, increasing the local sampling density, or using a more refined local optimization algorithm to ensure a more thorough and in-depth exploration in these key areas and avoid missing potential optimal solutions.
[0158] In practical applications, introducing a state-aware penalty function during iterative optimization refers to adding an extra penalty term to the loss function of the optimization algorithm. This penalty function dynamically adjusts its weight based on the deviation between the current optimization result and the historical real risk. When the optimization result deviates significantly from the historical real risk (e.g., actual flocculation events), the penalty weight is significantly increased, thereby imposing stronger constraints on the optimization algorithm and prompting it to adjust its parameters to more closely reflect the actual risk situation. The purpose is to effectively guide the optimization process in this way, ensuring that it not only pursues the mathematically optimal solution but also that the calculated potential quality risk index accurately reflects the actual quality risk, ultimately achieving convergence towards the global optimum and thus better balancing the synergistic and antagonistic effects among the microscopic optical characteristic parameters.
[0159] Through the above technical solutions, this application can significantly improve the accuracy and robustness of the potential quality risk index calculation. By identifying high-risk feature combinations and enhancing local search intensity, the optimization algorithm can more effectively explore complex parameter spaces, especially in complex scenarios with multiple parameter anomalies, and can more accurately capture potential quality risks. Furthermore, the introduction of a state-aware penalty function allows the optimization process to continuously calibrate with historical real risks, effectively avoiding the disconnect between optimization results and actual conditions, thus ensuring the reliability of the risk index. This method not only more accurately balances the synergistic and antagonistic effects between microscopic optics feature parameters, but also maintains stable sensitivity of the risk index under various fermentation states, thus providing a more solid and reliable basis for long-term quality risk assessment of Cordyceps militaris fermented beverages.
[0160] For example, suppose that during the production of a batch of Cordyceps militaris fermented beverage, a dynamic benchmark model determines that the current fermentation state is a combination of pH fluctuation risk and dissolved oxygen anomaly risk. In this case, the system will first identify the high-risk characteristic combination under the current fermentation state. For instance, analysis of historical data reveals that when the density of protein aggregate particles and the degree of polysaccharide chain breakage—two microscopic and optical characteristic parameters—are both abnormal, it often leads to a severe flocculation risk. For this high-risk characteristic combination, the local search intensity of the optimization algorithm is enhanced. For example, when adjusting the sensitivity adjustment factors related to protein aggregate particle density and polysaccharide chain breakage, the algorithm uses smaller step sizes and denser sampling points for iteration to ensure that the optimal balance point is found in the combination space of these key parameters. Simultaneously, a state-aware penalty function is introduced during the iterative optimization process. If the potential quality risk index calculated by the optimization algorithm after a certain iteration deviates significantly from the actual flocculation risk in historical data under similar pH fluctuation and dissolved oxygen anomaly risk conditions (e.g., subsequent quality testing reveals that the batch of beverages did indeed exhibit flocculation), the penalty function will increase the penalty weight, prompting the optimization algorithm to adjust its parameters so that the risk index in the next iteration is closer to the actual risk. In this way, the optimization process is guided to converge to the global optimum, thereby accurately balancing the synergistic and antagonistic effects between microscopic and optical characteristic parameters, enabling the final calculated potential quality risk index to accurately predict the long-term quality risk of the beverage.
[0161] In some embodiments, the step of identifying high-risk combinations of characteristics in the current fermentation state includes:
[0162] When a deviation is detected in the correlation between long-term trends and historical high-risk feature combinations, or when the accuracy of predictions declines, the high-risk feature combination update mechanism is activated.
[0163] Based on the current fermentation status, weighted historical data;
[0164] The dynamic correlation between microscopic optics characteristic parameter sets and flocculation risk under different parameter combinations was analyzed.
[0165] Update high-risk parameter combinations and their risk weights.
[0166] Specifically, when a deviation is detected in the correlation between long-term trends and historical high-risk characteristic combinations, or when prediction accuracy declines, the high-risk characteristic combination update mechanism is activated. This involves the system continuously monitoring the long-term trends of key environmental parameters (such as temperature, pH, dissolved oxygen concentration, humidity, and air pressure) during fermentation and assessing the accuracy of the current quality risk prediction model. When the correlation between these long-term trends and previously identified high-risk characteristic combinations no longer matches, or when the model's prediction accuracy falls below a preset threshold, the system will automatically trigger an update procedure to reassess and identify new high-risk characteristic combinations. The purpose is to ensure that the identification of high-risk characteristic combinations can adapt to dynamic changes in the production environment and processes.
[0167] Furthermore, the system selectively weights historical fermentation data based on the current fermentation state (e.g., stable process, temperature fluctuation risk, pH fluctuation risk, or dissolved oxygen anomaly risk). For example, if the current state is under temperature fluctuation risk, historical data related to temperature fluctuations will be given higher weight, while historical data related to pH anomalies may be given lower weight. This aims to highlight historical information most relevant to the current state, improving the relevance and effectiveness of subsequent analyses.
[0168] In practical applications, analyzing the dynamic correlation between microscopic optics characteristics and flocculation risk under different parameter combinations involves using statistical methods or machine learning algorithms to deeply mine weighted historical data. This identifies how various microscopic optics characteristics (such as particle size, distribution, aggregation degree, and light scattering intensity) interact and influence the flocculation risk of beverages under different combinations of fermentation environment parameters. This analysis is dynamic, meaning the system continuously learns and adjusts these correlations to capture their patterns of change over time or under different conditions. Its purpose is to reveal the complex mapping relationship between microscopic characteristics and macroscopic quality risk.
[0169] Therefore, updating high-risk parameter combinations and their risk weights refers to the system identifying new or modifying existing combinations of microscopic and optochemical characteristic parameters based on the results of the aforementioned dynamic correlation analysis. These combinations are considered key factors leading to a significant increase in flocculation risk under the current fermentation state. Simultaneously, the system assigns corresponding risk weights to these updated high-risk parameter combinations, reflecting the severity or likelihood of the combination causing flocculation risk. The aim is to provide the most accurate and timely risk factors for subsequent calculations of the potential quality risk index.
[0170] Through the above technical solution, this application can significantly improve the accuracy and timeliness of identifying high-risk feature combinations, enabling the quality monitoring system to better adapt to dynamic changes and long-term trend drift during the fermentation process. This solution ensures that the risk information used to balance synergistic and antagonistic effects is always up-to-date and most relevant during iterative optimization, thereby avoiding misjudgments or omissions caused by using outdated or inaccurate risk combinations. Therefore, this application provides a more robust and adaptive quality risk assessment model, effectively reducing the risk of quality problems such as flocculation in Cordyceps militaris fermented beverages during long-term storage, further ensuring product stability and consumer experience.
[0171] For example, suppose that during the production of a batch of Cordyceps militaris fermented beverage, the system monitored a slight but continuous fluctuation in the stirring speed of the fermentation tank over a long period, which was identified as a long-term trend. Initially, this fluctuation was not considered a high-risk factor because historical data showed a weak correlation with flocculation risk. However, after a period of time, the system found that its accuracy in predicting beverage quality risk began to decline. At this point, the system will automatically activate the update mechanism for high-risk feature combinations.
[0172] Specifically, the system weights historical fermentation data based on the current fermentation state (e.g., it may still be in a stable state, but with slight fluctuations in stirring speed). For example, historical batches exhibiting similar slight fluctuations in stirring speed will be given higher weights. The system then analyzes this weighted historical data to identify the dynamic correlation between a set of microscopic optical characteristic parameters (e.g., the number of hyphal fragments or protein aggregates within a specific size range) and flocculation risk under the current stirring speed fluctuations. Through analysis, the system may discover that even a small number of protein aggregates of a specific size have a significantly enhanced association with later flocculation risk under conditions of slight stirring speed fluctuations.
[0173] Based on this analysis, the system updates the high-risk parameter combinations, identifying a slight increase in the number of protein aggregates of a specific size combined with minor fluctuations in stirring speed as a new high-risk feature combination and assigning it a higher risk weight. This updated high-risk combination and its weight will be used in subsequent iterative optimization processes, enabling the system to more sensitively detect potential flocculation risks and adjust the detection sensitivity of microscopic optical characteristic parameters accordingly, thereby more accurately calculating the potential quality risk index. In this way, even subtle process changes can be promptly captured and reflected in the quality risk assessment, effectively preventing potential quality problems.
[0174] In some embodiments, this application further proposes steps to enhance the local search strength of the optimization algorithm for the aforementioned high-risk feature combinations, including:
[0175] When a deviation is detected in the correlation between long-term trends and historical high-risk feature combinations, or when the accuracy of predictions declines, the high-risk feature combination update mechanism is activated.
[0176] Based on the current fermentation status, weighted historical data;
[0177] The algorithm identifies and explores the optimal parameter configuration under different combinations of fermentation environment parameters.
[0178] Based on the optimal configuration, the local search strength of the optimization algorithm is enhanced.
[0179] Specifically, when a deviation is detected in the correlation between long-term trends and historical high-risk characteristic combinations—for example, when a significant change is found in the correlation between certain environmental parameters (such as humidity and air pressure) and historically recorded high-risk characteristic combinations that significantly increase flocculation risk during continuous monitoring of long-term trends in fermentation environmental parameters—or when the accuracy of the prediction model for actual flocculation risk drops below a preset threshold, the system will automatically activate the high-risk characteristic combination update mechanism. This mechanism aims to ensure that the identification of high-risk characteristic combinations remains consistent with the latest fermentation environment and actual risk feedback.
[0180] In this context, "weighted historical data" refers to the system dynamically weighting historical fermentation data based on current fermentation parameters such as temperature, pH, and dissolved oxygen concentration. For example, historical data similar to the current fermentation state will be assigned a higher weight, while data with significant differences will be assigned a lower weight. This allows subsequent analysis to focus more on historical experience most relevant to the current situation.
[0181] In practical applications, identifying the optimal configuration of optimization algorithm exploration parameters under different combinations of fermentation environment parameters refers to the ability of the system to learn and identify, through analysis of weighted historical data, which parameter settings (e.g., learning rate, number of iterations, population size, mutation rate, etc.) can most effectively discover potential flocculation risks and achieve the fastest convergence speed when the optimization algorithm (such as genetic algorithm, particle swarm optimization, etc.) explores the microscopic optics feature parameter space under specific combinations of fermentation environment parameters (e.g., high humidity, low air pressure).
[0182] Therefore, enhancing the local search strength of the optimization algorithm based on the optimal configuration means that once the optimal configuration in the current fermentation environment is identified, the optimization algorithm will adjust its local search strategy according to these configuration parameters. For example, it can increase the search density in a specific region, adjust the step size, or introduce more refined search operators to explore in high-risk regions more accurately and efficiently in order to discover potential quality problems.
[0183] Through the above technical solution, this application significantly improves the adaptability and robustness of the optimization algorithm in complex and ever-changing fermentation environments. Compared to the relatively static local search intensity enhancement in the basic solution, this application dynamically identifies the optimal configuration, enabling the optimization algorithm to intelligently adjust its exploration strategy based on the current fermentation state and environmental parameters, thereby more accurately and efficiently locating potential quality risks. This not only improves the accuracy of the potential quality risk index calculation and shortens the risk identification time, but also effectively avoids the problem of delayed or inaccurate risk assessment due to environmental changes, ensuring the real-time performance and reliability of Cordyceps militaris fermented beverage quality monitoring.
[0184] on the other hand, Figure 2 An exemplary schematic diagram of a quality monitoring system for Cordyceps militaris fermented beverages based on image recognition is shown. This application proposes a quality monitoring system 100 for Cordyceps militaris fermented beverages based on image recognition, which includes:
[0185] The data acquisition module 10 is used to acquire dynamic change data of temperature, pH value and dissolved oxygen concentration during the fermentation process of Cordyceps militaris, and to establish a dynamic benchmark model including the temperature change range, pH change range and dissolved oxygen change range based on the dynamic change data.
[0186] The fermentation state judgment module 20 is used to judge the current fermentation state by comparing the real-time fermentation state parameters with the dynamic benchmark model; wherein the current fermentation state is at least one of the following: process stable state, temperature fluctuation risk state, pH fluctuation risk state, or dissolved oxygen abnormal risk state.
[0187] The image acquisition and analysis module 30 is used to use polarized structured light to penetrate the filled beverage, acquire the image after the polarized structured light penetrates the beverage, and generate microscopic aerodynamic feature parameters of the beverage based on the image.
[0188] The quality risk calculation module 40 is used to dynamically adjust the detection sensitivity of microscopic optics characteristic parameters according to the current fermentation state, integrate the dynamic benchmark model and microscopic optics characteristic parameters, calculate the potential quality risk index, and judge the long-term quality risk of the beverage based on the index.
[0189] This application's system, by introducing a data acquisition module and a fermentation state judgment module, achieves real-time monitoring of macroscopic dynamic parameters and risk assessment of the fermentation process, overcoming the shortcomings of existing systems in fermentation process monitoring. Furthermore, the image acquisition and analysis module employs polarized structured light technology, enabling in-depth acquisition of microscopic optical characteristic parameters within the beverage. This provides richer and more detailed internal structural information than traditional systems that rely solely on visible light images. Most importantly, the quality risk calculation module dynamically adjusts the detection sensitivity of microscopic optical characteristic parameters based on the fermentation state and integrates fermentation process data with these parameters to calculate a potential quality risk index. This dynamic adjustment and multi-dimensional fusion mechanism allows the system to specifically identify microscopic changes related to specific fermentation risks, thus providing early warnings and identifying products that appear acceptable in appearance but harbor long-term quality risks before leaving the factory. Compared to existing technologies, this application's system can more comprehensively and accurately assess the potential quality risks of Cordyceps militaris fermented beverages, significantly improving the predictability and reliability of quality monitoring.
[0190] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for monitoring the quality of Cordyceps militaris fermented beverage based on image recognition, characterized in that, include: Dynamic data on temperature, pH and dissolved oxygen concentration were collected during the fermentation of Cordyceps militaris, and a dynamic benchmark model including the temperature range, pH range and dissolved oxygen range was established based on the dynamic data. The current fermentation state is determined by comparing the real-time fermentation state parameters with the dynamic benchmark model; wherein the current fermentation state is at least one of the following: process stability state, temperature fluctuation risk state, pH fluctuation risk state, or dissolved oxygen abnormal risk state. Polarized structured light is used to penetrate the filled beverage, and an image of the penetrating beverage is captured. Based on the image, microscopic aerodynamic feature parameters of the beverage are generated. Based on the current fermentation state, the detection sensitivity of the microscopic optics characteristic parameters is dynamically adjusted. The dynamic benchmark model and the microscopic optics characteristic parameters are integrated to calculate the potential quality risk index, and the long-term quality risk of the beverage is judged based on the index. The step of dynamically adjusting the detection sensitivity of the microscopic optics characteristic parameters based on the current fermentation state includes: Before filling, the modulation characteristics of the empty bottle to polarized structured light are collected to generate the optical features of the empty bottle, and the optical features of the empty bottle are bound to the unique identifier of the empty bottle. After filling, the unique identifier of the beverage bottle is read, and the corresponding optical features of the empty bottle are retrieved; Based on the optical characteristics of the empty bottle, the corresponding area of the image of the beverage after filling is compensated to obtain microscopic optical characteristic parameters that purely reflect the internal state of the liquid. Based on the optical characteristics of the empty bottle, the image of the beverage after filling is processed by an optical compensation algorithm to obtain liquid characteristic data reflecting the internal state of the liquid. Based on the current fermentation status, the parameters of the compensation algorithm are dynamically adjusted, and the discrimination threshold and weight of the liquid characteristic data are adaptively corrected to calculate the potential quality risk index. The step of dynamically adjusting the parameters of the compensation algorithm based on the current fermentation state and adaptively correcting the discrimination threshold and weight of the liquid feature data to calculate the potential quality risk index includes: Identify the correlation between the dynamic benchmark model, the characteristics of Cordyceps militaris, and the liquid characteristic data, as well as the mapping relationship between each characteristic and the product flocculation risk; Based on the current fermentation state, and using the correlation and mapping relationships, calculate the corresponding sensitivity adjustment factor; The sensitivity adjustment factor is applied to correct the discrimination threshold and weight of each feature in the liquid feature data; and the potential quality risk index is calculated based on the corrected discrimination threshold and weight. The step of calculating the corresponding sensitivity adjustment factor based on the current fermentation state, the correlation, and the mapping relationship includes: Determine the set of microscopic optics features to be adjusted; Based on the correlation model, the initial adjustment factor of each feature in the feature set is calculated, and the initial adjustment factor reflects the independent contribution of each feature to the product flocculation risk. The interaction effects of the initial adjustment factors under the current fermentation state were evaluated, including synergistic and antagonistic effects. By iteratively optimizing the balance interaction effect, the risk index can maintain stable sensitivity when the state changes and accurately reflect the risk level when multiple parameters are abnormal. Output the optimized set of sensitivity adjustment factors.
2. The method for quality monitoring of Cordyceps militaris fermented beverage based on image recognition according to claim 1, characterized in that, The steps of identifying the correlation between the dynamic benchmark model, the characteristics of Cordyceps militaris, and the liquid characteristic data, as well as the mapping relationship between each characteristic and the product flocculation risk, include: The correlation mode update is initiated according to a preset period or when a decrease in prediction accuracy is detected; Based on the current production batch of Cordyceps militaris strain, culture medium composition, environmental microclimate, or equipment status, weighted historical data is used. By analyzing the weighted historical data, the correlation between the dynamic benchmark model, the characteristics of Cordyceps militaris fungus and liquid characteristics data, and the mapping relationship between each characteristic and the product flocculation risk are identified.
3. The method for quality monitoring of Cordyceps militaris fermented beverage based on image recognition according to claim 1, characterized in that, The step of evaluating the interaction effect of the initial adjustment factor under the current fermentation state includes: Continuously monitor the long-term changing trends of fermentation environmental parameters and the actual flocculation risk feedback when multiple parameters are abnormal. Among them, fermentation environmental parameters include at least one of humidity parameters and air pressure parameters. When a deviation is detected between the long-term trend and the actual flocculation risk feedback, or when the prediction accuracy decreases, the interaction effect assessment mode is updated. Based on the current fermentation status, dynamically adjust the weights of historical data related to environmental humidity and gas pressure fermentation environmental parameters; By analyzing weighted historical data, we can identify the dynamic changes in the intensity of synergistic and antagonistic effects among the initial adjustment factors under different combinations of environmental humidity and air pressure. Based on the identified dynamic change patterns, the evaluation functions for synergistic and antagonistic effects are modified to assess the interaction effects of the initial adjustment factors under the current fermentation state.
4. The method for quality monitoring of Cordyceps militaris fermented beverage based on image recognition according to claim 1, characterized in that, The steps of iteratively optimizing the balanced interaction effect include: Identify high-risk feature combinations under the current fermentation state, wherein the high-risk feature combination is a feature combination in historical data in which multiple microscopic optics feature parameters are abnormal at the same time and lead to a significant increase in the actual flocculation risk. For the aforementioned high-risk feature combinations, the local search intensity of the optimization algorithm is enhanced; During the iterative optimization process, a state-aware penalty function is introduced. When the optimization result deviates from the historical true risk, the penalty weight is increased to guide the optimization process to converge toward the global optimal solution, so as to balance the synergistic and antagonistic effects.
5. The method for quality monitoring of Cordyceps militaris fermented beverage based on image recognition according to claim 4, characterized in that, The step of identifying high-risk feature combinations in the current fermentation state includes: When a deviation is detected in the correlation between long-term trends and historical high-risk feature combinations, or when the accuracy of predictions declines, the high-risk feature combination update mechanism is activated. Based on the current fermentation status, weighted historical data; The dynamic correlation between microscopic optics characteristic parameter sets and flocculation risk under different parameter combinations was analyzed. Update high-risk parameter combinations and their risk weights.
6. The method for quality monitoring of Cordyceps militaris fermented beverage based on image recognition according to claim 4, characterized in that, The steps for enhancing the local search strength of the optimization algorithm for the high-risk feature combination include: When a deviation is detected in the correlation between long-term trends and historical high-risk feature combinations, or when the accuracy of predictions declines, the high-risk feature combination update mechanism is activated. Based on the current fermentation status, weighted historical data; The algorithm identifies and explores the optimal parameter configuration under different combinations of fermentation environment parameters. Based on the optimal configuration, the local search strength of the optimization algorithm is enhanced.
7. A quality monitoring system for Cordyceps militaris fermented beverages based on image recognition, characterized in that, The system includes: The data acquisition module is used to collect dynamic change data on temperature, pH value and dissolved oxygen concentration during the fermentation process of Cordyceps militaris, and to establish a dynamic benchmark model based on the dynamic change data, which includes the temperature change range, pH change range and dissolved oxygen change range. The fermentation state determination module is used to determine the current fermentation state by comparing the real-time fermentation state parameters with the dynamic benchmark model; wherein the current fermentation state is at least one of the following: process stability state, temperature fluctuation risk state, pH fluctuation risk state, or dissolved oxygen abnormal risk state. The image acquisition and analysis module is used to use polarized structured light to penetrate the filled beverage, acquire images of the beverage after the polarized structured light penetrates the beverage, and generate microscopic aerodynamic feature parameters of the beverage based on the images. The quality risk calculation module is used to dynamically adjust the detection sensitivity of microscopic optics characteristic parameters according to the current fermentation state, integrate the dynamic benchmark model and microscopic optics characteristic parameters, calculate the potential quality risk index, and judge the long-term quality risk of the beverage based on the index. It is also used to collect the modulation characteristics of the empty bottle to polarized structured light before filling, generate the optical features of the empty bottle, and bind the optical features of the empty bottle to the unique identifier of the empty bottle. After filling, the unique identifier of the beverage bottle is read, and the corresponding optical features of the empty bottle are retrieved; Based on the optical characteristics of the empty bottle, the corresponding area of the image of the beverage after filling is compensated to obtain microscopic optical characteristic parameters that purely reflect the internal state of the liquid. Based on the optical characteristics of the empty bottle, the image of the beverage after filling is processed by an optical compensation algorithm to obtain liquid characteristic data reflecting the internal state of the liquid. Based on the current fermentation status, the parameters of the compensation algorithm are dynamically adjusted, and the discrimination threshold and weight of the liquid characteristic data are adaptively corrected to calculate the potential quality risk index. It is also used to identify the correlation between the dynamic benchmark model, the characteristics of Cordyceps militaris fungus and liquid characteristic data, and the mapping relationship between each characteristic and the product flocculation risk; Based on the current fermentation state, and using the correlation and mapping relationships, calculate the corresponding sensitivity adjustment factor; The sensitivity adjustment factor is applied to correct the discrimination threshold and weight of each feature in the liquid feature data; and the potential quality risk index is calculated based on the corrected discrimination threshold and weight. It is also used to determine the feature set of microscopic optics feature parameters to be adjusted; Based on the correlation model, the initial adjustment factor of each feature in the feature set is calculated, and the initial adjustment factor reflects the independent contribution of each feature to the product flocculation risk. The interaction effects of the initial adjustment factors under the current fermentation state were evaluated, including synergistic and antagonistic effects. By iteratively optimizing the balance interaction effect, the risk index can maintain stable sensitivity when the state changes and accurately reflect the risk level when multiple parameters are abnormal. Output the optimized set of sensitivity adjustment factors.