Prediction method for fermentation and decomposition of livestock and poultry manure and mushroom dreg compost

Through the ALSTM neural network model and data optimization technology, the accuracy and speed of compost prediction during the fermentation of livestock and poultry manure and bacterial residues is solved, and efficient compost compost compost compost compost simplifies the detection process.

CN119025908APending Publication Date: 2024-11-26HEBEI AGRICULTURAL UNIV.
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410293225.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-14
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

The existing technology lacks online measurement equipment during the fermentation of livestock and poultry manure and bacterial slag, resulting in the fertilization index being able to be measured offline, which seriously affects the fermentation efficiency and product quality. The monitoring method using the LSTM model is complex and the prediction accuracy is predicted. insufficient.

Method used

ALSTM neural network model is adopted to obtain compost sample index data from different corruption stages, perform time lag processing and normalization processing, optimize cube data sets, build ALSTM neural network model, and improve prediction by optimizing hyperparameters and data dimensionality technology Accuracy.

Benefits of technology

It improves the accuracy and computing speed of compost rigor prediction, simplifies the detection process, is suitable for rigor prediction of organic waste from different sources, and achieves the stability and high accuracy of the predicted results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025908A_ABST
    Figure CN119025908A_ABST
Patent Text Reader

Abstract

The invention discloses a livestock and poultry manure and mushroom dreg compost fermentation decomposition prediction method, which comprises the following steps that A, a data set composed of compost sample indexes in different decomposition stages is obtained, and each sample in the data set comprises the temperature, the O2 content, the CO2 content, the water content, the pH value and the decomposition degree index T value of a compost body; b, performing time delay processing and normalization processing on the data of the data set; c, optimizing a data structure of the multi-dimensional data set; d, constructing an ALSTM neural network model, and training and optimizing the ALSTM neural network model by using the optimized multi-dimensional data set; and E, predicting the fermentation decomposition degree by using an ALSTM neural network model. According to the method, the defects in the prior art can be overcome, and the prediction accuracy and the calculation speed of the prediction process are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of machine learning, and in particular to a method for predicting the maturity of livestock and poultry manure and fungus residue compost fermentation. Background Art

[0002] In the manure residue composting experiment, the maturity of the fertilizer is an indicator that reflects the state of stable quality of the composting process. However, due to the lack of online measurement equipment, many maturity indicators can only be obtained through offline measurement. The fermentation results obtained seriously lag behind the fermentation process itself, affecting the fermentation efficiency and product quality. Chinese invention patent CN202110444505.7 discloses a composting monitoring method that uses an LSTM model for training and prediction, but the entire monitoring process of this method is relatively complicated, and the prediction accuracy needs to be improved. Summary of the invention

[0003] The technical problem to be solved by the present invention is to provide a method for predicting the maturity of livestock and poultry manure and fungus residue compost fermentation, which can solve the shortcomings of the existing technology and improve the prediction accuracy and the calculation speed of the prediction process.

[0004] In order to solve the above technical problems, the technical solutions adopted by the present invention are as follows.

[0005] A method for predicting the maturity of livestock and poultry manure and fungus residue compost fermentation comprises the following steps:

[0006] A. Obtain a data set consisting of compost sample indicators at different maturity stages. Each sample in the data set includes the temperature, O2 content, CO2 content, moisture content, pH value, and maturity index T value of the pile;

[0007] B. Perform time lag processing and normalization on the data set;

[0008] C. Optimize the data structure of multidimensional datasets;

[0009] D. Build an ALSTM neural network model, and use the optimized multidimensional data set to train and optimize the ALSTM neural network model;

[0010] E. Use the ALSTM neural network model to predict fermentation maturity.

[0011] Preferably, the maturity index T=(final C / N) / (initial C / N), wherein C / N is the ratio of carbon to nitrogen.

[0012] Preferably, in step C, optimizing the data structure of the multidimensional data set includes the following steps:

[0013] C1. Vectorize the data of multidimensional dataset;

[0014] C2. Increase the dimension of data;

[0015] C3. Interactively process data.

[0016] Preferably, in step C1, data vectorization includes the following steps:

[0017] C11. Calculate the contribution of each data dimension to the maturity index T value, select the data dimension with the largest contribution as the classification dimension, and classify the data according to the correlation similarity between the classification dimension and the maturity index T value;

[0018] C12. Marking a vectorized feature point in each data group obtained by classification, where the vectorized feature point is an inflection point of the curl boundary integral of the space formed by the data group;

[0019] C13. Map the multidimensional data in the coordinate system space to obtain the original vector data, and then modify the original vector data to include all the vectorized feature points in the data group.

[0020] Preferably, in step C2, increasing the dimension of the data includes the following steps:

[0021] Input the vectorized data into the generative adversarial network to generate new dimensional data; screen the new dimensional data, determine the minimum data screening amount based on the existing number of dimensions, and then select the data group with the lowest total correlation in different dimensions as the dimensionality-increasing reference data; discretize the dimensionality-increasing reference data so that the discretized dimensionality-increasing reference data is evenly distributed in the newly added dimensional space, thereby increasing the dimensionality of the coordinate system space obtained in step C13.

[0022] Preferably, in step C3, interactively processing the data includes the following steps:

[0023] Convert the data into matrix form A, A'=AA T (1+σ), A' is the data after interaction processing, σ is the correction parameter, and σ is proportional to the linearity of the eigenvectors of A and A'.

[0024] Preferably, in step D, the hyperparameters of the trained ALSTM neural network model are optimized, the model is retrained using the optimal hyperparameters, the objective function is optimized using the Bayesian optimization function, the objective function is set as a verification loss function of the neural network model, and the maximum number of evaluations is set to 20 times through the MaxObjectiveEvaluations parameter; the bestPoint function is used to obtain the best hyperparameters found by Bayesian optimization, and they are stored in the bestParams variable; during the training process, the Adam algorithm is used to update the model parameters; the LearnRateDropFactor parameter is used to gradually reduce the learning rate to further optimize the model performance.

[0025] The beneficial effect brought by adopting the above technical solution is that the prediction result of the present invention is accurate and stable, and a relatively complicated detection process is avoided. The present invention uses LSTM as the basic unit and adopts the ALSTM neural network model to predict the maturity of compost. The time lag problem of the ALSTM neural network model is solved by preprocessing the training data set, and it is suitable for predicting the maturity of compost of organic waste from different sources. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 4 is a comparison chart of prediction results of an embodiment of the present invention. DETAILED DESCRIPTION

[0027] This embodiment includes the following steps:

[0028] The waste of shiitake mushroom sticks was crushed to 1-2cm and then mixed with fresh chicken manure for composting. The initial carbon-nitrogen ratio was adjusted to 22.32, and the moisture content was 61%. According to the measured carbon-nitrogen ratio and moisture content of the two composting materials, fresh chicken manure and shiitake mushroom stick waste were evenly mixed at a mass ratio of 1:1.2. During the mixing process, high-temperature aerobic bacteria were evenly mixed at a ratio of one kilogram to two tons to accelerate the maturation rate of the materials. The sample taken after the material was mixed was recorded as the sample on the 0th day. From the first day, samples were taken every other day. When sampling, samples were taken from the upper, middle and lower layers of the fermented material respectively. The sampling weight of each layer was not less than 50g, and the samples taken were used to determine C / N.

[0029] A data set consisting of compost sample indicators at different maturity stages was obtained. Each sample in the data set included the temperature, O2 content, CO2 content, moisture content, pH value and maturity index T value of the pile; maturity index T = (end C / N) / (initial C / N), where C / N is the ratio of carbon to nitrogen.

[0030] The data set data is time-lagged and normalized.

[0031] The training set contains: T_train is the output data set, P_train is the multidimensional input data set.

[0032] Time lag processing specifically includes:

[0033] 1. Define the time delay length delay as 2.

[0034] 2. Initialize the empty array deal_data.

[0035] 3.T_train performs delay processing.

[0036] (1) Start a loop with an initial value of 1 and a termination value of the length of the training data T_train minus delay. This loop will traverse all possible windows.

[0037] (2) In each loop iteration, extract the data starting from i to index i+delay-1.

[0038] (3) Transpose the extracted data into a column vector and assign it to deal_data(i,:). Each row of deal_data represents a time window, and each column is a data point in the window.

[0039] (4)The loop ends.

[0040] Note: The whole process is to perform sliding window processing on the training data T_train. Each window is a continuous data point, and the size of the window is equal to delay. In this way, each time window can be used as an input sample of the machine learning model. The task of the model is to predict the next data point, that is, the next element in T_train.

[0041] 4. Form a new deal_data array: P_train data delay processing, merge the array P_train(delay+1:end,:) and deal_data and assign it to deal_data.

[0042] (Adding delayed data after the original data means adding the columns from index delay+1 to the end of the original data P_train to the beginning of deal_data.)

[0043] 5. Form the P_train multi-dimensional input data set: The P_train multi-dimensional input data set is formed by extracting the transposed data from all columns except the last column in the deal_data matrix.

[0044] 6. Form the T_train output data set. From the data in the last column of the deal_data matrix, the transposed data is used as the output of the model to form T_train.

[0045] 7. Calculate the dimension M of the data, that is, the number of columns of the P_train matrix. This dimension will be used for model construction or further data processing.

