Grain storage ventilation decision-making method based on GNN and Cross-Attention

By adopting GNN and Cross-Attention mechanisms in the decision-making of grain storage ventilation, the spatial information and multimodal data of the internal temperature sensor array of grain storage are integrated, and the problem of insufficient decision-making in the existing technology is solved, and more reliable and accurate decision-making of grain storage ventilation is achieved.

CN119513716AActive Publication Date: 2025-02-25ZHEJIANG UNIV

Patent Information

Application Number
CN202411386871.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-02-25
Estimated Expiration
2044-09-30

AI Technical Summary

Technical Problem

The existing grain storage ventilation decision-making technology is difficult to accurately utilize the spatial information of irregular three-dimensional temperature sensor arrays inside the grain warehouse, and the lack of integration of multimodal data, resulting in inaccurate and reliable decision-making.

Method used

Using a method based on graph neural network (GNN) and cross-attention mechanism (Cross-Attention) to fuse the spatial information of the temperature sensor array through graph convolutional neural network, and combine multimodal data such as external temperature and humidity, weather data and grain balance relative humidity to make ventilation decisions.

Benefits of technology

Through the fusion graph neural network and cross-attention mechanism, the temperature characteristics of the grain warehouse can be extracted more accurately and combined with multimodal data, making the ventilation decisions of the grain warehouse more reliable and accurate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119513716A_ABST
    Figure CN119513716A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of grain depot ventilation prediction, and discloses a grain storage ventilation decision-making method based on GNN and Cross-Attention, and the method comprises the steps: collecting internal temperature and humidity data of a grain depot, external temperature and humidity data of the grain depot, weather data and grain pile temperature data in real time; and the collected grain pile temperature data and weather data are preprocessed respectively, the grain balance relative humidity, the atmosphere dew point temperature and the grain dew point temperature are calculated and serve as input of a pre-trained ventilation decision model, and a classification result of ventilation decisions is obtained. Based on the temperature and humidity information of the air in the grain depot, the ventilation of the grain depot is comprehensively decided by combining the external temperature and humidity of the grain depot, the dew point data, the weather data and other information, the temperature characteristics of the grain depot are more accurately extracted, and the ventilation decision of the grain depot is more reliable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of grain depot ventilation prediction, and specifically relates to a grain storage ventilation decision method based on GNN and Cross-Attention. Background Art

[0002] During grain storage, the most important thing is to control the temperature and humidity inside the granary. Inappropriate temperature can easily cause grain to heat up and mold. Especially when the temperature and humidity reach a critical value, the grain will condense, which can easily cause mold. This critical value of temperature and humidity data is the so-called dew point. Therefore, the temperature and humidity must be strictly controlled during grain storage, and appropriate ventilation measures should be selected for intervention when necessary.

[0003] The temperature inside the grain warehouse cannot be accurately represented by a temperature sequence of only one sensor: the temperature of the grain-covered part of the warehouse is different from the temperature of the grain-free part, and the temperature of the center of the grain pile is different from the temperature of the edge of the grain pile. Whenever the grain inside the grain warehouse changes, such as loading and unloading, the temperature changes of different parts inside the warehouse are different. Therefore, the temperature data of the grain warehouse should be collected in two parts: the grain-free part is located at the top of the grain warehouse and is full of air. The temperature difference is not large, so it can be collected with one temperature sensor, while the temperature of different positions of the grain pile part is large. It is necessary to use a temperature sensor array based on the grain warehouse structure. The temperature data of this part must be combined with the spatial location information to be meaningful.

[0004] The existing grain storage ventilation decision technology mainly relies on the ResNet network combined with the self-attention mechanism. The ResNet network is an improved convolutional neural network (CNN) that solves the gradient vanishing and gradient exploding problems of the traditional CNN network. It is essentially a CNN network. The CNN network has very powerful performance in processing regular grid data (such as a plane matrix of image pixels). However, the temperature sensor array in the grain depot is arranged in an irregular three-dimensional structure, and the sensor array inside the shallow silo is even cylindrical. In this scenario, it is difficult to fully aggregate spatial information using the CNN network for utilization. The main purpose of the self-attention mechanism is to establish associations between different elements within the same sequence. Its advantage is that it can process the entire sequence in parallel and achieve a global view. However, it is difficult to make accurate and reliable decisions on grain depot ventilation based on only one sequence. In addition to the temperature and humidity information inside the grain depot, we also need multimodal information such as temperature and humidity data, weather data, and dew point outside the grain depot. However, most of the existing grain depot temperature prediction technologies are based on only one dimension of temperature data. For example, in the application number CN202410234796.0 "A method for predicting the temperature field of grain piles based on EEMD-LSTM and similarity", the data obtained include "the information of grain depots in the target grain storage ecological area, grain types, grain collection time, and the collection of big data of the temperature of each monitoring point of the grain pile", which is used to predict the temperature data of the grain pile. Therefore, it is necessary to improve the existing technology. Summary of the invention

