Next Article in Journal
Effects of Different Bacteriostats on the Dynamic Germination of Clostridium perfringens Spores
Previous Article in Journal
Effects of Light Shading, Fertilization, and Cultivar Type on the Stable Isotope Distribution of Hybrid Rice
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Autoformer-Based Model for Predicting and Assessing Wheat Quality Changes of Pesticide Residues during Storage

1
National Engineering Research Centre for Agri-Product Quality Traceability, Beijing Technology and Business University, Beijing 100048, China
2
China Food Flavor and Nutrition Health Innovation Center, Beijing Technology and Business University, Beijing 100048, China
3
School of Modern Post, Beijing University of Posts and Telecommunications, Beijing 100876, China
*
Author to whom correspondence should be addressed.
Foods 2023, 12(9), 1833; https://doi.org/10.3390/foods12091833
Submission received: 5 March 2023 / Revised: 19 April 2023 / Accepted: 26 April 2023 / Published: 28 April 2023
(This article belongs to the Section Grain)

Abstract

:
Proper grain storage plays a critical role in maintaining food quality. Among a variety of grains, wheat has emerged as one of the most important grain reserves globally due to its short growing period, high yield, and storage resistance. To improve the quality assessment of wheat during storage, this study collected and analyzed monitoring data from more than 20 regions in China, including information on storage environmental parameters and changes in wheat pesticide residue concentrations. Based on these factors, an Autoformer-based model was developed to predict the changes in wheat pesticide residue concentrations during storage. A comprehensive wheat quality assessment index Q was set for the predicted and true values of pesticide residue concentrations, then combined with the K-means++ algorithm to assess the quality of wheat during storage. The results of the study demonstrate that the Autoformer model achieved the optimal prediction results and the smallest error values. The mean absolute error (MAE) and the other four error values are 0.11017, 0.01358, 0.04681, 0.11654, and 0.13005. The findings offer technical assistance and a scientific foundation for enhancing the quality of stored wheat.

1. Introduction

With an annual global yield of over 700 million tonnes, wheat is the primary grain crop grown in temperate regions [1], and one of the main reserve grains in China. Pesticides play an important role in preventing and reducing pest damage to grains, increasing their yield, and ensuring the quality of food crops [2]. Based on the most recent information available on the National Bureau of Statistics website, the annual production of wheat in China has reached 136.94 million tons. Along with the increasing production of wheat, quality problems during wheat storage have become increasingly prominent. As the primary source of energy for the majority of the world’s population, good-quality wheat is an important guarantee of food security and must be stored through an appropriate storage management system [3]. Pesticide residues are a significant factor that impacts the quality of wheat food. The increased use of pesticides leads to excessive accumulation of pesticide residues in wheat, and unlike other grains, pesticide residues cannot be eliminated through washing from the wheat kernel to the process of making wheat flour for direct consumption [4]. Therefore, controlling pesticide residue hazards during wheat storage is of paramount importance for improving the quality of wheat.
Pesticides such as dimethoate [5] and chlorpyrifos [6] are commonly used in agriculture to protect fruits, vegetables, and grains from pests and diseases during planting. Chlorpyrifos-methyl [7] is applied during storage to prevent losses from pest invasion. However, the widespread use of these pesticides leads to varying levels of pesticide residues in wheat crops after harvest [8], and cereal products can have lasting and comprehensive effects on public healthcare due to the presence of pesticide residues [9], potentially leading to chronic health problems such as damage to the neurological and immune systems with long-term exposure. Even after harvest, wheat grains may still contain pesticide residues, especially during storage. As storage time increases, wheat undergoes metabolic aging that can negatively affect its taste and color. Moreover, environmental factors during storage such as temperature [10] and humidity [11], as reasonably set environmental parameters, can accelerate the degradation of remaining pesticide residues in its seeds, ultimately affecting the quality of stored wheat grains. Therefore, it is essential to recognize the risks associated with pesticide residues in food and to take measures to minimize their impact on human health.
Faced with such a status quo, there is an increasing demand from the public for higher quality and quantity of cereal grains [12], resulting in a growing interest among scholars in the quality of wheat and other grains during storage. In past studies, Rakić et al. [13] investigated and analyzed the chemical properties of different varieties of wheat over time under predetermined storage conditions. Fazel-Niari et al. [14] classified different combinations of wheat seeds and other grains based on quality features such as shape, texture, and color using multiple classification methods based on a machine vision system of their own design, all with an accuracy of more than 90%. Kibar et al. [15] studied the changes in quality characteristics of two types of wheat under different storage environments for 6 months and found that unsuitable storage environments can be detrimental to the quality of wheat, eventually concluding that temperature is the environmental factor that most affects the quality of wheat. Yewle et al. [16] experimentally evaluated how germination rates and other qualities of grains with different moisture contents change under temporary sealed storage conditions to obtain the best storage period with the least impact on cereal quality. Liang et al. [17], based on low-field nuclear magnetic resonance imaging (LF-NMR) and differential scanning calorimetry (DSC) techniques, revealed complex multiple correlations among physical and chemical indicators of wheat. Nyarko et al. [18] used a new polypropylene bag to improve storage of grains, resulting in lower aflatoxin and pesticide residue concentrations, which in turn improved the quality of the grain seeds during storage. Escalante-Aburto et al. [19] used principal component analysis to distinguish the negative impact of different concentrations of moisture content on grain quality by assessing the biophysical and viscoelasticity of several types of grains, and finally analyzed the associations between quality characteristic variables using Pearson’s correlation analysis. In short, these studies have revealed various factors affecting grain quality and storage. Further research in this area is necessary to ensure sustainable agricultural practices and secure food supplies for our growing population.
Recently, time-series analysis [20] has been widely used in the fields of medicine [21,22], risk prediction [23,24], and agriculture [25,26], which is attributed to its ability to model and analyze historical information to predict upcoming tendencies The quality variation of the wheat storage process is closely related to the influencing factors with time-series characteristics, so there are more and more scholars of time-series analysis to predict and evaluate the quality of wheat storage and its related aspects. Jeong et al. [27] employed the random forest (RF) algorithm, which integrated four climatic variables and seven additional biophysical variables, to accurately forecast wheat yields across various regions worldwide. Agarwal et al. [28] made the assumption that the quality of stored wheat grains varies with time and extracted quality characteristics from wheat grain samples. Based on a support vector machine (SVM) classifier, they developed an automatic quality grading system for wheat during storage. With the application of deep learning methods, simple machine learning methods have the restriction of gradient explosion in high-dimensional data [29], so numerous researchers have directed their efforts to more complex neural network models. For example, Sindwani et al. [30] used recurrent neural networks (RNN) combined with factors such as CO2 concentration and the number of harmful insects in grain storage to predict the grain quality conditions in Indian grain silos. Duan et al. [31] and Yang et al. [32] used the long short-term memory neural network (LSTM) model to predict temperature and moisture, respectively, as elements which impact the quality of stored grain, providing a basis for setting better environmental parameters to safeguard the quality of stored grain. Jubair et al. [33] used an improved Transformer genomic prediction model to predict the fungal toxin content of barley. These studies demonstrate the potential of time-series analysis and machine learning methods for predicting and evaluating the quality of stored grain.
After a comprehensive review of the existing literature, this study presents a novel proposal that the concentration of pesticide residues in wheat storage is influenced by temperature and humidity during storage, which further affects the quality of wheat, so we assess the quality of wheat at different time points by evaluating the concentration of pesticide residues in wheat during storage. In order to complete this work, we first constructed an Autoformer-based model to predict pesticide residue changes in wheat during storage. Then a K-means++-based model was constructed for the quality assessment grading of wheat during storage. Between the two models mentioned above, the Autoformer model has advantages over other prediction models because the degradation of pesticide residues in wheat is a long process and the Autoformer model is also more suitable for dealing with long time-series data. In comparison, K-means++ has better classification results and algorithmic stability. By conducting comparative experiments, we found that the model in this study outperforms other similar models. The results have an important reference value for helping the technical managers of grain storage to adjust the settings of optimal storage conditions for wheat grain storage according to time points, promote the reduction rate of pesticide residues in wheat, and reduce the quality loss of stored wheat.

