Machine learning-based low-carbon automatic production control method and system for pickles

CN122592828APending Publication Date: 2026-08-18HUBEI HONGTIANRI AGRI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610718564.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-23
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0004]本发明提供了基于机器学习的酱菜低碳自动生产控制方法及系统,目的在于解决现有技术难以实时精准调控酱菜发酵进程、无法兼顾管控精度与低碳节能需求的技术问题

Benefits of technology

本发明提供了基于机器学习的酱菜低碳自动生产控制方法及系统。首先,获取实时发酵状态参数及品种类型等先验信息,为后续模型匹配提供基础。然后,基于相邻采样时刻的pH值计算变化速率序列,并引入机器学习分析亚硝酸盐剩余风险指数,实现了对产酸动态与安全风险的分离提取。接着,通过计算两者之间的耦合偏离度,生成终止、延长或预警三种综合调控信号,从而精准判断发酵进程是否真正达到安全终点或存在异常。最后,将信号与环境参数输入发酵调控智能体,自适应调整终止时机和环境参数。本发明有效避免了因单指标判断失误而导致的过度发酵能耗或提前终止的安全隐患,可精准把控酱菜发酵品质,实现了酱菜发酵的低碳自动控制。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122592828A_ABST
    Figure CN122592828A_ABST
Patent Text Reader

Abstract

The application discloses a pickled vegetable low-carbon automatic production control method and system based on machine learning, and relates to the technical field of food production control. The method comprises the following steps: acquiring real-time fermentation state parameters and fermentation environment parameters in the fermentation process of pickled vegetables, and acquiring the variety type and main material category of the pickled vegetables; based on the pH value at the adjacent sampling time, a pH value change rate sequence is calculated, and a nitrite residue risk index is acquired based on machine learning analysis; based on the pH value change rate sequence and the nitrite residue risk index, a coupling deviation is calculated to generate a fermentation process comprehensive regulation signal; and the fermentation process comprehensive regulation signal and the fermentation environment parameters are input into a fermentation regulation intelligent agent to adaptively regulate the fermentation termination time and the fermentation environment parameters. The application effectively improves the precision of pickled vegetable fermentation process comprehensive regulation and the low-carbon automation level.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of food production control technology, specifically to a machine learning-based low-carbon automated production control method and system for pickled vegetables. Background Technology

[0002] In current pickle fermentation production processes, the pH and nitrite concentration of the fermentation broth are typically measured manually at regular intervals, and the fermentation endpoint is determined based on experience with fixed fermentation cycles. Operators manually decide whether to terminate fermentation based on whether the pH value stabilizes or whether the nitrite peak decreases. Meanwhile, fermentation environmental parameters are mostly set to constant values ​​or roughly adjusted according to seasonal changes. For different varieties and main ingredient categories, companies pre-develop differentiated fermentation process cards and execute production according to a fixed procedure.

[0003] However, relying on manual experience and fixed processes makes it difficult to dynamically capture the nonlinear coupling relationship between the rate of pH change and the risk of nitrite residue during the fermentation process of pickled vegetables. During fermentation, the rate of acid production and the formation and degradation of nitrite do not change synchronously. Manual experience often only focuses on a single indicator, leading to situations where fermentation has reached the target but continues to run, resulting in energy waste, or where fermentation is prematurely terminated before the risk of nitrite is eliminated, causing product safety issues. This approach fails to balance the need for precise control with the requirements of low-carbon and energy-saving practices, thus hindering the low-carbon and automated development of pickled vegetable production. Summary of the Invention

[0004] This invention provides a machine learning-based method and system for low-carbon automatic production control of pickled vegetables, aiming to solve the technical problems of existing technologies that make it difficult to accurately control the fermentation process of pickled vegetables in real time and cannot simultaneously meet the requirements of control precision and low-carbon energy saving.

[0005] In view of the above problems, the present invention provides a machine learning-based method and system for low-carbon automated production control of pickled vegetables.

[0006] In a first aspect, the present invention provides a machine learning-based method for the low-carbon automated production control of pickled vegetables, comprising: The system acquires real-time fermentation status parameters and fermentation environment parameters during the fermentation process of pickled vegetables, and obtains the variety type and main ingredient category of the pickled vegetables. Based on the pH values ​​at adjacent sampling times, a sequence of pH change rates is calculated, and a residual nitrite risk index is obtained based on machine learning analysis. Based on the pH change rate sequence and the nitrite residual risk index, the coupling deviation is calculated to generate a comprehensive control signal for the fermentation process. The comprehensive control signal for the fermentation process includes one of a termination signal, an extension signal, and an early warning signal. The fermentation process comprehensive control signal and the fermentation environment parameters are input into the fermentation control agent to adaptively control the fermentation termination time and fermentation environment parameters.

[0007] Secondly, this invention provides a machine learning-based low-carbon automated production control system for pickled vegetables, including: The parameter category acquisition module is used to acquire real-time fermentation status parameters and fermentation environment parameters during the fermentation process of pickled vegetables, and to acquire the variety type and main ingredient category of pickled vegetables; The pH rate risk assessment module is used to calculate the pH change rate sequence based on the pH value at adjacent sampling times, and to obtain the residual nitrite risk index based on machine learning analysis. The coupling signal generation module is used to calculate the coupling deviation based on the pH change rate sequence and the nitrite residual risk index, and generate a comprehensive control signal for the fermentation process, wherein the comprehensive control signal for the fermentation process includes one of a termination signal, an extension signal, and an early warning signal. The adaptive control module is used to input the comprehensive control signal of the fermentation process and the fermentation environment parameters into the fermentation control agent to adaptively control the fermentation termination time and fermentation environment parameters.

[0008] One or more technical solutions provided in this invention have at least the following technical effects or advantages: This invention provides a machine learning-based method and system for low-carbon automated production control of pickled vegetables. First, prior information such as real-time fermentation state parameters and variety type is acquired to provide a foundation for subsequent model matching. Then, based on the pH value change rate sequence at adjacent sampling times, machine learning is introduced to analyze the residual nitrite risk index, achieving the separation and extraction of acid production dynamics and safety risks. Next, by calculating the coupling deviation between the two, three comprehensive control signals—termination, extension, or warning—are generated to accurately determine whether the fermentation process has truly reached a safe endpoint or if an anomaly exists. Finally, the signals and environmental parameters are input into a fermentation control agent to adaptively adjust the termination timing and environmental parameters. This invention effectively avoids the safety hazards of excessive fermentation energy consumption or premature termination caused by errors in single-indicator judgments, accurately controls the fermentation quality of pickled vegetables, and achieves low-carbon automated control of pickled vegetable fermentation. Attached Figure Description

[0009] Figure 1 A flowchart illustrating the machine learning-based low-carbon automated production control method for pickled vegetables provided in an embodiment of the present invention; Figure 2 A schematic diagram of the overall logic of the machine learning-based low-carbon automatic production control method for pickled vegetables provided in an embodiment of the present invention; Figure 3A schematic diagram of the machine learning-based low-carbon automated production control system for pickled vegetables provided in an embodiment of the present invention; The components represented by each number in the attached diagram are explained below: Parameter category acquisition module 11, pH rate risk assessment module 12, coupling signal generation module 13, adaptive control module 14. Detailed Implementation

[0010] This invention provides a machine learning-based method and system for low-carbon automated production control of pickled vegetables, which addresses the technical problems of existing technologies that are difficult to control the fermentation process of pickled vegetables in real time and cannot simultaneously meet the requirements of control precision and low-carbon energy saving.

[0011] Example 1, as Figure 1 , Figure 2 As shown, this invention provides a machine learning-based method for low-carbon automated production control of pickled vegetables, the method comprising: S100: Obtain real-time fermentation status parameters and fermentation environment parameters during the fermentation process of pickled vegetables, and obtain the variety type and main ingredient category of pickled vegetables.

[0012] During the fermentation process of pickled vegetables, significant differences exist in the fermentation kinetics among different varieties and main ingredient categories. Root vegetables have relatively high nitrate content, resulting in a later and higher nitrite peak during fermentation; stem vegetables, with high fiber and low water content, exhibit a slower acid production rate under the same processing conditions. Furthermore, the rate of pH change, nitrite concentration trend, fermentation temperature, and salinity are all key parameters affecting the fermentation process. Without accurately obtaining and classifying these parameters, a reliable data foundation cannot be provided for subsequent pH change rate calculations, nitrite risk index assessments, and coupling deviation analysis. Therefore, before initiating the fermentation control process, it is essential to collect real-time fermentation status parameters, fermentation environmental parameters, and information on variety type and main ingredient category for the current batch of pickled vegetables.

[0013] Step S100 in the method provided in this embodiment of the invention includes: The real-time fermentation status parameters during the fermentation process of pickled vegetables are obtained, wherein the real-time fermentation status parameters include at least the pH value and nitrite concentration value of the fermentation liquid; The fermentation environment parameters are collected and acquired, wherein the fermentation environment parameters include at least fermentation temperature and fermentation salinity; Obtain the variety type and main ingredient category of the current batch of pickled vegetables, wherein the variety type includes at least pickled vegetables in soy sauce, pickled vegetables in salt, and pickled vegetables in brine, and the main ingredient category includes at least root vegetables and stem vegetables.

[0014] First, real-time fermentation state parameters are obtained during the fermentation process of the pickled vegetables. These parameters include at least the pH value and nitrite concentration of the fermentation broth. Real-time fermentation state parameters refer to dynamic indicators that reflect the degree and quality of fermentation during the pickled vegetable fermentation process. Specifically, the pH value of the fermentation broth characterizes the acidity level of the fermentation system; the nitrite concentration characterizes the nitrite content in the fermentation system, and this indicator is directly related to the safety of the pickled vegetables for consumption.