[0005] The technical problem to be solved by the present invention is to provide a grain storage ventilation decision-making method based on GNN and Cross-Attention, which is used to make overall decisions on the ventilation of the grain warehouse based on the temperature and humidity information of the air inside the grain warehouse, combined with information such as the temperature and humidity outside the grain warehouse, dew point data and weather data.

[0006] In order to solve the above technical problems, the present invention provides a grain storage ventilation decision method based on GNN and Cross-Attention, comprising:

[0007] S1. Real-time data collection, including the collection of temperature and humidity data inside the grain depot, temperature and humidity data outside the grain depot, weather data, and grain pile temperature data;

[0008] S2, preprocessing the collected grain pile temperature data and weather data, and calculating the grain equilibrium relative humidity, atmospheric dew point temperature and grain dew point temperature as inputs of the pre-trained ventilation decision model;

[0009] S3. In the pre-trained ventilation decision model, the preprocessed grain pile temperature data passes through the linear layer and the node embedding layer, and then passes through the graph convolutional neural network to obtain feature 1. The external temperature and humidity data of the grain depot and the preprocessed weather data pass through the linear layer to obtain feature 2. The internal temperature and humidity data of the grain depot, the equilibrium relative humidity of the grain, the atmospheric dew point temperature, and the grain dew point temperature pass through the linear layer to obtain feature 3. Then, feature 1, feature 2, and feature 3 are obtained through the cross-attention mechanism to obtain the attention matrix between each other, and then spliced ​​according to the first dimension, and then passed through the linear layer, the global pooling layer and softmax to obtain the classification result of the ventilation decision.

[0010] As an improvement of the grain storage ventilation decision method based on GNN and Cross-Attention of the present invention:

[0011] The pre-processing comprises:

[0012] The grain pile temperature data was processed using the Z-SCORE standardization method:

[0013]

[0014]

[0015] Among them, μ represents the mean of the sample, N represents the total number of samples, and σ represents the sample variance;

[0016] The weather data is processed and encoded into a six-dimensional vector using one-hot encoding.

[0017] As a further improvement of the grain storage ventilation decision method based on GNN and Cross-Attention of the present invention:

[0018] The equilibrium relative humidity of the grain is:

[0019]

[0020] Where M represents the moisture content of grain (%), t r represents the grain temperature (°C), A1, B2, B1, B2, and D are equation parameters;

[0021] The atmospheric dew point temperature is:

[0022]

[0023] Among them, t a represents the atmospheric temperature (℃), RH a Represents the relative humidity of the atmosphere (%);

[0024] The grain dew point temperature is:

[0025]

[0026] Among them, ERH r Represents the equilibrium relative humidity of grain (%), t r Represents grain temperature (℃).

[0027] As a further improvement of the grain storage ventilation decision method based on GNN and Cross-Attention of the present invention:

[0028] The training process of the ventilation decision model is:

[0029] Collecting historical data of the granary and historical execution data of ventilation, the historical data of the granary includes temperature and humidity data inside the granary, temperature and humidity data outside the granary, weather data and grain pile temperature data, and then performing the above-mentioned preprocessing on the grain pile temperature data and weather data, and corresponding and marking the historical data of the granary and historical execution data of ventilation according to time;

[0030] The grain equilibrium relative humidity, atmospheric dew point temperature and grain pile dew point temperature are calculated for each sample in the granary historical data; then, the data is divided into three modes, namely:

[0031] (1) Preprocessed grain pile temperature data;

[0032] (2) External temperature and humidity of the grain depot and pre-processed weather data;

[0033] (3) Temperature and humidity data inside the grain depot, grain equilibrium relative humidity, atmospheric dew point temperature, and grain pile dew point temperature;

