Model prediction based brewing control method, system, device, and storage medium

CN122923552APending Publication Date: 2026-10-16GUANGXI TIE NIAO CONDIMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611338041.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-31
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0005]本申请的主要目的在于提供一种基于模型预测的酿造控制方法、系统、设备及存储介质,旨在解决现有技术传感数据易失真、固定参数控制无法适配多酶活性非线性变化的缺陷

Benefits of technology

[0017]This application provides a model-predictive brewing control method, system, device, and storage medium. The model-predictive brewing control method acquires measured values ​​of brewing environmental parameters continuously detected by multiple sensors in the brewing system under the same sampling sequence via an edge controller. Based on the target relative deviation between the measured values, it determines whether each sensor is in a normal state. When a sensor is determined to be in a normal state, the corresponding measured value is uploaded to a cloud platform. Then, the cloud platform, based on the currently received measured values ​​and a pre-stored multi-enzyme activity kinetic model, uses a model predictive control algorithm to optimize the brewing setpoint trajectory for future time periods. The brewing settings corresponding to the current moment in the trace are sent to the edge controller. The edge controller then drives each brewing environment adjustment station according to the brewing settings using a fuzzy proportional-integral-differential algorithm. This ensures that the brewing environment parameters of the brewing system track the brewing settings. In other words, the reliability of the sensor data is ensured by verifying the relative deviation of multiple sets of measurement values, dynamic parameter planning is achieved by relying on a multi-enzyme kinetic model combined with a model predictive control algorithm, and the brewing environment is adaptively adjusted using a fuzzy proportional-integral-differential algorithm. This solves the defects of existing technologies, such as easy distortion of sensor data and inability of fixed parameter control to adapt to nonlinear changes in multi-enzyme activity, thereby improving the reliability and adaptive regulation capability of brewing environment parameter control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122923552A_ABST
    Figure CN122923552A_ABST
Patent Text Reader

Abstract

The application discloses a model prediction-based brewing control method, system, device and storage medium, relates to the technical field of precision control, and comprises the following steps: an edge controller acquires measurement values obtained by a plurality of sensors in a same sampling step sequence, judges whether each sensor is in a normal state according to target relative deviations between the measurement values, and uploads each measurement value to a cloud platform when it is judged that each sensor is in the normal state; the cloud platform optimizes a brewing set value trajectory in a future period of time by using a model prediction control algorithm according to the measurement values and a pre-stored multi-enzyme activity kinetics model, and issues each brewing set value corresponding to a current time in the brewing set value trajectory to the edge controller; and the edge controller drives each brewing environment regulating station by using a fuzzy proportional integral differential algorithm according to each brewing set value, so that brewing environment parameters of a brewing system track each brewing set value. The application can improve the control credibility and self-adaptive regulation and control capability of the brewing environment parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of precision control technology, and in particular to a brewing control method, system, device and storage medium based on model prediction. Background Technology

[0002] In traditional fermentation and brewing processes such as soy sauce, soy sauce-flavored liquor, and enzyme preparations, the essence of the koji-making and fermentation stages lies in precisely controlling environmental parameters such as temperature, salinity, and pH to promote the metabolic activities of target microorganisms such as Aspergillus oryzae, thereby stimulating and maintaining the efficient synergistic effect of multiple enzymes such as amylase, protease, and cellulase, ensuring the orderly degradation of macromolecular substances in raw materials and the generation of rich flavor components.

[0003] However, the existing control schemes commonly used in the brewing industry have significant limitations at the data perception and control decision-making levels: the perception layer usually relies on a single sensor for single instantaneous measurement, ignoring the asymmetric signal drift caused by probe contamination, salt crystallization, or microbial film adhesion, as well as the response failure caused by aging. Furthermore, it lacks an online verification mechanism for data reliability, making it easy for erroneous measurements to be introduced into the control loop. At the same time, its decision-making layer mostly uses fixed setpoints or simple logic rules to drive temperature, salinity, and pH adjustment terminals, which cannot respond to the nonlinear dynamic changes in in-situ enzyme activity during fermentation with the batch of raw materials, the passage of time, and environmental disturbances. It also lacks predictive maintenance methods for sensor performance degradation, and often can only be detected after parameter deviations are irreversible or equipment failures occur.

[0004] Based on this situation, existing brewing control systems generally suffer from obvious defects such as poor data reliability, insufficient control adaptability, and excessive reliance on human experience, making it difficult to meet the requirements of modern intelligent brewing for stability and precision. Summary of the Invention

[0005] The main purpose of this application is to provide a brewing control method, system, device and storage medium based on model prediction, which aims to solve the defects of existing technology such as easy distortion of sensor data and inability of fixed parameter control to adapt to nonlinear changes in multi-enzyme activity.

[0006] To achieve the above objectives, this application proposes a brewing control method based on model prediction, the method comprising: The edge controller acquires the measured values ​​of brewing environment parameters continuously detected by multiple sensors in the same sampling sequence in the brewing system, and determines whether each sensor is in a normal state based on the target relative deviation between the measured values. When a sensor is determined to be in a normal state, the corresponding measured value of the sensor is uploaded to the cloud platform. Based on the measured values ​​received at the current moment and the pre-stored multi-enzyme activity kinetic model, the cloud platform uses a model predictive control algorithm to optimize the brewing setpoint trajectory in the future time period, and sends the brewing setpoints corresponding to the current moment in the brewing setpoint trajectory to the edge controller. The edge controller drives each brewing environment adjustment station according to each brewing setting value using a fuzzy proportional-integral-differential algorithm, so that the brewing environment parameters of the brewing system track each brewing setting value.

[0007] In one possible implementation, the acquisition of measured values ​​of brewing environment parameters continuously detected by multiple sensors in the brewing system under the same sampling sequence, and the determination of whether each sensor is in a normal state based on the target relative deviation between the measured values, and uploading the corresponding measured value of the sensor to the cloud platform when the sensor is determined to be in a normal state, includes: For any of the aforementioned sensors, acquire the first measurement value, the second measurement value, and the third measurement value obtained by the sensor in the same sampling step sequence; Based on the target relative deviation between the first measurement value, the second measurement value, and the third measurement value, determine whether the target relative deviation is within a preset normal deviation range; When the relative deviation of the target is within the normal deviation range, the sensor is determined to be in normal condition, and the measured values ​​collected by the sensor are uploaded to the cloud platform.

[0008] In one possible implementation, the target relative deviation includes a first relative deviation, a second relative deviation, and a third relative deviation; The step of determining whether the target relative deviation is within a preset normal deviation range based on the target relative deviation between the first measured value, the second measured value, and the third measured value includes: Calculate the first relative deviation between the first measured value and the second measured value, the second relative deviation between the first measured value and the third measured value, and the third relative deviation between the second measured value and the third measured value, respectively. When the first relative deviation, the second relative deviation, and the third relative deviation are all within the normal deviation range, the target relative deviation is determined to be within the normal deviation range. When any one of the first relative deviation, the second relative deviation, and the third relative deviation exceeds the upper limit of the normal deviation range or falls below the lower limit of the normal deviation range, it is determined that the target relative deviation is not within the normal deviation range.

[0009] In one possible implementation, the step of optimizing the brewing setpoint trajectory in future time periods using a model predictive control algorithm based on the measured values ​​received at the current time and a pre-stored multi-enzyme activity kinetic model, and then sending each brewing setpoint corresponding to the current time in the brewing setpoint trajectory to the edge controller, includes: Based on the multi-enzyme activity kinetic model, the activity function of each enzyme under the current brewing environment is determined, and the system state variables at the current moment are constructed based on the measured values ​​received at the current moment and the activity functions of each enzyme. With the optimization objective of maximizing the minimum activity of each enzyme and minimizing the action range of each brewing environment control station, under the constraint of the preset rate of change of brewing environment parameters, a model predictive control algorithm is used to solve the optimal control sequence in the future time period based on the system state variables. The brewing setpoint trajectory is generated based on the optimal control sequence, and the brewing setpoints corresponding to the current time in the brewing setpoint trajectory are sent to the edge controller.

[0010] In one possible implementation, after sending the brewing setting values ​​corresponding to the current time in the brewing setting value trajectory to the edge controller, the method further includes: After a preset time period, the latest normal measurement values ​​of each sensor in the brewing system are reacquired and uploaded to the cloud platform; The cloud platform updates the brewing setpoint trajectory for future periods based on the latest normal measurement values ​​and the pre-stored multi-enzyme activity kinetic model. The brewing settings corresponding to the current moment are extracted from the updated brewing setting trajectory and sent to the edge controller. The steps of re-acquiring measurement values, updating the brewing setting trajectory, and re-sending brewing settings are repeated in each preset time period thereafter.

[0011] In one possible implementation, the step of driving each brewing environment control station with a fuzzy proportional-integral-differential algorithm based on each of the brewing setpoints, so that the brewing environment parameters of the brewing system track each of the brewing setpoints, includes: For any of the brewing environment control stations, the current actual value of the brewing environment control station is obtained through each of the sensors, and the deviation value and the rate of change of deviation between the current actual value and the brewing set value corresponding to the brewing environment control station are calculated. The deviation value and the deviation change rate are input into a preset fuzzy rule table. The fuzzy rule table outputs the proportional coefficient adjustment amount, integral coefficient adjustment amount, and differential coefficient adjustment amount. The proportional coefficient, integral coefficient, and differential coefficient are dynamically adjusted according to the proportional coefficient adjustment amount, the integral coefficient adjustment amount, and the differential coefficient adjustment amount, respectively. The fuzzy rule table is configured to take into account the nonlinear and large hysteresis characteristics of the brewing process. When the deviation value is greater than a preset deviation threshold, the adjustment amount of the proportional coefficient is increased, and when the deviation value is less than the preset deviation threshold, the adjustment amount of the differential coefficient is decreased. Based on the dynamically adjusted proportional coefficient, integral coefficient, and derivative coefficient, and combined with the deviation value, the control output of the brewing environment control station is calculated, driving the brewing environment control station to perform corresponding adjustment actions, so that the actual value of the brewing environment parameter approaches the corresponding brewing set value.

[0012] In one possible implementation, the method further includes: During the process of the edge controller driving the operation of each brewing environment control station, the actual response value of each brewing environment control station under each brewing set value is collected by each sensor, the deviation data between the actual response value and the brewing set value is calculated, and the deviation data is uploaded to the cloud platform through the edge controller; In batches, the cumulative bias data received in the current batch is used as the reward signal for reinforcement learning through the cloud platform. The reward signal is negatively correlated with the magnitude of the bias data. After the current batch ends, the cloud platform fine-tunes the model parameters of the internal prediction model in the model prediction control algorithm based on the reward signal, so that the fine-tuned internal prediction model is adapted to the raw material characteristics of the current batch, and the fine-tuned internal prediction model is used for the brewing setpoint trajectory optimization of the next batch.