[0015] Specifically, an online pH sensor and an online nitrite detection probe are installed in the fermentation container for pickled vegetables. The online pH sensor continuously collects the pH value of the fermentation broth at preset sampling intervals and transmits the collected pH value to the data recording unit. The online nitrite detection probe collects the nitrite concentration value in the fermentation broth at the same preset sampling interval. The preset sampling interval is set according to the type of pickled vegetables, ranging from 0.5 hours to 2 hours. If online detection equipment cannot be installed, manual sampling is used. At each sampling time, a sample of the fermentation broth is extracted from the fermentation container using a sterile sampler, the pH value of the sample is measured using a pH meter, and the nitrite concentration value is measured using spectrophotometry according to national standards.

[0016] For example, 500 kg of root vegetables (radishes) were used as raw material and fermented using a salting process. An online pH sensor and an online nitrite detection probe were installed in the fermentation container, with a preset sampling interval of 1 hour. At the first sampling time, the online pH sensor recorded a pH of 6.2, and the online nitrite detection probe recorded a nitrite concentration of 1.2 mg / kg. At the 24th sampling time, the pH was 3.8, and the nitrite concentration was 28.5 mg / kg. At the 48th sampling time, the pH was 3.5, and the nitrite concentration was 4.2 mg / kg.

[0017] Secondly, the fermentation environmental parameters are collected, including at least fermentation temperature and fermentation salinity. Fermentation environmental parameters refer to the physicochemical conditions inside the fermentation vessel that can affect the metabolic activity of microorganisms and the fermentation rate. Specifically, fermentation temperature refers to the core temperature of the fermentation broth; fermentation salinity refers to the mass percentage of sodium chloride in the fermentation broth.

[0018] Specifically, temperature and salinity sensors are installed inside the fermentation vessel. The temperature sensor probe is immersed in the center of the fermentation broth, and the fermentation temperature is collected at preset sampling intervals and transmitted to the data recording unit. The salinity sensor measures the salinity value in the fermentation broth using either conductivity or refractive index methods, collecting fermentation salinity data at the same preset sampling intervals and transmitting the data to the data recording unit. If an online salinity sensor cannot be installed, manual sampling is used. A sample of the fermentation broth is drawn using a pipette, and the fermentation salinity is measured using a handheld refractometer or salinity meter.

[0019] For example, during the fermentation of this batch of 500 kg of radishes, both the temperature sensor and the salinity sensor collected data at a preset sampling interval of 1 hour. At the first sampling time, the temperature sensor recorded a fermentation temperature of 22°C, and the salinity sensor recorded a fermentation salinity of 8.5%. At the 24th sampling time, the fermentation temperature was 24°C, and the fermentation salinity was 8.3%. At the 48th sampling time, the fermentation temperature was 23°C, and the fermentation salinity was 8.2%.

[0020] Next, obtain the variety type and main ingredient category of the current batch of pickled vegetables, wherein the variety type includes at least pickled vegetables in soy sauce, pickled vegetables in salt, and pickled vegetables in brine, and the main ingredient category includes at least root vegetables and stem vegetables.

[0021] Among them, the variety type refers to the classification of pickled vegetable products according to processing technology and finished product form, including three types: pickled vegetables in soy sauce, pickled vegetables in salt, and pickled vegetables in brine. Pickled vegetables in soy sauce are pickled vegetable products made from vegetables as raw materials, which are salted or pickled and then soaked in soy sauce or soy sauce; pickled vegetables in salt are pickled vegetable products made from vegetables as raw materials, which are pickled only with a high concentration of salt; pickled vegetables in brine are pickled vegetable products made from vegetables as raw materials, which are soaked and fermented in a low concentration of brine.

[0022] The main ingredient category refers to the classification based on the botanical characteristics of the main raw materials of pickled vegetables, including root vegetables and stem vegetables. Root vegetables are those whose main edible part is the root or tuber of the plant; representative examples include radishes and pickled mustard greens. Stem vegetables are those whose main edible part is the stem of the plant; representative examples include cowpeas and green beans. Root vegetables have a relatively high nitrate content, while stem vegetables have a high fiber content and low water content; therefore, their fermentation rates differ under the same processing methods.

[0023] Specifically, before starting the fermentation process, the operator inputs the variety type and main ingredient category information of the current batch of pickled vegetables through a human-computer interaction interface. The variety type is selected from a preset list of variety types, which includes at least three options: pickled vegetables in soy sauce, pickled vegetables in salt, and pickled vegetables in brine. The main ingredient category is selected from a preset list of main ingredient categories, which includes at least two options: root vegetables and stem vegetables. After input, the data recording unit associates and stores the variety type and main ingredient category information with the fermentation data of the current batch. If the main ingredient of the current batch of pickled vegetables is a mixture of multiple vegetables, the main ingredient with the highest weight percentage is used as the basis for determining the main ingredient category.

[0024] For example, before starting the fermentation process of this batch of 500 kg of radishes, the operator inputs the following information through the human-machine interface: select salted vegetable as the variety type, select root vegetable as the main ingredient category, and fill in the specific name of the main ingredient as radish in the remarks column. The data recording unit records this information as the basic attribute of the current batch and stores it in association with the collected pH value, nitrite concentration value, fermentation temperature, and fermentation salinity data.

[0025] In this embodiment of the invention, the obtained pH value and nitrite concentration value provide raw data for subsequent calculation of pH change rate sequence and assessment of nitrite residual risk index; the obtained fermentation temperature and fermentation salinity provide benchmark values ​​for subsequent adjustment of environmental parameters of fermentation regulation agent; the obtained variety type and main ingredient category information enable the subsequent machine learning model to call matching historical data and model parameters according to different types of pickles, avoiding misjudgment caused by differences in fermentation characteristics of different types of pickles.

[0026] S200: Based on the pH values ​​at adjacent sampling times, calculate the pH change rate sequence and obtain the residual nitrite risk index based on machine learning analysis.

[0027] During the fermentation of pickled vegetables, the rate of pH change directly reflects the metabolic activity of acid-producing microorganisms, while the formation and degradation of nitrite are intricately coupled with the acid production rate. Relying solely on the current pH or nitrite concentration cannot accurately predict whether the final nitrite residue at the end of fermentation meets safety standards. When the acid production rate is high, the acidic environment accelerates the chemical degradation and biotransformation of nitrite, potentially resulting in a lower final residue. Conversely, when the acid production rate is slow, nitrite levels may remain high for an extended period, posing a risk of exceeding safety limits.

[0028] Therefore, it is necessary to calculate the pH change rate sequence based on the pH values ​​at adjacent sampling times, and to introduce machine learning methods to construct a nitrite risk assessment model that can integrate the time series characteristics of pH value, nitrite concentration value and pH change rate, so as to obtain a quantified nitrite residual risk index and provide input for subsequent coupling deviation calculation.

[0029] Step S200 in the method provided in this embodiment of the invention includes: Obtain the current pH value at the current sampling time and the historical pH value at the previous sampling time, and calculate the difference between the historical pH value and the current pH value; Divide the difference by the preset sampling interval to obtain the pH change rate, calculate and obtain multiple pH change rates, and integrate them to obtain a pH change rate sequence. A nitrite risk assessment model was constructed based on machine learning. The current pH value, the pH change rate sequence, and the nitrite concentration value are input into the nitrite risk assessment model to obtain the nitrite residual risk index.

[0030] First, obtain the current pH value at the current sampling time and the historical pH value at the previous sampling time, and calculate the difference between the historical pH value and the current pH value. The current sampling time refers to the time point when data acquisition is currently performed, denoted as the i-th sampling time. The previous sampling time refers to the sampling time point before the current sampling time, denoted as the (i-1)-th sampling time. The current pH value refers to the pH value of the fermentation broth collected at the current sampling time. The historical pH value refers to the pH value of the fermentation broth collected at the previous sampling time.

[0031] The difference between historical and current pH values ​​is used to characterize the direction and magnitude of pH changes within a sampling interval. The calculation formula is: Difference = Historical pH - Current pH. A positive difference indicates a decrease in pH and an increase in acidity in the fermentation system; a negative difference indicates an increase in pH and a decrease in acidity in the fermentation system.

[0032] Specifically, the current pH value at the current sampling moment and the historical pH value at the previous sampling moment are read from the data recording unit. If the current sampling moment is the first sampling moment (i=1), then there is no previous sampling moment, and the calculation of the pH change rate is skipped, waiting for the next sampling moment. If the current sampling moment is the second sampling moment or later, a subtraction operation is performed: the historical pH value is subtracted from the current pH value, and the result is used as the difference. This difference is stored in dimensionless numerical form.

[0033] For example, taking the fermentation process of 500 kg of radishes as an example, the preset sampling interval is 1 hour. At the 24th sampling time, the current pH value is read from the data recording unit as 3.8, and the historical pH value from the previous sampling time, i.e., the 23rd sampling time, is read as 3.9. The difference is 3.9 - 3.8 = 0.1. At the 25th sampling time, the current pH value is 3.7, and the historical pH value is 3.8, with a difference of 0.1. At the 48th sampling time, the current pH value is 3.5, and the historical pH value is 3.5, with a difference of 0. If at a certain sampling time the current pH value is 4.2 and the historical pH value is 4.0, then the difference is 4.0 - 4.2 = -0.2. The negative difference indicates that the pH value has increased, the acidity of the fermentation system has decreased, and there may have been contamination by putrefactive bacteria or inhibition of acid-producing bacteria activity. In this case, the subsequent coupling deviation calculation should be skipped, and the process should directly proceed to the early warning signal processing flow.

