Compost maturity prediction method based on LightGBM model

The composting ripening index is predicted through the LightGBM model, and the seed germination index is output using the index data of the composting sample, which solves the rapid, accurate and linear problems of composting ripening prediction in the prior art, and promotes the automated control of the composting process.

CN119129383APending Publication Date: 2024-12-13HUNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411123002.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The prior art cannot predict the compost rigor quickly, accurately and online, resulting in difficulty in controlling the compost process and consuming a lot of manpower and time.

Method used

Using the LightGBM model, the predictive model is constructed by collecting the index data of the composting samples (compost time, temperature, pH, conductivity, humidity, electron acceptance and electron delivery ability of soluble organic matter), output the seed germination index and predict the corruption degree, and optimize the Data processing and model training to improve prediction accuracy.

Benefits of technology

Fast and accurate prediction of compost rigor is achieved, and fully automatic or semi-automatic control of the compost process is supported, reducing labor and time costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119129383A_ABST
    Figure CN119129383A_ABST
Patent Text Reader

Abstract

The invention discloses a compost maturity prediction method based on a LightGBM model, and the method comprises the following steps: collecting index data of a to-be-detected compost sample, the index data comprising compost time, temperature, pH, conductivity, humidity, EDC and EAC; according to the index data, utilizing a preset LightGBM model to output a seed germination index of the compost sample to be detected; and predicting the decomposition degree of the compost sample to be detected according to the seed germination index. According to the compost maturity prediction method based on the LightGBM model, the seed germination index of the compost sample to be detected can be rapidly and accurately obtained by utilizing the preset LightGBM model according to the index data of the compost sample, so that the compost maturity can be predicted according to the seed germination index of the compost sample to be detected, online prediction of the compost maturity can be realized, and the compost maturity prediction efficiency is improved. And the method has important promotion significance for realizing full-automatic or semi-automatic control of the composting process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of compost maturity prediction, and relates to a compost maturity prediction method based on a LightGBM model. Background Art

[0002] With the rapid development of economy and the continuous improvement of people's living standards, the solid waste generated in production and life is also increasing. Composting solid waste can achieve large-scale treatment of solid waste and has become a means of solid waste resource utilization in line with the development of the current era. Maturity is an important indicator for judging the composting process. Therefore, predicting the maturity of compost has important practical significance for the control of modern fully automatic or semi-automatic composting process.

[0003] At present, the main indicator used to predict the maturity of compost is the seed germination index (GI). However, the current GI detection requires professionals to conduct a 48-hour germination test and measure and calculate the germination length of each seed by manual measurement, which results in a huge consumption of manpower and time for the prediction of compost maturity. In order to save the time of maturity prediction, researchers have proposed a compost maturity prediction method based on a machine learning model, which uses a variety of machine learning methods and uses moisture content, temperature, pH and E4 / E6 to predict the maturity of compost. However, the above method can only make a rough prediction of the maturity of compost, that is, it can only qualitatively judge whether the compost is "mature" or "unmature", and cannot perform regression analysis on the GI value, so it is difficult to obtain an accurate GI value, and it is difficult to quickly, accurately and online predict the maturity of compost through the GI value. Therefore, obtaining a method for quickly, accurately and online predicting the maturity of compost is of great significance for realizing the full automatic or semi-automatic control of the composting process. Summary of the invention

[0004] The technical problem to be solved by the present invention is to overcome the deficiencies of the prior art and provide a compost maturity prediction method based on the LightGBM model.

[0005] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0006] A compost maturity prediction method based on the LightGBM model includes the following steps:

[0007] (1) collecting index data of the compost sample to be tested, wherein the index data include composting time, temperature, pH, conductivity, humidity, dissolved organic matter electron accepting capacity (EAC), dissolved organic matter electron donating capacity (EDC);

[0008] (2) According to the index data obtained in step (1), the seed germination index of the compost sample to be tested is output using the preset LightGBM model;

[0009] (3) Predicting the maturity of the compost sample to be tested based on the seed germination index of the compost sample to be tested obtained in step (2).

[0010] The above-mentioned compost maturity prediction method based on the LightGBM model is further improved. In step (2), the method for constructing the LightGBM model includes the following steps:

[0011] S1. Obtaining index data of different compost samples to form a data set; the index data of each sample in the data set includes composting time, temperature, pH, conductivity, humidity, EAC, and EDC;

[0012] S2, removing outliers from the data set obtained in step S1;

