Methods, devices, equipment and storage media for predicting grain pile temperature

CN116663388BActive Publication Date: 2026-09-01WUHAN POLYTECHNIC UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310375006.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-10
Publication Date
2026-09-01
Estimated Expiration
2043-04-10

AI Technical Summary

Technical Problem

[0004]本发明的主要目的在于提供一种粮堆温度预测方法、装置、设备及存储介质,旨在解决现有技术中难以快速精确对目标粮堆温度进行预测的技术问题

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116663388B_ABST
    Figure CN116663388B_ABST
Patent Text Reader

Abstract

This invention relates to the field of temperature prediction, and more particularly to a method, apparatus, device, and storage medium for predicting the temperature of a grain pile. The method includes: acquiring historical initial data of a target grain pile and processing missing values ​​to obtain complete historical data of the target grain pile; removing and reconstructing abnormal data from the complete historical data of the target grain pile to obtain reconstructed data of the target grain pile; inputting the reconstructed data of the target grain pile into a grain pile temperature prediction model, training the grain pile temperature prediction model, and obtaining a target grain pile temperature prediction model; acquiring current data of the target grain pile and inputting it into the target grain pile temperature prediction model to obtain a grain pile temperature prediction result, thereby quickly and accurately predicting the temperature of the target grain pile.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of temperature prediction, and more particularly to a method, apparatus, equipment, and storage medium for predicting the temperature of grain piles. Background Technology

[0002] Regarding the problem of grain pile temperature prediction, ensuring the accuracy of temperature prediction during grain storage has an undeniable impact on grain quality. Temperature prediction is a necessary consideration in grain storage, but currently, there are few good deep learning prediction models that can accurately predict grain pile temperature. Therefore, how to quickly and accurately predict the temperature of a target grain pile has become an urgent technical problem to be solved.

[0003] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention

[0004] The main objective of this invention is to provide a method, apparatus, equipment, and storage medium for predicting the temperature of a grain pile, aiming to solve the technical problem that it is difficult to quickly and accurately predict the temperature of a target grain pile in the prior art.

[0005] To achieve the above objectives, the present invention provides a method for predicting the temperature of a grain pile, the method comprising the following steps:

[0006] Obtain the initial historical data of the target grain pile and process missing values ​​to obtain the complete historical data of the target grain pile;

[0007] Abnormal data is removed and reconstructed from the complete historical data of the target grain pile to obtain the reconstructed data of the target grain pile;

[0008] The reconstructed data of the target grain pile is input into the grain pile temperature prediction model, and the grain pile temperature prediction model is trained to obtain the target grain pile temperature prediction model.

[0009] The current data of the target grain pile is obtained and input into the target grain pile temperature prediction model to obtain the grain pile temperature prediction result.

[0010] Optionally, the step of obtaining the initial historical data of the target grain pile and processing missing values ​​to obtain the complete historical data of the target grain pile includes:

[0011] Identify missing values ​​in the historical initial data of the target grain pile, and obtain the k nearest neighbor data of the missing values, where k is an integer greater than or equal to 1;

[0012] Calculate the Euclidean distance of the k nearest neighbors in two-dimensional space and extend it to a higher-dimensional space to obtain the Euclidean distance in the higher-dimensional space;

[0013] Based on the Euclidean distance in the high-dimensional space, missing values ​​are filled in the historical initial data of the target grain pile to obtain the complete historical data of the target grain pile.

[0014] Optionally, the step of removing and reconstructing abnormal data from the historical complete data of the target grain pile to obtain the reconstructed data of the target grain pile includes:

[0015] One-dimensional temperature time-series data is collected from the complete historical data of the target grain pile, and a trajectory matrix is ​​constructed according to the preset window length;

[0016] The trajectory matrix is ​​decomposed using singular value decomposition to obtain n corresponding feature vectors;

[0017] The n feature vectors are decomposed into m disjoint groups, where the m disjoint groups represent different trend data;

[0018] Select the required trend data from the trend data and reconstruct it to obtain the reconstructed data of the target grain pile.

[0019] Optionally, the reconstructed data of the target grain pile is input into the grain pile temperature prediction model, and the grain pile temperature prediction model is trained to obtain the target grain pile temperature prediction model, wherein the grain pile temperature prediction model is a neural network model, including:

[0020] The reconstructed data of the target grain pile is input into the update gate and reset gate in the grain pile temperature prediction model to obtain the hidden layer state at the current moment.

[0021] Based on the current hidden layer state, the optimal parameters of the grain pile temperature prediction model are adjusted using the ant colony method, and the target grain pile temperature prediction model is obtained based on the optimal parameters.

[0022] Optionally, the step of inputting the reconstructed data of the target grain pile into the grain pile temperature prediction model, training the grain pile temperature prediction model, and obtaining the target grain pile temperature prediction model further includes:

[0023] The reconstructed data of the target grain pile is input into LSTM-MLP, bidirectional LSTM-MLP, GRU-MLP and bidirectional GRU-MLP neural network models respectively for training, to obtain trained LSTM-MLP, bidirectional LSTM-MLP, GRU-MLP and bidirectional GRU-MLP neural network models.

[0024] Input the current data of the current target grain pile into the trained LSTM-MLP, bidirectional LSTM-MLP, GRU-MLP and bidirectional GRU-MLP neural network models to obtain the prediction result sets corresponding to different neural network models;

[0025] The predicted result sets corresponding to the different neural network models are compared with the actual result sets, and the target grain pile temperature prediction model is selected based on the comparison results.

[0026] Optionally, comparing the predicted result sets corresponding to the different neural network models with the actual result sets, and selecting the target grain pile temperature prediction model based on the comparison results, includes:

[0027] The predicted values ​​corresponding to the different neural network models are compared with the values ​​of the actual data to obtain the numerical prediction error;

[0028] The predicted graphs corresponding to the different neural network models are compared with the graphs of the real data to obtain the graph prediction error;

[0029] The target grain pile temperature prediction model is selected based on the numerical prediction error and the graphical prediction error.

[0030] Optionally, comparing the predicted result sets corresponding to the different neural network models with the actual result sets, and selecting the target grain pile temperature prediction model based on the comparison results, includes:

[0031] The predicted values ​​corresponding to the different neural network models are compared with the values ​​of the actual data to obtain the numerical prediction error;

[0032] The predicted graphs corresponding to the different neural network models are compared with the graphs of the real data to obtain the graph prediction error;

[0033] The target grain pile temperature prediction model is selected based on the numerical prediction error and the graphical prediction error.

[0034] Furthermore, to achieve the above objectives, the present invention also proposes a grain pile temperature prediction device, the grain pile temperature prediction device comprising:

[0035] The acquisition module is used to acquire the historical initial data of the target grain pile and process missing values ​​to obtain the complete historical data of the target grain pile.

[0036] The processing module is used to remove and reconstruct abnormal data from the historical complete data of the target grain pile to obtain the reconstructed data of the target grain pile.

[0037] The modeling module is used to input the reconstructed data of the target grain pile into the grain pile temperature prediction model, train the grain pile temperature prediction model, and obtain the target grain pile temperature prediction model, wherein the grain pile temperature prediction model is a neural network model.

[0038] The acquisition module is also used to acquire the current data of the target grain pile and input it into the target grain pile temperature prediction model to obtain the grain pile temperature prediction result.

[0039] In addition, to achieve the above objectives, the present invention also proposes a grain pile temperature prediction device, the device comprising: a memory, a processor, and a grain pile temperature prediction program stored in the memory and running on the processor, the grain pile temperature prediction program being configured to implement the grain pile temperature prediction method as described above.

[0040] In addition, to achieve the above objectives, the present invention also proposes a storage medium storing a grain pile temperature prediction program, which, when executed by a processor, implements the grain pile temperature prediction method as described above.

[0041] This invention discloses a method, apparatus, device, and storage medium for predicting grain pile temperature. The method includes: acquiring historical initial data of a target grain pile and processing missing values ​​to obtain complete historical data of the target grain pile; removing and reconstructing abnormal data from the complete historical data of the target grain pile to obtain reconstructed data of the target grain pile; inputting the reconstructed data of the target grain pile into a grain pile temperature prediction model, training the grain pile temperature prediction model, and obtaining the target grain pile temperature prediction model; acquiring current data of the target grain pile and inputting it into the target grain pile temperature prediction model to obtain the grain pile temperature prediction result. Thus, based on the ant colony algorithm and an SSA-BiGRU-MLP combined neural network, the grain pile temperature is predicted quickly and accurately. Attached Figure Description

[0042] Figure 1 This is a schematic diagram of the structure of a grain pile temperature prediction device in the hardware operating environment involved in the embodiments of the present invention;

[0043] Figure 2 This is a flowchart illustrating the first embodiment of the grain pile temperature prediction method of the present invention;

[0044] Figure 3 This is a test set and an experimental processing flowchart of an embodiment of the grain pile temperature prediction method of the present invention.

[0045] Figure 4 Line graphs showing grain pile temperature prediction based on LSTM-MLP, bidirectional LSTM-MLP, GRU-MLP, and bidirectional GRU-MLP neural network models, according to an embodiment of the grain pile temperature prediction method of the present invention.

[0046] Figure 5 This is a flowchart illustrating the second embodiment of the grain pile temperature prediction method of the present invention;

[0047] Figure 6 This is a flowchart illustrating the third embodiment of the grain pile temperature prediction method of the present invention.

[0048] Figure 7 This is a convolutional layer framework diagram of an embodiment of the grain pile temperature prediction method of the present invention;

[0049] Figure 8 This is a schematic diagram of the functional modules of the first embodiment of the grain pile temperature prediction device of the present invention.

[0050] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0051] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0052] Reference Figure 1 , Figure 1 This is a schematic diagram of the structure of a grain pile temperature prediction device in the hardware operating environment of an embodiment of the present invention.

