Skip to main content
Wiley Open Access Collection logoLink to Wiley Open Access Collection
. 2026 Jul 2;106(13):8210–8225. doi: 10.1002/jsfa.70849

Spatiotemporal self‐attention network ST‐GranNet for granary temperature prediction

Changtian Li 1, Zelong Zhou 1, Hongfu Liu 1, Zhikang Chen 1, Han Gu 1, Jun Ma 2, Bin Chen 1,✉
PMCID: PMC13543744  PMID: 42390028

Abstract

Background

Food storage temperature prediction is critical for ensuring the safety of the food supply chain and reducing food waste. Traditional physical modeling and statistical methods heavily depend on prior data and struggle to capture complex nonlinear features. Existing deep learning models for granary temperature prediction still face challenges in effectively extracting spatiotemporal features. With traditional adjacency‐matrix‐based methods it is difficult to capture the complex relationships among sensors, most existing algorithms merely performing simple concatenation or sequential input of spatiotemporal features, lacking sufficient interaction. In addition, they fall short in incorporating external feature variables. To address these limitations, this study proposes ST‐GranNet, an innovative spatiotemporal attention framework based on the self‐attention mechanism. ST‐GranNet employs channel embedding and point embedding to capture spatial correlations among sensors and long‐term dependencies in temperature sequences, respectively, followed by a novel fusion approach to integrate these spatiotemporal features. The model is validated on a real corn storage dataset from Sinograin Chongqing Depot Co. Ltd.

Results

Experimental results demonstrate that ST‐GranNet outperforms conventional time series prediction models (LSTM and GRU) in terms of mean absolute error and mean squared error. It also exhibits noticeable enhancements compared with recently emerging self‐attention‐based models. We optimize the model performance via hyperparameter experiments. Ablation studies further confirm the effectiveness of the coordinated spatiotemporal feature extraction in enhancing prediction accuracy. Visualization experiments additionally illustrate the internal mechanism of the self‐attention in ST‐GranNet.

Conclusion

This work provides a high‐precision temperature prediction tool for intelligent grain storage management, enabling real‐time monitoring and risk warning, with significant potential to reduce grain loss and optimize storage conditions. © 2026 Society of Chemical Industry.

Keywords: grain storage safety, temperature prediction, self‐attention mechanism, spatiotemporal features, deep learning

INTRODUCTION

Food security is an extremely important issue on a global scale. Ensuring the stability of both the quality and quantity of food during storage is crucial for reducing food waste and maintaining the stability of the food supply chain. 1 According to the Food and Agriculture Organization of the United Nations, about 30% of the world's food is lost each year during production, storage and transportation, with the most significant losses occurring in storage. 2 Food loss not only threatens global food security but also brings about severe economic and environmental issues. Economically, food loss translates into direct economic losses for farmers, traders and governments while also increasing the risk of market price volatility. 3 Environmentally, food loss leads to the waste of agricultural resources, such as water, land and energy, and the greenhouse gas emissions resulting from food decay contribute to environmental pollution. 4 In developing countries, food loss is particularly severe due to limited storage conditions. 5 Thus, utilizing advanced predictive technologies to reduce food loss in granaries is of great importance for ensuring global food security, reducing economic losses and alleviating environmental burdens. In granary environments, several factors – including temperature, humidity and ventilation – jointly determine the safety and quality of stored grain. Among these, temperature is the most critical parameter, because its fluctuations can directly trigger mold growth, pest infestation and accelerated grain deterioration. 6 Recent studies have shown that temperature not only affects grain quality but also directly regulates the population dynamics of major storage pests such as Sitophilus zeamais, with low temperatures significantly suppressing their activity and high temperatures accelerating infestation and mold growth. 7

Effective temperature prediction and control are key issues in grain granary management. With technological advancements, modern grain granary management is gradually moving toward automation and intelligence. 8 For instance, Gu et al. developed an inductive spatiotemporal graph convolutional neural network to reconstruct high‐resolution granary temperature fields from sparse sensor data, demonstrating the feasibility of intelligent temperature monitoring systems. 9 Traditional temperature monitoring relies on periodic manual measurements or physical modeling‐based prediction methods, but these methods tend to have low accuracy and real‐time capability. 10 In recent years, the development of sensor network‐based data acquisition systems has provided abundant data support for real‐time monitoring of granary environments. 11 Simultaneously, the rapid development of artificial intelligence, especially breakthroughs in deep learning for time series prediction, has opened up new possibilities for improving the accuracy of granary temperature predictions. 12

In the past, physical modeling and statistical methods have long been applied to temperature prediction in grain granaries, such as analytical models based on heat conduction equations, time series analysis methods and regression models. 13 However, these methods often exhibit limitations when encountering complex environmental factors. For example, physical modeling requires substantial prior knowledge and precise parameter settings, while statistical methods can capture certain nonlinear dynamics, but their performance often degrades in large‐scale granary systems where complex spatiotemporal interactions exist. In such cases, these methods face difficulties in modeling high‐dimensional dependencies and thus exhibit limited generalization ability. In the realm of machine learning, traditional algorithms such as support vector machines, 14 random forests 15 and gradient boosting decision trees 16 have improved prediction accuracy to some extent, but they still rely on manually designed features, making the feature construction process complex. Additionally, these methods have limited capability to model long‐term dependencies in time series, making it difficult to capture long‐term temperature trends effectively. Moreover, traditional machine learning methods often lack generalization ability, leading to unstable prediction accuracy across different granary environments. In contrast, deep learning methods, particularly long short‐term memory (LSTM) 17 networks and convolutional neural networks (CNNs), 18 show distinct advantages in time series prediction tasks. Additionally, the recently proposed self‐attention mechanism has brought new insights into time series prediction. 19 Despite the advancements of deep learning methods, they still present certain limitations in the context of grain temperature prediction. (1) Due to the deployment of sensor arrays, the collected temperature time series inherently exhibit both temporal and spatial correlations. 20 Fully exploiting these correlations is essential for improving prediction accuracy. However, most existing models, which rely on single‐stream architectures, are inadequate in capturing temporal and spatial dependencies simultaneously, resulting in suboptimal utilization of the underlying data features. (2) The correlations among temperature sensors in grain granaries are highly complex. Traditional approaches, such as adjacency matrices, fail to fully capture the spatial features among sensors, and manually assigning feature weights relies too heavily on subjective judgment. Therefore, a method capable of adaptively extracting internal spatial features within a granary is required. (3) Although multi‐model fusion techniques can extract both temporal and spatial features from grain temperature data, such fusion typically involves additive combination of features or sequential input into different models. These approaches fail to enable mutual interaction between temporal and spatial features, offering limited improvement to the prediction structure.

To address these challenges, this paper proposes ST‐GranNet, a novel spatiotemporal attention model based on the self‐attention mechanism. Without modifying the core self‐attention structure, ST‐GranNet extracts temporal and spatial features of grain temperature data via two separate embedding methods. A newly designed feature fusion module then integrates these spatiotemporal characteristics, enabling effective interaction between spatial and temporal features to enhance prediction accuracy. During model training, missing and anomalous values are preprocessed using techniques including linear interpolation and spike detection. The processed data are then split into training and testing sets, with model parameters optimized through a loss function. Training halts once the loss meets a preset threshold, and the trained model is saved. Finally, the testing set is input to generate predictions, which are compared against actual values for performance evaluation. Comparative experiments show that ST‐GranNet achieves superior accuracy compared to existing models, while ablation studies confirm the contribution of each component within the architecture.