[0013] S3, dividing the data set obtained in step S2 to obtain a training set and a test set;

[0014] S4, use the training set divided in step S3 to train the LightGBM model;

[0015] S5. Use the test set divided in step S3 to evaluate the LightGBM model trained in step S4. After the evaluation is qualified, the LightGBM model is obtained.

[0016] The above-mentioned compost maturity prediction method based on the LightGBM model is further improved. In step S1, when obtaining the indicator data of the sample, if the indicator data of the sample is missing, the data of the previous day and the next day of the sample are used for linear regression data filling, and the average is taken to replace the missing indicator data.

[0017] The above-mentioned compost maturity prediction method based on the LightGBM model is further improved. In step S2, the data set obtained in step S1 is removed for outliers, and the steps include:

[0018] S2.1, use the RobustScaler method to normalize the indicator data in the dataset;

[0019] S2.2. Use the Z-score method to filter outliers on the normalized data and discard data that exceeds the outlier threshold.

[0020] The above-mentioned compost maturity prediction method based on the LightGBM model is further improved. In step S2.1, the indicator data in the data set is normalized using the RobustScaler method, including the following steps:

[0021] S2.1.1. Calculate the median and interquartile range of composting time, temperature, pH, conductivity, moisture, EDC, and EAC for the dataset;

[0022] S2.1.2. Calculate the RobustScaler coefficient of composting time, temperature, pH, conductivity, humidity, EDC, and EAC in each sample based on the median and interquartile range of the composting time, temperature, pH, conductivity, humidity, EDC, and EAC in the data set; the calculation expression of the RobustScaler coefficient is:

[0023]

[0024] Among them, v i ′ represents the calculated RobustScaler coefficient, v i represents the value of the i-th indicator in the data set, median represents the median of the i-th indicator in the data set, and IQR represents the interquartile range of the i-th indicator in the data set.

[0025] The above-mentioned compost maturity prediction method based on the LightGBM model is further improved, in which in step S3, the ratio of the training set to the test set is 4:1.

[0026] The above-mentioned compost maturity prediction method based on the LightGBM model is further improved. In step S4, when the LightGBM model is trained using the training set divided in step S3, the following steps are included:

[0027] S4.1, adjust the grid parameters;

[0028] S4.2. Optimize the splitting nodes of the LightGBM model by using the variance splitting algorithm;

[0029] S4.3, using the leaf-wise splitting rule to reduce the number of node splits, and coordinating the best splitting node described in step S4.2 to generate child splitting nodes;

[0030] S4.4. The grid parameters are iterated multiple times to obtain the trained LightGBM model after the convergence conditions are met.

[0031] The above-mentioned compost maturity prediction method based on the LightGBM model is further improved. In step S4.1, the grid parameters include: the number of leaf nodes of the tree (num_leaves), the learning rate (learning_rate), the feature tree construction ratio (feature_fraction), and the data ratio (bagging_fraction); the number of leaf nodes of the tree is 10 to 200; the learning rate is 0.01 to 0.1; the feature tree construction ratio randomly selected in each iteration is 0.1 to 0.99; the data ratio used in each iteration is 0.1 to 0.99.

[0032] The above-mentioned compost maturity prediction method based on the LightGBM model is further improved. In step S4.2, the splitting nodes of the LightGBM model are optimized by the variance splitting algorithm, including the following steps:

[0033] S4.21, discrete floating point values, and using the number of discrete values ​​as the width to construct a histogram;

[0034] S4.22, traverse the data of the training set to form a secondary histogram;

[0035] S4.23. Use the histogram to find the best split point, and use the preset separation variance gain algorithm to find the leaf with the largest split gain, and select the leaf node corresponding to the maximum split variance gain as the best split node for building the LightGBM model; the preset split variance gain algorithm is:

[0036]

[0037] Among them, G is the total variance gain, G1 and G2 are the variance gains of the left and right child nodes respectively, j represents the feature index used for the current split, α represents the split threshold of feature j selected by the current node α, and g i represents the gradient information related to the sample, a and b represent the hyperparameters for adjusting the weights, is the total number of training sets in the α node, It represents the number of training sets where the feature j value is less than α, that is, the number of training sets in the left child node. It represents the number of training sets where the feature j value is greater than α, that is, it is located in the right child node. A1 and A2 are the left and right sorted sample sets, respectively, and B1 and B2 are the left and right random sampling sets, respectively.