[0053] like Figure 1 As shown, the grain pile temperature prediction device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen, and optionally, it may also include a standard wired interface or a wireless interface. In this invention, the wired interface of the user interface 1003 may be a USB interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (RAM) or a non-volatile memory (NVM), such as a disk storage device. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.

[0054] Those skilled in the art will understand that Figure 1The structure shown does not constitute a limitation on the grain pile temperature prediction device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0055] like Figure 1 As shown, the memory 1005, which is identified as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a grain pile temperature prediction program.

[0056] exist Figure 1 In the grain pile temperature prediction device 4 shown, the network interface 1004 is mainly used to connect to the backend server and communicate with the backend server; the user interface 1003 is mainly used to connect to the user equipment; the grain pile temperature prediction device calls the grain pile temperature prediction program stored in the memory 1005 through the processor 1001 and executes the grain pile temperature prediction method provided in the embodiment of the present invention.

[0057] Based on the above hardware structure, an embodiment of the grain pile temperature prediction method of the present invention is proposed.

[0058] Reference Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the grain pile temperature prediction method of the present invention, which presents the first embodiment of the grain pile temperature prediction method of the present invention.

[0059] In the first embodiment, the grain pile temperature prediction method includes the following steps:

[0060] Step S10: Obtain the initial historical data of the target grain pile and process missing values ​​to obtain the complete historical data of the target grain pile.

[0061] It should be understood that the execution subject of this embodiment is a grain pile temperature prediction device, which has functions such as data processing, data communication and program operation.

[0062] In a specific implementation, missing values ​​in the historical initial data of the target grain pile are identified, and the k nearest neighbors of the missing values ​​are obtained, where k is an integer greater than or equal to 1; the Euclidean distance in two-dimensional space of the k nearest neighbors is calculated and extended to a higher-dimensional space to obtain the Euclidean distance in the higher-dimensional space; based on the Euclidean distance in the higher-dimensional space, missing values ​​are filled in the historical initial data of the target grain pile to obtain the complete historical data of the target grain pile.

[0063] It should be noted that the specific approach involves first using the KNN algorithm to process the missing values ​​in the original data to obtain complete data. The principle is to select the k nearest neighbors of each missing value for prediction, thus imputing the missing data. The KNN algorithm uses Euclidean distance, and the formula for calculating Euclidean distance in two-dimensional space is as follows: If we extend this to higher-dimensional spaces, the calculation formula is as follows: After filling in the blanks, you will get the complete data.

[0064] Step S20: Remove and reconstruct abnormal data from the historical complete data of the target grain pile to obtain the reconstructed data of the target grain pile.

[0065] It should be understood that the process involves collecting one-dimensional temperature time-series data from the complete historical data of the target grain pile, and constructing a trajectory matrix based on a preset window length; performing singular value decomposition on the trajectory matrix to obtain n corresponding feature vectors; decomposing the n feature vectors into m disjoint groups, where the m disjoint groups represent different trend data; and selecting the required trend data from the trend data for reconstruction to obtain the reconstructed data of the target grain pile.

[0066] In specific implementation, such as Figure 3 The above describes the test set and its experimental processing flowchart. Since the data contains null values, data preprocessing is performed first. Here, the KNN algorithm is used. The processed data is then subjected to SSA singular spectrum analysis to obtain denoised data. The decomposed low-frequency sequence is used as the long-term trend of the temperature data sequence change to reconstruct the original temperature data sequence and obtain reconstructed data. The reconstructed data sequence is divided into a training set and a test set for the neural network. First, LSTM-MLP, bidirectional LSTM-MLP, GRU-MLP, and bidirectional GRU-MLP neural network models based on the ant colony algorithm are used to train the data in the training set. The test set is then input into pre-trained LSTM-MLP, bidirectional LSTM-MLP, GRU-MLP, and bidirectional GRU-MLP neural network models based on the ant colony algorithm for prediction. The predicted results are then compared with the actual results. The predicted graphs are then compared with the actual graphs. By comparing the predicted values, the predicted numerical errors, and the trends of the predicted graphs, it is determined which model—the LSTM-MLP based on the ant colony algorithm, or the bidirectional LSTM-MLP, GRU-MLP, and bidirectional GRU-MLP neural network models—has a better prediction performance.

[0067] Step S30: Input the reconstructed data of the target grain pile into the grain pile temperature prediction model, train the grain pile temperature prediction model, and obtain the target grain pile temperature prediction model.

[0068] In specific implementation, the reconstructed data of the target grain pile is input into LSTM-MLP, bidirectional LSTM-MLP, GRU-MLP, and bidirectional GRU-MLP neural network models for training, respectively, to obtain trained LSTM-MLP, bidirectional LSTM-MLP, GRU-MLP, and bidirectional GRU-MLP neural network models; the current data of the current target grain pile is input into the trained LSTM-MLP, bidirectional LSTM-MLP, GRU-MLP, and bidirectional GRU-MLP neural network models to obtain the prediction result sets corresponding to different neural network models; the prediction result sets corresponding to different neural network models are compared with the actual result sets, and the target grain pile temperature prediction model is selected based on the comparison results.

