A grain pile temperature prediction method and system based on hierarchical modeling and hybrid machine learning

By employing hierarchical modeling and hybrid machine learning methods, highly adaptable prediction models were constructed for the temperature change characteristics of the surface and main areas of the grain pile, respectively. A model fusion strategy was used to achieve high-precision prediction of grain pile temperature, solving the problems of low prediction accuracy and poor interpretability in existing technologies.

CN122113590APending Publication Date: 2026-05-29JIANGSU UNIV OF SCI & TECH +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIANGSU UNIV OF SCI & TECH
Filing Date
2026-01-30
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing methods for predicting grain pile temperature lack a regional modeling approach, making it difficult to adapt to non-stationary and multi-timescale dynamic changes. They also fail to reflect the correlation between temperatures at multiple points within the storage facility and have poor interpretability, resulting in low prediction accuracy.

Method used

A method based on hierarchical modeling and hybrid machine learning was adopted to predict the surface temperature of the grain pile and the main body temperature, respectively. The surface temperature was predicted by using methods such as variable mode decomposition, sample entropy, and support vector regression. The temperature of the main body temperature was predicted by combining the concept of coordinate system oneness, spatial relationship model, long short-term memory network and improved Transformer model. Finally, the models were fused by the timestamp alignment strategy.

Benefits of technology

It achieves high-precision, global, and dynamic monitoring of the internal temperature of grain piles, improves the model's generalization ability and stability in complex spatiotemporal contexts, and avoids the overfitting or underfitting problems of traditional single models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122113590A_ABST
    Figure CN122113590A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on hierarchical modeling and hybrid machine learning's grain pile temperature prediction method and system, method includes: acquisition temperature time series, and pre-processing;Temperature time series includes grain pile surface layer temperature time series and grain pile main body temperature time series;For the grain pile surface layer temperature time series with strong nonlinearity, multiple time scale characteristics, obtain the grain pile surface layer temperature prediction sequence;For the temperature inhomogeneity and spatial heterogeneity of grain pile main body area, obtain the temperature prediction sequence of grain pile main body area;Based on timestamp alignment strategy, grain pile surface layer temperature prediction sequence and the temperature prediction sequence of grain pile main body area are fused, and global grain pile temperature prediction result is obtained.The application fuses spatial modeling and time series prediction, can both depict the complex spatio-temporal structure of grain pile internal temperature, and can enhance the accuracy, generalization and engineering deployability of model, to support the construction and application of future intelligent grain condition management system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of grain storage safety and relates to grain pile temperature prediction technology, specifically to a grain pile temperature prediction method and system based on hierarchical modeling and hybrid machine learning. Background Technology

[0002] Grain storage security is an important component of the national food security system, and temperature is a key parameter for measuring the safety of grain piles and judging changes in grain condition. Abnormal temperatures often indicate major hidden dangers such as the growth of insects and mold, and deterioration of grain quality. Therefore, real-time monitoring and accurate prediction of grain pile temperature are of great significance for achieving scientific grain storage, preventing risks, and reducing losses.

[0003] Currently, grain pile temperature data is mostly collected by temperature sensors deployed inside the grain pile, exhibiting characteristics such as spatiotemporal diversity, dynamic non-stationarity, and regional heterogeneity. In particular, the surface temperature of the grain pile is significantly affected by external meteorological factors such as air temperature, humidity, and wind direction, and is prone to drastic fluctuations and abrupt changes, becoming the area where abnormal grain conditions first appear. Meanwhile, the main area of ​​the grain pile, due to its complex stacking structure, ventilation methods, and heat diffusion paths, exhibits obvious spatial distribution differences and local thermal inertia characteristics.

[0004] Traditional prediction methods include heat conduction models based on empirical formulas, statistical regression methods, and data-driven prediction models such as LSTM and GRU that have emerged in recent years. However, existing grain pile temperature prediction methods generally use a single model or lack spatial regional variability modeling. As a result, these methods can reflect temperature change trends under certain conditions, but they have the following main problems:

[0005] ① The lack of a regional modeling approach makes it impossible to effectively distinguish the temperature evolution mechanisms of the surface and the main body regions;

[0006] ② It is difficult to adapt to non-stationary and multi-timescale dynamic changes, resulting in low prediction accuracy;

[0007] ③ Lack of spatial structure modeling capabilities, unable to reflect the correlation of temperature between multiple points within the warehouse;

[0008] ④ Poor interpretability, making it difficult to combine environmental changes and spatial characteristics for mechanism analysis or model regulation.

[0009] Therefore, a new technological solution is needed to address these issues. Summary of the Invention

[0010] Purpose of the invention: In order to overcome the shortcomings of the existing technology, a method and system for predicting grain pile temperature based on hierarchical modeling and hybrid machine learning is provided. It integrates spatial modeling and time series prediction, which can not only depict the complex spatiotemporal structure of temperature inside the grain pile, but also enhance the accuracy, generalization and engineering deployability of the model, so as to support the construction and application of future intelligent grain condition management systems.

[0011] Technical Solution: To achieve the above objectives, this invention provides a method for predicting grain pile temperature based on hierarchical modeling and hybrid machine learning, comprising the following steps:

[0012] S1: Collect temperature time series data using multiple temperature sensors deployed inside the grain silo, and perform preprocessing;

[0013] S2: The temperature time series includes the temperature time series of the surface layer of the grain pile and the temperature time series of the main body of the grain pile;

[0014] For the time series of grain pile surface temperature with strong nonlinearity and multiple time scales, based on the concept of "decomposition-prediction-reconstruction", combined with the methods of Variational Mode Decomposition (VMD), Sample Entropy (SampEn), and Support Vector Regression (SVR), a predicted sequence of grain pile surface temperature is obtained.

[0015] To address the temperature nonuniformity and spatial heterogeneity of the main grain pile area, a temperature prediction sequence for the main grain pile area is obtained based on the concept of coordinate system one, the spatial relationship model WSLP (Warehouse-Surface-Line-Point), the time series model Long Short-Term Memory (LSTM), and the iTransformer method.

[0016] S3: Based on the timestamp alignment strategy, the temperature prediction sequence of the surface of the grain pile and the temperature prediction sequence of the main area of ​​the grain pile are fused to obtain the global grain pile temperature prediction result.

[0017] Furthermore, the temperature time series data in step S1 includes meteorological elements (such as temperature, humidity, wind speed, etc.), temperature and humidity data of the environment inside and outside the grain warehouse, and the coordinates of sensors inside the grain pile and their corresponding temperature values; among them, non-numerical data (such as weather type and wind direction) are converted into numerical inputs that can be used for model training by using label encoding.

[0018] Furthermore, the preprocessing in step S1 includes three types of operations: denoising, missing value imputation, and outlier removal, specifically:

[0019] Time series denoising: Time series such as temperature and humidity are de-denoised using timestamps as keys, and methods such as moving average and Fourier transform are used to smooth data fluctuations;

[0020] Missing value handling: For non-continuous data segments, linear interpolation or Lagrange interpolation is used to fill in missing values ​​based on time series characteristics;

[0021] Outlier detection and cleaning: Outliers are detected and removed or corrected using Z-score or IQR methods.

[0022] Furthermore, the process of obtaining the predicted temperature sequence of the grain pile surface in step S2 includes:

[0023] A1: Regarding the time series of surface temperature of grain piles The original temperature sequence was decomposed into using the VMD algorithm. Modal components (IMFs), where each mode has narrowband characteristics and is concentrated at a certain center frequency. And satisfy the property that the sequence can be reconstructed;

[0024] A2: Using the SampEn evaluation metric, the decomposition results are evaluated for each set of VMD decomposition parameters. Calculate the sample entropy value for each modality. :

[0025]

[0026] Where SampEn is the function for calculating sample entropy;

[0027] A3: For components-based Calculate the standard deviation of sample entropy under the VMD decomposition parameters for this set. Compared with the average , , The key metrics for evaluating the effectiveness of VMD decomposition (decomposition complexity, redundancy, and stability) are as follows: Defined as:

[0028]

[0029] Among them, the average sample entropy for: Sample entropy standard deviation : ;

[0030] By constructing comprehensive evaluation indicators Determine the optimal set of VMD decomposition parameters, including the number of mode decompositions. Punishment factor Tolerance Convergence tolerance Parameters, etc. The evaluation metrics aim to strike a balance between decomposition accuracy and computational complexity, avoiding increased model training overhead and decreased prediction performance due to an excessive number of modes, thereby achieving effective deconstruction of the original temperature sequence;

[0031] A4: The SVR method is used to perform time series forecasting on each IMF derived from VMD decomposition; considering the characteristic differences of different IMF series, Bayesian optimization is used to automatically select the optimal parameter combination for each SVR model, including regularization parameters. With error tolerance parameter The selected kernel functions are all radial basis functions (RBF) to improve the model's fitting ability and generalization performance when dealing with nonlinear sequence features.

[0032] A5: Based on the data reconfigurability granted by the constraints of VMD decomposition, the predicted sequence of surface temperature of grain piles is obtained through reconstruction.

[0033] Furthermore, the VMD decomposition used in step A1 possesses the characteristics of temporal data decomposition and theoretical reconstruction, and its mathematical expression is:

[0034]

[0035]

[0036] in, For the first One mode; The corresponding center frequency; This is the time derivative, used to measure modal bandwidth; It is the Dirac function; for Norm; The Hilbert transform of the corresponding mode is the analytic signal; the objective function minimizes the bandwidth of each mode function after Hilbert transform and exponential modulation; the constraints ensure that the sum of all mode functions equals the original signal.

[0037] Furthermore, the temperature prediction result in step A5 for:

[0038]

[0039] in, These are the forecasts from various IMFs.

[0040] Furthermore, the process of obtaining the temperature prediction sequence of the main area of ​​the grain pile in step S2 includes:

[0041] B1: Unify the coordinate positions of temperature sensors in different types of grain silos into a normalized cylindrical coordinate system:

[0042]

[0043] A unified coordinate system is the foundation for applying the model across different grain storage types;

[0044] B2: Constructing a WSLP feature system through temperature distribution analysis and environmental impact factor analysis:

[0045] By analyzing the temperature distribution at different levels, the spatial heterogeneity of temperature inside the grain warehouse and the mode of heat conduction are obtained;

[0046] By calculating the Pearson correlation coefficients between different environmental factors and grain pile temperature, the quantitative driving relationship of environmental factors on grain pile temperature is obtained.

[0047] By analyzing the influence relationship between different temperature points on the same vertical line within the same temperature layer and between different temperature layers, the spatial correlation between local and wide-area temperatures within the grain pile is obtained.

[0048] B3: Based on the Transformer model, the iTransformer model is improved. The iTransformer model takes the complete time series as a single token input and achieves synchronous prediction of multiple time series by calculating the attention coefficient between different tokens.

[0049] B4: Using LSTM and iTransformer as parallel models, a model selection strategy is constructed based on mean absolute error (MAE):

[0050]

[0051]

[0052] Model selection (selecting the model with the smaller MAE value as the dominant model) or fusion (weighting the predicted values ​​based on the MAE value) is performed based on the MAE values ​​of the two models in the test set.

[0053] Further, step B2 specifically includes:

[0054] Location inside the grain warehouse At the moment Temperature value for:

[0055]

[0056] in, The temperature effect at the warehouse level is the main factor. This refers to the surface-level temperature effect. This refers to the temperature effect at the line level. This refers to the temperature effect at the point level.

[0057] in, , For environmental feature vectors, Represents the mapping relationship of environmental impact;

[0058] in, , For point Belonging to the two-dimensional plane, For plane Average temperature These are the original sensor measurements. This is the in-plane temperature gradient vector. For point Offset vector relative to the center of the plane;

[0059] in, , It is the thermal conductivity coefficient (related to the porosity and thermal conductivity of the grain pile). For point The path it is located on Temperature at a reference point above the path. Temperature at a reference point below the path;

[0060] in, In the formula, This is the local influence coefficient (obtained through data calibration). For point The set of neighborhood temperature measurement points, For the neighborhood The weight, The average temperature of the region;

[0061] The corresponding feature system is The features included correspond to the volume layer, surface layer, line layer, and point layer of the WSLP spatial relationship model, respectively.

[0062] in, , For time indexing, As meteorological element type, The number of days is the lag. Number the feature groups. For the indexing of sensors inside and outside the warehouse, The difference type is either temperature difference or humidity difference.

[0063] in, , The directions of the two-dimensional plane coordinate axes;

[0064] in, , The spatial coordinate axis direction (cylinder) Three-axis, modular warehouse (three axes)

[0065] in, , The nearest neighborhood coordinate offset (constrained by the actual deployment of the sensors).

[0066] Furthermore, the selection strategy for the dominant model in step B4 is defined as follows:

[0067]

[0068]

[0069] in, The dominant prediction model;

[0070] The fusion strategy is defined as follows:

[0071]

[0072]

[0073] in, To integrate prediction models, These are the weights for model fusion.

[0074] This invention also provides a grain pile temperature prediction system based on hierarchical modeling and hybrid machine learning, comprising:

[0075] The raw temperature data acquisition module is used to acquire the time series of surface temperature and the main body temperature of the grain pile;

[0076] The data preprocessing module is used to preprocess the collected temperature data;

[0077] The surface temperature prediction module predicts the surface temperature of the grain pile based on the time series of the grain pile surface temperature.

[0078] The main temperature prediction module predicts the temperature sequence of the main grain pile area, taking into account the temperature non-uniformity and spatial heterogeneity of the main grain pile area.

[0079] The timestamp alignment module is used to synchronize and align the outputs of the prediction branches of the surface and main regions according to the time axis.

[0080] Output fusion module: fuses the temperature prediction sequence of the surface of the grain pile with the temperature prediction sequence of the main area of ​​the grain pile to obtain the global grain pile temperature prediction result.

[0081] This invention constructs differentiated modeling and prediction strategies for the temperature change characteristics of the surface and main body regions. In the surface region, a variational mode decomposition (VMD) method optimized based on sample entropy (SampEn) is introduced to extract multi-timescale intrinsic mode components of the temperature sequence. Support vector regression (SVR) is then used to achieve high-precision prediction of each component, and the surface temperature of the grain pile is reconstructed. In the main body region, a multi-level spatial structure modeling system of "volume-surface-line-point" (WSLP) is established. Long short-term memory networks (LSTM) and an improved Transformer model (iTransformer) are integrated to construct a dual-channel temporal prediction framework, enabling temperature prediction of the main body region of the grain pile. Finally, a timestamp-aligned strategy is used to integrate the prediction results of the two models, outputting a unified global temperature prediction value, achieving refined dynamic monitoring of the internal temperature state of the grain pile.

[0082] Beneficial Effects: Compared with existing technologies, this invention addresses the differences in temperature change patterns between the surface and main body regions of a grain pile by constructing highly adaptable surface temperature prediction models and main body region temperature prediction models, respectively. Furthermore, a model fusion strategy is employed to achieve high-precision prediction of the overall temperature of the grain pile. This invention effectively avoids the overfitting or underfitting problems that occur with traditional single models when processing regional data with different time-series characteristics, thus improving the model's generalization ability and stability in complex spatiotemporal contexts. Attached Figure Description

[0083] Figure 1 This is a schematic diagram of the overall structure of the method of the present invention;

[0084] Figure 2 A flowchart for temperature prediction of the surface area of ​​a grain pile based on VMD-SampEn-SVR;

[0085] Figure 3 Structure diagram of WSLP-LSTM-iTransformer for predicting temperature in the main area of ​​a grain pile;

[0086] Figure 4 Here is a structural diagram of the iTransformer model;

[0087] Figure 5 This is a schematic diagram of simultaneous forecasting of multiple time series.

[0088] Figure 6 A comparison chart of the predicted results after VMD-SampEn-SVR reconstruction and the actual temperature curve;

[0089] Figure 7 A comparison of the prediction results of WSLP-LSTM-iTransformer in the bottom region of a grain pile with the actual temperature curve;

[0090] Figure 8 A comparison of the prediction results of WSLP-LSTM-iTransformer in the lower region of the grain pile with the actual temperature curve;

[0091] Figure 9 This is a comparison chart of the predicted results of WSLP-LSTM-iTransformer in the upper region of a grain pile and the actual temperature curve. Detailed Implementation

[0092] The present invention will be further illustrated below with reference to the accompanying drawings and specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. After reading this invention, any modifications of the invention in various equivalent forms by those skilled in the art will fall within the scope defined by the appended claims.

[0093] Example 1:

[0094] like Figure 1 As shown, this embodiment provides a method for predicting grain pile temperature based on hierarchical modeling and hybrid machine learning, including the following steps:

[0095] S1: Collect temperature time series data using multiple temperature sensors deployed inside the grain silo, and perform preprocessing;

[0096] Temperature time series data includes meteorological elements (such as temperature, humidity, wind speed, etc.), temperature and humidity data of the internal and external environment of the grain warehouse, and the coordinates of sensors inside the grain pile and their corresponding temperature values; among them, non-numerical data (such as weather type and wind direction) are converted into numerical inputs that can be used for model training by label encoding.

[0097] To ensure data quality, data preprocessing is performed before entering the modeling stage. Preprocessing includes three types of operations: noise reduction, missing value imputation, and outlier removal. Specifically:

[0098] Time series denoising: Time series such as temperature and humidity are de-denoised using timestamps as keys, and methods such as moving average and Fourier transform are used to smooth data fluctuations;

[0099] Missing value handling: For non-continuous data segments, missing values ​​are filled in using linear interpolation or Lagrange interpolation based on time-series characteristics.

[0100] Outlier detection and cleaning: Outliers are detected and removed or corrected using Z-score or IQR methods.

[0101] S2: The temperature time series includes the temperature time series of the surface layer of the grain pile and the temperature time series of the main body of the grain pile;

[0102] I. In this embodiment, the surface temperature data of the grain pile is collected from 34 sensors deployed on the surface of the grain pile, which collect real-time temperature change data of the grain pile surface; such as Figure 2 As shown, for the time series of grain pile surface temperature with strong nonlinearity and multi-time scale characteristics, based on the concept of "decomposition-prediction-reconstruction", combined with the methods of variable mode decomposition (VMD), sample entropy (SampEn), and support vector regression (SVR), a predicted sequence of grain pile surface temperature is obtained.

[0103] VMD constructs a variational optimization problem to decompose the original signal into several intrinsic mode functions (IMFs) with adaptive center frequencies. Each IMF has narrow-band spectral characteristics and focuses on a single center frequency. Each mode function has compact spectral characteristics, thereby achieving accurate separation of different frequency components. Then, the SVR method is used to construct and train a prediction model for each IMF component. Finally, according to the data reconstruction rules of VMD, the prediction results of each IMF component are superimposed to reconstruct a complete grain pile surface temperature prediction sequence.

[0104] The process of obtaining the predicted temperature sequence of the grain pile surface includes:

[0105] A1: Regarding the time series of surface temperature of grain piles The original temperature sequence was decomposed into using the VMD algorithm. Modal components (IMFs), where each mode has narrowband characteristics and is concentrated at a certain center frequency. And satisfy the property that the sequence can be reconstructed;

[0106] The VMD decomposition method used possesses the characteristics of time-series data decomposition and theoretical reconstruction, and its mathematical expression is:

[0107]

[0108]

[0109] in, For the first One mode; The corresponding center frequency; This is the time derivative, used to measure modal bandwidth; It is the Dirac function; for Norm; The Hilbert transform of the corresponding mode is the analytic signal; the objective function minimizes the bandwidth of each mode function after Hilbert transform and exponential modulation; the constraints ensure that the sum of all mode functions equals the original signal.

[0110] To solve the above optimization problem, a penalty factor is introduced. and Lagrange multipliers The augmented Lagrangian function is constructed as follows:

[0111] in, This is a penalty factor used to control the fineness of the decomposition; This represents the inner product operation. It is achieved through alternating updates. , and Make the Lagrange function The convergence is achieved, and the specific iterative formula is as follows:

[0112]

[0113]

[0114]

[0115] in, , , They are respectively , , Fourier transform; For the update step size of the Lagrange multipliers; This represents the number of iterations. Through repeated iterations until the preset convergence condition is met, the modal functions are finally obtained. This enables multi-scale decomposition of non-stationary original temperature sequences;

[0116] A2: Using the SampEn evaluation metric, the decomposition results are evaluated for each set of VMD decomposition parameters. Calculate the sample entropy value for each modality. :

[0117]

[0118] Where SampEn is the function for calculating sample entropy;

[0119] To address the key parameters present in traditional VMD applications For empirical assignment problems, sample entropy is introduced as an evaluation metric for parameter optimization to optimize the number of modes. The selection process involves the following steps: setting the range of candidate mode numbers. For each Perform VMD decomposition to obtain IMF components For each IMF component, calculate its corresponding sample entropy value:

[0120]

[0121] A3: For components-based Calculate the standard deviation of sample entropy under the VMD decomposition parameters for this set. Compared with the average , , The key metrics for evaluating the effectiveness of VMD decomposition (decomposition complexity, redundancy, and stability) are as follows: Defined as:

[0122]

[0123] Specifically, for each candidate mode number, the average entropy of the sample entropy of all its IMF components is calculated. Standard deviation entropy The specific formula is as follows:

[0124]

[0125]

[0126] Among them, average entropy Reflects the average complexity of the overall decomposed modes. A smaller value indicates that the modes are more stable and regular, with less noise interference; standard deviation entropy This measures the fluctuation in complexity between modalities. A larger value may indicate an anomaly in the entropy of individual modes (e.g., due to over-decomposition or mis-decomposition).

[0127] By constructing comprehensive evaluation indicators Determine the optimal set of VMD decomposition parameters, including the number of mode decompositions. Punishment factor Tolerance Convergence tolerance Parameters, etc. The evaluation metrics aim to strike a balance between decomposition accuracy and computational complexity, avoiding increased model training overhead and decreased prediction performance due to an excessive number of modes, thereby achieving effective deconstruction of the original temperature sequence;

[0128] Define comprehensive evaluation indicators Used to measure the quality of decomposition:

[0129]

[0130] in, Ultimately, the choice made The minimum K value is taken as the optimal number of modes. Therefore, obtaining the VMD decomposition result corresponding to the optimal number of modes can make the complexity distribution among modes more balanced, the overall structure more stable and regular, and the redundant components and noise interference less, thus avoiding the computational overhead and increased model complexity caused by excessive decomposition.

[0131] A4: The SVR method is used to perform time series forecasting on each IMF derived from VMD decomposition; considering the characteristic differences of different IMF series, Bayesian optimization is used to automatically select the optimal parameter combination for each SVR model, including regularization parameters. With error tolerance parameter The selected kernel functions are all radial basis functions (RBF) to improve the model's fitting ability and generalization performance when dealing with nonlinear sequence features.

[0132] A5: Based on the data reconfigurability granted by the constraints of VMD decomposition, a predicted sequence of surface temperature in the grain pile is obtained. Temperature prediction results. for:

[0133]

[0134] in, These are the forecasts from various IMFs.

[0135] II. Figure 3 As shown, to address the temperature non-uniformity and spatial heterogeneity of the main grain pile area, a temperature prediction sequence for the main grain pile area is obtained based on the coordinate system concept, the spatial relationship model WSLP, the time series model Long Short-Term Memory Network (LSTM), and the iTransformer method.

[0136] LSTM, as a special RNN architecture, effectively overcomes the gradient vanishing and gradient exploding problems faced by traditional RNNs when processing long sequence data by introducing a gating mechanism. The LSTM cell structure includes forget gates, input gates, and output gates, enabling LSTM to selectively remember and forget information. Therefore, this embodiment uses LSTM to perform parallel prediction of multiple modality sequences after VMD decomposition. The LSTM calculation formula is as follows:

[0137]

[0138] Considering the spatial heterogeneity of temperature in different regions of the grain pile, this application utilizes the LSTM model, which has stronger short-term time series prediction capabilities, and the iTransformer model, which has multivariate long-term time series prediction capabilities, to construct a dual-channel verifiable time series prediction model to achieve time prediction of the temperature in the main region of the grain pile.

[0139] Based on the above, the process of obtaining the temperature prediction sequence for the main area of ​​the grain pile includes:

[0140] B1: Unify the coordinate positions of temperature sensors in different types of grain silos into a normalized cylindrical coordinate system:

[0141]

[0142] A unified coordinate system is fundamental for applying the model across different grain storage types; this coordinate system can eliminate the differences caused by sensor coordinate systems in different grain storage types.

[0143] B2: Constructing a WSLP feature system through temperature distribution analysis and environmental impact factor analysis:

[0144] By analyzing the temperature distribution at different levels, the spatial heterogeneity of temperature inside the grain warehouse and the mode of heat conduction are obtained;

[0145] By calculating the Pearson correlation coefficients between different environmental factors and grain pile temperature, the quantitative driving relationship of environmental factors on grain pile temperature is obtained.