[0038] The above-mentioned compost maturity prediction method based on the LightGBM model is further improved. In step S5, when the test set divided in step S3 is used to evaluate the trained LightGBM model in step S4, the determination coefficient (R 2), root mean square error (RMSE), and mean absolute error (MAE) to evaluate the performance of the LightGBM model trained in step S4;

[0039] The coefficient of determination (R 2 ) is as follows:

[0040]

[0041] Among them, Y i Represents the actual GI value of the i-th sample in the training set or test set, Represents the LightGBM prediction value of the i-th sample, Represents the average value of GI of samples in the training set or test set; R 2 The value range is from 0 to 1. The closer it is to 1, the more variation the model explains, that is, the better the fitting effect;

[0042] The expression of the root mean square error (RMSE) is as follows:

[0043]

[0044] Among them, N represents the number of samples in the training set or test set, and Y i Represents the actual GI value of the i-th sample in the training set or test set, Represents the LightGBM prediction value of the i-th sample;

[0045] The expression of the mean absolute error (MAE) is as follows:

[0046]

[0047] Among them, N represents the number of samples in the training set or test set, and Y i Represents the actual GI value of the i-th sample in the training set or test set, Represents the LightGBM prediction value of the i-th sample.

[0048] Compared with the prior art, the advantages of the present invention are:

[0049] (1) The present invention provides a method for predicting compost maturity based on the LightGBM model. The method first collects the composting time, temperature, pH, conductivity, humidity, EDC and EAC of the compost sample to be tested, then outputs the seed germination index of the compost sample to be tested based on the obtained index data and the preset LightGBM model, and finally predicts the maturity of the compost sample to be tested based on the seed germination index of the compost sample to be tested. In the method of the present invention, the seed germination index of the compost sample to be tested can be quickly and accurately obtained based on the index data of the compost sample to be tested using the preset LightGBM model, thereby predicting the compost maturity based on the seed germination index of the compost sample to be tested, and realizing online prediction of the compost maturity, which is of great significance for realizing full automatic or semi-automatic control of the composting process.

[0050] (2) In the present invention, the composting process is monitored and data is collected to optimize data reliability; the data is normalized and outliers are removed, and the data is divided into a training set and a test set, and then the training set is used to train a LightGBM model, and then the test set is used to evaluate the LightGBM model. Specifically, the obtained model is evaluated by root mean square error, mean absolute error and determination coefficient. After the evaluation is qualified, a LightGBM model suitable for predicting compost maturity is obtained, and then the LightGBM model is used to predict compost maturity, thereby realizing rapid detection of data and artificial intelligence models to solve the problem of maturity prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0052] Figure 1 The figure is a schematic diagram of the construction process of the LightGBM model in Example 1 of the present invention.

[0053] Figure 2 It is the residual graph of the training set and the test set and the model capability test data graph in Example 1 of the present invention.

[0054] Figure 3 This is a global sensitivity analysis diagram of the LightGBM model constructed in Example 1 of the present invention.

[0055] Figure 4 This is a comparison chart of the GI predicted based on the LightGBM model and the actual GI of the sample in Example 1 of the present invention. DETAILED DESCRIPTION

[0056] The present invention is further described below in conjunction with the accompanying drawings and specific preferred embodiments, but the protection scope of the present invention is not limited thereby.

[0057] Example 1

[0058] A compost maturity prediction method based on the LightGBM model includes the following steps:

[0059] (1) Collecting index data of the compost sample to be tested, wherein the index data includes composting time, temperature, pH, conductivity, humidity, EDC and EAC.

[0060] (2) Based on the index data obtained in step (1), the preset LightGBM model is used to output the seed germination index of the compost sample to be tested.

[0061] (3) Predicting the maturity of the compost sample to be tested based on the seed germination index of the compost sample to be tested obtained in step (2).

[0062] In this embodiment, Figure 1 As shown, the method for building the LightGBM model includes the following steps:

[0063] S1. Obtain indicator data of different compost samples to form a data set, wherein the indicator data of each sample in the data set includes composting time, temperature, pH, conductivity, humidity, EAC, and EDC.

[0064] In step S1, in order to ensure the normal operation of the model, the missing and abnormal data are processed. If a single item of data is missing too many features, the single item of data is directly deleted. If a single item of data is missing a small number of features, the data of the previous day and the next day of the data are linearly fitted and averaged.