[0013] Furthermore, to achieve the above objectives, this application also proposes a model-based predictive brewing control system, which includes: Sensors are used to acquire measurement values ​​obtained by continuous detection under the same sampling sequence; An edge controller is used to acquire the measured values ​​of brewing environment parameters continuously detected by multiple sensors in the same sampling sequence in the brewing system, and to determine whether each sensor is in a normal state based on the target relative deviation between the measured values. When a sensor is determined to be in a normal state, the corresponding measured value of the sensor is uploaded to the cloud platform. The cloud platform is used to optimize the brewing setpoint trajectory in future time periods based on the measurement values ​​received at the current moment and the pre-stored multi-enzyme activity kinetic model, and to send the brewing setpoints corresponding to the current moment in the brewing setpoint trajectory to the edge controller. The edge controller is also used to drive each brewing environment adjustment station using a fuzzy proportional-integral-differential algorithm according to each of the brewing set values, so that the brewing environment parameters of the brewing system track each of the brewing set values.

[0014] In addition, to achieve the above objectives, this application also proposes a model prediction-based brewing control device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the model prediction-based brewing control method described above.

[0015] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the model prediction-based brewing control method described above.

[0016] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the model prediction-based brewing control method described above.

[0017] This application provides a model-predictive brewing control method, system, device, and storage medium. The model-predictive brewing control method acquires measured values ​​of brewing environmental parameters continuously detected by multiple sensors in the brewing system under the same sampling sequence via an edge controller. Based on the target relative deviation between the measured values, it determines whether each sensor is in a normal state. When a sensor is determined to be in a normal state, the corresponding measured value is uploaded to a cloud platform. Then, the cloud platform, based on the currently received measured values ​​and a pre-stored multi-enzyme activity kinetic model, uses a model predictive control algorithm to optimize the brewing setpoint trajectory for future time periods. The brewing settings corresponding to the current moment in the trace are sent to the edge controller. The edge controller then drives each brewing environment adjustment station according to the brewing settings using a fuzzy proportional-integral-differential algorithm. This ensures that the brewing environment parameters of the brewing system track the brewing settings. In other words, the reliability of the sensor data is ensured by verifying the relative deviation of multiple sets of measurement values, dynamic parameter planning is achieved by relying on a multi-enzyme kinetic model combined with a model predictive control algorithm, and the brewing environment is adaptively adjusted using a fuzzy proportional-integral-differential algorithm. This solves the defects of existing technologies, such as easy distortion of sensor data and inability of fixed parameter control to adapt to nonlinear changes in multi-enzyme activity, thereby improving the reliability and adaptive regulation capability of brewing environment parameter control. Attached Figure Description

[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a schematic flowchart of an embodiment of the brewing control method based on model prediction in this application. Figure 2 A simplified flowchart illustrating the brewing control method based on model prediction in this application; Figure 3 This is a schematic diagram of the module structure of the brewing control system based on model prediction, as described in an embodiment of this application. Figure 4 This is a schematic diagram of the equipment structure of the hardware operating environment involved in the brewing control method based on model prediction in the embodiments of this application.

[0021] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0022] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0023] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0024] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device, big data service platform, or model-based prediction brewing control system capable of the above functions. The following description uses a model-based prediction brewing control system as an example to illustrate this embodiment and the subsequent embodiments.

[0025] Based on this, embodiments of this application provide a brewing control method based on model prediction, referring to... Figure 1 , Figure 1 This is a schematic diagram of the process provided in Embodiment 1 of the brewing control method based on model prediction of this application.

[0026] In this embodiment, the brewing control method based on model prediction includes steps S11 to S13: Step S11: The edge controller acquires the measured values ​​of brewing environment parameters continuously detected by multiple sensors in the brewing system under the same sampling sequence, and determines whether each sensor is in a normal state based on the target relative deviation between the measured values. When the sensor is determined to be in a normal state, the corresponding measured value of the sensor is uploaded to the cloud platform. It should be noted that the edge controller refers to an on-site intelligent control device deployed at the brewing production site and equipped with local data computing and device communication interaction capabilities; the brewing system refers to an integrated fermentation production device that completes the koji making and fermentation processes and is equipped with supporting sensing acquisition and environment regulation equipment; the multiple sensors refer to a temperature sensor, a salinity sensor and a pH sensor that respectively collect parameters of brewing environment temperature, salinity and pH; the same sampling step refers to a standardized execution process in which the brewing system initiates a complete parameter acquisition in a unified manner; the measurement values obtained by continuous detection refer to multiple sets of original parameter values output by the sensor uninterruptedly within a single sampling process; the target relative deviation refers to a dimensionless comparison value obtained by converting the difference and the mean value between any two sets of measurement values from the same sensor; the normal state means that the sensor has no faults such as probe contamination, salt crystal adhesion, microbial film coverage, component aging, and signal stuck, and the output data can truly reflect the actual working conditions of the brewing environment; the cloud platform refers to a remote data processing platform deployed on a cloud server, which stores multi-enzyme kinetic models, performs global optimization operations, and issues control instructions.

[0027] In addition, in the embodiments of the present application, the core purpose of the edge controller executing this step is to complete the front-end credibility screening of the original brewing sensing data, so as to avoid the problem of regulation failure caused by distorted data directly entering the control loop in the traditional single and one-time sampling mode. In a possible implementation manner, the edge controller can complete data interaction with various sensors relying on a field bus. In another possible implementation manner, the edge controller can receive the measurement values output by the sensors through an industrial Ethernet.

[0028] Specifically, after the brewing system triggers a round of sampling tasks in a unified manner, the edge controller simultaneously issues acquisition instructions to all sensors, collects multiple sets of measurement values continuously output by each sensor, and the built-in operation logic of the edge controller sequentially calculates the target relative deviation between every two sets of multiple measurement values of the same sensor, and completes the sensor working condition determination by comparing with the preset deviation interval. Only when the sensor is determined to be in a normal state, the edge controller packs all valid measurement data and transmits it to the cloud platform through the network link for storage and standby.

[0029] For example, in the soy sauce koji making and fermentation process, the edge controller simultaneously issues acquisition instructions to the temperature sensor, salinity sensor and pH sensor matched with the fermentation tank, each type of sensor continuously outputs three sets of measurement values within the same sampling step, and the edge controller respectively calculates the target relative deviation between every two of the three sets of values of each type of sensor. If the calculated target relative deviation of a certain salinity sensor exceeds the preset interval, it is determined that the salinity sensor is attached with salt crystals and has a drift fault, the measurement value of this sensor will not be uploaded to the cloud platform, a fault report is triggered and pushed to the staff for inspection, and the remaining measurement data of the temperature and pH sensors that are determined to be normal are uniformly packaged and uploaded to the cloud platform.

[0030] Step S12: Based on the measurement values ​​received at the current time and the pre-stored multi-enzyme activity kinetic model, the cloud platform uses a model predictive control algorithm to optimize the brewing setpoint trajectory in the future time period, and sends each brewing setpoint corresponding to the current time in the brewing setpoint trajectory to the edge controller. It should be noted that the pre-stored multi-enzyme activity kinetic model refers to the mathematical model in the cloud platform database, trained based on historical high-quality fermentation batches, used to characterize the relationship between the catalytic activity of various fermentation enzymes such as amylase, protease, and cellulase and parameters such as temperature, salinity, and pH. The model predictive control algorithm refers to the closed-loop optimization operation logic that solves the continuous optimal control parameter sequence over multiple time periods based on the real-time operating conditions of the system. The future time period refers to a continuous fermentation regulation duration extending backward from the current control node. The brewing setpoint trajectory refers to the set of target regulation parameters for temperature, salinity, and pH corresponding to each time period, covering the future time period. The brewing setpoints corresponding to the current time period refer to a set of environmental parameter target values ​​that match the current regulation node in the brewing setpoint trajectory.

[0031] Furthermore, in this embodiment, the core purpose of the cloud platform performing this step is to overcome the limitations of traditional fixed parameter control modes and dynamically generate continuous control targets adapted to the fermentation process based on the activity change patterns of various enzymes. In one possible implementation, the cloud platform repeatedly performs the optimization calculation of this step according to a fixed time period; in another possible implementation, the cloud platform triggers the optimization calculation immediately after receiving a new valid measurement value uploaded by the edge controller.

[0032] Specifically, after receiving the valid measurement values ​​uploaded by the edge controller, the cloud platform retrieves the multi-enzyme activity kinetic model stored in the database, substitutes it with the real-time measurement values ​​to calculate the current theoretical catalytic activity of various fermentation enzymes, and solves the optimal control sequence for future periods based on the model predictive control algorithm combined with the constraint of the change amplitude of fermentation parameters. The optimal control sequence generates a complete brewing setpoint trajectory, extracts the brewing setpoints of temperature, salinity, and pH corresponding to the current control node in the trajectory, and sends them to the edge controller at the brewing site through a remote communication link.

[0033] For example, during the fermentation stage of Maotai-flavor liquor, the cloud platform reads the qualified temperature, salinity, and pH measurement data of the fermentation pit uploaded by the edge controller, retrieves the pre-stored protease and amylase activity kinetic models, uses model predictive control algorithms to solve the continuous parameter control sequence for the next fifteen minutes, generates a complete brewing setpoint trajectory, and extracts the target values ​​of pit temperature, salinity, and pH corresponding to the current moment and sends them to the edge controller associated with the pit.

[0034] Step S13: The edge controller drives each brewing environment regulating station using a fuzzy proportional-integral-derivative algorithm according to each of the brewing set values, so that the brewing environment parameters of the brewing system track each of the brewing set values.

[0035] It should be noted that the fuzzy proportional-integral-derivative algorithm refers to a closed-loop regulation operation logic that integrates fuzzy rule logic and can dynamically adjust the proportional coefficient, integral coefficient and derivative coefficient according to brewing working conditions; each brewing environment regulating station refers to an independent execution device respectively responsible for heating and cooling the fermentation system, salt supplement and dilution, and pH neutralization regulation, including a temperature regulating station, a salinity regulating station and a pH regulating station, wherein the temperature, salinity and pH regulating stations are each equipped with an independent fuzzy PID controller; the brewing environment parameters refer to actual values of fermentation temperature, salinity and pH detected in real time by the brewing system; tracking each of the brewing set values refers to making the real-time actual values of the brewing environment continuously approach the target brewing set values issued by the cloud end through the action of the regulating devices.

[0036] In addition, in the embodiments of the present application, the core purpose of the edge controller executing this step is to solve the problems of regulation oscillation and slow response caused by the nonlinear and large-lag working conditions in the brewing process, and accurately complete the regulation of the environment parameters following the target values. In a possible implementation, the brewing environment regulating stations corresponding to temperature, salinity and pH are each independently configured with a dedicated fuzzy proportional-integral-derivative operation unit. In another possible implementation, the edge controller integrates a unified operation unit to output multiple paths of regulation driving signals to each brewing environment regulating station in a time-sharing manner.