2. Materials and Methods

2.1. Materials

2.1.1. Data

This study sourced its wheat storage monitoring data from five primary wheat-producing regions in China (East China wheat region, Central China wheat region, North China wheat region, Northwest China wheat region, and Southwest China wheat region), covering several provinces and more than twenty regions. Wheat was stored in 10 shallow round silos. We collected samples every day during the storage period, which were obtained by dividing the cuttings into three layers and subdividing each layer into a total of 13 sampling points. After mixing the samples from the entire bin, we obtained the final samples for analysis, which included a total of 2655 data points for the quality of wheat samples. In addition, the specific environmental parameters affecting the concentration of pesticide residues in wheat during storage in this study were storage temperature and humidity, and the experimental data involved storage humidities of 54%, 65%, and 75% and storage temperatures of 10 °C, 25 °C, and 35 °C. The Maximum Residue Limits of Pesticides in Food of the National Food Safety Standard [34] specifies the pesticide residue limits in wheat: 0.05 mg/kg for chlorpyrifos, 0.5 mg/kg for chlorpyrifos, and 5 mg/kg for chlorpyrifos-methyl. In the wheat storage monitoring dataset, most of the samples were below this limit. During the experimental process, as shown in Table 1, according to the ratio of 7:2:1, the experimental dataset was proportionally partitioned into three sets: training set, test set, and validation set.

2.1.2. Experimental Environment

The experimental platform in this research utilized the PyTorch [35] deep learning framework, which is open-source software. The detailed parameters of the experimental environment are listed in Table 2.

2.2. Autoformer-Based Model for Predicting the Pesticide Residue Changes in Wheat

