Method and system for dynamically predicting bacteriocin titer attenuation based on LSTM (Long Short Term Memory) network

By constructing a dynamic prediction model based on the LSTM network and combining time-sequential salt gradient data, the detection lag and error problems of traditional preservative titer evaluation methods are solved, and high-precision prediction of the half-life of bacterial titer is achieved. It is suitable for prediction of the anticorrosion activity change law in complex salt gradient environments, improving the intelligence level of industrial anticorrosion processes.

CN120581098APending Publication Date: 2025-09-02GUANGDONG OCEAN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510681200.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2025-09-02

AI Technical Summary

Technical Problem

In the prior art, traditional preservative titer evaluation methods have detection lag and large errors, and cannot achieve dynamic prediction. Especially in the nonlinear salt gradient environment, the model error exceeds 20%, which cannot reflect the preservative titer decay process in real scenarios.

Method used

A dynamic prediction model based on LSTM network is adopted, combined with time-sequential salt gradient data, an input layer, a hidden layer and an output layer are constructed, and the LSTM neural network is trained through the TensorFlow framework, and Adam optimizer and mean square error optimization are used to achieve high-precision prediction of the half-life of bacterial titer.

Benefits of technology

It realizes high-precision prediction of the half-life of bacterial titer, with an error of less than 10%, breaking through the insufficient spatial and temporal resolution of traditional methods, and is suitable for prediction of anticorrosion activity changes in complex salt gradient environments. The system can output real-time and automatically fed the feed in a linkage, significantly improving the intelligence level of industrial anticorrosion processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120581098A_ABST
    Figure CN120581098A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of artificial intelligence and biological preservation, and particularly discloses a bacteriocin titer attenuation dynamic prediction method and system based on an LSTM network, and the method comprises the following steps: S1, data collection and processing: collecting titer attenuation time sequence data in a dynamic salt gradient environment; s2, constructing a model architecture: constructing an LSTM neural network model which comprises an input layer, a hidden layer, an output layer and a full-connection adaptation layer; s3, model training; and S4, inputting salinity data, time data and environment temperature data in real time, and outputting a half-life period prediction value. According to the bacteriocin titer attenuation dynamic prediction method and system based on the LSTM network, high-precision prediction of the bacteriocin titer half-life period is achieved by constructing the dynamic prediction model based on the LSTM neural network and combining the time sequence salt gradient data, the bottleneck of insufficient temporal-spatial resolution is broken through, and the method and the system have good application prospects. The method is suitable for accurately predicting the anticorrosion activity change rule in the complex salt gradient environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence and biological preservation technology, and in particular to a method and system for dynamically predicting bacteriocin potency attenuation based on an LSTM network. Background Art

[0002] The evaluation of preservative potency requires a combination of multiple verification methods to ensure the reliability and safety of the preservative system in real-world environments. Conventional preservative potency evaluation methods (such as chemical titration) are subject to detection lags and are unable to achieve dynamic predictions. Predictive models for dynamic analysis typically use linear regression methods, which have modeling errors exceeding 20% ​​for nonlinear salt gradient effects. Static salt concentration tests cannot reflect the dynamic attenuation process in real-world scenarios. Summary of the Invention

[0003] The purpose of the present invention is to provide a method and system for dynamic prediction of bacteriocin potency decay based on LSTM network. By constructing a dynamic prediction model based on LSTM neural network and combining it with time-series salt gradient data, high-precision prediction of bacteriocin potency half-life can be achieved, breaking through the bottleneck of insufficient spatiotemporal resolution of traditional methods, with an error of <10%, and being suitable for accurately predicting the change law of antiseptic activity in complex salt gradient environments.

[0004] To achieve the above objectives, the present invention provides a method for dynamically predicting bacteriocin potency decay based on an LSTM network, comprising the following steps:

[0005] S1. Data acquisition and processing: Acquisition of potency decay time series data in a dynamic salt gradient environment;

[0006] S2. Build model architecture: Build an LSTM neural network model, including input layer, hidden layer, output layer, and fully connected adaptation layer;