[0069] It should be noted that we established combined neural network models based on the ant colony algorithm, namely BiGRU-MLP, BiLSTM-MLP, LSTM-MLP, and GRU-MLP. Finally, the processed data was trained and predicted using the combined neural network models based on the ant colony algorithm, namely BiGRU-MLP, BiLSTM-MLP, LSTM-MLP, and GRU-MLP. The training and error comparison analysis of the SSA-LSTM-MLP and SSA-BiLSTM-MLP, SSA-GRU-MLP, and SSA-BiGRU-MLP neural network models based on the ant colony algorithm are shown in Table 1 below, which shows the grain pile temperature prediction results of the SSA-LSTM-MLP and SSA-BiLSTM-MLP, SSA-GRU-MLP, and SSA-BiGRU-MLP neural network models based on the ant colony algorithm.

[0070]

[0071] Table 1

[0072] The above six results show that the SSA-BiGRU-MLP combined neural network based on the ant colony algorithm predicts the grain pile temperature more accurately than the SSA-LSTM-MLP, SSA-BiLSTM-MLP, and SSA-GRU-MLP based on the ant colony algorithm.

[0073] It should be clear that, Figure 4This is a line graph showing the grain pile temperature prediction using LSTM-MLP, bidirectional LSTM-MLP, GRU-MLP, and bidirectional GRU-MLP neural network models based on the ant colony algorithm. The horizontal axis represents the time trend, and the vertical axis represents the grain pile temperature. The red line represents the actual grain pile temperature trend; the green line represents the predicted grain pile temperature trend using the SSA-BiGRU-MLP combined network based on the ant colony algorithm; the blue line represents the predicted grain pile temperature trend using the SSA-BiLSTM-MLP combined network based on the ant colony algorithm; the black line represents the predicted grain pile temperature trend using the SSA-GRU-MLP combined network based on the ant colony algorithm; and the gray line represents the predicted grain pile temperature trend using the SSA-LSTM-MLP combined network based on the ant colony algorithm. Figure 4 It can be intuitively seen that the SSA-BiGRU-MLP combined network based on the ant colony algorithm predicts grain pile temperature more closely than the predictions made by SSA-BiLSTM-MLP, SSA-GRU-MLP, and SSA-LSTM-MLP based on the ant colony algorithm. Therefore, the SSA-BiGRU-MLP combined network based on the ant colony algorithm has a smaller error compared to the actual value and shows better application prospects in grain pile temperature measurement.

[0074] Step S40: Obtain the current data of the target grain pile and input it into the target grain pile temperature prediction model to obtain the grain pile temperature prediction result.

[0075] It should be understood that Table 2 presents a comparative analysis of the performance metrics of SSA-LSTM-MLP, SSA-BiLSTM-MLP, SSA-GRU-MLP, and SSA-BiGRU-MLP neural network models based on the ant colony algorithm. MSE represents the mean squared error, and the formula is: MSE (Mean Squared Error) refers to the expected value of the squared difference between the predicted and actual values. It can evaluate the degree of variation in the data; the smaller the MSE value, the better the accuracy of the predictive model in describing the experimental data. RMSE is the root mean square error, and its formula is: It is the arithmetic square root of the mean square error; the smaller the value, the smaller the deviation between the predicted and actual temperature values. MAE is the mean absolute error, and its formula is... Mean absolute error can better reflect the actual situation of prediction error.

[0076]

[0077]

[0078] Table 2

[0079] As shown in Table 2, the MAE, MSE, and RMSE of the SSA-BiGRU-MLP combined network for predicting grain pile temperature are all lower than those of the SSA-GRU-MLP, SSA-BiLSTM-MLP, and SSA-LSTM-MLP combined networks based on the ant colony algorithm. This indicates that the SSA-BiGRU-MLP combined network based on the ant colony algorithm has higher accuracy and smaller error in predicting grain pile temperature, and can better reflect the true trend of the actual temperature of the grain pile.

[0080] In this embodiment, the initial historical data of the target grain pile is acquired and missing values ​​are processed to obtain complete historical data of the target grain pile. Abnormal data in the complete historical data of the target grain pile is removed and reconstructed to obtain reconstructed data of the target grain pile. The reconstructed data of the target grain pile is input into a grain pile temperature prediction model to train the model and obtain the target grain pile temperature prediction model. The current data of the target grain pile is acquired and input into the target grain pile temperature prediction model to obtain the grain pile temperature prediction result. Thus, based on the ant colony algorithm and the SSA-BiGRU-MLP combined neural network, the grain pile temperature is predicted quickly and accurately.

[0081] Reference Figure 5 , Figure 5 This is a flowchart illustrating the second embodiment of the grain pile temperature prediction method of the present invention, based on the above. Figure 2 The first embodiment shown presents a second embodiment of the grain pile temperature prediction method of the present invention.