[0034] Next, the difference is divided by a preset sampling interval to obtain the pH change rate. Multiple pH change rates are calculated and integrated to obtain a pH change rate sequence. The preset sampling interval refers to the time interval between two adjacent samples, denoted as Δt. The pH change rate refers to the amount of pH change per unit time, calculated as: pH change rate = difference / preset sampling interval. When the difference is positive, the pH change rate is positive, indicating a decrease in pH; when the difference is negative, the pH change rate is negative, indicating an increase in pH. The pH change rate sequence is a sequence of all calculated pH change rates arranged chronologically from the second sampling time to the current sampling time.

[0035] Specifically, after each difference calculation, the difference is divided by a preset sampling interval Δt to obtain the pH change rate at the current sampling time. The calculated pH change rates are then stored sequentially in an array according to the sampling time order. The first element of the array corresponds to the pH change rate at the second sampling time, the second element corresponds to the pH change rate at the third sampling time, and so on. When a sequence of pH change rates is needed, all elements of the array are read directly.

[0036] For example, the preset sampling interval Δt is 1 hour. At the 24th sampling time, the difference is 0.1, and the rate of change of pH value is... At the 25th sampling time, the difference was 0.1, and the rate of change of pH was... At the 48th sampling time, the difference was 0, and the rate of change of pH was... From the second sampling time to the forty-eighth sampling time, a total of 47 pH change rates were obtained, as follows: , , ..., , ..., All the change rate values ​​are integrated in chronological order to form a pH change rate sequence.

[0037] Furthermore, a nitrite risk assessment model is constructed based on machine learning. This nitrite risk assessment model is a predictive model built using machine learning algorithms. Its inputs are the current pH value, the pH change rate sequence, and the current nitrite concentration, and its output is the predicted final nitrite residue level.

[0038] The construction of the nitrite risk assessment model includes: Collect historical fermentation records of pickled vegetables of the same variety and main ingredient category as the current pickled vegetable fermentation, and obtain the historical nitrite concentration, historical pH value, historical pH value change rate sequence and the final nitrite residue obtained at the end of fermentation at each sampling time in the historical fermentation records to form a historical fermentation nitrite dataset; A nitrite risk assessment model is constructed, which includes a feature fusion layer, a temporal coupling layer, and a prediction output layer. The nitrite risk assessment model is trained using the historical fermentation nitrite dataset until the deviation between the predicted final nitrite residue and the actual final nitrite residue meets the preset convergence condition, thus obtaining the completed nitrite risk assessment model.

[0039] First, historical fermentation records of pickled vegetables of the same variety and main ingredient category as the current pickled vegetable fermentation are collected, and the historical nitrite concentration, historical pH value, historical pH value change rate sequence, and final nitrite residue detected at the end of fermentation are obtained at each sampling time in the historical fermentation records to form a historical fermentation nitrite dataset.

[0040] Among them, historical fermentation records refer to all data recorded during past fermentation processes of pickled vegetables with the same variety and main ingredient category as the current batch. Historical nitrite concentration values ​​refer to the nitrite concentration values ​​collected at each sampling time during historical fermentation. Historical pH values ​​refer to the pH values ​​collected at each sampling time during historical fermentation. The historical pH change rate sequence refers to the sequence of pH change rates calculated from the pH values ​​at adjacent sampling times during historical fermentation, arranged in chronological order. The final nitrite residue refers to the final nitrite content obtained by sampling and testing the finished pickled vegetables when the historical fermentation process is determined to be the end point and fermentation is terminated.

[0041] Specifically, all historical batch records identical to the current batch of pickled vegetables in terms of variety and main ingredient category are retrieved from the fermentation production database. For each historical batch, all sampling time data from the start to the end of fermentation are extracted, including historical nitrite concentration and historical pH value at each sampling time. Simultaneously, a historical pH change rate sequence is calculated based on the historical pH value of the batch. The final nitrite residue at the end of fermentation is read from the production record of that batch. All the above data are organized by batch and sampling time to form a historical fermentation nitrite dataset. Each sample in this dataset corresponds to a sampling time and includes the historical nitrite concentration, historical pH value, historical pH change rate sequence up to that sampling time, and the final nitrite residue of the batch as a label.

[0042] For example, the current batch is pickled radish, a type of salted vegetable. Historical fermentation batches of all varieties of salted vegetables with root vegetables as the main ingredient, collected from the fermentation production database over the past three years, yielded 120 batches. For each batch, data from all sampling times were extracted. Taking one historical batch as an example, the historical nitrite concentration at sampling time 30 was 25.3 mg / kg, the historical pH was 3.9, the historical pH change rate sequence from sampling time 2 to 30 was [0.12, 0.11, 0.10, ..., 0.08], and the final nitrite residue at the end of fermentation was 3.2 mg / kg. This data was compiled into a single sample. All samples from all sampling times across all batches constitute the historical fermentation nitrite dataset, totaling approximately 6000 samples.

[0043] Secondly, a nitrite risk assessment model is constructed, comprising a feature fusion layer, a temporal coupling layer, and a prediction output layer. The feature fusion layer concatenates the input multidimensional original features into a two-dimensional fused feature vector. The temporal coupling layer takes the pH change rate sequence as external input, calculates the temporal coupling weights, and performs temporal weighting correction on the two-dimensional fused feature vector, outputting the temporally corrected coupled feature vector. The prediction output layer takes the coupled feature vector as input and outputs the predicted final nitrite residue level through nonlinear mapping.

[0044] The first layer is a feature fusion layer, which receives three inputs: the current pH value, the current nitrite concentration value, and a placeholder. The placeholder is used to receive feedback from subsequent temporal coupling layers, but in practice, the feature fusion layer only concatenates the current pH value and the current nitrite concentration value. The concatenation operation is as follows: the current pH value is used as one element, and the current nitrite concentration value is used as another element, together forming a two-dimensional fusion feature vector with a 1x2 grid. For example, the two-dimensional fusion feature vector is [3.5, 4.2].

[0045] The second layer is a temporal coupling layer that receives a two-dimensional fused feature vector from the feature fusion layer and a sequence of pH change rates from external input.

[0046] The timing coupling layer includes: Calculate the arithmetic mean of all pH change rates in the historical pH change rate sequence as the average pH change rate; Divide the historical pH change rate in the historical pH change rate sequence by the average pH change rate to obtain multiple time-series coupling weights. The two-dimensional fusion feature vector output by the feature fusion layer is weighted based on the temporal coupling weight to obtain the temporally corrected coupling feature vector.

[0047] First, the arithmetic mean of all pH change rates in the historical pH change rate sequence is calculated as the average pH change rate. The historical pH change rate sequence refers to the sequence of all pH change rates in the model input up to the current sampling time, arranged in chronological order. The average pH change rate is used to characterize the average rate of acid production from the start of fermentation to the current time.

[0048] Specifically, the pH change rate sequence is read, and the length N of the sequence is obtained. All pH change rate values ​​in the sequence are summed to obtain a total. The sum is then divided by N to obtain the arithmetic mean, which is the average pH change rate. For example, the average pH change rate is... .

[0049] Next, the historical pH change rate in the historical pH change rate sequence is divided by the average pH change rate to obtain multiple time-series coupling weights. Each time-series coupling weight is a coefficient corresponding to each sampling time point, used to characterize the degree of deviation of the instantaneous acid production rate from the average acid production rate at that time. When the time-series coupling weight is greater than 1, it indicates that the acid production rate at that time is higher than the average level; when the time-series coupling weight is less than 1, it indicates that the acid production rate at that time is lower than the average level; when the time-series coupling weight is equal to 1, it indicates that the acid production rate at that time is equal to the average level.

[0050] Specifically, for each value in the pH change rate sequence Obtain the average pH change rate Calculate the temporal coupling weights. .if If the value is 0, then all time-series coupling weights are set to 1. The calculated time-series coupling weights are arranged in the same order as the rate of change of pH value to form a time-series coupling weight sequence.

[0051] For example, the average rate of change of pH is For the rate of change of pH at time 2 Temporally coupled weights For the rate of change of pH at time 24 Temporally coupled weights For the rate of change of pH at time 48 Temporally coupled weights .

[0052] Next, the two-dimensional fused feature vector output by the feature fusion layer is weighted based on the temporal coupling weights to obtain the temporally corrected coupled feature vector. The two-dimensional fused feature vector is a 1x2 vector composed of the current pH value and the current nitrite concentration value, denoted as F=[pH,nitrite]. Each weight in the temporal coupling weight sequence... This corresponds to a specific historical moment. Weighted calculation refers to multiplying each element of the two-dimensional fused feature vector by its respective weight. Then, the weighted results at all times are averaged to obtain a new 1x2 vector, which is the time-corrected coupled feature vector.

[0053] Specifically, for each weight in the temporally coupled weight sequence Multiply the two-dimensional fused feature vector F by The weighted feature vector at time i is obtained. Add the N weighted eigenvectors element by element to obtain the sum vector. Dividing each element of the sum vector S by N yields the coupled feature vector. The coupled feature vector is the output after time-correction.

[0054] When the average pH change rate is greater than the baseline pH change rate, the time-series coupling weight is greater than 1, indicating active acid production during fermentation, accelerated nitrite degradation, and a downward revision of the final nitrite residue predicted by the nitrite risk assessment model. Conversely, when the average pH change rate is less than the baseline pH change rate, the time-series coupling weight is less than 1, indicating slow acid production during fermentation, delayed nitrite degradation, and a upward revision of the final nitrite residue predicted by the nitrite risk assessment model. The baseline pH change rate is a standard acid production rate statistically obtained from historical fermentation data of the same variety and main ingredient category. For salted root vegetables and pickles, the baseline value is typically [value missing]. .