[0034] The data of the three modes were randomly divided into training set and test set in the ratio of 8:2, and input into the ventilation decision model. During training, the preprocessed grain pile temperature data was input into the graph convolutional neural network after linear layer and node embedding layer, combined with the adjacency matrix of the spatial coordinates of the grain pile temperature sensor array. The cross entropy loss function was used as the loss function, and the Adam optimizer was used. The learning rate was set to 0.001, and the training cycle of the model was set to 100. During the training cycle, at the end of each cycle, the model was evaluated on the test set.

[0035] As a further improvement of the grain storage ventilation decision method based on GNN and Cross-Attention of the present invention:

[0036] The adjacency matrix of the spatial coordinates of the grain pile temperature sensor array is:

[0037] Based on the position coordinates of the grain pile temperature sensors in the temperature sensor array, the Gaussian kernel method is used to calculate the distance between each sensor, and an adjacency matrix of the grain pile temperature sensor array spatial coordinates based on the actual distance is established.

[0038] θ=std(x) (1)

[0039]

[0040] Here, std(x) represents the standard deviation of the distances between sensors, x represents the physical distance between sensors, and θ represents the standard deviation of these distances.

[0041] As a further improvement of the grain storage ventilation decision method based on GNN and Cross-Attention of the present invention:

[0042] The temperature and humidity data inside the granary are collected by a granary temperature sensor and a granary humidity sensor on the top of the granary;

[0043] The external temperature and humidity data and weather data of the grain depot are obtained through the public data of the Meteorological Bureau;

[0044] The grain pile temperature data is collected through a temperature sensor array in a shallow silo.

[0045] The beneficial effects of the present invention are mainly reflected in:

[0046] The present invention integrates the advantages of graph neural network and cross-attention mechanism, especially processing spatial temperature data and introducing multimodal data attention mechanism, so as to more accurately extract the temperature characteristics of grain warehouse and combine data of more modalities to make the ventilation decision of grain warehouse more reliable. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The specific implementation modes of the present invention are further described in detail below with reference to the accompanying drawings.

[0048] Figure 1 2 is an example of the numbering of the grain pile temperature sensors on the same plane of the temperature sensor array of the present invention;

[0049] Figure 2 It is a schematic diagram of the grain storage ventilation decision method based on GNN and Cross-Attention of the present invention. DETAILED DESCRIPTION

[0050] The present invention is further described below in conjunction with specific embodiments, but the protection scope of the present invention is not limited thereto:

[0051] Example 1: A grain storage ventilation decision method based on GNN and Cross-Attention, the specific steps are as follows:

[0052] 1. Data collection and preprocessing

[0053] The temperature data of grain piles in the grain warehouse, the spatial location information of sensors in the grain warehouse, the air temperature and humidity data inside and outside the grain warehouse, weather data, and ventilation execution data are collected and sorted, and pre-processed to ensure data quality and consistency.

[0054] 1.1 Data Collection

[0055] The data source of the present invention comes from field collection of the laboratory's cooperative enterprises. The grain depot (i.e., granary) used is a shallow round silo, which is a cylindrical ground granary with a ratio of silo height to diameter not greater than 1.5 (the shallow round silo based on the present invention has a diameter of 20 meters and a height of 30 meters). A temperature sensor array is provided in the granary to collect grain pile temperature data. When loading grain, a conveying device such as a belt conveyor or a bucket elevator is directly used to pour grain from the top into the shallow round silo. The grain will be evenly accumulated from the bottom, covering and submerging the temperature sensor array. The collected data includes granary data and ventilation execution data, wherein the granary data includes temperature and humidity data inside and outside the granary, grain pile temperature data, and weather data. One of the data is shown in Table 1.

[0056] Table 1: Granary data sample display

[0057]

[0058] (1) The temperature and humidity collection inside the granary refers to the collection of temperature and humidity data of the part inside the granary that is not covered by grain. Since this part is all air, there is almost no difference in temperature and humidity. Therefore, the temperature and humidity data inside the granary can be obtained by installing a granary temperature sensor and a granary humidity sensor on the top of the granary.

[0059] (2) The external temperature and humidity data and weather data of the grain depot are provided by the Meteorological Bureau.

[0060] (3) The grain pile temperature data is collected using a temperature sensor array. From the inside to the outside, there are four cylindrical cable groups surrounded by 3, 5, 10, and 16 sensor cables. The radius difference between each cable group is 2 meters. Each sensor cable is 2.5 meters apart, with a total of 11 temperature sensors installed. A shallow silo uses a temperature sensor array, which includes a total of 374 grain pile temperature sensors. Figure 1 The following are examples of the labels for grain pile temperature sensors on the same plane.