[0146] By analyzing the influence relationship between different temperature points on the same vertical line within the same temperature layer and between different temperature layers, the spatial correlation between local and wide-area temperatures within the grain pile is obtained.

[0147] Therefore, the location inside the granary At the moment Temperature value for:

[0148]

[0149] in, The temperature effect at the warehouse level is the main factor. This refers to the surface-level temperature effect. This refers to the temperature effect at the line level. This refers to the temperature effect at the point level.

[0150] in, , For environmental feature vectors, Represents the mapping relationship of environmental impact;

[0151] in, , For point Belonging to the two-dimensional plane, For plane Average temperature These are the original sensor measurements. This is the in-plane temperature gradient vector. For point Offset vector relative to the center of the plane;

[0152] in, , It is the thermal conductivity coefficient (related to the porosity and thermal conductivity of the grain pile). For point The path it is located on Temperature at a reference point above the path. Temperature at a reference point below the path;

[0153] in, In the formula, This is the local influence coefficient (obtained through data calibration). For point The set of neighborhood temperature measurement points, For the neighborhood The weight, The average temperature of the region;

[0154] The corresponding feature system is The features included correspond to the volume layer, surface layer, line layer, and point layer of the WSLP spatial relationship model, respectively.

[0155] in, , For time indexing, As meteorological element type, The number of days is the lag. Number the feature groups. For the indexing of sensors inside and outside the warehouse, The difference type is either temperature difference or humidity difference.

[0156] in, , The directions of the two-dimensional plane coordinate axes;

[0157] in, , The spatial coordinate axis direction (cylinder) Three-axis, modular warehouse (three axes)

[0158] in, , The nearest neighborhood coordinate offset (constrained by the actual deployment of the sensors).

[0159] B3: Based on the Transformer model, the iTransformer model is obtained, such as... Figure 4 As shown, by treating the complete time series as a variable sub-item and utilizing the attention mechanism to achieve multivariate correlation, iTransformer achieves high-precision time series prediction.

[0160] like Figure 5 As shown, the iTransformer model takes the complete time series as a single token input and achieves synchronous prediction of multiple time series by calculating the attention coefficient between different tokens.

[0161] B4: Using LSTM and iTransformer as parallel models, a model selection strategy is constructed based on mean absolute error (MAE):

[0162]

[0163]

[0164] Model selection (selecting the model with the smaller MAE value as the dominant model) or fusion (weighting the predicted values ​​based on the MAE value) is performed based on the MAE values ​​of the two models in the test set.

[0165] The selection strategy for the dominant model is defined as follows:

[0166]

[0167]

[0168] in, The dominant prediction model;

[0169] The fusion strategy is defined as follows:

[0170]

[0171]

[0172] in, To integrate prediction models, These are the weights for model fusion.

[0173] S3: Based on the timestamp alignment strategy, the temperature prediction sequence of the surface of the grain pile and the temperature prediction sequence of the main area of ​​the grain pile are fused to obtain the global grain pile temperature prediction result.

[0174] Example 2:

[0175] Based on the method of Example 1, this embodiment provides a grain pile temperature prediction system based on hierarchical modeling and hybrid machine learning, including:

[0176] The raw temperature data acquisition module is used to acquire the time series of surface temperature and the main body temperature of the grain pile;

[0177] The data preprocessing module is used to preprocess the collected temperature data;

[0178] The surface temperature prediction module predicts the surface temperature of the grain pile based on the time series of the grain pile surface temperature.

[0179] The main temperature prediction module predicts the temperature sequence of the main grain pile area, taking into account the temperature non-uniformity and spatial heterogeneity of the main grain pile area.

[0180] The timestamp alignment module is used to synchronize and align the outputs of the prediction branches of the surface and main regions according to the time axis.

[0181] Output fusion module: fuses the temperature prediction sequence of the surface of the grain pile with the temperature prediction sequence of the main area of ​​the grain pile to obtain the global grain pile temperature prediction result.

[0182] The surface temperature prediction module includes sub-units such as a VMD decomposition module for sample entropy optimization, an SVR prediction module, and a reconstruction module, which work together to accurately predict the surface temperature. The main area temperature prediction module includes LSTM and iTransformer modules. The main area temperature prediction is based on the analysis of the temperature spatial distribution relationship of the main area temperature data of the grain pile. The features obtained from the spatial relationship model analysis are then combined with the time series prediction models LSTM and iTransformer for training and prediction, thereby obtaining the main area temperature prediction result.

[0183] Example 3:

[0184] To evaluate the performance of the grain pile temperature prediction model proposed in this invention in actual grain warehouse temperature prediction tasks, this embodiment selects the current mainstream time series modeling method as the baseline model for comparison and conducts comparative analysis.

[0185] Currently, the mainstream temporal modeling methods include: GRU (Gated Recurrent Unit), TCN (Temporal Convolutional Network), iTransformer, etc.

[0186] To comprehensively quantify the overall performance of each model in multi-component prediction tasks, this embodiment utilizes... (MeanAbsolute Error) (Root Mean Square Error), Regression performance metrics such as (Coefficient of Determination) are used as evaluation criteria for model performance, and their calculation formulas are as follows:

[0187]

[0188]

[0189]

[0190] in, For the sample size, This is the actual value. For predicted values, The average of the actual values; where, It is the average of the absolute differences between the predicted value and the actual value. The smaller the value, the smaller the average error. It is more sensitive to larger errors and can reflect the degree of deviation between the predicted value and the actual value; This indicates the model's ability to fit data fluctuations; the closer its value is to 1, the stronger the model's explanatory power.

[0191] Experiment on predicting surface temperature of grain piles:

[0192] The experimental results for predicting the surface temperature of grain piles are shown in Table 1. Figure 6 As shown.

[0193] Table 1. Prediction effect of surface temperature of grain pile

[0194]

[0195] According to Table 1 and Figure 6 The data shows that:

[0196] The hybrid model proposed in this invention outperforms the comparative model on all metrics: whereby As low as 0.4141, far lower than the 0.8099 of the LSTM model; The value decreased significantly to 0.5653, indicating less volatility in the prediction error. Further comparison shows that the method of this invention... In terms of metrics, it improves by more than 25% on average compared to other mainstream models. The average improvement of over 14% fully demonstrates its accuracy advantage in multi-component non-stationary time series forecasting.

[0197] Experiment on predicting the temperature of the main body of the grain pile:

[0198] The experimental results for predicting the temperature of the main body of the grain pile are shown in Table 2. Figures 7-9 As shown.

[0199] Table 2

[0200]

[0201] As shown in Table 2, the method proposed in this invention demonstrates better predictive performance than the comparison model on the test dataset. Figures 7-9 It can be seen that the method of this invention has good prediction accuracy in various areas and heights within the tested grain silo. The model proposed in this invention performs optimally at all points, overall... The value is 0.2601, far lower than LSTM (1.1550), GRU (0.4704), and SVR (0.4310). and In terms of metrics, it is also significantly better than other models.

[0202] By integrating the predicted surface temperature of the grain pile with the predicted temperature of the main area of ​​the grain pile using timestamp alignment, high-precision temperature prediction of the entire grain pile area can be achieved.

Claims

1. A method for predicting grain pile temperature based on hierarchical modeling and hybrid machine learning, characterized in that, Includes the following steps: S1: Collect temperature time series data using multiple temperature sensors deployed inside the grain silo, and perform preprocessing; S2: The temperature time series includes the temperature time series of the surface layer of the grain pile and the temperature time series of the main body of the grain pile; For the time series of grain pile surface temperature with strong nonlinearity and multiple time scales, based on the concept of "decomposition-prediction-reconstruction", combined with variable mode decomposition, sample entropy and support vector regression methods, a predicted sequence of grain pile surface temperature is obtained. To address the temperature nonuniformity and spatial heterogeneity of the main grain pile area, a temperature prediction sequence for the main grain pile area is obtained based on the concept of coordinate system one, the spatial relationship model WSLP, the time series model Long Short-Term Memory Network, and the iTransformer method. S3: Based on the timestamp alignment strategy, the temperature prediction sequence of the surface of the grain pile and the temperature prediction sequence of the main area of ​​the grain pile are fused to obtain the global grain pile temperature prediction result.

2. The method for predicting grain pile temperature based on hierarchical modeling and hybrid machine learning according to claim 1, characterized in that, The temperature time series data in step S1 includes meteorological elements, temperature and humidity data of the grain warehouse and its internal and external environment, and the coordinates of sensors inside the grain pile and their corresponding temperature values; among them, non-numerical data is converted into numerical input that can be used for model training by label encoding.

3. The method for predicting grain pile temperature based on hierarchical modeling and hybrid machine learning according to claim 2, characterized in that, The preprocessing in step S1 includes three types of operations: denoising, missing value imputation, and outlier removal. Specifically: Time series denoising: Smoothing data fluctuations by using timestamps as keys for time series data; Missing value handling: For non-continuous data segments, linear interpolation or Lagrange interpolation is used to fill in missing values ​​based on time series characteristics; Outlier detection and cleaning: Outliers are detected and removed or corrected using Z-score or IQR methods.

4. The method for predicting grain pile temperature based on hierarchical modeling and hybrid machine learning according to claim 1, characterized in that, The process of obtaining the predicted temperature sequence of the grain pile surface in step S2 includes: A1: Regarding the time series of surface temperature of grain piles The original temperature sequence was decomposed into using the VMD algorithm. Modal components (IMFs), where each mode has narrowband characteristics and is concentrated at a certain center frequency. And satisfy the property that the sequence can be reconstructed; A2: Using the SampEn evaluation metric, the decomposition results are evaluated for each set of VMD decomposition parameters. Calculate the sample entropy value for each modality. : ; Where SampEn is the function for calculating sample entropy; A3: For components-based Calculate the standard deviation of sample entropy under the VMD decomposition parameters for this set. Compared with the average , , Key metrics for measuring the effectiveness of VMD decomposition, evaluation metrics Defined as: ; Among them, the average sample entropy for: Sample entropy standard deviation : ; A4: The SVR method is used to perform time series forecasting on each IMF derived from VMD decomposition; considering the characteristic differences of different IMF sequences, Bayesian optimization is used to automatically select the optimal parameter combination for each SVR model, including regularization parameters. With error tolerance parameter The selected kernel functions are all radial basis functions to improve the model's fitting ability and generalization performance when dealing with nonlinear sequence features. A5: Based on the data reconfigurability granted by the constraints of VMD decomposition, the predicted sequence of surface temperature of grain piles is obtained through reconstruction.