[0055] For example, the two-dimensional fused feature vector F = [3.5, 4.2]. The temporal coupling weight sequence contains 47 values, some examples are as follows: weight 0.671 at time 2, weight 1.342 at time 24, and weight 0 at time 48. Calculate the weighted feature vector: time 2 ; 24th moment ; 48th moment Adding all 47 weighted eigenvectors together yields a sum vector S = [120, 150], where N = 47. The coupled eigenvectors are then... This coupled feature vector serves as the input to the prediction output layer, which is used to predict the final output.

[0056] The third layer is the prediction output layer, which is a multilayer perceptron neural network with an input dimension of 2. It contains two hidden layers: the first hidden layer has 128 neurons, and the second hidden layer has 64 neurons. Both layers use the Rectified Linear Unit (ReLU) activation function. The output layer contains one neuron and uses a linear activation function to output the predicted final nitrite residue level. For example, the prediction output layer receives the coupled feature vector. The predicted final nitrite residue level is 4.5 mg / kg.

[0057] Next, the historical fermentation nitrite dataset is used to train the nitrite risk assessment model until the deviation between the predicted final nitrite residue and the actual final nitrite residue meets a preset convergence condition, thus obtaining the completed nitrite risk assessment model. The actual final nitrite residue refers to the true value detected at the end of fermentation for the corresponding batch of the sample. Deviation refers to the difference between the predicted and actual values, using mean squared error as the deviation metric. The preset convergence condition means that training stops when the mean squared error is less than a preset threshold or when the mean squared error no longer decreases significantly in multiple consecutive training iterations.

[0058] Specifically, the historical fermentation nitrite dataset was divided into training and validation sets in an 8:2 ratio. For each sample in the dataset, the historical nitrite concentration, historical pH value, and the historical pH change rate sequence up to the sampling time were used as input to the model, and the final nitrite residue of the batch to which the sample belonged was used as the supervision label. Backpropagation and a stochastic gradient descent optimizer were used to iteratively optimize the model parameters. In each iteration, the mean squared error between the predicted final nitrite residue output by the model and the supervision label was calculated. The model was considered complete when the mean squared error on the validation set no longer decreased after 10 consecutive iterations, or when the mean squared error was less than a certain value. When the preset convergence condition is met, training is stopped, the current model parameters are saved, and the completed nitrite risk assessment model is obtained.

[0059] For example, a historical fermentation nitrite dataset containing 6000 samples was used to train the nitrite risk assessment model. 4800 samples were used as the training set, and 1200 samples as the validation set. After 200 iterations of training, the mean squared error on the validation set was... Less than the preset threshold Once the preset convergence condition is met, training stops. At this point, the trained nitrite risk assessment model is obtained.

[0060] Finally, the current pH value, the pH change rate sequence, and the nitrite concentration value are input into the nitrite risk assessment model to obtain the nitrite residual risk index. The nitrite residual risk index is a dimensionless value ranging from 0 to 1, used to characterize the risk level of the predicted final nitrite residue relative to the safety limit under the current fermentation state. The closer the nitrite residual risk index is to 1, the closer the predicted final nitrite residue is to or exceeds the safety limit, and the higher the nitrite residual risk; the closer it is to 0, the more likely the predicted final nitrite has decreased to a safe level.

[0061] Specifically, the constructed nitrite risk assessment model inputs three data points: the current pH value at the current sampling time, the pH change rate sequence up to the current sampling time, and the nitrite concentration value at the current sampling time. After calculation by the feature fusion layer, temporal coupling layer, and prediction output layer, the nitrite risk assessment model outputs a predicted final nitrite residue. The predicted final nitrite residue is converted into a nitrite residual risk index according to a preset mapping rule: nitrite residual risk index = predicted final nitrite residue / preset safety limit. The calculation result is limited to between 0 and 1: if the calculation result is greater than 1, the nitrite residual risk index is set to 1; if the calculation result is less than 0, the nitrite residual risk index is set to 0. The preset safety limit adopts the national standard limit of 20 mg / kg for nitrite in pickled vegetables.

[0062] For example, at the 48th sampling time, the current pH value is 3.5, the pH change rate sequence consists of 47 values ​​from time 2 to time 48, and the nitrite concentration is 4.2 mg / kg. Inputting this data into the constructed nitrite risk assessment model, the predicted final nitrite residue level is 3.8 mg / kg. The nitrite residue risk index = 3.8 / 20 = 0.19, indicating that the predicted final nitrite residue level is far below the safety limit, and the nitrite residue risk is low.

[0063] In this embodiment of the invention, a pH change rate sequence reflecting the acid production rate is obtained by dividing the pH difference between adjacent sampling times by the sampling interval, providing basic data for subsequent time-series analysis. By collecting historical fermentation data of the same variety and main ingredient, a nitrite risk assessment model is constructed, comprising a feature fusion layer, a temporal coupling layer, and a prediction output layer. The temporal coupling layer uses the pH change rate sequence to calculate temporal coupling weights and weights the two-dimensional fusion feature vector, enabling the model to dynamically adjust its prediction tendency for the final nitrite residue based on the rate of acid production. Real-time data from the current sampling time is input into the trained nitrite risk assessment model, which outputs a predicted nitrite residue level, yielding a nitrite residue risk index. This step provides crucial quantitative input for subsequent calculations of coupling deviation and generation of comprehensive fermentation process control signals.

[0064] S300: Based on the pH change rate sequence and the nitrite residual risk index, calculate the coupling deviation and generate a comprehensive control signal for the fermentation process. The comprehensive control signal for the fermentation process includes one of a termination signal, an extension signal, and an early warning signal.

[0065] First, it is determined whether the pH difference between the most recent sampling interval is negative, i.e., the difference between the historical pH value and the current pH value is less than 0. If the difference is negative, it indicates that the pH value is rising and fermentation is abnormal. In this case, a comprehensive control signal for the fermentation process is directly generated as an early warning signal, without calculating the coupling deviation. Only when the difference is greater than or equal to 0 will the coupling deviation calculation and signal determination process of S300 continue.

[0066] During the fermentation of pickled vegetables, there is a complex coupling relationship between the rate of acid production and the rates of nitrite formation and degradation. Relying solely on the rate of pH change or the residual nitrite risk index is insufficient to accurately determine whether the fermentation process has reached a safe endpoint. When acid production is active and the residual nitrite risk is low, it indicates a healthy and synchronized fermentation process. When acid production is active but the residual nitrite risk remains high, it indicates that the two processes are out of sync, requiring an extension of the fermentation time to allow for sufficient nitrite degradation. When acid production stagnates and nitrite levels have dropped to a safe level, it indicates that fermentation has reached its endpoint and can be terminated. When acid production stagnates but nitrite residue remains high, it indicates an abnormal fermentation, potentially due to contamination by putrefactive bacteria or an imbalance in fermentation conditions. Therefore, it is necessary to integrate information from both the pH change rate sequence and the residual nitrite risk index to calculate the coupling deviation, and based on this, generate termination signals, extension signals, or warning signals.

[0067] Step S300 in the method provided in this embodiment of the invention includes: Calculate the arithmetic mean of all pH change rates in the pH change rate sequence as the current average acid production rate; Obtain a baseline value for acid production rate, and divide the current average acid production rate by the baseline value for acid production rate to obtain the normalized acid production rate. The coupling deviation is obtained based on the ratio of the residual nitrite risk index and the normalized acid production rate. Obtain a preset first coupling threshold and a second coupling threshold, wherein the first coupling threshold is smaller than the second coupling threshold; When the coupling deviation is less than the first coupling threshold and the nitrite residual risk index is less than the preset safety threshold, it is determined that the fermentation has reached the end point, and the fermentation process comprehensive control signal is generated as a termination signal. When the coupling deviation is greater than or equal to the first coupling threshold and less than the second coupling threshold, the fermentation process is determined to be the nitrite peak passage period, and the comprehensive control signal of the fermentation process is generated as an extension signal. When the coupling deviation is greater than or equal to the second coupling threshold, it is determined that there is an abnormality in the fermentation process, and the comprehensive control signal of the fermentation process is generated as an early warning signal.

[0068] First, the arithmetic mean of all pH change rates in the pH change rate sequence is calculated as the current average acid production rate. The current average acid production rate characterizes the average rate of acid production from the start of fermentation to the current sampling time. The pH change rate sequence up to the current sampling time is read from the data recording unit, and the length N of the sequence is obtained. Each value in the sequence is summed to obtain a total value. The total value is divided by N to obtain the arithmetic mean, which is recorded as the current average acid production rate. For example, in the pH change rate sequence obtained by S200, the sum of 47 pH change rates is 3.29, and the current average acid production rate... .

[0069] Secondly, a baseline value for acid production rate is obtained. The current average acid production rate is divided by this baseline value to obtain the normalized acid production rate. The baseline value for acid production rate refers to a standard acid production rate statistically obtained based on historical fermentation data of the same variety and main ingredient category as the current batch of pickles, and is used as a reference value for normalization. Normalized acid production rate = current average acid production rate / baseline value for acid production rate. This is used to eliminate the inherent differences in acid production rates between different categories of pickles, making the calculation of coupling deviation comparable.