[0061] A total of 10 grain depots’ temperature and humidity data were collected. The temperature and humidity sensors in the grain depots (including grain depot temperature sensors, grain depot humidity sensors and temperature sensor arrays) measure the temperature regularly, once every 8 hours, so a total of 10,950 sets of data were obtained.

[0062] The ventilation execution data is automatically recorded when the grain warehouse ventilation equipment is running. According to the grain warehouse ventilation regulations, there are six types of ventilation measures, namely: no ventilation, dehumidification ventilation, heat removal ventilation, timed ventilation, pressure-type upward ventilation, and forced exhaust upward ventilation. Table 2 is a record of ventilation execution data:

[0063] Table 2: Ventilation execution data display table

[0064]

[0065]

[0066] 1.2. Data processing (adjacency matrix extraction and preprocessing of temperature, humidity and weather data)

[0067] Data preprocessing first needs to establish the spatial information adjacency matrix required by the graph neural network based on the position coordinates of the 374 grain pile temperature sensors in the temperature sensor array, then standardize the data collected by the grain pile temperature sensors and quantify the weather data. Finally, these quantified data and ventilation execution data are labeled according to the time correspondence.

[0068] (1) Based on the position coordinates of 374 grain pile temperature sensors in the temperature sensor array, the Gaussian kernel method is used to calculate the distance between each sensor, thereby establishing an adjacency matrix of the spatial coordinates of the grain pile temperature sensor array based on the actual distance. This matrix not only reflects the physical distance between sensors, but also reveals the strength of interaction between them, which is used for graph convolutional neural network (GCN) to extract spatial information.

[0069] The specific Gaussian kernel calculation formula is as follows:

[0070] θ=std(x) (1)

[0071]

[0072] Where std(x) represents the standard deviation of the distances between sensors, x represents the physical distance between sensors, and θ represents the standard deviation of these distances.

[0073] (2) The grain pile temperature data collected by the temperature sensor array inside the grain depot is standardized using the Z-SCORE standardization method. The specific formula is as follows:

[0074]

[0075]

[0076] Among them, μ represents the mean value of the sample, that is, the average of 374 temperature values, N represents the total number of samples, that is, 374, and σ represents the sample variance.

[0077] (3) Quantification of weather data. One-hot encoding is used to expand each categorical variable into an independent binary feature. Only one of these features is activated (i.e., the value is 1), while the others are inactive (i.e., the value is 0). There are six types of weather data: sunny, cloudy, overcast, showers, rain, and heavy rain. Therefore, the weather is encoded into a six-dimensional vector, with each dimension representing a type of weather, as shown in Table 3:

[0078] Table 3: Weather one-hot encoding display table

[0079] weather Weather_0 Weather_1 Weather_2 Weather_3 Weather_4 Weather_5 clear 0 0 0 0 0 1 partly cloudy 0 0 0 0 1 0 cloudy day 0 0 0 1 0 0 shower 0 0 1 0 0 0 rain 0 1 0 0 0 0 heavy rain 1 0 0 0 0 0

[0080] 1.3 Data Annotation

[0081] The data creation time column of the ventilation execution data is matched with the data acquisition time column in the grain depot data sample, and the grain depot data sample shown in Table 1 is labeled.

[0082] We number the six ventilation methods of grain warehouses: 0 no ventilation, 1 dehumidification ventilation, 2 heat removal ventilation, 3 timed ventilation, 4 pressure-type upward ventilation, and 5 forced upward ventilation. Since the grain warehouse data is collected every 8 hours, and ventilation is performed irregularly, it is inevitable that there will be time mismatches. For example, the grain warehouse data only has data at two time points, 8:00 and 16:00, but ventilation was carried out at 9:00. In response to this situation, we mark the latest grain warehouse data before ventilation is implemented with this ventilation measure, such as: 2 heat removal ventilation. For grain warehouse data that has not been ventilated for more than 2 days, we mark it as 0 no ventilation.

[0083] 2. Use physical formulas to calculate parameters such as grain equilibrium relative humidity and dew point temperature as features perceived by the attention mechanism.

[0084] The purpose of grain warehouse ventilation is to change the temperature and humidity inside the grain warehouse to make it reach the most suitable state for grain storage. Because of this, grain warehouse ventilation measures are divided into six ventilation methods, such as dehumidification ventilation, heat removal ventilation, and forced upward ventilation, rather than simply opening windows for ventilation. We need an accurate and reliable reference standard to make ventilation decisions. Specifically, it is to calculate the dew point temperature inside and outside the grain warehouse at this time. This requires three key parameters: grain equilibrium relative humidity, atmospheric dew point temperature, and grain pile dew point temperature. The following is an explanation and calculation process of these three parameters:

[0085] (1) The grain ventilation equation CAE (Chen-Clayton Approximation Equation) is used to calculate the grain equilibrium relative humidity. This parameter can be used to determine whether the grain has reached the optimal storage state. If the humidity of the grain is higher than the equilibrium humidity, the grain will emit moisture until its humidity drops to a level that matches the equilibrium humidity. Conversely, if the humidity of the grain is lower than the equilibrium humidity, the grain will absorb moisture from the air until its humidity rises to the equilibrium humidity. The calculation formula is as follows:

[0086]

[0087] ERH r represents the equilibrium relative humidity of grain (%), M represents the moisture content of grain (%), t r It represents the average value (℃) of grain pile temperature data obtained by 374 grain pile temperature sensors. A1, A2, B1, B2, and D are CAE equation parameters.

[0088] (2) Atmospheric dew point temperature refers to the temperature at which air reaches saturation and begins to condense under a certain pressure, that is, when the water vapor in the air is cooled and reaches a saturated state, it will form water droplets, that is, dew. The temperature at this time is called the dew point temperature. Its calculation formula is as follows:

[0089]

[0090] DPT a represents the atmospheric dew point temperature (℃), t a represents the atmospheric temperature (℃), RH a Represents the relative humidity of the atmosphere (%).

[0091] (3) Grain dew point temperature refers to the temperature at which moisture begins to condense in the space formed by grains piled together. If the temperature of the grain pile is higher than this dew point temperature, the moisture in the pile will begin to condense, which may cause the grain in that area to mold and deteriorate. The calculation formula is as follows:

[0092]

[0093] Among them, DPT r Represents the grain pile dew point temperature (℃), ERH r Represents the equilibrium relative humidity of grain (%), t r Represents the average value of grain pile temperature data (℃).

[0094] 3. Construct a ventilation decision model that integrates graph neural network and cross-attention mechanism.

[0095] The ventilation decision model combines the architecture of graph neural network (GNN) and cross-attention mechanism to make ventilation decisions in grain depots. Specifically, the model integrates spatial information through graph convolutional network (GCN) and establishes attention relationship between multimodal information through cross-attention mechanism to realize decision-making function, such as Figure 2 shown.

[0096] 3.1. Three-modal data processing of grain pile temperature data, meteorological data, and dew point data

[0097] (1) The preprocessed grain pile temperature data is input into the linear layer in the matrix format of [374, 1] (the temperature sensor array has a total of 374 sensors) and upgraded to [374, 32]. It is then input into the node embedding layer to extract the temperature feature information and then input into the graph convolutional neural network (GCN). During training, the adjacency matrix obtained by processing the spatial coordinate information of the temperature sensor array in step 1.2 is combined to extract the grain pile temperature feature data and output the feature data of [374, 32], which is recorded as feature 1.

[0098] (2) The temperature and humidity data outside the grain depot and the weather data encoded in six bits after one-hot encoding are integrated into a matrix format of [8,1] and input into the linear layer for dimension upgrading to [8,32], which is recorded as feature 2.

[0099] (3) The temperature and humidity inside the grain warehouse and the grain equilibrium relative humidity, atmospheric dew point temperature and grain dew point temperature obtained in step 2 are integrated into a matrix format of [5,1] and input into the linear layer for dimension upgrading to [5,32], which is recorded as feature 3.

[0100] 3.2. Introducing the Cross-Attention Mechanism

[0101] For the three feature data obtained in step 3.1, establish attention relationships between them. The calculation formula of the attention matrix is ​​as follows:

[0102]

[0103] Where Q is Query, K is Key, and V is Value. is a scaling factor, the purpose of which is to keep the gradient value stable during training.

[0104] Take the establishment of the attention matrix of feature 1 to feature 2 as an example to illustrate the process of establishing the attention relationship:

[0105] (1) Set Q, K, and V. Feature 1 is Query, with a shape of [374, 32], and feature 2 is Key and Value, with a shape of [8, 32].

[0106] (2) Calculate the attention score. As shown in Formula 8, the dot product of the query and the key is used to calculate the matching degree between the query and each key. To prevent the value after the dot product from being too large, a scaling factor is multiplied. Then the softmax function is applied to make the obtained attention score between 0 and 1, and the sum of all scores is 1. The shape of the obtained attention score matrix is ​​[374,8].