[0037] Specifically, after receiving various brewing set values issued by the cloud platform, the edge controller synchronously collects the current real environment parameters of the brewing system, calculates the deviation between the actual parameters and the target brewing set values and the deviation change rate, dynamically corrects the three types of regulation coefficients of proportionality, integration and differentiation by matching the special fuzzy rules for brewing, calculates corresponding regulation output signals based on the corrected coefficients, and sends the signals to the temperature regulating station, the salinity regulating station and the pH regulating station respectively to drive the devices to complete operations such as heating, adding salt, adjusting pH, etc., so as to continuously reduce the difference between the actual environment parameters and the brewing set values, which can be referred to Figure 2 .

[0038] For example, in the fermentation production process of enzyme preparations, the edge controller receives the brewing set values of the target temperature, salinity and pH of the fermentation tank issued by the cloud end, reads the actual parameters collected by real-time sensing of the fermentation tank, calculates the parameter deviation and the deviation change rate, dynamically updates the regulation coefficients through the fuzzy proportional-integral-derivative algorithm, outputs driving signals to the temperature regulating station, the salinity regulating station and the pH regulating station matched with the fermentation tank, and the regulating devices continue to operate until the actual environment parameters of the fermentation tank are consistent with the brewing set values issued by the cloud end.

[0039] This embodiment uses the relative deviation of multiple sets of measured values ​​to complete online sensor fault identification, filtering out distorted sensor data caused by faults such as probe contamination and component aging, thus solving the defect of traditional single sampling that easily introduces erroneous parameters and ensuring the reliability of data in the input decision-making process. Then, a dynamic brewing setpoint trajectory is generated by combining a multi-enzyme activity kinetic model with a model predictive control algorithm, replacing the traditional fixed parameter control mode. This adapts to the nonlinear changes in the activity of various enzymes during the fermentation process caused by raw materials, time, and environmental disturbances, ensuring a balanced catalytic efficiency of various fermentation enzymes. Finally, a fuzzy proportional-integral-differential algorithm is used to drive various brewing environment control stations to complete adaptive parameter adjustment, overcoming the control oscillation and response lag problems caused by the nonlinearity and large lag of the brewing process. This enables brewing environment parameters to accurately follow the dynamic target value in the cloud, thereby reducing the frequency of manual verification and intervention in the brewing process and comprehensively improving the stability, accuracy, and adaptability of brewing environment control.

[0040] In one feasible implementation, the step of acquiring the measured values ​​of brewing environment parameters continuously detected by multiple sensors in the brewing system under the same sampling sequence, determining whether each sensor is in a normal state based on the target relative deviation between the measured values, and uploading the corresponding measured value of the sensor to the cloud platform when the sensor is determined to be in a normal state, includes: Step S21: For any of the sensors, acquire the first measurement value, the second measurement value, and the third measurement value obtained by the sensor in the same sampling sequence. It should be noted that any of the aforementioned sensors refers to any sensor acquisition device within the brewing system used to collect temperature, salinity, or pH levels; continuous detection refers to the sensor sequentially completing three parameter acquisition actions within a short period of time without interval. Furthermore, the acquisition actions can be set according to actual needs and are not limited to three times; the first measurement value refers to the original environmental parameter value output by the sensor for the first time in a single sampling process; the second measurement value refers to the original environmental parameter value output by the sensor for the second time in a single sampling process; and the third measurement value refers to the original environmental parameter value output by the sensor for the third time in a single sampling process.

[0041] Furthermore, in this embodiment, the core purpose of the edge controller performing this step is to provide sufficient comparative samples for subsequent calculation of the target relative deviation between multiple sets of data, thus solving the shortcomings of traditional single sampling that lacks comparative basis and cannot identify sensor drift and jamming faults. In one possible implementation, the edge controller sends a data acquisition trigger signal to the sensor via a fieldbus. In another possible implementation, the edge controller relies on industrial Ethernet to transmit data acquisition commands and receive three sets of measurement values ​​fed back by the sensor.

[0042] Specifically, after responding to the sampling signal, the edge controller sends acquisition commands in parallel to all temperature sensors, salinity sensors, and pH sensors in the brewing system through its built-in fieldbus / industrial Ethernet communication module. The edge controller's built-in high-precision timing control unit sets a millisecond-level acquisition interval, controlling each target sensor to perform three independent acquisitions in sequence. The sensor's internal AD conversion module converts the environmental physical quantity into digital measurement values, which are then transmitted back to the edge controller's local cache module in three separate transmissions. The cache module stores the first, second, and third measurement values ​​in the order they are received, retaining all three sets of raw data without preprocessing, for use by the subsequent deviation calculation module.

[0043] For example, within a single sampling step of the salinity sensor in a soy sauce fermentation tank, the timing unit of the edge controller is set to a 0.5-second acquisition interval. The sensor first acquires and outputs a salinity value of 8.0%, recorded as the first measurement value. After a 0.5-second interval, it acquires and outputs a salinity value of 8.03%, recorded as the second measurement value. After another 0.5-second interval, it acquires and outputs a salinity value of 7.98%, recorded as the third measurement value. All three sets of values ​​are completely stored in the local cache of the edge controller. Temperature sensors in the same batch simultaneously complete three acquisitions, outputting a first measurement value of 27.0℃, a second measurement value of 27.05℃, and a third measurement value of 26.96℃. pH sensors simultaneously output three sets of pH values: 6.21, 6.23, and 6.19. All data are independently cached for later processing.

[0044] Step S22: Based on the target relative deviation between the first measured value, the second measured value, and the third measured value, determine whether the target relative deviation is within a preset normal deviation range; It should be noted that the preset normal deviation range refers to the numerical range boundary that is pre-stored locally on the edge controller to distinguish between normal output and fault output of the sensor. The lower limit of the range is used to identify sensor jamming failure, and the upper limit of the range is used to identify numerical drift caused by probe contamination.

[0045] Furthermore, in this embodiment, the core purpose of the edge controller performing this step is to quantify the dispersion among the three sets of measurement data, and to distinguish between data anomalies caused by actual process fluctuations and sensor malfunctions through standardized interval comparison. In one possible implementation, the lower and upper limits of the normal deviation interval can be configured according to the factory allowable error of the corresponding sensor. In another possible implementation, the boundaries of the normal deviation interval can be dynamically fine-tuned by combining long-term historical operating data of the brewing workshop.

[0046] Specifically, the edge controller retrieves the first, second, and third measurement values ​​stored in the cache module and sends them to the built-in deviation calculation unit. Following pairwise pairing logic, the relative deviation calculation formula is substituted into each of the three independent relative deviations to solve for them. The edge controller's local storage unit pre-stores the lower limit of the normal deviation range (0.001) and the upper limit (0.1). The calculation unit compares each of the three calculated relative deviations with the upper and lower limits of the range to determine their magnitude. The logic determination unit summarizes the comparison results of the three relative deviations and outputs a unified judgment flag indicating whether all deviations fall within the normal deviation range, which is then transmitted to the subsequent status determination module.

[0047] Step S23: When the relative deviation of the target is within the normal deviation range, the sensor is determined to be in normal condition, and the measurement value collected by the sensor is uploaded to the cloud platform.

[0048] It should be noted that the normal state refers to the sensor having no probe with impurities, aging components, signal jamming, or other faults, and the three sets of output measurement values ​​can truly reflect the real-time working conditions of the brewing environment.

[0049] Furthermore, in this embodiment, the core purpose of the edge controller performing this step is to send only reliable sensing data into the subsequent control and computation chain, preventing faulty or distorted data from participating in parameter optimization. In one possible implementation, the edge controller simultaneously attaches the sensor number and sampling timestamp when uploading the measurement value. In another possible implementation, the edge controller only uploads the average of the three sets of measurement values ​​as a representative parameter to the cloud platform.

[0050] Specifically, the edge controller's built-in status determination module receives the deviation range identifier output in step S22. If the identifier indicates that the relative deviation of all targets is within the normal deviation range, the current sensor is marked as operating normally. The edge controller's built-in data encapsulation unit retrieves three sets of measurement values ​​from the cache, adds the sensor device number, sampling step sequence timestamp, and sensor type label to complete the data packet encapsulation. The encapsulated data packet establishes an encrypted transmission link via the industrial Ethernet communication unit and is uploaded to the cloud platform's data storage module for storage. If the identifier indicates that there is a relative deviation exceeding the range, the current cached measurement value is cleared, a new acquisition command is sent to the sensor to trigger a secondary sampling process, or a sensor abnormality signal is generated and pushed to the staff for inspection.

[0051] For example, in the koji-making workshop, the three sets of pH values ​​measured by the pH sensor were 6.21, 6.23, and 6.19. After deviation calculation, all of them fell within the range of 0.001 to 0.1. The status determination module marked the pH sensor as normal, and the data encapsulation unit packaged the three sets of pH values, sensor number S-PH-003, and sampling timestamp 202607071430 into a data packet, which was then uploaded to the cloud platform database via industrial Ethernet. On the other hand, the three sets of salinity values ​​of 8.0%, 8.02%, and 9.1% showed deviations exceeding the upper limit. The status determination module marked the sensor as faulty, cleared the cached data, and issued an instruction to re-execute three consecutive samplings.

[0052] This embodiment utilizes edge controller timing control and bus communication technology to continuously collect three sets of independent measurement values ​​for each sensor within the same sampling process. This provides multiple sets of comparable data samples for sensor fault identification, overcoming the limitation of traditional single sampling without verification basis. Furthermore, the edge controller's built-in deviation calculation unit calculates the pairwise relative deviation of the three sets of measurement values. Combined with preset dual-threshold normal deviation ranges, numerical comparison is performed to accurately distinguish between data drift caused by sensor jamming or probe contamination and fluctuations in normal brewing process parameters. Finally, based on the deviation range determination results, measurement data from normal sensors are filtered, encapsulated, and transmitted via encrypted links before being uploaded to the cloud platform. This process removes distorted parameters caused by sensor component aging or probe impurities from the data source, ensuring the authenticity and reliability of the basic data. It reduces brewing environment control deviations caused by erroneous data from the source of perception, lowering the frequency of manual on-site verification and calibration of sensors.

[0053] In one feasible implementation, the target relative deviation includes a first relative deviation, a second relative deviation, and a third relative deviation; determining whether the target relative deviation is within a preset normal deviation range based on the target relative deviation between the first measured value, the second measured value, and the third measured value includes: Step S31: Calculate the first relative deviation between the first measured value and the second measured value, the second relative deviation between the first measured value and the third measured value, and the third relative deviation between the second measured value and the third measured value, respectively. It should be noted that, for the real-time data sensed by each sensor in the perception layer, to avoid issues such as sensor aging that could lead to inaccuracies in the temperature, humidity, and pH data of the brewing system, the control program needs to be optimized. In the brewing environment, sensor probes are prone to asymmetric drift due to protein, salt crystallization, and microbial film adhesion (i.e., the measured value deviates from the true value, but the deviation is not constant, but varies with the measured parameter). Traditional sensor fault detection methods (such as comparing historical averages or setting upper and lower limits) cannot distinguish this drift from actual process fluctuations, leading to misjudgments or missed judgments. Therefore, a method is adopted where three tests are performed in each sampling step, and the edge intelligent controller performs usability analysis on the three received temperature, humidity, and pH data to reduce the probability of misjudgment.