[0070] Specifically, based on the variety type and main ingredient category obtained from S100, the corresponding acid production rate benchmark value is read from a preset benchmark value comparison table. For salted root vegetables and pickled vegetables, the acid production rate benchmark value is taken as... For salted vegetables and pickled vegetables, the baseline value for acid production rate is taken as... For other variety types and main ingredient categories, the baseline value for acid production rate is determined by the average of historical data. The normalized acid production rate is obtained by dividing the current average acid production rate by the baseline value. For example, if the current batch is a salted vegetable root and stem variety, the baseline value for acid production rate is... The current average acid production rate is Normalized acid production rate = 0.07 / 0.08 = 0.875.

[0071] Next, the coupling deviation is obtained based on the ratio of the residual nitrite risk index and the normalized acid production rate. The coupling deviation is a dimensionless value used to comprehensively reflect the matching degree between the acid production rate and the nitrite degradation rate during fermentation. The smaller the coupling deviation, the better the synchronicity between the acid production rate and the nitrite degradation rate; the larger the coupling deviation, the more severe the deviation between the two processes. To prevent the denominator from being 0 when the normalized acid production rate equals 0, a minimum value is added to the denominator. The minimum value is 0.001. The formula for calculating the coupling deviation is: Coupling Deviation = Residual Nitrite Risk Index / (Normalized Acid Production Rate + Minimum Value). For example, given that the residual nitrite risk index is 0.19 and the normalized acid production rate is 0.875, the coupling deviation is... .

[0072] Furthermore, a preset first coupling threshold and a preset second coupling threshold are obtained, wherein the first coupling threshold is smaller than the second coupling threshold. The first and second coupling thresholds are two preset thresholds used to divide the numerical range of coupling deviation. The first coupling threshold is used to distinguish between the termination state and the extension state, and the second coupling threshold is used to distinguish between the extension state and the warning state. Based on historical fermentation data of the same variety and main ingredient category, for example, the first coupling threshold is set to 0.5, and the second coupling threshold is set to 1.2.

[0073] First, when the coupling deviation is less than the first coupling threshold and the residual nitrite risk index is less than the preset safety threshold, fermentation is determined to have reached its endpoint, and a comprehensive control signal for the fermentation process is generated as a termination signal. The preset safety threshold refers to the safety boundary value of the residual nitrite risk index, which is 0.5. When the residual nitrite risk index is less than 0.5, it indicates that the predicted final residual nitrite content is less than 10 mg / kg, i.e., 50% of the 20 mg / kg safety limit, providing sufficient safety margin. The termination signal indicates that the current fermentation process has reached its safe endpoint and fermentation should be terminated immediately.

[0074] Specifically, the calculated coupling deviation is compared with a first coupling threshold of 0.5. The residual nitrite risk index is compared with a preset safety threshold of 0.5. If the coupling deviation is less than the first coupling threshold and the residual nitrite risk index is less than 0.5, both conditions are met, and fermentation is determined to have reached its endpoint. A comprehensive control signal for the fermentation process is generated, and the value of this signal is set as the termination signal. For example, if the coupling deviation is 0.219, which is less than 0.5, and the residual nitrite risk index is 0.19, which is less than 0.5, both conditions are met, fermentation is determined to have reached its endpoint, and a termination signal is generated.

[0075] Secondly, when the coupling deviation is greater than or equal to the first coupling threshold and less than the second coupling threshold, the fermentation process is determined to be in the nitrite peak passage period, and the comprehensive control signal for the fermentation process is generated as an extended signal. The nitrite peak passage period refers to the time stage during fermentation when the nitrite peak has appeared and begun to decrease, but has not yet dropped to a safe level. The extended signal indicates that the current fermentation has not yet reached the safe endpoint and needs to continue fermentation, with the next sampling cycle to make another judgment.

[0076] Specifically, the coupling deviation is compared with a first coupling threshold and a second coupling threshold. If the coupling deviation is greater than or equal to the first coupling threshold and less than the second coupling threshold, the current fermentation process is determined to be in the nitrite peak passage period. A comprehensive control signal for the fermentation process is generated, and the value of this signal is set as an extended signal. For example, if the coupling deviation at a certain sampling time is 0.8, and the coupling deviation is greater than or equal to 0.5 and less than 1.2, it is determined to be in the nitrite peak passage period, and an extended signal is generated.

[0077] Furthermore, when the coupling deviation is greater than or equal to the second coupling threshold, an anomaly is determined in the fermentation process, and a comprehensive fermentation process control signal is generated as an early warning signal. The early warning signal indicates that the current fermentation process is in an abnormal state, requiring manual intervention or detailed testing. A typical manifestation of this abnormal state is a stagnant acid production rate but still high nitrite residue, which may be caused by putrefactive bacteria contamination, insufficient salinity, or abnormal temperature.

[0078] Specifically, the coupling deviation is compared with a second coupling threshold. If the coupling deviation is greater than or equal to the second coupling threshold, an abnormality in the fermentation process is determined. A comprehensive control signal for the fermentation process is generated, and the value of this signal is set as an early warning signal. For example, if the coupling deviation at a certain sampling time is 1.5, and the coupling deviation is greater than or equal to 1.2, an abnormality in fermentation is determined, and an early warning signal is generated.

[0079] In this embodiment of the invention, a quantitative assessment of the coupling matching degree between the acid production rate and the nitrite degradation rate during the fermentation process of pickled vegetables is achieved, and a clear comprehensive control signal is generated accordingly. By calculating the current average acid production rate, a benchmark value for the acid production rate is introduced for normalization, eliminating the inherent differences between different types of pickled vegetables. The coupling deviation is calculated by the ratio of the nitrite residual risk index to the normalized acid production rate. This ratio can sensitively reflect the synchronicity of the two processes: the deviation is small when acid production is active and the nitrite risk is low; the deviation is moderate when acid production is active but the nitrite risk is high; the deviation is moderate when acid production is stagnant and the nitrite level is safe; and the deviation is extremely large when acid production is stagnant and the nitrite level is still high. Based on the preset first and second coupling thresholds, the coupling deviation is divided into three intervals, corresponding to the termination signal, the extension signal, and the warning signal, respectively. The comprehensive control signal output in this step provides clear instruction input for the adaptive control of the subsequent fermentation control agent.

[0080] S400: Input the comprehensive control signal of the fermentation process and the fermentation environment parameters into the fermentation control agent to adaptively control the fermentation termination time and fermentation environment parameters.

[0081] Upon generating a termination signal, extension signal, or warning signal, corresponding regulatory actions need to be executed based on the signal type. A termination signal immediately ends fermentation, an extension signal continues fermentation without changing environmental parameters, and a warning signal requires adjustments to the fermentation environment parameters to correct abnormal conditions. Different varieties and main ingredient types of pickles have different optimal fermentation temperatures and salinities, and the impact of temperature and salinity deviations on the fermentation process varies. Therefore, a fermentation regulation agent needs to be constructed. This agent can adaptively output the fermentation termination timing and recommended fermentation environment parameters based on the input fermentation process, integrated regulation signals, and current fermentation environment parameters, thereby achieving closed-loop control of the fermentation process.

[0082] Step S400 in the method provided in this embodiment of the invention includes: The fermentation process comprehensive control signal and the fermentation environment parameters are input into the fermentation control agent to obtain the fermentation termination time and recommended fermentation environment parameters. When the fermentation process comprehensive control signal is a termination signal, the fermentation control agent outputs the fermentation termination time as the current time, the fermentation environment parameters as not adjusted, and outputs a fermentation completion command. When the comprehensive control signal for the fermentation process is an extended signal, the fermentation control agent outputs the fermentation termination time as the next sampling cycle, the fermentation environment parameters are not adjusted, and outputs a fermentation continue command. When the comprehensive control signal of the fermentation process is an early warning signal, the system outputs an update on the fermentation termination time and updates the fermentation environment parameters, and generates a fermentation early warning command.

[0083] The construction of the fermentation regulation agent includes: Collect fermentation control records of multiple groups of samples of pickled vegetables with the same variety and main ingredient as the current batch of pickled vegetables. Each group of records includes the current average acid production rate, residual nitrite risk index, fermentation environmental parameters, pH change rate sequence, as well as the effective fermentation termination time and recommended fermentation environmental parameters determined by manual judgment. A fermentation regulation intelligent agent is constructed based on machine learning, wherein the fermentation regulation intelligent agent includes a signal response layer and a parameter adjustment layer; The signal response layer and parameter adjustment layer of the fermentation regulation agent are synchronously trained using the fermentation regulation control records of the sample pickled vegetables. The classification deviation between the fermentation regulation action type output by the signal response layer and the fermentation regulation action deemed effective by humans in the sample data is used as the first loss component. The regression deviation between the environmental parameter adjustment amount output by the parameter adjustment layer and the environmental parameter adjustment amount actually executed in the sample data is used as the second loss component. The sum of the first loss component and the second loss component is used as the total loss function. The training is repeated until the total loss function converges to obtain the constructed fermentation regulation agent.

[0084] When the fermentation regulation action is to adjust environmental parameters, the sample data also includes the actual amount of environmental parameter adjustment performed, wherein the amount of environmental parameter adjustment includes temperature adjustment and salinity adjustment.

[0085] First, fermentation control records were collected from multiple sets of sample pickles of the same variety and main ingredient category as the current batch. Each set of records included the current average acid production rate, residual nitrite risk index, fermentation environmental parameters, pH change rate sequence, and the fermentation termination timing determined by manual analysis, along with recommended fermentation environmental parameters. These sample pickle fermentation control records refer to complete data recorded during historical production processes for pickles of the same variety and main ingredient category as the current batch, based on effective control decisions made by experienced operators or process engineers according to the fermentation status.