The structure of this paper is as follows. The next section reviews various methods for predicting granary temperature, and then we introduce the research methods, including the experimental setup, grain temperature monitoring system, data preprocessing and data correlation analysis. Then is presented the fundamental knowledge and the design of our model, followed by the experimental results and related discussion. Conclusions are then presented.

RELATED WORK

With the intelligent development of computer software technology, granary temperature prediction techniques have continued to evolve and can be broadly categorized into three main approaches: mathematical simulation methods, machine learning methods and deep learning methods. Each approach has distinct theoretical foundations, modeling strategies and predictive performance. This section systematically elaborates on these three categories, analyzing their applicability, advantages and limitations.

Mathematical simulation methods

Mathematical simulation methods have been widely applied in the field of granary temperature prediction. Al‐Yahya et al. developed a mathematical simulation model for corn storage environments, which can predict changes in the average temperature and moisture content under natural ventilation conditions, and, by incorporating real‐time meteorological data, assess key variables during different storage periods, with potential applicability to multiple grain types. 21 Jia et al. proposed a two‐dimensional nonlinear heat transfer model to describe the transient temperature distribution inside cylindrical granaries, considering factors such as solar radiation, ambient air temperature and convective heat transfer, while introducing complex mixed boundary conditions for more realistic heat transfer simulations. 22 Building on this, Montross et al. constructed an axisymmetric finite element‐based heat transfer model, incorporating hourly solar radiation, wind speed, ambient temperature and relative humidity to more accurately simulate heat, mass and momentum transfer within upright granary structures. 23 Rocha et al. further employed a three‐dimensional numerical simulation approach to investigate heat and moisture transfer processes in corn piles stored in flat‐bottom granaries, identifying critical temperature and interstitial humidity thresholds that may lead to microbial growth, thereby providing theoretical support for mold prevention. 24 Subsequently, Quemada‐Villagómez et al. introduced additional meteorological variables and developed a heat–moisture coupling model for sorghum grain beds in cylindrical granaries, treating interstitial air as a porous medium and revealing how environmental fluctuations influence the distribution of temperature and humidity, thus offering valuable theoretical support for optimizing storage conditions. 25 Saá et al. also investigated traditional storage structures from the perspectives of energetics and bioclimatology. For example, focusing on Galician granaries (hórreos), which have been used in Europe and Asia for over 2000 years, the study combined field measurements and computational fluid dynamics simulations to analyze performance under varying solar radiation and wind conditions. The high consistency between experimental and simulated results elucidated the distribution patterns of temperature, humidity and airflow within the structure. This research not only deepens the understanding of traditional storage mechanisms but also provides valuable insights for optimizing modern storage environments. 26

Machine learning methods

Machine learning methods have been increasingly applied to grain temperature prediction, offering greater flexibility than traditional physical modeling by automatically learning patterns from data. Several representative approaches can be distinguished in the literature.

Chen et al. optimized four machine learning models – adaptive boosting (AdaBoost), decision trees, extra trees and random forests – through hyperparameter tuning, and further integrated them into an ensemble framework. In addition, they employed a random forest model to identify key factors influencing grain temperature, quantifying the relative importance of different variables. Their results confirmed that the ensemble approach outperformed single models in both accuracy and robustness. 27

To examine the influence of external factors, Duan et al. incorporated local meteorological data into their prediction framework. They applied support vector regression and AdaBoost algorithms to predict the average grain pile temperature. To enhance model efficiency, they further analyzed correlations using Pearson coefficients and performed principal component analysis to reduce dimensionality and remove redundancy. This study highlighted the benefits of integrating external meteorological information with internal sensor data. 28

Wang et al. proposed a hysteresis cycle model, based on least squares and Fourier series, to describe the lag effect of grain pile temperature in response to ambient temperature changes. The model established a transformation coefficient between air and grain pile temperature using Fourier analysis, with the optimal order determined by the Akaike information criterion. Their experimental results demonstrated that the predicted values closely matched observations, showing the model's effectiveness and practicality in grain temperature forecasting. 29

Together, these studies illustrate the progressive use of machine learning and statistical modeling for grain temperature prediction – from model ensembles and feature analysis to external variable integration and finally to specialized mathematical representations of dynamic effects.

Deep learning methods

Deep learning methods have achieved remarkable progress in time series forecasting, including applications in granary temperature prediction. These approaches differ in their strategies to capture temporal and spatial dependencies, as well as local and global features.

LSTM networks are widely used to capture long‐term temporal dependencies, while gated recurrent units (GRU), a variant of LSTM, offer computational efficiency. Tao et al. employed a GRU model for time‐series prediction, combined with multiple linear regression for feature generation and wavelet filtering to denoise the input data. 30 Despite their effectiveness, LSTM‐based models face limitations in handling long continuous sequences and exhibit relatively high computational complexity. To address this, Liu et al. developed a hybrid CNN–GRU model: CNN modules first extract vector features from input data, which are then learned by GRU to predict grain pile temperature. 31

Self‐attention mechanisms have been increasingly applied to extract hidden features in time series. Wang et al. proposed a lightweight, high‐accuracy model that integrates broad learning networks with one‐dimensional (1D) convolutional modules and multi‐head self‐attention (MHSA). The 1D convolution extracts local temporal correlations, while MHSA captures key dependencies and global temporal correlations, enhancing predictive performance. 32

Grain temperature data not only are temporally dependent but also exhibit spatial correlations across sensor nodes. Many existing models fail to capture these spatial features. To overcome this limitation, Qu et al. proposed a multi‐output spatiotemporal model combining graph convolutional networks (GCNs) and Transformers. The GCN component models spatial correlations among sensors and the granary sensor network topology, while the Transformer captures both long‐term and short‐term temporal dependencies, improving overall forecasting performance. 33

These studies illustrate the evolution of deep learning approaches for grain temperature prediction – from LSTM/GRU temporal modeling to attention‐ and convolution‐enhanced methods and finally to spatiotemporal models that jointly capture spatial and temporal dependencies. This progression highlights the increasing complexity and sophistication of models to fully exploit the characteristics of grain temperature data.

METHODOLOGY

Experimental scenario

The temperature data used in this study come from the corn storage temperature monitoring data of granary 18 and granary 20, both of which are under the management of Sinograin Chongqing Depot Co. Ltd. In the storage environment, corn is typically stored for a period of 2–3 years before being released into the market for distribution. The target granaries are located in a warm and humid grain storage region. This area is characterized by relatively high average temperatures, with 121 to 253 days per year having an average temperature above 15 °C. The annual precipitation ranges from 800 to 1600 mm, while the annual average relative humidity varies between 34% and 98%. The region is further distinguished by large seasonal temperature differences and high humidity levels. The dataset is obtained from the internal temperature monitoring system of the grain granary, which collects daily temperature data of the stored grain. The temperature data from corn storage in granary 18 and granary 20 are selected as the research object, focusing on the analysis of the spatial and temporal variations of the internal temperature during the corn storage period. Figure 1(a) illustrates the interior conditions of the corn granary.

Figure 1.

Figure 1

(a) Schematic of the granary test field. (b) Basic structure of a granary system.

Grain temperature monitoring system

The grain temperature monitoring system consists of temperature measurement cables, data acquisition modules, wireless communication modules and a control center, with its overall architecture shown in Fig. 1(b). The temperature measurement cables are evenly distributed within the grain stack and are responsible for real‐time collection of temperature data from the multiple monitoring points. The data acquisition modules aggregate and perform preliminary processing on the sensor data. The wireless communication modules, utilizing Internet of Things technology, transmit the processed data remotely to the control center. The control center is responsible for data storage, analysis and processing. Once abnormal temperatures are detected that exceed safety thresholds, the system triggers an alarm mechanism to alert the management personnel, prompting them to take necessary actions such as ventilation or cooling to ensure the safety and quality of the stored grain.