[0065] S2, removing outliers from the data set obtained in step S1, including the following steps:

[0066] S2.1. Use the RobustScaler method to normalize the indicator data in the data set, specifically:

[0067] S2.1.1. Calculate the median and interquartile range of composting time, temperature, pH, conductivity, moisture, EDC, and EAC for the dataset.

[0068] S2.1.2. Calculate the RobustScaler coefficient of composting time, temperature, pH, conductivity, humidity, EDC, and EAC in each sample based on the median and interquartile range of the composting time, temperature, pH, conductivity, humidity, EDC, and EAC in the data set. The calculation expression of the RobustScaler coefficient is:

[0069]

[0070] Among them, v i ′ represents the calculated RobustScaler coefficient, v i represents the value of the i-th indicator in the data set, median represents the median of the i-th indicator in the data set, and IQR represents the interquartile range of the i-th indicator in the data set.

[0071] S2.2. Use the Z-score method to filter outliers on the normalized data and discard data that exceeds the outlier threshold.

[0072] S3. Divide the data set obtained in step S2 into a training set and a test set, wherein the ratio of the training set to the test set is 4:1.

[0073] In step S3, the data of the training set is used to train the initial LightGBM model, and the data of the test set is used to test the LightGBM model. After multiple iterations, the test set will also be used to evaluate the LightGBM model, where the training set is used to estimate the parameters of the model so that the model can best fit the training data, guide feature importance calculation, fit the model, and adjust hyperparameters; the test set is used to evaluate the generalization ability of the model, determine the degree of overfitting of the model, and serve as a judgment method for the final model selection. Since the training set and test data come from the same data set, the data set is divided into multiple folds using 5-fold cross validation to provide an evaluation of the performance of the model on different data subsets, thereby more accurately estimating the performance of the model on unseen data and avoiding overfitting.

[0074] S4, using the training set divided in step S3 to train the LightGBM model, including the following steps:

[0075] S4.1. Adjust the grid parameters, where the grid parameters include: the number of leaf nodes of the tree (num_leaves), the learning rate (learning_rate), the proportion of features randomly selected for building the tree in each iteration (f eature_fraction), and the proportion of data used in each iteration (bagging_fraction), and the parameter range of the grid parameter adjustment is as follows: the number of leaf nodes of the tree is 10 to 200, the learning rate is 0.01 to 0.1, the proportion of features randomly selected for building the tree in each iteration is 0.1 to 0.99, and the proportion of data used in each iteration is 0.1 to 0.99.

[0076] S4.2. Optimize the splitting nodes of the LightGBM model through the variance splitting algorithm, as follows:

[0077] S4.21, discrete floating point values, and use the number of discrete values ​​as the width to construct a histogram.

[0078] S4.22. Traverse the data of the training set to form a secondary histogram.

[0079] S4.23. Use the histogram to find the best split point, and use the preset separation variance gain algorithm to find the leaf with the largest split gain. Select the leaf node corresponding to the maximum split variance gain as the best split node for building the LightGBM model. The preset split variance gain algorithm is:

[0080]

[0081] Among them, G is the total variance gain, G1 and G2 are the variance gains of the left and right child nodes respectively, j represents the feature index used for the current split, α represents the split threshold of feature j selected by the current node α, and g i represents the gradient information related to the sample, a and b represent the hyperparameters for adjusting the weights, is the total number of training sets in the α node, It represents the number of training sets where the feature j value is less than α, that is, the number of training sets in the left child node. It represents the number of training sets where the feature j value is greater than α, that is, it is located in the right child node. A1 and A2 are the left and right sorted sample sets, respectively, and B1 and B2 are the left and right random sampling sets, respectively.

[0082] S4.3. Use the leaf-wise splitting rule to reduce the number of node splits, and generate child split nodes with the best splitting node in step S4.2, thereby improving computing efficiency.

[0083] S4.4. The grid parameters are iterated multiple times to obtain the trained LightGBM model after the convergence conditions are met.

[0084] S5. Use the test set divided in step S3 to evaluate the LightGBM model trained in step S4. After the evaluation is qualified, the LightGBM model is obtained.

[0085] In step S5, the determination coefficient (R 2 ), root mean square error (RMSE), and mean absolute error (MAE) to evaluate the performance of the LightGBM model trained in step S4;

[0086] Coefficient of determination (R 2 ) is as follows:

[0087]