[0086] Specifically, all historical batches with the same variety and main ingredient category as the current batch of pickled vegetables were retrieved from the fermentation production database. For each sampling time within each historical batch, if the operator made an effective control decision at that sampling time, resulting in good subsequent fermentation results and qualified product testing, the current average acid production rate, residual nitrite risk index, fermentation environmental parameters, and pH change rate sequence at that sampling time were used as input samples. The fermentation termination timing and recommended fermentation environmental parameters derived from this decision were used as output labels, forming a complete sample record. At least 2000 sample records were collected.

[0087] For example, the current batch is a salted root vegetable. Fermentation records of all salted root vegetables (radishes) from the past three years were retrieved from the database, yielding 150 batches and approximately 6000 sampling times. From these, sampling times where effective control decisions were made by operators and subsequent product quality was satisfactory were selected, resulting in 2500 sample records. One of these records shows: current average acid production rate 0.09. The residual nitrite risk index is 0.65, the fermentation temperature is 26℃, the fermentation salinity is 8.0%, and the effective fermentation termination time determined by manual judgment is 8 hours after the current time. The recommended fermentation environment parameters are a 2℃ decrease in temperature and a 0.5% increase in salinity.

[0088] When the fermentation regulation action involves adjusting environmental parameters, the sample data also includes the actual amount of environmental parameter adjustment performed, which includes temperature adjustment and salinity adjustment. When the fermentation regulation agent determines that environmental parameters need to be adjusted, i.e., when it receives an early warning signal, the parameter adjustment layer calculates the adjustment amount according to the following rules: First, obtain the optimal fermentation temperature and optimal fermentation salinity for the current batch of pickled vegetables, based on the variety and main ingredient category. Optimal fermentation temperature refers to the temperature value that yielded the best fermentation results for the same variety and main ingredient category of pickled vegetables in historical data; optimal fermentation salinity refers to the salinity value that yielded the best fermentation results for the same variety and main ingredient category of pickled vegetables in historical data.

[0089] Secondly, calculate the absolute difference between the current fermentation temperature and the optimal fermentation temperature, and adjust the fermentation temperature towards the optimal fermentation temperature. The adjustment range is proportional to the absolute difference, and the proportionality coefficient is 0.5, that is, the maximum adjustment range in a single instance shall not exceed half of the absolute difference, so as to prevent sudden temperature changes from affecting microbial activity.

[0090] Next, calculate the absolute difference between the current fermentation salinity and the optimal fermentation salinity, and adjust the fermentation salinity towards the optimal fermentation salinity. The adjustment range is proportional to the absolute difference, and the proportionality coefficient is 0.3, that is, the maximum adjustment range in a single instance shall not exceed 30% of the absolute difference, so as to prevent osmotic pressure shock caused by sudden changes in salinity.

[0091] For example, the current fermentation temperature is 28℃, the optimal fermentation temperature is 23℃, and the absolute difference is 5℃. The temperature adjustment range = 5 × 0.5 = 2.5℃, adjusting downwards by 2.5℃, resulting in a temperature of 25.5℃. The current fermentation salinity is 6.5%, the optimal salinity is 8.5%, and the absolute difference is 2%. The salinity adjustment range = 2 × 0.3 = 0.6%, adjusting upwards by 0.6%, resulting in a salinity of 7.1%. If the abnormal state is not eliminated after one adjustment, adjustments will continue at subsequent sampling times until the optimal value is reached.

[0092] Secondly, based on machine learning, a fermentation regulation agent is constructed, comprising a signal response layer and a parameter adjustment layer. The signal response layer is a classification model used to output the type of fermentation regulation action based on the current average acid production rate, the residual nitrite risk index, fermentation environmental parameters, and the pH change rate sequence. The fermentation regulation action types include three categories: termination action, extension action, and environmental parameter adjustment action. The parameter adjustment layer is a regression model used to output specific temperature and salinity adjustment amounts when the signal response layer determines that an environmental parameter adjustment action is required.

[0093] Specifically, a multi-task learning neural network model is constructed. This model shares a bottom-level feature extraction network, and the upper layers are divided into two branches. The first branch is a signal response layer, which adopts a classification network structure. The input is the shared features, and the output is a 3D vector. After passing through the Softmax activation function, the probability distribution of the three categories is obtained. The category with the highest probability is the fermentation regulation action type. The second branch is a parameter adjustment layer, which adopts a regression network structure. The input is the shared features, and the output is a 2D vector, representing the temperature regulation amount and the salinity regulation amount, respectively. The parameter adjustment layer is only activated when the action output by the signal response layer is to adjust environmental parameters. The shared bottom-level feature extraction network contains two fully connected hidden layers. The first hidden layer has 256 neurons with the ReLU activation function; the second hidden layer has 128 neurons with the ReLU activation function.

[0094] Next, the signal response layer and parameter adjustment layer of the fermentation regulation agent are synchronously trained using the fermentation regulation control records of the sample pickles. The classification deviation between the fermentation regulation action type output by the signal response layer and the fermentation regulation action deemed effective by humans in the sample data is used as the first loss component. The regression deviation between the environmental parameter adjustment amount output by the parameter adjustment layer and the environmental parameter adjustment amount actually executed in the sample data is used as the second loss component. The sum of the first loss component and the second loss component is used as the total loss function. The training is repeated until the total loss function converges to obtain the constructed fermentation regulation agent.

[0095] Classification bias refers to the difference between the control action type predicted by the signal response layer and the control action type manually determined to be effective in the sample labels, measured by the cross-entropy loss function. Regression bias refers to the difference between the environmental parameter adjustment amount predicted by the parameter adjustment layer and the environmental parameter adjustment amount actually executed in the sample labels, measured by the mean squared error loss function. The total loss function is the sum of the two loss components. Convergence means that the value of the total loss function no longer decreases significantly in consecutive training iterations.

[0096] Specifically, the fermentation regulation records of the sample pickled vegetables were divided into a training set and a validation set in a ratio of 8:2. For each sample, it was input into the fermentation regulation agent, and the cross-entropy loss between the output of the signal response layer and the regulation action type in the sample label was calculated as the first loss component L1. If the regulation action type in the sample label was adjusting environmental parameters, the mean square error between the output of the parameter adjustment layer and the temperature and salinity adjustment amounts in the sample label was additionally calculated as the second loss component L2; if the regulation action type in the sample label was not adjusting environmental parameters, the second loss component L2 was set to 0. The total loss function L = L1 + L2. The Adam optimizer was used to iteratively optimize the model parameters. When the total loss function on the validation set decreased by less than 0.001 in 20 consecutive iterations, the convergence condition was met, training was stopped, the model parameters were saved, and the constructed fermentation regulation agent was obtained.

[0097] For example, 2500 sample records are used, with 2000 as the training set and 500 as the validation set. For a sample, if the sample label is a termination action, the predicted probability distribution output by the signal response layer is [0.85, 0.10, 0.05], and the cross-entropy loss L1 is calculated. Since the label is not an environmental parameter adjustment, L2 is set to 0. For another sample, if the sample label is an environmental parameter adjustment action, and the actual temperature adjustment is -2.0℃ and the actual salinity adjustment is 0.5%, the probability distribution output by the signal response layer is [0.05, 0.10, 0.85], and the parameter adjustment layer outputs [-1.9, 0.45], then L1 and L2 are calculated, and the total loss = L1 + L2. After 300 iterations of training, the total loss function on the validation set decreases by less than 0.001 in 20 consecutive iterations, indicating convergence, and the constructed fermentation regulation agent is obtained.

[0098] Based on this, the comprehensive control signal of the fermentation process and the fermentation environment parameters are input into the fermentation control agent to obtain the fermentation termination timing and recommended fermentation environment parameters. The comprehensive control signal of the fermentation process generated in S300 and the current fermentation environment parameters collected in S100 are used as inputs and transmitted to the constructed fermentation control agent. The fermentation control agent outputs the fermentation termination timing and recommended fermentation environment parameters based on the mapping relationship obtained through internal training.

[0099] Specifically, when the comprehensive control signal for the fermentation process is a termination signal, the fermentation control agent outputs the fermentation termination time as the current moment, sets the fermentation environment parameters to "no adjustment," and outputs a fermentation completion command. "Current moment" refers to the time point at which this judgment is executed. "No adjustment" means maintaining the current fermentation temperature and salinity unchanged. The fermentation completion command is a status flag used to notify the production execution system to stop fermentation and perform the discharge operation.

[0100] Specifically, after the fermentation control agent recognizes the input signal as a termination signal, it directly outputs the termination timing as the current moment, and sets the fermentation environment parameter adjustment to zero, i.e., temperature adjustment to 0℃ and salinity adjustment to 0%. Simultaneously, it generates a fermentation completion command. This command is sent to the control valves and actuators of the fermentation vessel to shut down the heating or cooling system, stop stirring, and open the discharge port.

[0101] Specifically, when the comprehensive control signal for the fermentation process is an extended signal, the fermentation control agent outputs the fermentation termination time as the next sampling period, the fermentation environment parameters are not adjusted, and outputs a fermentation continue command. The next sampling period refers to the next sampling time after a preset sampling interval from the current sampling time. The fermentation continue command is a status flag used to notify the production execution system to maintain the current fermentation conditions and continue fermentation.

[0102] Specifically, after the fermentation control agent recognizes the input signal as an extended signal, the output termination time is the next sampling period, that is, the current sampling time plus the preset sampling interval. The output fermentation environment parameter adjustment is zero, and a fermentation continue command is generated. This command is sent to the control system of the fermentation vessel to maintain the current temperature and salinity settings unchanged and continue operation until the next sampling time.

