A method of predicting nitrogen content, program product, device, and storage medium

By combining cluster analysis and data augmentation methods with gradient boosting algorithm, a nitrogen migration and transformation prediction model suitable for small sample and highly heterogeneous data is constructed. This solves the problem of inaccurate prediction of nitrogen distribution in hydrothermal liquefaction process, achieves high-precision three-phase nitrogen distribution prediction, and supports hydrothermal liquefaction process optimization and raw material screening.

CN122369643APending Publication Date: 2026-07-10HEFEI UNIV OF TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HEFEI UNIV OF TECH
Filing Date
2026-05-21
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

In the hydrothermal liquefaction process, the migration and transformation of nitrogen between the oil, water and solid phases are complex, making it difficult to accurately predict nitrogen distribution. In particular, under the conditions of small sample and highly heterogeneous data, model training is prone to overfitting or insufficient prediction accuracy, which affects subsequent resource utilization.

Method used

By using cluster analysis and data augmentation methods, a nitrogen migration and transformation prediction model suitable for small sample sizes and highly heterogeneous data is constructed. The target nitrogen migration and transformation prediction model is established using the gradient boosting algorithm. By combining random perturbation and the Kolmogorov-Smirnov test, the data scale is expanded and the data heterogeneity is reduced, thereby improving the model's prediction accuracy.

Benefits of technology

It enables accurate prediction of three-phase nitrogen distribution under small sample and high heterogeneity conditions, improves the prediction accuracy and generalization ability of the model, and provides reliable data-driven support for hydrothermal liquefaction process optimization and raw material screening.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122369643A_ABST
    Figure CN122369643A_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a nitrogen content prediction method, a program product, an equipment and a storage medium, comprising: obtaining experimental data of each biomass raw material under each hydrothermal liquefaction reaction condition, and constructing a data set according to the experimental data; performing cluster analysis on the data set based on the element composition of the raw material and the organic composition of the raw material to obtain each sub-data set corresponding to the data set; performing data enhancement on each sub-data set according to a predetermined random disturbance to obtain each enhanced sub-data set, and determining a model training data set according to each enhanced sub-data set; training a predetermined initial nitrogen migration and conversion prediction model based on the model training data set to obtain a target nitrogen migration and conversion prediction model. The application constructs a nitrogen migration and conversion prediction model suitable for small sample and high heterogeneity data conditions. The prediction accuracy and generalization ability of the target nitrogen migration and conversion prediction model are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of artificial intelligence technology, and in particular to a method, program product, device and storage medium for predicting nitrogen content. Background Technology

[0002] With the increasing demand for the resource utilization of biomass resources, hydrothermal liquefaction, as a technology that can convert wet biomass into bio-oil, has attracted widespread attention. However, during the hydrothermal liquefaction process, nitrogen-containing compounds in the feedstock undergo complex migration and transformation, leading to a redistribution of nitrogen elements among the oil, water, and solid phases, which affects the resource utilization of subsequent phase products.

[0003] With the rapid development of artificial intelligence, machine learning, as an advanced data-driven method, has been widely applied in the field of biomass hydrothermal conversion. For example, various decision tree models are used to predict the yield of various products after hydrothermal treatment. Currently, some studies use random forest models to predict nitrogen-containing heterocycles in the controlled products, thereby realizing the occurrence pattern of nitrogen in a single product or the prediction of nitrogen-containing heterocyclic products. However, this approach requires a large-scale training dataset to train the model; otherwise, overfitting or insufficient prediction accuracy may occur during training. Therefore, it is difficult to handle the prediction of nitrogen migration and conversion during hydrothermal liquefaction processes with small experimental data scales and strong heterogeneity in data distribution. Summary of the Invention

[0004] This invention provides a nitrogen content prediction method, program product, device, and storage medium. It can complete model training based on small sample and highly heterogeneous data while ensuring the accuracy of model prediction, and obtain a prediction model that can accurately predict the distribution of three-phase nitrogen. Furthermore, the prediction model provides reliable data-driven support for the optimization of hydrothermal liquefaction processes and raw material screening.

[0005] In a first aspect, embodiments of the present invention provide a method for predicting nitrogen content, comprising: Experimental data and field data of each biomass feedstock under various hydrothermal liquefaction reaction conditions are obtained, and a dataset is constructed based on the experimental data and the field data; wherein, the dataset includes feedstock elemental composition, feedstock organic composition, reaction condition data and nitrogen distribution ratio data; Cluster analysis is performed on the dataset based on the elemental composition and organic composition of the raw materials to obtain the corresponding sub-datasets; wherein, the sub-datasets include high protein content biomass sub-datasets, high carbohydrate content biomass sub-datasets and high ash content biomass sub-datasets; Data augmentation is performed on each subset of the dataset according to a predetermined random perturbation to obtain augmented subsets of the dataset, and the model training dataset is determined based on each augmented subset of the dataset. The initial nitrogen migration and transformation prediction model is trained based on the model training dataset to obtain the target nitrogen migration and transformation prediction model; wherein the initial nitrogen migration and transformation prediction model is established according to the gradient boosting algorithm, and the target nitrogen migration and transformation prediction model is used to predict the three-phase nitrogen distribution based on the composition of the raw materials to be processed and the reaction conditions.

[0006] Secondly, embodiments of the present invention provide a nitrogen content prediction device, the device comprising: The dataset construction module is used to acquire experimental data and domain data of various biomass raw materials under various hydrothermal liquefaction reaction conditions, and to construct a dataset based on the experimental data and the domain data; wherein, the dataset includes raw material elemental composition, raw material organic composition, reaction condition data and nitrogen distribution ratio data; The data clustering module is used to perform cluster analysis on the dataset based on the elemental composition and organic composition of the raw materials to obtain the sub-datasets corresponding to the dataset; wherein, the sub-datasets include high protein content biomass sub-datasets, high carbohydrate content biomass sub-datasets and high ash content biomass sub-datasets; The data augmentation module is used to augment each subset of data according to a predetermined random perturbation, to obtain each augmented subset of data, and to determine the model training dataset based on each augmented subset of data. The model training module is used to train a predetermined initial nitrogen migration and transformation prediction model based on the model training dataset to obtain a target nitrogen migration and transformation prediction model; wherein the initial nitrogen migration and transformation prediction model is established according to the gradient boosting algorithm, and the target nitrogen migration and transformation prediction model is used to predict the three-phase nitrogen distribution based on the composition of the raw materials to be processed and the reaction conditions.

[0007] Thirdly, embodiments of the present invention also provide an electronic device, the electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the nitrogen content prediction method as described in any of the embodiments of the present invention.

[0008] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the nitrogen content prediction method as described in any of the embodiments of the present invention.