[0046] The original training dataset is split into input data (P_train) and output data (T_train), where P_train contains the features from the current moment to the delay moment, and T_train contains the label of the next moment. In this way, a model can be trained to predict the next value in the time series. The input dimension of the model is given by M, which helps to understand the complexity of the data and build the corresponding model.

[0047] The test set contains: T_text is the output data set, P_text is the multi-dimensional input data set. The same steps as above are used for processing.

[0048] Optimize the data structure of multidimensional datasets; specifically,

[0049] Calculate the contribution of each data dimension to the maturity index T value, select the data dimension with the largest contribution as the classification dimension, classify the data according to the correlation similarity between the classification dimension and the maturity index T value, and classify the data with high feature similarity into a group through classification, so that the vectorized feature points can be determined quickly and accurately, reducing the number of vectorized feature points and facilitating subsequent operations. Mark the vectorized feature points in each data group obtained by classification. The vectorized feature points are the inflection points of the curl boundary integral of the space formed by the data group. Map the multidimensional data in the coordinate system space to obtain the original vector data, and then correct the original vector data so that it contains all the vectorized feature points made in the data group. Through data vectorization, the correlation between different dimensions of data can be reduced, and an independent parallelized data structure can be established.

[0050] Input the vectorized data into the generative adversarial network to generate new dimensional data; screen the new dimensional data, determine the minimum data screening amount based on the existing number of dimensions, and then select the data group with the lowest total correlation in different dimensions as the dimensionality-increasing reference data; discretize the dimensionality-increasing reference data so that the discretized dimensionality-increasing reference data is evenly distributed in the newly added dimensional space, thereby increasing the dimensionality of the coordinate system space obtained in step C13. Since the data correlation of each dimension is reduced after data vectorization, the generative adversarial network can be used to quickly generate new dimensional data, reducing the amount of calculation for generating new dimensional data.

[0051] Convert the data into matrix form A, A'=AA T (1+σ), A' is the data after interactive processing, σ is the correction parameter, and σ is proportional to the linearity of the feature vectors of A and A'. Since the new dimension data is discretized, the aggregation of data features in the new dimension can be reduced during interactive processing, thereby improving the richness of data features.

[0052] After the above data optimization, the data dimension characteristics of the training data set can be greatly improved, and the correlation between different dimensions can be reduced, thereby effectively solving the time lag problem.

[0053] Build an LSTM neural network model,

[0054] f t =σ(W f ·[h t-1 , x t ]+b f )

[0055] i r =σ(W i ·[n t-1 , x t ]+b i )

[0056] o t =σ(W o ·[h t-1 , x t ]+b o )

[0057]

[0058]

[0059] h t =o t *anh(C t ),

[0060] W f , W i , W o , W c are the weights of the forget gate, input gate, output gate and hidden layer, respectively, and b f , b i , b o , b c They are the forget gate, input gate, output gate and bias of the hidden layer respectively.

[0061] The attention mechanism is introduced using the Encoder-Decoder framework. The attention mechanism is mainly used in conjunction with the Encoder-Decoder (seq2seq) framework. The encoder extracts features from the input sequence through a specific neural network. These features are sent to the decoder and converted into a corresponding output sequence through the neural network. The basic units of the encoder and decoder can be different neural networks, with LSTM as the basic unit. Input the element x in the input sequence into the LSTM network of the Encoder and calculate the hidden state h t , vector c tIt reflects the dynamic features of the input values ​​at time t and before that affect the moment. The dynamic features extracted at time t are input into the LSTM network in the decoder, and a predicted value y is output. t , the hidden state s in the decoder t Through the vector c, the state s at the previous moment t-1 , and the predicted value y at the previous moment t-1 for real-time updates.

[0062] The ALSTM (Attention-LSTM) neural network model is trained and optimized using the optimized multidimensional dataset. The hyperparameters of the ALSTM neural network model are optimized, the model is retrained using the best hyperparameters, the objective function is optimized using the Bayesian optimization function, the objective function is set to the validation loss function of a neural network model, and the maximum number of evaluations is set to 20 times through the MaxObjectiveEvaluations parameter. The bestPoint function is used to obtain the best hyperparameters found by Bayesian optimization and they are stored in the bestParams variable. Next, the neural network model is retrained using these hyperparameters. During the training process, the Adam algorithm is used to update the model parameters; finally, during the training process, the learning rate is gradually reduced using the LearnRateDropFactor parameter to further optimize the model performance.

[0063] In order to evaluate the prediction accuracy of the ALSTM model for the fermentation quality of livestock and poultry manure, the mean absolute percent error (MAPE), mean absolute error (MAE) and root mean square error (RMSE) were selected as evaluation indicators.

[0064] On the basis of reducing the material ratio year-on-year, multiple batch tests were conducted simultaneously to obtain 32 batches of test data, totaling 960 sample data. The batch data was divided into training set and test set at a ratio of 8:2, and a 2s delay was performed. The training set was used for experimental modeling to obtain the best network model, and the trained model was tested and compared using the test set.

[0065] The maximum number of iterations of the ALSTM model is determined to be 120, the batch size is 10, the learning rate is 0.005, and the time lag parameter is 2. This parameter combination is used for model training. When the time lag parameter is 2, the MAPE is 0.009, the MAE is 0.007, and the RMSE is 0.008. The prediction results of the ALSTM network are as follows: Figure 1 .

[0066] In the description of the present invention, it should be understood that the terms "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside" and "outside" etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.

[0067] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A method for predicting the maturity of composting of livestock and poultry manure and fungus residue, characterized in that The following steps are involved: A. Obtain a data set consisting of compost sample indicators at different maturity stages. Each sample in the data set includes the temperature, O2 content, CO2 content, moisture content, pH value, and maturity index T value of the pile; B. Perform time lag processing and normalization on the data set; C. Optimize the data structure of multidimensional datasets; D. Build an ALSTM neural network model, and use the optimized multidimensional data set to train and optimize the ALSTM neural network model; E. Use the ALSTM neural network model to predict fermentation maturity.

2. The method for predicting the maturity of livestock and poultry manure and fungus residue composting fermentation according to claim 1, characterized in that: The maturity index T=(final C / N) / (initial C / N), wherein C / N is the ratio of carbon to nitrogen.

3. The method for predicting the maturity of livestock and poultry manure and fungus residue composting fermentation according to claim 1, characterized in that: In step C, optimizing the data structure of the multidimensional data set includes the following steps: C1. Vectorize the data of multidimensional dataset; C2. Increase the dimension of data; C3. Interactively process data.

4. The method for predicting the maturity of livestock and poultry manure and fungus residue composting fermentation according to claim 3, characterized in that: In step C1, data vectorization includes the following steps: C11. Calculate the contribution of each data dimension to the maturity index T value, select the data dimension with the largest contribution as the classification dimension, and classify the data according to the correlation similarity between the classification dimension and the maturity index T value; C12. Marking a vectorized feature point in each data group obtained by classification, where the vectorized feature point is an inflection point of the curl boundary integral of the space formed by the data group; C13. Map the multidimensional data in the coordinate system space to obtain the original vector data, and then modify the original vector data to include all the vectorized feature points in the data group.

5. The method for predicting the maturity of livestock and poultry manure and fungus residue composting fermentation according to claim 4, characterized in that: In step C2, increasing the dimension of the data includes the following steps: Input the vectorized data into the generative adversarial network to generate new dimensional data; screen the new dimensional data, determine the minimum data screening amount based on the existing number of dimensions, and then select the data group with the lowest total correlation in different dimensions as the dimensionality-increasing reference data; discretize the dimensionality-increasing reference data so that the discretized dimensionality-increasing reference data is evenly distributed in the newly added dimensional space, thereby increasing the dimensionality of the coordinate system space obtained in step C13.

6. The method for predicting the maturity of livestock and poultry manure and fungus residue composting fermentation according to claim 5, characterized in that: In step C3, interactive processing of data includes the following steps: converting the data into a matrix form A, A′=AA T (1+σ), A' is the data after interaction processing, σ is the correction parameter, and σ is proportional to the linearity of the eigenvectors of A and A'.

7. The method for predicting the maturity of livestock and poultry manure and fungus residue composting fermentation according to claim 1, characterized in that: In step D, the hyperparameters of the trained ALSTM neural network model are optimized, the model is retrained using the optimal hyperparameters, the objective function is optimized using the Bayesian optimization function, the objective function is set as a validation loss function of the neural network model, and the maximum number of evaluations is set to 20 times through the MaxObjectiveEvaluations parameter; the bestPoint function is used to obtain the best hyperparameters found by Bayesian optimization, and they are stored in the bestParams variable; during the training process, the Adam algorithm is used to update the model parameters; the LearnRateDropFactor parameter is used to gradually reduce the learning rate to further optimize the model performance.

Citation Information

Patent Citations

  • Photovoltaic power prediction system based on memory neural network and attention mechanism

    CN110942189A

  • Water quality prediction method for optimizing LSTM neural network based on improved genetic algorithm

    CN111915097A

  • Compost maturity prediction method based on machine learning model

    CN113793645A

  • Deep neural network hyperparameter optimization method, electronic device and storage medium

    WO2021007812A1