[0107] (3) Calculate the final result. Use the attention score obtained in the previous step to weight the value corresponding to the key, that is, multiply the attention score matrix and the value, and finally get the attention matrix of feature 1 to feature 2, with a shape of [374,32].

[0108] Similarly, we can establish the attention matrix of feature 2 to feature 1, the attention matrix of feature 1 to feature 3, the attention matrix of feature 3 to feature 1, the attention matrix of feature 2 to feature 3, and the attention matrix of feature 3 to feature 2. There are six attention matrices in total.

[0109] 3.3 Attention Matrix Splicing and Ventilation Decision

[0110] According to step 3.2, two attention matrices of shape [374, 32], [8, 32], and [5, 32] are generated. The six attention matrices are concatenated on the first dimension to form a concatenated matrix of [(374+8+5)×2, 32], i.e., a dimension of [774, 32].

[0111] The concatenated matrix is ​​input into the linear layer, the output is [774,32], and then input into the global pooling layer to become [1,32]. After softmax, the final ventilation decision result is obtained.

[0112] 3.4 Model training process

[0113] According to step 1.1, the historical data of the granary and the historical execution data of ventilation are collected. The historical data of the granary includes the temperature and humidity data inside the granary, the temperature and humidity data outside the granary, the weather data and the temperature data of the grain pile. Then, according to step 1.2, the weather data and the temperature data of the grain pile are preprocessed, and according to step 1.3, the historical data of the granary and the historical execution data of ventilation are matched according to time and the ventilation mode is marked. For example, this group of data is marked as 0 (i.e., no ventilation) to obtain the data label pair. The model learns the relationship between the input and output based on the data label pair. The training process of the model is to compare the predicted output generated by the input data through the forward propagation of the model with the label to calculate the loss function to update the model parameters.

[0114] Then, according to step 2, the grain equilibrium relative humidity, atmospheric dew point temperature and grain pile dew point temperature corresponding to each sample in the granary historical data are calculated;

[0115] Then, the data is divided into three modes:

[0116] (1) Preprocessed grain pile temperature data;

[0117] (2) External temperature and humidity of the grain depot and pre-processed weather data

[0118] (3) Temperature and humidity data inside the grain depot, grain equilibrium relative humidity, atmospheric dew point temperature, and grain pile dew point temperature

[0119] The data of the three modalities were randomly divided into training sets and test sets in a ratio of 8:2 as the input for building the ventilation decision model in step 3. The loss function of the model adopted the cross-entropy loss function (Cross-Entropy Loss), and the Adam optimizer was used. The learning rate was set to 0.001, and the training cycle of the model was set to 100. During the training cycle, at the end of each cycle, the model was evaluated on the test set to monitor the training process and prevent overfitting, so as to obtain a trained and tested model that can be used online.

[0120] 4. Online ventilation decision

[0121] 4.1 Data Collection:

[0122] (1) The granary temperature sensor and granary humidity sensor on the top of the granary collect the temperature and humidity data inside the granary in real time;

[0123] (2) Obtain the current external temperature and humidity data and weather data of the grain depot from the Meteorological Bureau;

[0124] (3) Real-time collection of grain pile temperature data from the temperature sensor array of each silo;

[0125] 4.2 Data Processing

[0126] Preprocess the real-time weather data and grain pile temperature data according to step 1.2

[0127] According to step 2, calculate the grain equilibrium relative humidity and dew point temperature; thus, obtain the data of three modes, which are:

[0128] (1) Preprocessed grain pile temperature data;

[0129] (2) External temperature and humidity of the grain depot and pre-processed weather data

[0130] (3) Temperature and humidity data inside the grain depot, grain equilibrium relative humidity, atmospheric dew point temperature, and grain pile dew point temperature

[0131] Input into the ventilation decision model that has been trained and tested in step 3 to make ventilation decisions. The preprocessed grain pile temperature data passes through the linear layer and the node embedding layer, and then passes through the graph convolutional neural network to obtain feature 1. The external temperature and humidity data of the grain depot and the preprocessed weather data pass through the linear layer to obtain feature 2. The internal temperature and humidity data of the grain depot, the equilibrium relative humidity of the grain, the atmospheric dew point temperature, and the dew point temperature of the grain pass through the linear layer to obtain feature 3; then the feature 1, feature 2 and feature 3 are obtained through the cross attention mechanism to obtain the attention matrix between each two, and then spliced ​​according to the first dimension, and then passed through the linear layer, the global pooling layer and the softmax to obtain the classification result of the ventilation decision, which is one of the six ventilation strategies (0 no ventilation, 1 dehumidification ventilation, 2 heat accumulation ventilation, 3 timed ventilation, 4 push-in upward ventilation, 5 forced upward ventilation).