In this paper, we construct a prediction model based on Autoformer [36] to predict changes in pesticide residues in wheat, which can realize the monitoring of pesticide residue concentration changes in wheat subjected to environmental factors during storage. Autoformer is an improved novel network model based on Transformer [37], with two main innovations: the introduction of decomposition architecture into the depth prediction model, and the design of a series-wise connected auto-correlation mechanism. These two innovative designs address two core problems inside the temporal prediction: complex temporal patterns and modeling the continuity of the temporal sequence itself [38]. The specific structure of Autoformer is shown in Figure 1.
The series decomposition block uses the traditional decomposition operation to flatten the period term and emphasize the trend term based on the sliding average idea for the pesticide residue data in wheat. The model alternately performs prediction result optimization and series decomposition, i.e., gradually separating trend and period terms from hidden variables to achieve progressive decomposition.
χ t = A v g p o o l ( P a d d i n g ( χ ) )
χ s = χ χ t
In the above equations, χ t L × d stores the mean of each sliding window, i.e., the periodic fluctuations of the series, and χ s L × d is the seasonal smoothed series retained after subtracting the short-term fluctuations, so the series decomp block can also be expressed as
χ s , χ t = S e r i e s D e c o m p ( χ )
Encoder: the input of Encoder will be the known raw time-series data. After this, the output result consists of two components, trend term and seasonal term, followed by gradual elimination of the trend term to obtain the period term S e n l , 1 , S e n l , 2 . Furthermore, based on this periodicity, an auto-correlation mechanism is used in Encoder to aggregate similar subprocesses of different periods to achieve the aggregation of information. The output of Encoder contains past seasonal information that will be used as crossover information to help the decoder optimize the prediction results. The whole process can be expressed as follows.
S e n l , 1 , _ = S e r i e s D e c o m p ( A u t o C o r r e l a t i o n ( χ e n l 1 ) + χ e n l 1 )
S e n l , 2 , _ = S e r i e s D e c o m p ( F e e d F o r w a r d ( S e n l , 1 ) + S e n l , 1 )
χ e n l = S e n l , 2
χ e n l , 1 = E n c o d e r B l k ( χ e n l 1 )
In the above equation, “ _ ” denotes the trend part, which will not be used as the input to the decoder part, l { 1 , 2 , , N } represents the l th encoder block, and S e n l , i denotes the i time-series decomposition l th encoder block.
Decoder: the Decoder input contains two parts, the trend part after sequence decomposition and other remaining parts. The Decoder part uses a two-way processing mode, a multi-stacked auto-correlation mechanism block for the seasonal part and a cumulative mechanism structure for the trend part accumulation, respectively. The upper branch processes the seasonal part, and the lower branch processes the trend-cyclical part. The upper branch first uses auto-correlation to extract the temporal dependencies inherent in the future predicted states, then uses encoder–decoder auto-correlation to extract information from the historical series with higher-order temporal dependencies from the encoder output, and finally passes through the Feed Forward layer. The lower branch gradually extracts the trend information from the predicted hidden variables, and the outputs of each sub-layer of the upper branch are summed together using the weighted addition method. The specific equation is shown as follows.
S d e l , 1 , T d e l , 1 = S e r i e s D e c o m p ( A u t o C o r r e l a t i o n ( χ d e l 1 ) + χ d e l 1 )
S d e l , 2 , T d e l , 2 = S e r i e s D e c o m p ( A u t o C o r r e l a t i o n ( S d e l , 1 , χ e n N ) + S d e l , 1 )
S d e l , 3 , T d e l , 3 = S e r i e s D e c o m p ( F e e d F o r w a r d ( S d e l , 2 ) + S d e l , 2 )
T d e l = T d e l 1 + W l , 1 T d e l , 1 + W l , 2 T d e l , 2 + W l , 3 T d e l , 3
χ d e l = S d e l , 3
Autoformer’s core auto-correlation mechanism, which is key to discovering period-based dependencies by calculating sequence auto-correlation coefficients, consists of period-based dependencies and time-delay aggregation. Figure 2 shows a schematic diagram of the internal structure of the auto-correlation module.
The dependence of the period in the auto-correlation mechanism is found from the efficient computation of the auto-correlation coefficients, as shown in Figure 2, by mapping the inputs to obtain Q, K, and V. Based on the Winer–Khinchin theory [39], a Fast Fourier Transforms (FFT) operation is performed on Q and K, respectively, and a conjugate operation is also added to K. Finally, the original correlation coefficient X X ( τ ) of the sequence and the lag sequence must be computed to find the periodically similar subsequence. The specific formula is as follows.
S X X ( f ) = ( W Q X t ) ( W K X t )
X X ( τ ) = 1 ( S X X ( f ) )
In the above equation, represents the FFT and 1 is the reciprocal of , ∗ represents the conjugate operation, and S X X ( f ) is in the frequency domain.
Next, time-delay aggregation of auto-correlation first aligns the subsequences with the same phase based on the estimated cycle length using the R o l l () operation, converts them into probabilities by the softmax normalization operation, and finally aggregates the information by fusion. The R o l l () operation moves V into the same phase, as shown in Figure 3.

2.3. K-Means++-Based Model for Wheat Quality Assessment

In order to better assess the quality of stored wheat during storage, a comprehensive evaluation index Q was constructed in this study, which integrates the present and predicted pesticide residue concentrations of wheat; the equation of the evaluation index Q is shown in (15).
Q = [ d i , d i ]
In the formula, d i   ∈ {1, 2, …, n} denotes the true value and d i   ∈ {1, 2, …, n} denotes the mean of the predicted values in the next n days.
During the study, since the wheat quality data were small-sample data with little noise, the clustering method K-means++ [40] was used to assess the quality of wheat during storage. K-means++ is an optimization of the K-means random initialization cluster center method. Unlike K-means, the core idea of K-means++ is that when selecting a new cluster center, the more distant the point from the existing cluster center, the more likely it has the opportunity to be selected as the cluster hub. The K-means++ algorithm does not require artificial determination of the initial cluster center, but performs better on high-dimensional data, which is why it was used for the analysis of wheat quality data during the experiment.
Given dataset S with N data points, let k be the desired number of clusters. The algorithm outputs a set of k centroids {   c 1 , c 1 , …, c k } that minimize the within-cluster sum of squares. The standard algorithm form of the K-means++ algorithm is shown below. Furthermore, the detailed algorithm flow is shown in Figure 4.
(1)
Randomly select a point from S as the initial clustering center c 1 .
(2)
For each data point x in S, calculate the minimum distance between each point and the currently existing clustering center, denoted by D ( X ).
(3)
Select the next cluster center c i from S with probability P ( x ) = D ( X ) 2 x X D ( X ) 2 and add it to the set of selected clustering.
(4)
Iterate step (2) and step (3) up to k clustering centers.
(5)
Execute the standard K-means algorithm to allocate data points to the closest cluster centers and modify the locations of the cluster centers until convergence.

2.4. Model Evaluation Metrics

The evaluation of wheat quality relies on analyzing the changes in pesticide residue levels as wheat is exposed to different environmental conditions during storage. Hence, the ability to accurately predict changes in pesticide residues will affect the accuracy of wheat quality assessment.

2.4.1. Evaluation Metrics for Predictive Models

Five assessment criteria, including MAE, mean squared error (MSE), mean absolute percentage error (MAPE), root-mean-square error (RMSE), and symmetric mean absolute percentage error (SMAPE), were employed in this study to gauge the fluctuations in pesticide residue levels in wheat over the course of storage. These measures were computed using the following formulae:
M A E = 1 n i = 1 n d ^ i d i
M S E = 1 n i = 1 n ( d ^ i d i ) 2
M A P E = 100 % n i = 1 n d ^ i d i d i
R M S E = 1 n i = 1 n ( d ^ i d i ) 2
S M A P E = 100 % n i = 1 n d ^ i d i ( d ^ i d i ) / 2
In the above formulae, d ^ i , i   ∈ {1, 2, …, n} represents the predicted value, d i , i   ∈ {1, 2, …, n} represents the true value, and n represents the quantity of indicator variables. The range of these evaluation indicators is [0, +∞), and the evaluation metrics reach their minimum value of 0 while the predicted value is identical to the true value, at which time the prediction model achieves the optimal effect for the ideal state of the model. When the error is larger, the value of the evaluation indicators is larger, which can be used as a reference.