[0082] In the second embodiment, step S20 includes:

[0083] Step S201: Collect one-dimensional temperature time series data from the historical complete data of the target grain pile, and construct a trajectory matrix according to the preset window length.

[0084] It should be noted that after the imputation is completed, the complete data is obtained. However, some data in this complete data may be outliers, i.e., noisy data. Therefore, Singular Spectrum Analysis (SSA) is used to remove noisy data from this complete temperature time series data. The principle is mainly to first collect one-dimensional temperature time series data [X1, X2, ..., X...]. n The trajectory matrix is ​​constructed based on the selected window length t. Then, singular value decomposition is performed on this trajectory matrix.

[0085] Step S202: Perform singular value decomposition on the trajectory matrix to obtain the corresponding n feature vectors.

[0086] It should be noted that performing singular value decomposition on this trajectory matrix involves decomposing the constructed trajectory matrix into the form X = UΣV.k Here, Σ represents the corresponding singular value. After performing singular value decomposition, n eigenvalues ​​and their corresponding n eigenvectors are obtained. Based on these n different eigenvalues, they are divided into m disjoint groups, which represent different trend data. Then, the required trend data is selected and reconstructed to obtain reconstructed data, which replaces the original data.

[0087] Step S203: Decompose the n feature vectors into m disjoint groups, where the m disjoint groups represent different trend data.

[0088] It should be noted that using a bidirectional GRU combined with an MLP neural network to predict the trend data processed by SSA singular spectrum analysis prevents problems such as overfitting and slow convergence. The designed SSA-BiGRU-MLP neural network considers both the impact of historical data on the current temperature and the impact of future data on the current temperature, thus resulting in higher prediction accuracy.

[0089] Step S204: Select the required trend data from the trend data and reconstruct it to obtain the reconstructed data of the target grain pile.

[0090] In the specific implementation, grain pile temperature data from Wuhan National Rice Trading Center Co., Ltd. were collected at 8:00, 14:00, and 20:00 from June 29th to September 3rd. First, the collected data was preprocessed to fill in missing values, etc. Here, the KNN algorithm was selected to handle missing values. After processing the missing values ​​with the KNN algorithm, singular spectral analysis was performed. After embedding, singular value decomposition, grouping, and reconstruction, the denoising processing of the original temperature time series data and the extraction of trend data were completed.

[0091] In this embodiment, missing values ​​in the historical initial data of the target grain pile are identified, and the k nearest neighbors of the missing values ​​are obtained, where k is an integer greater than or equal to 1. The Euclidean distance in two-dimensional space of the k nearest neighbors is calculated and extended to a higher-dimensional space to obtain the Euclidean distance in the higher-dimensional space. Based on the Euclidean distance in the higher-dimensional space, missing values ​​are filled in the historical initial data of the target grain pile to obtain the complete historical data of the target grain pile. Abnormal data in the complete historical data of the target grain pile is removed and reconstructed to obtain the reconstructed data of the target grain pile. The reconstructed data of the target grain pile is input into the grain pile temperature prediction model to train the grain pile temperature prediction model to obtain the target grain pile temperature prediction model. The current data of the target grain pile is obtained and input into the target grain pile temperature prediction model to obtain the grain pile temperature prediction result. Thus, a trajectory matrix is ​​constructed from the collected temperature time series data. Then, singular value decomposition, grouping, and reconstruction are performed on the trajectory matrix. The main purpose is to remove noise data in the original data and retain trend data in the original data. Then, the trend data is reconstructed together, thereby improving the prediction accuracy.

[0092] Reference Figure 6 , Figure 6 This is a flowchart illustrating the third embodiment of the grain pile temperature prediction method of the present invention, based on the above. Figure 2 The first embodiment shown presents a third embodiment of the grain pile temperature prediction method of the present invention.

[0093] In the third embodiment, step S30 includes:

[0094] Step S301: Input the reconstructed data of the target grain pile into the update gate and reset gate in the grain pile temperature prediction model to obtain the hidden layer state at the current moment.

[0095] In specific implementation, such as Figure 7 The diagram shows the SSA-BiGRU-MLP combined neural network prediction model. The predicted grain pile temperature is input into the bidirectional GRU-MLP model for training. The GRU has two gates, one of which is the update gate, with the formula z. t =σ(U (z) X t +W (z) h t-1 +b (z) ), where σ is the sigmoid activation function, and its formula is: Used to process nonlinear data, U and W are full-value matrices, X is the input value, h is the hidden state of the previous time step, and b is the bias term, which is mainly used to select which information needs to be retained.

[0096] Step S202: Based on the hidden layer state at the current moment, the optimal parameters of the grain pile temperature prediction model are adjusted using the ant colony method, and the target grain pile temperature prediction model is obtained based on the optimal parameters.

[0097] It should be noted that one is the reset door, the formula is r t =σ(U (r) X t +W (r) h t-1 +b (r) U and W are full-valued matrices, X is the input value, h is the hidden state at the previous time step, and b is the bias term, which is responsible for determining which information needs to be forgotten. After the operations of the update gate and the reset gate, the hidden state h at the current time step is obtained. t =(1-z) t )·tanh{U (h) X t +W (h) (h t-1 ·r t )+b (h)}+z t ·h t-1 Where z is the update gate, r is the reset gate, and tanh is the activation function, its formula is: U and W are full-value matrices, X is the input value, h is the hidden state at the previous time step, and b is the bias term. After calculation using the formula, the hidden state at the current time step is obtained. In order to further enhance the accuracy of prediction and prevent overfitting, it is combined with a multilayer perceptron to form a hybrid artificial neural network. The multilayer perceptron (MLP) is a fully connected neural network, and each node in the hidden and output layers contains an activation function. Then, the parameters of the hybrid neural network are adjusted using an ant colony algorithm to find the optimal parameters. The data is then processed through the hybrid neural network with the optimal parameters before the final predicted value is output.

[0098] In this embodiment, the initial historical data of the target grain pile is acquired and missing values ​​are processed to obtain the complete historical data of the target grain pile. Abnormal data in the complete historical data of the target grain pile is removed and reconstructed to obtain the reconstructed data of the target grain pile. The reconstructed data of the target grain pile is input into the update gate and reset gate of the grain pile temperature prediction model to obtain the hidden state at the current moment. Based on the hidden state at the current moment, the grain pile temperature prediction model is adjusted using an ant colony method to obtain the optimal parameters, and the target grain pile temperature prediction model is obtained based on the optimal parameters. The current data of the target grain pile is acquired and input into the target grain pile temperature prediction model to obtain the grain pile temperature prediction result. Therefore, the use of a bidirectional GRU combined with an MLP neural network to predict the trend data processed by SSA singular spectrum analysis prevents problems such as overfitting and slow convergence speed.

[0099] Furthermore, this embodiment of the invention also proposes a storage medium storing a grain pile temperature prediction program, which, when executed by a processor, implements the steps of the grain pile temperature prediction method described above.

[0100] Since this storage medium can adopt the technical solutions of all the above embodiments, it has at least the beneficial effects brought about by the technical solutions of the above embodiments, which will not be described in detail here.

[0101] Reference Figure 8 , Figure 8 This is a schematic diagram of the functional modules of the first embodiment of the grain pile temperature prediction device of the present invention.

[0102] In a first embodiment of the grain pile temperature prediction device of the present invention, the grain pile temperature prediction device includes:

[0103] The acquisition module 10 is used to acquire the historical initial data of the target grain pile and process missing values ​​to obtain the complete historical data of the target grain pile.

[0104] Processing module 20 is used to remove and reconstruct abnormal data in the historical complete data of the target grain pile to obtain the reconstructed data of the target grain pile;

[0105] The modeling module 30 is used to input the reconstructed data of the target grain pile into the grain pile temperature prediction model, train the grain pile temperature prediction model, and obtain the target grain pile temperature prediction model, wherein the grain pile temperature prediction model is a neural network model.

[0106] The acquisition module 10 is also used to acquire the current data of the target grain pile and input it into the target grain pile temperature prediction model to obtain the grain pile temperature prediction result.

[0107] In this embodiment, the initial historical data of the target grain pile is acquired and missing values ​​are processed to obtain complete historical data of the target grain pile. Abnormal data in the complete historical data of the target grain pile is removed and reconstructed to obtain reconstructed data of the target grain pile. The reconstructed data of the target grain pile is input into a grain pile temperature prediction model to train the model and obtain the target grain pile temperature prediction model. The current data of the target grain pile is acquired and input into the target grain pile temperature prediction model to obtain the grain pile temperature prediction result. Thus, based on the ant colony algorithm and the SSA-BiGRU-MLP combined neural network, the grain pile temperature is predicted quickly and accurately.

[0108] In one embodiment, the processing module 20 is further configured to acquire historical initial data of the target grain pile and perform missing value processing to obtain complete historical data of the target grain pile, including:

[0109] Identify missing values ​​in the historical initial data of the target grain pile, and obtain the k nearest neighbor data of the missing values, where k is an integer greater than or equal to 1;

[0110] Calculate the Euclidean distance of the k nearest neighbors in two-dimensional space and extend it to a higher-dimensional space to obtain the Euclidean distance in the higher-dimensional space;

[0111] Based on the Euclidean distance in the high-dimensional space, missing values ​​are filled in the historical initial data of the target grain pile to obtain the complete historical data of the target grain pile.

[0112] In one embodiment, the processing module 20 is further configured to remove and reconstruct abnormal data from the historical complete data of the target grain pile to obtain reconstructed data of the target grain pile, including:

[0113] One-dimensional temperature time-series data is collected from the complete historical data of the target grain pile, and a trajectory matrix is ​​constructed according to the preset window length;

[0114] The trajectory matrix is ​​decomposed using singular value decomposition to obtain n corresponding feature vectors;

[0115] The n feature vectors are decomposed into m disjoint groups, where the m disjoint groups represent different trend data;

[0116] Select the required trend data from the trend data and reconstruct it to obtain the reconstructed data of the target grain pile.

[0117] In one embodiment, the processing module 20 is further configured to input the reconstructed data of the target grain pile into the grain pile temperature prediction model, train the grain pile temperature prediction model, and obtain the target grain pile temperature prediction model, wherein the grain pile temperature prediction model is a neural network model, including:

[0118] The reconstructed data of the target grain pile is input into the update gate and reset gate in the grain pile temperature prediction model to obtain the hidden layer state at the current moment.

[0119] Based on the current hidden layer state, the optimal parameters of the grain pile temperature prediction model are adjusted using the ant colony method, and the target grain pile temperature prediction model is obtained based on the optimal parameters.

[0120] In one embodiment, the processing module 20 is further configured to input the reconstructed data of the target grain pile into the grain pile temperature prediction model, train the grain pile temperature prediction model to obtain the target grain pile temperature prediction model, and further include:

[0121] The reconstructed data of the target grain pile is input into LSTM-MLP, bidirectional LSTM-MLP, GRU-MLP and bidirectional GRU-MLP neural network models respectively for training, to obtain trained LSTM-MLP, bidirectional LSTM-MLP, GRU-MLP and bidirectional GRU-MLP neural network models.

[0122] Input the current data of the current target grain pile into the trained LSTM-MLP, bidirectional LSTM-MLP, GRU-MLP and bidirectional GRU-MLP neural network models to obtain the prediction result sets corresponding to different neural network models;

[0123] The predicted result sets corresponding to the different neural network models are compared with the actual result sets, and the target grain pile temperature prediction model is selected based on the comparison results.

[0124] In one embodiment, the modeling module 30 is further configured to compare the predicted result sets corresponding to different neural network models with the actual result sets, and select a target grain pile temperature prediction model based on the comparison results, including:

[0125] The predicted values ​​corresponding to the different neural network models are compared with the values ​​of the actual data to obtain the numerical prediction error;

[0126] The predicted graphs corresponding to the different neural network models are compared with the graphs of the real data to obtain the graph prediction error;

[0127] The target grain pile temperature prediction model is selected based on the numerical prediction error and the graphical prediction error.

[0128] In one embodiment, the modeling module 30 is further configured to select a target grain pile temperature prediction model based on the numerical prediction error and the graphical prediction error, including:

[0129] The mean square error is obtained by taking the expected value of the squared difference between the numerical prediction error and the graphical prediction error and the true value.

[0130] The root mean square root (RMS) is obtained by taking the root square root of the mean square error, and the target grain pile temperature prediction model is selected based on the RMS error.

[0131] Other embodiments or specific implementations of the grain pile temperature prediction device of the present invention can refer to the above-described method embodiments, and therefore have at least all the beneficial effects brought about by the technical solutions of the above embodiments, which will not be repeated here.

[0132] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0133] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. In the unit claims listing several devices, several of these devices may be embodied by the same hardware item. The use of the terms first, second, and third, etc., does not indicate any order and can be interpreted as names.

[0134] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as a read-only memory image (ROM) / random access memory (RAM), magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0135] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A method for predicting the temperature of a grain pile, characterized in that, The method includes the following steps: Obtain the initial historical data of the target grain pile and process missing values ​​to obtain the complete historical data of the target grain pile; Abnormal data is removed and reconstructed from the complete historical data of the target grain pile to obtain the reconstructed data of the target grain pile; The reconstructed data of the target grain pile is input into the grain pile temperature prediction model, and the grain pile temperature prediction model is trained to obtain the target grain pile temperature prediction model. Obtain the current data of the target grain pile and input it into the target grain pile temperature prediction model to obtain the grain pile temperature prediction result; The process of obtaining the initial historical data of the target grain pile and processing missing values ​​to obtain the complete historical data of the target grain pile includes: Identify missing values ​​in the historical initial data of the target grain pile, and obtain the k nearest neighbor data of the missing values, where k is an integer greater than or equal to 1; Calculate the Euclidean distance of the k nearest neighbors in two-dimensional space and extend it to a higher-dimensional space to obtain the Euclidean distance in the higher-dimensional space; Based on the Euclidean distance in the high-dimensional space, missing values ​​are filled in the historical initial data of the target grain pile to obtain the complete historical data of the target grain pile. The process of removing and reconstructing abnormal data from the historical complete data of the target grain pile to obtain the reconstructed data of the target grain pile includes: One-dimensional temperature time-series data is collected from the complete historical data of the target grain pile, and a trajectory matrix is ​​constructed according to the preset window length; The trajectory matrix is ​​decomposed using singular value decomposition to obtain n corresponding feature vectors; The n feature vectors are decomposed into m disjoint groups, where the m disjoint groups represent different trend data; Select the required trend data from the trend data and reconstruct it to obtain the reconstructed data of the target grain pile; The reconstructed data of the target grain pile is input into the grain pile temperature prediction model, and the grain pile temperature prediction model is trained to obtain the target grain pile temperature prediction model. The grain pile temperature prediction model is a neural network model, comprising: The reconstructed data of the target grain pile is input into the update gate and reset gate in the grain pile temperature prediction model to obtain the hidden layer state at the current moment. Based on the current hidden layer state, the optimal parameters of the grain pile temperature prediction model are adjusted using the ant colony method, and the target grain pile temperature prediction model is obtained based on the optimal parameters.

2. The method as described in claim 1, characterized in that, Before inputting the reconstructed data of the target grain pile into the grain pile temperature prediction model, training the grain pile temperature prediction model, and obtaining the target grain pile temperature prediction model, the process further includes: The reconstructed data of the target grain pile is input into LSTM-MLP, bidirectional LSTM-MLP, GRU-MLP and bidirectional GRU-MLP neural network models respectively for training, to obtain trained LSTM-MLP, bidirectional LSTM-MLP, GRU-MLP and bidirectional GRU-MLP neural network models. Input the current data of the current target grain pile into the trained LSTM-MLP, bidirectional LSTM-MLP, GRU-MLP and bidirectional GRU-MLP neural network models to obtain the prediction result sets corresponding to different neural network models; The predicted result sets corresponding to the different neural network models are compared with the actual result sets, and the grain pile temperature prediction model is selected based on the comparison results.

3. The method as described in claim 2, characterized in that, The step of comparing the predicted result sets corresponding to the different neural network models with the actual result sets, and selecting the target grain pile temperature prediction model based on the comparison results, includes: The predicted values ​​corresponding to the different neural network models are compared with the values ​​of the actual data to obtain the numerical prediction error; The predicted graphs corresponding to the different neural network models are compared with the graphs of the real data to obtain the graph prediction error; The target grain pile temperature prediction model is selected based on the numerical prediction error and the graphical prediction error.

4. The method as described in claim 3, characterized in that, The step of selecting the target grain pile temperature prediction model based on the numerical prediction error and the graphical prediction error includes: The mean square error is obtained by taking the expected value of the squared difference between the numerical prediction error and the graphical prediction error and the true value. The root mean square root (RMS) is obtained by taking the root square root of the mean square error, and the target grain pile temperature prediction model is selected based on the RMS error.

5. A grain pile temperature prediction device, characterized in that, The grain pile temperature prediction device includes: The acquisition module is used to acquire the historical initial data of the target grain pile and process missing values ​​to obtain the complete historical data of the target grain pile. The processing module is used to remove and reconstruct abnormal data from the historical complete data of the target grain pile to obtain the reconstructed data of the target grain pile. The modeling module is used to input the reconstructed data of the target grain pile into the grain pile temperature prediction model, train the grain pile temperature prediction model, and obtain the target grain pile temperature prediction model. The acquisition module is also used to acquire the current data of the target grain pile and input it into the target grain pile temperature prediction model to obtain the grain pile temperature prediction result. The acquisition module is also used to identify missing values ​​in the historical initial data of the target grain pile and acquire k neighboring data of the missing values, where k is an integer greater than or equal to 1; The acquisition module is also used to calculate the Euclidean distance of the k nearest neighbor data in two-dimensional space and extend it to a higher-dimensional space to obtain the Euclidean distance in the higher-dimensional space. The acquisition module is also used to fill in missing values ​​in the historical initial data of the target grain pile according to the Euclidean distance in the high-dimensional space to obtain the complete historical data of the target grain pile. The processing module is also used to collect one-dimensional temperature time-series data from the historical complete data of the target grain pile, and construct a trajectory matrix according to the preset window length; The processing module is also used to perform singular value decomposition on the trajectory matrix to obtain the corresponding n feature vectors; The processing module is further configured to decompose the n feature vectors into m disjoint groups, wherein the m disjoint groups represent different trend data; The processing module is also used to select the required trend data from the trend data for reconstruction to obtain the reconstructed data of the target grain pile; The modeling module is also used to input the reconstructed data of the target grain pile into the update gate and reset gate in the grain pile temperature prediction model to obtain the hidden layer state at the current moment. The modeling module is also used to adjust the grain pile temperature prediction model according to the hidden layer state at the current moment using the ant colony method to obtain the optimal parameters, and to obtain the target grain pile temperature prediction model according to the optimal parameters.

6. A grain pile temperature prediction device, characterized in that, The grain pile temperature prediction device includes a memory, a processor, and a grain pile temperature prediction program stored in the memory and executable on the processor. When the grain pile temperature prediction program is executed by the processor, it implements the grain pile temperature prediction method as described in any one of claims 1 to 4.

7. A storage medium, characterized in that, The storage medium stores a grain pile temperature prediction program, which, when executed by a processor, implements the grain pile temperature prediction method as described in any one of claims 1 to 4.