[0009] Fifthly, embodiments of the present invention provide a computer program product, including a computer program that, when executed by a processor, implements a nitrogen content prediction method as described in any of the embodiments of the present invention.

[0010] In this embodiment of the invention, experimental data and domain data of various biomass raw materials under various hydrothermal liquefaction reaction conditions are acquired, and a dataset is constructed based on the experimental data and domain data. The dataset includes raw material elemental composition, raw material organic composition, reaction condition data, and nitrogen distribution ratio data. Cluster analysis is performed on the dataset based on the raw material elemental composition and raw material organic composition to obtain corresponding sub-datasets. These sub-datasets include high-protein biomass sub-datasets, high-carbohydrate biomass sub-datasets, and high-ash biomass sub-datasets. Data augmentation is performed on each sub-dataset according to a predetermined random perturbation to obtain enhanced sub-datasets, and a model training dataset is determined based on each enhanced sub-dataset. A predetermined initial nitrogen migration and transformation prediction model is trained based on the model training dataset to obtain a target nitrogen migration and transformation prediction model. The initial nitrogen migration and transformation prediction model is established using a gradient boosting algorithm, and the target nitrogen migration and transformation prediction model is used to predict the three-phase nitrogen distribution based on the raw material composition and reaction conditions to be processed. This method, by combining cluster analysis and data augmentation, constructs a nitrogen migration and transformation prediction model suitable for small sample sizes and highly heterogeneous data conditions. Clustering reduces data heterogeneity, and data augmentation expands the effective sample size, enabling the gradient boosting model to fully utilize the expanded data information and improving the prediction accuracy and generalization ability of the target nitrogen migration and transformation prediction model. This allows the target nitrogen migration and transformation prediction model to handle biomass feedstocks with different properties, giving it strong engineering applicability. Attached Figure Description

[0011] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 A flowchart of a nitrogen content prediction method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of cluster analysis and variable contribution results provided in an embodiment of the present invention; Figure 3 This is a graph showing the prediction effect of oil phase nitrogen provided in an embodiment of the present invention; Figure 4 This is a graph showing the prediction effect of solid-phase nitrogen provided in an embodiment of the present invention; Figure 5 A graph showing the prediction effect of aqueous nitrogen in an embodiment of the present invention; Figure 6 This is a schematic diagram of the overall SHAP analysis results provided in an embodiment of the present invention; Figure 7 This is a schematic diagram of the PDP analysis results of nitrogen content in the aqueous phase provided in an embodiment of the present invention; Figure 8 This is a schematic diagram of the PDP analysis results of the nitrogen content in the oil phase provided in an embodiment of the present invention; Figure 9 This is a schematic diagram of the solid-phase nitrogen content PDP analysis results provided in an embodiment of the present invention; Figure 10 This is a schematic diagram of the nitrogen content prediction device provided in an embodiment of the present invention; Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0013] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the invention and not all structures. The acquisition, storage, use, and processing of data in the technical solutions of this application comply with relevant national laws and regulations. It should be noted that, in the embodiments of this application, certain existing industry solutions such as software, components, and models may be mentioned. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solutions of this application, and do not imply that the applicant has already used or necessarily used the relevant content of such solutions.

[0014] Figure 1 This is a flowchart illustrating a nitrogen content prediction method provided in an embodiment of the present invention. The method of this embodiment can complete model training based on small sample, highly heterogeneous data while ensuring model prediction accuracy, resulting in a prediction model that can accurately predict the three-phase nitrogen distribution. Furthermore, the prediction model provides reliable data-driven support for hydrothermal liquefaction process optimization and raw material screening. This method can be executed by a nitrogen content prediction device provided in this embodiment, which can be implemented using software and / or hardware. The following embodiments will illustrate this using the integration of the device into an electronic device as an example. The electronic device can be a server or computer device, etc., used to implement a nitrogen content prediction method. (Refer to...) Figure 1 The method may specifically include the following steps:

[0015] Step 101: Obtain experimental data and domain data of each biomass raw material under various hydrothermal liquefaction reaction conditions, and construct a dataset based on the experimental data and domain data.

[0016] The domain data includes publicly available literature data. The dataset includes raw material elemental composition, raw material organic composition, reaction condition data, and nitrogen distribution ratio data. Raw material elemental composition includes carbon, hydrogen, oxygen, nitrogen, and sulfur content; raw material organic composition includes protein, lipid, carbohydrate, and ash content. Reaction condition parameters include reaction temperature, reaction time, and solids content of the reaction system; reaction temperature is the target temperature reached in the reactor during the hydrothermal liquefaction reaction, expressed in degrees Celsius. Reaction time is the duration the raw material is held at the target temperature, expressed in minutes. Solids content is the ratio of the mass of biomass raw material in the reaction system to the total mass of the entire reaction system, expressed as a percentage by mass. Three-phase nitrogen distribution includes the proportion of nitrogen in the oil phase, the proportion of nitrogen in the solid phase, and the proportion of nitrogen in the aqueous phase.

[0017] In this scheme, a dataset is constructed based on experimental data and domain data, including: outlier detection and processing of experimental data and domain data to obtain processed experimental data and domain data; standardization of processed experimental data and domain data; and determination of the dataset based on standardized experimental data and domain data.

[0018] Outliers are observations that deviate significantly from other data points. Outliers may be caused by experimental errors, recording mistakes, or instrument malfunctions. Removing outliers ensures the reasonableness of the data distribution and avoids the adverse effects of outliers on cluster centers and model parameter estimation. Standardization eliminates differences in units and numerical ranges between different feature variables, bringing all features to the same order of magnitude and providing a reliable data foundation for subsequent cluster analysis and model training. For example, the `StandardScaler` function can be imported from Python's `scikit-learn` library. `StandardScaler` uses the Z-score method to transform the feature variable corresponding to each data point as follows: subtract the mean from the original value of the variable, and then divide by its standard deviation. Thus, the mean of each feature variable is zero, and the standard deviation is one. This standardization effectively prevents features with large numerical ranges from dominating model training, ensuring that the contribution of each feature to the model is measured based on its actual importance rather than its numerical magnitude.

[0019] For example, based on literature and experimental data, experimental data of different biomass feedstocks under different hydrothermal liquefaction reaction conditions were collected to establish a dataset containing feedstock property parameters, reaction conditions, and product nitrogen distribution. The input features of the dataset are feedstock property parameters, including elemental composition: carbon content (C), hydrogen content (H), oxygen content (O), nitrogen content (N), and sulfur content (S); organic composition: protein content, lipid content, carbohydrate content, and ash content; reaction conditions include: reaction temperature, reaction time, and solids content. The output features of the dataset are the proportions of nitrogen in the three phases of the product, namely the proportion of nitrogen distributed in the oil phase, the proportion of nitrogen distributed in the solid phase, and the proportion of nitrogen distributed in the aqueous phase. There are a total of 12 input features and 3 output features. The following descriptors are used to describe the model training, as shown in Table 1 below:

[0020] Table 1 Step 102: Perform cluster analysis on the dataset based on the elemental composition and organic composition of the raw materials to obtain the corresponding sub-datasets.

[0021] Cluster analysis, based on the elemental and organic composition characteristics of the raw materials, divides multi-source biomass data with significant differences in properties into multiple homogeneous subsets, effectively reducing data heterogeneity and creating favorable conditions for subsequent model training. In this scheme, optionally, cluster analysis is performed on the dataset based on the elemental and organic composition of the raw materials to obtain the corresponding subsets. This includes: performing dimensionality reduction on the data in the dataset using a pre-determined principal component analysis method to obtain a dimensionality-reduced dataset; calculating the distance between the current data and the pre-determined cluster centers for each category in the dimensionality-reduced dataset, and determining the category of the current data based on the distance; and determining each subset based on the categories of all data.

[0022] Specifically, Principal Component Analysis (PCA) is used to reduce the dimensionality of the features to be clustered. Nine raw material property features are extracted from the standardized dataset in step 101. These features include five elemental composition indicators (carbon, hydrogen, oxygen, nitrogen, and sulfur content) and one organic composition indicator (protein, lipid, carbohydrate, and ash content). Reaction condition parameters and product distribution parameters are not included in the dimensionality reduction and clustering analysis. Based on the nine standardized features, their covariance matrix is ​​calculated. Eigenvalue decomposition is performed on the covariance matrix to obtain nine eigenvalues ​​and their corresponding eigenvectors. The eigenvalues ​​are sorted from largest to smallest, and the eigenvectors corresponding to the two largest eigenvalues ​​are selected as the first and second principal components. The first and second principal components retain information about the direction of maximum variance in the original data, reflecting the main variation structure of the data. The score of each data point on these two principal components is calculated, i.e., the linear combination of the sample feature vector and the eigenvector, yielding the two-dimensional principal component score coordinates for each data point.

[0023] Furthermore, in the two-dimensional space constructed by principal component scores, the data is divided into three categories based on the characteristics of the raw material element composition: high protein content biomass, high carbohydrate content biomass, and high ash content biomass. Based on the number of categories k (3), k samples are randomly selected as initial cluster centers. Then, each sample (each data point in the dataset) is assigned to the category of its nearest cluster center, forming k clusters. The centroid of each cluster is recalculated as the new cluster center, and the above process is repeated until the cluster centers no longer change significantly or the maximum number of iterations is reached, resulting in high protein content biomass sub-datasets, high carbohydrate content biomass sub-datasets, and high ash content biomass sub-datasets.

[0024] Based on the clustering results, the original dataset was divided into three subsets. The raw material properties within each subset were relatively similar, while the properties of the raw materials differed significantly between the subsets. This division method allows the subsequent model to learn for specific types of raw materials, avoiding interference between different raw material types and thus improving the model's prediction accuracy.

[0025] For example, Figure 2 This is a schematic diagram of cluster analysis and variable contribution results provided in an embodiment of the present invention, as shown below. Figure 2As shown, the horizontal axis represents the first principal component (PC1), and the vertical axis represents the second principal component (PC2). Data points are divided into three categories based on the clustering results, represented by different colors and symbols: category 1 is represented by green dots, category 2 by orange dots, and category 3 by blue dots. Each category is surrounded by a semi-transparent ellipse outlining its approximate distribution range, with a cross near the center of the ellipse indicating the cluster center. Figure 2 The distribution characteristics of the three categories in the principal component space can be determined. Category 1 (green samples) are mainly concentrated in the right region of the first principal component, i.e., the region where PC1 values ​​are positive and relatively large, while PC2 values ​​are more dispersed but mostly concentrated near or slightly above zero. Category 2 (orange samples) are mainly distributed in the upper left region of the first principal component, with PC1 values ​​mostly negative or close to zero, and PC2 values ​​generally high, mostly above zero. Category 3 (blue samples) are concentrated in the lower left region of the first principal component, with PC1 values ​​significantly negative and over a wide range, and PC2 values ​​generally low, mostly below zero. Figure 2 Multiple arrows originating from the origin indicate the loading directions of each original feature variable in the principal component space. The length and direction of the arrows reflect the degree of contribution and positive / negative correlation of the feature to the two principal components. For example, an arrow labeled "CH" points to the lower left, indicating that carbohydrate content is negatively correlated with PC1 and PC2; an arrow labeled "Lip" points to the upper left, indicating that lipid content is negatively correlated with PC1 and positively correlated with PC2; and an arrow labeled "N" points to the upper right, indicating that nitrogen content is positively correlated with PC1 and PC2.

[0026] Step 103: Perform data augmentation on each subset of data according to a predetermined random perturbation to obtain each augmented subset of data, and determine the model training dataset based on each augmented subset of data.

[0027] The random perturbation consists of data that conforms to a normal distribution. Due to the limited sample size (i.e., small data scale) of hydrothermal liquefaction experimental data, new training samples are generated by introducing random perturbations that conform to statistical distribution laws into the original data. This process augments the data in each subset, expanding the data scale while maintaining the distribution characteristics of the original data.

[0028] In this scheme, data augmentation is performed on each subset of data based on a predetermined random perturbation to obtain augmented subsets, and the model training dataset is determined based on each augmented subset. This includes: adding random perturbations to the data features in each subset to obtain augmented subsets; calculating the test statistics of each augmented subset and its corresponding subset according to a preset test method; determining the statistical distribution consistency between each augmented subset and its corresponding subset based on the test statistics; and determining the model training dataset based on each augmented subset if the statistical distribution consistency meets a preset condition.

[0029] The augmented subset is the dataset obtained by augmenting the original subset. The testing method is used to verify whether the augmented data and the original data have no significant difference in distribution. In an optional implementation, data augmentation can be performed independently on each subset. Normally distributed random noise is added to the original subset. The probability density function of normally distributed random noise follows a bell-shaped curve and is determined by two parameters: mean and variance. In this scheme, optionally, the added noise has a mean of zero, and the variance is pre-set based on the data characteristics. A mean of zero ensures that the noise is symmetrically distributed in both positive and negative directions, and will not systematically change the mean level of the original data. The augmented sample value is equal to the original sample value plus a normally distributed random number. For each original sample, different random noises can be added multiple times, thereby generating multiple augmented samples from one original sample. In this way, the sample size of each subset is significantly expanded, effectively alleviating the problem of model overfitting under small sample conditions.