2.4.2. Evaluation Metrics for Clustering Models

For the clustering results acquired through the K-means++ algorithm, we used the silhouette coefficient (SC) [41] and the Davies–Bouldin index (DBI) [42]. The objective of using these indicators was to determine the ideal number of clusters for the classification of wheat quality during storage and achieve accurate classification.
The silhouette coefficient is calculated as follows:
S C = 1 N i = 1 N b ( i ) a ( i ) m a x { a ( i ) , b ( i ) }
In Equation (21), N represents the quantity of training samples, a ( i ) represents the average distance between sample points and other points within the same cluster, and b ( i ) denotes the mean distance between a sample point and all points in its nearest cluster. The SC takes values in the range of [−1, 1], with larger values indicating superior clustering performance.
The Davies–Bouldin Index is calculated as follows:
D B I = 1 K 1 N max ( s i + s j d i j )
In Equation (22), s represents the mean distance between each point of the cluster and the center of mass of the cluster, also known as the cluster diameter, and d i j denotes the distance between its different clustering cluster centers i   and   j . The formula calculates the maximum similarity of a total of K clusters taking the mean value, and the best clustering is achieved when the DBI reaches a minimum value.

3. Results and Discussion

3.1. Dataset of Wheat Quality Assessment

According to the characteristics of pesticide residue degradation in the process of grain storage, this study used a 90-day period to collect experimental data on six dimensions of information: time, temperature, humidity, and concentrations of dimethoate, chlorpyrifos, and chlorpyrifos-methyl. The concentrations of these pesticides were used as predictors, while moisture content and temperature were treated as control variables. Figure 5, Figure 6 and Figure 7 partially display the changes in pesticide residue levels during wheat storage.
As shown in the figures, we can initially see that all three types of pesticide residue in wheat gradually degraded with time. The higher the temperature, the faster the concentration of pesticide residues decreased under the same storage humidity; also, the higher the humidity, the faster the concentration of pesticide residues decreased under the same storage temperature. However, comprehensively comparing the three types of pesticide residue, the degradation rates of dimethoate and chlorpyrifos-methyl were the fastest and the most affected by temperature; humidity had a facilitating effect on the degradation rate of two pesticides, but the effect was not significant enough. In addition, the degradation rate of chlorpyrifos was less affected by both temperature and humidity. From the results of the dataset, it can be seen that the optimum storage humidity for pesticide residue degradation is 75%, and the optimum temperature is 35 °C.

3.2. Comparison of Models for Predicting Changes in Pesticide Residues in Wheat

To demonstrate the effectiveness of the prediction model in the research, the Autoformer model was compared with several existing widely used neural network prediction models. For the same wheat pesticide residue quality assessment dataset, RNN, LSTM, and Transformer were used in this study to conduct comparison experiments with Autoformer. Five model evaluation metrics, MAE, MSE, MAPE, RMSE, and SMAPE, were also employed to estimate the prediction capabilities. In Table 3, these results are presented in detail.
The Autoformer model achieved MAE, MSE, MAPE, RMSE, and SMAPE values of 0.11017, 0.01358, 0.04681, 0.11654, and 0.13005, respectively, and as can be seen from the previous section, the larger the value of the evaluation index of the prediction model, the larger the error of the prediction. It is also evident from the results in Table 3 that among the four compared prediction models, the difference between the error values of RNN and LSTM is not significant, but their error values are significantly higher than those of the latter two prediction models. In particular, the SMAPE values are as high as 7.32437 and 6.43174, respectively. On the other hand, the error values of the Transformer and Autoformer models are closer and smaller than those of the first two prediction models, indicating that these two models are able to predict more accurately the target variables. However, comparing the model evaluation metrics, the values of MAPE, RMSE, and SMAPE for the Transformer model were higher than those of the Autoformer by 0.23574, 0.08282, and 2.30708, respectively, indicating that the comprehensive performance of Transformer prediction is inferior to Autoformer. In a word, the Autoformer-based prediction model achieved the highest prediction accuracy on the stored wheat quality dataset, exhibiting superior performance and outperforming the remaining three prediction models.

3.3. Comparison of Clustering Models for Wheat Quality Assessment

