Machine learning based microalgae simulated growth prediction optimization method and system

CN122964474APending Publication Date: 2026-10-23LIANYUNGANG SHIRUO AGRI TECH CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611131378.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-29
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

上述生理差异通常不能由常规传感器直接测得

Benefits of technology

[0024]本申请利用微藻培养启动后观测窗口内光密度、pH值和溶解氧浓度等监测变量的连续变化信息,通过扩张因果卷积网络提取能够反映接种来源、前培养历史及细胞活性差异的隐式生理状态表征,并将该表征与观测窗口结束时刻的培养状态共同构成增强初始状态,以此初始化循环神经网络的递推过程,使后续生长轨迹预测不仅受外部培养条件驱动,还能够保持与当前培养批次实际生理状态相适应的演化起点;同时,利用轨迹预测损失和对比损失进行端到端联合训练,使隐式生理状态表征与真实生长表现建立稳定对应关系,从而减小仅依据单一时刻测量值初始化模型所造成的预测偏差,提高不同培养批次和不同生长阶段下生物量浓度预测的准确性与稳定性,为培养参数调整及生长过程优化提供较为可靠的预测依据。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122964474A_ABST
    Figure CN122964474A_ABST
Patent Text Reader

Abstract

The application discloses a microalgae simulation growth prediction optimization method and system based on machine learning, which comprises the following steps: collecting time series data of multiple monitoring variables within an observation window after starting microalgae culture, and forming a time series matrix after normalization processing; using a time series encoder network to extract an implicit physiological state representation vector reflecting time series change characteristics, and splicing the vector with a culture state variable at the end of the observation window to form an enhanced initial state vector; generating an initial hidden state of a recurrent neural network through linear transformation, so that the recurrent neural network recursively outputs a biomass concentration prediction sequence according to external input at each time step; and using a composite loss function comprising a trajectory prediction loss term and a contrast loss term to perform end-to-end joint training on the time series encoder network and the recurrent neural network. The method can improve the accuracy and stability of growth trajectory prediction under different culture batches.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of microalgae cultivation process modeling and intelligent prediction technology, specifically to a microalgae simulated growth prediction optimization method and system based on machine learning. Background Technology

[0002] Microalgae have the characteristics of short growth cycle, high light energy utilization rate, and the ability to synthesize a variety of bioactive substances, and have been applied in food, bioenergy, environmental remediation, and the preparation of high value-added products. The microalgae cultivation process is affected by a variety of factors, including light intensity, cultivation temperature, nutrient concentration, pH value, dissolved oxygen, and inoculation status. There are nonlinear coupling relationships between these factors, which makes the biomass changes show obvious time-varying and batch-specific variations.

[0003] Current methods for predicting microalgal growth primarily employ mechanistic models or data-driven models. Mechanistic models typically establish equations based on nutrient consumption, photosynthesis, and cell growth kinetics; however, these models have numerous parameters, complex calibration processes, and struggle to accurately describe processes such as light adaptation, intracellular nutrient reserves, and growth phase transitions. With improved online monitoring capabilities in culture equipment, methods such as artificial neural networks, support vector regression, and recurrent neural networks are increasingly being used for biomass prediction. These methods can establish a mapping relationship between culture conditions and growth outcomes; however, some methods primarily utilize current measurements, artificial statistical features, or external control parameters, failing to fully extract the multivariate data from the initiation phase of cultivation and its variations across different time scales.

[0004] In actual cultivation, even batches with similar initial biomass and culture conditions may exhibit different subsequent growth trajectories due to variations in inoculum source, pre-culture history, and cell viability. These physiological differences typically cannot be directly measured by conventional sensors. Existing methods, which initialize prediction models solely based on the state at the end of the observation window, easily overlook the implicit physiological states reflected in early temporal changes, thus affecting the accuracy of long-term growth trajectory predictions and the applicability across different culture batches. Therefore, it remains necessary to improve the utilization of microalgae culture temporal information and enhance the model's ability to characterize batch physiological differences and subsequent growth trends. Summary of the Invention

[0005] In view of this, this disclosure proposes a machine learning-based method and system for predicting and optimizing the simulated growth of microalgae.

[0006] According to one aspect of this disclosure, a machine learning-based method for predicting and optimizing microalgae growth simulation is provided, comprising:

[0007] Time-series data of multiple monitoring variables recorded at fixed time intervals within the observation window after the microalgae culture is started are collected, and the time-series data are normalized to obtain a normalized time-series matrix.

[0008] The normalized time series matrix is ​​input into the time series encoder network to extract implicit physiological state representation vectors from the time series change patterns of the normalized time series matrix.

[0009] The normalized measured values ​​of each culture state variable at the end of the observation window are concatenated with the implicit physiological state representation vector along the feature dimension to form an enhanced initial state vector; the enhanced initial state vector is linearly transformed to generate the initial hidden state of the recurrent neural network; the recurrent neural network receives external input step by step and recursively outputs the predicted value of biomass concentration at each time step to generate a growth trajectory prediction sequence.

[0010] The temporal encoder network and the recurrent neural network are jointly trained end-to-end using a composite loss function. The composite loss function includes a trajectory prediction loss term and a contrast loss term. The trajectory prediction loss term is calculated based on the deviation between the predicted growth trajectory sequence and the actual biomass concentration sequence. The contrast loss term is calculated based on the distance between the implicit physiological state representation vectors of each culture record within the same training batch and the similarity label of the corresponding actual growth trajectory.

[0011] In one possible implementation, the temporal encoder network employs a one-dimensional dilated causal convolutional network, comprising multiple dilated causal convolutional blocks connected in series, with the dilation rate of each convolutional block increasing layer by layer; the output of the last dilated causal convolutional block is then mapped to the implicit physiological state representation vector through a linear projection layer after global average pooling.

[0012] In one possible implementation, the one-dimensional dilated causal convolutional network comprises three dilated causal convolutional blocks, each with a kernel size of 3. The dilation rates of the three dilated causal convolutional blocks are 1, 2, and 4, respectively, and the number of output channels are 32, 32, and 64, respectively. Each dilated causal convolutional block sequentially comprises a dilated causal convolutional layer, a batch normalization layer, a ReLU activation function layer, and a Dropout layer. The linear projection layer maps the 64-dimensional vector after global average pooling to a 16-dimensional implicit physiological state representation vector.

[0013] In one possible implementation, the comparison loss term is calculated as follows: for any two groups of culture records within the same training batch, the normalized root mean square distance between the corresponding real growth trajectories of the two groups is calculated; the normalized root mean square distance is compared with a distance threshold, and those less than the distance threshold are labeled as similar, otherwise they are labeled as dissimilar; the comparison loss term constrains the distance between the implicit physiological state representation vectors of two groups of culture records with similar labels to tend to decrease, and constrains the distance between the implicit physiological state representation vectors of two groups of culture records with dissimilar labels to not be less than a preset interval parameter.

[0014] In one possible implementation, the distance threshold is determined based on the statistical distribution of the normalized root mean square distance between all pairs of training records in the training set, and a preset percentile of the statistical distribution is taken as the distance threshold; the interval parameter is determined by searching for the value that minimizes the validation loss on the validation set.

[0015] In one possible implementation, the recurrent neural network is a gated recurrent unit network; the initial hidden state is generated by the enhanced initial state vector through a linear transformation layer; at each time step, the gated recurrent unit network receives the external input of the current time step and the hidden state of the previous time step, outputs the hidden state of the current time step, and the hidden state of the current time step is mapped to the predicted value of biomass concentration of the current time step through an output linear layer; the external input includes light intensity, culture temperature and nutrient supplementation amount.

[0016] In one possible implementation, the monitored variables include optical density, culture medium pH, and dissolved oxygen concentration; the normalization process employs a minimum-maximum normalization method, where the minimum and maximum values ​​used for normalization are taken from the global minimum and global maximum values ​​of the corresponding variables in the training dataset, respectively.

[0017] In one possible implementation, the normalized measurements of each culture state variable include the following values, each normalized to the following: biomass concentration, nitrogen concentration, phosphorus concentration, pH value, and dissolved oxygen concentration, obtained from the optical density value according to a pre-calibrated linear conversion relationship.

[0018] In one possible implementation, the end-to-end joint training employs the Adam optimizer, and the learning rate is decayed from the initial learning rate to a preset minimum learning rate using a cosine annealing strategy. The training process employs an early stopping method, using the trajectory prediction loss term on the validation set as the early stopping criterion. Training stops when the trajectory prediction loss term on the validation set has not decreased for a consecutive preset number of rounds.

[0019] According to another aspect of this disclosure, a machine learning-based microalgae simulated growth prediction and optimization system is provided, comprising:

[0020] The data processing module is used to collect time-series data of multiple monitoring variables recorded at fixed time intervals within the observation window after the microalgae culture is started, and to normalize the time-series data to obtain a normalized time-series matrix.

[0021] The timing coding module is used to input the normalized timing matrix into the timing encoder network and extract implicit physiological state representation vectors from the timing change patterns of the normalized timing matrix.

[0022] The initial state construction and growth trajectory prediction module is used to concatenate the normalized measurement values ​​of each culture state variable at the end of the observation window with the implicit physiological state representation vector along the feature dimension to form an enhanced initial state vector; the enhanced initial state vector is linearly transformed to generate the initial hidden state of the recurrent neural network; the recurrent neural network receives external input step by step and recursively outputs the predicted value of biomass concentration at each time step to generate a growth trajectory prediction sequence.

[0023] A joint training module is used to jointly train the temporal encoder network and the recurrent neural network end-to-end using a composite loss function. The composite loss function includes a trajectory prediction loss term and a contrast loss term. The trajectory prediction loss term is calculated based on the deviation between the predicted growth trajectory sequence and the actual biomass concentration sequence. The contrast loss term is calculated based on the distance between the implicit physiological state representation vectors of each culture record within the same training batch and the similarity label of the corresponding actual growth trajectory.

[0024] This application utilizes the continuous changes in monitoring variables such as light density, pH, and dissolved oxygen concentration within the observation window after the microalgae culture is initiated. An extended causal convolutional network is used to extract implicit physiological state representations reflecting differences in inoculation source, pre-culture history, and cell activity. These representations, along with the culture state at the end of the observation window, constitute an enhanced initial state, which is used to initialize the recursive process of the recurrent neural network. This ensures that subsequent growth trajectory predictions are not only driven by external culture conditions but also maintain an evolutionary starting point adapted to the actual physiological state of the current culture batch. Simultaneously, end-to-end joint training using trajectory prediction loss and contrast loss establishes a stable correspondence between implicit physiological state representations and actual growth performance. This reduces prediction bias caused by initializing the model based solely on measurements at a single moment, improving the accuracy and stability of biomass concentration predictions for different culture batches and growth stages. This provides a more reliable predictive basis for adjusting culture parameters and optimizing the growth process.

[0025] Other features and aspects of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description

[0026] The accompanying drawings, which are included in and form part of this specification, illustrate exemplary embodiments, features, and aspects of this disclosure together with the specification and serve to explain the principles of this disclosure.

[0027] Figure 1 A flowchart is shown for a machine learning-based microalgae simulated growth prediction optimization method according to an embodiment of the present disclosure.

[0028] Figure 2 A schematic diagram of a timing encoder network structure according to an embodiment of the present disclosure is shown.

[0029] Figure 3 A flowchart illustrating the generation of a growth trajectory prediction sequence according to an embodiment of the present disclosure is shown.

[0030] Figure 4 A schematic diagram of a recurrent neural network structure provided according to an embodiment of the present disclosure is shown.

[0031] Figure 5 A schematic diagram of the structure of a machine learning-based microalgae simulated growth prediction and optimization system according to an embodiment of the present disclosure is shown.

[0032] Figure 6 A schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation

[0033] Various exemplary embodiments, features, and aspects of this disclosure will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.

[0034] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.

[0035] The microalgae simulated growth prediction optimization method provided in this disclosure is applicable to batch or semi-continuous microalgae culture scenarios in photobioreactors. The culture system is equipped with conventional online monitoring equipment, including at least a light density sensor, a pH sensor, and a dissolved oxygen sensor. Each sensor collects data at fixed time intervals, such as 15 or 30 minutes. Light intensity and culture temperature are known external control parameters and are automatically recorded by the culture system. In actual research and development, different batches of culture often have different inoculation sources and pre-culture histories, resulting in differences in the cell population's internal nutrient reserve level, photosynthetic activity, and growth stage. This physiological state information cannot be directly obtained through the aforementioned conventional sensors but has a significant impact on subsequent growth trajectories. This method utilizes continuous monitoring data over a short period after culture initiation to infer implicit information reflecting the aforementioned physiological differences and incorporates it into the simulation initiation conditions to improve the predictive consistency between different batches.

[0036] The implementation process of the method described in this application will be described in detail below with reference to specific embodiments. It should be noted that this embodiment is only used to explain this application and is not intended to limit the scope of protection of this application. Conventional adjustments or substitutions of each step by those skilled in the art without departing from the concept of this application should be included in the scope of protection of this application.

[0037] Figure 1 A flowchart illustrating a machine learning-based microalgae simulated growth prediction optimization method according to an embodiment of the present disclosure is shown. Figure 1 As shown, the method may include:

[0038] In step S11, time-series data of multiple monitoring variables recorded at fixed time intervals within the observation window after the microalgae culture is started are collected, and the time-series data are normalized to obtain a normalized time-series matrix.

[0039] According to an embodiment of this disclosure, after the microalgae culture is started, a continuous monitoring period is set as an observation window, and the window duration is denoted as [missing information]. For example, observation periods of 6 to 12 hours. Within the observation window, the culture system is observed at fixed time intervals. Collect the measured values ​​of each monitored variable. For example, if the time is 15 minutes, then the total number of sampling points within the window Taking a 6-hour window and a 15-minute interval as an example, The number is 24. The monitored variables recorded at each sampling point include optical density (OD), culture medium pH, and dissolved oxygen concentration (DO). The number of variables at each sampling point is denoted as . In this example Take 3.

[0040] All sampled data from the observation window were organized into a time series matrix. Each row of the matrix corresponds to a sampling time point, and each column corresponds to a monitored variable. Perform minimum-maximum normalization on each column, using the following formula:

[0041]

[0042] in For the first The sampling point, the first The original measurements of each variable, and Taken from the training dataset respectively The global minimum and global maximum values ​​of each variable; after normalization It is dimensionless. Taking the OD value as an example, if the minimum OD value in the training set is 0.05 and the maximum is 3.20, and the measured OD value of a certain sampling point is 0.68, then the normalized result of that point is... The normalized matrix is ​​denoted as... This eliminated the differences in numerical ranges between different monitored variables.

[0043] In step S12, the normalized time series matrix is ​​input into the time series encoder network to extract implicit physiological state representation vectors from the time series change patterns of the normalized time series matrix.

[0044] This embodiment will normalize the time series matrix. The data is fed into a specially designed temporal encoder network to extract a low-dimensional representation vector reflecting the implicit physiological differences in the cell population from the temporal variation patterns of the monitored data within the observation window. The physical basis for inferring physiological state information from short-term observation window data lies in the following: the photosynthetic activity of microalgae directly affects the fluctuation amplitude of dissolved oxygen on a minute-scale timescale; the activity of cellular carbon metabolism influences the slope of pH changes on an hourly scale through the CO2 consumption rate; and the initial shape of the light density growth curve reflects whether the cell population is still in the delayed adaptation stage. These variation patterns at different timescales each contain specific physiological information, and the encoder aims to integrate them into a low-dimensional vector.

[0045] Specifically, to adapt to the computation method of one-dimensional convolutional networks along the time axis, Transpose The monitored variable is used as the channel dimension, and the sampling point index is used as the sequence length dimension. During batch training, the input tensor dimension is... , This refers to the batch size. , For example, the shape of a single input is .

[0046] In one embodiment, such as Figure 2 As shown, Figure 2 The diagram illustrates the network structure of a temporal encoder according to an embodiment of this disclosure. The network employs a one-dimensional dilated causal convolutional network (TCN), consisting of three dilated causal convolutional blocks connected in series, followed by a global average pooling layer and a linear projection layer. Causal convolution means that the convolutional output at each time step depends only on the input from the current and previous time steps, without referencing data from future time steps, thus maintaining temporal causality. Dilated convolution increases the receptive field by inserting fixed intervals between the sampling points of the convolutional kernel; the larger the dilation rate, the larger the receptive field.

[0047] The configuration of the three dilated causal convolutional blocks is as follows: the kernel size is 3 for each block; the dilation rate of the first block is 1, and the number of input channels is... The first block has 32 output channels; the second block has a dilation rate of 2, 32 input channels, and 32 output channels; the third block has a dilation rate of 4, 32 input channels, and 64 output channels. Causal convolutions use zero-padding on the left side of the sequence, with the padding length equal to (kernel size - 1) multiplied by the dilation rate of that block. Taking the first block as an example, the padding length is... The length of the output sequence of the convolution is the same as that of the input.

[0048] Each convolutional block contains, in sequence: an expanded causal convolutional layer, a batch normalization layer, a ReLU activation function layer, and a Dropout layer, with a dropout rate set to 0.1. The expansion rates of the three blocks are 1, 2, and 4, respectively. Based on a 15-minute sampling interval, the corresponding receptive fields cover 45 minutes, approximately 1 hour and 45 minutes, and approximately 3 hours and 45 minutes, respectively, making them suitable for capturing different scale features such as short-term fluctuations in dissolved oxygen, temporal trends in pH, and the initial growth pattern of optical density.

[0049] After processing through 3 convolutional blocks, the output tensor dimension is Global average pooling is performed along the time dimension, that is, for each channel... Calculate the arithmetic mean of the individual values ​​to obtain... The vector. For example, for each of the 64 channels, the values ​​from 24 time steps are averaged and compressed into a single value, thus removing the time dimension. The pooling result is then mapped to a linear projection layer. dimension, For example, let's take 16; the dimension of the weight matrix of the linear projection layer is... The bias vector has a dimension of 16, and its parameters are learned during training. The projected output is the implicit physiological state representation vector. .

[0050] Here, the implicit physiological state representation vector refers to a set of low-dimensional numerical features that the encoder automatically learns from the time-series data of the observation window. It does not directly correspond to a named physiological parameter, but in the subsequent training process, by comparing the constraints of the loss, it is trained to distinguish culture batches with different subsequent growth performance, thereby indirectly encoding the physiological information related to growth differences.

[0051] In step S13, an enhanced initial state vector is constructed to generate the initial hidden state of the recurrent neural network, and the growth trajectory prediction sequence is generated recursively step by step.

[0052] Specifically, the normalized measured values ​​of each culture state variable at the end of the observation window are concatenated with the implicit physiological state representation vector along the feature dimension to form an enhanced initial state vector; the enhanced initial state vector is linearly transformed to generate the initial hidden state of the recurrent neural network; the recurrent neural network receives external input step by step and recursively outputs the predicted biomass concentration value at each time step to generate a growth trajectory prediction sequence.

[0053] like Figure 3 As shown, Figure 3 A flowchart illustrating the generation of a growth trajectory prediction sequence according to an embodiment of the present disclosure is shown. In step S1301, an enhanced initial state vector is constructed.

[0054] Specifically, the actual measured values ​​of each culture state variable at the end of the observation window constitute the state vector. This includes the following items: biomass concentration, calculated from optical density values ​​using a pre-defined linear conversion relationship, in g / L (the conversion factor is obtained by offline sampling and simultaneous measurement of OD values ​​and dry weight concentrations using linear regression fitting); nitrogen concentration, in mg / L; phosphorus concentration, in mg / L; pH value; and dissolved oxygen concentration, in mg / L. The above total... Each component, in this example .right Each component is subjected to min-max normalization, using the global minimum and global maximum values ​​of the corresponding variables in the training dataset, in the same manner as described above. The normalized result is denoted as... .

[0055] Will With implicit physiological state representation vector Concatenating along the feature dimensions yields the enhanced initial state vector:

[0056]

[0057] by , For example, It is a 21-dimensional dimensionless vector. The first 5 components carry direct measurement information at the end of the observation window, while the last 16 components carry implicit physiological state information inferred from the temporal change pattern.

[0058] In step S1302, the initial hidden states of the recurrent neural network are generated. The initial state vector is then augmented. The initial hidden state of the recurrent neural network is mapped through a linear transformation layer. :

[0059]

[0060] in This is the weight matrix. These are bias vectors, all learned during training. For example, The dimension is Implicit physiological state representation vector Through participation The generation of this allows culture batches in different physiological states to start from different initial latent states for simulation recursion, injecting implicit physiological information into the simulation process.

[0061] In step S1303, the recurrent neural network iterates step-by-step. In one implementation, such as... Figure 4 As shown, Figure 4This diagram illustrates a recurrent neural network structure according to an embodiment of the present disclosure. The recurrent neural network employs a gated recurrent unit network (GRU) with a hidden layer dimension of 128. The simulation start time is the same as the end time of the observation window, and the simulation step size is... For example, if the time is 1 hour, simulate the total number of steps. For example, 168 corresponds to 7 days. Each simulation time step ( The gated loop unit network receives external input at the current time step. The hidden state of the previous time step Output the hidden state at the current time step. External input Including light intensity, culture temperature, nitrogen supplementation, and phosphorus supplementation. Each component, for example When there is no replenishment operation, the amount of material added is zero; Similarly, the input is processed by min-max normalization, and after normalization, it becomes dimensionless.

[0062] The computation process for each time step in a gated recurrent unit (GRU) network follows the standard GRU definition. and Concatenate along the feature dimension A dimensional vector is fed into the reset and update gates:

[0063]

[0064]

[0065]

[0066]

[0067] in To reset the gate vector, To update the gate vector, In the candidate hidden state, It is the Sigmoid activation function. The hyperbolic tangent activation function is used. This is element-wise multiplication; , , Here are the weight matrices for each gate. , , The bias vector is used, and all parameters are learned during training. The core mechanism of GRU is the gate update. Control the proportion of the hidden state retained from the previous time step. By controlling the proportion of candidate hidden states written, the weight distribution of historical information and current input is automatically adjusted during the sequence recursion process.

[0068] Hidden state at each time step The output linear layer maps to scalar predicted values:

[0069]

[0070] in For the weight row vector, This is a scalar bias. The predicted biomass concentration at a normalized scale can be reduced to the actual biomass concentration per unit by inverse normalization: ,in and These are the global maximum and minimum values ​​of biomass concentration in the training set, respectively.

[0071] from Step by step to Generate growth trajectory prediction sequences As the number of iterations increases, the regulatory effect of the update gate gradually makes the hidden state dominated by the current external input, and the influence of the initial physiological state naturally diminishes. This is consistent with the law that the cell population gradually adapts to the current culture conditions during actual culture.

[0072] In step S14, the temporal encoder network and the recurrent neural network are jointly trained end-to-end using a composite loss function. Specifically, the temporal encoder network and the recurrent neural network are jointly trained end-to-end using a composite loss function, which includes a trajectory prediction loss term and a contrast loss term. The trajectory prediction loss term is calculated based on the deviation between the predicted growth trajectory sequence and the actual biomass concentration sequence, and the contrast loss term is calculated based on the distance between the implicit physiological state representation vectors of each culture record within the same training batch and the similarity label of the corresponding actual growth trajectory.

[0073] According to embodiments of this disclosure, the training data is taken from complete time-series records of multiple batches of microalgae culture, each record covering the entire culture cycle and including monitoring variables and external input parameters recorded at fixed intervals. The training set contains, for example, more than 50 sets of culture records, covering culture experiments with different inoculum sources and different initial concentration conditions. In each set of records, the first... The data for each time period is used as input to the time-series encoder network. Subsequent biomass concentration measurements were used as true labels for the simulation predictions.

[0074] The composite loss function comprises two parts: a trajectory prediction loss term and a contrast loss term. The trajectory prediction loss term measures the deviation between the predicted growth trajectory sequence and the actual biomass concentration sequence, and is calculated using the mean squared error method.

[0075]

[0076] in For the first Normalized biomass concentration predictions For the first Normalized true biomass concentration; To simulate the total number of steps. Taking a certain set of records as an example, if... Then, for each of the 168 time steps, the square of the difference between the predicted value and the actual value is calculated, and the average is taken.

[0077] The role of the contrastive loss term is to constrain the correspondence between the implicit physiological state representation vector output by the temporal encoder network and the subsequent growth performance of the culture batches. This ensures that batches with similar subsequent growth trajectories are closer together in the representation space, while batches with significantly different subsequent growth trajectories are farther apart. Without this constraint, the features learned by the encoder might only reflect surface information such as the absolute concentration level within the observation window, rather than the physiological signals truly related to subsequent growth differences.

[0078] In one embodiment, the specific calculation is completed in two steps, the first step of which is to determine the similarity label: for any two groups of training records in the same training batch. and Calculate the normalized root mean square distance between the two sets of corresponding true growth trajectories:

[0079]

[0080] in and The first Group and No. Group 1 in The normalized true biomass concentration value of the step is then used to set a distance threshold. ,judge and Relationship: Time tagging similarity labels Otherwise, mark Distance threshold The distance is determined based on the statistical distribution of the normalized root mean square distance between all pairs of culture records in the training set. Specifically, this involves calculating the distance between all pairs of records in the training set. The values ​​are then sorted in ascending order, and the 25th percentile is taken as the 25th percentile. For example, if the training set has 60 sets of records, totaling 1770 record pairs, then all 1770 records... The 25th percentile is taken after sorting the values.

[0081] The second step is to calculate the comparative loss value for the same training batch. All different record pairs in the group culture record ,calculate:

[0082]

[0083] in and The first Group and No. The group records the implicit physiological state representation vectors output by the temporal encoder network. Let be the Euclidean distance between the two. This is the interval parameter. The first term in the formula works for record pairs with similar labels, minimizing their representation vector distance; the second term works for record pairs with dissimilar labels, minimizing the distance between their representation vectors when the distance exceeds a certain threshold. When the distance is insufficient, the contribution is zero. Punishment is incurred at times, pushing the gap between the two to [a certain extent]. above.

[0084] Optionally, the interval parameter The value is determined by grid search on the validation set: multiple candidate values ​​are selected in a range of, for example, 0.5 to 2.0, with a step size of 0.25. For each candidate value, the total loss is evaluated on the validation set, and the value that minimizes the total loss on the validation set is selected; a typical value is, for example, 1.0.

[0085] The weighted sum of the trajectory prediction loss term and the comparison loss term constitutes the composite loss function:

[0086]

[0087] in The weighting coefficients for the comparison loss terms are used to adjust the relative proportions of the two losses. The determination method is as follows: Multiple candidate values ​​are selected within a preset range. For example, within the interval [0.01, 1.0], seven candidate values ​​are selected at logarithmic intervals: 0.01, 0.02, 0.05, 0.1, 0.2, 0.5, and 1.0. A complete training process is then performed for each candidate value, and the trajectory prediction loss term is calculated on the validation set. The value is selected to make the validation set... The smallest candidate value is used as the final value.

[0088] In some embodiments, all parameters of the three dilated causal convolutional blocks and the linear projection layer in the temporal encoder network are jointly trained end-to-end with all parameters of the initialization linear transformation layer, the gated recurrent unit network, and the output linear layer in the recurrent neural network. Each training round randomly samples data from the training set. The culture records of the groups constitute a training batch. For example, select 8 to 16. For each set of records, perform the following: extract observation window data, and output implicit physiological state representation vectors through a temporal encoder network. Constructing an enhanced initial state vector Generate initial hidden state Gated cyclic unit network recursion The growth trajectory prediction sequence is obtained step by step; then the growth trajectory prediction sequence for this batch is calculated. and The summary yields The gradients of each parameter are calculated and updated through backpropagation. The gradients are derived from... Backpropagation along the recursive path of the gated cyclic unit network to Then, after initialization, the linear transformation layer is returned to... ,in The gradient of the component continues to be fed back to the temporal encoder network; The gradient is from It is directly transmitted back to the timing encoder network.

[0089] Optionally, the optimizer uses Adam, with an initial learning rate of, for example, . The learning rate adjustment strategy uses cosine annealing, which decays the initial learning rate according to a cosine curve to a preset minimum learning rate, for example... The annealing period is equal to the total number of training epochs, which is, for example, 200 to 500 epochs. During training, the Dropout layer in each convolutional block of the encoder randomly discards 10% of the neuron outputs to reduce the risk of overfitting. Early stopping is also used during training to validate the trajectory prediction loss term on the validation set. As a criterion for early stopping: Calculated on the validation set after each training round. When on a consecutive, for example, 20 rounds of validation set Training was stopped when the value did not decrease, and the validation set was selected. The lowest set of parameters is used as the final model parameters.

[0090] According to the embodiments of this disclosure, after training is completed, when simulating and predicting new culture experiments, the overall process is as follows: after culture starts, wait for the observation window period. The monitoring data within the window is collected and normalized to obtain a normalized time-series matrix, which is then fed into a trained temporal encoder network to obtain an implicit physiological state representation vector. ; after normalizing the measured values ​​of each culture state variable at the end of the window, and then... Concatenate to construct an enhanced initial state vector The initial hidden state is generated through a linear transformation. Subsequently, the external input sequences from the subsequent culture program are gradually fed into the induction control cycle unit network for recursion, outputting a normalized biomass concentration prediction sequence, which is then reverse-normalized to restore the actual concentration value.

[0091] Optionally, simulations can be run separately for different cultivation operation schemes to compare the predicted growth trajectories under each scheme, providing a reference for determining the feeding time or harvesting time. In some embodiments, after accumulating new batch cultivation records, the new data can be added to the training set for incremental update training, with the initial learning rate reduced to one-tenth of the original training rate, the number of training rounds reduced accordingly, and the remaining configurations unchanged.

[0092] Therefore, by introducing an observation window phase before the simulation prediction begins, a temporal encoder network is used to extract implicit physiological state representation vectors from the change patterns of conventional monitoring data. This incorporates the internal state differences of cell populations, which are usually not directly measurable, into the simulation initiation conditions. This allows batches from different inoculation sources and with different culture histories to obtain initial hidden states that match their actual physiological states, thereby improving the consistency of multi-step simulation predictions across different batches without adding additional dedicated detection equipment. The introduction of contrastive loss establishes a discriminative correspondence between the representation vectors and subsequent growth performance, avoiding the problem of the encoder only capturing surface data features while ignoring deep physiological signals.

[0093] Figure 5 A block diagram of a machine learning-based microalgae simulated growth prediction and optimization system according to an embodiment of the present disclosure is shown. Figure 5 As shown, the system includes:

[0094] Data processing module 501 is used to collect time-series data of multiple monitoring variables recorded at fixed time intervals within the observation window after the microalgae culture is started, and to normalize the time-series data to obtain a normalized time-series matrix.

[0095] The timing coding module 502 is used to input the normalized timing matrix into the timing encoder network and extract the implicit physiological state representation vector from the timing change pattern of the normalized timing matrix.

[0096] The initial state construction and growth trajectory prediction module 503 is used to concatenate the normalized measurement values ​​of each culture state variable at the end of the observation window with the implicit physiological state representation vector along the feature dimension to form an enhanced initial state vector; to perform a linear transformation on the enhanced initial state vector to generate the initial hidden state of the recurrent neural network; the recurrent neural network receives external input step by step and recursively outputs the predicted value of biomass concentration at each time step to generate a growth trajectory prediction sequence.

[0097] The joint training module 504 is used to jointly train the temporal encoder network and the recurrent neural network end-to-end using a composite loss function. The composite loss function includes a trajectory prediction loss term and a contrast loss term. The trajectory prediction loss term is calculated based on the deviation between the predicted growth trajectory sequence and the actual biomass concentration sequence. The contrast loss term is calculated based on the distance between the implicit physiological state representation vectors of each culture record within the same training batch and the similarity label of the corresponding actual growth trajectory.

[0098] In some embodiments, the system provided in this disclosure may have functions or include modules that can be used to execute the methods described in the above method embodiments. The specific implementation of these methods can be referred to the description in the above method embodiments, and for the sake of brevity, they will not be repeated here.

[0099] Figure 6 A block diagram of an electronic device according to an embodiment of the present disclosure is shown. (Refer to...) Figure 6 Electronic devices can be provided as servers or terminal devices. (See reference...) Figure 6 The electronic device includes a processing component 601, which further includes one or more processors, and memory resources represented by memory 602 for storing instructions, such as application programs, that can be executed by the processing component 601. The application programs stored in memory 602 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 601 is configured to execute instructions to perform the methods described above.

[0100] The electronic device may also include a power supply component 603 configured to perform power management of the electronic device, a wired or wireless network interface 604 configured to connect the electronic device to a network, and an input / output interface 605 (I / O interface). The electronic device can operate on an operating system stored in memory 602.

[0101] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 602 including computer program instructions that can be executed by a processing component 601 of an electronic device to perform the above-described method.

[0102] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A machine learning-based method for predicting and optimizing the simulated growth of microalgae, characterized in that, include: Time-series data of multiple monitoring variables recorded at fixed time intervals within the observation window after the microalgae culture is started are collected, and the time-series data are normalized to obtain a normalized time-series matrix. The normalized time series matrix is ​​input into the time series encoder network to extract implicit physiological state representation vectors from the time series change patterns of the normalized time series matrix. The normalized measured values ​​of each culture state variable at the end of the observation window are concatenated with the implicit physiological state representation vector along the feature dimension to form an enhanced initial state vector; the enhanced initial state vector is linearly transformed to generate the initial hidden state of the recurrent neural network; the recurrent neural network receives external input step by step and recursively outputs the predicted value of biomass concentration at each time step to generate a growth trajectory prediction sequence. The temporal encoder network and the recurrent neural network are jointly trained end-to-end using a composite loss function. The composite loss function includes a trajectory prediction loss term and a contrast loss term. The trajectory prediction loss term is calculated based on the deviation between the predicted growth trajectory sequence and the actual biomass concentration sequence. The contrast loss term is calculated based on the distance between the implicit physiological state representation vectors of each culture record within the same training batch and the similarity label of the corresponding actual growth trajectory.

2. The method according to claim 1, characterized in that, The temporal encoder network adopts a one-dimensional dilated causal convolutional network, which contains multiple dilated causal convolutional blocks connected in series, with the dilation rate of each convolutional block increasing layer by layer; the output of the last dilated causal convolutional block is mapped to the implicit physiological state representation vector through a linear projection layer after global average pooling.

3. The method according to claim 2, characterized in that, The one-dimensional dilated causal convolutional network comprises three dilated causal convolutional blocks, each with a kernel size of 3. The dilation rates of the three dilated causal convolutional blocks are 1, 2, and 4, respectively, and the number of output channels are 32, 32, and 64, respectively. Each dilated causal convolutional block sequentially comprises a dilated causal convolutional layer, a batch normalization layer, a ReLU activation function layer, and a Dropout layer. The linear projection layer maps the 64-dimensional vector after global average pooling to a 16-dimensional implicit physiological state representation vector.

4. The method according to claim 1, characterized in that, The comparison loss term is calculated as follows: for any two groups of culture records within the same training batch, the normalized root mean square distance between the corresponding real growth trajectories of the two groups is calculated; the normalized root mean square distance is compared with a distance threshold, and if it is less than the distance threshold, it is labeled as similar, otherwise it is labeled as dissimilar; the comparison loss term constrains the distance between the implicit physiological state representation vectors of two groups of culture records with similar labels to tend to decrease, and constrains the distance between the implicit physiological state representation vectors of two groups of culture records with dissimilar labels to not be less than a preset interval parameter.

5. The method according to claim 4, characterized in that, The distance threshold is determined based on the statistical distribution of the normalized root mean square distance between all pairs of training records in the training set, and a preset percentile of the statistical distribution is taken as the distance threshold; the interval parameter is determined by searching for the value that minimizes the validation loss on the validation set.

6. The method according to claim 1, characterized in that, The recurrent neural network is a gated recurrent unit network; the initial hidden state is generated by the enhanced initial state vector through a linear transformation layer; at each time step, the gated recurrent unit network receives the external input of the current time step and the hidden state of the previous time step, outputs the hidden state of the current time step, and the hidden state of the current time step is mapped to the predicted value of biomass concentration of the current time step through the output linear layer; the external input includes light intensity, culture temperature and nutrient supplementation amount.

7. The method according to claim 1, characterized in that, The monitored variables include optical density, culture medium pH, and dissolved oxygen concentration; the normalization process adopts a minimum-maximum normalization method, and the minimum and maximum values ​​used for normalization are taken from the global minimum and global maximum values ​​of the corresponding variables in the training dataset, respectively.

8. The method according to claim 1, characterized in that, The normalized measurements of each culture state variable include the following normalized values: biomass concentration, nitrogen concentration, phosphorus concentration, pH value, and dissolved oxygen concentration, obtained from the optical density value according to a pre-calibrated linear conversion relationship.

9. The method according to claim 1, characterized in that, The end-to-end joint training uses the Adam optimizer, and the learning rate is decayed from the initial learning rate to the preset minimum learning rate using a cosine annealing strategy. The training process employs an early stopping method, using the trajectory prediction loss term on the validation set as the early stopping criterion. Training stops when the trajectory prediction loss term on the validation set fails to decrease for a consecutive preset number of rounds.

10. A microalgae simulated growth prediction and optimization system based on machine learning, characterized in that, include: The data processing module is used to collect time-series data of multiple monitoring variables recorded at fixed time intervals within the observation window after the microalgae culture is started, and to normalize the time-series data to obtain a normalized time-series matrix. The timing coding module is used to input the normalized timing matrix into the timing encoder network and extract implicit physiological state representation vectors from the timing change patterns of the normalized timing matrix. The initial state construction and growth trajectory prediction module is used to concatenate the normalized measurement values ​​of each culture state variable at the end of the observation window with the implicit physiological state representation vector along the feature dimension to form an enhanced initial state vector; the enhanced initial state vector is linearly transformed to generate the initial hidden state of the recurrent neural network; the recurrent neural network receives external input step by step and recursively outputs the predicted value of biomass concentration at each time step to generate a growth trajectory prediction sequence. A joint training module is used to jointly train the temporal encoder network and the recurrent neural network end-to-end using a composite loss function. The composite loss function includes a trajectory prediction loss term and a contrast loss term. The trajectory prediction loss term is calculated based on the deviation between the predicted growth trajectory sequence and the actual biomass concentration sequence. The contrast loss term is calculated based on the distance between the implicit physiological state representation vectors of each culture record within the same training batch and the similarity label of the corresponding actual growth trajectory.