[0007] S3. Model training: The data is divided into a test set, a validation set, and a training set. TensorFlow is used for training using the Adam optimizer with a learning rate of 0.001 and a batch size of 32. Training is terminated when the validation set loss does not decrease for five consecutive times to obtain the final test and training sets.

[0008] S4. Input salinity data, time data and ambient temperature data in real time and output half-life prediction value.

[0009] Preferably, S1 is specifically:

[0010] S11. Dynamic salt gradient experiment: Establish a linear NaCl concentration gradient from 0% to 8% with a NaCl concentration increasing at a rate of 0.5% per hour;

[0011] S12. Potency detection: Samples were taken every hour to measure the activity of the bacteriocin and construct a time series data set of potency decay.

[0012] Preferably, in S2, the input layer includes input parameters, specifically ambient temperature value, salinity value and time series. By adding a salinity sensor data interface and a temperature sensor data interface to the input layer and renormalizing, an input vector is obtained: [salinity, time, temperature].

[0013] Preferably, in S2, the number of nodes in the hidden layer is 128, and the activation function is tanh.

[0014] Preferably, it is characterized in that, in S2, the original 128 node weights are frozen, and the ambient temperature value is adapted through the fully connected adaptation layer, the temperature collection range of the ambient temperature value is 20° C.-30° C., and the sampling frequency is ≥1 Hz.

[0015] Preferably, in S2, the loss function of the LSTM neural network model adopts mean square error.

[0016] Preferably, in S2, the sampling frequency of the salinity value is ≥1 Hz.

[0017] The present invention also provides a bacteriocin potency attenuation dynamic prediction system based on an LSTM network, comprising:

[0018] Salt gradient experiment module, used to generate 0-8% NaCl dynamic gradient environment;

[0019] A data acquisition module is used to measure bacteriocin activity on an hourly basis and generate a time-series dataset of potency decay;

[0020] LSTM prediction model, the input is ambient temperature value, salinity value and time, and the output is potency half-life.

[0021] Preferably, the LSTM prediction model is connected to a salinity sensor and a temperature sensor through a microfluidic channel.

[0022] Preferably, the LSTM prediction model triggers the automatic feeding system by setting a preset threshold of the potency half-life.

[0023] Therefore, the present invention adopts the above-mentioned bacteriocin potency attenuation dynamic prediction method and system based on LSTM network, and the beneficial effects are as follows:

[0024] (1) The present invention achieves high-precision prediction of the potency half-life of preservatives (bacteriocins) by constructing a dynamic prediction model of an LSTM neural network with a 128-node hidden layer and combining it with time-series (dynamic) salt gradient data (0-8% NaCl), breaking through the bottleneck of insufficient spatiotemporal resolution of traditional methods. The system can output prediction results in real time and link the automatic feeding system. It is suitable for accurately predicting the change law of preservative activity in complex salt gradient environments, significantly improving the intelligence level of industrial anti-corrosion processes, and has important application value in the fields of food preservation and pharmaceutical anti-corrosion.

[0025] (2) The present invention has dynamic prediction capabilities: compared with the prediction error of traditional models >20%, the prediction error of the dynamic prediction model for nonlinear salt gradient effects is less than 10%.

[0026] (3) The real-time performance of the present invention is improved: compared with the traditional experimental method that takes 12 hours to cultivate, the prediction time of this dynamic prediction model is less than 0.1 seconds, which is a hundred times more efficient.

[0027] (4) The present invention has cross-scenario applicability: the dynamic prediction model can be extended to the prediction of potency attenuation of other preservatives (such as nisin).

[0028] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 This is a diagram of the temperature compensation model architecture of an embodiment of a method for dynamically predicting bacteriocin potency decay based on an LSTM network of the present invention;

[0030] Figure 2 This is a learning rate optimization curve of an embodiment of a bacteriocin potency attenuation dynamic prediction method based on an LSTM network of the present invention;

[0031] Figure 3 This is a comparison chart of prediction results of an embodiment of a bacteriocin potency decay dynamic prediction method based on an LSTM network of the present invention. DETAILED DESCRIPTION

[0032] The technical solution of the present invention is further described below with reference to the accompanying drawings and embodiments.

[0033] Unless otherwise defined, technical or scientific terms used in the present invention shall have the same meaning as commonly understood by one of ordinary skill in the art to which the present invention belongs.

[0034] Example 1

[0035] A method for dynamically predicting bacteriocin potency decay based on an LSTM network comprises the following steps:

[0036] S1. Data acquisition and processing: Collect potency decay time series data in a dynamic salt gradient environment, specifically:

[0037] S11. Dynamic salt gradient experiment: Establish a linear NaCl concentration gradient from 0% to 8% with a NaCl concentration increasing at a rate of 0.5% per hour;

[0038] S12. Potency Detection: Samples were taken every hour to measure the activity of the bacteriocin and construct a (0-100%) potency decay time series data set. In this example, continuous monitoring was performed under an 8% NaCl gradient for 48 hours, obtaining 576 data points.

[0039] S2. Build model architecture: Build an LSTM neural network model, including input layer, hidden layer, output layer and fully connected adaptation layer, and use mean square error (MSE) as the loss function.

[0040] The input layer includes input parameters, specifically the ambient temperature value, salinity value (S) and time series (t). By adding the salinity sensor data interface and the temperature sensor data interface to the input layer and re-min-max normalization, the input vector is obtained: [salinity, time, temperature] → [0-1].

[0041] In this embodiment, the number of nodes in the hidden layer is 128, and the activation function is tanh. The output layer is the valence decay half-life t 1 / 2 (Unit: hours)

[0042] The ambient temperature value is adapted by fine-tuning the model: the original 128 node weights are frozen, and the ambient temperature value is adapted through the fully connected adaptation layer. The temperature collection range of the ambient temperature value is 20°C-30°C, specifically, the temperature is collected at 20°C / 25°C / 30°C respectively, and the data sampling frequency is 1Hz.

[0043] S3. Model training: The data was divided into 70% training set, 15% validation set, and 15% test set. TensorFlow was used for training with the Adam optimizer, a learning rate of 0.001, a batch size of 32, and early stopping when the validation set loss did not decrease for five consecutive times. The final test set RMSE was 1.2 hours.

[0044] S4, real-time input of salinity data, time data and ambient temperature data, output of half-life prediction value t 1 / 2 .

[0045] Example 2

[0046] A bacteriocin potency decay dynamic prediction system based on an LSTM network, using the method of embodiment 1, comprising:

[0047] Salt gradient experiment module, used to generate 0-8% NaCl dynamic gradient environment;

[0048] A data acquisition module is used to measure bacteriocin activity on an hourly basis and generate a time-series dataset of potency decay;

[0049] The trained LSTM prediction model, the salt gradient experiment module, the data acquisition module and the program instructions of the LSTM prediction model can all be executed by the processor.

[0050] Input real-time salinity sensor data (salinity value) with a sampling frequency of 1Hz, ambient temperature and time, and calculate the potency half-life t 1 / 2 Output, judge t 1 / 2 <preset threshold, the automatic feeding system is triggered. In this embodiment, the preset threshold is 12 hours.

[0051] Comparative Example 1

[0052] The difference from the first embodiment is that the number of hidden layer nodes is 64.

[0053] Comparative Example 2

[0054] The difference from the first embodiment is that the number of hidden layer nodes is 256.

[0055] Comparative Example 3

[0056] The difference from the first embodiment is that the learning rate is 0.01.

[0057] Comparative Example 4

[0058] The difference from the first embodiment is that the learning rate is 0.0001.

[0059] Comparative Example 5

[0060] The difference from Example 1 is that S11, dynamic salt gradient experiment: a linear NaCl concentration gradient of 0%-8% is established at a rate of increasing the NaCl concentration by 0.3% per hour.

[0061] Comparative Example 6

[0062] The difference from Example 1 is that S11, dynamic salt gradient experiment: a linear NaCl concentration gradient of 0%-8% is established at a rate of increasing the NaCl concentration by 0.7% per hour.

[0063] Comparative Example 7

[0064] The difference from Example 1 is that the input layer includes input parameters, specifically salinity value (S) and time series (t). By adding a salinity sensor data interface to the input layer and re-min-max normalization, the input vector is obtained: [time, temperature]→[0-1].

[0065] Comparative Example 8

[0066] The difference from Example 1 is that S11, dynamic salt gradient experiment: the NaCl concentration rate is increased by 0.5% per hour, and the NaCl concentration rate fluctuates by ±0.2% to simulate actual scene noise and establish a NaCl concentration linear gradient of 0%-8%.

[0067] Comparative Example 9

[0068] The difference from the first embodiment is that in S2, the data sampling frequency is 0.5 Hz.

[0069] Comparative Example 10

[0070] The difference from the first embodiment is that in S3, the batch size is 64.

[0071] Comparative Example 11

[0072] The difference from the first embodiment is that in S2, the activation function is ReLU.

[0073] Experimental testing

[0074] The prediction models of Example 1 and Comparative Examples 1 and 2 were used to perform performance tests. The test results are shown in Table 1.

[0075] Table 1 Test results

[0076] Training set RMSE (hours) Test set RMSE (hours) Single prediction time (ms) Comparative Example 1 1.8 2.1 35 Example 1 1.2 1.4 48 Comparative Example 2 1.1 1.5 72

[0077] As can be seen from Table 1, 128 nodes are selected as the balance point between accuracy and efficiency.

[0078] The prediction models of Example 1 and Comparative Examples 3-4 were used to perform performance tests. The test results are as follows: Figure 2 shown.

[0079] Depend on Figure 2 It can be seen that a learning rate of 0.01 causes oscillations, a learning rate of 0.0001 converges too slowly, and the validation set loss is lowest at a learning rate of 0.001, which is 1.15.

[0080] The prediction models of Example 1 and Comparative Examples 5-6 were used to perform robustness error tests, and the test results are shown in Table 2.

[0081] Table 2 Error test results

[0082] Data stationarity index Model testing error (%) Comparative Example 5 0.92 8.7 Example 1 0.88 7.2 Comparative Example 6 0.76 12.5

[0083] As shown in Table 2, the data signal-to-noise ratio is optimal at a rate of 0.5%.

[0084] The prediction models of Example 1 and Comparative Example 7 were used to perform robustness tests, and the test results are shown in Table 3.

[0085] Table 3 Robustness test results

[0086]

[0087]

[0088] As shown in Table 3, the model error decreases by 38-44% after adding the temperature input. The parameter errors at different temperatures are 9.8%, 6.9%, and 10.5%, respectively, with an average error of approximately 9.07%, indicating that the model error is less than 10%.

[0089] The prediction models of Example 1 and Comparative Examples 8 and 9 were used to perform robustness error tests. The test results are shown in Table 4.

[0090] Table 4 Error test results

[0091] Model testing error (%) Example 1 7.2 Comparative Example 8 9.5 Comparative Example 9 11.3

[0092] As shown in Table 4, by comparing the model performance under different dynamic salt gradient experiments and data sampling frequencies, it is shown that the data under the default parameters of Example 1 is optimal.

[0093] The prediction models of Example 1, Comparative Example 10 and Comparative Example 11 were used to perform hyperparameter performance tests and comparisons. The test results are shown in Table 5.

[0094] Table 5 Hyperparameter comparison test

[0095] Test set RMSE (hours) Convergence round Example 1 1.4 60 Comparative Example 10 1.6 75 Comparative Example 11 1.8 85

[0096] As can be seen from Table 5, by comparing the model performance under different hyperparameter configurations (batch size, activation function), it is shown that the default parameters of Example 1 (batch size 32, Tanh activation function) are optimal in terms of test set RMSE (1.4 hours) and convergence efficiency (60 rounds), verifying the scientific nature of the hyperparameter selection and the superiority of the technical solution.