[0132] Compared with the patent "Prediction Method of Grain Pile Temperature in Grain Depot Based on Graph Neural Network and Recurrent Neural Network" applied by the applicant earlier, although the present invention adopts the same form of temperature sensor array to collect grain pile temperature, the present invention also combines multimodal data composed of temperature and humidity data inside the grain depot, temperature and humidity data outside the grain depot and weather data, which can more accurately extract the temperature characteristics of the grain depot. At the same time, compared with the early application only for realizing grain pile temperature prediction, the present invention further expands the prediction purpose to ventilation decision-making in grain depots, which has more effective practicality.

[0133] experiment:

[0134] In order to further verify the accuracy of the method proposed in the present invention for grain warehouse ventilation decision-making, based on the above-mentioned data preprocessing and network model, this experiment compares the ventilation decision model combining the GCN of the present invention with the Cross-Attention mechanism with the literature model ResNet+Self-Attention, and performs ablation experimental analysis with the simple GCN model and the Cross-Attention model without GCN.

[0135] The model of reference 1 (see Zhu, Y.; Li, H.; Zhen, T.; Li, Z. Integrating Self-Attention Mechanisms and ResNet for Grain Storage Ventilation Decision Making: A Study. Appl. Sci. 2023, 13, 7655.) uses ResNet+Self-Attention for ventilation decision-making.

[0136] Our proposed models were trained and validated on the same dataset and tested on the test set. Using the same evaluation criteria, we compared the performance of different models.

[0137] The experimental evaluation indicators are as follows:

[0138] (1) Recall

[0139] Recall is the proportion of all actual positive samples that are correctly predicted as positive by the model. A high recall means that the model can find most of the positive samples. The calculation formula is as follows, where TP represents true positive samples (the number of samples predicted by the model to be positive and actually positive), and FN represents false negative samples (the number of samples predicted by the model to be negative but actually positive).

[0140]

[0141] (2) Precision

[0142] Precision is the ratio of all samples predicted by the model to be positive that are actually positive. A high precision means that most of the samples predicted by the model to be positive are actually positive. The calculation formula is as follows, where FP stands for false positives (the number of samples predicted by the model to be positive but actually negative).

[0143]

[0144] (3)F1(F1 Score)

[0145] F1 Score is the harmonic mean of precision and recall. It can provide a balance between the two so that we don't just focus on one indicator. If the model's precision and recall are both high, then the F1 Score will also be high. The calculation formula is:

[0146]

[0147] The comparative experimental results are shown in Table 2 below:

[0148] Table 2: Comparative experimental results of grain pile temperature prediction algorithms

[0149]

[0150] According to the results, compared with other models, the model of the present invention achieves good ventilation decision-making results by fusing temperature sensor spatial information with the Cross-Attention mechanism through GCN. The model proposed in the present invention shows excellent performance in evaluation indicators, and its recall rate, precision rate, and F1 score are all higher than other models.

[0151] Finally, it should be noted that the above examples are only some specific embodiments of the present invention. Obviously, the present invention is not limited to the above embodiments, and there are many variations. All variations that can be directly derived or associated with the content disclosed by a person skilled in the art should be considered as the protection scope of the present invention.

Claims

1. A grain storage ventilation decision method based on GNN and Cross-Attention, characterized by: S1. Real-time data collection, including the collection of temperature and humidity data inside the grain depot, temperature and humidity data outside the grain depot, weather data, and grain pile temperature data; S2, preprocessing the collected grain pile temperature data and weather data, and calculating the grain equilibrium relative humidity, atmospheric dew point temperature and grain dew point temperature as inputs of the pre-trained ventilation decision model; S3. In the pre-trained ventilation decision model, the preprocessed grain pile temperature data passes through the linear layer and the node embedding layer, and then passes through the graph convolutional neural network to obtain feature 1. The external temperature and humidity data of the grain depot and the preprocessed weather data pass through the linear layer to obtain feature 2. The internal temperature and humidity data of the grain depot, the equilibrium relative humidity of the grain, the atmospheric dew point temperature, and the grain dew point temperature pass through the linear layer to obtain feature 3. Then, feature 1, feature 2, and feature 3 are obtained through the cross-attention mechanism to obtain the attention matrix between each other, and then spliced ​​according to the first dimension, and then passed through the linear layer, the global pooling layer and softmax to obtain the classification result of the ventilation decision.