[0054] Furthermore, the first relative deviation refers to the dimensionless value obtained by using the relative deviation calculation formula between the first and second measured values; the second relative deviation refers to the dimensionless value obtained by using the relative deviation calculation formula between the first and third measured values; and the third relative deviation refers to the dimensionless value obtained by using the relative deviation calculation formula between the second and third measured values. The relative deviation calculation formula is used to eliminate calculation interference caused by parameter range and to unify the anomaly judgment criteria for different temperature, salinity, and pH parameters.

[0055] In one possible implementation, the edge controller calculates three sets of relative deviations synchronously and in parallel, reducing computation time; in another possible implementation, the edge controller calculates three sets of relative deviations sequentially in a fixed order, reducing hardware computing power consumption.

[0056] Specifically, the edge controller's deviation calculation unit retrieves the first, second, and third measurement values ​​stored in the local cache module, and then retrieves the built-in, fixed relative deviation calculation logic to perform usability analysis on the received first, second, and third measurement values. The usability analysis formula (relative deviation calculation formula) is as follows:

[0057]

[0058]

[0059] in, The first measured value, This is the second measured value. This is the third measurement value. This is the first relative deviation. This is the second relative deviation. This is the third relative deviation.

[0060] The arithmetic unit then stores the three sets of relative deviation values ​​into a temporary register, fully preserving the three sets of calculation results, and outputs them to the logic judgment unit for waiting interval comparison.

[0061] For example, the temperature sensor in the fermenter collects a first measurement of 27.0℃, a second measurement of 27.08℃, and a third measurement of 26.93℃. The edge controller's deviation calculation unit then substitutes these values ​​into the relative deviation formula to perform calculations.

[0062]

[0063]

[0064] All three sets of original relative deviations are stored in a temporary register for subsequent determination.

[0065] Step S32: When the first relative deviation, the second relative deviation, and the third relative deviation are all within the normal deviation range, it is determined that the target relative deviation is within the normal deviation range. It should be noted that the normal deviation range refers to the numerical range pre-configured locally by the edge controller. The absolute value of the relative deviation is used as the comparison basis when making the judgment. The lower limit of the range is used to identify problems such as sensor AD jamming and probe complete failure. The upper limit of the range is used to identify numerical drift caused by probe salt crystallization and microbial film adhesion. All values ​​are within the normal deviation range, which means that the absolute values ​​of the three independently calculated relative deviations all fall between the lower limit and the upper limit of the range, and no value exceeds the limit.

[0066] In one possible implementation, the threshold is set based on: The lower limit of the interval is 0.001 (corresponding to a relative deviation of 0.1%): when the difference between any two of the three measurements is less than 0.1%, it indicates that the digital output of the sensor is almost unchanged, which is very likely due to the AD converter being stuck or the probe being completely malfunctioning. In the brewing process, the actual parameters cannot remain completely unchanged within 1 second, so this threshold can detect "dead sensors".

[0067] The upper limit of the range is 0.1 (corresponding to a 10% relative deviation): Based on the allowable error of ±5% given by the sensor manufacturer, and considering the slight fluctuations in the brewing process itself, twice the allowable error (10%) is set as the threshold. If it exceeds the threshold, it is judged as abnormal drift (such as the probe being severely contaminated).

[0068] The intermediate range (0.1%–10%) indicates that the sensor performance is normal and the data is usable. However, the edge controller records this deviation value as a basis for predictive maintenance—when the average Y value gradually increases to close to 0.1 in multiple consecutive samples, a cleaning or calibration alarm is issued in advance. In another possible implementation, the logic judgment unit completes the comparison group by group, and if a group exceeds the limit, the subsequent comparison process is terminated directly.

[0069] In summary, the edge intelligent controller is set to be in the following condition: -0.001≤Y1 / Y2 / Y3≤0.001 or Y1 / Y2 / Y3>0.1 or Y1 / Y2 / Y3<-0.1. That is, if any two of the three detections show almost no change or a deviation >10%, the sensor is deemed to be malfunctioning, the data obtained from this sampling is unusable, and manual resampling is required.

[0070] Specifically, the edge controller logic determination unit reads the three sets of relative deviation absolute values ​​stored in the temporary register, retrieves the lower limit of the normal deviation range (0.001) and the upper limit (0.1) stored locally, and performs numerical judgment logic on the three sets of absolute values ​​in sequence. Only when the absolute value of the first relative deviation is greater than or equal to 0.001 and less than or equal to 0.1, the absolute value of the second relative deviation is greater than or equal to 0.001 and less than or equal to 0.1, and the absolute value of the third relative deviation is greater than or equal to 0.001 and less than or equal to 0.1, does the logic determination unit generate a global normal flag and transmit it to the sensor status determination module.

[0071] For example, the absolute values ​​of the three relative deviations of the salinity sensor are 0.0021, 0.0018, and 0.0032, respectively. All three values ​​are greater than 0.001 and less than 0.1, which fully meet the normal deviation range constraint. The logic judgment unit outputs a normal status indicator for the overall target relative deviation. If any absolute value of the relative deviation is not within this range, the normal status indicator will not be generated.

[0072] Step S33: When any one of the first relative deviation, the second relative deviation, and the third relative deviation exceeds the upper limit of the normal deviation range or falls below the lower limit of the normal deviation range, it is determined that the target relative deviation is not within the normal deviation range.

[0073] It should be noted that sensor malfunction means that the current sensor output data is distorted and cannot reflect the actual brewing conditions; triggering resampling means that the edge controller reacquires multiple sets of manually sampled measurement values ​​or measurement values ​​collected by the sensor after cleaning, for secondary verification.

[0074] In one possible implementation, after triggering resampling, the abnormal log is synchronously recorded and stored locally; in another possible implementation, after triggering resampling multiple times, a sensor maintenance warning is pushed to the upper-level cloud platform.

[0075] Specifically, the edge controller logic determination unit iterates through three sets of relative deviation values. As long as any one of the first, second, and third relative deviation values ​​is between -0.001 and 0.001, or any one of the values ​​is greater than or equal to 0.1 and any one of the values ​​is less than or equal to -0.1, a sensor fault identifier is immediately generated and transmitted to the local state storage module. After confirming that the fault has been resolved, the logic determination unit sends a re-sampling trigger signal to the edge controller timing scheduling unit. The timing scheduling unit then sends three consecutive acquisition commands to the faulty sensor again via fieldbus / industrial Ethernet, clears the original abnormal measurement values ​​in the buffer, and waits for the return of a new round of three sets of measurement values.

[0076] This embodiment uses an edge controller to calculate the relative deviation of all two pairs of paired data from the same sensor in three separate data collections, forming an independent verification index. This achieves full-dimensional quantification of the dispersion of the collected data, avoiding the verification blind spot caused by comparing only one set of data. Furthermore, by setting a full relative deviation interval verification rule, the data is only considered reliable when all three sets of relative deviations fall within two preset normal deviation intervals. This raises the sensor data admission standard and reduces the probability of falsely releasing distorted data. Finally, by identifying scenarios where any set of relative deviations falls into the stuck or drift fault interval, the system distinguishes between two types of sensor faults and automatically issues a command to resample. This solves the shortcomings of traditional brewing sensors, such as no verification after single sampling, delayed fault identification, and frequent misjudgments and omissions, thereby improving the reliability and automation of data collection in the brewing sensing layer.

[0077] In one feasible implementation, the step of optimizing the brewing setpoint trajectory in future time periods using a model predictive control algorithm based on the currently received measurement values ​​and a pre-stored multi-enzyme activity kinetic model, and then sending each brewing setpoint corresponding to the current time in the brewing setpoint trajectory to the edge controller, includes: Step S41: Based on the multi-enzyme activity kinetic model, determine the activity function of each enzyme under the current brewing environment, and construct the system state variables at the current moment based on the measured values ​​received at the current moment and the activity functions of each enzyme. It should be noted that enzymes refer to various microbial metabolic enzymes that participate in the koji-making and fermentation processes and decompose the macromolecules of raw materials; activity functions refer to specific computational expressions used to calculate the actual catalytic activity of a single enzyme under given temperature, salinity, and pH conditions; and system state variables refer to the set of operating condition characteristics that summarize real-time brewing environmental parameters and real-time estimated activity of various enzymes, which are used by the model predictive control algorithm for calculation.

[0078] Furthermore, in this embodiment, the core objective of this step is to combine the static enzyme activity model with real-time field conditions to quantify the catalytic capacity of all enzymes in the current fermentation stage. In one possible implementation, the cloud platform uses an extended Kalman filter to correct the estimated enzyme activity values ​​before constructing the system state variables; in another possible implementation, the cloud platform directly uses the theoretical activity values ​​output by the activity function to participate in the construction of the system state variables.

[0079] Specifically, the cloud platform retrieves a complete multi-enzyme activity kinetic model library from the database, extracts the activity function expression matching each type of fermentation enzyme, and substitutes the real-time temperature, salinity, and pH measurements uploaded by the edge controller into the corresponding activity function of each enzyme to solve for the real-time catalytic activity value of each enzyme under the current operating conditions. The cloud platform's state variable construction unit integrates all data on real-time temperature, real-time salinity, real-time pH, and real-time catalytic activity of various enzymes, and encapsulates them into standardized system state variables, which are cached in the computing memory for model predictive control solving.

[0080] Step S42: With the optimization objective of maximizing the minimum activity of each enzyme and minimizing the action range of each brewing environment regulation station, under the preset constraint of the rate of change of brewing environment parameters, the model predictive control algorithm is used to solve the optimal control sequence in the future time period based on the system state variables. It should be noted that maximizing the minimum activity of each enzyme refers to balancing the catalytic efficiency of all fermentation enzymes, avoiding excessive activity of a single enzyme while inhibiting the activity of other enzymes, and ensuring the synergistic degradation of raw materials by multiple enzymes; minimizing the action range of each brewing environment regulation station refers to reducing the start-up, shutdown, and power fluctuation of temperature, salinity, and pH regulation equipment to prevent drastic parameter fluctuations from damaging the microbial living environment; the constraint condition of the rate of change of brewing environment parameters refers to the pre-set maximum allowable range of temperature, salinity, and pH variation per unit time; the model predictive control algorithm refers to the closed-loop optimization computation framework that continuously solves the optimal parameters for multiple time periods; the future time period refers to the continuous fermentation regulation duration extending from the current regulation node; and the optimal control sequence refers to a set of temperature, salinity, and pH regulation control quantities covering the future time period and corresponding to each time moment.