[0097] The prediction curve obtained by the prediction model of Example 1 is fitted with the measured data points, and the fitting effect is as follows: Figure 3 As shown. Figure 3 It can be seen that the predicted curve is highly consistent with the measured data points, and there is no obvious deviation from the trend. The visual consistency can usually be used to qualitatively judge that the model performance is good.

[0098] Therefore, the present invention adopts the above-mentioned LSTM network-based bacteriocin potency attenuation dynamic prediction method and system, by constructing a dynamic prediction model based on the LSTM neural network and combining it with time-series salt gradient data to achieve high-precision prediction of the bacteriocin potency half-life, breaking through the bottleneck of insufficient temporal and spatial resolution of traditional methods, with an error of <10%, and is suitable for accurately predicting the change law of antiseptic activity in complex salt gradient environments.

[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit the same. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solutions of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A dynamic prediction method for bacteriocin potency decay based on LSTM network, characterized in that: The following steps are involved: S1. Data acquisition and processing: Acquisition of potency decay time series data in a dynamic salt gradient environment; S2. Build model architecture: Build an LSTM neural network model, including input layer, hidden layer, output layer, and fully connected adaptation layer; S3. Model training: The data is divided into test set, validation set, and training set. TensorFlow framework is used for training with Adam optimizer, a learning rate of 0.001, a batch size of 32, and training is terminated when the validation set loss does not decrease for five consecutive times. S4. Input salinity data, time data and ambient temperature data in real time and output half-life prediction value.

2. The method for dynamic prediction of bacteriocin potency attenuation based on LSTM network according to claim 1, characterized in that: S1 is specifically: S11. Dynamic salt gradient experiment: Establish a linear NaCl concentration gradient from 0% to 8% with a NaCl concentration increasing at a rate of 0.5% per hour; S12. Potency detection: Samples were taken every hour to measure the activity of the bacteriocin and construct a time series data set of potency decay.

3. The method for dynamic prediction of bacteriocin potency attenuation based on LSTM network according to claim 1, characterized in that: In S2, the input layer includes input parameters, specifically ambient temperature value, salinity value and time series. By adding salinity sensor data interface and temperature sensor data interface to the input layer and renormalizing, the input vector is obtained: [salinity, time, temperature].

4. The method for dynamic prediction of bacteriocin potency attenuation based on LSTM network according to claim 3, characterized in that: In S2, the number of nodes in the hidden layer is 128, and the activation function is tanh.

5. The method for dynamic prediction of bacteriocin potency attenuation based on LSTM network according to claim 4, characterized in that: In S2, the original 128 node weights are frozen, and the ambient temperature value is adapted through the fully connected adaptation layer. The temperature collection range of the ambient temperature value is 20° C.-30° C., and the sampling frequency is ≥1 Hz.

6. A method for dynamic prediction of bacteriocin potency attenuation based on LSTM network according to claim 5, characterized in that: In S2, the loss function of the LSTM neural network model adopts mean square error.

7. A method for dynamic prediction of bacteriocin potency attenuation based on LSTM network according to claim 6, characterized in that: In S2, the sampling frequency of the salinity value is ≥1 Hz.

8. A bacteriocin potency decay dynamic prediction system based on LSTM network, implemented by the method according to any one of claims 1 to 7, characterized in that: include: Salt gradient experiment module, used to generate 0-8% NaCl dynamic gradient environment; A data acquisition module is used to measure bacteriocin activity on an hourly basis and generate a time-series dataset of potency decay; LSTM prediction model, the input is ambient temperature value, salinity value and time, and the output is potency half-life.

9. A bacteriocin potency decay dynamic prediction system based on LSTM network according to claim 8, characterized in that: The LSTM prediction model is connected to a salinity sensor and a temperature sensor through a microfluidic channel.

10. A bacteriocin potency decay dynamic prediction system based on LSTM network according to claim 8, characterized in that: The LSTM prediction model triggers the automatic feeding system by setting a preset threshold for the potency half-life.