[0030] To ensure the quality of each augmented subset, the Kolmogorov-Smirnov (KS) test was used to evaluate the statistical distribution consistency between each augmented subset and its corresponding subset. The KS test is a non-parametric test used to compare whether two samples come from the same distribution. The KS test calculates the maximum vertical distance between the empirical distribution functions of two samples. If this distance is small, it indicates that the statistical distribution consistency meets the preset conditions, and the model training dataset is determined based on the augmented subset. For example, in each subset, data augmentation was performed by adding normally distributed random noise to the original feature data. The KS test was then used to evaluate the quality of the data augmentation. The results showed that the p-values ​​of most variables were greater than 0.05, and the KS values ​​were less than 0.1, indicating that the augmented data and the original data were not statistically significantly different, proving that the data augmentation process maintained the distribution characteristics of the original data.

[0031] Step 104: Train the predetermined initial nitrogen migration and transformation prediction model based on the model training dataset to obtain the target nitrogen migration and transformation prediction model.

[0032] The initial nitrogen migration and conversion prediction model is established based on the gradient boosting algorithm, while the target nitrogen migration and conversion prediction model is a pre-trained prediction model used to predict the three-phase nitrogen distribution based on the composition of the raw materials to be processed and the reaction conditions. The initial nitrogen migration and conversion prediction model in this scheme is based on the CatBoost algorithm, a gradient boosting decision tree algorithm suitable for processing tabular data. The CatBoost algorithm uses an additive model framework, and the final prediction result is the sum of the predictions from all trees. During training, the algorithm first initializes a baseline prediction value, typically the mean of the target variable in the training set. Then, it enters an iterative loop, training a new decision tree in each round. The learning objective of this tree is the negative gradient between the current model's prediction and the true value, also known as the pseudo-residual. After the new tree is built, its contribution is scaled with a certain learning rate and added to the existing model to update the overall prediction capability. This process is repeated until a preset number of iterations is reached or the performance on the validation set no longer improves.

[0033] This proposed prediction model undertakes a multi-objective regression task, achieving simultaneous prediction of three output targets (three-phase nitrogen distribution) through a shared tree structure and independent leaf weights. Specifically, the splitting structure of each decision tree is identical for all three output targets, meaning nodes are partitioned based on the same features and split points. However, each leaf node contains three independent weight values, corresponding to the residual predictions of the three targets respectively. The prediction model's input consists of twelve feature variables, including nine raw material property parameters (carbon content, hydrogen content, oxygen content, nitrogen content, sulfur content, protein content, lipid content, carbohydrate content, and ash content) and three reaction condition parameters (reaction temperature, reaction time, and solids content). A nitrogen migration and conversion prediction model is established based on the CatBoost algorithm, effectively avoiding the target leakage and prediction bias problems common in traditional gradient boosting algorithms. For small sample datasets after data augmentation, it effectively prevents overfitting while capturing the correlation between the three output variables, ensuring that the sum of the three-phase nitrogen proportions is 100.

[0034] In one alternative implementation, before model training, the dataset is split into training and testing datasets using the `train_test_split` package from the scikit-learn library. 80% of the data points are randomly selected as the training dataset, and the remaining 20% ​​as the testing dataset. The `KFold` package is called from the scikit-learn library to perform hyperparameter optimization. Then, the CatBoost algorithm is used to build an initial nitrogen migration and transformation prediction model. The `CatBoostRegressor` module is imported from the CatBoost library to implement the CatBoost algorithm and complete model training, simultaneously predicting the proportions of nitrogen distributed in the oil phase, the solid phase, and the aqueous phase.

[0035] After the model is trained, it is validated using test data, and relevant evaluation metrics are calculated. The r2_score and mean_squared_error modules are called from the scikit-learn library to calculate the coefficient of determination R. 2 And the root mean square error (RMSE) is used to evaluate the predictive performance of machine learning models. For example, Figure 3 This is a graph illustrating the prediction effect of nitrogen in the oil phase provided in an embodiment of the present invention. Figure 3 As shown, Figure 3 The horizontal axis represents the actual value, and the vertical axis represents the predicted value. Yellow dots represent training set samples, and blue dots represent test set samples. The sample points are distributed along the diagonal, indicating that the predicted values ​​are highly consistent with the actual values. Figure 3 The top left corner shows the evaluation metrics for the training and test sets; the R-squared value for the training set is [R-squared value]. 2 The R value for the test set is 0.999, and the RMSE is 0.556; 2 The value was 0.959, and the RMSE was 3.023. Figure 3 Marginal distribution histograms are appended above and to the right. The upper histogram shows the frequency distribution of the actual values, with yellow representing the training set and blue representing the test set. Both exhibit an approximately normal distribution, with peaks in the middle region and lower frequencies at both ends. The right-hand histogram shows the frequency distribution of the predicted values, similarly distinguished between the training and test sets by yellow and blue. The distribution pattern is largely consistent with the actual values, indicating that the prediction model of this scheme reproduces the distribution characteristics of the data well. Figure 3 A small plot of the residual distribution is embedded in the lower right corner. The horizontal axis represents the residuals, i.e., the difference between the actual and predicted values, and the vertical axis represents the frequency. The residual distribution is approximately symmetrically bell-shaped, centered at zero. The vast majority of residuals are concentrated near zero, indicating that the prediction model has small prediction errors and no significant systematic bias. The peaks of the residual distribution are sharp, and the tails are thin, indicating that the prediction model has high prediction stability and a low probability of extreme errors.

[0036] Figure 4 The image shows the prediction effect of solid-phase nitrogen provided in the embodiment of the present invention. Figure 4 R in the training set 2 The R value is 1.000, and the RMSE is 0.293; the R value of the test set is... 2 The value is 0.968, and the RMSE is 2.846. Its basic structure is described as follows: Figure 3 The same applies, so I won't repeat it here. From Figure 4 The results show that the coefficients of determination for both the training and test sets are close to the standard, and the residual distribution is highly concentrated. This indicates that the prediction model can accurately capture the complex distribution of nitrogen in this phase during hydrothermal liquefaction, and the prediction reliability is high.

[0037] Figure 5 The image shows the prediction effect of nitrogen in the aqueous phase provided in the embodiment of the present invention. Figure 5 R in the training set 2 The R value for the test set is 0.999, and the RMSE is 0.497; 2 The value is 0.965, and the RMSE is 3.453. Its basic structure is described as follows: Figure 3 and Figure 4 The same applies, so I won't repeat it here. From Figure 5 The results show that the coefficients of determination for both the training and test sets are at a high level, and the residual distribution is basically symmetrical, indicating that the prediction model can effectively capture the distribution pattern of nitrogen in this phase during hydrothermal liquefaction.