According to the results of the prediction of pesticide residue changes based on Autoformer, for further work on wheat quality assessment, the daily evaluation index Q values of individual samples of wheat were used as the clustering feature input to the model. While applying the K-means++ and conventional K-means algorithms for wheat quality assessment of three pesticide residues in wheat storage grains, in order for the experiments to be more useful, two clustering evaluation indexes SC and DBI were used in this paper to evaluate their clustering results reasonably, while conducting experiments. The findings are presented in Figure 8 and Figure 9.
As shown in Figure 8, for different clustering algorithms, the SC of the wheat quality data decreased gradually as the number of clusters increased, and the SC of the two clustering algorithms reached a maximum evaluation index value when there were three clusters. The SC values were 0.633 and 0.603, respectively, when the wheat quality data were most dispersed among clusters and had the best clustering quality.
Figure 9 presents the results of the DBI applied to the wheat quality data with three to seven clusters. As shown in the figure, the magnitude of the DBI value shows a gradual increase in general, and unlike the SC clustering evaluation index, the DBI reaches its optimal classification result for clustering at the minimum value. Clearly, the best clustering effect of the two models is achieved when there are three clusters. At this time, the DBI values of the two clustering algorithms are 0.458 and 0.474, respectively.
Comparing the evaluation indexes of the two clustering models together, we can easily see that for the wheat quality assessment dataset, despite the use of different clustering algorithms, both have the best results in terms of classification results when there are three clusters, i.e., classifying wheat quality into three levels. Figure 10 and Figure 11 present results of the comparison of the evaluation indexes of the two clustering algorithms when there are three clusters.
After comparing the evaluation metrics for both the SC and DBI with three clusters, according to the line graphs, we concluded that the K-means++ clustering model performed better than K-means for wheat quality assessment during storage. Therefore, K-means++ was used as the clustering model for wheat quality assessment during storage in this study, and in this way the wheat quality variation dataset was divided into three categories according to the K-means++ algorithm model. The wheat quality data of different categories corresponded to the corresponding quality levels, and the two-dimensional clustering centers of the three pesticide residue concentrations in wheat and the results of the number of samples in each class are shown in Table 4.
As shown in Table 4, the clustering results show that the quality of wheat became worse with an increase in the index value of the cluster center, which is also consistent with the reality of grain storage, the lower the concentration of pesticide residues in silos, the better the quality condition of wheat will be. As shown in Table 4, in terms of pesticide residues of dimethoate, most samples in the wheat quality dataset are at level 2: there are 1080 of these samples, accounting for about 41% of the total samples, and the clustering centers of the three different levels do not differ much. This is followed by the concentration of chlorpyrifos residues in the wheat quality data. Most samples belong to level 3: there are 1035 of these samples, accounting for about 39% of the total samples. However, compared to the other two types of pesticide residue, its sample data for the three types of quality level of the clustering center differences are small, which may be caused by the degradation of chlorpyrifos in the grain bin being less affected by the temperature and humidity. Finally, the residual levels of chlorpyrifos-methyl, on the other hand, were relatively evenly distributed among the quality data samples of wheat, but the values of their cluster centers were more varied, which indicated that the degradation of chlorpyrifos-methyl was the fastest among the quality data of wheat. In conclusion, the above results indicate that different types of pesticide residue are degraded at different rates during wheat storage under the influence of different storage environment parameters, thus affecting the quality of wheat.
Dimethoate, chlorpyrifos, and chlorpyrifos-methyl were used as the three most common pesticide residues in cereals to measure the quality assessment of wheat. The results suggested that all three pesticide residues degraded gradually over time, and the rate of degradation became faster with increasing storage temperature and humidity. Of these, temperature is the main element affecting the degradation of pesticide residues in wheat. Moreover, the concentration of chlorpyrifos in the results degraded slowly and was less dependent on the environmental conditions of storage. This may be due to a number of reasons, one being the properties of chlorpyrifos itself, such as chemical structure or volatility, the other is the influence of the type of grain, as the rate of degradation of the same pesticide residue in various grains may be different. Pesticide residues in the natural environment degrade faster due to factors such as sunlight, wind, and precipitation. However, in the process of grain storage, storage conditions are mostly airtight and protected from light. The chemical properties of pesticide residues during storage are more stable and not easily degraded, posing a threat to the quality of wheat. Furthermore, unlike other grains, wheat is generally stored for a longer period of time after harvest. In order to ensure quality during storage, for pesticides with slow degradation rates during storage and low national limit standards, such as chlorpyrifos, according to the degradation rate of such pesticides, to strictly limit its detection limit before storage. In addition, for chlorpyrifos-methyl, the grain protectant with a faster degradation rate and higher national limit standards, it is necessary to master its application cycle in the storage process.
During storage, there are a variety of elements that affect the quality of wheat, and it is scientific to assess wheat quality by changes in pesticide residue concentrations in wheat. Along with the high-speed growth of computer technology, deep-learning-related technology, which can automatically learn and improve the feature extraction of quality, has created new ideas for wheat quality detection and assessment. By monitoring and predicting the quality changes of wheat during storage, and assessing the quality condition of wheat in grain storage in a timely manner, grain storage monitors can be inspired to timely adjust the storage environment conditions to control the degradation of pesticide residues, enhancing the quality condition of wheat.

4. Conclusions

Playing an essential role in cereal crops, wheat is an indispensable food in people’s daily life, especially for food security in a country with a large population such as China, so its quality is very important. The use of pesticides in large quantities has increased the yield of wheat, but the safety of grain quality from pesticide residues has also attracted attention. These pesticide residues may affect the quality of wheat, and in serious cases may even be potentially harmful to human health.
The quality of wheat is mainly affected by the harvest time and storage conditions. In this study, starting from the storage environment, we used the temperature, storage humidity, and the concentration of pesticide residues in wheat during storage, which are elements that can easily contribute to the quality of wheat, and then innovatively combined the degradation changes of pesticide residues occurring during wheat storage. We used an Autoformer-based deep neural networks model to accurately predict the levels of different pesticide residues in wheat under different environmental influences in grain storage, and an evaluation index Q was constructed using existing and predicted pesticide residue concentrations to make a reasonable grading assessment of the quality of wheat. The results showed that the degradation speed of pesticide residues during storage is influenced by environmental parameters such as temperature and humidity, and considering the three pesticide residues together, the most suitable environmental parameters for their residue dissipation were a storage humidity of 75% and a temperature of 35 °C. Therefore, suitable storage conditions will promote the degradation of pesticide residues in wheat.
However, it should be noted that our study only investigated the effects of two major environmental factors on the degradation of pesticide residues during storage. Other factors such as the pH value of the storage environment and the moisture content of the wheat itself could also impact the degradation of pesticide residues in wheat storage and warrant further investigation. Additionally, beyond pesticide residues, other quality indicators such as cultivar, fungal and bacterial content, sensory features, degree of oxidation, etc., could also be considered in future quality assessments of stored wheat.

Author Contributions

Y.L. and Q.Z. obtained data resources and wrote the original manuscript; Q.Z. and Y.L. conceived and designed the experiments; Y.L. performed the visualization; W.D., Z.L., T.L., M.Z. and W.W. reviewed and revised the manuscript; and Q.Z. provided funding support. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by the National Key Technology R&D Program of China (grant no. 2021YFD2100605), Open Project Program of National Engineering Laboratory of Agri-Product Quality Traceability (grant no. AQT-2021-YB2).