In the grain granary temperature monitoring network, the temperature measurement system of granary 18 and granary 20 consists of 72 temperature measurement cables, evenly distributed within a 36 m × 30 m × 6 m sized corn storage facility, arranged in an eight‐row × nine‐column configuration. Each temperature measurement cable is evenly spaced with four temperature sensors, forming a monitoring network with a total of 288 sensors. Here, we establish a three‐dimensional coordinate system based on the spatial location of the sensors, where the layer (x‐axis), row (y‐axis) and column (z‐axis) correspond to the physical arrangement of the sensors, thus constructing a spatial temperature matrix in the form of layer × row × column. By analyzing the temperature data matrix, the temperature data collected by each sensor within the grain granary can be systematically analyzed, leading to an exploration of the spatial distribution patterns of grain temperature, which provides data support for granary environment monitoring and optimization.

Data preprocessing

Data preprocessing is a crucial step to ensure data quality and improve the predictive accuracy of the model. Herein, a systematic data preprocessing workflow is proposed, which includes missing value detection, interpolation repair, anomaly detection and anomaly smoothing, as shown in Fig. 2(a). Two complete storage cycles of temperature records were extracted from the historical data of granary 18 and granary 20, respectively. The data collection period for granary 18 spans from 1 August 2019 to 18 October 2021, covering a total of 820 days. For granary 20, the data collection period extends from 3 December 2018 to 28 October 2021, covering a total of 1061 days. Under normal circumstances, grain temperature data were collected twice a week, typically scheduled on Mondays and Thursdays. However, due to factors such as network delays or hardware malfunctions that may affect the sensors, data loss occurred, with missing ratios of 6.1% and 7.3% for the two granaries, respectively. Therefore, interpolation was applied to handle the missing data, laying the foundation for subsequent analysis.

Figure 2.

Figure 2

(a) Flowchart of grain temperature preprocessing. (b) Autoencoder for anomaly value detection.

Before performing interpolation, we first conducted an augmented Dickey–Fuller (ADF) test on the grain temperature series to determine the most suitable interpolation method. The results showed that for granary 18, the average P‐value was 0.079 and the average ADF statistic was −3.22. For granary 20, the average P‐value was 0.095 and the average ADF statistic was 3.056. Compared with the critical values, the P‐values of both granaries were close to 0.1, and the average statistics were around −3.00. Overall, the hypothesis of non‐stationarity in the ADF test could be rejected at the significance level, indicating that most of the series are stationary and exhibit obvious trends. Under these circumstances, the variation between adjacent time points is approximately linear, and thus the results of linear interpolation could basically reflect the actual situation. Figure 3(a) shows the first 50 temperature values without interpolation from four randomly selected sensor nodes in granary 18, while Fig. 3(b) illustrates the results after interpolation.

Figure 3.

Figure 3

(a) Original data. (b) Interpolated data.

In time series data, sensors may be affected by external environmental factors or equipment malfunctions, leading to sudden spikes or drops in the data, which are considered as abnormal values. Based on this, we constructed an autoencoder composed of 1D convolutional layers to reconstruct the normal values of the grain temperature series. The core idea is to learn the compression–reconstruction process of normal data and identify abnormal samples that cannot be well reconstructed, as shown in Fig. 2(b). During training, the sequence length of each sample was set to 8 to cover approximately one month of observations. The learning rate was set to 0.001, the number of training epochs to 200 and the model was trained using the Adam optimizer with the MSE loss function. To preserve the integrity of the original data, the reconstruction error threshold was set at 97.5%, ensuring that the original data remain largely intact. After marking the anomaly values using the autoencoder, we replaced them using a moving average algorithm. The core idea is to substitute the current value with the average of recent data, thereby smoothing the series and highlighting its underlying trend.

After the above processes of missing value imputation, outlier detection and smoothing, the integrity and consistency of the original grain temperature data are significantly improved. This ensures the quality of the input data, providing a reliable foundation for the subsequent training and prediction of the model, while also effectively enhancing the predictive accuracy and stability of our model.

Correlation analysis

To better understand the underlying mechanisms of temperature variation in granaries, we conducted a comprehensive correlation analysis from both internal and external perspectives. Specifically, we examined (1) the spatial correlations among sensors within the granary and (2) the correlations between external environmental factors (temperature and humidity) and the internal temperature distribution.

To investigate the spatial dependencies of temperature data between different sensor locations inside the grain granary, Spearman's rank correlation coefficient was employed as a quantitative measure. Spearman's coefficient is a nonparametric statistic that evaluates the strength and direction of monotonic relationships between two variables. For each pair of sensors, the correlation coefficient was calculated, and a symmetric correlation matrix was constructed to represent the spatial dependency structure.

To facilitate visualization, the correlation matrix was represented as a heatmap (Fig. 4), where the color intensity reflects the correlation strength between sensor pairs. The results reveal that adjacent sensors exhibit strong correlations, indicating that the internal temperature field of the granary presents clear spatial distribution patterns. These findings provide theoretical support for modeling spatial features and serve as a foundation for accurate spatiotemporal temperature prediction.

Figure 4.

Figure 4

Spatial self‐correlation heatmap of the granary using Spearman's rank correlation coefficient: (a) granary18; (b) granary 20.

In addition to internal spatial dependencies, external environmental factors may influence the internal thermal conditions of the grain pile. To explore this relationship, we calculated Spearman's rank correlation coefficients between external variables (temperature and humidity) and the temperature data from all 288 internal sensors. The resulting correlation matrices were visualized as heatmaps (Fig. 5), where the horizontal axis denotes the storage period and the vertical axis represents the degree of correlation with external variables.

Figure 5.

Figure 5

Heatmap of Spearman's rank correlation coefficient between exogenous and endogenous variables. (a) Exogenous temperature versus endogenous variables in granary 18. (b) Exogenous humidity versus endogenous variables in granary 18. (c) Exogenous temperature versus endogenous variables in granary 20. (d) Exogenous humidity versus endogenous variables in granary 20.

The analysis shows a strong positive correlation between external and internal temperature, suggesting that fluctuations in ambient temperature can directly affect the thermal state of the stored grain. By contrast, the influence of external humidity is relatively weak and indirect. These results provide theoretical support for incorporating external temperature and humidity as auxiliary variables in predictive modeling, while also offering practical guidance for environmental monitoring and regulation in grain storage management.

Overall, the correlation analysis demonstrates that the grain pile temperature is shaped by both internal spatial dependencies and external environmental factors. While spatial correlations highlight the inherent structural characteristics of the granary, external correlations emphasize the impact of ambient conditions. These insights justify the integration of both internal and external features into the proposed predictive framework, thereby enhancing the robustness and accuracy of granary temperature forecasting.

DEEP LEARNING FRAMEWORK

Preliminaries

Problem formulation

Let S denote the number of sensors in the granary (here S=288). At each time step t, we denote the temperature measurements from all sensors as Xt∈ℝS. Given the past Tin steps of observations Xt−Tin+1…Xt, the forecasting objective is to predict the future Tout steps Yt+1…Yt+Tout, where Yt+τ∈ℝS. Formally, the task is defined as learning a mapping f:ℝTin×S→ℝTout×S, Y=fX. Here, we set Tin=7 and Tout=7, which corresponds to predicting the next 7 days of temperatures for all sensors based on the previous 7 days. It should be emphasized that the main research task is multistep forecasting. All mathematical notations used in this work are summarized in Appendix A.

Multi‐head self‐attenuation

The MHSA mechanism is one of the key technologies for processing sequential data, such as natural language processing and time series analysis. As a core component of Transformer, the MHSA mechanism effectively models the relationships and features between different positions in the sequence. Compared to traditional attention mechanisms, such as graph attention networks, 34 the MHSA mechanism computes multiple attention heads in parallel, allowing to learn multiscale feature representations in different subspaces. This enables it to capture the underlying patterns within the data comprehensively. Specifically, in MHSA, each attention head first performs a linear transformation on the input data to generate the query (Q), key (K) and value (V) matrices. The calculation formula is as follows:

Q=XWQ,K=XWK,V=XWV (1)

where X represents the input features and WQ, WK and WV are the linear transformation matrices for Q, K and V, respectively. Then, by calculating the dot product between Q and K, and dividing by the scaling factor dk, the attention score is obtained:

A=QKTdk (2)

Then, the SoftMax function is used to normalize the attention scores to generate the final attention weights:

α=softmaxA (3)

For multiple attention heads, the independently computed results are concatenated, and then passed through a linear transformation to generate the final output:

O=ConcatO1O2…OhWO (4)

where h represents the number of attention heads and WO is the projection matrix for the final linear transformation. In time series prediction tasks, traditional neural network models, such as recurrent neural networks (RNNs) 35 and CNNs, 36 have certain limitations when modeling long‐term dependencies in sequences, including difficulty in capturing long‐term dependencies and issues like gradient vanishing. Because of the self‐attention mechanism, the relevant models can directly model the interactions between any time steps. Through calculating attention scores, the model could be guided to focus on the key patterns in the time series that are crucial for prediction, which significantly enhances the prediction accuracy and the expressive power of the model.

Overall structure of ST‐GranNet

The overall structure of ST‐GranNet includes a spatial block, a temporal block and a linear layer for prediction, and it is designed to jointly model spatial dependencies among sensors and temporal dependencies across time steps. The input tensor X∈ℝTin×S is first transformed into two parallel representations: a channel embedding for extracting spatial features and a point embedding for capturing temporal dynamics. The channel embedding is fed into the spatial block to model the spatial dependencies among sensors, while the point embedding is processed by the temporal block to extract temporal features from the time series. Subsequently, the spatial and temporal features are fused and passed through a linear layer, flattened, and output to produce the final prediction results, as illustrated in Fig. 6. The spatiotemporal feature fusion is shown in Fig. 7. This design effectively captures spatiotemporal correlations, providing accurate feature representations for grain temperature forecasting.

Figure 6.

Figure 6

Architecture of ST‐GranNet.

Figure 7.

Figure 7

Schematic graph of spatiotemporal feature fusion.

Channel embedding

The introduction of the channel embedding concept represents a significant advancement of the self‐attention mechanism in the prediction of multivariate time series. 37 By reversing the traditional Transformer input, the self‐attention mechanism can capture correlations across different time series variables. In a grain granary, each sensor provides a separate time series, yet hidden correlations among sensors exist and can be leveraged. Traditional spatial correlation methods, such as spatiotemporal graph neural networks or graph attention networks, rely on adjacency matrices to establish physical relationships between nodes, which limits their ability to capture deeper spatial dependencies. In contrast, channel embedding is used to represent grain temperature data, enabling the model to uncover previously unnoticed dependencies.

Each sensor s is treated as a feature channel, and its readings across time are embedded into a latent representation:

Echt,s=φchxt,s (5)

where φch:ℝ→ℝd is a linear projection and ps∈ℝd is a learnable positional embedding reflecting the sensor's spatial location. The resulting channel embedding is Ech∈ℝS×d. Through channel embedding, our model can uncover previously unnoticed dependency relationships, thereby improving the prediction accuracy.

Spatial block

In ST‐GranNet, the spatial block extracts spatial dependencies among sensors using a MHSA mechanism and stabilizes data distribution via layer normalization (LayerNorm), thereby improving training stability and generalization. At each time step, the set of sensor embeddings Echt,1…Echt,S is first passed through the MHSA encoder to capture inter‐sensor correlations:

Zspt=MHSAEcht∈ℝS×d (6)

Then, LayerNorm is applied to normalize the hidden state of each sensor:

LayerNormzt,s=γzt,s−μsσs2+ε+β (7)

where μs and σs2 are the mean and variance of sensor s and γ and β are learnable parameters. The combination of MHSA and LayerNorm enables the spatial block to effectively capture complex spatial features, providing more accurate representations for grain temperature prediction.

Point embedding

The point embedding in ST‐GranNet combines the concepts of channel independence and patch embedding, originally proposed by Yuqi Nie et al. Channel independence transforms each sensor's time series into an independent sequence, allowing the self‐attention mechanism to focus solely on intra‐channel feature variations while avoiding interference from other channels. Each sequence is further divided into temporal patches, and each patch is projected through an embedding layer:

Et,spt=ϕptxt,sp+pt∈ℝTin×S×d,p=1,…,P (8)

where xt,sp denotes the pth temporal patch of sensor S at time step t, φpt:ℝ→ℝd is a linear projection function, pt∈ℝd is a learnable temporal positional embedding representing the order of the patch in the sequence, d is the embedding dimension and P is the number of patches per sequence.

Feature fusion

In ST‐GranNet, to fully leverage spatial and temporal information, we employ spatial features as prior guidance to enable the temporal module to model the dynamic spatiotemporal co‐evolution relationship. The model concatenates the spatial embedding Zspt,s with the point embedding Eptt,s, forming a joint feature representation that simultaneously preserves the spatial dependencies and temporal patterns of each sensor. Simply put, the fusion operation can be regarded as aligning the spatial features extracted from a sensor's sequence with its point‐embedded temporal sequence in parallel, so that the spatial embedding features can assist the subsequent temporal module in feature extraction.

The fusion operation is defined as:

Zfuset,s=Zspt,s∥Eptt,s,Zfuse∈ℝTin+1×S×d (9)

where ·∥· denotes concatenation along the feature dimension. In this way, the spatial features serve as auxiliary information for temporal feature extraction, enabling the model to better capture complex spatiotemporal patterns.

Temporal block

The temporal block is composed of MHSA, LayerNorm and a feed‐forward network (FFN), designed to capture long‐term temporal dependencies in grain temperature sequences. Specifically, the input first passes through MHSA to model temporal dependencies, followed by LayerNorm to stabilize the training process. Then, an FFN is applied to perform nonlinear transformations and extract higher‐order temporal features. Finally, another LayerNorm is used to maintain feature stability and improve generalization. For each sensor sss, its fused sequence Zfuse1,s,…,ZfuseTin,s,ZfuseTin+1,s is processed sequentially through MHSA, residual connections, LayerNorm and FFN. The overall process is expressed as:

Hs1=MHSAZfuse:,s+Zfuse:,s (10)
Hs2=LayerNormHs1 (11)
Hs3=FFNHs2+Hs2 (12)
Ztemps=LayerNormHs3 (13)

where the FFN is defined as:

FFNx=σxW1+b1W2+b2 (14)

W1∈ℝd×dff, W2∈ℝdff×d are learnable weight matrices, b1, b2 are bias terms, σ· is a nonlinear activation function (e.g. ReLU or GELU) and dff is the hidden dimension of the feed‐forward layer.

The final output:

Ztemps∈ℝTin+1×d (15)

serves as the temporal representation for subsequent prediction tasks.

Prediction head

Before prediction, the data are first split to transform each sensor's temporal hidden representation from Ztemps∈ℝTin+1×d to Ztemps∈ℝTin×d removing the extra time step. The split data are then flattened to unify the input dimensions:

Ztemp=FlattenZtemps∈ℝs×d (16)

The final hidden representations are mapped to the forecasting horizon through a linear projection:

Y=LinearZtemp∈ℝs×Tout (17)

To give readers a clearer understanding of the model architecture, Table 1 lists the layer‐by‐layer architecture of ST‐GranNet, including shapes and parameters.

Table 1.

ST‐GranNet architecture specification

Module Layer type Inputshape Output shape Key parameters
Input reshape — B × T_in×4 × 8 × 9 B × T_in×288 —
Channel embedding Linear B × T_in × 288 B × 288 × d_model Linear (7 → 512)
Spatial block MHSA+LayerNorm B × 288 × d_model B × 288 × d_model heads = 8, d_model = 512, d_ff = 2048
Point embedding Linear (per patch) + positional embed B × T_in × 288 B × (T_in × 288) × d_model

Patch size = 1, Linear(1 → 512),

d_model = 512

Fusion Concat

B × 288 × d_model;

B × (T_in×288) × d_model

B × [(T_in+1) × 288] × d_model —
Temporal block MHSA + LayerNorm + FFN B × [(T_in + 1) × 288] × d_model B × [(T_in + 1) × 288] × d_model heads = 8, d_model = 512, d_ff = 2048
Prediction head Flatten + Linear B × (T_in × 288) × d_model B × T_out × 288 Linear(512 → T_out), T_out = 7

B = batch size; T_in = 7; T_out = 7. Dropout rate = 0.1 in all layers; activation = ReLU in FFN modules.

EXPERIMENTS

Experimental setup

To build the deep learning framework, we conducted experiments entirely based on PyTorch. All the experiments were run on an NVIDIA GeForce RTX 4060 GPU and an AMD Ryzen 77735H processor environment to ensure efficient model training and inference capabilities. During model training, Adam optimizer was used to minimize the loss function, with the mean absolute error (MAE) and mean squared error (MSE) selected as the main evaluation metrics to assess the prediction accuracy. The initial learning rate was set to 0.001, the batch size was set to 10 and a dropout rate of 0.1 was introduced to alleviate overfitting. The proposed ST‐GranNe and the all attention‐based models were implemented on top of the open‐source model framework provided in TSLib, which offers well‐structured baseline implementations designed for fair benchmarking and performance comparison. All other baseline models were also reproduced based on the open‐source code available on GitHub.

Since the original temperature data were sampled twice a week, the data were interpolated to a daily time scale to meet the deep learning models' requirement for uniform time steps. Linear interpolation was employed to smoothly estimate temperature changes between adjacent measurements. Given the relatively gradual variations in granary temperatures, this method effectively preserves the trend characteristics, while the resulting daily‐scale sequences can be used for feature extraction and predictive analysis by the models. After the expansion, granary 18 contains 820 samples, while granary 20 contains 1061 samples, with a temporal resolution of one sample per day. To adapt the model's input and output formats, we constructed a four‐dimensional temperature data matrix to represent the physical distribution of each temperature sensor in space. Temperature data were recorded daily and arranged chronologically. For external variables, the analysis in Section ‘Correlation analysis’ indicates that the external temperature data exhibit strong correlations with the internal grain temperature sequences, whereas the correlations between external humidity and internal temperature are relatively unstable. Therefore, in the subsequent modeling process, we incorporate the external temperature sequence as a covariate alongside the internal grain temperature sequences as inputs to the model.

The dataset was split into 60% training set, 20% validation set and 20% testing set to ensure the model's generalization ability. During training, the input sequence length was set to 7, utilizing temperature data from the past 7 days as input while predicting the temperature variation for the next 7 days, aiming to capture long‐term dependencies in the time series and improve prediction accuracy.

To evaluate the prediction performance, we used MSE and MAE as evaluation metrics. The formulas are as follows:

MSE=1N∑i=1Nyi−y^i2 (18)
MAE=1N∑i=1N∣yi−y^i∣ (19)

where yi represents the true value, y^i represents the predicted value and N is the total number of samples.

Hyperparameter settings

To optimize the performance of ST‐GranNet, we mainly adjusted two key hyperparameters: model dimension and the number of attention heads. The model dimension determines the representational capacity of the hidden layers. A higher dimension can enhance the model's expressive power, but also increases computational complexity and memory overhead. Therefore, we experimented with different model dimension configurations to balance model complexity and prediction performance. The number of attention heads influences the feature extraction capability of the MHSA mechanism. More attention heads can extract features from different subspaces, enhancing the model's ability to capture complex temporal patterns. However, too many attention heads can lead to excessive computational cost and introduce redundant information, affecting the model's generalization ability. Therefore, we fine‐tuned the number of attention heads during the experiment to find the optimal configuration. By adjusting these hyperparameters, the impacts of different configurations on model prediction performance are evaluated.

Specifically, the number of attention heads was set to 4, 8, 16 and 32, and the model dimensions were set to 64, 128, 256 and 512. Based on these settings, different hyperparameter combinations were constructed and tested on the grain temperature data from granary 18. The experimental results are presented in Table 2. Among the combinations, when the number of attention heads and model dimensions were set to 4 and 512 and to 8 and 512, the model achieved the best performance. Therefore, we conclude that a larger model dimension improves the feature representation ability of the model, while an appropriate number of attention heads helps capture complex temporal patterns, thereby improving prediction performance.

Table 2.

MAE and MSE versus the numbers of attention heads and model dimensions in granary 18

Heads & dimensions MAE MSE
4&512 0.1706 0.1841
8&512 0.1657 0.1869
16&512 0.1695 0.1859
32&512 0.1762 0.1895
8&64 0.2032 0.2046
8&128 0.1987 0.1984
8&256 0.1987 0.1984

Notes: Bold values represent the best prediction performance.

Comparative analysis

To test the performance of ST‐GranNet in the grain temperature prediction task, we selected several mainstream time series forecasting models for comparison, including LSTM, GRU, iTransformer, PatchTST, Transformer, Fedformer, Informer, TimeXer, STGCN and AGCRN. To ensure fair comparison, all models were trained and tested under the same dataset and experimental conditions. For ST‐GranNet and all attention‐based models, the hidden dimension was set to 512, and the number of attention heads was set to 8, with the evaluation metrics MAE and MSE to assess the prediction accuracy. For all RNN‐based algorithms, including LSTM and GRU, the hidden dimension was set to 512, the kernel size was fixed at 3 and the number of layers was set to 2. For the GCN‐based models (STGCN and AGCRN), the hidden dimension was uniformly set to 512, and the number of GCN layers was uniformly set to 2 for consistency.

LSTM and GRU are RNN architectures designed to model sequential data with long‐term dependencies. LSTM employs memory cells and gating mechanisms (input, forget and output gates) to control the flow of information, effectively mitigating the vanishing gradient problem. GRU is a simplified variant of LSTM that merges the input and forget gates into a single update gate and combines the cell state and hidden state, reducing the number of parameters and computational cost.

Transformer 19 is a sequence modeling method based on the self‐attention mechanism. Its MHSA structure captures long‐range dependencies, performing well in natural language processing and time series forecasting tasks. However, its computational complexity grows quadratically with the sequence length, which makes it computationally expensive for long‐time‐series forecasting tasks.

Informer 38 significantly reduces the computational complexity of Transformer by proposing a probability‐sparse self‐attention mechanism (ProbSparse Attention). Informer selects only a few key attention scores for calculation and uses an information bottleneck mechanism, achieving efficient long sequence modeling, making it suitable for large‐scale time series forecasting tasks.

FedFormer 39 uses a hybrid Fourier transform and autoregressive attention mechanism to improve the accuracy and computational efficiency of long‐time‐series forecasting. Compared to Informer, FedFormer reduces the computational load while preserving more global temporal information, leading to superior performance across multiple datasets.

iTransformer 37 is an improved variant of Transformer focused on local pattern extraction and global information capture in time series modeling. It enhances the correlation between different variables through the channel embedding mechanism and combines both temporal and spatial features, improving the modeling capability of complex time series.

PatchTST 40 is inspired by Vision Transformer from the computer vision field, and introduces a patch mechanism to partition time series into smaller segments for modeling. Compared to traditional Transformer, PatchTST has a stronger ability to extract local information, demonstrating exceptional performance in long‐time‐series forecasting tasks.

TimeXer 41 is a Transformer variant optimized for time series modeling, focusing on forecasting univariate time series with external time variables. It introduces a special combination structure for forecasting external time series, allowing both external and internal time series to be fed into the same multi‐head attention mechanism, thus fully extracting the features of external time variables for better prediction performance.

STGCN 42 is a classic spatiotemporal model that captures spatial dependencies via graph convolution and temporal patterns via gated temporal convolution. It uses a fixed adjacency matrix to model spatial relations and processes temporal data in a fully convolutional structure.

AGCRN 43 is an advanced model that learns an adaptive graph structure from data instead of using a fixed adjacency matrix. It combines adaptive graph convolution with recurrent networks to better model dynamic spatial–temporal correlations.

As presented in Table 3, ST‐GranNet achieves the optimal prediction results among all the comparison models in terms of MAE and MSE. In the temperature prediction task for granary 18, ST‐GranNet outperforms all baseline models in both MAE and MSE metrics. Specifically, ST‐GranNet achieves improvements on MAE by 88.2% and 89.5%, and on MSE by 94.8% and 95.7%, over the least effective LSTM and GRU, respectively. For the best‐performing iTransformer and TimeXer, ST‐GranNet also achieves reductions in MAE by 20.6% and 13.7%, and in MSE by 8.4% and 6.6%, respectively. These results fully demonstrate the superior capability of ST‐GranNet in mining the spatiotemporal features of grain temperature data. Similarly, in the comparative experiment conducted on granary 20, ST‐GranNet again achieves the best performance across all comparison methods. Among all the models considered, all except iTransformer and TimeXer exhibit a significant performance gap compared with ST‐GranNet. RNN‐based models (LSTM and GRU), as classical architectures for time series forecasting in deep learning, are not ideal for predicting grain temperature sequences. This may be due to the limited capability of convolution operations in extracting features from grain temperature sequences. Grain temperature data are characterized by a large number of input dimensions, making it difficult for models such as PatchTST, Transformer and Informer to effectively capture spatial features. FEDformer, on the other hand, focuses more on different frequency components in time series, such as seasonal patterns. However, due to long‐term artificial ventilation and the average storage period of two to three years, the seasonal information in grain temperature sequences is not prominent. Although both iTransformer and TimeXer are capable of effectively extracting spatial features from time series, their ability to jointly model spatiotemporal dependencies remains limited, which leads to inferior performance compared with ST‐GranNet. STGCN relies on a manually predefined adjacency matrix to construct spatial relationships among sensors. In granary environments with complex conditions such as ventilation, grain accumulation and local temperature differences, the fixed static topology fails to reflect real and dynamic correlations between sensors, leading to rigid spatial feature modeling. Although AGCRN can adaptively learn graph structures, it is still heavily constrained by graph convolution mechanisms. Grain temperature data do not exhibit strong topological dependence, and there is no strict spatial adjacency relationship among sensors. Excessive graph structure constraints will instead introduce redundant noise and degrade prediction performance. Figure 8 presents the training and validation loss curves of ST‐GranNet under the early stopping mechanism. As shown, the final values of the training and validation loss curves are close, indicating minimal overfitting. In granary 20, the loss curve exhibits larger fluctuations before early stopping, which may be related to the presence of more spike values in this granary.

Table 3.

MAE and MSE of models at multi‐output prediction

Model Granary 18 Granary 20
MAE MSE MAE MSE
LSTM 1.4000 3.597 1.982 7.961
GRU 1.587 4.353 2.036 8.822
iTransformer 0.2087 0.2041 0.3120 0.9349
Patchtst 0.4538 0.4966 0.5481 1.3824
Transformer 0.5840 0.8423 2.0250 8.0813
FEDformer 0.4114 0.4644 0.7188 2.1104
Informer 0.2605 0.3655 0.5272 1.9886
TimeXer 0.1921 0.2001 0.3668 1.1756
STGCN 0.4467 0.4582 0.5712 1.4687
AGCRN 0.2480 0.2533 0.4680 1.3372
ST‐GranNet 0.1657 0.1869 0.3043 0.9077

Notes: Bold values represent the best prediction perfomance, and underlined values represent the second‐best performance.

Figure 8.

Figure 8

Training and validation loss. (a) Granary 18. (b) Granary 20.

Ablation experiment

To further validate the contribution of each module in the grain temperature prediction task, we designed an ablation experiment by separately removing the spatial and temporal module. ST‐GranNet was trained and tested under the same experimental conditions to assess the impact of each module on the final prediction performance.

The experimental setup is as follows:

  1. Removing the spatial block (only keeping the temporal block): The model relies solely on temporal information for prediction, ignoring the spatial dependencies between sensors.

  2. Removing the temporal block (only keeping the spatial block): The model makes predictions based only on the spatial features of the sensors, without considering the temporal trends of the time series.

The experimental results, as presented in Table 4, demonstrate that, for granary 18, the complete model achieves the best performance in terms of both MAE and MSE. When either the spatial module or the temporal module was removed, the prediction errors increased. This demonstrates that the spatial module effectively captures the spatial correlations between different sensors, while the temporal module helps model the temporal dependencies of temperature changes. The two modules work together to enhance the model's prediction accuracy, confirming the rationality and effectiveness of ST‐GranNet structure in the grain temperature prediction task.

Table 4.

Ablation experiments in granary 18

Design MAE MSE
Without spatial 0.1947 0.2047
Without temporal 0.2012 0.2089
ST‐GranNet 0.1687 0.1869

Notes: Bold values represent the best prediction performance.

Experimental visualization

To provide a more intuitive analysis of ST‐GranNet's prediction performance, this section presents a visualization of the model's prediction results. We randomly selected six sensors from the granary and compared their predicted and actual values from the testing set, plotting six sets of prediction curves. Taking granary 18 as an example, Fig. 9 shows the model's prediction results. It can be observed that the predicted curves closely match the actual temperature curves, demonstrating the model's ability to capture the temperature variation patterns effectively. Moreover, ST‐GranNet maintains high prediction accuracy across different temperature ranges, indicating its effectiveness in modeling short‐term temperature changes. However, some discrepancies at certain time points might be present, potentially due to external environmental factors or sensor noise.

Figure 9.

Figure 9

Comparison between the predicted and actual values of randomly selected sensors in granary 18.

The core of the self‐attention mechanism lies in the attention scores, which measure the dependencies between elements in the input sequence and determine where the model focuses on when generating outputs. By visualizing the attention scores in the form of a heatmap, it intuitively reveals the feature patterns learned by the model in specific prediction tasks, thus enhancing the interpretability of models.

Figure 10 presents a 288 × 288 attention score heatmap, which illustrates the attention weight distribution learned by the spatial module of ST‐GranNet. As shown, during periods of rapid environmental fluctuations, the attention scores in the middle part exhibit a clear hierarchical structure compared to those in the outer regions of the heatmap. It is evident that in the attention score maps generated by the eight attention heads, the upper‐right regions consistently achieve higher attention scores. The sensors located in this region correspond to the upper layers of the granary. Therefore, we can infer that ST‐GranNet allocates higher attention to the sensors positioned in the upper layers of the granary. This pattern aligns with the physical characteristics of grain storage, where the upper layers are more susceptible to external temperature changes and ventilation effects. In contrast, sensors situated in deeper layers receive relatively lower attention, reflecting their more stable thermal environment.

Figure 10.

Figure 10

Visualization of spatial self‐attention.

Furthermore, Fig. 11 displays an 8 × 8 self‐attention heatmap used to analyze the temporal feature relationships learned by the model. As described in the previous section, among the eight time steps input into the spatial module, steps 1–7 represent the seven time points of each sensor's data, while step 8 represents the interactions between the features of these seven time steps and those of all other sensors through the spatial module. From the heatmap, it can be clearly observed that the model assigns higher attention weights to the eighth time step. This indicates that ST‐GranNet considers this time step to be more important in capturing the temporal correlations of grain temperature sequences. Such a result is also consistent with the design expectations of our proposed model architecture.

Figure 11.

Figure 11

Visualization of temporal self‐attention.

Overall, visualization of the prediction results further validates the effectiveness of ST‐GranNet and verifies its potential application in granary temperature prediction tasks.

CONCLUSIONS

In summary, this research addresses the challenges of spatiotemporal feature extraction and fusion in granary temperature prediction by proposing ST‐GranNet, a deep learning model based on the self‐attention mechanism specifically designed for granary applications. The model employs different embedding methods to extract temporal and spatial features from the granary sensor network, and integrates these features effectively through a joint embedding mechanism. Experimental results on a real corn storage dataset demonstrate that the ST‐GranNet model significantly outperforms mainstream time‐series prediction models (e.g. Transformer, Informer) in terms of MAE and MSE, while also exhibiting superior stability in long‐term forecasting. Ablation studies further confirm the necessity of the collaborative operation between the spatiotemporal modules in enhancing prediction accuracy. Although the model shows excellent performance in accuracy and stability, certain limitations remain, such as the need to improve robustness against extreme anomalous data and to further validate its generalization ability across different types of granaries. For other complex parameters in granaries besides temperature, such as ventilation duration, temperature and humidity inside sealed granary, and mold rate, further research should also be conducted.

CONFLICT OF INTEREST

The authors have no competing interests to declare that are relevant to the content of this article.

ACKNOWLEDGEMENT

This study is supported by the National Nature Science Foundation of China (no. 61801400).

Appendix A. Notation table

Symbol Meaning
S
Number of sensors (288 in the granary)
Tin
Input time steps (length of historical sequence, set to 7 in this study)
Tout
Forecast horizon (length of future sequence, set to 7 in this study)
Y
Target output sequence (predicted values for future Tout)
d
Feature embedding dimension (e.g. 512)
Ech
Channel embedding (sensor channel latent representation)
Ept
Point embedding (temporal patch latent representation)
ps
Positional embedding
Zsp
Output of spatial block (spatial dependency encoding)
Zfuse
Fused representation (combined spatial and temporal features)
Ztemp
Output of temporal block (temporal dependency encoding)
φ·
Linear projection function
L
Loss function (MSE)

DATA AVAILABILITY STATEMENT

The data that support the findings of this study are available from the corresponding author upon reasonable request.

REFERENCES

  • 1. Tushar SR, Alam MFB, Zaman SM, Garza‐Reyes JA, Bari AM, Karmaker CL., Analysis of the factors influencing the stability of stored grains: implications for agricultural sustainability and food security. Sustain Oper Comput 4:40–52 (2023). [Google Scholar]
  • 2. Gürsu H, Reusable smart lids for improving food safety at household level with programmable UV‐C technology. Sustainability 16:5370 (2024). [Google Scholar]
  • 3. Savary S, Ficke A, Aubertot J‐N and Hollier C, Crop losses due to diseases and their implications for global food production losses and food security. Food Secur 4:519–537 (2012). [Google Scholar]
  • 4. Cattaneo A, Federighi G and Vaz S, The environmental impact of reducing food loss and waste: a critical assessment. Food Policy 98:101890 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5. Adeyeye SAO, The role of food processing and appropriate storage technologies in ensuring food security and food availability in Africa. Nutr Food Sci 47:122–139 (2017). [Google Scholar]
  • 6. Rosentrater KA, Biochemical, functional, and nutritive changes during storage, in Storage of Cereal Grains and their Products. Elsevier, Amsterdam, pp. 443–501 (2022). 10.1016/B978-0-12-812758-2.00010-6. [DOI] [Google Scholar]
  • 7. Cortese D, De Oliveira GS and Fernandes MG, Influence of temperature and maize genotypes on the population dynamics of Sitophilus zeamais Motschulsky 1885 (Coleoptera: Curculionidae) and grain quality during storage. J Stored Prod Res 111:102564 (2025). [Google Scholar]
  • 8. Schmidt D, Digital Transformation in Engineering Solutions for Post‐Harvest Grain Handling: Opportunities and Challenges. Universidade do Vale do Rio dos Sinos, São Leopoldo: (2024). 10.13140/RG.2.2.33230.68164. [DOI] [Google Scholar]
  • 9. Gu H, Zhou Z, Li C, Chen W and Chen B, Inductive spatial temporal graph convolutional neural network for granary temperature field reconstruction. J Stored Prod Res 115:102835 (2026). [Google Scholar]
  • 10. Ukil A, Distributed temperature sensing: review of technology and applications. IEEE Sensors J 12:885–892 (2012). [Google Scholar]
  • 11. Zhang X and Zhang J, Design of embedded monitoring system for large‐scale grain granary, in 2018 11th International Symposium on Computational Intelligence and Design (ISCID). IEEE, Hangzhou, China, pp. 145–148 (2018). 10.1109/ISCID.2018.00040. [DOI] [Google Scholar]
  • 12. Kowalska A and Ashraf H, Advances in Deep Learning Algorithms for Agricultural Monitoring and Management. Applied Research in Artificial Intelligence and Cloud Computing, Hong Kong, Vol. 6. p.p. 68–88 (2023). [Google Scholar]
  • 13. Metzger JF and Muir WE, Computer model of two‐dimensional conduction and forced convection in stored grain. Can Agric Eng 25:119–125 (1983). [Google Scholar]
  • 14. Hearst MA, Dumais ST, Osuna E, Platt J and Scholkopf B, Support vector machines. IEEE Intell Syst Their Appl 13:18–28 (1998). [Google Scholar]
  • 15. Breiman L, Random forests. Mach Learn 45:5–32 (2001). [Google Scholar]
  • 16. Ye J, Chow J‐H, Chen J and Zheng Z, Stochastic gradient boosted distributed decision trees, in Proceedings of the 18th ACM conference on Information and knowledge management. ACM, Hong Kong China, pp. 2061–2064 (2009). 10.1145/1645953.1646301. [DOI] [Google Scholar]
  • 17. Hochreiter S and Schmidhuber J, Long short‐term memory. Neural Comput 9:1735–1780 (1997). [DOI] [PubMed] [Google Scholar]
  • 18. Lecun Y, Bottou L, Bengio Y and Haffner P, Gradient‐based learning applied to document recognition. Proc IEEE 86:2278–2324 (1998). [Google Scholar]
  • 19. Vaswani A, Shazeer N, Parmar N, Uszkoreit J, Jones L, Gomez AN et al., Attention Is All You Need. In. Advances in Neural Information Processing Systems 30. Curran Associates Inc, Red Hook, p.p. 6000–6010 (2017). 10.48550/arXiv.1706.03762. [DOI] [Google Scholar]
  • 20. Dash L, Pattanayak BK, Mishra SK, Sahoo KS, Jhanjhi NZ, Baz M et al., A data aggregation approach exploiting spatial and temporal correlation among sensor data in wireless sensor networks. Electronics 11:989 (2022). [Google Scholar]
  • 21. AI‐Yahya SA, Mathemtical Simulation Model to Predict Storage Time of Grain. Journal of King Saud University, Agricultural Sciences, Riyadh(1996). [Google Scholar]
  • 22. Jia C, Sun D‐W and Cao C, Computer simulation of temperature changes in a wheat storage bin. J Stored Prod Res 37:165–177 (2001). [DOI] [PubMed] [Google Scholar]
  • 23. Montross MD, Maier DE and Haghighi K, Development of a finite element stored grain ecosystem model. Trans ASAE 45:1455–1464 (2002). [Google Scholar]
  • 24. Rocha KSO, Martins JH, Martins MA, Saraz JAO and Filho AFL, Three‐dimensional modeling and simulation of heat and mass transfer processes in porous media: an application for maize stored in a flat bin. Drying Technol 31:1099–1106 (2013). [Google Scholar]
  • 25. Quemada‐Villagómez LI, Molina‐Herrera FI, Carrera‐Rodríguez M, Calderón‐Ramírez M, Martínez‐González GM, Navarrete‐Bolaños JL et al., Numerical study to predict temperature and moisture profiles in unventilated grain silos at prolonged time periods. Int J Thermophys 41:52 (2020). [Google Scholar]
  • 26. Saá C, Míguez JL, Morán JC, Vilán JA, Lago ML and Comesaña R, A study of the influence of solar radiation and humidity in a bioclimatic traditional Galician agricultural dry storage structure (horreo). Energ Buildings 55:109–117 (2012). [Google Scholar]
  • 27. Chen D and Liu B, Temperature Prediction for Stored Grain: A Multi‐model Fusion Approach Based on Machine Learning. 9th International Conference on Electronic Technology and Information Science (ICETIS). IEEE, Piscataway:  (2024). [Google Scholar]
  • 28. Duan S, Yang W, Wang X, Mao S and Zhang Y, Grain pile temperature forecasting from weather factors: a support vector regression approach, in 2019 IEEE/CIC International Conference on Communications in China (ICCC). IEEE, Changchun, China, pp. 255–260 (2019). 10.1109/ICCChina.2019.8855910. [DOI] [Google Scholar]
  • 29. Wang Q, Feng J, Han F, Wu W and Gao S, Analysis and prediction of grain temperature from air temperature to ensure the safety of grain storage. Int J Food Prop 23:1200–1213 (2020). [Google Scholar]
  • 30. Tao S, Li B, Ren C and Mao B, Grain temperature prediction based on gated recurrent unit deep fusion model. Procedia Comput Sci 214:763–770 (2022). [Google Scholar]
  • 31. Research on Grain Pile Temperature Prediction Based on CNN‐GRU Neural Network, Vol. 121. Springer International Publishing, Cham: (2022). [Google Scholar]
  • 32. Wang Q, Hou M, Qin Y and Lian F, Temperature forecasting of grain in storage: an improved approach based on broad learning network. IEEE Access 12:115112–115123 (2024). [Google Scholar]
  • 33. Qu Z, Zhang Y, Hong C, Zhang C, Dai Z, Zhao Y et al., Temperature forecasting of grain in storage: a multi‐output and spatiotemporal approach based on deep learning. Comput Electron Agric 208:107785 (2023). [Google Scholar]
  • 34. Velikovi P, Cucurull G, Casanova A, Romero A, Liò P, Bengio Y., Graph Attention Networks. International Conference on Learning Representations, San Francisco: (2018). 10.48550/arXiv.1710.10903. [DOI] [Google Scholar]
  • 35. Salehinejad H, Sankar S, Barfett J, Colak E and Valaee S, Recent Advances in Recurrent Neural Networks. (2018). 10.48550/arXiv.1801.01078. [DOI] [Google Scholar]
  • 36. Wang K, Li K, Zhou L, Hu Y, Cheng Z, Liu J et al., Multiple convolutional neural networks for multivariate time series prediction. Neurocomputing 360:107–119 (2019). [Google Scholar]
  • 37. Liu Y, Hu T, Zhang H, Wu H, Wang S, Ma L et al., iTransformer: Inverted Transformers Are Effective for Time Series Forecasting. International Conference on Learning Representations, San Diego: (2024). 10.48550/arXiv.2310.06625. [DOI] [Google Scholar]
  • 38. Zhou H, Zhang S, Peng J, Zhang S, Li J, Xiong H et al., Informer: Beyond Efficient Transformer for Long Sequence Time‐Series Forecasting. Proceedings of the AAAI Conference on Artificial Intelligence. AAAI Press, Menlo Park: (2021). 10.48550/arXiv.2012.07436. [DOI] [Google Scholar]
  • 39. Zhou T, Ma Z, Wen Q, Wang X, Sun L, Jin R, FEDformer: Frequency Enhanced Decomposed Transformer for Long‐term Series Forecasting. Proceedings of the 39th International Conference on Machine Learning. PMLR, Baltimore: (2022). 10.48550/arXiv.2201.12740. [DOI] [Google Scholar]
  • 40. Nie Y, Nguyen NH, Sinthong P and Kalagnanam J, A Time Series is Worth 64 Words: Long‐term Forecasting with Transformers. International Conference on Learning Representations. OpenReview.net, San Francisco: (2023). 10.48550/arXiv.2211.14730. [DOI] [Google Scholar]
  • 41. Wang Y, Wu H, Dong J, Qin G, Zhang H, Liu Y, et al., TimeXer: Empowering Transformers for Time Series Forecasting with Exogenous Variables. (2024). 10.48550/arXiv.2402.19072. [DOI] [Google Scholar]
  • 42. Yan S, Xiong Y and Lin D, Spatial Temporal Graph Convolutional Networks for Skeleton‐Based Action Recognition. Proceedings of the AAAI Conference on Artificial Intelligence. AAAI Press, Menlo Park: (2018). 10.48550/arXiv.1801.07455. [DOI] [Google Scholar]
  • 43. Bai L, Yao L, Li C, Wang X and Wang C, Adaptive Graph Convolutional Recurrent Network for Traffic Forecasting. Advances in Neural Information Processing Systems 33. Curran Associates Inc, Red Hook: (2020). 10.48550/arXiv.2007.02842. [DOI] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

The data that support the findings of this study are available from the corresponding author upon reasonable request.


Articles from Journal of the Science of Food and Agriculture are provided here courtesy of Wiley

RESOURCES