[0038] This scheme, after completing model training, also includes: determining the contribution of each training feature corresponding to the model training dataset to the output result based on a pre-determined interpretability algorithm; identifying key variables based on the model training dataset; conducting an impact analysis on the key variables using pre-determined visualization tools to obtain the influence trend of the key variables on the three-phase nitrogen distribution predicted by the model training dataset; and optimizing the target nitrogen migration and transformation prediction model based on the contribution and influence trend.

[0039] The output is the three-phase nitrogen distribution predicted by the target nitrogen migration and transformation prediction model based on the model training dataset. The interpretability algorithm in this scheme can be the SHAP (Shapley Additive Explanations) algorithm. After model training is complete, the contribution of each input variable to the prediction result is calculated using the SHAP method, and the influence trend of key variables on nitrogen migration behavior is analyzed using partial dependency graphs. SHAP values ​​are calculated separately for each sample, each feature, and each output target in the model training dataset. Since the prediction model in this scheme performs multi-target prediction, the SHAP values ​​for each of the three-phase nitrogen distributions are calculated independently. That is, each feature of each sample corresponds to three SHAP values. Based on these SHAP values, the contribution of that feature to the prediction of oil-phase nitrogen, solid-phase nitrogen, and aqueous-phase nitrogen can be measured separately. For example, Figure 6 This is a schematic diagram of the overall SHAP analysis results provided in an embodiment of the present invention. Figure 6 The horizontal axis represents the Mean Absolute Sharpness (SHAP) value, which is the contribution of a feature to the model output; a larger value indicates a higher importance of the feature. The vertical axis lists the twelve input features from top to bottom, arranged in ascending order of importance. Figure 6 As can be seen from the data: lipid content (Lip) has the lowest average absolute SHAP value, indicating that it has the smallest overall contribution to the prediction model; ash content (Ash) and carbon content (C) are of slightly lower importance; protein content (Pro), carbohydrate content (CH), oxygen content (O), and sulfur content (S) are of moderate to low importance; reaction time (Time) and hydrogen content (H) are of moderate importance; solids content (MR) is of relatively high importance; reaction temperature (T) is of even higher importance; and raw material nitrogen content (N) is the variable that contributes the most to the model prediction among all features.

[0040] Key variables are pre-determined based on domain data and model training data. In this scheme, key variables may include raw material nitrogen content, reaction temperature, solids content, and hydrogen content. The visualization tool in this scheme can be a partial dependency plot (PDP) visualization tool. The visualization results show the influence trend of key variable changes on the three-phase nitrogen distribution. The analysis variables and analysis range are determined. In one optional implementation, for each key variable, a series of equally spaced grid points are selected within its actual value range (e.g., for a reaction temperature between 250°C and 350°C, one grid point is set every 10°C, for a total of eleven analysis points). For each grid point of each key variable, the value of that key variable in all samples of the training dataset is replaced with the current grid point value, while other variables remain unchanged, forming a set of modified pseudo-samples. The pseudo-samples are input into the target nitrogen migration and transformation prediction model to obtain the predicted value of the three-phase nitrogen distribution. The average of the predicted values ​​of all pseudo-samples is taken to obtain the partial dependency value corresponding to that grid point. Furthermore, using the values ​​of the key variables on the horizontal axis and the corresponding partial dependence values ​​on the vertical axis, three curves were plotted for oil phase nitrogen, solid phase nitrogen, and aqueous phase nitrogen, respectively, to form a PDP analysis chart for this variable.

[0041] For example, Figure 7 This is a schematic diagram of the PDP analysis results of the nitrogen content in the aqueous phase provided in an embodiment of the present invention. Figure 7 The horizontal axis of the top-left subplot represents the nitrogen content (N) of the raw material, and the vertical axis represents the nitrogen percentage in the aqueous phase (N_ap). From Figure 7 As can be seen from the top left subplot, the nitrogen content of the raw material has a significant positive impact on the nitrogen ratio in the aqueous phase; the higher the nitrogen content, the greater the proportion of nitrogen enriched in the aqueous phase. Figure 7 The horizontal axis of the top right subplot represents the reaction temperature (T), and the vertical axis represents the nitrogen content in the aqueous phase (N_ap). From Figure 7 The upper right subplot shows that temperature has a significant threshold effect on the nitrogen content in the aqueous phase. The mid-temperature range is conducive to nitrogen retention in the aqueous phase, while high temperature promotes nitrogen migration to other phases. Figure 7 The horizontal axis of the lower left subplot represents the solids content (MR), and the vertical axis represents the nitrogen content in the aqueous phase (N_ap). From Figure 7 As can be seen from the lower left subplot, the solids content has a negative impact on the nitrogen content in the aqueous phase, and a high solids content inhibits the enrichment of nitrogen in the aqueous phase. Figure 7 The horizontal axis of the lower right subplot represents hydrogen content (H), and the vertical axis represents the percentage of nitrogen in the aqueous phase (N_ap). From Figure 7 The lower right subplot shows that hydrogen content has an overall negative impact on the nitrogen content in the aqueous phase. High hydrogen content may promote hydrogenation reactions, causing nitrogen to transfer from the aqueous phase to the oil phase.

[0042] Figure 8 This is a schematic diagram of the PDP analysis results of the nitrogen content in the oil phase provided in an embodiment of the present invention. Figure 8 The horizontal axis of the top-left subplot represents the nitrogen content (N) of the feedstock, and the vertical axis represents the nitrogen percentage in the oil phase (N_oil). From Figure 8 As can be seen from the top left subplot, the nitrogen content of the feedstock has a significant negative impact on the nitrogen ratio in the oil phase. The higher the nitrogen content, the lower the proportion of nitrogen enriched in the oil phase, and nitrogen tends to be distributed to the aqueous or solid phase. Figure 8 The horizontal axis of the upper right subplot represents the reaction temperature (T), and the vertical axis represents the nitrogen content in the oil phase (N_oil). From Figure 8 As can be seen from the upper right subplot, temperature has a significant positive effect on the nitrogen content in the oil phase. High temperature promotes pyrolysis and cracking reactions, allowing more nitrogen-containing compounds to enter the oil phase products. Figure 8 The horizontal axis of the lower left subplot represents reaction time (Time), and the vertical axis represents the nitrogen content in the oil phase (N_oil). From Figure 8 As can be seen from the lower left subplot, extending the reaction time has an overall negative impact on the nitrogen content in the oil phase, but there is a period of rapid change and a stable plateau period. Figure 8 The horizontal axis of the lower right subplot represents solids content (MR), and the vertical axis represents the nitrogen content in the oil phase (N_oil). From Figure 8 As can be seen from the lower right subplot, the effect of solids content on the nitrogen content in the oil phase has a complex, non-monotonic relationship. Medium solids content is not conducive to nitrogen enrichment in the oil phase, while high solids content promotes the recovery of nitrogen content in the oil phase.