5. The method for predicting grain pile temperature based on hierarchical modeling and hybrid machine learning according to claim 4, characterized in that, The VMD decomposition used in step A1 has the characteristics of time-series data decomposition and theoretical reconstruction, and its mathematical expression is: ; ; in, For the first One mode; The corresponding center frequency; This is the time derivative, used to measure modal bandwidth; It is the Dirac function; for Norm; The Hilbert transform of the corresponding mode is the analytic signal; the objective function minimizes the bandwidth of each mode function after Hilbert transform and exponential modulation; the constraints ensure that the sum of all mode functions equals the original signal.

6. The method for predicting grain pile temperature based on hierarchical modeling and hybrid machine learning according to claim 5, characterized in that, The temperature prediction result in step A5 for: ; in, These are the forecasts from various IMFs.

7. The method for predicting grain pile temperature based on hierarchical modeling and hybrid machine learning according to claim 6, characterized in that, The process of obtaining the temperature prediction sequence of the main area of ​​the grain pile in step S2 includes: B1: Unify the coordinate positions of temperature sensors in different types of grain silos into a normalized cylindrical coordinate system: ;; B2: Constructing a WSLP feature system through temperature distribution analysis and environmental impact factor analysis: By analyzing the temperature distribution at different levels, the spatial heterogeneity of temperature inside the grain warehouse and the mode of heat conduction are obtained; By calculating the Pearson correlation coefficients between different environmental factors and grain pile temperature, the quantitative driving relationship of environmental factors on grain pile temperature is obtained. By analyzing the influence relationship between different temperature points on the same vertical line within the same temperature layer and between different temperature layers, the spatial correlation between local and wide-area temperatures within the grain pile is obtained. B3: Based on the Transformer model, the iTransformer model is improved. The iTransformer model takes the complete time series as a single token input and achieves synchronous prediction of multiple time series by calculating the attention coefficient between different tokens. B4: Using LSTM and iTransformer as parallel models, a model selection strategy is constructed based on mean absolute error (MAE): ; ; Model selection (selecting the model with the smaller MAE value as the dominant model) or fusion (weighting the predicted values ​​based on the MAE value) is performed based on the MAE values ​​of the two models in the test set.

8. The method for predicting grain pile temperature based on hierarchical modeling and hybrid machine learning according to claim 7, characterized in that, Step B2 specifically includes: Location inside the grain warehouse At the moment Temperature value for: ; in, For the effect of body temperature, For surface temperature influence, This is a factor related to the temperature of the linear layer. This refers to the effect of point layer temperature. in, , For environmental feature vectors, Represents the mapping relationship of environmental impact; in, , For point Belonging to the two-dimensional plane, For plane Average temperature These are the original sensor measurements. This is the in-plane temperature gradient vector. For point Offset vector relative to the center of the plane; in, , The thermal conductivity coefficient, For point The path it is located on Temperature at a reference point above the path. Temperature at a reference point below the path; in, In the formula, This is the local influence coefficient. For point The set of neighborhood temperature measurement points, For the neighborhood The weight, The average temperature of the area; The corresponding feature system is The features included correspond to the volume layer, surface layer, line layer, and point layer of the WSLP spatial relationship model, respectively. in, , For time indexing, As meteorological element type, The number of days is the lag. Number the feature groups. For the indexing of sensors inside and outside the warehouse, It is a difference type; in, , The directions of the two-dimensional plane coordinate axes; in, , The directions of the spatial coordinate axes; in, , This represents the coordinate offset of the nearest neighboring region.

9. The method for predicting grain pile temperature based on hierarchical modeling and hybrid machine learning according to claim 8, characterized in that, The selection strategy for the dominant model in step B4 is defined as follows: ; ; in, The dominant prediction model; The fusion strategy is defined as follows: ; ; in, To integrate prediction models, These are the weights for model fusion.

10. A grain pile temperature prediction system based on hierarchical modeling and hybrid machine learning, characterized in that, For implementing the method of claim 1, the system comprises: The raw temperature data acquisition module is used to acquire the time series of surface temperature and the main body temperature of the grain pile; The data preprocessing module is used to preprocess the collected temperature data; The surface temperature prediction module predicts the surface temperature of the grain pile based on the time series of the grain pile surface temperature. The main temperature prediction module predicts the temperature sequence of the main grain pile area, taking into account the temperature non-uniformity and spatial heterogeneity of the main grain pile area. The timestamp alignment module is used to synchronize and align the outputs of the prediction branches of the surface and main regions according to the time axis. Output fusion module: fuses the temperature prediction sequence of the surface of the grain pile with the temperature prediction sequence of the main area of ​​the grain pile to obtain the global grain pile temperature prediction result.