[0081] Furthermore, in this embodiment, the core objective of this step is to ensure the balanced catalytic activity of all fermentation enzymes while limiting drastic fluctuations in parameters, thus overcoming the shortcomings of traditional fixed parameters that cannot adapt to nonlinear changes in enzyme activity. In one possible implementation, the future time period is set to fifteen minutes, and the calculation execution cycle is set to five minutes; in another possible implementation, the future time period and the calculation cycle can be individually configured and adjusted according to different brewing categories.

[0082] Specifically, the cloud platform reads the system state variables generated in step S41, configures a dual optimization objective function, the first objective is to take the minimum value among all real-time enzyme activity values ​​and maximize that value, the second objective is to count the fluctuation range of the control output of each regulating station and minimize the fluctuation range; loads preset constraints, limiting the temperature change range, salinity change range, and pH change range per unit time to not exceed preset upper limits; based on the model predictive control rolling optimization logic, iteratively solves the optimal control quantity corresponding to each time step in the future complete time period based on the current system state variables, integrates all control quantities to form an optimal control sequence and stores it in memory.

[0083] Step S43: Generate the brewing setpoint trajectory according to the optimal control sequence, and send the brewing setpoints corresponding to the current time in the brewing setpoint trajectory to the edge controller.

[0084] It should be noted that, in one possible implementation, the cloud platform simultaneously attaches a valid duration identifier for the trajectory when issuing the brewing setting value; in another possible implementation, the cloud platform simultaneously issues the complete brewing setting value trajectory to the local cache of the edge controller for backup.

[0085] Specifically, the cloud platform reads the optimal control sequence obtained in step S42, converts each set of control quantities in the sequence into target parameters of temperature, salinity, and pH at the corresponding time, sorts and integrates them in chronological order to generate a complete brewing setpoint trajectory; it extracts a set of temperature, salinity, and pH brewing setpoints that match the current control node in the trajectory, adds a time sequence identifier and encapsulates them into a transmission data packet, and sends it to the edge controller at the brewing site through remote industrial Ethernet communication.

[0086] In one embodiment, in a soy sauce koji-making and fermentation workshop, a cloud platform pre-stores a complete multi-enzyme activity kinetic model library. The model library stores independent activity functions for enzymes such as α-amylase, neutral protease, and glutaminase. The activity function of the i-th enzyme is:

[0087] in, This represents the actual catalytic activity of the i-th enzyme under given temperature T, salinity S, and pH conditions. This represents the actual catalytic activity of the i-th enzyme; Represents the maximum theoretical activity of the i-th enzyme; T is the current brewing temperature. The optimal temperature for the i-th enzyme is... This refers to the temperature sensitivity coefficient. The current pH level. The optimal pH for the i-th enzyme is... is the acid-base sensitivity coefficient; S is the current salinity (mass fraction). This is a function affecting salinity. All activity functions are trained based on production data from multiple batches of fermentation with excellent results in the workshop, and can output the catalytic activity of various enzymes under any temperature, salinity, and pH conditions.

[0088] Furthermore, the cloud platform receives real-time measurement values ​​uploaded by the edge controller and verified by multiple sets of relative deviations. These real-time measurement values ​​include three types of environmental parameters: the current temperature, salinity, and pH of the fermenter. The cloud platform calls the extended Kalman filter observation module, substitutes the above-mentioned activity function, and calculates the real-time estimated activities of α-amylase, neutral protease, and glutaminase. All data, including the current temperature, current salinity, current pH, and the real-time estimated activities of the three enzymes, are integrated and encapsulated to generate the system state variables corresponding to the current moment.

[0089] Furthermore, the cloud platform reads the encapsulated system state variables and configures dual optimization objectives. The first optimization objective is to maximize the minimum value among the activity values ​​of α-amylase, neutral protease, and glutaminase, ensuring that the three fermentation enzymes maintain effective catalytic capabilities simultaneously. The second optimization objective is to minimize the operational amplitude of the temperature, salinity, and pH control stations. Simultaneously, preset hard constraints on parameter change rates are loaded: temperature change rate ≤ 0.5℃ / min, salinity change rate ≤ 0.1% / min, and pH change rate ≤ 0.05 / min. The cloud platform performs rolling optimization solutions on the system state variables based on the model predictive control framework with a fixed calculation cycle of five minutes. Each solution generates an optimal control sequence covering the next fifteen minutes, with environmental regulation control quantities arranged chronologically for each time period within the optimal control sequence.

[0090] Finally, the cloud platform analyzes all control quantities within the optimal control sequence, converts them into corresponding target parameters of temperature, salinity, and pH for each time period, and splices them together in chronological order to form a complete brewing setpoint trajectory covering a duration of fifteen minutes. From the complete brewing setpoint trajectory, a set of target parameters matching the current control node is extracted, i.e., the brewing setpoint at the current moment. This set of setpoints is encapsulated into a communication data packet and remotely sent to the local cache module of the edge controller deployed with the fermentation tank via industrial Ethernet, so that the edge controller can use it for subsequent fuzzy proportional-integral-derivative adjustment calculations.

[0091] In this embodiment, the real-time activity of various enzymes is solved by calling the pre-stored multi-enzyme activity kinetic models on the cloud platform and relying on the real-time verified brewing measurement values, and environmental parameters and enzyme activity data are integrated to construct standardized system state variables, so as to provide complete input data that fits the real fermentation working conditions for subsequent optimization operations; then, by establishing dual optimization objectives that take into account both multi-enzyme synergistic catalysis and stable regulation, superimposing the constraint of the change rate of brewing environmental parameters, and relying on the model predictive control algorithm to solve the optimal control sequence for the future period in a rolling manner, the shortcoming that traditional fixed parameters cannot adapt to the nonlinear dynamic change of enzyme activity is overcome, and meanwhile, the damage to fermentation microorganisms and enzyme activity caused by large parameter fluctuations is avoided; finally, by converting the optimal control sequence into a continuous brewing setpoint trajectory, the target parameters at the current moment are extracted and delivered to the on-site edge controller, so as to provide a dynamic and balanced regulation reference adapted to multi-enzyme activity for the on-site regulating equipment, thereby realizing an automated closed-loop decision from real-time working condition analysis, multi-objective optimization to on-site target parameter delivery, reducing the operation of manually setting fermentation environmental parameters based on experience, and improving the adaptability and balance of brewing environment regulation.

[0092] In a feasible implementation, after delivering each of the brewing setpoints corresponding to the current moment in the brewing setpoint trajectory to the edge controller, the method further includes: Step S51, after a preset time period, re-acquire the latest normal measurement values of each sensor in the brewing system and upload them to the cloud platform; It should be noted that the preset time period refers to the rolling optimization interval duration specified by the model predictive control framework built in the cloud platform; each of the sensors refers to the temperature sensor, salinity sensor, pH sensor, etc. supporting the brewing system; the latest normal measurement values refer to the original parameters of temperature, salinity and pH that are determined to be fault-free through three consecutive samplings and double relative deviation threshold verification within the current sampling step, and can truly reflect the real-time brewing working conditions; uploading refers to that the edge controller remotely transmits the verified sensor data encapsulated as a time-series data packet to the time-series database of the cloud platform through the industrial Ethernet link.

[0093] In addition, the core purpose of this step is to periodically refresh the on-site working condition data on which cloud computing relies, so as to make up for the defect that a single parameter trajectory cannot adapt to the dynamic fermentation change during long-term operation. In a possible implementation, the preset time period is configured as five minutes; in another possible implementation, the duration of the period can be adjusted according to different brewing categories such as Baijiu, soy sauce and enzyme preparations.

[0094] Specifically, the edge controller continuously accumulates the running time. When the time reaches the preset five-minute cycle threshold, the cycle scheduling module automatically outputs a sampling trigger signal, synchronously driving all sensors to perform three consecutive acquisitions under the same sampling sequence. The edge controller's deviation calculation unit completes the pairwise relative deviation calculation and interval verification of the three sets of measurement values, filters out faulty and distorted data, and adds a sampling timestamp and device number to the latest normal measurement value that has passed the verification, encapsulates it into a data packet, and transmits it to the cloud platform via industrial Ethernet for storage.

[0095] For example, five minutes after the previous trajectory of the soy sauce fermentation tank is completed, the timing module of the edge controller reaches the cycle threshold and automatically controls the temperature, salinity, and pH sensors to continuously collect three sets of values. After relative deviation verification, all values ​​fall within the qualified range. The edge controller packages the three sets of valid measurements with time stamps and uploads them to the cloud platform time series database as input data for the new round of model calculation.

[0096] Step S52: The brewing setpoint trajectory for future periods is updated through the cloud platform based on the latest normal measurement values ​​and the pre-stored multi-enzyme activity kinetic model. It should be noted that updating the brewing setpoint trajectory means discarding the old parameter sequence generated in the previous round, resolving the optimal control quantity based on the latest field conditions, and generating a completely new continuous parameter curve. Furthermore, the core purpose of this step is to use the periodically refreshed real-world conditions to correct the predicted trajectory, offsetting the enzyme activity prediction bias caused by raw material fluctuations and microbial metabolism. By reading newly uploaded valid measurements, substituting them into the activity function, real-time enzyme activity is recalculated, system state variables are reconstructed, and the optimal control sequence is resolved under parameter change rate constraints to generate a completely new brewing setpoint trajectory.

[0097] Specifically, the cloud platform reads the latest normal measurement values ​​uploaded in step S51, retrieves the multi-enzyme activity kinetic model library stored locally, substitutes the real-time temperature, salinity, and pH into the activity formula corresponding to each type of enzyme, corrects the estimated enzyme activity values ​​using an extended Kalman filter, and integrates environmental parameters and enzyme activity data to reconstruct the current system state variables. The optimization solution unit loads preset constraints: temperature change rate ≤ 0.5℃ / min, salinity change rate ≤ 0.1% / min, pH change rate ≤ 0.05 / min, and based on the reconstructed system state variables, it continuously solves for the optimal control sequence for the next fifteen minutes, converting the control quantity into time-by-time target parameters, covering the original old trajectory to generate the updated complete brewing setpoint trajectory.

[0098] For example, every five minutes, the fermentation pits for Maotai-flavor liquor receive a new set of valid measurements of pit temperature, salinity, and pH. The cloud platform then inputs the activity functions of α-amylase, neutral protease, and glutaminase to recalculate the real-time enzyme activity, reconstructs the system state variables, solves the optimal control sequence for fifteen minutes under parameter variation constraints, replaces the old parameter curves generated in the previous round, and completes the update of the brewing setpoint trajectory.

[0099] Step S53: Extract the brewing setting values ​​corresponding to the current time from the updated brewing setting value trajectory and send them to the edge controller. Repeat the steps of re-acquiring measurement values, updating the brewing setting value trajectory, and re-sending brewing setting values ​​in each subsequent preset time period.

[0100] It should be noted that the updated brewing setpoint trajectory refers to step S52, which regenerates a set of continuous temperature, salinity, and pH target parameters covering the next fifteen minutes based on the latest sensor data; the current brewing setpoint trajectory refers to a set of control target parameters that match the current cycle node; the cloud platform pushes the single-moment target parameters to the field edge controller cache through a remote communication link; and the repeated execution refers to the system establishing a permanent rolling loop, with each cycle timing complete and the entire process from S51 to S53 executed.

[0101] Furthermore, the core objective of this step is to implement a rolling time-domain optimization mechanism, continuously updating the on-site control benchmark based on real-time fermentation, and eliminating the control lag caused by long-term fixed trajectories. In one possible implementation, the cloud platform simultaneously caches the fully updated trajectory while issuing single-moment setpoints; in another possible implementation, the edge controller locally stores only the brewing setpoints effective at the current moment.

[0102] Specifically, the updated brewing setpoint trajectory generated in step S52 is read, and the target values ​​of temperature, salinity, and pH matching the current cycle node are extracted, packaged into a control command data packet, and sent to the edge controller at the brewing site. The cloud platform synchronously marks the completion of this round of rolling optimization. After the edge controller timing unit accumulates a preset cycle of five minutes, it automatically triggers the entire set of operations of re-collecting sensor measurement values, updating the brewing setpoint trajectory in the cloud, and extracting and sending the current setpoint, repeating the cycle throughout the entire batch of koji making or fermentation.

[0103] For example, after the enzyme fermentation tank completes a new round of trajectory updates, the cloud platform extracts three sets of brewing set values ​​at the current time: 27.2℃, 8.1%, and pH value of 6.15, and sends them to the edge controller of the tank area. The edge controller starts a five-minute countdown. After the countdown ends, the system automatically re-collects and verifies the sensor data, recalculates the parameter trajectory for fifteen minutes in the cloud, extracts the new current set values, and sends them out. The entire process is automatic and loops without manual intervention.

[0104] This embodiment establishes a periodic automatic sampling and verification mechanism. Every preset period, it re-collects real brewing environment parameters after fault identification, continuously pushing input data that aligns with real-time fermentation conditions to the cloud. This avoids prediction distortion caused by long-term use of outdated measurements. Based on the periodically refreshed effective measurements, it re-estimates the real-time catalytic activity of various enzymes using multi-enzyme activity kinetic formulas. It reconstructs system state variables and updates the complete brewing setpoint trajectory for future periods under strict parameter change rate constraints. This continuously corrects prediction deviations caused by dynamic changes in raw materials and microorganisms, ensuring that the optimization target of multi-enzyme synergistic catalysis always adapts to the actual on-site conditions. Finally, it captures the current target parameters of the updated trajectory and sends them to the on-site controller, establishing a permanent rolling loop. Each cycle completely repeats the entire process of data collection, modeling updates, and command issuance, implementing the model-based predictive control rolling time-domain optimization logic. This completely eliminates the shortcomings of traditional fixed-parameter curves, which cannot adapt to nonlinear changes in fermentation. It reduces manual updates of process curves throughout the process, continuously improving the dynamic adaptability and long-term operational stability of brewing environment control.

[0105] In one feasible implementation, the step of driving each brewing environment control station with a fuzzy proportional-integral-differential algorithm according to each of the brewing setpoints, so that the brewing environment parameters of the brewing system track each of the brewing setpoints, includes: Step S61: For any of the brewing environment control stations, the current actual value of the brewing environment control station is obtained through each of the sensors, and the deviation value and the rate of change of deviation between the current actual value and the brewing set value corresponding to the brewing environment control station are calculated. It should be noted that any of the aforementioned brewing environment control stations refers to the execution equipment within the brewing system that independently completes temperature control, salinity control, and pH control, including temperature control stations, salinity control stations, pH control stations, etc.; each of the aforementioned sensors refers to the temperature sensor, salinity sensor, pH sensor, etc., that are matched with the corresponding control station and have passed multiple sets of relative deviation calibrations; the current actual value refers to the real brewing environment parameters of the corresponding control station's controlled area, which are collected in real time by the sensors; the deviation value refers to the difference between the current actual value and the brewing set value; the deviation change rate refers to the difference between the deviation values ​​within two adjacent sampling periods, used to characterize how quickly the parameters deviate from the target.

[0106] Specifically, the edge controller traverses all brewing environment control stations within the system. For each temperature control station, it retrieves the current actual temperature value uploaded in real time by the associated temperature sensor, and simultaneously reads the brewing setpoint temperature sent to the control station from the cloud platform. It uses subtraction to calculate the difference between the current actual value and the brewing setpoint to obtain the deviation value, reads the historical deviation value retained from the previous sampling period, and calculates the deviation change rate by subtracting the deviation values ​​from the previous two periods. The salinity control station and pH control station synchronously execute the same parameter reading, deviation value, and deviation change rate calculation process. The two sets of calculation results corresponding to each control station are independently cached for use in subsequent fuzzy rule calculations.

[0107] For example, in a soy sauce fermentation tank equipped with a temperature control station, the sensor collects the current actual temperature of 24.0℃ in real time, and the temperature brewing setting value issued by the cloud platform is 27.0℃. The deviation calculation unit calculates the deviation value as -3.0℃; the deviation value of the previous cycle is -2.4℃. The deviation change rate is obtained by difference calculation as -0.6℃ / cycle. The edge controller caches this set of deviation values ​​and deviation change rate separately for subsequent fuzzy proportional integral differential coefficient adjustment calculations of the temperature control station.

[0108] Step S62: Input the deviation value and the deviation change rate into a preset fuzzy rule table, output the proportional coefficient adjustment amount, integral coefficient adjustment amount, and differential coefficient adjustment amount through the fuzzy rule table, and dynamically adjust the proportional coefficient, integral coefficient, and differential coefficient according to the proportional coefficient adjustment amount, the integral coefficient adjustment amount, and the differential coefficient adjustment amount, respectively. The fuzzy rule table is configured for the nonlinear characteristics and large hysteresis characteristics of the brewing process. When the deviation value is greater than a preset deviation threshold, the adjustment amount of the proportional coefficient is increased, and when the deviation value is less than the preset deviation threshold, the adjustment amount of the differential coefficient is decreased. It should be noted that the preset fuzzy rule table refers to a multi-dimensional mapping table pre-entered into the local storage unit of the edge controller, adapted to the nonlinearity of brewing fermentation and the large lag condition; the proportional coefficient adjustment amount refers to the increase or decrease value used to correct the basic proportional coefficient; the integral coefficient adjustment amount refers to the increase or decrease value used to correct the basic integral coefficient; the derivative coefficient adjustment amount refers to the increase or decrease value used to correct the basic derivative coefficient; the proportional coefficient, integral coefficient, and derivative coefficient are the three core operation parameters of the proportional-integral-derivative control algorithm; the preset deviation threshold refers to the critical value that distinguishes between parameters deviating significantly from the target and parameters deviating slightly from the target; the nonlinear characteristic refers to the fact that the rate of change of brewing environment parameters is not fixed and that enzyme activity does not have a fixed linear correspondence with parameter changes; the large lag characteristic refers to the fact that after the control station executes an action, it takes a long time for the brewing environment parameters to produce corresponding changes.

[0109] Furthermore, the core objective of this step is to dynamically correct the three types of control coefficients based on brewing-specific experience rules. This addresses the issue of control oscillations and slow response that can easily occur with fixed coefficients under conditions of fermentation lag and nonlinearity. The overall approach involves inputting two sets of features: the deviation value and the rate of change of deviation. A lookup table is then used to match and output the adjustment amounts for the three types of coefficients, which are then superimposed onto the original base coefficients to achieve real-time updates. In one possible implementation, the fuzzy rule table is divided into multiple fuzzy levels based on the magnitude and rate of change of deviation. In another possible implementation, the fuzzy rule table can be configured with separate level correspondences for different brewing categories.

[0110] Specifically, the edge controller reads the deviation value and deviation change rate cached in step S61, maps the two sets of values ​​to the corresponding fuzzy level range in the fuzzy rule table, and matches and retrieves the pre-stored proportional coefficient adjustment amount, integral coefficient adjustment amount, and derivative coefficient adjustment amount in the table; the fuzzy inference unit compares the deviation value with the preset deviation threshold. When the deviation value exceeds the threshold, it matches and outputs a larger proportional coefficient adjustment amount to accelerate the rapport between the actual parameter and the set value; when the deviation value is less than the threshold, it matches and outputs a smaller derivative coefficient adjustment amount to suppress the small back-and-forth oscillation of the parameter; the three types of adjustment amounts are respectively superimposed with the original proportional coefficient, integral coefficient, and derivative coefficient stored locally to generate three dynamically updated sets of control coefficients and stored in the cache.

[0111] For example, if the temperature control station has a deviation of -3.0℃, which is greater than the preset deviation threshold, the fuzzy rule table will output a larger proportional coefficient adjustment to amplify the temperature control. When the fermentation temperature approaches the target value, the deviation will shrink to less than the preset deviation threshold, and the fuzzy rule table will output a smaller differential coefficient adjustment to reduce the differential effect and prevent the temperature from fluctuating slightly around the set value. This will complete the dynamic update of the proportional, integral, and differential coefficients.

[0112] Step S63: Based on the dynamically adjusted proportional coefficient, integral coefficient, and derivative coefficient, and in conjunction with the deviation value, calculate the control output of the brewing environment control station, and drive the brewing environment control station to perform corresponding adjustment actions so that the actual value of the brewing environment parameters approaches the corresponding brewing set value.

[0113] It should be noted that the dynamically adjusted proportional coefficient, integral coefficient, and derivative coefficient refer to the control calculation parameters completed in real time by relying on fuzzy rules in step S62; the control output refers to the amplitude, operating level, or duration of the drive signal output from the edge controller to the brewing environment control station; the control action refers to the actions performed by equipment such as raising or lowering the temperature control station, adding salt or diluting the salinity control station, and adding acid-base neutralizing agents to the pH control station; the actual value of the brewing environment parameter approaching the corresponding brewing set value refers to continuously reducing the difference between the current actual value and the brewing set value sent from the cloud.

[0114] Furthermore, the core objective of this step is to output precise drive signals based on real-time adaptive control coefficients, overcoming control deviations caused by brewing lag and nonlinearity, and continuously reducing the difference between actual and target parameters. The overall implementation involves substituting the updated three sets of coefficients and the real-time deviation value to complete PID calculations, generating standardized drive signals, and sending them to the corresponding control station for execution. In one possible implementation, the control output is an analog voltage signal used to continuously adjust equipment power; in another possible implementation, the control output is a switching pulse signal used to control the start-up and shutdown duration of the equipment.

[0115] Specifically, the edge controller reads the proportional coefficient, integral coefficient, and derivative coefficient dynamically updated in step S62, retrieves the real-time deviation value calculated in step S61, and substitutes it into the standard proportional-integral-derivative calculation formula to obtain the control output of the corresponding brewing environment adjustment station. The drive signal output unit converts the numerical control output into an electrical signal that the equipment can recognize, and transmits it to the corresponding brewing environment adjustment station through the fieldbus. The drive adjustment station then performs corresponding adjustment actions such as heating, cooling, adding salt, dilution, and adding acid and alkali agents, continuously reducing the difference between the current actual environmental parameters and the brewing set value in the cloud.