Data Availability Statement

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

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Lovegrove, A.; Dunn, J.; Pellny, T.K.; Hood, J.; Burridge, A.J.; America, A.H.P.; Gilissen, L.; Timmer, R.; Proos-Huijsmans, Z.A.M.; van Straaten, J.P.; et al. Comparative Compositions of Grain of Bread Wheat, Emmer and Spelt Grown with Different Levels of Nitrogen Fertilisation. Foods 2023, 12, 843. [Google Scholar] [CrossRef]
  2. Zhao, P.; Huang, B.; Li, Y.; Han, Y.; Zou, N.; Gu, K.; Li, X.; Pan, C. Rapid Multiplug Filtration Cleanup with Multiple-Walled Carbon Nanotubes and Gas Chromatography–Triple-Quadruple Mass Spectrometry Detection for 186 Pesticide Residues in Tomato and Tomato Products. J. Agric. Food Chem. 2014, 62, 3710–3725. [Google Scholar] [CrossRef]
  3. Kumar, C.; Ram, C.L.; Jha, S.N.; Vishwakarma, R.K. Warehouse Storage Management of Wheat and Their Role in Food Security. Front. Sustain. Food Syst. 2021, 5, 675626. [Google Scholar] [CrossRef]
  4. Xiong, C.; Ma, H.; Zhu, E.; Xu, W.; Liu, Q. Degradation Kinetic Study of Eight Pesticides Residues in Wheat Grain During Simulated Storage. J. Chin. Cereals Oils Assoc. 2020, 35, 139–146. [Google Scholar]
  5. Liu, Q.; Liu, Y.; Dong, F.; Sallach, J.B.; Wu, X.; Liu, X.; Xu, J.; Zheng, Y.; Li, Y. Uptake Kinetics and Accumulation of Pesticides in Wheat (Triticum aestivum L.): Impact of Chemical and Plant Properties. Environ. Pollut. 2021, 275, 116637. [Google Scholar] [CrossRef]
  6. Yu, L.; Zhang, H.; Niu, X.; Wu, L.; Zhang, Y.; Wang, B. Fate of Chlorpyrifos, Omethoate, Cypermethrin, and Deltamethrin during Wheat Milling and Chinese Steamed Bread Processing. Food Sci. Nutr. 2021, 9, 2791–2800. [Google Scholar] [CrossRef]
  7. Rodriguez, F.S.; Armstrong, P.R.; Maghirang, E.B.; Yaptenco, K.F.; Scully, E.D.; Arthur, F.H.; Brabec, D.L.; Adviento-Borbe, A.D.; Suministrado, D.C. NIR Spectroscopy Detects Chlorpyrifos-Methyl Pesticide Residue in Rough, Brown, and Milled Rice. Appl. Eng. Agric. 2020, 36, 983–993. [Google Scholar] [CrossRef]
  8. Mebdoua, S.; Ounane, G. Evaluation of Pesticide Residues in Wheat Grains and Its Products from Algeria. Food Addit. Contam. Part B 2019, 12, 289–295. [Google Scholar] [CrossRef]
  9. Ding, Z.; Lin, M.; Song, X.; Wu, H.; Xiao, J. Quantitative Modeling of the Degradation of Pesticide Residues in Wheat Flour Supply Chain. Foods 2023, 12, 788. [Google Scholar] [CrossRef] [PubMed]
  10. Yigit, N.; Velioglu, Y.S. Effects of Processing and Storage on Pesticide Residues in Foods. Crit. Rev. Food Sci. Nutr. 2020, 60, 3622–3641. [Google Scholar] [CrossRef] [PubMed]
  11. González-Curbelo, M.Á.; Socas-Rodríguez, B.; Herrero, M.; Herrera-Herrera, A.V.; Hernández-Borges, J. Dissipation Kinetics of Organophosphorus Pesticides in Milled Toasted Maize and Wheat Flour (Gofio) during Storage. Food Chem. 2017, 229, 854–859. [Google Scholar] [CrossRef]
  12. Ramachandran, R.P. Integrated Approach on Stored Grain Quality Management with CO2 Monitoring-A Review. J. Stored Prod. Res. 2022, 96, 101950. [Google Scholar] [CrossRef]
  13. Rakić, S.; Janković, S.; Marčetić, M.; Rajičić, V.; Rakić, R.; Rakić, V.; Kolarić, L. Functional Properties of Wheat Kernels (Triticumaestivum L.) during Storage. J. Stored Prod. Res. 2020, 87, 101587. [Google Scholar] [CrossRef]
  14. Fazel-Niari, Z.; Afkari-Sayyah, A.H.; Abbaspour-Gilandeh, Y.; Herrera-Miranda, I.; Hernández-Hernández, J.L.; Hernández-Hernández, M. Quality Assessment of Components of Wheat Seed Using Different Classifications Models. Appl. Sci. 2022, 12, 4133. [Google Scholar] [CrossRef]
  15. Kibar, H. Influence of Storage Conditions on the Quality Properties of Wheat Varieties. J. Stored Prod. Res. 2015, 62, 8–15. [Google Scholar] [CrossRef]
  16. Yewle, N.R.; Stroshine, R.L.; Ambrose, R.K.; Baributsa, D. Short-Term Hermetic Storage of Wet Maize and Its Effect on Quality. Foods 2023, 12, 891. [Google Scholar] [CrossRef] [PubMed]
  17. Liang, X.; Zhang, A.; Yang, W.; Fan, X. Application of LF-NMR and DSC in the Analysis of Wheat Storage Quality Deterioration. Food Res. Dev. 2021, 42, 103–109. [Google Scholar]
  18. Nyarko, S.K.; Akyereko, Y.G.; Akowuah, J.O.; Wireko-Manu, F.D. Comparative Studies on Grain Quality and Pesticide Residues in Maize Stored in Hermetic and Polypropylene Storage Bags. Agriculture 2021, 11, 772. [Google Scholar] [CrossRef]
  19. Escalante-Aburto, A.; Figueroa-Cárdenas, J.d.D.; Dominguez-Lopez, A.; García-Lara, S.; Ponce-García, N. Multivariate Analysis on the Properties of Intact Cereal Kernels and Their Association with Viscoelasticity at Different Moisture Contents. Foods 2023, 12, 808. [Google Scholar] [CrossRef]
  20. Atluri, G.; Karpatne, A.; Kumar, V. Spatio-Temporal Data Mining: A Survey of Problems and Methods. ACM Comput. Surv. 2019, 51, 1–41. [Google Scholar] [CrossRef]
  21. Auslander, N.; Wolf, Y.I.; Koonin, E.V. In Silico Learning of Tumor Evolution through Mutational Time Series. Proc. Natl. Acad. Sci. USA 2019, 116, 9501–9510. [Google Scholar] [CrossRef]
  22. Puangragsa, U.; Setakornnukul, J.; Dankulchai, P.; Phasukkit, P. 3D Kinect Camera Scheme with Time-Series Deep-Learning Algorithms for Classification and Prediction of Lung Tumor Motility. Sensors 2022, 22, 2918. [Google Scholar] [CrossRef]
  23. Wang, Z. Risk Prediction of Sports Events Based on Gray Neural Network Model. Complexity 2021, 2021, 6214036. [Google Scholar] [CrossRef]
  24. Gupta, A.; Liu, T.; Crick, C. Utilizing Time Series Data Embedded in Electronic Health Records to Develop Continuous Mortality Risk Prediction Models Using Hidden Markov Models: A Sepsis Case Study. Stat. Methods Med. Res. 2020, 29, 3409–3423. [Google Scholar] [CrossRef]
  25. Wang, P.; Tian, H.; Zhang, Y.; Han, D.; Wang, J.; Yin, M. Crop Growth Monitoring and Yield Estimation Based on Deep Learning: State of the Art and Beyond. Trans. Chin. Soc. Agric. Mach. 2022, 53, 1–14. [Google Scholar]
  26. Devi, M.; Kumar, J.; Malik, D.P.; Mishra, P. Forecasting of Wheat Production in Haryana Using Hybrid Time Series Model. J. Agric. Food Res. 2021, 5, 100175. [Google Scholar] [CrossRef]
  27. Jeong, J.H.; Resop, J.P.; Mueller, N.D.; Fleisher, D.H.; Yun, K.; Butler, E.E.; Timlin, D.J.; Shim, K.-M.; Gerber, J.S.; Reddy, V.R.; et al. Random Forests for Global and Regional Crop Yield Predictions. PLoS ONE 2016, 11, e0156571. [Google Scholar] [CrossRef] [PubMed]
  28. Agarwal, D.; Bachan, P. Machine Learning Approach for the Classification of Wheat Grains. Smart Agric. Technol. 2023, 3, 100136. [Google Scholar] [CrossRef]
  29. Lin, L.; Liu, J.; Zhang, X.; Liang, X. Automatic Translation of Spoken English Based on Improved Machine Learning Algorithm. J. Intell. Fuzzy Syst. 2021, 40, 2385–2395. [Google Scholar] [CrossRef]
  30. Sindwani, A.; Kumar, A.; Gautam, C.; Purohit, G.; Tanwar, P. Prediction and Monitoring of Stored Food Grains Health Using IoT Enable Nodes. In Proceedings of the 2020 IEEE International Conference on Computing, Power and Communication Technologies (GUCON), Greater Noida, India, 2–4 October 2020; IEEE: Greater Noida, India, 2020; pp. 516–522. [Google Scholar]
  31. Duan, S.; Yang, W.; Wang, X.; Mao, S.; Zhang, Y. Temperature Forecasting for Stored Grain: A Deep Spatiotemporal Attention Approach. IEEE Internet Things J. 2021, 8, 17147–17160. [Google Scholar] [CrossRef]
  32. Yang, W.; Wang, X.; Cao, S.; Wang, H.; Mao, S. Multi-Class Wheat Moisture Detection with 5GHz Wi-Fi: A Deep LSTM Approach. In Proceedings of the 2018 27th International Conference on Computer Communication and Networks (ICCCN), Hangzhou, China, 30 July–2 August 2018; IEEE: Hangzhou, China, 2018; pp. 1–9. [Google Scholar]
  33. Jubair, S.; Tucker, J.R.; Henderson, N.; Hiebert, C.W.; Badea, A.; Domaratzki, M.; Fernando, W.G.D. GPTransformer: A Transformer-Based Deep Learning Method for Predicting Fusarium Related Traits in Barley. Front. Plant Sci. 2021, 12, 761402. [Google Scholar] [CrossRef] [PubMed]
  34. GB 2763-2021; National Food Safety Standard-In Maximum Residue Limits for Pesticides in Food. China Agriculture Press: Beijing, China, 2021; 95–97, 165–166, 192–193.
  35. PyTorch. Available online: https://pytorch.org/ (accessed on 4 March 2023).
  36. Wu, H.; Xu, J.; Wang, J.; Long, M. Autoformer: Decomposition Transformers with Auto-Correlation for Long-Term Series Forecasting. Adv. Neural Inf. Process. Syst. 2022, 34, 22419–22430. [Google Scholar]
  37. Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, L.; Polosukhin, I. Attention Is All You Need. Adv. Neural Inf. Process. Syst. 2017, 30. [Google Scholar] [CrossRef]
  38. Geiger, A.; Liu, D.; Alnegheimish, S.; Cuesta-Infante, A.; Veeramachaneni, K. TadGAN: Time Series Anomaly Detection Using Generative Adversarial Networks. In Proceedings of the 2020 IEEE International Conference on Big Data (Big Data), Atlanta, GA, USA, 10–13 December 2020; IEEE: Atlanta, GA, USA, 2020; pp. 33–43. [Google Scholar]
  39. Chechetkin, V.R.; Lobzin, V.V. Detection of Large-Scale Noisy Multi-Periodic Patterns with Discrete Double Fourier Transform. II. Study of Correlations Between Patterns. Fluct. Noise Lett. 2021, 20, 2150003. [Google Scholar] [CrossRef]
  40. Du, G.; Li, X.; Zhang, L.; Liu, L.; Zhao, C. Novel Automated K-Means++ Algorithm for Financial Data Sets. Math. Probl. Eng. 2021, 2021, 1–12. [Google Scholar] [CrossRef]
  41. Shahapure, K.R.; Nicholas, C. Cluster Quality Analysis Using Silhouette Score. In Proceedings of the 2020 IEEE 7th International Conference on Data Science and Advanced Analytics (DSAA), Sydney, NSW, Australia, 6–9 October 2020; IEEE: Sydney, NSW, Australia, 2020; pp. 747–748. [Google Scholar]
  42. Singh, A.K.; Mittal, S.; Malhotra, P.; Srivastava, Y.V. Clustering Evaluation by Davies-Bouldin Index (DBI) in Cereal Data Using K-Means. In Proceedings of the 2020 Fourth International Conference on Computing Methodologies and Communication (ICCMC), Erode, India, 11–13 March 2020; IEEE: Erode, India, 2020; pp. 306–310. [Google Scholar]