[0043] Figure 9 This is a schematic diagram of the solid-phase nitrogen content PDP analysis results provided in an embodiment of the present invention. Figure 9 The horizontal axis of the top-left subplot represents the reaction temperature (T), and the vertical axis represents the percentage of solid-phase nitrogen (N_sd). From Figure 9 As can be seen from the top left subplot, the reaction temperature has a significant negative impact on the nitrogen content in the solid phase. High temperature promotes the decomposition of organic matter in the solid phase, causing nitrogen to be released from the solid phase and transferred to the oil or aqueous phase. Figure 9The horizontal axis of the upper right subplot represents the nitrogen content (N) of the raw material, and the vertical axis represents the proportion of solid nitrogen (N_sd). From Figure 9 As can be seen from the upper right subplot, the nitrogen content of the raw material has a negative impact on the proportion of nitrogen in the solid phase. The higher the nitrogen content, the lower the proportion of nitrogen remaining in the solid phase, and the more likely nitrogen is to be allocated to the aqueous or oil phase. Figure 9 The horizontal axis of the lower left subplot represents the solids content (MR), and the vertical axis represents the percentage of nitrogen in the solid phase (N_sd). From Figure 9 As can be seen from the lower left subplot, the solid content has a significant positive impact on the proportion of nitrogen in the solid phase, and a high solid content is beneficial for nitrogen to be retained in the solid phase. Figure 9 The horizontal axis of the lower right subplot represents protein content (Pro), and the vertical axis represents the percentage of solid-phase nitrogen (N_sd). From Figure 9 The lower right subplot shows that protein content has an overall negative impact on the proportion of nitrogen in the solid phase, but there is an optimal low range; excessively high or low protein content is not conducive to minimizing the proportion of nitrogen in the solid phase. From... Figures 7-9 Multiple influence modes can be identified from the PDP curves. For example, a monotonically increasing mode indicates a positive correlation between the variable and the target nitrogen phase proportion, a monotonically decreasing mode indicates a negative correlation, and a non-monotonic mode suggests the existence of an optimal range or competitive mechanism. For instance, the PDP curve of reaction temperature on oil phase nitrogen shows a trend of rapid initial increase followed by a flattening, indicating that the pyrolysis reaction dominates in the mid-temperature region, causing nitrogen to migrate to the oil phase, while the gain weakens due to excessive pyrolysis in the high-temperature region. The curve of solid phase nitrogen shows a monotonically decreasing trend, indicating that increasing temperature promotes the decomposition of solid phase organic matter, releasing nitrogen from the solid phase. The curve of aqueous phase nitrogen shows an inverted U-shape, first rising and then falling, indicating the existence of an optimal temperature window for aqueous phase nitrogen accumulation.

[0044] Furthermore, the target nitrogen migration and transformation prediction model is optimized based on contribution and influence trends. For example, SHAP contribution analysis can identify features with extremely low or even negative contributions. For instance, if the SHAP value for carbohydrate content is generally close to zero, it indicates that this feature provides almost no incremental information for predicting the three-phase nitrogen distribution, or its information has been redundantly covered by other features. In this case, the feature can be removed from the model input, simplifying the model structure, reducing the risk of overfitting, while maintaining or even improving prediction accuracy. Based on the nonlinear trend revealed by the PDP curve, the perturbation range of data augmentation is adjusted. If a key variable exhibits drastic changes in a specific interval, and the original data samples in that interval are sparse, the data augmentation intensity in that interval can be increased specifically to supplement training samples and improve the model's prediction stability in that sensitive interval.

[0045] For example, the target nitrogen migration and transformation prediction model is used to predict and analyze the reaction results in actual experiments. The target nitrogen migration and transformation prediction model "CatBoost_MultiTarget_Model.cbm" and the standardized data modules "scaler_X.pkl", "scaler_Y.pkl", "features.pkl", and "targets.pkl" are imported. The data to be predicted is saved as a CSV file. After checking for missing feature columns, the data to be predicted is standardized, predicted, and then destandardized before importing the prediction results. In Example 1, the various features are Pro (%) 53, Lip (%) 18, CH (%) 11, Ash (%) 18, C (%) 37.72, H (%) 6.56, O (%) 28.7, N (%) 8.36, S (%) 0.66, MR (%) 16, T (°C) 300, and Time. (min) 5, N_oil (%) 28, N_sd (%) 10, N_ap (%) 62, the model prediction results are N_oil (%) = 27.48, N_sd (%) = 16.69, N_ap (%) = 56.15 For example, the target nitrogen migration and transformation prediction model is used to predict and analyze reaction results in actual experiments. The target nitrogen migration and transformation prediction model "CatBoost_MultiTarget_Model.cbm" and the standardized data modules "scaler_X.pkl", "scaler_Y.pkl", "features.pkl", and "targets.pkl" are imported. The data to be predicted is saved as a CSV file. After checking for missing feature columns, the data to be predicted is standardized, predicted, and then destandardized before being imported. The test results show that in Example 3, the features are Pro (%) 53, Lip (%) 18, CH (%) 11, Ash (%) 18, C (%) 37.72, H (%) 6.56, O (%) 28.7, N (%) 8.36, S (%) 0.66, MR (%) 16, T (°C) 350, Time (min) 5, N_oil (%) 39, N_sd (%) 4, and N_ap (%) 56. The model prediction results are N_oil (%) = 35.54, N_sd (%) = 12.01, and N_ap (%) = 52.6. For example, the target nitrogen migration and transformation prediction model is used to predict and analyze the reaction results in actual experiments. The target nitrogen migration and transformation prediction model "CatBoost_MultiTarget_Model.cbm" and the standardized data modules "scaler_X.pkl", "scaler_Y.pkl", "features.pkl", and "targets.pkl" are imported. The data to be predicted is saved as a CSV file. After checking for missing feature columns, the data to be predicted is standardized, predicted, and then destandardized before importing the prediction results. In Example 4, the various features are Pro (%) 58, Lip (%) 14, CH (%) 22, Ash (%) 6, C (%) 39.48, H (%) 6.11, O (%) 38.07, N (%) 7.52, S (%) 2.82, MR (%) 16, T (°C) 300, and Time. (min) 5, N_oil (%) 24, N_sd (%) 12, N_ap (%) 64, the model prediction results are N_oil (%) = 26.87, N_sd (%) = 21.88, N_ap (%) = 51.76 For example, the target nitrogen migration and transformation prediction model is used to predict and analyze the reaction results in actual experiments. The target nitrogen migration and transformation prediction model "CatBoost_MultiTarget_Model.cbm" and the standardized data modules "scaler_X.pkl", "scaler_Y.pkl", "features.pkl", and "targets.pkl" are imported. The data to be predicted is saved as a CSV file. After checking for missing feature columns, the data to be predicted is standardized, predicted, and then destandardized before importing the prediction results. In Example 5, the various features are Pro (%) 58, Lip (%) 14, CH (%) 22, Ash (%) 6, C (%) 39.48, H (%) 6.11, O (%) 38.07, N (%) 7.52, S (%) 2.82, MR (%) 16, T (°C) 350, and Time. (min) 5, N_oil (%) 35, N_sd (%) 19.64, N_ap (%) 45.36, the model prediction results are N_oil (%) = 31.61, N_sd (%) = 15.26, N_ap (%) = 53.85 The technical solution of this embodiment acquires experimental data of various biomass feedstocks under various hydrothermal liquefaction reaction conditions, and constructs a dataset based on the experimental data. The dataset includes feedstock elemental composition, feedstock organic composition, reaction condition data, and nitrogen distribution ratio data. Cluster analysis is performed on the dataset based on the feedstock elemental composition and organic composition to obtain corresponding subsets. These subsets include high-protein biomass subsets, high-carbohydrate biomass subsets, and high-ash biomass subsets. Data augmentation is performed on each subset based on a predetermined random perturbation to obtain augmented subsets, and a model training dataset is determined based on these augmented subsets. A predetermined initial nitrogen migration and transformation prediction model is trained on the model training dataset to obtain a target nitrogen migration and transformation prediction model. The initial nitrogen migration and transformation prediction model is established using a gradient boosting algorithm, and the target nitrogen migration and transformation prediction model is used to predict the three-phase nitrogen distribution based on the feedstock composition and reaction conditions. This embodiment, by combining cluster analysis, data augmentation, and gradient boosting algorithms, constructs a nitrogen migration and transformation prediction model suitable for small sample sizes and highly heterogeneous data conditions. Clustering reduces data heterogeneity, data augmentation expands the effective sample size, and the gradient boosting model fully utilizes the expanded data information, improving the prediction accuracy and generalization ability of the target nitrogen migration and transformation prediction model. This enables the target nitrogen migration and transformation prediction model to handle biomass feedstocks with different properties, giving it strong engineering applicability.