[0103] For example, if the comprehensive control signal for the fermentation process at a certain sampling time is an extended signal, with a preset sampling interval of 1 hour, and the current sampling time is the 30th sampling time, the fermentation control agent outputs: the fermentation termination time is the 31st sampling time; the fermentation environmental parameters are not adjusted, maintaining the current temperature of 24°C and salinity of 8.3%, and outputs a fermentation continuation command. After receiving this command, the production execution system keeps the temperature control system and the stirring system running for 1 hour, and then makes another judgment at the 31st sampling time.

[0104] Specifically, when the comprehensive control signal for the fermentation process is an early warning signal, the system outputs an updated fermentation termination timing and updated fermentation environmental parameters, and generates a fermentation early warning command. Updating the fermentation termination timing means postponing the preset fermentation termination time by one adjustment cycle, which is dynamically calculated by the agent based on the degree of anomaly. Updating the fermentation environmental parameters refers to adjusting the target values ​​for fermentation temperature and salinity. The fermentation early warning command is a status flag used to notify the production execution system that an anomaly has occurred in the fermentation process, requiring adjustment of environmental parameters and enhanced monitoring.

[0105] Specifically, after the fermentation control agent identifies the input signal as an early warning signal, it first calculates the temperature adjustment amount based on the deviation between the current fermentation temperature and the optimal fermentation temperature, and calculates the salinity adjustment amount based on the deviation between the current fermentation salinity and the optimal fermentation salinity, outputting the updated fermentation environmental parameters. Simultaneously, it postpones the fermentation termination time by a preset extension period, such as 6 hours or 12 hours, outputting the updated fermentation termination time. Finally, it generates a fermentation early warning command, which, along with the adjusted environmental parameters, is sent to the production execution system.

[0106] For example, if the comprehensive control signal for the fermentation process at a certain sampling moment is an early warning signal, the current fermentation temperature is 28℃, the optimal fermentation temperature is 25℃, the current fermentation salinity is 7%, and the optimal fermentation salinity is 8.5%, the fermentation control agent outputs: a temperature reduction of 3℃, a salinity increase of 1.5%, and updates the fermentation termination time by postponing the current moment by 12 hours, and also outputs a fermentation early warning command. Upon receiving this command, the production execution system activates the cooling system to lower the temperature to 25℃, simultaneously adds salt to the fermenter to bring the salinity to 8.5%, and issues an early warning notification on the display screen, informing the operators to monitor the fermentation status.

[0107] In this embodiment of the invention, the response to comprehensive control signals of the fermentation process and the adaptive adjustment of fermentation environmental parameters are realized. Based on three different inputs—termination signal, extension signal, and warning signal—corresponding fermentation termination timing and recommended fermentation environmental parameters are output. The termination signal triggers immediate termination and fermentation completion commands, the extension signal triggers continued fermentation commands, and the warning signal triggers environmental parameter adjustment and warning commands. By collecting historical fermentation control records of the same variety and main ingredient category, a fermentation control agent containing a signal response layer and a parameter adjustment layer is constructed. This agent can automatically identify the type of control action to be executed based on the current average acid production rate, nitrite residual risk index, fermentation environmental parameters, and pH change rate sequence, and output specific temperature and salinity adjustment amounts when necessary. Combined with the deviation ratio adjustment rules of the optimal fermentation temperature and salinity, this step ensures the stability and effectiveness of environmental parameter adjustment, ultimately achieving adaptive closed-loop control of the pickle fermentation process, reducing the frequency of manual intervention, and improving the consistency and safety of fermentation.

[0108] Through the specific implementation methods described above, the embodiments of the present invention achieve the following technical effects: This invention provides a machine learning-based method and system for low-carbon automated production control of pickled vegetables. First, real-time fermentation state parameters, environmental parameters, and the type of pickled vegetable and its main ingredient are collected. Second, a change rate sequence is calculated based on adjacent pH values, and the residual nitrite risk index is quantified using a nitrite risk assessment model. Third, the normalized acid production rate is calculated and fused with the risk index to obtain the coupling deviation. Based on the coupling threshold, the fermentation process is divided into three states: termination, extension, and warning, solving the problem of difficulty in synchronizing the acid production rate and nitrite risk. Finally, the control signals and environmental parameters are input into a fermentation control agent, which adaptively outputs the termination timing and environmental parameter adjustment amount. This invention avoids excessive fermentation energy consumption or safety hazards caused by misjudgment of a single indicator, improves the accuracy of fermentation endpoint judgment and production consistency, reduces carbon emissions and human intervention, and achieves low-carbon automated control.

[0109] Example 2, as Figure 3 As shown, this invention provides a machine learning-based low-carbon automated production control system for pickled vegetables, the system comprising: The parameter category acquisition module 11 is used to acquire real-time fermentation status parameters and fermentation environment parameters during the fermentation process of pickled vegetables, and to acquire the variety type and main ingredient category of pickled vegetables; The pH rate risk assessment module 12 is used to calculate and obtain the pH change rate sequence based on the pH value at adjacent sampling times, and obtain the residual nitrite risk index based on machine learning analysis. The coupling signal generation module 13 is used to calculate the coupling deviation based on the pH change rate sequence and the nitrite residual risk index, and generate a comprehensive control signal for the fermentation process, wherein the comprehensive control signal for the fermentation process includes one of a termination signal, an extension signal and an early warning signal. The adaptive control module 14 is used to input the comprehensive control signal of the fermentation process and the fermentation environment parameters into the fermentation control agent to adaptively control the fermentation termination time and fermentation environment parameters.

[0110] In one embodiment, the parameter category acquisition module 11 is further configured to: The real-time fermentation status parameters during the fermentation process of pickled vegetables are obtained, wherein the real-time fermentation status parameters include at least the pH value and nitrite concentration value of the fermentation liquid; The fermentation environment parameters are collected and acquired, wherein the fermentation environment parameters include at least fermentation temperature and fermentation salinity; Obtain the variety type and main ingredient category of the current batch of pickled vegetables, wherein the variety type includes at least pickled vegetables in soy sauce, pickled vegetables in salt, and pickled vegetables in brine, and the main ingredient category includes at least root vegetables and stem vegetables.

[0111] In one embodiment, the pH rate risk assessment module 12 is also used for: Obtain the current pH value at the current sampling time and the historical pH value at the previous sampling time, and calculate the difference between the historical pH value and the current pH value; Divide the difference by the preset sampling interval to obtain the pH change rate, calculate and obtain multiple pH change rates, and integrate them to obtain a pH change rate sequence. A nitrite risk assessment model was constructed based on machine learning. The current pH value, the pH change rate sequence, and the nitrite concentration value are input into the nitrite risk assessment model to obtain the nitrite residual risk index.

[0112] The construction of the nitrite risk assessment model includes: Collect historical fermentation records of pickled vegetables of the same variety and main ingredient category as the current pickled vegetable fermentation, and obtain the historical nitrite concentration, historical pH value, historical pH value change rate sequence and the final nitrite residue obtained at the end of fermentation at each sampling time in the historical fermentation records to form a historical fermentation nitrite dataset; A nitrite risk assessment model is constructed, which includes a feature fusion layer, a temporal coupling layer, and a prediction output layer. The nitrite risk assessment model is trained using the historical fermentation nitrite dataset until the deviation between the predicted final nitrite residue and the actual final nitrite residue meets the preset convergence condition, thus obtaining the completed nitrite risk assessment model.

[0113] The timing coupling layer includes: Calculate the arithmetic mean of all pH change rates in the historical pH change rate sequence as the average pH change rate; Divide the historical pH change rate in the historical pH change rate sequence by the average pH change rate to obtain multiple time-series coupling weights. The two-dimensional fusion feature vector output by the feature fusion layer is weighted based on the temporal coupling weight to obtain the temporally corrected coupling feature vector.

[0114] In one embodiment, the coupling signal generation module 13 is further configured to: Calculate the arithmetic mean of all pH change rates in the pH change rate sequence as the current average acid production rate; Obtain a baseline value for acid production rate, and divide the current average acid production rate by the baseline value for acid production rate to obtain the normalized acid production rate. The coupling deviation is obtained based on the ratio of the residual nitrite risk index and the normalized acid production rate. Obtain a preset first coupling threshold and a second coupling threshold, wherein the first coupling threshold is smaller than the second coupling threshold; When the coupling deviation is less than the first coupling threshold and the nitrite residual risk index is less than the preset safety threshold, it is determined that the fermentation has reached the end point, and the fermentation process comprehensive control signal is generated as a termination signal. When the coupling deviation is greater than or equal to the first coupling threshold and less than the second coupling threshold, the fermentation process is determined to be the nitrite peak passage period, and the comprehensive control signal of the fermentation process is generated as an extension signal. When the coupling deviation is greater than or equal to the second coupling threshold, it is determined that there is an abnormality in the fermentation process, and the comprehensive control signal of the fermentation process is generated as an early warning signal.

[0115] In one embodiment, the adaptive control module 14 is further configured to: The fermentation process comprehensive control signal and the fermentation environment parameters are input into the fermentation control agent to obtain the fermentation termination time and recommended fermentation environment parameters. When the fermentation process comprehensive control signal is a termination signal, the fermentation control agent outputs the fermentation termination time as the current time, the fermentation environment parameters as not adjusted, and outputs a fermentation completion command. When the comprehensive control signal for the fermentation process is an extended signal, the fermentation control agent outputs the fermentation termination time as the next sampling cycle, the fermentation environment parameters are not adjusted, and outputs a fermentation continue command. When the comprehensive control signal of the fermentation process is an early warning signal, the system outputs an update on the fermentation termination time and updates the fermentation environment parameters, and generates a fermentation early warning command.