[0116] In one embodiment, the edge controller reads the dynamically updated scaling factor from step S62. Integral coefficient Differential coefficients Retrieve the real-time deviation value of the current period calculated in step S61. Deviation value of the previous period Deviation values ​​of the previous two periods Substituting into the discrete incremental standard proportional-integral-differential operation formula:

[0117]

[0118] In the formula: It is a proportionality coefficient used to quickly reduce the deviation between actual brewing parameters and brewing set values; The integral coefficient is used to eliminate steady-state residual deviations and prevent parameters from deviating slightly from the target value over a long period of time. The differential coefficient is used to predict the trend of deviation changes and suppress parameter oscillations under brewing lag conditions. This represents the real-time deviation value for the current sampling period; This is the deviation value from the previous sampling period; This represents the deviation value between the previous two sampling periods; The output increment is controlled for this cycle; This is the control quantity output in the previous cycle; This is the control output obtained by the final solution in this cycle.

[0119] Edge controller superimposes the output of the previous cycle The control output of the brewing environment regulation station for this cycle is obtained by solving the problem. The numerical control output is converted into an analog voltage signal that the equipment can recognize. This signal is then transmitted to the corresponding brewing environment control station via a fieldbus. The control station then performs corresponding adjustment actions such as heating, cooling, adding salt, dilution, and adding acid and alkali agents, continuously reducing the difference between the current actual environmental parameters and the brewing settings set in the cloud.

[0120] For example, after the temperature control station dynamically updates the proportional, integral, and derivative coefficients using fuzzy rules, it calculates the temperature rise control output based on the deviation value of -3.0℃. The edge controller outputs a high-power drive signal to the temperature control station, which then starts the heating device to raise the temperature of the fermentation tank. As the actual temperature approaches the brewing set value of 27.0℃, the deviation value continues to decrease. Subsequently, the fuzzy rules continuously fine-tune the derivative coefficients and output a small temperature rise drive signal until the actual temperature of the fermentation tank stably matches the target set value.

[0121] This embodiment synchronously collects real-time actual parameters corresponding to each brewing environment control station, accurately calculates the deviation value and rate of change between the actual parameters and the cloud-based brewing setpoint, and fully captures the magnitude and trend of the current parameters deviating from the target. Then, by introducing a fuzzy rule table adapted to the nonlinear and large-lag conditions of brewing, it dynamically outputs three types of PID coefficient adjustment quantities based on the magnitude of the deviation and corrects the original control coefficients in real time. When the deviation is large, the proportional adjustment is amplified to quickly catch up with the target; when the deviation is small, the derivative effect is weakened to suppress parameter oscillation, solving the defect of fixed PID coefficients' poor adaptability to fermentation conditions. Finally, the control output of the control station is solved by combining the dynamically corrected proportional, integral, and derivative coefficients with the real-time deviation value, and the output drive signal controls various control stations to perform actions such as heating, adding salt, and adjusting pH, continuously reducing the difference between the actual environmental parameters and the cloud-based dynamic setpoint. This linkage achieves edge-end adaptive precise closed-loop control, matching the unique characteristics of brewing process lag and nonlinearity, reducing problems such as parameter oscillation and slow control response, and improving the accuracy of brewing environment parameters in following the cloud-based dynamically optimized setpoint.

[0122] In one feasible implementation, the method further includes: Step S71: During the process of the edge controller driving the operation of each brewing environment adjustment station, the actual response value of each brewing environment adjustment station under each brewing set value is collected by each sensor, the deviation data between the actual response value and the brewing set value is calculated, and the deviation data is uploaded to the cloud platform through the edge controller. It should be noted that the edge controller driving the brewing environment control station's actions refers to the edge controller outputting drive signals to control the temperature control station, salinity control station, and pH control station to perform control operations such as heating, cooling, adding salt, dilution, and adding acid and alkali agents; the actual response value refers to the real parameters of the brewing environment collected by the sensors in real time after the control station performs the control action; the deviation data refers to the difference between the actual response value and the corresponding brewing set value within a single control cycle, including a dataset composed of multiple sets of time-series differences throughout the process; uploading refers to the edge controller encrypting and transmitting the time-series deviation data packets to the batch data storage area of ​​the cloud platform via industrial Ethernet.

[0123] In one possible implementation, the edge controller synchronously collects a set of actual response values ​​and calculates the deviation after each fuzzy proportional-integral-derivative control operation; in another possible implementation, the edge controller periodically collects actual response values ​​at fixed short time intervals to generate deviation data.

[0124] Specifically, while the edge controller sends control outputs to any brewing environment control station and drives the control equipment to operate, it continuously reads the actual response values ​​output by the corresponding sensors, retrieves the currently effective brewing setpoints, and uses the deviation statistics unit to perform difference calculations to obtain the single-cycle deviation value. The collection timestamp, control station number, brewing setpoint, actual response value, and single-cycle deviation value are bound into a single deviation record. The edge controller accumulates multiple time-series deviation records to form a batch deviation dataset, which is then segmented, encapsulated into data packets, and continuously uploaded to the cloud platform's dedicated batch storage space via industrial Ethernet to complete storage and archiving.

[0125] For example, during the continuous heating process of the soy sauce fermentation tank temperature control station receiving the drive signal, the supporting temperature sensor collects the actual temperature every 0.5 seconds as the actual response value. The brewing set value sent from the cloud is 27.0℃. The edge controller calculates the difference between the real-time temperature and 27.0℃ one by one as a single deviation record. All time-series deviation records are accumulated continuously for one hour to form a deviation dataset, which is uploaded to the cloud platform in batches to completely retain the deviation change information of the entire temperature control process of that batch.

[0126] Step S72: On a batch basis, the cumulative received deviation data in the current batch is used as the reward signal for reinforcement learning through the cloud platform. The reward signal is negatively correlated with the magnitude of the deviation data. It should be noted that "batch" refers to the complete production cycle from the start of fermentation of brewing raw materials to the completion of the entire fermentation process; "cumulative received deviation data" refers to the set of all time-series deviation records of this batch uploaded and stored on the cloud platform throughout step S71; "reinforcement learning" refers to the iterative optimization algorithm that uses reward signals to correct network parameters in reverse, and can be either a deep deterministic policy gradient algorithm or a deep Q-network algorithm; "reward signal" refers to a scalar value that quantifies the effect of regulation; the magnitude of the reward signal is negatively correlated with the magnitude of the deviation data, meaning that the larger the absolute value of the deviation data, the more serious the deviation from the target, and the smaller the corresponding reward signal value; the smaller the absolute value of the deviation data, the closer the regulation is to the target, and the larger the corresponding reward signal value.

[0127] Furthermore, the core objective of this step is to quantify the entire control deviation into a unified evaluation index, distinguish the quality of control effects, and provide a quantitative optimization basis for model fine-tuning. The overall implementation approach involves collecting all deviation data from a single batch and converting it into a complete time-series reward signal sequence according to the negative correlation mapping rule. In one possible implementation, the cloud platform takes the average of the absolute values ​​of the deviations in a single time period to convert it into the reward signal for the corresponding time period; in another possible implementation, the cloud platform performs a weighted summation of all deviation data from a single batch and then converts it into the total batch reward signal.

[0128] Specifically, after the entire brewing process of a single batch is completed, the cloud platform reads the complete time-series deviation dataset from the batch storage area, retrieves the built-in reward mapping conversion rules, and sets a negative correlation mapping relationship between the deviation value and the reward signal. It reads each time-series deviation record line by line, generates the reward signal corresponding to that moment based on the magnitude of the absolute value of the deviation, integrates all time-series reward signals to form a complete batch reward signal sequence, and stores it in the reinforcement learning operation cache for subsequent model parameter fine-tuning operations.

[0129] For example, if a single deviation record in a fermentation batch is 0.1℃, the deviation value is relatively small, and a high-value reward signal is obtained. If a deviation record is 1.2℃, the deviation value is relatively large, and a low-value reward signal is obtained. The cloud platform summarizes the reward signals corresponding to all times in the batch to form a complete batch reward signal sequence for subsequent iterative calculations.

[0130] Step S73: After the current batch ends, the cloud platform fine-tunes the model parameters of the internal prediction model in the model prediction control algorithm according to the reward signal, so that the fine-tuned internal prediction model is adapted to the raw material characteristics of the current batch, and the fine-tuned internal prediction model is used for the brewing setpoint trajectory optimization of the next batch.

[0131] It should be noted that the internal prediction model refers to the mathematical model within the model predictive control algorithm used to predict the future trend of changes in brewing environment parameters; model parameters refer to the adjustable weight coefficients within the internal prediction model used to characterize the coupling relationship between raw materials, enzymes, and the environment; fine-tuning refers to slightly modifying the internal weights of the model based on the backpropagation logic of reinforcement learning, without reconstructing the overall model architecture; raw material characteristics refer to the inherent properties such as protein and starch content of raw materials such as soybeans, wheat, and grains used in the current batch of brewing; and the optimization of the brewing setpoint trajectory for the next batch refers to the rolling trajectory solution calculation performed by the cloud platform in steps S41 to S43 and steps S51 to S53 after the start of the next round of fermentation.

[0132] Furthermore, the core objective of this step is to autonomously correct the prediction model based on the reward signal generated by the full batch control deviation, offsetting the prediction distortion caused by differences in raw materials across different batches. This enables the model to continuously self-optimize with each production batch. The overall approach involves loading the complete batch reward signal sequence, using a reinforcement learning algorithm to update the weights of the internal prediction model, overwriting the old model, and then using it for the next batch. In one possible implementation, the cloud platform uses a deep deterministic policy gradient algorithm to fine-tune the model parameters; in another possible implementation, the cloud platform uses a deep Q-network algorithm to iteratively correct the model parameters.

[0133] Specifically, after the current batch of brewing processes is completed, the cloud platform reads the complete batch reward signal sequence generated in step S72 and uses the reward signal as a feedback constraint input to the reinforcement learning network. The network iteratively corrects all adjustable weight parameters of the model prediction control internal prediction model according to the backpropagation logic, resulting in a new version of the internal prediction model adapted to the protein, starch, and microbial metabolic characteristics of the raw materials in this batch. The model update storage unit overwrites the original old model in the database with the finely tuned new version of the internal prediction model. After the next batch of fermentation starts, the cloud platform directly calls the new version of the internal prediction model to perform the entire process calculation of system state variable construction, optimal control sequence solution, and brewing setpoint trajectory generation.

[0134] For example, if the protein content of this batch of soybean raw materials is too high, the overall control deviation is too large, and the corresponding batch reward signal value is too low. The cloud platform relies on the deep deterministic strategy gradient algorithm to fine-tune the weight of the internal prediction model for predictive control. The updated model can adapt to the enzyme activity change pattern of high-protein soybean raw materials. When the next batch is fermented using the same soybean raw materials, the cloud platform directly calls the fine-tuned internal prediction model to solve the fifteen-minute brewing setpoint trajectory, reducing the control deviation.