[0046] Figure 10 This is a schematic diagram of the nitrogen content prediction device provided in an embodiment of the present invention. This device is suitable for executing the nitrogen content prediction method provided in an embodiment of the present invention. Figure 10 As shown, the device may specifically include:

[0047] The dataset construction module 1001 is used to acquire experimental data and domain data of each biomass raw material under various hydrothermal liquefaction reaction conditions, and construct a dataset based on the experimental data and the domain data; wherein, the dataset includes raw material elemental composition, raw material organic composition, reaction condition data and nitrogen distribution ratio data; The data clustering module 1002 is used to perform clustering analysis on the dataset based on the elemental composition and organic composition of the raw materials to obtain each sub-dataset corresponding to the dataset; wherein, the sub-dataset includes a high protein content biomass sub-dataset, a high carbohydrate content biomass sub-dataset, and a high ash content biomass sub-dataset. The data augmentation module 1003 is used to augment each subset of data according to a predetermined random perturbation to obtain each augmented subset of data, and to determine the model training dataset according to each augmented subset of data. The model training module 1004 is used to train a predetermined initial nitrogen migration and transformation prediction model based on the model training dataset to obtain a target nitrogen migration and transformation prediction model; wherein the initial nitrogen migration and transformation prediction model is established according to the gradient boosting algorithm, and the target nitrogen migration and transformation prediction model is used to predict the three-phase nitrogen distribution based on the composition of the raw materials to be processed and the reaction conditions.

[0048] Optionally, the dataset construction module 1001 is specifically used to: perform outlier detection and processing on the experimental data and the domain data to obtain processed experimental data and domain data; The processed experimental data and domain data are standardized, and the dataset is determined based on the standardized experimental data and domain data.

[0049] Optionally, the elemental composition of the raw material includes carbon content, hydrogen content, oxygen content, nitrogen content, and sulfur content; the organic composition of the raw material includes protein content, lipid content, carbohydrate content, and ash content.

[0050] Optionally, the data clustering module 1002 is specifically used to: perform dimensionality reduction processing on the data in the dataset according to a predetermined principal component analysis method to obtain a dimensionality-reduced dataset; For each data point in the dimensionality-reduced dataset, calculate the distance between the current data and the pre-determined cluster centers of each category, and determine the category of the current data based on the distance. The sub-datasets are determined based on the categories of all the data.

[0051] Optionally, the data augmentation module 1003 is specifically used to: add the random perturbation to the data features in each subset of data to obtain each augmented subset of data; wherein the random perturbation conforms to a normal distribution; The test statistics for each enhanced subset of data and its corresponding subset are calculated according to the preset test method. The statistical distribution consistency between each enhanced subset of data and its corresponding subset is determined based on the test statistic. If the statistical distribution consistency meets the preset conditions, then the model training dataset is determined based on each augmented subset dataset.

[0052] Optionally, the model training module 1004 is specifically used to: determine the contribution of each training feature corresponding to the model training dataset to the output result based on a pre-determined interpretability algorithm; the output result is the three-phase nitrogen distribution predicted by the target nitrogen migration and transformation prediction model based on the model training dataset; Key variables were determined based on the training dataset of the model. The influence analysis of the key variables is determined by using a pre-defined visualization tool to obtain the trend of the influence of the key variables on the three-phase nitrogen distribution predicted by the model training dataset; The target nitrogen migration and transformation prediction model is optimized based on the contribution and the influence trend.

[0053] Optionally, the reaction condition parameters include reaction temperature, reaction time, and solid content of the reaction system; the three-phase nitrogen distribution includes the proportion of nitrogen in the oil phase, the proportion of nitrogen in the solid phase, and the proportion of nitrogen in the aqueous phase.

[0054] The nitrogen content prediction device provided in this embodiment of the invention can execute the nitrogen content prediction method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method. Content not described in detail in this embodiment can be referred to the description in any method embodiment of the invention.

[0055] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention, with reference to... Figure 11 , Figure 11 The electronic device 12 shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this application. Figure 11 As shown, the electronic device 12 is represented in the form of a general-purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and bus 18 connecting different system components (including system memory 28 and processing unit 16).

[0056] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0057] Electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 12, including volatile and non-volatile media, removable and non-removable media.

[0058] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (… Figure 11 Not shown; usually referred to as a "hard drive"). Although Figure 11 As not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this application.