[0088] Among them, Y iRepresents the actual GI value of the i-th sample in the training set or test set, Represents the LightGBM prediction value of the i-th sample, Represents the average value of GI of samples in the training set or test set; R 2 The value range is from 0 to 1. The closer it is to 1, the more variation the model explains, that is, the better the fitting effect;

[0089] The expression of root mean square error (RMSE) is as follows:

[0090]

[0091] Among them, N represents the number of samples in the training set or test set, and Y i Represents the actual GI value of the i-th sample in the training set or test set, Represents the LightGBM prediction value of the i-th sample;

[0092] The expression of mean absolute error (MAE) is as follows:

[0093]

[0094] Among them, N represents the number of samples in the training set or test set, and Y i Represents the actual GI value of the i-th sample in the training set or test set, Represents the LightGBM prediction value of the i-th sample.

[0095] In step S5, when R 2 When it is greater than 0.95 and RMSE and MAE are less than 5, the evaluation is qualified.

[0096] Figure 2 It is the residual graph of the training set and the test set and the model capability test data graph in Example 1 of the present invention. Figure 2 In the figure, the left picture is the training set, and the right picture is the test set. Figure 2 It can be seen that the training set and test set R of the LightGBM model 2 Both are greater than 0.95, and both RMSE and MAE are less than 5, which indicates that the generalization ability of the LightGBM model of the present invention is qualified and there is no obvious overfitting phenomenon.

[0097] Figure 3 It is a global sensitivity analysis diagram of the LightGBM model constructed in Example 1 of the present invention. Figure 3 It can be seen that composting time, temperature, and moisture content contribute the most to the construction of the LightGBM model.

[0098] Figure 4This is a comparison chart of the GI predicted by the LightGBM model and the actual GI of the sample in Example 1 of the present invention. Figure 4 It can be seen that the LightGBM model constructed by the present invention has an accuracy of 97.91% for GI prediction of actual samples.

[0099] It can be seen from the above results that in the present invention, the data reliability is optimized by monitoring the composting process and collecting data; the data are normalized and outliers are removed, and the data are divided into a training set and a test set, and then the training set is used to train the LightGBM model, and then the test set is used to evaluate the LightGBM model, specifically, the root mean square error, mean absolute error and determination coefficient of the obtained model are evaluated, and after the evaluation is qualified, a LightGBM model suitable for predicting the maturity of the compost is obtained, and further, according to the index data of the compost sample to be tested, the preset LightGBM model can be used to quickly and accurately obtain the seed germination index of the compost sample to be tested, thereby predicting the maturity of the compost according to the seed germination index of the compost sample to be tested, and the online prediction of the compost maturity can be realized, which is of great significance for realizing the full automatic or semi-automatic control of the composting process.

[0100] The above embodiments are only preferred implementations of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A compost maturity prediction method based on the LightGBM model, characterized in that: The following steps are involved: (1) collecting index data of the compost sample to be tested, wherein the index data includes composting time, temperature, pH, conductivity, humidity, EDC and EAC; (2) According to the index data obtained in step (1), the seed germination index of the compost sample to be tested is output using the preset LightGBM model; (3) Predicting the maturity of the compost sample to be tested based on the seed germination index of the compost sample to be tested obtained in step (2).

2. The compost maturity prediction method based on the LightGBM model according to claim 1 is characterized in that: In step (2), the method for constructing the LightGBM model includes the following steps: S1. Obtaining index data of different compost samples to form a data set; the index data of each sample in the data set includes composting time, temperature, pH, conductivity, humidity, EAC, and EDC; S2, removing outliers from the data set obtained in step S1; S3, dividing the data set obtained in step S2 to obtain a training set and a test set; S4, use the training set divided in step S3 to train the LightGBM model; S5. Use the test set divided in step S3 to evaluate the LightGBM model trained in step S4. After the evaluation is qualified, the LightGBM model is obtained.

3. The compost maturity prediction method based on the LightGBM model according to claim 2 is characterized in that: In step S1, when obtaining the indicator data of the sample, if the indicator data of the sample is missing, the data of the previous day and the next day of the sample are used for linear regression data filling, and the average is taken to replace the missing indicator data.

4. The compost maturity prediction method based on the LightGBM model according to claim 3 is characterized in that: In step S2, outliers are removed from the data set obtained in step S1, including the following steps: S2.1, use the RobustScaler method to normalize the indicator data in the dataset; S2.