2. The grain storage ventilation decision method based on GNN and Cross-Attention according to claim 1, characterized in that: The pre-processing comprises: The grain pile temperature data was processed using the Z-SCORE standardization method: Among them, μ represents the mean of the sample, N represents the total number of samples, and σ represents the sample variance; The weather data is processed and encoded into a six-dimensional vector using one-hot encoding.

3. The grain storage ventilation decision method based on GNN and Cross-Attention according to claim 2 is characterized in that: The equilibrium relative humidity of the grain is: Where M represents the moisture content of grain (%), t r represents the grain temperature (°C), A1, A2, B1, B2, and D are equation parameters; The atmospheric dew point temperature is: Among them, t a represents the atmospheric temperature (℃), RH a Represents the relative humidity of the atmosphere (%); The grain dew point temperature is: Among them, ERH r Represents the equilibrium relative humidity of grain (%), t r Represents grain temperature (℃).

4. The grain storage ventilation decision method based on GNN and Cross-Attention according to claim 3 is characterized in that: The training process of the ventilation decision model is: Collecting historical data of the granary and historical execution data of ventilation, the historical data of the granary includes temperature and humidity data inside the granary, temperature and humidity data outside the granary, weather data and grain pile temperature data, and then performing the above-mentioned preprocessing on the grain pile temperature data and weather data, and corresponding and marking the historical data of the granary and historical execution data of ventilation according to time; The grain equilibrium relative humidity, atmospheric dew point temperature and grain pile dew point temperature are calculated for each sample in the granary historical data; then, the data is divided into three modes, namely: (1) Preprocessed grain pile temperature data; (2) External temperature and humidity of the grain depot and pre-processed weather data; (3) Temperature and humidity data inside the grain depot, grain equilibrium relative humidity, atmospheric dew point temperature, and grain pile dew point temperature; The data of the three modes were randomly divided into training set and test set in the ratio of 8:2 and input into the ventilation decision model. During the training, the preprocessed grain pile temperature data was input into the graph convolutional neural network after the linear layer and the node embedding layer, combined with the adjacency matrix of the spatial coordinates of the grain pile temperature sensor array. The loss function uses the cross entropy loss function and the Adam optimizer is used. The learning rate is set to 0.001, and the training cycle of the model is set to 100; During the training cycle, at the end of each cycle, the model is evaluated on the test set.

5. The grain storage ventilation decision method based on GNN and Cross-Attention according to claim 4 is characterized in that: The adjacency matrix of the spatial coordinates of the grain pile temperature sensor array is: Based on the position coordinates of the grain pile temperature sensors in the temperature sensor array, the Gaussian kernel method is used to calculate the distance between each sensor, and an adjacency matrix of the grain pile temperature sensor array spatial coordinates based on the actual distance is established. θ=std(x) (1) Here, std(x) represents the standard deviation of the distances between sensors, x represents the physical distance between sensors, and θ represents the standard deviation of these distances.

6. The grain storage ventilation decision method based on GNN and Cross-Attention according to claim 5, characterized in that: The temperature and humidity data inside the granary are collected by a granary temperature sensor and a granary humidity sensor on the top of the granary; The external temperature and humidity data and weather data of the grain depot are obtained through the public data of the Meteorological Bureau; The grain pile temperature data is collected through a temperature sensor array in a shallow silo.

Citation Information

Patent Citations

  • Intelligent grain storage ventilation system

    CN107166663A

  • Intelligent granary ventilation control method and system

    CN110928211A

  • Grain depot intelligent ventilation discrimination method and system

    CN115146214A

  • Grain storage ventilation temperature prediction method for optimizing CNN-BiGRU-Attention network model based on IPSO algorithm

    CN116720620A

  • Time series data prediction method associated with time-space relationship

    CN117668743A

Cited By

  • Intelligent granary ventilation and energy consumption optimization decision-making method based on reinforcement learning

    CN120725247A

  • Intelligent warehouse ventilation and energy consumption optimization decision method based on reinforcement learning

    CN120725247B

  • Grain depot intelligent ventilation control system and method based on deep reinforcement learning

    CN122195189A