[0059] A program / utility 40 having a set (at least one) of program modules 46 may be stored, for example, in system memory 28. Such program modules 46 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 46 typically perform the functions and / or methods described in the embodiments of this application.

[0060] Electronic device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with electronic device 12, and / or with any device that enables electronic device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 22. Furthermore, electronic device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of electronic device 12 via bus 18. It should be understood that, although... Figure 11 As not shown, other hardware and / or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0061] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28. For example, it implements a nitrogen content prediction method provided in this embodiment of the invention: acquiring experimental data and domain data of each biomass raw material under various hydrothermal liquefaction reaction conditions, and constructing a dataset based on the experimental data and the domain data; wherein the dataset includes raw material elemental composition, raw material organic composition, reaction condition data, and nitrogen distribution ratio data; performing cluster analysis on the dataset based on the raw material elemental composition and the raw material organic composition to obtain each sub-dataset corresponding to the dataset; wherein the sub-dataset includes high-protein... The datasets are categorized into three sub-datasets: one with high protein content, one with high carbohydrate content, and one with high ash content. Each sub-dataset is augmented with a predetermined random perturbation to obtain augmented sub-datasets. A model training dataset is then determined based on these augmented sub-datasets. A predetermined initial nitrogen migration and transformation prediction model is trained on the model training dataset to obtain a target nitrogen migration and transformation prediction model. The initial nitrogen migration and transformation prediction model is established using a gradient boosting algorithm, and the target nitrogen migration and transformation prediction model is used to predict the three-phase nitrogen distribution based on the composition of the raw materials to be processed and the reaction conditions.

[0062] This invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements a nitrogen content prediction method as provided in all embodiments of this invention: acquiring experimental data and domain data of various biomass raw materials under various hydrothermal liquefaction reaction conditions, and constructing a dataset based on the experimental data and the domain data; wherein the dataset includes raw material elemental composition, raw material organic composition, reaction condition data, and nitrogen distribution ratio data; performing cluster analysis on the dataset based on the raw material elemental composition and the raw material organic composition to obtain sub-datasets corresponding to the dataset; wherein the sub-datasets include high The dataset comprises three sub-datasets: one with high protein content, one with high carbohydrate content, and one with high ash content. Each sub-dataset is augmented with a predetermined random perturbation to obtain augmented sub-datasets, and a model training dataset is determined based on these augmented sub-datasets. A predetermined initial nitrogen migration and transformation prediction model is trained on the model training dataset to obtain a target nitrogen migration and transformation prediction model. The initial nitrogen migration and transformation prediction model is established using a gradient boosting algorithm, and the target nitrogen migration and transformation prediction model is used to predict the three-phase nitrogen distribution based on the composition of the raw materials to be processed and the reaction conditions. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor electronic devices, apparatuses, or devices, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used or combined with an electronic device, apparatus, or device by instructions to execute it.

[0063] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in conjunction with an electronic device, apparatus, or device that executes instructions.

[0064] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0065] Computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0066] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A method for predicting nitrogen content, characterized in that, The method includes: Experimental data and field data of each biomass feedstock under various hydrothermal liquefaction reaction conditions are obtained, and a dataset is constructed based on the experimental data and the field data; wherein, the dataset includes feedstock elemental composition, feedstock organic composition, reaction condition data and nitrogen distribution ratio data; Cluster analysis is performed on the dataset based on the elemental composition and organic composition of the raw materials to obtain the corresponding sub-datasets; wherein, the sub-datasets include high protein content biomass sub-datasets, high carbohydrate content biomass sub-datasets and high ash content biomass sub-datasets; Data augmentation is performed on each subset of the dataset according to a predetermined random perturbation to obtain augmented subsets of the dataset, and the model training dataset is determined based on each augmented subset of the dataset. The initial nitrogen migration and transformation prediction model is trained based on the model training dataset to obtain the target nitrogen migration and transformation prediction model; wherein the initial nitrogen migration and transformation prediction model is established according to the gradient boosting algorithm, and the target nitrogen migration and transformation prediction model is used to predict the three-phase nitrogen distribution based on the composition of the raw materials to be processed and the reaction conditions.

2. The method according to claim 1, characterized in that, A dataset is constructed based on the experimental data and the domain data, including: Outlier detection and processing are performed on the experimental data and the domain data to obtain processed experimental data and domain data. The processed experimental data and domain data are standardized, and the dataset is determined based on the standardized experimental data and domain data.

3. The method according to claim 1, characterized in that, The elemental composition of the raw materials includes carbon content, hydrogen content, oxygen content, nitrogen content, and sulfur content; the organic composition of the raw materials includes protein content, lipid content, carbohydrate content, and ash content.

4. The method according to claim 3, characterized in that, Cluster analysis is performed on the dataset based on the elemental composition and organic composition of the raw materials to obtain the corresponding sub-datasets, including: The data in the dataset is dimensionality reduced according to a predetermined principal component analysis method to obtain a dimensionality-reduced dataset. For each data point in the dimensionality-reduced dataset, calculate the distance between the current data and the pre-determined cluster centers of each category, and determine the category of the current data based on the distance. The sub-datasets are determined based on the categories of all the data.

5. The method according to claim 1, characterized in that, Data augmentation is performed on each subset of the dataset according to a predetermined random perturbation to obtain augmented subsets, and a model training dataset is determined based on each augmented subset, including: The random perturbation is added to the data features of each subset of data to obtain each enhanced subset of data; wherein the random perturbation conforms to a normal distribution; The test statistics for each enhanced subset of data and its corresponding subset are calculated according to the preset test method. The statistical distribution consistency between each enhanced subset of data and its corresponding subset is determined based on the test statistic. If the statistical distribution consistency meets the preset conditions, then the model training dataset is determined based on each augmented subset dataset.

6. The method according to claim 1, characterized in that, The method further includes: The output result is the three-phase nitrogen distribution predicted by the target nitrogen migration and transformation prediction model based on the model training dataset, according to a predetermined interpretability algorithm. Key variables were determined based on the training dataset of the model. The influence analysis of the key variables is determined by using a pre-defined visualization tool to obtain the trend of the influence of the key variables on the three-phase nitrogen distribution predicted by the model training dataset; The target nitrogen migration and transformation prediction model is optimized based on the contribution and the influence trend.

7. The method according to claim 1, characterized in that, The reaction condition parameters include reaction temperature, reaction time, and solid content of the reaction system; the three-phase nitrogen distribution includes the proportion of nitrogen in the oil phase, the proportion of nitrogen in the solid phase, and the proportion of nitrogen in the aqueous phase.

8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the nitrogen content prediction method as described in any one of claims 1-7.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the nitrogen content prediction method as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the nitrogen content prediction method as described in any one of claims 1 to 7.