2. Use the Z-score method to filter outliers on the normalized data and discard data that exceeds the outlier threshold.

5. The compost maturity prediction method based on the LightGBM model according to claim 4 is characterized in that: In step S2.1, the indicator data in the data set are normalized using the RobustScaler method, including the following steps: S2.1.

1. Calculate the median and interquartile range of composting time, temperature, pH, conductivity, moisture, EDC, and EAC for the dataset; S2.1.

2. Calculate the RobustScaler coefficient of composting time, temperature, pH, conductivity, humidity, EDC, and EAC in each sample based on the median and interquartile range of the composting time, temperature, pH, conductivity, humidity, EDC, and EAC in the data set; the calculation expression of the RobustScaler coefficient is: Among them, v i ′ represents the calculated RobustScaler coefficient, v i represents the value of the i-th indicator in the data set, median represents the median of the i-th indicator in the data set, and IQR represents the interquartile range of the i-th indicator in the data set.

6. The compost maturity prediction method based on the LightGBM model according to claim 5 is characterized in that: In step S3, the ratio of the training set to the test set is 4:

1.

7. The compost maturity prediction method based on the LightGBM model according to claim 6 is characterized in that: In step S4, when the LightGBM model is trained using the training set divided in step S3, the following steps are included: S4.1, adjust the grid parameters; S4.

2. Optimize the splitting nodes of the LightGBM model by using the variance splitting algorithm; S4.3, using the leaf-wise splitting rule to reduce the number of node splits, and coordinating the best splitting node described in step S4.2 to generate child splitting nodes; S4.

4. The grid parameters are iterated multiple times to obtain the trained LightGBM model after the convergence conditions are met.

8. The method for predicting compost maturity based on the LightGBM model according to claim 7, characterized in that: In step S4.1, the grid parameters include: the number of leaf nodes of the tree, the learning rate, the feature tree construction ratio, and the data ratio; the number of leaf nodes of the tree is 10 to 200; the learning rate is 0.01 to 0.1; the feature tree construction ratio randomly selected in each iteration is 0.1 to 0.99; the data ratio used in each iteration is 0.1 to 0.

99.

9. The method for predicting compost maturity based on the LightGBM model according to claim 8, characterized in that: In step S4.2, the splitting nodes of the LightGBM model are optimized by the variance splitting algorithm, including the following steps: S4.21, discrete floating point values, and using the number of discrete values ​​as the width to construct a histogram; S4.22, traverse the data of the training set to form a secondary histogram; S4.

23. Use the histogram to find the best split point, and use the preset separation variance gain algorithm to find the leaf with the largest split gain, and select the leaf node corresponding to the maximum split variance gain as the best split node for building the LightGBM model; the preset split variance gain algorithm is: Among them, G is the total variance gain, G1 and G2 are the variance gains of the left and right child nodes respectively, j represents the feature index used for the current split, α represents the split threshold of feature j selected by the current node α, and g i represents the gradient information related to the sample, a and b represent the hyperparameters for adjusting the weights, is the total number of training sets in the α node, It represents the number of training sets where the feature j value is less than α, that is, the number of training sets in the left child node. It represents the number of training sets where the feature j value is greater than α, that is, it is located in the right child node. A1 and A2 are the left and right sorted sample sets, respectively, and B1 and B2 are the left and right random sampling sets, respectively.

10. The method for predicting compost maturity based on the LightGBM model according to claim 9, characterized in that: In step S5, the LightGBM model trained in step S4 is evaluated using the test set divided in step S3, and the determination coefficient (R 2 ), root mean square error (RMSE), and mean absolute error (MAE) to evaluate the performance of the LightGBM model trained in step S4; The coefficient of determination (R 2 ) is as follows: Among them, Y i Represents the actual GI value of the i-th sample in the training set or test set, Represents the LightGBM prediction value of the i-th sample, Represents the average value of the sample GI in the training set or test set; R 2 The value range is from 0 to 1. The closer it is to 1, the more variation the model explains, that is, the better the fitting effect; The expression of the root mean square error (RMSE) is as follows: Where N represents the number of samples in the training set or test set, and Y i Represents the actual GI value of the i-th sample in the training set or test set, Represents the LightGBM prediction value of the i-th sample; The expression of the mean absolute error (MAE) is as follows: Where N represents the number of samples in the training set or test set, and Y i Represents the actual GI value of the i-th sample in the training set or test set, Represents the LightGBM prediction value of the i-th sample.