Granary temperature field interpolation method, device and equipment and storage medium
By obtaining the spatial position and sensor temperature in the granary, combining it with external features, and using machine learning and deep learning models to generate a continuous temperature field in the granary, the problem of insufficient sensor network coverage is solved and the accuracy of temperature monitoring is improved.
Patent Information
- Application Number
- CN202510741828.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-09-12
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Due to the insufficient coverage of the sensor network, there are monitoring blind spots in the granary, and a continuous temperature field cannot be established.
By obtaining the spatial position and sensor temperature of the first area in the granary, as well as the external characteristics of the granary, and using trained temperature interpolation models such as random forest algorithm, support vector machine, convolutional neural network and multilayer perceptron, the temperature of the second area in the granary is calculated to generate a continuous temperature field.
The generation of continuous temperature field in the granary is realized, and the accuracy of temperature interpolation is improved.
Smart Images

Figure CN120633410A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of grain temperature monitoring, and in particular to a method, device, equipment and storage medium for interpolating the temperature field of a grain silo. Background Art
[0002] As one of the indicators of food security, grain temperature data is of great significance for the analysis of grain storage conditions and the implementation of preventive measures such as ventilation and cooling.
[0003] In grain temperature monitoring technologies, a sensor network placed inside a granary is usually used to obtain the temperature of multiple points in the granary to construct a temperature field. However, due to practical reasons such as setup costs, the number of temperature sensors in the sensor network is limited, and the coverage of the sensor network is usually not enough to cover the entire granary, resulting in a "monitoring blind spot" and making it impossible to establish a continuous temperature field. Summary of the Invention
[0004] The main purpose of this application is to provide a granary temperature field interpolation method, device, equipment and storage medium, aiming to solve the technical problem of how to use a sensor network to establish a continuous temperature field in a granary.
[0005] To achieve the above objectives, this application proposes a granary temperature field interpolation method, including:
[0006] Obtaining the spatial location and sensor temperature of a first area within the granary, as well as the external features of the granary and the spatial location of a second area, wherein the first area is an area within the granary where the temperature sensor is installed;
[0007] The spatial position and sensor temperature of the first area, the external characteristics of the granary and the spatial position of the second area are used as inputs of the trained temperature interpolation model to calculate the temperature of the second area in the granary to generate a continuous temperature field, wherein the trained temperature interpolation model is obtained by training an initial temperature interpolation model based on historical data of the spatial position and sensor temperature of the first area in the granary and the external characteristics of the granary.
[0008] In one embodiment, the external characteristics include sensor average temperature, temperature inside the warehouse, humidity inside the warehouse, and temperature outside the warehouse.
[0009] In one embodiment, the temperature interpolation model is built based on a random forest algorithm or a support vector machine.
[0010] In one embodiment, the temperature interpolation model is built based on a convolutional neural network and multi-layer sensors.
[0011] In one embodiment, the temperature interpolation model is built based on a multi-layer perceptron and an attention mechanism.
[0012] In one embodiment, obtaining the sensor temperature of the first area includes:
[0013] collecting the temperature of the first area using a temperature sensor to obtain a sensor temperature of the first area;
[0014] When the sensor temperature of the first area is higher than a preset upper temperature threshold or lower than a preset lower temperature threshold, the sensor temperature of the first area is replaced by an average temperature of sensors in areas on the same floor.
[0015] In one embodiment, a ten-fold cross validation strategy is adopted during the training process of the temperature interpolation model.
[0016] In addition, to achieve the above-mentioned purpose, the present application also proposes an interpolation device, comprising:
[0017] a data acquisition module configured to acquire the spatial location and sensor temperature of a first area within the granary, as well as external features of the granary and the spatial location of a second area, wherein the first area is an area within the granary where the temperature sensor is located;
[0018] An interpolation module is used to use the spatial position and sensor temperature of the first area, the external characteristics of the granary, and the spatial position of the second area as inputs of a trained temperature interpolation model to calculate the temperature of the second area in the granary to generate a continuous temperature field, wherein the trained temperature interpolation model is obtained by training an initial temperature interpolation model based on historical data of the spatial position and sensor temperature of the first area in the granary, and the external characteristics of the granary.
[0019] In addition, to achieve the above-mentioned purpose, the present application also proposes an interpolation device, comprising: a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the computer program is configured to implement the steps of the above-mentioned granary temperature field interpolation method.
[0020] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium. A computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the granary temperature field interpolation method as described above are implemented.
[0021] In addition, to achieve the above-mentioned purpose, the present application also proposes a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the steps of the above-mentioned granary temperature field interpolation method.
[0022] One or more technical solutions proposed in this application have at least the following technical effects:
[0023] A granary temperature field interpolation method is proposed. By collecting the spatial position and sensor temperature of the first area in the granary and the external characteristics of the granary, the spatial position and sensor temperature of the first area and the external characteristics of the granary are used as fusion features to input the trained temperature interpolation model, and the temperature of the second area in the granary is calculated. This method realizes the generation of a continuous temperature field of the granary and has the advantage of high temperature interpolation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0026] Figure 1 This is a flow chart of the first embodiment of the granary temperature field interpolation method provided by this application;
[0027] Figure 2 A schematic diagram of the three-dimensional structure of the sensor network in the experimental example provided in this application;
[0028] Figure 3 Schematic diagram of the planar structure of the sensor network in the experimental example provided in this application
[0029] Figure 4 This is a flow chart of the second embodiment of the granary temperature field interpolation method provided by this application;
[0030] Figure 5 This is a schematic diagram of the principle of the temperature interpolation model in the second embodiment of the granary temperature field interpolation method provided by this application;
[0031] Figure 6 A heat map of the Pearson correlation coefficient in the first embodiment of the granary temperature field interpolation method provided in this application;
[0032] Figure 7 The MSE and MAE of the fusion model in Experimental Example 1 provided in this application;
[0033] Figure 8 The MSE improvement rate of the CAMNN fusion model and the non-fusion model compared with the corresponding models in the experimental example 1 provided in this application;
[0034] Figure 9 The MAE improvement rate of the CAMNN fusion model and the non-fusion model compared with the corresponding models in the experimental example 1 provided in this application;
[0035] Figure 10 The MSE and MAE of the CAMNN fusion model and the non-fusion model in experimental example 4 provided in this application under different batch sizes;
[0036] Figure 11 The MSE and MAE of the CAMNN fusion model and the non-fusion model under different numbers of hidden channels in Experimental Example 5 provided in this application;
[0037] Figure 12 The MSE and MAE of the CAMNN fusion model and the non-fusion model under different numbers of hidden dimensions in Experimental Example 6 provided in this application;
[0038] Figure 13 This is the actual temperature field of the No. 25 granary in Hanzhong in the second experimental example provided in this application;
[0039] Figure 14 The temperature field obtained by temperature interpolation using the temperature interpolation model in Experimental Example 2 provided in this application;
[0040] Figure 15 The actual temperature field of Zhongning No. 43 granary on a single day in Experimental Example 3 provided in this application and the temperature field obtained by temperature interpolation using the CAMNN fusion model;
[0041] Figure 16 This is a schematic diagram of the module structure of the interpolation device provided in this application.
[0042] The realization of the objectives, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0043] It should be understood that the specific embodiments described herein are merely for explaining the technical solutions of the present application and are not intended to limit the present application. In order to better understand the technical solutions of the present application, the following detailed description will be given in conjunction with the accompanying drawings and specific implementation methods.
[0044] In this embodiment, for ease of description, the following is detailed description with the interpolation device as the execution subject.
[0045] An embodiment of the present application provides a method for interpolating the temperature field of a granary.
[0046] In the first embodiment of the granary temperature field interpolation method of this application, refer to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the granary temperature field interpolation method of the present application. The granary temperature field interpolation method may include steps S101 to S102:
[0047] Step S101, obtaining the spatial position and sensor temperature of a first area in the granary, as well as the external features of the granary and the spatial position of a second area, wherein the first area is an area in the granary where a temperature sensor is installed.
[0048] It should be noted that a sensor network consisting of several temperature sensors is arranged within the granary. These temperature sensors are respectively arranged in different first areas and are used to collect temperature values in the corresponding first areas. The external characteristics of the granary may include one or more of the following: sensor average temperature, internal temperature, external temperature, internal humidity, and external temperature. The sensor average temperature is the average of the temperatures collected by all sensors in the sensor network. The internal temperature is the air temperature within the granary. The internal temperature can be collected by a temperature sensor located in the center of the granary, or by collecting the temperature from multiple temperature sensors distributed at different locations within the granary and calculating the average value. The external temperature is the air temperature outside the granary. Similarly, the external temperature can be collected by one or more temperature sensors located outside the granary. The internal humidity is the air humidity within the granary. The internal humidity can be collected by a humidity sensor located in the center of the granary, or by collecting the temperature from multiple humidity sensors distributed at different locations within the granary and calculating the average value. The external humidity is the air humidity outside the granary. Similarly, the external humidity can be collected by one or more humidity sensors located outside the granary.
[0049] In step S102, the spatial position and sensor temperature of the first area, the external characteristics of the granary, and the spatial position of the second area are used as inputs of the trained temperature interpolation model to calculate the temperature of the second area in the granary to generate a continuous temperature field, wherein the trained temperature interpolation model is obtained by training an initial temperature interpolation model based on historical data of the spatial position and sensor temperature of the first area in the granary and the external characteristics of the granary.
[0050] It should also be noted that the temperature interpolation model can be a machine learning model or a deep learning model, such as machine learning models such as RF (random forest regression model) and SVM (support vector machine), and deep learning models such as CAMNN, CMNN and MANN.
[0051] RF: Random forest is an ensemble learning method designed to improve model accuracy and robustness by integrating multiple decision trees. RF interpolates the temperature of the second region by averaging the predictions of all its trees. RF demonstrates effective processing of large amounts of sensor data and identifies the complex influences of grain storage ecosystems and external conditions on grain temperature. Random forest regression consists of an ensemble of decision trees constructed using bootstrap sampling and random feature selection. Each decision tree is trained on a randomly selected subset of the data; only a random subset of features is considered in the teach branch node. This randomness promotes generalization and reduces model variance, thus preventing overfitting.
[0052] SVM: Support vector machines are supervised learning algorithms designed to find the optimal hyperplane in data for classification or regression. They are capable of handling the nonlinear temperature distribution within the grain silo. In regression tasks, SVMs incorporate an insensitive loss function to find a function that accommodates most data points within the range of ε while maximizing the margin and minimizing the loss. To address nonlinearities, SVMs use a kernel method that allows for mapping data in a high-dimensional space, thereby finding more complex decision boundaries.
[0053] MLP: A multilayer perceptron (MLP) is a neural network characterized by a layered structure. It consists of an input layer, an output layer, and multiple hidden layers. Neurons in each layer are connected by weights, and neurons in the output and hidden layers have thresholds that adjust their outputs. The learning process of an MLP involves adjusting the connection weights between neurons and their associated thresholds based on training data.
[0054] CMNN: It is built by CNN (convolutional neural network) and MLP (multi-layer perceptron);
[0055] MANN: It is built by attention module and MLP.
[0056] Convolutional Neural Networks (CNNs) are a type of feedforward neural network with a deep structure and are a representative algorithm for deep learning. They consist of convolutional layers, pooling layers, and fully connected layers. Convolutional layers are used for feature extraction and utilize convolution kernels for local perception. Pooling layers are designed to reduce feature dimensionality, compress the number of parameters, prevent overfitting, and improve model stability. Fully connected layers are used to convert pooled units into one-dimensional vectors for further data processing. Convolutional neural networks rely on convolutional and pooling layers to automatically extract important information and obtain feature vectors, aiming to reduce the complexity of feature extraction and data reconstruction and improve the quality of data features. CNNs are characterized by automatically extracting valuable features from raw data through convolution operations, and are superior to traditional fully connected neural networks in processing data exhibiting local structure or grid-like patterns.
[0057] In a possible implementation manner, the external characteristics of the granary include sensor average temperature, temperature inside the granary, temperature outside the granary, humidity inside the granary, and temperature outside the granary.
[0058] In a feasible implementation manner, the external characteristics of the granary include the average temperature of the sensor, the temperature inside the granary, the humidity inside the granary, and the temperature outside the granary.
[0059] It should be noted that the greater the number of external features, the greater the complexity of the temperature interpolation model, and the potential for excessive noise and overfitting. The granary temperature field interpolation method in this embodiment uses sensor average temperature, internal temperature, internal humidity, and external temperature as external features. Compared to using external humidity as a single external feature, this reduces the complexity of the temperature interpolation model, reduces noise, and further improves temperature interpolation accuracy.
[0060] In a feasible implementation, the interpolation method further includes:
[0061] Calculate the Pearson correlation coefficient between sensor temperature and external characteristics;
[0062] According to the Pearson correlation coefficient between the sensor temperature and the external features, the external features are screened to obtain the target external features.
[0063] In a specific embodiment, the external characteristics of the granary include sensor average temperature (Whole BinAverage), bin temperature (Bin Temperature), bin humidity (Bin Humidity), external temperature (External Temperature), and external humidity (External Humidity). The Pearson correlation coefficient between two parameters of sensor temperature (Sensor BinTemperature), sensor average temperature, bin temperature, bin humidity, external temperature, and external humidity is calculated. The Pearson correlation coefficient is used to characterize the strength and direction of the linear correlation between any two parameters. The coefficient r ranges from [-1 to 1], where r=1 indicates a perfect positive correlation, r=-1 indicates a perfect negative correlation, and r=0 indicates no linear correlation. The mathematical expression of the Pearson correlation coefficient is:
[0064]
[0065] f′ j =[f 11 , f 12 ,...,f 1n , f 21 , f 22 ,...,f 2n ,...,f m1 , f m2 ,...,f mn ];
[0066] Where f is the external characteristic variable; m is the number of days for data collection; n is the number of temperature sensors in the granary, and f′ ji Indicates i th For variable f′ j The average value of the observations is expressed as T i Indicates i th The average value of the observation of temperature T is expressed as Figure 6This is a heat map of the Pearson correlation coefficient for a specific scenario. The figure shows significant positive correlations between three pairs of features: sensor temperature (Sensor Bin Temperature) and bin temperature (Bin Temperature), sensor temperature (Sensor Bin Temperature) and external humidity (External Humidity), and sensor temperature (Sensor Bin Temperature) and sensor average temperature (Whole Bin Average). There is also a slight positive correlation between sensor temperature (Sensor Bin Temperature) and external humidity (External Humidity). First, an increase in external temperature causes a corresponding increase in sensor temperature through wall radiation, so theoretically, the external and sensor temperatures are positively correlated. Second, high external humidity is often accompanied by higher external temperatures, especially in summer, similar to the positive correlation between sensor temperature and external temperature. Furthermore, because sensor temperature and external temperature have a slight negative correlation, using external humidity as an external feature would make the temperature interpolation model overly complex and generate unnecessary noise, leading to the risk of overfitting. In this specific embodiment, the target external characteristics are the sensor average temperature, the temperature inside the warehouse, the temperature outside the warehouse, and the humidity inside the warehouse.
[0067] In a feasible implementation, obtaining the sensor temperature of the first area includes:
[0068] collecting the temperature of the first area using a temperature sensor to obtain a sensor temperature of the first area;
[0069] When the sensor temperature of the first area is higher than a preset upper temperature threshold or lower than a preset lower temperature threshold, the sensor temperature of the first area is replaced by an average temperature of sensors in areas on the same floor.
[0070] It should be noted that due to wear and / or disconnection of the temperature sensor, anomalies and zero values may exist in the data. When the sensor temperature in the first area is higher than the upper temperature threshold or lower than the middle temperature threshold, the sensor temperature in the first area is replaced with the average temperature of the sensors in the same layer area to complete data cleaning and improve the subsequent temperature interpolation accuracy.
[0071] In a specific embodiment, the upper temperature threshold is configured to 45°C, and the middle temperature threshold is configured to -20 degrees Celsius. The upper temperature threshold and the middle temperature threshold can be set according to the specific situation of the granary, for example, according to the geographical environment of the granary.
[0072] For example, the sensor network of the granary has four layers, and the number of temperature sensors on each layer is 28. When the temperature collected by a temperature sensor on the bottom layer is greater than 45°C or less than -20°C, the area corresponding to the temperature sensor is set to the average value of the data collected by all temperature sensors on the bottom layer.
[0073] In a feasible implementation, the interpolation method further includes:
[0074] A ten-fold cross-validation strategy was used in the training process of the temperature interpolation model.
[0075] It should be noted that the historical data of the sensor network and external features are used to establish a data set, and the data set is split into 10 equal parts, 9 of which are used as training sets, which are used for model training, parameter fitting and determining the weight coefficients of the spatial neural network, and the other part is used as a validation set, which is used to evaluate the generalization of the model.
[0076] In a feasible implementation, the temperature interpolation model includes a data acquisition module, a CNN, and an MLP, wherein:
[0077] The data acquisition module is used to establish a correlation mapping between the spatial position and temperature of the first area in the granary and the external characteristics of the granary based on the spatial position and sensor temperature of the first area in the granary and the external characteristics of the granary, and to construct a spatiotemporal feature matrix.
[0078] CNN is used to perform convolution operations on the spatiotemporal feature matrix, capture the local spatial characteristics of the temperature field by sliding the convolution kernel, and output the local spatial feature map.
[0079] MLP is used to take the local spatial feature map as input, and continuously output the temperature of the second region through multiple layers of nonlinear transformation to generate a continuous temperature field.
[0080] The granary temperature field interpolation method in this embodiment collects the spatial position and sensor temperature of the first area in the granary and the external characteristics of the granary, uses the spatial position and sensor temperature of the first area and the external characteristics of the granary as fusion features to input the trained temperature interpolation model, and calculates the temperature of the second area in the granary, thereby realizing the generation of a continuous temperature field of the granary and having the advantage of high temperature interpolation accuracy.
[0081] In the second embodiment of the granary temperature field interpolation method of this application, refer to Figure 4 , Figure 4 This is a flow chart of a second embodiment of the granary temperature field interpolation method of the present application. The granary temperature field interpolation method may include steps S201 to S202:
[0082] Step S201: Acquire the spatial position and sensor temperature of a first area in the granary, and the spatial position of a second area, wherein the first area is an area in the granary where a temperature sensor is installed.
[0083] Step S202: Using the spatial position and sensor temperature of the first area, and the spatial position of the second area as inputs of the trained temperature interpolation model, the temperature of the second area in the granary is calculated to generate a continuous temperature field, wherein the trained temperature interpolation model is obtained by training an initial temperature interpolation model based on historical data of the spatial position and sensor temperature of the first area in the granary.
[0084] It should be noted that if Figure 5 As shown, the temperature interpolation model in this embodiment includes a data collection module (DataCollection), a convolutional neural network module (CNN Block), an attention module (Attention Block) and a multi-layer perceptron (MLP Block), wherein:
[0085] The data acquisition module is used to construct a spatiotemporal feature matrix according to the spatial position of the first area and the sensor temperature.
[0086] In a specific embodiment, the input of the data acquisition module is x, y, z, f1, f2, ..., f n , where x, y, z represent the coordinates of the first region, f1, f2...f n They represent the external characteristics of the granary, for example, f1 represents the temperature inside the granary, f2 represents the temperature outside the granary, the coordinate configuration of the first region is (row index, column index, vertical layer index), for example (2, 3, 4) represents the fourth temperature measurement point in the second row and third column of the granary, and the correlation mapping between the spatial position and temperature of the first region and the external characteristics of the granary is expressed as T = f(x, y, z, f1, f2, ..., f n ). The output of the data acquisition module is X, X∈R b×c×s , where b, c, and s represent the number of data samples captured in one training session (batch size), the number of features (channels), and the length of the sequence data (sequence length), respectively. Because the data comes from various sensors at a single time point, the sequence length is set to 1.
[0087] Convolutional neural network, which is used to perform convolution operations on the spatiotemporal feature matrix, capture the local spatial characteristics of the temperature field by sliding the convolution kernel, and output the local spatial feature map.
[0088] It's important to note that the local temperature data collected by the sensor network resembles a grid-like pattern with significant spatial variation, making it suitable for CNN-based feature extraction. Leveraging its parameter sharing and local connections, CNNs can effectively extract the internal features of the raw data. Furthermore, the convolutional kernels used in convolutional neural networks for feature detection reduce the number of weights and effectively prevent overfitting. This enables convolutional neural networks to handle features such as sudden temperature spikes that can occur in multiple areas within the granary's temperature field.
[0089] It should also be noted that CNNs, through convolution operations, can capture temperature correlations in local areas to create local spatial feature maps, which help effectively identify spatial distribution patterns with significant statistical characteristics or abnormalities in grain temperature data. Stacking and combining multiple local spatial feature maps enables complex feature representation, which is crucial for the accuracy of subsequent temperature interpolation. Furthermore, the full connectivity of traditional neural networks limits the dependence of their output units on every input unit, which affects the identification of local temperature fields in granaries. This is because in a temperature field, each region can exhibit different characteristics independent of other regions.
[0090] In a specific embodiment, the mathematical expression of the convolution operation is:
[0091]
[0092] Among them, O conv is the output of the convolution operation, X is the input matrix, i is the batch index, j is the spatial position in the sequence, Wconv is the weight of the convolution layer, bconv is the bias of the convolution layer, and KS is the number of convolution kernel sizes;
[0093] The size of each output feature map of each convolutional layer of oMapN and the number of trainable parameters of each convolutional layer satisfy the following relationship:
[0094]
[0095] CParams=(iMap×CWindow+1)×oMap;
[0096] Among them, iMapN represents the size of each local spatial feature map, CWindow is the convolution kernel size, Cinterval is the stride of the convolution kernel of the previous layer, oMap is the count of local spatial feature maps in each convolution layer, and CParams is the convolution parameter; iMap represents the number of input feature maps, and a value of 1 indicates a bias shared in a single output map.
[0097] In the convolutional layer, the output value of the kc-th neuron in the output feature map n is To represent the output value of the h-th neuron in the input feature map m, the following equation is satisfied:
[0098]
[0099] Among them, f cov is the activation function, w 1(h)n(k) is the weight associated with the hth neuron in the input feature map m and the kth neuron in the output feature map n.
[0100] To facilitate further calculation and processing, the redundant dimensions are eliminated by squeezing, and the dimension of the data is changed from BatchSize×Channels×1 to BatchSize×Channels, resulting in:
[0101] O squeezed [i, j] = O conv [i, j, 1];
[0102] The first value in the third dimension is selected where redundancy is observed, and the output of the given convolution BatchSize×hidden_channels×1yields. In addition, there may be potential nonlinear relationships between sensor temperatures, as the response of some sensors may depend on the specific thresholds of other sensors. With this nonlinear property, the ReLU activation function can enable CNN to capture and learn these nonlinear relationships, where the ReLU activation function is used as follows:
[0103] O relu [i, j] = ReLU( squeezed [i, j]);
[0104] ReLU(x)=max(0,x).
[0105] The attention module is used to weight and distinguish the critical temperature area and the sensitive temperature area in the local spatial feature map, and output the weighted local spatial feature map.
[0106] It's important to note that the attention mechanism mimics the way the human brain allocates attentional resources, focusing on areas requiring high attention while at times reducing or even ignoring other areas. Unlike traditional models that treat all input information equally, neural network models equipped with an attention mechanism assign weights to different inputs, allowing them to focus on inputs that have a greater impact on the output. The attention mechanism operates through three specific steps: weight calculation, weight normalization, and weighted summation. Initially, the attention mechanism assigns an initial attention score to each element in the input sequence, indicating its importance to the output of the model at that layer. It then calculates an attention score by considering the content of each element and its relationship to other elements. Finally, each calculated score is normalized using a softmax function, with the total weight of all elements being 1, ensuring that the output is a weighted average of the inputs. The normalized weights (i.e., attention weights) represent the varying degrees of attention the model pays to each input element. Based on these weights, the model performs a weighted summation on the input sequence. This summation multiplies the product of each input element by its corresponding attention weight to produce a weighted local feature map. This allows the model to focus on elements assigned higher weights, prioritizing more critical information.
[0107] Critical temperature areas include local hot spots and local cold spots, and sensitive temperature areas are temperature fluctuation points. The attention module can guide the temperature interpolation model to areas where the temperature suddenly rises or falls, thereby ensuring accurate interpolation results.
[0108] It should be noted that during the interpolation process, the temperature values of local hot spots / cold spots need to be given higher weights to ensure that the interpolation results accurately reflect their high / low temperature characteristics. The convolution kernel performs a weighted summation of the local area during the sliding process to extract local features. For example, a larger convolution kernel weight is used for local hot spots, while a smaller weight is used for non-local hot spots.
[0109] It should also be noted that temperature fluctuation refers to the change in temperature inside the grain pile over time or space, usually manifested as a rise or fall in temperature. The causes of temperature fluctuation include:
[0110] External environmental changes: Diurnal or seasonal changes in outside air temperature can affect the temperature inside the granary.
[0111] Grain respiration: Grain will respire during storage, generating heat and causing the temperature to rise.
[0112] Uneven ventilation: Improper design or operation of the silo ventilation system may lead to uneven temperature distribution inside the grain pile.
[0113] It is worth noting that temperature fluctuations may accelerate the respiration of grain, leading to moisture evaporation, mildew or insect pests, thus affecting the storage quality of grain.
[0114] Hot spots are areas in a grain pile where the temperature is significantly higher than the surrounding area. Causes of hot spots include:
[0115] Grain respiration: In certain areas of the grain pile, grain respiration is stronger, generating more heat.
[0116] Microbial activity: Mold or other microorganisms multiply in a localized area, generating heat.
[0117] Poor ventilation: The ventilation system cannot effectively dissipate heat, causing heat to accumulate in local areas.
[0118] Uneven moisture content in grain: Areas of high moisture are more prone to respiration and microbial activity, forming hotspots.
[0119] It is worth noting that local hotspots may cause food mold, increased insect pests, and even spontaneous combustion, posing a serious threat to food security.
[0120] A local cold spot is a phenomenon where the temperature of a certain area in a grain pile is significantly lower than the surrounding area. Causes of local cold spots include:
[0121] Intrusion of external cold air: The granary is not tightly sealed or the ventilation system introduces cold air, causing the temperature in the local area to drop.
[0122] Uneven grain pile density: Areas with higher grain pile density dissipate heat more slowly, potentially forming relatively low-temperature areas.
[0123] Water evaporation: Water evaporation in a local area takes away heat, causing the temperature to drop.
[0124] It is worth noting that local cold spots may cause condensation on grain and increase the risk of mold, especially when there are large temperature fluctuations.
[0125] In one feasible implementation, the attention module is specifically configured to:
[0126] The local spatial feature map is transformed using a mapping function to calculate the original attention score of each element in the local spatial feature map;
[0127] An activation function is used to enhance the nonlinear expression of the local spatial features, and a final attention score of each element in the local spatial feature map is calculated;
[0128] Use the normalization function to normalize the final attention score and calculate the normalized attention weight;
[0129] A weighted local feature map is calculated based on the normalized attention weight and the local spatial feature map.
[0130] In a feasible implementation, the activation function is a tanh function, and the normalization function is a softmax function.
[0131] In a specific embodiment, a mapping function f is used to transform Orelu to calculate the original attention score of each element in the local spatial feature map, and a tanh function is used to add nonlinearity to the transformed Orelu to obtain the final attention score s(q, k). The expression of the attention score s(q, k) is:
[0132] s(q, k) = A = tanh(f(O relu ))=tanh(O relu W a +b a );
[0133] Where f represents the mapping function, b a is the bias vector, W a is the weight matrix, d a To represent the hyperparameters of the attention weight dimension, the weight matrix is used for linear transformation, and the bias vector is used to translate the result after the linear transformation.
[0134] In order to amplify the difference in weights and ensure that the sum of the weights is 1, the softmax function is applied to normalize the attention score s(q, k), and the mathematical expression is:
[0135]
[0136] By calculating the weights, the attention mechanism identifies the input parts that the model needs to pay special attention to. By multiplying the normalized attention weights by the local spatial feature map output by the convolutional neural network, a weighted local spatial feature map can be obtained:
[0137] O att =O relu ⊙s(q, k)′;
[0138] Here, ⊙ represents the Hadamard product (element-wise multiplication).
[0139] In one possible implementation, to reduce the risk of overfitting associated with a large increase in input dimensionality, the weighted elements are combined into a comprehensive representation:
[0140]
[0141] Among them, O int is weighted feature integration, is the weighted output of the i-th feature.
[0142] After applying the calculated weights to the corresponding elements, a weighted summation is performed to focus more attention on elements with higher weights. In this module, the attention score is calculated using a linear layer. By using a linear layer to calculate the weights of each element, we can directly access elements that are more closely related to temperature interpolation, reducing the number of parameters and the risk of overfitting.
[0143] A multilayer perceptron is used to perform deep feature fusion on the weighted local spatial feature map, and continuously output the temperature of the second area through multi-layer nonlinear transformation to generate a continuous temperature field.
[0144] It should be noted that in the temperature interpolation model, MLP acts as a key neural network structure for processing the local spatial feature map output by CNN and weighted by the attention module, integrating the weighted local spatial feature map into a global description, and then completing the temperature interpolation of the second area in the temperature field.
[0145] In one feasible embodiment, the multilayer perceptron includes:
[0146] The input layer is used to receive the weighted local spatial features sent by the attention module;
[0147] Multiple hidden layers are used to receive the weighted local spatial features sent by the output layer and perform multiple nonlinear changes on the weighted local spatial features.
[0148] The output layer is used to interpolate the temperature of the second region of the temperature field.
[0149] It should be noted that the input layer of the MLP receives a weighted local spatial feature map from the attention layer. This map contains the sensor temperature of the first region, external features, and elements highlighted by the attention mechanism. In the hidden layer, the MLP identifies the intricate patterns and nonlinear relationships within the temperature field and explores the optimal combination of these essential features to achieve accurate interpolation. Neurons in the output layer perform a weighted summation nonlinear transformation and map the weighted features to the target output, producing the interpolated result.
[0150] Among them, the mathematical expression of the weighted local spatial features sent by the attention module received in the input layer is:
[0151] I mlp =O int ;
[0152] Each neuron in the hidden layer calculates the sum of the weighted input and performs a nonlinear transformation through the activation function. Let L be the number of hidden layers, l th The mathematical expression of the hidden layer is:
[0153]
[0154] in, l th The input of the hidden layer, the first layer is The other layers are and Respectively represent l th The weights and biases of the hidden layer, σ is the ReLU activation function, and the mathematical expression of the output layer is:
[0155] I mlp =H L W o +b o ;
[0156] Among them, W o and b o denote the weight and bias of the output layer respectively.
[0157] In a feasible implementation, during the temperature interpolation model training process, the number of data samples used for forward and backward propagation in each iteration is 20.
[0158] It should be noted that in the training process of deep learning and machine learning, batch size refers to the number of data samples used for forward and backward propagation in each iteration. The appropriate batch size plays a crucial role not only in determining the convergence speed and stability of the model, but also in influencing the model's generalization and the efficient use of computing resources.
[0159] In this embodiment, during the training of the temperature interpolation model, 20 data samples are used for forward and backward propagation in each iteration, which improves the convergence speed and stability of the temperature interpolation model and thus improves the interpolation accuracy.
[0160] In a feasible implementation, the number of hidden channels of the convolutional neural network is 16.
[0161] It should be noted that the hidden channels in a convolutional neural network represent the number of convolution kernels used to extract spatial features from the input data.
[0162] In this embodiment, the number of hidden channels of the convolutional neural network is set to 16, so that the temperature interpolation model can capture the largest number of spatial features to improve the interpolation accuracy and has the lowest overfitting risk.
[0163] In one possible implementation, the multilayer perceptron has a hidden dimension of 64.
[0164] It should be noted that the hidden dimension is used to define the number of neurons in the hidden layer, which determines the number and complexity of features that can be learned and extracted in each layer. In theory, the more neurons in the hidden layer, the stronger the feature learning ability. However, due to the increase in model complexity, the risk of overfitting may increase, resulting in reduced interpolation accuracy.
[0165] In this embodiment, the hidden dimension of the multilayer perceptron is set to 64, which balances the feature learning ability, model complexity, overfitting risk and computational efficiency, and improves the interpolation accuracy.
[0166] The granary temperature monitoring method of this embodiment realizes temperature interpolation of the second area in the granary based on the spatial position and sensor temperature of the first area and the spatial position of the second area based on a temperature interpolation model constructed by a data acquisition module, a convolutional neural network, an attention module and a multi-layer perceptron, and has the advantage of high precision.
[0167] Based on the first and second embodiments of the granary temperature field interpolation method of the present application, in the third embodiment of the granary temperature field interpolation method of the present application, the same or similar contents as those in the above embodiments can be referred to above and will not be repeated hereafter. On this basis, the temperature interpolation model can include a data acquisition module, a convolutional neural network, and a multilayer perceptron.
[0168] The granary temperature field interpolation method in this embodiment collects the spatial position and sensor temperature of the first area in the granary and the external characteristics of the granary, and uses the spatial position and sensor temperature of the first area and the external characteristics of the granary as fusion features to input the trained temperature interpolation model. Based on the temperature interpolation model constructed by the data acquisition module, the convolutional neural network, the attention module and the multi-layer perceptron, the temperature interpolation of the second area in the granary is realized according to the spatial position and sensor temperature of the first area and the external characteristics of the granary, as well as the spatial position of the second area, thereby further improving the temperature interpolation accuracy.
[0169] Experimental example
[0170] To build the deep neural network model, all experiments were conducted using Keras and PyTorch. Model training and fitting were performed on a workstation equipped with an NVIDIA GeForce RTX3080 and an Intel(R) Xeon(R) Gold 6253CL CPU @ 3.10GHz. PyCharm was used as the development tool. Python 3.5 was used as the programming language. PyTorch was used as the neural network learning framework. During model training, the Adam function was used to optimize the neural network parameters, with an initial learning rate set to 0.1. Mean squared error (MSE) was used as the loss function, with backpropagation used to update weights and biases. The batch size was 20, and the number of training epochs was 500. Keras, numpy, pandas, and matplotlib were used.
[0171] In this experimental example, the temperature interpolation model includes:
[0172] CAMNN, the model is built by a data acquisition module, a convolutional neural network, an attention module, and a multi-layer perceptron;
[0173] CMNN, a model built by convolutional neural networks and multi-layer perceptrons;
[0174] MANN, the model is built by attention module and MLP;
[0175] MLP, the model is built by multi-layer perceptron;
[0176] RF,the model is built with random forest algorithm.,In this experimental case, the maximum depth of trees and the number of trees in the,forest are set to 4 and 10 respectively;
[0177] SVM, this model is built based on support vector machine. In this experimental example, RBF is selected as the kernel function, and its control factor and ε (ε) are 1×10 -2 and 0.1.
[0178] In this experiment, the root mean square error (RMSE), mean absolute error (MAE) and R square (R 2 ) evaluates and compares the model and the temperature interpolation model (hereinafter referred to as CAMNN) in the above embodiment. The model is constructed by CNN, attention module and MLP. The formulas for the root mean square error (RMSE) and mean absolute error (MAE) are as follows:
[0179]
[0180] Where n represents the number of interpolation data points; is the interpolation value; t i is the actual value; is the average of the actual values. By minimizing RMSE and MAE and maximizing R 2 To demonstrate the performance of CAMNN. Both RMSE and MAE indicate model performance, with values ranging from 0 (indicating the best performance) to larger values.
[0181] Experimental data: Non-fused feature dataset and fused feature dataset of 135 representative dates of Hanzhong No. 25 granary. The non-fused features are the spatial position and sensor temperature of the first area in the granary. The fused features include the spatial position, sensor temperature and external features of the first area in the granary. In this experimental example, the external features include the average sensor temperature, the temperature inside the granary, the temperature outside the granary and the humidity inside the granary. The sensor network is as follows: Figure 2 and Figure 3 As shown, the sensor network consists of 112 sensors.
[0182] Experimental Example 1
[0183] The non-fusion feature datasets were used to train SVM, RF, MLP, MANN, CMNN, and CAMNN respectively to obtain the corresponding non-fusion models. The temperature interpolation was performed based on the validation set 1 using the corresponding non-fusion models.
[0184] The SVM, RF, MLP, MANN, CMNN and CAMNN are trained respectively using the training set 2 to obtain the corresponding fusion model; the temperature interpolation is performed based on the validation set 2 using the corresponding fusion model;
[0185] The MSE values of the fusion model and the non-fusion model are shown in Table 1:
[0186] Table 1
[0187] Support Vector Machine RF MLP MANN CMNN CAMNN Fusion Model 2.7134 2.7599 2.6706 1.5909 1.3613 1.0881 Non-fusion model 2.8724 3.1510 2.9357 2.5622 1.6564 1.3007
[0188] The MAE values of the fusion model and the non-fusion model are shown in Table 2:
[0189] Table 2
[0190] Support Vector Machine RF MLP MANN CMNN CAMNN Fusion Model 1.4667 1.3342 1.4504 1.1457 0.7714 0.5251 Non-fusion model 1.4532 1.3662 1.5839 1.2193 0.8783 0.7279
[0191] It should be noted that if the temperature interpolation model relies entirely on the input sensor temperature without considering external features (in-warehouse temperature, in-warehouse humidity, outside-warehouse temperature, and sensor average temperature), there may be a risk of overfitting the data. The incorporation of external features can enable the model to learn a wider range of distributions and patterns, thereby facilitating the interpolation of unknown data in the second region. In addition, it can also help solve potential problems caused by noise or outliers in the data, thereby improving the robustness of the model. As shown in Tables 1 and 2, the MSE and MAE values of the fusion model are smaller than those of the non-fusion model, indicating that using only sensor temperature as input data is not enough for the model to capture all information related to the target variable. Using fusion features to train the temperature interpolation model and perform temperature interpolation can improve the accuracy of temperature interpolation.
[0192] In addition, it should be noted that Figure 7 As shown, except for MLP, the MSE and MAE values of deep learning methods (i.e., MANN, CMNN, and CAMNN) are relatively lower than those of machine learning methods (i.e., SVM and RF), among which the proposed CAMNN shows the best performance with the lowest MSE and MAE values of 1.0881 and 0.5251, respectively.
[0193] like Figure 8 and Figure 9 As shown, among the fusion models, the MSE and MAE of CAMNN are 59.90% and 64.20% lower than those of SVM, 60.57% and 60.64% lower than those of RF, 59.26% and 63.80% lower than those of MLP, 31.60% and 54.17% lower than those of MANN, and 20.07% and 31.93% lower than those of CMNN. Deep learning methods have the ability to automatically learn complex features and process high-dimensional data with specially designed structures. Compared to shallow machine learning models, their significantly lower MSE and MAE values can translate into higher accuracy in complex and nonlinear temperature interpolation.
[0194] In the non-fusion models, the MSE and MAE of CAMNN are 1.3007 and 0.7279, which are 54.72% and 49.91% lower than SVM, 58.72% and 46.72% lower than RF, 55.69% and 54.04% lower than MLP, 49.24% and 40.30% lower than MANN, and 21.47% and 17.12% lower than CMNN.
[0195] In the fusion model, both CAMNN and CMNN demonstrated significant advantages over other models due to the CNN's outstanding ability to capture certain spatial continuities and patterns in the temperature field data. In the non-fusion model, the MSE and MAE of CAMNN and CMNN were relatively low, and the difference between them was relatively small compared to the fusion model. This illustrates the importance of the attention mechanism in promoting the model to focus on the most important input information, given the increased data diversity in the fusion model. In the fusion model, CAMNN effectively reduced the MSE and MAE of temperature interpolation.
[0196] In interpolating grain silo temperature fields, the three most important factors are spatial features, specific temperature features, and nonlinear relationships. The CAMNN (Camel-like Entity-Lock Neural Network) manages to capture and process these features, along with nonlinear relationships, to achieve optimal interpolation with the highest accuracy and efficiency. The CMNN (Comprehensive Message Neural Network) combined with a CNN and an MLP is sufficient in identifying spatial features and nonlinear relationships, but still falls short in distinguishing important temperature data without the attention mechanism. The MANN (Mann-like Entity-Lock Neural Network) combines an attention mechanism with an MLP, highlighting important temperature data and identifying nonlinear patterns, but still falls short in identifying spatial features without the CNN. Given the relative stability of grain particles, internal biochemical reactions cause minimal temperature changes compared to environmental influences. Therefore, models that focus less on spatial features often exhibit significantly lower accuracy in interpolation. Finally, the MLP performs relatively poorly, with significantly higher MSE and MAE values than its ensemble counterparts. In this regard, despite its multiple neurons and ReLU nonlinear transformations, the MLP alone is insufficient to capture the intricate details and patterns of complex data distributions or significant nonlinearities. Furthermore, as a feedforward neural network, the MLP struggles to effectively identify feature interactions and process spatial data. SVM has the least significant interpolation performance across regions within the temperature field, as evidenced by its highest MSE and MAE values. Although RF has a relatively lower MAE value than SVM, both shallow machine learning methods fail to consider the information of surrounding points in interpolation.
[0197] Experimental Example 2
[0198] The temperature field of the No. 25 granary in Hanzhong was interpolated using SVM, RF, MLP, MANN, CMNN and CAMNN. Figure 13 To establish a real temperature field using data collected by sensor networks, Figure 14 (a) to (f) are the temperature fields obtained by temperature interpolation using CAMNN, CMNN, MANN, MLP, RF and SVM respectively.
[0199] In theory, grain temperature fluctuations exhibit spatial variations. Grain temperature data near the grain pile surface and silo walls exhibit greater variability due to their proximity to the external environment. Temperature fluctuations in the center of the pile are minimal due to the poor thermal conductivity of stored grain. In summer, the temperature difference between the outer and central portions of the grain pile gradually increases, reflecting the expected temperature distribution of stored grain, commonly known as the "cold core, hot surface" phenomenon.
[0200] First, CAMNN outperforms other models in representing the vertical trend of temperature gradients, which benefits from the outstanding ability of the attention mechanism in distinguishing and capturing vertical data information. Overall, the spatial distribution of grain temperature shows obvious stratification, with the vertical temperature gradient being larger than the horizontal temperature gradient, which is also reflected in the design of the sensor network with smaller vertical spacing than horizontal spacing. Second, all models show good performance in the area inside the grain pile, because the temperature fluctuations are quite stable and uniform and not affected by external factors. Third, the hybrid models, namely CAMNN, CMNN and MANN, show higher accuracy in temperature interpolation near the surface of the grain pile and the internal boundary of the granary. In particular, the interpolation results of CAMNN are closer to the true values, especially at temperature points that are susceptible to external influences, such as Figure 14 As shown by the arrow in (d). Fourth, CMAA and MANN show obvious advantages in different locations. On the one hand, CMAA is superior to MANN in CNN processing data with spatial correlation. Figure 14 As shown in the rectangle in (b), the temperature distribution on the grain pile surface shows a spatial pattern similar to the image. On the other hand, MANN outperforms CMNN in processing data with significant temperature variations near the top and bottom surfaces of the grain pile and the silo wall, as shown in Figure 14 As shown by the box points in (c). Although the number of temperature points with such features in the training set is limited, the attention mechanism is good at highlighting key features and effectively distinguishing the most important input information. Fifth, the non-hybrid models (MLP, RF and SVM), compared with the hybrid models (CAMNN, CMNN and MANN), perform significantly inaccurate interpolation on the surface of the grain pile, as shown in Figure 14 This is shown by the rectangle in (d). This may be attributed to the integration of various network types in the hybrid model, which gives the model higher complexity and flexibility to adapt to the characteristics of the data. Finally, the non-hybrid model is not effective when interpolating areas with extreme temperature values and large temperature fluctuations, such as Figure 15 As shown by the arrow in (4). Because the non-hybrid model lacks sensitivity to sudden changes in data, the number of such extreme temperature conditions in a given training data is limited. CAMNN and CMNN have both the ability of CNN to capture local spatial features and the ability of the attention mechanism to highlight key temperature changes, which together promote the hybrid model's adaptation to anomalies.
[0201] Experimental Example 3
[0202] The CAMNN fusion model is used to interpolate the temperature field of Zhongning No. 43 Granary in Zhongning, Ningxia. Specifically, the sensor network of Zhongning No. 43 Granary consists of four layers, each containing 9*6 temperature sensors. Figure 16 The real values of the sensor network and the interpolated values of the CAMNN for the temperature field of the same representative Rizhongning No. 43 granary are visualized. It can be seen that the temperature trends are the same and there is no significant error.
[0203] Experimental Example 4
[0204] During the training of the CAMNN's Feature fusion model and Non-Featurefusion model, the batch sizes were set to 5, 10, 20, 30, and 40, respectively. Other conditions were the same, and the effects of different batch sizes on the MSE and MAE of the fusion model and the non-fusion model were verified.
[0205] Figure 10 The MSE and MAE of the CAMNN fusion model and non-fusion model under different batch sizes are shown. It can be seen that the MSE and MAE curves are V-shaped. When the batch size is 20, the MSE and MAE of the fusion model and non-fusion model are the smallest, which effectively improves the model convergence performance and interpolation accuracy.
[0206] Experimental Example 5
[0207] The hidden channels of the fusion model and non-fusion model of CAMNN are set to 2, 4, 6, 8, 16, 32 and 64 respectively, with other conditions being the same, to verify the effect of the number of hidden channels on the MSE and MAE of the fusion model and non-fusion model.
[0208] Figure 11 The MSE and MAE of the CAMNN fusion model and non-fusion model under different numbers of hidden channels are shown. It can be seen that the MSE and MAE curves are V-shaped. When the number of hidden channels is 16, the MSE and MAE are the smallest. Using 16 hidden channels, the model performs best in capturing the largest number of spatial features and minimizing the risk of overfitting, effectively improving the interpolation accuracy.
[0209] Experimental Example 6
[0210] The hidden dimensions of the fusion model and non-fusion model of CAMNN are set to 16, 32, 64, 128 and 256 respectively, with other conditions being the same, to verify the impact of the hidden dimension on the MSE and MAE of the fusion model and non-fusion model.
[0211] Figure 12The MSE and MAE of the CAMNN fusion model and non-fusion model under different numbers of hidden dimensions are shown. It can be seen that the MSE and MAE curves are V-shaped. When the hidden dimension is 64, the interpolation accuracy of the CAMNN fusion model and non-fusion model is the highest.
[0212] This application also provides an interpolation device, referring to Figure 4 , Figure 4 A schematic diagram of a module structure of an interpolation device is provided, which may include:
[0213] a data acquisition module configured to acquire the spatial location and sensor temperature of a first area within the granary, as well as external features of the granary and the spatial location of a second area, wherein the first area is an area within the granary where the temperature sensor is located;
[0214] An interpolation module is used to use the spatial position and sensor temperature of the first area, the external characteristics of the granary, and the spatial position of the second area as inputs of a trained temperature interpolation model to calculate the temperature of the second area in the granary to generate a continuous temperature field, wherein the trained temperature interpolation model is obtained by training an initial temperature interpolation model based on historical data of the spatial position and sensor temperature of the first area in the granary, and the external characteristics of the granary.
[0215] The present application further provides an interpolation device, which may include:
[0216] a data acquisition module configured to obtain the spatial position and sensor temperature of a first area within the granary, and the spatial position of a second area, wherein the first area is an area within the granary where the temperature sensor is located;
[0217] an interpolation module, using the spatial position and sensor temperature of the first region and the spatial position of the second region as inputs to a trained temperature interpolation model, and calculating the temperature of the second region within the granary to generate a continuous temperature field, wherein the trained temperature interpolation model is obtained by training an initial temperature interpolation model using historical data of the spatial position and sensor temperature of the first region within the granary;
[0218] Temperature interpolation models include:
[0219] a data acquisition module, configured to construct a spatiotemporal feature matrix based on the spatial position of the first region and the sensor temperature;
[0220] Convolutional neural network, which is used to perform convolution operations on the spatiotemporal feature matrix, capture the local spatial characteristics of the temperature field by sliding the convolution kernel, and output a local spatial feature map;
[0221] An attention module is used to weight and distinguish the critical temperature area and the sensitive temperature area in the local spatial feature map, and output a weighted local spatial feature map;
[0222] A multilayer perceptron is used to perform deep feature fusion on the weighted local spatial feature map, and continuously output the temperature of the second area through multi-layer nonlinear transformation to generate a continuous temperature field.
[0223] The interpolation device provided in this application utilizes the granary temperature field interpolation method described in the aforementioned embodiment, resolving the primary technical issues. Compared to related technologies, the interpolation device provided in this application achieves the same beneficial effects as the granary temperature field interpolation method described in the aforementioned embodiment. Other technical features of the interpolation device are the same as those disclosed in the granary temperature field interpolation method described in the aforementioned embodiment, and are not further detailed here.
[0224] The present application also provides an interpolation device, which may include: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the granary temperature field interpolation method in the above embodiment.
[0225] The interpolation device provided in this application utilizes the granary temperature field interpolation method described in the aforementioned embodiment, resolving the primary technical issues. Compared to related technologies, the interpolation device provided in this application achieves the same beneficial effects as the granary temperature field interpolation method described in the aforementioned embodiment. Other technical features of the interpolation device are the same as those disclosed in the granary temperature field interpolation method described in the aforementioned embodiment, and are not further detailed here.
[0226] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0227] The above are only specific embodiments of the present application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
[0228] The present application also provides a computer-readable storage medium having computer-readable program instructions (ie, a computer program) stored thereon, wherein the computer-readable program instructions are used to execute the granary temperature field interpolation method in the above-mentioned embodiment.
[0229] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: a portable computer disk electrically connected with one or more wires, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, etc., or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by an instruction execution system or device, or a combination thereof. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0230] The computer-readable storage medium may be included in the interpolation device, or may exist independently without being incorporated into the interpolation device.
[0231] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the interpolation device, the interpolation device can realize the above-mentioned functions defined in the granary temperature field interpolation method disclosed in the embodiment of the present application.
[0232] The storage medium provided in this application is a computer-readable storage medium, storing computer-readable program instructions (i.e., a computer program) for executing the aforementioned granary temperature field interpolation method, which can solve the technical problems of the primary technical problem. Compared with related technologies, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the granary temperature field interpolation method provided in the aforementioned embodiment, and are not further elaborated here.
[0233] The above are only some embodiments of the present application and are not intended to limit the patent scope of the present application. All equivalent structural transformations made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A granary temperature field interpolation method, characterized in that: The interpolation method includes: Obtaining the spatial location and sensor temperature of a first area within the granary, as well as the external features of the granary and the spatial location of a second area, wherein the first area is an area within the granary where the temperature sensor is installed; The spatial position and sensor temperature of the first area, the external characteristics of the granary and the spatial position of the second area are used as inputs of the trained temperature interpolation model to calculate the temperature of the second area in the granary to generate a continuous temperature field, wherein the trained temperature interpolation model is obtained by training an initial temperature interpolation model based on historical data of the spatial position and sensor temperature of the first area in the granary and the external characteristics of the granary.
2. A granary temperature field interpolation method according to claim 1, characterized in that: The external characteristics include sensor average temperature, temperature inside the warehouse, humidity inside the warehouse, and temperature outside the warehouse.
3. A granary temperature field interpolation method according to claim 1, characterized in that: The temperature interpolation model is built based on a random forest algorithm or a support vector machine.
4. A granary temperature field interpolation method according to claim 1, characterized in that: The temperature interpolation model is built based on convolutional neural networks and multi-layer sensors.
5. The granary temperature field interpolation method according to claim 1, characterized in that: The temperature interpolation model is built based on a multi-layer perceptron and an attention mechanism.
6. A granary temperature field interpolation method according to claim 1, characterized in that: Acquiring the sensor temperature of the first area includes: collecting the temperature of the first area using a temperature sensor to obtain a sensor temperature of the first area; When the sensor temperature of the first area is higher than a preset upper temperature threshold or lower than a preset lower temperature threshold, the sensor temperature of the first area is replaced by an average temperature of sensors in areas on the same floor.
7. A granary temperature field interpolation method according to claim 1, characterized in that: A ten-fold cross validation strategy was adopted during the training process of the temperature interpolation model.
8. An interpolation device, characterized in that: The interpolation device comprises: a data acquisition module configured to acquire the spatial location and sensor temperature of a first area within the granary, as well as external features of the granary and the spatial location of a second area, wherein the first area is an area within the granary where the temperature sensor is located; An interpolation module is used to use the spatial position and sensor temperature of the first area, the external characteristics of the granary, and the spatial position of the second area as inputs of a trained temperature interpolation model to calculate the temperature of the second area in the granary to generate a continuous temperature field, wherein the trained temperature interpolation model is obtained by training an initial temperature interpolation model based on historical data of the spatial position and sensor temperature of the first area in the granary, and the external characteristics of the granary.
9. An interpolation device, characterized in that The device includes: a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the computer program is configured to implement the steps of the granary temperature field interpolation method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the granary temperature field interpolation method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Granary temperature three-dimensional visualization and alarm method and system
CN121883724A
Grain depot insect pest intelligent prevention and control system and method based on infrared thermal characteristic perception
CN122074469A