Figure 1. Autoformer model architecture.
Figure 1. Autoformer model architecture.
Foods 12 01833 g001
Figure 2. Auto-correlation architecture.
Figure 2. Auto-correlation architecture.
Foods 12 01833 g002
Figure 3. Time-delay aggregation.
Figure 3. Time-delay aggregation.
Foods 12 01833 g003
Figure 4. K-means++ algorithm flow chart.
Figure 4. K-means++ algorithm flow chart.
Foods 12 01833 g004
Figure 5. Dataset of residual changes of dimethoate in wheat.
Figure 5. Dataset of residual changes of dimethoate in wheat.
Foods 12 01833 g005
Figure 6. Dataset of residual changes of chlorpyrifos in wheat.
Figure 6. Dataset of residual changes of chlorpyrifos in wheat.
Foods 12 01833 g006
Figure 7. Dataset of residual changes of chlorpyrifos-methyl in wheat.
Figure 7. Dataset of residual changes of chlorpyrifos-methyl in wheat.
Foods 12 01833 g007
Figure 8. Comparison of Silhouette Coefficient of different clustering algorithms.
Figure 8. Comparison of Silhouette Coefficient of different clustering algorithms.
Foods 12 01833 g008
Figure 9. Comparison of Davies–Bouldin Index of different clustering algorithms.
Figure 9. Comparison of Davies–Bouldin Index of different clustering algorithms.
Foods 12 01833 g009
Figure 10. Comparison of Silhouette Coefficient.
Figure 10. Comparison of Silhouette Coefficient.
Foods 12 01833 g010
Figure 11. Comparison of Davies–Bouldin Index.
Figure 11. Comparison of Davies–Bouldin Index.
Foods 12 01833 g011
Table 1. Partitioning of datasets in experiments.
Table 1. Partitioning of datasets in experiments.
DatasetTraining SetTest SetValidation Set
26551858531266
Table 2. Experimental platform and environmental parameters.
Table 2. Experimental platform and environmental parameters.
Computer informationOperating systemWindows 10 64-bit
CPUIntel(R) Core(TM) i5-8265U CPU @ 1.60 GHz (8 CPUs) ~1.8 GHz
GPURadeon 540X Series
RAM16 GB
ToolkitPython 3.7Numpy 1.21.5
Scikit_Learn 1.0.2
Pandas 0.25.1
Torch 1.12.0
Matplotlib 3.5.2
Table 3. Experimental results on the error comparison of Autoformer-based wheat pesticide residue changes prediction models.
Table 3. Experimental results on the error comparison of Autoformer-based wheat pesticide residue changes prediction models.
ModelMAEMSERMSEMAPESMAPE
RNN0.281690.045160.884920.551327.32437
LSTM0.243520.043240.832030.431476.43174
Transformer0.164280.039860.282550.199662.43713
Autoformer0.110170.013580.046810.116540.13005
Table 4. Clustering centers and ranking of the three clusters of wheat.
Table 4. Clustering centers and ranking of the three clusters of wheat.
Categories d i d i Sample SizeQuality Level
Dimethoate 10.039500350.03341637810Level 1
Dimethoate 20.044343140.030390721080Level 2
Dimethoate 30.049000050.04175411765Level 3
Chlorpyrifos 10.228912360.17001536855Level 1
Chlorpyrifos 20.289894540.20340521765Level 2
Chlorpyrifos 30.331129020.253364841035Level 3
Chlorpyrifos-methyl 11.770916091.22453220890Level 1
Chlorpyrifos-methyl 22.433462281.54720279935Level 2
Chlorpyrifos-methyl 33.202587312.02372957830Level 3
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Liu, Y.; Zhang, Q.; Dong, W.; Li, Z.; Liu, T.; Wei, W.; Zuo, M. Autoformer-Based Model for Predicting and Assessing Wheat Quality Changes of Pesticide Residues during Storage. Foods 2023, 12, 1833. https://doi.org/10.3390/foods12091833

AMA Style

Liu Y, Zhang Q, Dong W, Li Z, Liu T, Wei W, Zuo M. Autoformer-Based Model for Predicting and Assessing Wheat Quality Changes of Pesticide Residues during Storage. Foods. 2023; 12(9):1833. https://doi.org/10.3390/foods12091833

Chicago/Turabian Style

Liu, Yingjie, Qingchuan Zhang, Wei Dong, Zihan Li, Tianqi Liu, Wei Wei, and Min Zuo. 2023. "Autoformer-Based Model for Predicting and Assessing Wheat Quality Changes of Pesticide Residues during Storage" Foods 12, no. 9: 1833. https://doi.org/10.3390/foods12091833

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop