Silicate decomposing bacteria metabolic characteristic prediction method based on deep learning
By constructing a deep learning model, the problems of multi-source heterogeneous data modeling and spatiotemporal dependence of silicate-decomposing bacteria metabolic behavior were solved, achieving high-precision prediction of metabolic characteristics and improving the robustness and accuracy of microbial remediation technology.
Patent Information
- Application Number
- CN202511149091.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-18
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2045-08-18
AI Technical Summary
Existing technologies struggle to accurately predict the metabolic behavior of silicate-decomposing bacteria in complex environments, particularly in areas such as multi-source heterogeneous data modeling, spatiotemporal dependency modeling, and uncertainty quantification. This limits the robustness and accuracy of microbial remediation and bioweathering technologies.
By employing a deep learning-based approach, an adaptive fusion spatiotemporal graph convolutional network, a latent diffusion transformer, and an automatic hyperparameter adjustment time fusion transformer model are constructed. Combined with multivariate patching techniques and data preprocessing, the correlation between bacterial species, culture conditions, and metabolic indicators is accurately modeled to achieve high-precision dynamic prediction.
It significantly improves the ability to express multi-scale, multi-source heterogeneous features, accurately models spatiotemporal dependencies, improves prediction accuracy and stability, and can efficiently quantify microbial metabolic characteristics in complex environments.
Smart Images

Figure CN120708723B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of waste resource utilization and deep learning, and particularly relates to a silicate decomposing bacteria metabolic characteristic prediction method based on deep learning. BACKGROUND
[0002] Coal gangue is a solid waste of coal resource exploitation, and its natural weathering process is slow, which is difficult to realize ecological system restoration in a short period of time, and seriously restricts the process of resource utilization and ecological management. In recent years, it has been found that some microbial flora (such as Bacillus, Aspergillus niger and other silicate decomposing bacteria) can effectively accelerate the dissolution and transformation of silicon-aluminum minerals in coal gangue by secreting metabolic products such as organic acids and extracellular enzymes, thereby promoting nutrient release and soil structure improvement.
[0003] However, the metabolic behavior of silicate decomposing bacteria is significantly affected by various factors (including strain type, nutrient base composition, pH value, moisture, temperature, etc.), and the release of various metabolic products has obvious nonlinear and time sequence dynamic characteristics. The existing technology has the following bottlenecks: (1) Difficulty in modeling multi-source heterogeneous data: there is a lack of effective method for fusion of static experimental conditions (such as strain attributes) and dynamic time sequence data (such as metabolic rate), and traditional models are difficult to capture the correlation across time scales; (2) Insufficient spatiotemporal dependence modeling: the spatial correlation (such as interaction between strains) and time evolution (such as product concentration accumulation) of the metabolic process are not jointly modeled, resulting in limited prediction accuracy; (3) Lack of uncertainty quantification: existing methods focus on single-point prediction, and cannot reflect the probability distribution of metabolic indicators, which restricts the robustness design of the repair strategy. Therefore, there is currently a lack of a scientific, systematic and automated model system that can accurately predict and quantitatively model the metabolic characteristics of microorganisms under complex environmental variable conditions.
[0004] Therefore, there is an urgent need for a deep learning-based prediction method to accurately simulate, predict and optimize the control of the metabolic product release process, and to provide intelligent support for the landing of microbial remediation and biological weathering technology. SUMMARY
[0005] To solve the above problems, the present application provides a silicate decomposing bacteria metabolic characteristic prediction method based on deep learning, which can fully exploit the multivariate dependence relationship in time series data and accurately dynamically predict key metabolic indicators (such as alkaline hydrolysis nitrogen, available phosphorus, available potassium, etc.) under different experimental conditions.
[0006] To achieve the above purpose, the following technical solutions are implemented:
[0007] The present application provides a silicate decomposing bacteria metabolic characteristic prediction method based on deep learning, comprising the following steps:
[0008] S1: Collect static characteristics including strain category, nutrient base composition, pH value, moisture content, and culture temperature, and time series dynamic characteristics of alkaline nitrogen, available phosphorus, and potassium release rate, and perform data preprocessing;
[0009] S2: Construct a microbial metabolic characteristic prediction model fused with three deep learning models to predict microbial metabolic characteristics:
[0010] S2.1: Construct an adaptive fusion spatio-temporal graph convolution network model, model the correlation between strains, culture conditions and metabolic indicators through a spatio-temporal adjacency matrix, and perform spatio-temporal graph convolution combined with a multi-step random walk expectation matrix to output a first prediction result;
[0011] S2.2: Construct a latent diffusion transformer model, compress time series through an adaptive normalization layer to a latent space, generate denoising latent variables using diffusion inversion, and output a second prediction result through a decoder;
[0012] S2.3: Construct a time fusion transformer model with automatic hyperparameter adjustment, combine quantile regression and gated residual network, and output a third prediction result;
[0013] S3: Weighted fusion of the first, second, and third prediction results to generate the final metabolic characteristic prediction results, including dynamic change curves and confidence intervals of alkaline nitrogen, available phosphorus, and potassium release rate.
[0014] Further, the data preprocessing includes:
[0015] The static characteristics and the time series dynamic characteristics are fused and preprocessed using a multivariate patch technique, specifically including:
[0016] Concatenate the static characteristic matrix and the dynamic indicator tensor along the time dimension to form an enhanced time series tensor;
[0017] Keep time alignment consistency by zero padding, and divide local time period patches according to sliding windows;
[0018] Flatten each patch into a one-dimensional vector of uniform dimension to generate an enhanced feature representation for input into the deep learning model.
[0019] Further, the construction of the adaptive fusion spatio-temporal graph convolution network model includes:
[0020] Construct an adaptive spatio-temporal graph structure, including: different strains, culture conditions, and metabolic products as graph nodes, adaptively construct a spatial adjacency matrix, a temporal adjacency matrix, and a spatio-temporal adjacency matrix through a node embedding mechanism to model their structural relationships and mutual influences;
[0021] The adaptive spatio-temporal graph convolution module is constructed, including: constructing a transition matrix P based on a normalized adjacency matrix A; designing a multi-step transition expectation matrix based on random walk according to the transition matrix P; screening the most relevant neighborhood nodes and updating the transition weight thereof, and then performing a graph convolution operation to capture the spatio-temporal dependence relationship of the metabolite, to obtain the feature after graph convolution;
[0022] The feature after the graph convolution is converted into a prediction value of the target variable through a full connection layer, and the metabolic index prediction value, i.e., the first prediction result, is output.
[0023] Further, the adaptive construction of the spatial adjacency matrix, the temporal adjacency matrix and the spatio-temporal adjacency matrix through the node embedding mechanism includes:
[0024] The strains, culture conditions and metabolites are taken as graph nodes, and initial spatial adjacency matrices are generated based on learnable parameter matrices H1 and H2; the directionality of the adjacency matrices is adjusted through a direction judgment matrix T, and the adjusted adjacency matrices are applied with ReLU and Sigmoid activation functions to generate the final spatial adjacency matrices;
[0025] The temporal adjacency matrix is constructed, and the elements of the temporal adjacency matrix are 1 only when i = j, and 0 otherwise;
[0026] The spatio-temporal adjacency matrix is generated through the node embedding matrix.
[0027] Further, the construction of the latent diffusion transformer model includes:
[0028] An adaptive normalization layer is used to perform symmetric compression and dynamic normalization processing on the high-dimensional multivariate time series, and the mean and standard deviation are independently calculated for each metabolic index to generate a normalized sequence;
[0029] An encoder-decoder architecture is constructed, and the encoder maps the normalized sequence to a low-dimensional latent space;
[0030] The latent space representation is generated by gradually adding noise through a diffusion process and training a denoising network combined with a self-conditioning guidance mechanism;
[0031] When the decoder performs model inference, the latent variable is sampled from a standard normal distribution, and the prediction result is generated after step-by-step denoising through reverse diffusion decoding, and the second prediction result is output.
[0032] Further, the method includes:
[0033] The self-conditioning guidance mechanism is introduced into the latent diffusion transformer, a self-conditioning guidance block is constructed, and the final estimate is generated by linearly combining the conditional and unconditional denoising results.
[0034] Further, the construction of the automatic hyperparameter-adjusted time fusion transformer model comprises:
[0035] The time series dynamic dependency relationship is encoded through the multi-head attention mechanism.
[0036] Nonlinear mapping is performed through the gated residual network.
[0037] The uncertainty of the prediction result is modeled by using the quantile regression loss function, and the quantile prediction interval of the metabolite concentration is output.
[0038] The hyperparameters, including at least one of the hidden layer dimension, the number of attention heads, the learning rate, and the type of the scaler, are automatically adjusted through Bayesian optimization, genetic algorithm, or grid search.
[0039] Further, the gating mechanism of the gated residual network is realized through the following steps:
[0040] The main input features and the context features are linearly transformed and activated by the ELU to generate intermediate features.
[0041] The intermediate features are subjected to secondary linear transformation and information flow control through the GLU gating unit, and finally connected with the input features in residual and output through layer normalization.
[0042] Further, the expression of the quantile regression loss function is:
[0043]
[0044]
[0045] wherein, : the output result composed of multiple quantile values predicted by the model, i.e., the third prediction result, for reflecting the prediction interval of the metabolite concentration at different confidence levels; y: the true value vector; : the quantile regression loss function; : the true value of the i-th sample; : the predicted value of the i-th sample; n is the number of samples; : the i-th quantile point; : the kernel function of the quantile loss function. Further, the step S3: the first, second, and third prediction results are weighted and fused to generate the final metabolite characteristic prediction result:
[0046] Further, the step S3: the first, second, and third prediction results are weighted and fused to generate the final metabolite characteristic prediction result:
[0047]
[0048] wherein, for the final fused prediction result, used to depict the metabolic characteristics of silicate decomposing bacteria; , respectively, first, second, and third prediction results; , , : weight coefficients corresponding to the three models, satisfying: The weight coefficients are determined by cross-validation or grid search to minimize the mean square error of the fused prediction value and the true value.
[0049] Compared with the prior art, the present application has the following beneficial effects:
[0050] 1. The present application designs a data preprocessing technology based on multiple patches, which fuses static experimental conditions (such as strain type, temperature, pH value, etc.) and time series characteristics (such as metabolic product release rate), divides time period patches through a sliding window mechanism and flattens the embedded representation, significantly improving the model's expression ability for multi-scale, multi-source heterogeneous characteristics, ensuring time alignment and context relevance, and laying a high-quality input foundation for subsequent deep neural network modeling.
[0051] 2. In view of the spatiotemporal dependence problem of microbial metabolic behavior, an adaptive fusion spatiotemporal graph convolution network model with self-learning adjacency structure is constructed. By introducing a spatiotemporal embedding mechanism and a multi-step random walk expectation matrix, the structural correlation and time series dynamics between strains, culture conditions and metabolic indicators are accurately modeled, and the graph structure modeling and prediction of the metabolic process are enhanced.
[0052] 3. In view of the modeling difficulty and prediction uncertainty problem of multivariate time series, a latent diffusion transformer model is designed. The model realizes non-autoregressive prediction of the metabolic process by modeling the latent space compression, diffusion process and reverse denoising generation of the original sequence, and improves the stability and generalization ability of the model under sparse data and complex input conditions by combining a self-conditioning mechanism.
[0053] 4. The present application constructs a time fusion transformer model supporting automatic hyperparameter adjustment of quantile regression, which fuses gated residual networks and attention mechanisms to capture nonlinear metabolic laws and environmental response patterns, introduces an automatic hyperparameter optimization mechanism (such as learning rate, hidden layer dimension, number of attention heads, and scaler type), and finds the optimal configuration through Bayesian optimization or genetic search, greatly improving the model training efficiency and prediction accuracy.
[0054] It should be understood that the content described in the summary section is not intended to limit the key or important features of the embodiments of the present application, nor to limit the scope of the present application. Other features of the present application will become apparent through the following description. BRIEF DESCRIPTION OF DRAWINGS
[0055] The above and other features, advantages, and aspects of embodiments of the present application will become more apparent by describing in detail preferred embodiments thereof with reference to the attached drawings in which:
[0056] Figure 1 FIG. 1 shows a flowchart of a method for predicting metabolic characteristics of silicate decomposing bacteria based on deep learning according to an embodiment of the present application.
[0057] Figure 2 FIG. 2 shows a flowchart of a method for constructing a microbial metabolic characteristic prediction model by fusing three deep learning models according to an embodiment of the present application. DETAILED DESCRIPTION
[0058] In order to make the objectives, technical solutions, and advantages of embodiments of the present application clearer, the technical solutions in embodiments of the present application will be described clearly and completely below with reference to the drawings in embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0059] In addition, the term “and / or” herein merely describes an association relationship of associated objects, and can represent three cases, for example, A and / or B can represent three cases of A alone, A and B together, and B alone. In addition, the character “ / ” herein generally represents an “or” relationship between the front and rear associated objects.
[0060] Figure 1 FIG. 1 shows a flowchart of a method for predicting metabolic characteristics of silicate decomposing bacteria based on deep learning according to an embodiment of the present application. As shown in FIG. 1, a method for predicting metabolic characteristics of silicate decomposing bacteria based on deep learning includes the following steps: Figure 1
[0061] S1: Collecting static characteristics including bacteria species, nutrient base composition, pH value, moisture content, and culture temperature, and time series dynamic characteristics of alkali nitrogen, available phosphorus, and release rate of available potassium, and performing data preprocessing;
[0062] S1.1: Data collection:
[0063] In order to construct a high-quality microbial metabolic product database that can be used for modeling analysis, a comprehensive data set covering multiple experimental conditions and bacteria information needs to be established first. The input characteristics of the data set include the following types of information:
[0064] Strain Category: Such as Bacillus, phosphorus solubilizing bacteria, nitrogen-fixing bacteria, etc. Different strains have significant differences in metabolic characteristics and nutrient conversion efficiency.
[0065] Nutrient Base Composition: Including carbon source (such as glucose, sucrose), nitrogen source (such as ammonium nitrate, yeast extract) and phosphorus source (such as phosphate), etc. Different component combinations will affect the growth and metabolism of bacteria;
[0066] pH Value: The initial pH value of the culture medium has a significant regulatory effect on the activity of the bacteria and the generation of metabolic products;
[0067] Moisture Content: Especially in solid culture system, water is crucial for osmotic pressure balance and metabolic rate of microorganisms;
[0068] Culture Temperature: Set multiple temperature gradients (such as 20°C, 30°C, 37°C, etc.), and observe the trend of metabolic activity with temperature change.
[0069] Specifically, in the experimental process, each strain is cultured under the set culture conditions, and the time series data of its metabolic products are collected at certain time intervals (such as every 12 hours or every 24 hours). The key indicators of metabolic products include alkaline nitrogen release rate, effective phosphorus release rate, and rapid potassium release rate. The following steps are included: Strain selection: Silicate decomposing bacteria such as jelly-like Bacillus and Aspergillus niger are isolated from the soil of coal gangue dumps in Guizhou Province. Mutagenesis breeding: Through ultraviolet or chemical mutagenesis (such as sodium nitrite), strains with strong decomposition ability are selected. Preparation of bacterial agent: Mix the strains in proportion (such as 1:1:1), inoculate in fermentation medium, and culture to a bacterial concentration of 10 8 -10 9 CFU / mL. Application method: Mix the bacterial agent with coal gangue at a volume ratio of 1:100, add organic fertilizer and water, maintain humidity of 40-60%, temperature of 25-30°C, and turn over regularly. Effect evaluation: Determine the changes in mineral composition, pH value, organic matter content and nutrient release amount, etc. to ensure that the soil-like substrate meets the four-level soil standard.
[0070] The above indicators are quantitatively determined by chemical analysis methods (such as alkaline diffusion method, molybdenum antimony anti-colorimetric method, flame photometry, etc.), and the content values at each time point are recorded, and then the release rate and time relationship are calculated. The final data form is a multivariate time series sample, which serves as the basis for subsequent modeling analysis.
[0071] S1.2: Data Preprocessing:
[0072] In addition to the conventional preprocessing methods such as denoising, the data preprocessing part also adopts a multivariate patching technique, which is an extension of the patching mechanism for univariate time series to the multivariate context. The multivariate patching technique is used to fuse and preprocess the static features and dynamic features of the time series. The processing flow specifically includes:
[0073] S1.2.1: Concatenate the static feature matrix and the dynamic indicator tensor along the time dimension to form an enhanced time series tensor:
[0074]
[0075] wherein, : Static feature matrix, each row represents an experimental sample (a total of ), containing features that do not change over time, such as strain category, nutrient base type, initial pH value, moisture content, culture temperature, etc. : Patch length or sliding window span, i.e. time window width, determined by task window setting; : Time series feature tensor, representing dynamic indicator sampling (such as alkaline nitrogen, available phosphorus, and rapid potassium release rate) from time to , with time steps for each sample, and indicators per step; Concat ( ): Broadcast and concatenate the static features to each time step along the time dimension to form an enhanced time series tensor; : Concatenated tensor, fusing time series dynamic information and static experimental conditions.
[0076] S1.2.2: Keep time alignment consistency by zero padding, and divide local time period patches by sliding window;
[0077] Zero padding is used to prevent information leakage, and the formula is as follows:
[0078]
[0079] wherein, : Fill in zero vectors (or mean value / boundary value) on the front side in the time dimension to prevent the introduction of future information when dividing the window; : Completed time series tensor, with a time length of to maintain time alignment consistency.
[0080] Divide local time period patches by sliding window:
[0081]
[0082] wherein Patchild : divide the long time series into several patches (patches) in the time dimension by sliding window, and each patch spans a fixed step; : patch tensor, generally in the shape of , wherein is the number of patches, is the feature dimension after splicing.
[0083] Each patch is equivalent to a joint representation of dynamic changes and static context in a local time period.
[0084] S1.2.3: flatten each patch into a one-dimensional vector of uniform dimension to generate an enhanced feature representation for input into a deep learning model:
[0085]
[0086] wherein Flatten : flatten the time dimension and feature dimension of each patch into a one-dimensional vector; : flattened patch tensor, shape , which is convenient for subsequent input into a neural network.
[0087] The operation of S1.2.3 in this step retains the time-local pattern and compresses it into a uniform length representation.
[0088] S2: Construct a microbial metabolic characteristic prediction model that integrates three deep learning models to predict microbial metabolic characteristics:
[0089] The present application designs a microbial metabolic characteristic prediction model that integrates three deep learning models, and the prediction targets are alkaline nitrogen, available phosphorus, and release rate of available potassium, and time series dynamic changes. Figure 2 The main steps of step S2 of constructing a microbial metabolic characteristic prediction model that integrates three deep learning models according to an embodiment of the present application are shown in the schematic diagram. As Figure 2 described, step S2 specifically includes the following steps:
[0090] S2.1: Construct an adaptive fusion spatio-temporal graph convolution network model, model the correlation between strains, culture conditions and metabolic indicators through a spatio-temporal adjacency matrix, and perform spatio-temporal graph convolution combined with a multi-step random walk expectation matrix to output a first prediction result;
[0091] To solve the problem of unknown space-time structure, the application is based on the correlation between space graphs corresponding to different time points, integrates multiple single-time space graphs to construct a fused space-time graph, thereby retaining potential space-time connection relationships. Different strains, culture conditions (such as temperature, pH value, moisture, and nutrient medium), and metabolic products (such as alkali hydrolysis nitrogen, available phosphorus, and available potassium) are taken as graph nodes, and an adjacency matrix is defined to model the structural relationships and mutual influences therebetween.
[0092] The construction of the adaptive fused space-time graph convolution network model includes the following steps:
[0093] S2.1.1: Constructing an adaptive space-time graph structure
[0094] This step S2.1.1 specifically includes: taking different strains, culture conditions, and metabolic products as graph nodes, adaptively constructing a spatial adjacency matrix, a temporal adjacency matrix, and a space-time adjacency matrix through a node embedding mechanism to model the structural relationships and mutual influences therebetween, including: generating an initial spatial adjacency matrix based on a learnable parameter matrix H1, H2; adjusting the directionality of the adjacency matrix through a direction judgment matrix T, applying ReLU and Sigmoid activation functions to the adjusted adjacency matrix to generate a final spatial adjacency matrix; constructing a temporal adjacency matrix, the elements of which are 1 only when i = j, and 0 otherwise; generating a space-time adjacency matrix through a node embedding matrix. Specifically:
[0095] (1) Spatial adjacency matrix
[0096] Two learnable parameters are randomly initialized , to form a temporary spatial relationship matrix , and the final adjacency matrix is obtained through nonlinear activation function processing:
[0097]
[0098] wherein, , is a learnable parameter for constructing the initial association between nodes; : initial spatial adjacency matrix, obtained through matrix multiplication of the node embedding matrix, not normalized; : final spatial adjacency matrix, obtained after processing by the activation functions ReLU and Sigmoid, used to represent the spatial association strength between nodes; : rectified linear unit activation function, setting negative values to zero and retaining positive values; : Sigmoid activation function, mapping the input to the (0, 1) interval, embodying the probability relationship; : judgment matrix, according to The middle element size relationship judgment edge direction; : judge the value of position (i, j) in the matrix; : the relationship strength between nodes i and j in the initial adjacency matrix.
[0099] (2) Time adjacency matrix
[0100] Time adjacency matrix Used to describe the correlation of the same variable at different time points, the element The definition is:
[0101]
[0102] : Time adjacency matrix, representing the autocorrelation between the same variable at different time points; : The element of the i-th row and the j-th column in the time adjacency matrix.
[0103] (3) Spatio-temporal adjacency matrix
[0104] It represents the node association relationship across time and space, which is constructed by node embedding vectors and obtained by activation function:
[0105]
[0106] : Spatio-temporal adjacency matrix, constructed on the basis of space and time graph, integrating space and time features; : Node relationship matrix calculated based on node embedding; ReLU, Sigmoid: Activation functions, respectively, used to enhance non-linear expression ability and control value range.
[0107] S2.1.2: Construct adaptive fusion spatio-temporal graph convolution module
[0108] In view of the fact that traditional graph convolution cannot effectively capture unordered spatio-temporal dependency, the adaptive fusion spatio-temporal graph convolution module introduces a neighborhood selection mechanism based on random walk, which forms an ordered structure with the input node and its k most relevant neighborhood nodes, and realizes more effective spatio-temporal feature extraction.
[0109] This step S2.1.2 specifically includes:
[0110] S2.1.2.1: Construct transition matrix P based on normalized adjacency matrix A:
[0111]
[0112] Wherein, : Adjacency matrix before normalization; : Transition probability matrix, representing the probability of a node transitioning to another node after one step of random walk; : Degree matrix, which is a diagonal matrix whose diagonal elements are the sum of the number of edges connecting the node itself to other nodes, and the calculation formula is:
[0113]
[0114] wherein, : Degree of node , i.e. the sum of the number of edges connecting node to other nodes; : Value in the adjacency matrix indicating whether there is an edge (or edge weight) from node to node .
[0115] S2.1.2.2: Designing multi-step transition expectation matrix based on random walk according to transition matrix P :
[0116]
[0117] wherein, : Multi-step transition expectation matrix, is the number of transition steps; : Power of transition matrix , representing the state transition probability after step random walk; : Cumulative transition expectation from 0 to steps, representing the comprehensive multi-layer neighborhood information.
[0118] S2.1.2.3: Screening the most relevant neighborhood nodes and updating their transition weights, then performing graph convolution operation to capture the spatiotemporal dependence relationship of metabolites, and obtaining the features after graph convolution;
[0119] (1) Correlation neighborhood selection
[0120] Through the argtopk operation, the top most relevant neighborhood nodes are selected from each column of :
[0121]
[0122] wherein, : Column in the multi-step transition matrix, representing the correlation of all nodes with node ; : Select the index function with the largest value, i.e. find the most relevant node to the current node neighborhood nodes; : the index set of the selected most relevant neighborhood nodes.
[0123] (2) Transition matrix update
[0124] Only the top most relevant neighborhood nodes' transition weights are reserved:
[0125]
[0126] where, : the multi-step transition matrix 's value at position (i, j), if belongs to , the original value is reserved; otherwise, it is set to 0, which is used to sparsify the matrix and strengthen important adjacency relationships.
[0127] (3) Graph convolution operation
[0128] In the layer graph convolution, the output feature is calculated by the following formula:
[0129]
[0130] where, : the feature output after the layer convolution; : the input feature of the layer; when , the input is the original data processed in step one; : the convolution kernel weight of the layer, which is a trainable parameter; : the multi-step transition expectation matrix.
[0131] S2.1.2.4: Convert the features after graph convolution into the prediction value of the target variable through a fully connected layer, output the metabolic indicator prediction value, which is the first prediction result.
[0132] This convolution operation realizes feature fusion and extraction based on graph structure, capturing the timing evolution of metabolic product release. Finally, the features after graph convolution are converted into the prediction value of the target variable through a fully connected layer, and the expression is:
[0133]
[0134] where, : the prediction value of a certain metabolic indicator of silicate decomposing bacteria (such as alkali hydrolysis nitrogen release rate) by the model; : the output feature matrix of the last layer of graph convolution module (L is the total number of layers). : learnable weight parameters of the output layer; : bias term of the output layer; : activation function (ReLU, Sigmoid or Linear, depending on the task).
[0135] S2.2: Constructing a latent diffusion transformer model, compressing a time series to a latent space through an adaptive normalization layer, generating a denoised latent variable using diffusion inversion, and outputting a second prediction result through a decoder;
[0136] The present application proposes a latent diffusion transformer for multivariate time series prediction, which converts high-dimensional multivariate time series prediction into a latent space time series generation problem. The latent diffusion transformer is a non-autoregressive denoising generation network, which consists of the following three parts: an adaptive normalization layer: dynamically adjusting the normalization strategy for different latent variables; a Transformer encoder-decoder module: used to model and denoise time series in the latent space; a self-conditioning guide block: enhancing generation stability and conditional consistency.
[0137] The construction of a specific latent diffusion transformer model includes the following steps:
[0138] S2.2.1: Constructing an adaptive normalization layer
[0139] To improve the modeling efficiency of the model on high-dimensional multivariate metabolite data, a symmetric autoencoder structure is introduced, combined with a normalization layer with adaptive variance update for symmetric time series compression. The adaptive normalization layer is used to symmetrically compress and dynamically normalize high-dimensional multivariate time series, and the mean and standard deviation are calculated independently for each metabolite index to generate a normalized sequence. Specifically:
[0140] First, the original multivariate time series is normalized, and the mean and standard deviation of each variable are calculated, and the normalization formula is as follows:
[0141]
[0142] wherein, : represents the time series of the m-th metabolite index (such as alkaline nitrogen release rate); : the mean and standard deviation of the m-th feature within the sample, respectively; : the normalized time series of the m-th feature. S2.2.2: Constructing an encoding module training target
[0143]
[0144] An encoder-decoder architecture is constructed, where the encoder maps the normalized sequence to a low-dimensional latent space. Specifically, the time series samples processed in step 2.2.1 are... The encoder yields a low-dimensional latent space embedding representation. The training objective function is defined as:
[0145]
[0146] in, The time series samples are processed in step S2.2.1; Indicates time series The low-dimensional latent space embedding representation after encoder is a low-dimensional, continuous vector that captures the core dynamic features of the original sequence, making it easier for the diffusion model to model in the latent space. Time step Noisy latent variables; The conditional information vector includes static factors controlled during the experiment, such as bacterial species, culture temperature, pH, and nutrient concentration. These conditions affect the metabolic processes of the bacteria and therefore serve as conditional inputs to guide model generation. : Denoising potential variables generated by diffusion transformer; : represents the squared Euclidean norm, which is the mean square error between the two; : Expectation value calculation operation; Model parameters.
[0147] The training objective function measures the reconstruction error of the diffusion model of the real perturbation in the latent space.
[0148] S2.2.3: Constructing a self-conditional bootstrap block
[0149] To improve the accuracy and diversity of condition generation, the latent diffusion transformer introduces a self-conditional guidance mechanism. A self-conditional guidance block is constructed, and conditional and unconditional diffusion models are trained using a classifier-free guidance method. Linear guidance is applied during sampling, and noise is gradually added and a denoising network is trained through the diffusion process. The latent space representation is generated by combining the self-conditional guidance mechanism. Specifically, the final estimate is generated by linearly combining the conditional and unconditional denoising results using the following formula:
[0150]
[0151] in, Conditional noise reduction results; Unconditional noise reduction result; : Guiding strength coefficient (usually set at) (interval); : The combined estimation result during final sampling.
[0152] S2.2.4: Constructing decoding module for model inference and result prediction
[0153] Inference: sampling latent variables from standard normal distribution , and then generating clear latent representation step by step through diffusion inversion, and finally decoding to get the prediction result, i.e. the second prediction result. The inference formula is as follows:
[0154]
[0155]
[0156] where, : latent representation in the current reverse diffusion process, generated at the step and used as input for the next step ; : weight coefficient of time step in the reverse diffusion process, usually a predefined function. controls the proportion of the original input , controls the influence weight of the model denoising output; : conditional denoising output, external conditions such as strain, temperature, pH value, etc. This output is used to restore the true signal in the latent variable that is masked by noise; : noise intensity added during reconstruction in the reverse sampling process. As the time step decreases, tends to decrease, making the final output closer to the clean representation; : noise term sampled from standard normal distribution, used to maintain randomness and diversity in the diffusion process; : decoder module, which maps the final denoised latent representation back to a specific time series prediction result . This module is usually a deep neural network that can restore low-dimensional latent representation to actual observation sequence, such as predicting the concentration change trend of a certain strain under specific conditions.
[0157] The entire inference process simulates a process of gradually recovering meaningful metabolic features from random noise, reflecting the strong expression ability of latent diffusion model in metabolic characteristic prediction.
[0158] S2.3: Constructing an automatic hyperparameter adjustment time fusion transformer model, combining quantile regression and gated residual network, to output the third prediction result;
[0159] The time fusion transformer model models the dependencies between different time steps in time series data. By combining attention mechanisms, gated residual networks, and quantile regression capabilities, it can capture the nonlinear relationship between cell growth and environmental conditions, learn the time dynamics of metabolite concentration, pH value, temperature, nutrient concentration, etc., and output the quantile prediction values of target variables (such as metabolite concentration or decomposition efficiency) to facilitate understanding their distribution characteristics.
[0160] Specifically, constructing a time fusion transformer model with automatic hyperparameter adjustment includes:
[0161] S2.3.1: Encoding dynamic time-series dependencies through a multi-head attention mechanism;
[0162] During the input phase, the time series data first passes through multiple transformer coding layers composed of self-attention mechanisms. These encoders effectively capture the dynamic dependencies between different points in the time series, expressed as:
[0163]
[0164] in, The query matrix is obtained by linear transformation of the input features at the current time step. The key matrix represents the context information of the entire time series. : Value matrix, representing the content representation at each time step; The number of heads; : Corresponding to the The linear transformation matrix of the head; : Represents the i-th independent attention head in a multi-head attention mechanism; Output projection matrix, used to fuse the results of multiple attention heads into a unified representation; This is a multi-head attention mechanism; For splicing operations; For the attention mechanism, the formula is:
[0165]
[0166] : The dimension of the key vector, used for scaling to prevent the gradient from becoming too large; : Normalization operation, used to calculate attention weights between different time steps.
[0167] S2.3.2: Nonlinear mapping is performed using a gated residual network;
[0168] After each coding layer, the data is further fed into a gated residual network for nonlinear mapping. Its structure combines nonlinear activation, residual connections, and gating mechanisms.
[0169] The gating mechanism of the gated residual network is implemented through the following steps: The main input features and context features are linearly transformed and then activated by an ELU to generate intermediate features; the intermediate features undergo a second linear transformation and information flow is controlled by a GLU gating unit, finally concatenated with the input feature residuals and output after layer normalization. The specific expression is as follows:
[0170]
[0171] in, : Main input feature vector; : Contextual features or auxiliary information vectors; Weight matrix; : Bias term; Exponential linear unit activation function (ELF) is used to improve gradient flow. Gated linear units are used to control the flow of information. Gated residual networks; : Intermediate mapping result; LayerNorm: Normalizes the residual output to improve training stability.
[0172] S2.3.3: The uncertainty of the prediction results is modeled using the quantile regression loss function, and the quantile prediction interval of the metabolite concentration is output.
[0173] After the encoding phase, the model integrates the hidden states from different time steps (representing time dependence and trends in bacterial metabolic processes) to capture potential temporal patterns and causal relationships. These are then input into the decoder to obtain quantile regression, predicting catabolism efficiency or product distribution. To obtain the distribution range of variables such as metabolite concentration, the model employs a quantile regression loss function:
[0174]
[0175]
[0176] in, : The output result composed of multiple quantile values predicted by the model, i.e., the third prediction result, is used to reflect the prediction range of metabolite concentration at different confidence levels (e.g., 10%, 50%, 90%); y: the true value vector. : Quantile regression loss function.
[0177] in, : No. The true value of each sample; : No. Predicted values for each sample; : No. quantiles (e.g.) (where n is the median); n is the sample size; The kernel function of the quantile loss function, also called the "check function," functions to: determine if the predicted value... The true value was underestimated. (Right now The loss is... That is, a light penalty; if the predicted value overestimates the actual value ( The loss is... That is, severe punishment.
[0178] This function guides the model to learn to model the uncertainty and range distribution of the target variable. This asymmetric penalty mechanism enables the model to learn the distribution range of the target variable at different probability levels, rather than a single average.
[0179] S2.3.4: Automatically adjust hyperparameters through Bayesian optimization, genetic algorithm or grid search, wherein the hyperparameters include at least one of hidden layer dimension, number of attention heads, learning rate and scaler type.
[0180] To further optimize the performance of the AutoTFT model, an automated hyperparameter tuning mechanism is introduced. The tuned hyperparameters include hidden layer dimension, number of attention heads, learning rate, scaler type, maximum training steps, batch size, and random seed. Different combinations are tried through automatic search (e.g., grid search, Bayesian optimization, or genetic algorithms), and the optimal parameter combination is determined by evaluating performance metrics (e.g., quantile loss) on the validation set.
[0181] S3: The first, second, and third prediction results are weighted and fused to generate the final metabolic characteristic prediction results, including the dynamic change curves and confidence intervals of the release rates of alkaline nitrogen, available phosphorus, and available potassium.
[0182] Step S3 involves analyzing the first, second, and third prediction results output by the three prediction models from steps S2.1 to S2.3. Weighted fusion is performed to generate the final metabolic characteristic prediction results:
[0183]
[0184] in, The final fusion prediction results are used to characterize the metabolic properties of silicate-decomposing bacteria. These represent the first, second, and third prediction results, respectively. , , The weight coefficients for the three models satisfy the following: The weighting coefficients are determined through cross-validation or grid search, with the goal of minimizing the mean square error between the fused predicted values and the true values.
[0185] The deep learning-based method for predicting the metabolic characteristics of silicate-decomposing bacteria according to the above embodiments of the present invention integrates static experimental conditions and dynamic time-series data through multivariate patching technology, constructs an adaptive fusion spatiotemporal graph convolutional network to capture the spatiotemporal dependencies between bacterial species, environment, and metabolites, models uncertainties and non-autoregressive generation using a latent diffusion transformer, and outputs multi-confidence predictions using a time fusion transformer with quantile regression and automatic hyperparameter optimization. Finally, the results of multiple models are weighted and fused. This method overcomes the shortcomings of traditional models in aligning multi-source heterogeneous data, modeling dynamic spatiotemporal dependencies, and quantifying prediction uncertainties. It achieves high-precision prediction of metabolic indicators such as alkaline nitrogen and available phosphorus, provides quantile risk assessment, improves optimization efficiency, and provides an intelligent solution for process control and ecological governance of coal gangue microbial remediation.
[0186] Furthermore, embodiments of this application also provide an electronic device, including: a processor, a memory, and a system bus; the processor and the memory are connected via the system bus; the memory is used to store one or more programs, the one or more programs including instructions, which, when executed by the processor, cause the processor to perform any of the methods described above.
[0187] Furthermore, this application also provides a computer program product that, when run on a terminal device, causes the terminal device to execute any of the methods described above.
[0188] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that all or part of the steps in the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network communication device such as a media gateway, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.
[0189] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0190] It should also be noted that, in the embodiments of this application, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0191] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined in the embodiments of this application may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown in this application, but is to be accorded the widest scope consistent with the principles and novel features disclosed in the embodiments of this application.
Claims
1. A method for predicting the metabolic characteristics of silicate-decomposing bacteria based on deep learning, characterized in that, Includes the following steps: S1: Collect static characteristics including strain type, nutrient substrate composition, pH value, moisture content, and culture temperature, as well as time series dynamic characteristics of alkaline nitrogen, available phosphorus, and available potassium release rates, and perform data preprocessing. S2: Construct a microbial metabolic characteristic prediction model that integrates three deep learning models and perform microbial metabolic characteristic predictions respectively: S2.1: Construct an adaptive fusion spatiotemporal graph convolutional network model. Model the correlation between bacterial species, culture conditions and metabolic indicators through spatiotemporal adjacency matrix. Combine the spatiotemporal graph convolution with multi-step random walk expectation matrix to output the first prediction result. The construction of the adaptive fusion spatiotemporal graph convolutional network model includes: Constructing an adaptive spatiotemporal graph structure includes: using different bacterial species, culture conditions, and metabolites as graph nodes; adaptively constructing spatial adjacency matrices, temporal adjacency matrices, and spatiotemporal adjacency matrices through a node embedding mechanism to model their structural relationships and mutual influences. This includes: using bacterial species, culture conditions, and metabolites as graph nodes; generating an initial spatial adjacency matrix based on learnable parameter matrices H1 and H2; adjusting the directionality of the adjacency matrix using a direction judgment matrix T; and applying ReLU and Sigmoid activation functions to the adjusted adjacency matrix to generate the final spatial adjacency matrix. The formula is as follows: ; in, , These are learnable parameters used to build the initial associations between nodes; The initial spatial adjacency matrix is obtained through matrix multiplication of node embeddings. : Final spatial adjacency matrix; Modify the activation function of the linear unit; Use the Sigmoid activation function; : Determine the matrix, based on Determine edge direction based on the size relationship of elements in the middle; : Determine the value at position (i,j) in the matrix; The strength of the relationship between nodes i and j in the initial adjacency matrix; Constructing the temporal adjacency matrix It is used to characterize the correlation of the same variable at different time points, and its elements are... The definition of is: ; The time adjacency matrix represents the autocorrelation of the same variable at different time points. The element in the i-th row and j-th column of the time adjacency matrix; A spatiotemporal adjacency matrix is generated using a node embedding matrix. This represents the node relationships across time and space, constructed using node embedding vectors and obtained through an activation function: ; Spatiotemporal adjacency matrix, built upon spatial and temporal graphs, integrates spatial and temporal features; : The node relationship matrix calculated based on node embedding; ReLU, Sigmoid: activation functions used to enhance nonlinear expressiveness and control the range of values; Constructing an adaptive fusion spatiotemporal graph convolution module includes: constructing a transition matrix P based on a normalized adjacency matrix A; and designing a multi-step transition expectation matrix based on a random walk according to the transition matrix P. ; Filter the most relevant neighboring nodes and update their transition weights, then perform graph convolution operations to capture the spatiotemporal dependencies of metabolites and obtain the features after graph convolution; ; in, : Adjacency matrix before normalization; The transition probability matrix represents the probability that a node will move to another node after one random walk. A degree matrix is a diagonal matrix whose diagonal elements are... The sum of the number of edges connecting a node to other nodes is calculated using the following formula: ; in, :node The degree, i.e., the node The sum of the number of edges connected to other nodes; : The adjacency matrix represents the nodes To the node Does an edge have a value? ; in, : Multi-step transition expectation matrix The number of transition steps; : Transition matrix Power, meaning The state transition probability after one random walk; From 0 to The cumulative transition expectation within a step represents the integration of multi-layer neighborhood information; The fully connected layer converts the features after graph convolution into predicted values of the target variable, outputting the predicted values of metabolic indicators, i.e., the first prediction result. ; in, The model predicts a certain metabolic index of silicate-decomposing bacteria. : The output feature matrix of the last layer graph convolutional module, where L is the total number of layers; : Learnable weight parameters of the output layer; : The bias term of the output layer; Activation function; S2.2: Construct a latent diffusion transformer model, compress the time series to the latent space through an adaptive normalization layer, generate denoised latent variables using diffusion inversion, and output the second prediction result through a decoder; The construction of the potential diffusion transformer model includes: An adaptive normalization layer is used to perform symmetric compression and dynamic normalization on high-dimensional multivariate time series. The mean and standard deviation are calculated independently for each metabolic indicator to generate a normalized sequence, i.e., a time series sample. ; Construct an encoder-decoder architecture, in which the encoder maps the normalized sequence to a low-dimensional latent space; The normalized time series samples The encoder yields a low-dimensional latent space embedding representation. The training objective function Defined as: ; in, Time step Noisy latent variables; : Conditional information vector, which includes static factors controlled during the experiment, including bacterial species, culture temperature, pH value and nutrient concentration; : Denoising potential variables generated by diffusion transformer; : represents the square Euclidean norm; : Expectation value calculation operation; Model parameters; The latent space representation is generated by progressively adding noise during the diffusion process and training a denoising network, combined with a self-conditional guidance mechanism. This includes: introducing a self-conditional guidance mechanism into the latent diffusion transformer, constructing a self-conditional guidance block, and linearly combining the conditional and unconditional denoising results to generate the final estimate. ; in, Conditional noise reduction results; Unconditional noise reduction result; : Guiding strength coefficient; : The combined estimation results during final sampling; When the decoder performs model inference, it samples latent variables from a standard normal distribution, performs backdiffusion to gradually denoise the data, and then decodes to generate a prediction result, outputting a second prediction result: ; ; in, : The potential representation of the current backdiffusion process, in the th Step generated and used as the next step Input; Time step in the back diffusion process Weighting coefficients; Control maintains the original input proportion, Weights that influence the noise reduction output of the control model; Conditional noise reduction output External conditions including at least one of the following: bacterial strain, temperature, and pH value; : Controlling the noise intensity added during reconstruction in the backsampling process; Noise terms sampled from the standard normal distribution are used to maintain the randomness and diversity of the diffusion process; The decoder module converts the final denoised latent representation... Mapping back to specific time series prediction results ; S2.3: Construct a time fusion transformer model with automatic hyperparameter adjustment, combine quantile regression and gated residual network, and output the third prediction result; The construction of the time fusion transformer model with automatic hyperparameter adjustment includes: The dynamic dependencies of time series data are encoded using a multi-head attention mechanism, and its expression is as follows: ; in, The query matrix is obtained by linear transformation of the input features at the current time step. The key matrix represents the context information of the entire time series. : Value matrix, representing the content representation at each time step; The number of heads; : Corresponding to the The linear transformation matrix of the head; : Represents the i-th independent attention head in a multi-head attention mechanism; Output projection matrix, used to fuse the results of multiple attention heads into a unified representation; This is a multi-head attention mechanism; For splicing operations; For the attention mechanism, the formula is: ; : The dimension of the key vector, used for scaling to prevent the gradient from becoming too large; Normalization is a process used to calculate attention weights between different time steps. Nonlinear mapping is performed using a gated residual network, as shown in the following expression: ; in, : Main input feature vector; : Contextual features or auxiliary information vectors; Weight matrix; : Bias term; Exponential linear unit activation function (ELF) is used to improve gradient flow. Gated linear units are used to control the flow of information. Gated residual networks; : Intermediate mapping result; LayerNorm: Normalizes the residual output; The uncertainty of the prediction results is modeled using a quantile regression loss function, and the quantile prediction interval of metabolite concentration is output. The hyperparameters are automatically adjusted using Bayesian optimization, genetic algorithms, or grid search, and the hyperparameters include at least one of the following: hidden layer dimension, number of attention heads, learning rate, and scaler type. The gating mechanism of the gated residual network is implemented through the following steps: The main input features and context features are linearly transformed and then activated by ELU to generate intermediate features; The intermediate features are subjected to a quadratic linear transformation and the information flow is controlled by the GLU gate unit. Finally, the information is connected to the input feature residual and output after layer normalization. The expression for the quantile regression loss function is as follows: ; ; in, : The output result composed of multiple quantile values predicted by the model, i.e., the third prediction result, is used to reflect the prediction range of metabolite concentration at different confidence levels; y: the true value vector; : Quantile regression loss function; : No. The true value of each sample; : No. The predicted value for each sample; n is the number of samples; : No. 1 quantile; The kernel function of the quantile loss function; S3: The first, second, and third prediction results are weighted and fused to generate the final metabolic characteristic prediction results, including the dynamic change curves and confidence intervals of the release rates of alkaline nitrogen, available phosphorus, and available potassium. The formula is as follows: ; in, The final fusion prediction results are used to characterize the metabolic properties of silicate-decomposing bacteria. These represent the first, second, and third prediction results, respectively. , , The weight coefficients for the three models satisfy the following: The weighting coefficients are determined through cross-validation or grid search, with the goal of minimizing the mean square error between the fused predicted value and the true value.
2. The method for predicting the metabolic characteristics of silicate-decomposing bacteria according to claim 1, characterized in that, in, The data preprocessing includes: The static features and the time series dynamic features are fused and preprocessed using a multivariate patching technique, specifically including: By concatenating the static feature matrix and the dynamic index tensor along the time dimension, an enhanced time series tensor is formed. Maintain time alignment consistency by using zero padding and divide local time period patches by sliding window; Each patch is flattened into a one-dimensional vector of uniform dimension to generate an enhanced feature representation for input to a deep learning model.
Citation Information
Patent Citations
Automatic control method and system based on microbiological detection
CN118932011A
Universal image fusion method and system based on diffusion model
CN119151813A