[0116] The construction of the fermentation regulation agent includes: Collect fermentation control records of multiple groups of samples of pickled vegetables with the same variety and main ingredient as the current batch of pickled vegetables. Each group of records includes the current average acid production rate, residual nitrite risk index, fermentation environmental parameters, pH change rate sequence, as well as the effective fermentation termination time and recommended fermentation environmental parameters determined by manual judgment. A fermentation regulation intelligent agent is constructed based on machine learning, wherein the fermentation regulation intelligent agent includes a signal response layer and a parameter adjustment layer; The signal response layer and parameter adjustment layer of the fermentation regulation agent are synchronously trained using the fermentation regulation control records of the sample pickled vegetables. The classification deviation between the fermentation regulation action type output by the signal response layer and the fermentation regulation action deemed effective by humans in the sample data is used as the first loss component. The regression deviation between the environmental parameter adjustment amount output by the parameter adjustment layer and the environmental parameter adjustment amount actually executed in the sample data is used as the second loss component. The sum of the first loss component and the second loss component is used as the total loss function. The training is repeated until the total loss function converges to obtain the constructed fermentation regulation agent.

[0117] When the fermentation regulation action is to adjust environmental parameters, the sample data also includes the actual amount of environmental parameter adjustment performed, wherein the amount of environmental parameter adjustment includes temperature adjustment and salinity adjustment.

[0118] It should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A machine learning-based method for low-carbon automated production control of pickled vegetables, characterized in that, include: The system acquires real-time fermentation status parameters and fermentation environment parameters during the fermentation process of pickled vegetables, and obtains the variety type and main ingredient category of the pickled vegetables. Based on the pH values ​​at adjacent sampling times, a sequence of pH change rates is calculated, and a residual nitrite risk index is obtained based on machine learning analysis. Based on the pH change rate sequence and the nitrite residual risk index, the coupling deviation is calculated to generate a comprehensive control signal for the fermentation process. The comprehensive control signal for the fermentation process includes one of a termination signal, an extension signal, and an early warning signal. The fermentation process comprehensive control signal and the fermentation environment parameters are input into the fermentation control agent to adaptively control the fermentation termination time and fermentation environment parameters.

2. The machine learning-based automated production control method for low-carbon pickled vegetables according to claim 1, characterized in that, The process of acquiring real-time fermentation status parameters and fermentation environment parameters during the fermentation of pickled vegetables, and acquiring the variety type and main ingredient category of the pickled vegetables, includes: The real-time fermentation status parameters during the fermentation process of pickled vegetables are obtained, wherein the real-time fermentation status parameters include at least the pH value and nitrite concentration value of the fermentation liquid; The fermentation environment parameters are collected and acquired, wherein the fermentation environment parameters include at least fermentation temperature and fermentation salinity; Obtain the variety type and main ingredient category of the current batch of pickled vegetables, wherein the variety type includes at least pickled vegetables in soy sauce, pickled vegetables in salt, and pickled vegetables in brine, and the main ingredient category includes at least root vegetables and stem vegetables.

3. The machine learning-based automated production control method for low-carbon pickled vegetables according to claim 1, characterized in that, The process involves calculating a pH change rate sequence based on pH values ​​at adjacent sampling times, and obtaining a residual nitrite risk index based on machine learning analysis, including: Obtain the current pH value at the current sampling time and the historical pH value at the previous sampling time, and calculate the difference between the historical pH value and the current pH value; Divide the difference by the preset sampling interval to obtain the pH change rate, calculate and obtain multiple pH change rates, and integrate them to obtain a pH change rate sequence. A nitrite risk assessment model was constructed based on machine learning. The current pH value, the pH change rate sequence, and the nitrite concentration value are input into the nitrite risk assessment model to obtain the nitrite residual risk index.

4. The machine learning-based automated production control method for low-carbon pickled vegetables according to claim 3, characterized in that, The construction of the nitrite risk assessment model includes: Collect historical fermentation records of pickled vegetables of the same variety and main ingredient category as the current pickled vegetable fermentation, and obtain the historical nitrite concentration, historical pH value, historical pH value change rate sequence and the final nitrite residue obtained at the end of fermentation at each sampling time in the historical fermentation records to form a historical fermentation nitrite dataset; A nitrite risk assessment model is constructed, which includes a feature fusion layer, a temporal coupling layer, and a prediction output layer. The nitrite risk assessment model is trained using the historical fermentation nitrite dataset until the deviation between the predicted final nitrite residue and the actual final nitrite residue meets the preset convergence condition, thus obtaining the completed nitrite risk assessment model.

5. The machine learning-based automated production control method for low-carbon pickled vegetables according to claim 4, characterized in that, The timing coupling layer includes: Calculate the arithmetic mean of all pH change rates in the historical pH change rate sequence as the average pH change rate; Divide the historical pH change rate in the historical pH change rate sequence by the average pH change rate to obtain multiple time-series coupling weights. The two-dimensional fusion feature vector output by the feature fusion layer is weighted based on the temporal coupling weight to obtain the temporally corrected coupling feature vector.

6. The machine learning-based automated production control method for low-carbon pickled vegetables according to claim 1, characterized in that, The calculation of coupling deviation based on the pH change rate sequence and the nitrite residual risk index, and the generation of a comprehensive control signal for the fermentation process, includes: Calculate the arithmetic mean of all pH change rates in the pH change rate sequence as the current average acid production rate; Obtain a baseline value for acid production rate, and divide the current average acid production rate by the baseline value for acid production rate to obtain the normalized acid production rate. The coupling deviation is obtained based on the ratio of the residual nitrite risk index and the normalized acid production rate. Obtain a preset first coupling threshold and a second coupling threshold, wherein the first coupling threshold is smaller than the second coupling threshold; When the coupling deviation is less than the first coupling threshold and the nitrite residual risk index is less than the preset safety threshold, it is determined that the fermentation has reached the end point, and the fermentation process comprehensive control signal is generated as a termination signal. When the coupling deviation is greater than or equal to the first coupling threshold and less than the second coupling threshold, the fermentation process is determined to be the nitrite peak passage period, and the comprehensive control signal of the fermentation process is generated as an extension signal. When the coupling deviation is greater than or equal to the second coupling threshold, it is determined that there is an abnormality in the fermentation process, and the comprehensive control signal of the fermentation process is generated as an early warning signal.

7. The machine learning-based automated production control method for low-carbon pickled vegetables according to claim 1, characterized in that, The step of inputting the comprehensive control signal of the fermentation process and the fermentation environment parameters into the fermentation control agent to adaptively control the fermentation termination timing and fermentation environment parameters includes: The fermentation process comprehensive control signal and the fermentation environment parameters are input into the fermentation control agent to obtain the fermentation termination time and recommended fermentation environment parameters. When the fermentation process comprehensive control signal is a termination signal, the fermentation control agent outputs the fermentation termination time as the current time, the fermentation environment parameters as not adjusted, and outputs a fermentation completion command. When the comprehensive control signal for the fermentation process is an extended signal, the fermentation control agent outputs the fermentation termination time as the next sampling cycle, the fermentation environment parameters are not adjusted, and outputs a fermentation continue command. When the comprehensive control signal of the fermentation process is an early warning signal, the system outputs an update on the fermentation termination time and updates the fermentation environment parameters, and generates a fermentation early warning command.

8. The machine learning-based automated production control method for low-carbon pickled vegetables according to claim 7, characterized in that, The construction of the fermentation regulation agent includes: Collect fermentation control records of multiple groups of samples of pickled vegetables with the same variety and main ingredient as the current batch of pickled vegetables. Each group of records includes the current average acid production rate, residual nitrite risk index, fermentation environmental parameters, pH change rate sequence, as well as the effective fermentation termination time and recommended fermentation environmental parameters determined by manual judgment. A fermentation regulation intelligent agent is constructed based on machine learning, wherein the fermentation regulation intelligent agent includes a signal response layer and a parameter adjustment layer; The signal response layer and parameter adjustment layer of the fermentation regulation agent are synchronously trained using the fermentation regulation control records of the sample pickled vegetables. The classification deviation between the fermentation regulation action type output by the signal response layer and the fermentation regulation action deemed effective by humans in the sample data is used as the first loss component. The regression deviation between the environmental parameter adjustment amount output by the parameter adjustment layer and the environmental parameter adjustment amount actually executed in the sample data is used as the second loss component. The sum of the first loss component and the second loss component is used as the total loss function. The training is repeated until the total loss function converges to obtain the constructed fermentation regulation agent.

9. The machine learning-based automated production control method for low-carbon pickled vegetables according to claim 8, characterized in that, When the fermentation regulation action is to adjust environmental parameters, the sample data also includes the actual amount of environmental parameter adjustment performed, wherein the amount of environmental parameter adjustment includes temperature adjustment and salinity adjustment.

10. A machine learning-based low-carbon automated production control system for pickled vegetables, characterized in that: The method for implementing the machine learning-based low-carbon automated production control of pickled vegetables according to any one of claims 1-9 includes: The parameter category acquisition module is used to acquire real-time fermentation status parameters and fermentation environment parameters during the fermentation process of pickled vegetables, and to acquire the variety type and main ingredient category of pickled vegetables; The pH rate risk assessment module is used to calculate the pH change rate sequence based on the pH value at adjacent sampling times, and to obtain the residual nitrite risk index based on machine learning analysis. The coupling signal generation module is used to calculate the coupling deviation based on the pH change rate sequence and the nitrite residual risk index, and generate a comprehensive control signal for the fermentation process, wherein the comprehensive control signal for the fermentation process includes one of a termination signal, an extension signal, and an early warning signal. The adaptive control module is used to input the comprehensive control signal of the fermentation process and the fermentation environment parameters into the fermentation control agent to adaptively control the fermentation termination time and fermentation environment parameters.