[0135] This embodiment continuously collects actual response values ​​and generates time-series deviation data throughout the entire control process at the regulating station. This data is then uploaded to the cloud in real time to preserve the deviation conditions of each round of control for a single batch, providing sufficient real samples for effect evaluation and model iteration. Furthermore, by using the complete brewing batch as the statistical unit, the entire deviation data is converted into a reinforcement learning-specific reward signal according to a negative correlation mapping rule. This quantifies the superiority or inferiority of different control conditions, forming a standardized basis for optimization feedback. Finally, after the production of a single batch, the weight parameters of the internal prediction model are fine-tuned based on the reward signal using a reinforcement learning algorithm. This allows the prediction model to adapt to the unique physicochemical properties of the raw materials in this batch. The optimized model is then directly used for trajectory optimization calculations in the next batch, thereby continuously correcting model prediction deviations and gradually offsetting the distortion in multi-enzyme activity prediction caused by differences in raw materials from different batches. This continuously improves the accuracy of the brewing setpoint trajectory generated by the model prediction control, further reducing the frequency of manual intervention during the brewing control process.

[0136] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0137] This application also provides a model-based predictive brewing control system, please refer to... Figure 3 The model-based prediction-based brewing control system includes a sensing layer (pH sensor, temperature sensor, salinity sensor), a decision-making layer (edge ​​controller and cloud platform), and an execution layer (various brewing environment control stations, such as temperature control station, salinity control station, and pH control station), specifically including: Sensors are used to acquire measurement values ​​obtained by continuous detection under the same sampling sequence; An edge controller is used to acquire the measured values ​​of brewing environment parameters continuously detected by multiple sensors in the same sampling sequence in the brewing system, and to determine whether each sensor is in a normal state based on the target relative deviation between the measured values. When a sensor is determined to be in a normal state, the corresponding measured value of the sensor is uploaded to the cloud platform. The cloud platform is used to optimize the brewing setpoint trajectory in future time periods based on the measurement values ​​received at the current moment and the pre-stored multi-enzyme activity kinetic model, and to send the brewing setpoints corresponding to the current moment in the brewing setpoint trajectory to the edge controller. The edge controller is also used to drive each brewing environment adjustment station using a fuzzy proportional-integral-differential algorithm according to each of the brewing set values, so that the brewing environment parameters of the brewing system track each of the brewing set values.

[0138] The model-predictive brewing control system provided in this application, employing the model-predictive brewing control method described in the above embodiments, can solve the technical problems in the background art. Compared with the prior art, the beneficial effects of the model-predictive brewing control system provided in this application are the same as those of the model-predictive brewing control method provided in the above embodiments, and other technical features in the model-predictive brewing control system are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0139] This application provides a model prediction-based brewing control device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the model prediction-based brewing control method in Embodiment 1 above.

[0140] The following is for reference. Figure 4 This document illustrates a schematic diagram of a model-predictive brewing control device suitable for implementing embodiments of this application. The model-predictive brewing control device in these embodiments may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 4 The model-based brewing control device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this application.

[0141] like Figure 4As shown, the model-predictive brewing control device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the model-predictive brewing control device. The processing unit 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows the model-based brewing control equipment to communicate wirelessly or wiredly with other devices to exchange data. While the figure shows model-based brewing control equipment with various systems, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.

[0142] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0143] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0144] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the model prediction-based brewing control methods provided by the above methods.

[0145] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0146] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0147] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A brewing control method based on model prediction, characterized in that, include: The edge controller acquires the measured values ​​of brewing environment parameters continuously detected by multiple sensors in the same sampling sequence in the brewing system, and determines whether each sensor is in a normal state based on the target relative deviation between the measured values. When a sensor is determined to be in a normal state, the corresponding measured value of the sensor is uploaded to the cloud platform. Based on the measured values ​​received at the current moment and the pre-stored multi-enzyme activity kinetic model, the cloud platform uses a model predictive control algorithm to optimize the brewing setpoint trajectory in the future time period, and sends the brewing setpoints corresponding to the current moment in the brewing setpoint trajectory to the edge controller. The edge controller drives each brewing environment adjustment station according to each brewing setting value using a fuzzy proportional-integral-differential algorithm, so that the brewing environment parameters of the brewing system track each brewing setting value.

2. The brewing control method based on model prediction as described in claim 1, characterized in that, The process involves acquiring measured values ​​of brewing environment parameters continuously detected by multiple sensors in the same sampling sequence within the brewing system, determining whether each sensor is in a normal state based on the target relative deviation between the measured values, and uploading the corresponding measured value of the sensor to the cloud platform when the sensor is determined to be in a normal state. This includes: For any of the aforementioned sensors, acquire the first measurement value, the second measurement value, and the third measurement value obtained by the sensor in the same sampling step sequence; Based on the target relative deviation between the first measurement value, the second measurement value, and the third measurement value, determine whether the target relative deviation is within a preset normal deviation range; When the relative deviation of the target is within the normal deviation range, the sensor is determined to be in normal condition, and the measured values ​​collected by the sensor are uploaded to the cloud platform.

3. The brewing control method based on model prediction as described in claim 2, characterized in that, The target relative deviation includes a first relative deviation, a second relative deviation, and a third relative deviation; The step of determining whether the target relative deviation is within a preset normal deviation range based on the target relative deviation between the first measured value, the second measured value, and the third measured value includes: Calculate the first relative deviation between the first measured value and the second measured value, the second relative deviation between the first measured value and the third measured value, and the third relative deviation between the second measured value and the third measured value, respectively. When the first relative deviation, the second relative deviation, and the third relative deviation are all within the normal deviation range, the target relative deviation is determined to be within the normal deviation range. When any one of the first relative deviation, the second relative deviation, and the third relative deviation exceeds the upper limit of the normal deviation range or falls below the lower limit of the normal deviation range, it is determined that the target relative deviation is not within the normal deviation range.

4. The brewing control method based on model prediction as described in claim 1, characterized in that, The step of optimizing the brewing setpoint trajectory in future time periods using a model predictive control algorithm based on the measured values ​​received at the current time and a pre-stored multi-enzyme activity kinetic model, and then sending the brewing setpoints corresponding to the current time in the brewing setpoint trajectory to the edge controller includes: Based on the multi-enzyme activity kinetic model, the activity function of each enzyme under the current brewing environment is determined, and the system state variables at the current moment are constructed based on the measured values ​​received at the current moment and the activity functions of each enzyme. With the optimization objective of maximizing the minimum activity of each enzyme and minimizing the action range of each brewing environment control station, under the constraint of the preset rate of change of brewing environment parameters, a model predictive control algorithm is used to solve the optimal control sequence in the future time period based on the system state variables. The brewing setpoint trajectory is generated based on the optimal control sequence, and the brewing setpoints corresponding to the current time in the brewing setpoint trajectory are sent to the edge controller.

5. The brewing control method based on model prediction as described in claim 4, characterized in that, After sending the brewing setting values ​​corresponding to the current time in the brewing setting value trajectory to the edge controller, the method further includes: After a preset time period, the latest normal measurement values ​​of each sensor in the brewing system are reacquired and uploaded to the cloud platform; The cloud platform updates the brewing setpoint trajectory for future periods based on the latest normal measurement values ​​and the pre-stored multi-enzyme activity kinetic model. The brewing settings corresponding to the current moment are extracted from the updated brewing setting trajectory and sent to the edge controller. The steps of re-acquiring measurement values, updating the brewing setting trajectory, and re-sending brewing settings are repeated in each preset time period thereafter.

6. The brewing control method based on model prediction as described in claim 1, characterized in that, The step of driving each brewing environment control station with a fuzzy proportional-integral-differential algorithm based on each brewing setpoint, so that the brewing environment parameters of the brewing system track each brewing setpoint, includes: For any of the brewing environment control stations, the current actual value of the brewing environment control station is obtained through each of the sensors, and the deviation value and the rate of change of deviation between the current actual value and the brewing set value corresponding to the brewing environment control station are calculated. The deviation value and the deviation change rate are input into a preset fuzzy rule table. The fuzzy rule table outputs the proportional coefficient adjustment amount, integral coefficient adjustment amount, and differential coefficient adjustment amount. The proportional coefficient, integral coefficient, and differential coefficient are dynamically adjusted according to the proportional coefficient adjustment amount, the integral coefficient adjustment amount, and the differential coefficient adjustment amount, respectively. The fuzzy rule table is configured to take into account the nonlinear and large hysteresis characteristics of the brewing process. When the deviation value is greater than a preset deviation threshold, the adjustment amount of the proportional coefficient is increased, and when the deviation value is less than the preset deviation threshold, the adjustment amount of the differential coefficient is decreased. Based on the dynamically adjusted proportional coefficient, integral coefficient, and derivative coefficient, and combined with the deviation value, the control output of the brewing environment control station is calculated, driving the brewing environment control station to perform corresponding adjustment actions, so that the actual value of the brewing environment parameter approaches the corresponding brewing set value.

7. The brewing control method based on model prediction as described in claim 1, characterized in that, The method further includes: During the process of the edge controller driving the operation of each brewing environment control station, the actual response value of each brewing environment control station under each brewing set value is collected by each sensor, the deviation data between the actual response value and the brewing set value is calculated, and the deviation data is uploaded to the cloud platform through the edge controller; In batches, the cumulative bias data received in the current batch is used as the reward signal for reinforcement learning through the cloud platform. The reward signal is negatively correlated with the magnitude of the bias data. After the current batch ends, the cloud platform fine-tunes the model parameters of the internal prediction model in the model prediction control algorithm based on the reward signal, so that the fine-tuned internal prediction model is adapted to the raw material characteristics of the current batch, and the fine-tuned internal prediction model is used for the brewing setpoint trajectory optimization of the next batch.

8. A model-based predictive brewing control system, characterized in that, include: Sensors are used to acquire measurement values ​​obtained by continuous detection under the same sampling sequence; An edge controller is used to acquire the measured values ​​of brewing environment parameters continuously detected by multiple sensors in the same sampling sequence in the brewing system, and to determine whether each sensor is in a normal state based on the target relative deviation between the measured values. When a sensor is determined to be in a normal state, the corresponding measured value of the sensor is uploaded to the cloud platform. The cloud platform is used to optimize the brewing setpoint trajectory in future time periods based on the measurement values ​​received at the current moment and the pre-stored multi-enzyme activity kinetic model, and to send the brewing setpoints corresponding to the current moment in the brewing setpoint trajectory to the edge controller. The edge controller is also used to drive each brewing environment adjustment station using a fuzzy proportional-integral-differential algorithm according to each of the brewing set values, so that the brewing environment parameters of the brewing system track each of the brewing set values.

9. A brewing control device based on model prediction, characterized in that, The model-predictive brewing control device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the model-predictive brewing control method as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the brewing control method based on model prediction as described in any one of claims 1 to 7.