An ai-based precise temperature control method and system for three-dimensional ventilation of a granary

By constructing a grain warehouse temperature prediction model that combines convolutional networks, attention layers, and bidirectional gated recurrent networks, the problem of low accuracy in grain warehouse temperature prediction was solved, and precise temperature control of grain warehouses was achieved.

CN121072894BActive Publication Date: 2026-02-13CHENGDU BUDWEISER ZHILIAN TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511612323.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-06
Publication Date
2026-02-13
Estimated Expiration
2045-11-06

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately obtain the complex nonlinear relationship between grain pile temperature and multiple factors, resulting in low accuracy in grain silo temperature prediction and an inability to perform precise temperature control.

Method used

An AI-based grain warehouse temperature prediction model is constructed, which combines convolutional network layers, attention layers, and bidirectional gated recurrent network layers. Through local and global feature extraction and feature fusion, and by introducing an attention mechanism for feature weight allocation, the global dependencies of grain condition fusion features are explored to generate temperature prediction sequences.

Benefits of technology

It improves the accuracy of grain warehouse temperature prediction, enables precise temperature control of grain warehouses, and is suitable for large-scale application and promotion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121072894B_ABST
    Figure CN121072894B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on AI's granary three-dimensional ventilation precision temperature control method and system, to solve the problem that traditional technology is difficult to accurately obtain the complex nonlinear relationship with other factors, thereby causing temperature prediction accuracy is low, and further lead to unable to carry out granary precision ventilation temperature control, constructs a kind of granary temperature prediction model combining convolution network layer, attention layer and bidirectional gated recurrent network layer, the model is extracted based on convolution local and global feature, and carries out feature fusion, to more comprehensively describe grain condition characteristics, then, introduce attention mechanism and carry out feature weight distribution, to highlight the feature that greater influence on temperature prediction, then, combine bidirectional gated recurrent network layer and excavate the global dependence relationship of grain condition fusion feature, and complete granary temperature prediction by this;Therefore, the application can better utilize the time sequence and multidimensional features of data, improve the prediction accuracy of stored grain temperature, so as to realize the precision temperature control of granary.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of AI-based grain warehouse ventilation and temperature control, and particularly relates to an AI-based grain warehouse three-dimensional ventilation and accurate temperature control method and system. BACKGROUND

[0002] Grain is an important strategic material related to national economy and people's livelihood, and is also a basic guarantee for people's life. Therefore, while improving grain yield, reasonable grain reserve management needs to be maintained. Grain warehouse ventilation and temperature control is an important part of grain warehouse management. It monitors the temperature of grain to adjust the ventilation of the grain warehouse in real time to ensure the quality of grain storage. Therefore, the ventilation and temperature control of the grain warehouse is an important indicator in the monitoring work and is of great significance for grain storage.

[0003] In recent years, some grain storage enterprises are developing digital grain condition monitoring systems that can achieve closed-loop prediction of grain pile temperature through sensors, the Internet, and big data analysis techniques. Based on the predicted grain pile temperature, the grain warehouse ventilation system is controlled to ensure that the temperature of the grain pile is below the safety threshold for a certain period of time. Through this uninterrupted prediction and ventilation control, effective grain storage can be ensured. However, the prior art has the following disadvantages: traditional grain storage temperature prediction usually uses numerical simulation or mathematical modeling methods. However, due to the coupling effect of multiple factors on grain pile temperature, it is difficult to accurately obtain the complex nonlinear relationship between other factors when predicting grain pile temperature using existing technology. Therefore, the accuracy of grain pile temperature prediction is low, and accurate temperature control of grain warehouse ventilation cannot be achieved. Therefore, based on the foregoing disadvantages, how to provide an AI-based grain warehouse three-dimensional ventilation and accurate temperature control method with high grain pile temperature prediction accuracy to achieve effective and accurate temperature control of the grain warehouse has become a problem to be solved. SUMMARY

[0004] The purpose of the present application is to provide an AI-based grain warehouse three-dimensional ventilation and accurate temperature control method and system to solve the problem of low accuracy of grain pile temperature prediction in the prior art, which leads to inaccurate temperature control of grain warehouse ventilation.

[0005] To achieve the above-mentioned purpose, the technical scheme adopted by the present application is as follows:

[0006] In a first aspect, an AI-based grain warehouse three-dimensional ventilation and accurate temperature control method is provided, comprising:

[0007] Grain condition information and external environment information of the grain warehouse in a historical preset time period are obtained, wherein the grain condition information includes grain pile average temperature, grain pile maximum temperature, grain pile minimum temperature, and temperature and humidity in the grain warehouse, and the external environment information includes atmospheric temperature and humidity;

[0008] The grain condition information and the external environment information are used to generate an input sequence, and the input sequence is input into a warehouse temperature prediction model to obtain a temperature prediction sequence of the warehouse in a future preset time length;

[0009] A ventilation temperature control strategy is generated using the temperature prediction sequence, and the ventilation system of the warehouse is controlled to operate according to the ventilation temperature control strategy;

[0010] The warehouse temperature prediction model comprises a convolutional network layer, an attention layer and a bidirectional gated recurrent network layer connected in sequence.

[0011] The convolutional network layer is used to extract features of the input sequence to obtain local grain condition features and global grain condition features, and to perform feature fusion on the local grain condition features and the global grain condition features to obtain grain condition fusion features.

[0012] The attention layer is used to calculate attention weights of the grain condition fusion features using an attention mechanism to obtain grain condition fusion features with assigned weights.

[0013] The bidirectional gated recurrent network layer is used to generate the temperature prediction sequence based on the grain condition fusion features with assigned weights.

[0014] Based on the above disclosure, the grain condition information and the external environment information of the warehouse in a historical preset time length are first obtained, then the two are used to form an input sequence and input into the aforementioned warehouse temperature prediction model for temperature prediction to obtain a temperature prediction sequence of the warehouse in a future preset time length, and then a ventilation temperature control strategy can be generated according to the temperature prediction sequence, and the ventilation system of the warehouse is controlled to operate according to the ventilation temperature control strategy, thereby realizing precise temperature control of the warehouse. Specifically, the present application constructs a warehouse temperature prediction model combining a convolutional network layer, an attention layer and a bidirectional gated recurrent network layer, wherein the convolutional network layer is used to extract local and global features of the input sequence, and the extracted local and global grain condition features are fused to obtain grain condition fusion features. Then, the attention layer is used to assign weights to different grain condition features to improve the influence of important features. Finally, the bidirectional gated recurrent network layer is used to mine the global dependency relationship of the grain condition fusion features to predict the temperature of the warehouse and realize precise temperature control of the warehouse ventilation.

[0015] Through the above design, in order to solve the problem that the traditional technology cannot accurately obtain the complex nonlinear relationship with other factors, thereby causing low temperature prediction accuracy, and further causing the problem that the precise temperature control of the grain storehouse ventilation cannot be carried out, the application constructs a grain storehouse temperature prediction model combined with a convolution network layer, an attention layer and a bidirectional gate recurrent network layer, the model extracts local and global features based on convolution, and performs feature fusion to more comprehensively describe the grain condition features, then the attention mechanism is introduced to perform feature weight distribution to highlight the features that have greater influence on the stored grain temperature prediction, then the bidirectional gate recurrent network layer is combined to mine the global dependency relationship of the grain condition fusion features, and the grain storehouse temperature prediction is completed; therefore, the application can better utilize the time sequence and multi-dimensional features of the data, improve the prediction accuracy of the stored grain temperature, and thus realize the precise temperature control of the grain storehouse; therefore, the application is very suitable for large-scale application and promotion.

[0016] In one possible design, the convolution network layer includes a local convolution unit, a Transformer network unit and a feature fusion unit.

[0017] The local convolution unit is configured to perform multiple dilated causal convolution processing on the input sequence to obtain local grain condition features.

[0018] The Transformer network unit is configured to perform global feature extraction on the input sequence to obtain global grain condition features.

[0019] The feature fusion unit is configured to perform feature fusion processing on the local grain condition features and the global grain condition features to obtain the grain condition fusion features after the feature fusion processing.

[0020] In one possible design, the local convolution unit includes a first dilated causal convolution structure layer, a second dilated causal convolution structure layer, a one-dimensional convolution layer and a feature splicing layer.

[0021] The first dilated causal convolution structure layer is configured to perform one-time dilated causal convolution processing on the input sequence to obtain first initial local features, and input the first initial local features to the second dilated causal convolution structure layer.

[0022] The second dilated causal convolution structure layer is configured to perform two-time dilated causal convolution processing on the first initial local features to obtain second initial local features.

[0023] The one-dimensional convolution layer is configured to perform 1*1 convolution processing on the input sequence to obtain third initial local features.

[0024] The feature splicing layer is configured to perform feature splicing on the second initial local features and the third initial local features to obtain the local grain condition features.

[0025] The first and second dilated causal convolution structure layers have the same structure, and each includes a dilated causal convolution layer, a batch normalization layer, an exponential linear unit layer, and a regularization layer connected in sequence. The dilated causal convolution layer includes an input layer, two hidden layers, and an output layer. The convolution kernel size used by the two hidden layers and the output layer is 3, and the dilation coefficients used by the two hidden layers and the output layer are 1, 2, and 4, respectively.

[0026] In one possible design, a ventilation control strategy is generated by using a temperature prediction sequence, including:

[0027] Based on the temperature prediction sequence, the highest temperature of the grain pile in the silo in a preset future time period is determined.

[0028] It is determined whether the highest temperature of the grain pile in the silo is greater than a safety threshold.

[0029] If yes, a ventilation control optimization model with a minimum ventilation cost as an optimization objective is constructed. The variables of the ventilation control optimization model include the running power, running speed, and running time length of a fan in a silo ventilation system. The constraint conditions of the ventilation control optimization model include that the final temperature of the silo is less than or equal to the safety threshold. The ventilation control optimization model includes an energy consumption cost term, a silo ventilation loss cost term, and a safety penalty term. The silo ventilation loss cost term is used to measure the loss of grain moisture caused by ventilation. The safety penalty term is used to measure the penalty cost between the final temperature of the silo and the safety threshold. If the final temperature of the silo is greater than the safety threshold, the greater the difference between the final temperature of the silo and the safety threshold, the greater the penalty cost. If the final temperature of the silo is less than or equal to the safety threshold, the penalty cost is 0.

[0030] The ventilation control optimization model is solved to obtain a fan control strategy with the minimum ventilation cost and the final temperature of the silo less than or equal to the safety threshold. The obtained fan control strategy is used as the ventilation control strategy.

[0031] In one possible design, the ventilation control optimization model is solved, including:

[0032] An individual population at the n th iteration is obtained. Each individual in the individual population at the n th iteration corresponds to a fan control scheme of a silo ventilation system.

[0033] Based on the ventilation control optimization model, the fitness of each individual in the individual population at the n th iteration is calculated. The greater the fitness of any individual, the smaller the ventilation cost of the fan control strategy corresponding to the any individual.

[0034] Based on the fitness of each individual at the n th iteration, a global optimal individual at the n th iteration is determined.

[0035] determining whether an iteration stop condition is satisfied;

[0036] If not, determining a search probability, and generating a first search random number and a second search random number corresponding to each individual;

[0037] According to the search probability, and the first search random number and the second search random number corresponding to each individual, determining an individual search mode of each individual at the nth iteration, wherein the individual search mode includes a boundary-based search mode, a local search mode and a global search mode;

[0038] Using the individual search mode, performing position updating on each individual to obtain an individual population at the (n+1)th iteration;

[0039] incrementing n by 1, and reacquiring the individual population at the nth iteration, until the iteration stop condition is satisfied, to determine, based on a global optimal individual at the time when the iteration stop condition is satisfied, a fan control strategy with which the ventilation cost is minimum and the final temperature of the granary is less than or equal to a safety threshold.

[0040] In one possible design, determining the individual search mode of each individual at the nth iteration according to the search probability, and the first search random number and the second search random number corresponding to each individual, includes:

[0041] For any individual in the individual population at the nth iteration, determining whether a first search random number corresponding to the any individual is less than the search probability;

[0042] If not, calculating a search factor of the any individual according to a fitness of the any individual and a fitness of a global optimal individual at the nth iteration, otherwise, determining that the individual search mode of the any individual is a boundary-based search mode;

[0043] Determining whether a second search random number of the any individual is less than the search factor of the any individual;

[0044] If yes, determining that the individual search mode of the any individual is a local search mode, otherwise, determining that the individual search mode of the any individual is a global search mode, and obtaining the individual search mode of each individual after all individuals in the individual population at the nth iteration are polled.

[0045] In one possible design, using the individual search mode, performing position updating on each individual to obtain the individual population at the (n+1)th iteration, includes:

[0046] For any individual in the individual population at the n th iteration, if the individual search mode of the any individual is a local search mode, a first random individual is selected from the individual population at the n th iteration, wherein the first random individual is different from the any individual;

[0047] The first position search step and the second position search step at the n th iteration are calculated;

[0048] According to the global optimal individual at the n th iteration, the any individual, the first random individual, the first position search step and the second position search step, an individual position update vector is calculated;

[0049] The any individual is locally searched by using the individual position update vector to obtain an updated any individual, and after each individual in the individual population at the n th iteration is polled, an individual population at the n+1 th iteration is obtained.

[0050] In a possible design, the position of each individual is updated by using the individual search mode to obtain the individual population at the n+1 th iteration, including:

[0051] For any individual in the individual population at the n th iteration, if the individual search mode of the any individual is a global search mode, a second random individual is selected from the individual population at the n th iteration, wherein the second random individual is different from the any individual;

[0052] The global search strength is determined, and a global search random number is generated;

[0053] According to the global search strength, the global search random number, the second random individual and the global optimal individual, the any individual is globally searched to obtain an updated any individual, and after each individual in the individual population at the n th iteration is polled, an individual population at the n+1 th iteration is obtained.

[0054] In a possible design, the position of each individual is updated by using the individual search mode to obtain the individual population at the n+1 th iteration, including:

[0055] For any individual in the individual population at the n th iteration, if the individual search mode of the any individual is a boundary-based search mode, a boundary search weight of the any individual is calculated;

[0056] The individual search upper limit and the individual search lower limit are obtained;

[0057] According to the boundary search weight, the first search random number corresponding to the individual, the individual search upper limit and the individual search lower limit, the position of the individual is updated to obtain an updated individual, and after each individual in the individual population at the n th iteration is polled, an individual population at the n+1 th iteration is obtained.

[0058] In a second aspect, an AI-based precise temperature control system for three-dimensional ventilation of a grain depot is provided, comprising:

[0059] An acquisition unit is configured to acquire grain condition information and external environment information of the grain depot within a preset historical time period, wherein the grain condition information comprises grain pile average temperature, grain pile maximum temperature, grain pile minimum temperature and temperature and humidity in the grain depot, and the external environment information comprises atmospheric temperature and humidity.

[0060] A temperature prediction unit is configured to generate an input sequence using the grain condition information and the external environment information, and input the input sequence into a grain depot temperature prediction model to obtain a temperature prediction sequence of the grain depot within a preset future time period.

[0061] A ventilation and temperature control unit is configured to generate a ventilation and temperature control strategy using the temperature prediction sequence, and control the operation of the ventilation system of the grain depot according to the ventilation and temperature control strategy.

[0062] The grain depot temperature prediction model comprises a convolutional network layer, an attention layer and a bidirectional gated recurrent network layer connected in sequence.

[0063] The convolutional network layer is configured to extract features from the input sequence to obtain local grain condition features and global grain condition features, and perform feature fusion on the local grain condition features and the global grain condition features to obtain grain condition fusion features.

[0064] The attention layer is configured to perform attention weight calculation on the grain condition fusion features using an attention mechanism to obtain grain condition fusion features with assigned weights.

[0065] The bidirectional gated recurrent network layer is configured to generate the temperature prediction sequence based on the grain condition fusion features with assigned weights.

[0066] In a third aspect, an AI-based precise temperature control device for three-dimensional ventilation of a grain depot is provided, taking an electronic device as an example, comprising a memory, a processor and a transceiver connected in sequence, wherein the memory is configured to store a computer program, the transceiver is configured to receive and transmit messages, and the processor is configured to read the computer program and execute the AI-based precise temperature control method for three-dimensional ventilation of a grain depot according to the first aspect or any possible design of the first aspect.

[0067] In a fourth aspect, a storage medium is provided, and the storage medium has stored thereon instructions which, when executed on a computer, perform the AI-based precise temperature control method for three-dimensional ventilation of a grain depot as defined in the first aspect or any possible design of the first aspect.

[0068] In a fifth aspect, a computer program product containing instructions which, when executed on a computer, cause the computer to perform the AI-based precise temperature control method for three-dimensional ventilation of a grain depot as defined in the first aspect or any possible design of the first aspect.

[0069] Advantages:

[0070] (1) To solve the problem that the traditional technology cannot accurately obtain the complex nonlinear relationship with other factors, thereby causing low temperature prediction accuracy, and further causing the problem that the precise temperature control of the grain depot ventilation cannot be performed, the present application constructs a grain depot temperature prediction model combining a convolution network layer, an attention layer and a bidirectional gate recurrent network layer. The model extracts local and global features based on convolution and performs feature fusion to more comprehensively describe the grain condition features. Then, the attention mechanism is introduced to assign feature weights to highlight the features that have a greater impact on the stored grain temperature prediction. Then, the bidirectional gate recurrent network layer is combined to mine the global dependency relationship of the grain condition fusion features, and the grain depot temperature prediction is completed. Thus, the present application can better utilize the time sequence and multi-dimensional features of the data, improve the prediction accuracy of the stored grain temperature, and thus realize the precise temperature control of the grain depot. Therefore, the present application is very suitable for large-scale application and promotion. BRIEF DESCRIPTION OF DRAWINGS

[0071] Figure 1 A step flowchart of the AI-based precise temperature control method for three-dimensional ventilation of a grain depot provided by the embodiment of the present application is shown in the figure.

[0072] Figure 2 A structure diagram of the grain depot temperature prediction model provided by the embodiment of the present application is shown in the figure.

[0073] Figure 3 A structure diagram of the local convolution unit provided by the embodiment of the present application is shown in the figure.

[0074] Figure 4 A structure diagram of the AI-based precise temperature control system for three-dimensional ventilation of a grain depot provided by the embodiment of the present application is shown in the figure.

[0075] Figure 5 A structure diagram of the electronic device provided by the embodiment of the present application is shown in the figure. DETAILED DESCRIPTION

[0076] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the present application will be briefly introduced below in combination with the drawings and the description of the embodiments or the prior art. Obviously, the following description of the drawings is only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor. It should be noted that the description of these embodiments is used to help understand the present application, but does not constitute a limitation on the present application.

[0077] It should be understood that although the terms first, second, etc. can be used herein to describe various units, these units should not be limited by these terms. These terms are only used to distinguish one unit from another unit. For example, the first unit can be called the second unit, and similarly, the second unit can be called the first unit, without departing from the scope of the example embodiments of the present application.

[0078] It should be understood that for the term "and / or" that can appear herein, it is only a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which means that there are three cases of A alone, B alone, and A and B together. For the term "and" that can appear herein, it is another description of the association relationship of another associated object, which means that there can be two relationships, for example, A and B, which means that there are two cases of A alone and A and B together. In addition, for the character " / " that can appear herein, it generally means that the associated objects before and after are an "or" relationship.

[0079] Embodiments:

[0080] Referring to Figure 1As shown, the AI-based grain warehouse three-dimensional ventilation precise temperature control method provided by the embodiment constructs a grain warehouse temperature prediction model combining a convolution network layer, an attention layer and a bidirectional gated recurrent network layer. The model extracts local and global features based on convolution and performs feature fusion to more comprehensively describe grain condition features. Then, the attention mechanism is introduced to assign feature weights to highlight features that have a greater impact on the prediction of the stored grain temperature. Next, the bidirectional gated recurrent network layer is combined to mine the global dependency relationship of the grain condition fusion features, and the grain warehouse temperature prediction is completed based on the global dependency relationship. Thus, the application can better utilize the time sequence and multi-dimensional features of the data, thereby solving the problem of low accuracy of grain warehouse temperature prediction caused by the complex nonlinear relationship between the traditional technology and other factors, improving the prediction accuracy of the stored grain temperature, and thereby realizing precise ventilation and temperature control of the grain warehouse. Therefore, the method is very suitable for large-scale application and promotion. In the method, the grain warehouse temperature control terminal can be, but is not limited to, a server or a computer. It can be understood that the foregoing execution subject does not constitute a limitation on the embodiment of the application. Correspondingly, the running steps of the method can be, but are not limited to, as shown in the following steps S1-S3.

[0081] S1. Obtain grain condition information and external environment information of the grain warehouse within a historical preset time length, wherein the grain condition information includes grain pile average temperature, grain pile maximum temperature, grain pile minimum temperature and grain warehouse internal temperature and humidity, and the external environment information includes atmospheric temperature and humidity. In specific implementation, the grain pile average temperature, the grain pile maximum temperature, the grain pile minimum temperature, the grain warehouse internal temperature and humidity and the atmospheric temperature and humidity within the previous 24 hours, 12 hours or 6 hours of the grain warehouse can be, but are not limited to, collected, and the sampling step is 1 hour, i.e., every hour, to collect the foregoing data (of course, the grain warehouse internal temperature and humidity and the atmospheric temperature and humidity can take the average value within 1 hour). After the foregoing data is collected, an input sequence can be constructed based on the foregoing data, and input into the grain warehouse temperature prediction model to obtain a temperature prediction sequence of the grain warehouse. The temperature prediction process is shown in the following step S2.

[0082] S2. Generate an input sequence using the grain condition information and the external environment information, and input the input sequence into the grain warehouse temperature prediction model to obtain a temperature prediction sequence of the grain warehouse within a future preset time length. In the embodiment, the grain condition information and the external environment information can be, but are not limited to, normalized to ensure that the value range of the input original data is within [0, 1] to eliminate the influence of inconsistent data on temperature prediction. Then, the normalized grain condition information and the normalized external environment information can be used to form an input feature matrix to obtain an input sequence. Each row in the input feature matrix represents the grain condition information and the external environment information corresponding to one hour.

[0083] After obtaining the input sequence, the input sequence can be input into the pre-trained warehouse temperature prediction model to realize the prediction of the temperature of the stored grain in the warehouse, such as predicting the grain pile temperature data in the future 1 hour, 2 hours, 3 hours or 6 hours; wherein, the embodiment preferably is the data in the future 2 hours.

[0084] Further, to solve the problem that it is difficult to accurately obtain the complex nonlinear relationship with other factors in the prior art, thereby causing low temperature prediction accuracy and further causing the problem that accurate temperature control of the warehouse ventilation cannot be performed, the embodiment constructs a warehouse temperature prediction model combining a convolution network layer, an attention layer and a bidirectional gated recurrent network layer, that is, as shown in Figure 2 The aforementioned warehouse temperature prediction model can include, but is not limited to, a convolution network layer, an attention layer and a bidirectional gated recurrent network layer connected in sequence; specifically, the working process of each layer is as follows:

[0085] In specific application, the convolution network layer is used for feature extraction of the input sequence to obtain local grain condition features and global grain condition features, and the local grain condition features and the global grain condition features are fused to obtain grain condition fusion features; in the embodiment, a convolution network layer combining an inflation causal convolution and a Transformer module (i.e. a deep learning model for processing sequence data) is provided, that is, the inflation causal convolution is used for extraction of the local grain condition features, and the Transformer is used for capturing the global time sequence features to obtain the global grain condition features; finally, the two features are fused to obtain comprehensive grain condition fusion features.

[0086] Optionally, one of the network structures of the aforementioned convolution network layer is disclosed as follows:

[0087] Referring to Figure 2 The convolution network layer can include, but is not limited to, a local convolution unit, a Transformer network unit and a feature fusion unit; specifically, the local convolution unit is used for multiple inflation causal convolution processing of the input sequence to obtain local grain condition features; in specific application, the inflation causal convolution combines the characteristics of causal convolution and inflation convolution to extract local context time sequence features; wherein, the causal convolution ensures that the output only depends on the current and previous input data, and the inflation convolution expands the receptive field by inserting holes between filter elements to capture more distant context information; in this way, the inflation causal convolution increases the receptive field by inserting holes between filter elements to capture more distant local context information without increasing the computational complexity, thereby more effectively extracting local features of the grain condition data.

[0088] Meanwhile, in order to ensure the comprehensiveness of feature extraction, the embodiment also introduces a Transformer network unit in the convolution network layer, i.e., a Transformer network unit, for global feature extraction on the input sequence to obtain global grain condition features; in specific implementation, the Transformer network has strong sequence modeling capability and can capture global features in the grain condition data, such as long-term trends and periodic changes, so that the global features in the input sequence can be captured through the Transformer network.

[0089] Finally, the two features can be fused to more comprehensively describe the grain condition data, i.e., a feature fusion unit, for performing feature fusion processing on the local grain condition features and the global grain condition features to obtain the grain condition fusion features after the feature fusion processing.

[0090] Furthermore, the following provides a detailed network structure of the local convolution unit:

[0091] As shown in Figure 3 for example, the local convolution unit can include but is not limited to a first dilated causal convolution structure layer, a second dilated causal convolution structure layer, a one-dimensional convolution layer, and a feature splicing layer; wherein the first dilated causal convolution structure layer is used to perform one dilated causal convolution processing on the input sequence to obtain first initial local features, and input the first initial local features to the second dilated causal convolution structure layer; similarly, the second dilated causal convolution structure layer is used to perform two dilated causal convolution processing on the first initial local features to obtain second initial local features; then, the one-dimensional convolution layer is used to perform 1*1 convolution processing on the input sequence to obtain third initial local features; finally, the feature splicing layer is used to splice the second initial local features and the third initial local features to obtain the local grain condition features.

[0092] In specific application, the first dilated causal convolution structure layer and the second dilated causal convolution structure layer have the same structure, as shown in Figure 3 both of which include a dilated causal convolution layer, a batch normalization layer, an exponential linear unit layer, and a regularization layer connected in sequence; in this way, when the input sequence is input to the local convolution unit, one dilated causal convolution processing is performed by the dilated causal convolution layer, and then the batch normalization processing and the nonlinear activation processing are sequentially performed by the batch normalization layer and the exponential linear unit layer to obtain the first initial local features after the foregoing processing; similarly, the processing of the first initial local features in the second dilated causal convolution structure layer is the same as that of the foregoing input sequence, which will not be described here; finally, the third initial local features obtained by 1*1 convolution are spliced with the second initial local features output by the second dilated causal convolution structure layer to obtain the local grain condition features.

[0093] The exponential linear unit layer introduces an activation function to make the average activation value in the network close to zero, thereby improving the performance and stability of the model. The regularization layer randomly sets the output of a portion of neurons to 0 with a certain probability during the training process, thereby reducing the complexity of the model and increasing the robustness of the model. Of course, the regularization layer is disabled during actual temperature prediction, and is only used during training.

[0094] In a specific embodiment, the dilated causal convolution layer includes an input layer, two hidden layers, and an output layer. The convolution kernel size used in the two hidden layers and the output layer is 3, and the dilation coefficients used in the two hidden layers and the output layer are 1, 2, and 4, respectively. With the above parameter settings, the dilation coefficient increases exponentially with the increase of the number of layers, thereby expanding the receptive field and enabling the model to capture local features at different time scales, thereby improving the modeling capability of time series data.

[0095] After the grain condition fusion features of the input sequence are extracted by the foregoing convolution network layer, the grain condition fusion features can be input into the attention layer to calculate the weights of the features. The attention layer is configured to calculate the attention weights of the grain condition fusion features by using an attention mechanism to obtain the grain condition fusion features with assigned weights. In this embodiment, the self-attention mechanism is used to calculate the attention weights of the grain condition fusion features, so that different features are assigned different weights. The self-attention mechanism can generate the contribution degree of different grain condition features to the grain temperature prediction, and thus different features can be assigned different weights to highlight important features. Based on this, the introduction of the attention layer can reduce the dependence on external information, thereby effectively improving the feature extraction capability of the model.

[0096] After different features in the grain condition fusion features are assigned weights, temperature prediction can be performed. In this embodiment, the bidirectional gated recurrent network layer is used to predict the temperature of the grain depot, i.e., the bidirectional gated recurrent network layer is configured to generate a temperature prediction sequence based on the grain condition fusion features with assigned weights. In a specific implementation, the bidirectional gated recurrent network layer predicts the temperature of the grain depot by mining the global dependency relationship of the grain condition fusion features. Meanwhile, a Dropout layer is added after the network layer to effectively reduce overfitting. Finally, the predicted temperature information of the grain pile, i.e., the foregoing temperature prediction sequence, is output through a fully connected layer.

[0097] In addition, in this embodiment, the mean square error between the grain depot temperature prediction value output by the foregoing grain depot temperature prediction model and the actual value of the grain pile temperature is used as the loss function.

[0098] Therefore, by constructing the granary temperature prediction model combining the convolutional network layer, the attention layer and the bidirectional gated recurrent unit layer, the embodiment can solve the problem of low prediction accuracy of the granary temperature caused by the difficulty of traditional technology in accurately obtaining the complex nonlinear relationship with other factors, thereby improving the prediction accuracy of the storage temperature. Therefore, reliable temperature data can be provided for subsequent accurate ventilation and temperature control of the granary.

[0099] After obtaining the temperature prediction sequence of the granary in the future preset time length based on the foregoing step S2, a ventilation and temperature control strategy of the granary can be generated based on the temperature prediction sequence, so as to perform accurate ventilation and temperature control of the granary based on the ventilation and temperature control strategy. The generation process of the ventilation and temperature control strategy can be, but is not limited to, as shown in the following step S3.

[0100] S3. Utilize the temperature prediction sequence to generate a ventilation and temperature control strategy, and control the operation of the ventilation system of the granary according to the ventilation and temperature control strategy. In specific application, when the predicted maximum temperature of the granary is greater than the safety threshold, the embodiment constructs a ventilation and temperature control optimization model, and generates an optimal fan control strategy of the ventilation system of the granary based on the optimization model, so as to complete the accurate ventilation and temperature control of the granary based on the optimal fan control strategy. The generation process of the optimal fan control strategy can be, but is not limited to, as shown in the following steps S31-S34.

[0101] S31. Based on the temperature prediction sequence, determine the maximum temperature of the grain pile of the granary in the future preset time length. In the embodiment, the maximum value in the temperature prediction sequence can be, but is not limited to, taken as the maximum temperature of the grain pile of the granary. Then, compare the maximum temperature with the safety threshold, so as to determine whether the ventilation and temperature control process needs to be started according to the comparison result.

[0102] The judgment process is shown in the following step S32.

[0103] S32. Determine whether the maximum temperature of the grain pile of the granary is greater than the safety threshold. In specific application, the safety threshold can be, but is not limited to, 15 degrees Celsius. Of course, different safety thresholds can be selected according to the stored types of grain.

[0104] In specific application, when the maximum temperature of the grain pile of the granary is greater than the safety threshold, the ventilation and temperature control process needs to be started. That is, if the maximum temperature does not reach the safety threshold, the entire granary does not need to be adjusted. Otherwise, if the maximum temperature reaches the safety threshold, the ventilation and temperature control needs to be performed. In the embodiment, the ventilation and temperature control optimization model with the optimization target of minimizing the ventilation cost is constructed to generate the ventilation and temperature control strategy of the granary. Optionally, the construction process of the ventilation and temperature control optimization model is shown in the following step S33.

[0105] S33. If so, a ventilation and temperature control optimization model is constructed with the goal of minimizing ventilation costs. The variables of the ventilation and temperature control optimization model include the operating power, operating speed, and operating time of the fans in the grain warehouse ventilation system. The constraints of the ventilation and temperature control optimization model include that the final temperature of the grain warehouse is less than or equal to a safety threshold. The ventilation and temperature control optimization model includes an energy consumption cost term, a grain warehouse ventilation loss cost term, and a safety penalty term. The grain warehouse ventilation loss cost term is used to measure the moisture loss of the grain caused by ventilation. The safety penalty term is used to measure the penalty cost between the final temperature of the grain warehouse and the safety threshold. If the final temperature of the grain warehouse is greater than the safety threshold, and the difference between the final temperature of the grain warehouse and the safety threshold is larger, the penalty cost is larger. If the final temperature of the grain warehouse is less than or equal to the safety threshold, the penalty cost is 0.

[0106] In this embodiment, for example, but not limited to, the following formula (1) can be used to construct the ventilation and temperature control optimization model.

[0107] (1)

[0108] In equation (1), This represents the ventilation and temperature control optimization model. This represents the operating power of the k-th fan in the grain storage ventilation system. This represents the operating time of the k-th wind turbine. Indicates in Electricity prices within the country This indicates the operating speed of the k-th fan. This indicates the final temperature of the grain silo (i.e., the final temperature inside the grain silo after a certain fan control strategy is implemented). K represents the safety threshold, and K represents the total number of wind turbines.

[0109] In this embodiment, the first term on the right side of the aforementioned formula (1) is the energy consumption cost term, and the second term is the grain warehouse ventilation loss cost term (i.e., a surrogate function related to ventilation intensity and duration is used to represent the grain moisture loss caused by ventilation). This term represents the total ventilation intensity. The larger its value, the more intense the ventilation, and the greater the potential impact on grain moisture. Therefore, the optimization algorithm tends to choose a mild ventilation method (such as low wind speed and long duration) under the premise of meeting the cooling requirements. Furthermore, the third term is the safety penalty term. The safety penalty term is used to ensure the safety of grain storage. Its design goal is to severely punish any operation that may lead to a dangerous state. Specifically, when the final temperature of the grain warehouse is less than or equal to the safety threshold, this term is 0. When the final temperature of the grain warehouse is greater than the safety threshold, and the greater the excess value, the penalty term increases exponentially. In this way, this term ensures the principle of safety first, that is, any strategy that may cause the grain to overheat will have an extremely high total ventilation cost, and will be automatically eliminated in the optimization process.

[0110] Further, the constraint conditions of the aforementioned optimization model can further include: fan maximum / minimum speed constraints, a constraint that the total ventilation time length does not exceed a preset upper limit, and a dew point safety constraint; specifically, the dew point safety constraint includes: a warehouse outside dew point temperature (the temperature at which water vapor in the air becomes dew is called dew point temperature, and when the air pressure is constant, the dew point is only related to the water vapor content in the air, and the more the water vapor content, the higher the dew point. The water vapor content in the future for a preset time length can be obtained according to the weather forecast), which is less than the lowest temperature in the warehouse, that is, less than the lowest value of the warehouse (if violated, ventilation will cause the surface of the cold grain to dew, causing mold, and absolutely prohibited ventilation); the temperature outside the warehouse is less than the average temperature of the warehouse, if violated, ventilation will instead increase the temperature; wherein the aforementioned lowest value of the warehouse and the average temperature of the warehouse are obtained by inputting a certain fan control strategy into the warehouse digital twin model.

[0111] Therefore, after the ventilation and temperature control optimization model is established, the model can be solved to obtain a fan control strategy with minimum ventilation cost and a final warehouse temperature less than or equal to a safety threshold; wherein the model solving process is shown in the following step S34.

[0112] S34. Solve the ventilation and temperature control optimization model to obtain a fan control strategy with minimum ventilation cost and a final warehouse temperature less than or equal to a safety threshold, and obtain the fan control strategy as the ventilation and temperature control strategy; in specific application, an intelligent group optimization algorithm is used to solve the model, and the process is shown in the following steps S34a-S34h.

[0113] S34a. Obtain the individual population at the nth iteration, wherein each individual in the individual population at the nth iteration corresponds to a fan control scheme of the warehouse ventilation system; in specific implementation, the initial value of n is 1, and when n is 1, the individual population at the nth iteration is the initial population; that is, the running power, running speed and running time length of each fan in the warehouse ventilation system are initialized multiple times to obtain multiple initial fan control schemes, and then each initial fan control scheme is taken as an initial individual, that is, an initial individual includes the running power, running speed and running time length of each fan.

[0114] Thus, after obtaining the individual population at the nth iteration, the individual fitness can be calculated, and the process is shown in the following step S34b.

[0115] S34b. Based on the ventilation and temperature control optimization model, the fitness of each individual in the individual population at the nth iteration is calculated, wherein the greater the fitness of any individual, the smaller the ventilation cost of the fan control strategy corresponding to the any individual; in specific implementation, for example but not limited to, the reciprocal of the ventilation and temperature control optimization model can be taken as the fitness function, then, for any individual at the nth iteration, according to the fan control scheme corresponding to the any individual, the simulation of the grain warehouse ventilation and temperature control is carried out to obtain the actual temperature of the grain warehouse after the ventilation and temperature control of the grain warehouse by the fan control scheme corresponding to the any individual, and then the actual temperature of the grain warehouse is substituted into the aforementioned fitness function, so that the fitness of the any individual can be obtained.

[0116] wherein, for example but not limited to, the digital twin model of the grain warehouse is pre-stored in the grain temperature control terminal, and then the fan control scheme of each individual is input into the digital twin model of the grain warehouse to obtain the corresponding actual temperature of the grain warehouse; specifically, the simulation input of the twin model is: initial state, three-dimensional temperature field and humidity field of the current grain warehouse, environmental parameters: temperature and humidity outside the warehouse (which can be set as constant or according to the predicted change in simulation); control strategy: specific fan combination, speed and running time; the output of the model is: dynamic three-dimensional temperature field of the grain warehouse; finally, the actual temperature of the grain warehouse corresponding to each individual, the minimum temperature and the average temperature of the grain warehouse can be obtained according to the three-dimensional temperature field.

[0117] After the fitness of each individual at the nth iteration is calculated, the global optimal individual at the current iteration can be determined, and the process is shown in the following step S34c.

[0118] S34c. Based on the fitness of each individual at the nth iteration, the global optimal individual at the nth iteration is determined; in this embodiment, the maximum fitness is first selected from the fitness of each individual, and then it is judged whether the maximum fitness is greater than the global optimal fitness at the (n-1)th iteration; if yes, the individual corresponding to the maximum fitness is taken as the global optimal individual at the nth iteration; otherwise, the individual corresponding to the global optimal fitness at the (n-1)th iteration is taken as the global optimal individual at the nth iteration; of course, the global optimal fitness at the first iteration is the individual with the maximum fitness at the first iteration.

[0119] After the global optimal individual at the current iteration is obtained, it can be judged whether the iteration stop condition can be met, so as to update the population according to the judgment result; wherein the judgment process is shown in the following step S34d.

[0120] S34d. It is judged whether the iteration stop condition is met; in this embodiment, the iteration stop condition is that n reaches the maximum iteration number, or the fitness of the global optimal individual at the nth iteration is greater than or equal to the fitness threshold.

[0121] In the embodiment, when the foregoing condition is not satisfied, the position search of the population needs to be performed, that is, the individual position is updated; in order to improve the global search and local development ability of the algorithm, avoid falling into a local optimal solution, and improve the convergence speed of the model, the embodiment proposes an individual position updating scheme in a plurality of search modes, and the process is shown in the following steps S34e-S34h.

[0122] S34e. If not, the search probability is determined, and the first search random number and the second search random number corresponding to each individual are generated; in the embodiment, the search probability is a preset value between 0 and 1, which can be specifically set according to actual use, and the embodiment is not specifically limited; at the same time, the value range of the first search random number and the second search random number is [0, 1]; thus, after the first search random number and the second search random number corresponding to each individual are generated, the individual search mode of each individual at the nth iteration can be determined based thereon, and the process is shown in the following step S34f.

[0123] S34f. The individual search mode of each individual at the nth iteration is determined according to the search probability and the first search random number and the second search random number corresponding to each individual, wherein the individual search mode includes a boundary-based search mode, a local search mode and a global search mode; in specific implementation, taking any individual as an example, the determination process of the corresponding individual search mode is shown in the following steps S34f1-S34f4.

[0124] S34f1. For any individual in the individual population at the nth iteration, it is judged whether the first search random number corresponding to the individual is less than the search probability; in the embodiment, if the first search random number of the individual is less than the search probability, the individual search mode of the individual is determined to be the boundary-based search mode; otherwise, the search factor of the individual needs to be calculated in order to further determine the search mode according to the search factor.

[0125] The foregoing process is shown in the following step S34f2.

[0126] S34f2. If not, the search factor of the individual is calculated according to the fitness of the individual and the fitness of the global optimal individual at the nth iteration, otherwise, the individual search mode of the individual is determined to be the boundary-based search mode; in specific implementation, for example, but not limited to, the following formula (2) is used to calculate the search factor of the individual.

[0127] (2)

[0128] In formula (2), a search factor of the individual, fitness of the individual and fitness of the global optimal individual at the n-th iteration, respectively.

[0129] After the search factor of the individual is calculated based on the above formula (2), it is compared with the second search random number to determine the individual search mode of the individual, wherein the comparison process is shown in the following step S34f3.

[0130] S34f3. Determine whether the second search random number of the individual is less than the search factor of the individual; in a specific implementation, if the second search random number of the individual is less than the search factor of the individual, it is determined that the individual search mode of the individual is local search, otherwise, it is global search, and the process is shown in the following step S34f4.

[0131] S34f4. If yes, it is determined that the individual search mode of the individual is local search mode, otherwise, it is determined that the individual search mode of the individual is global search mode, and after all individuals in the individual population at the n-th iteration are polled, the individual search mode of each individual is obtained.

[0132] After the individual search mode of each individual is determined through the above steps S34f1-S34f4, the position update is performed based on the respective search mode, and the process is shown in the following step S34g.

[0133] S34g. Update the position of each individual using the individual search mode to obtain the individual population at the n+1-th iteration; in this embodiment, the detailed position update process of the three individual search modes is described as follows:

[0134] For the individual in the individual population at the n-th iteration, if the individual search mode of the individual is local search mode, the position update of the individual is completed using the following steps S34g1-S34g4.

[0135] S34g1. Select a first random individual from the individual population at the n-th iteration, wherein the first random individual is different from the individual.

[0136] After the first random individual is selected, the position search step is calculated, and the process is shown in the following step S34g2.

[0137] S34g2. Calculate the first position search step and the second position search step at the nth iteration; in this embodiment, for example, but not limited to, the following formula (3) and formula (4) can be used to calculate the two position search steps.

[0138] (3)

[0139] (4)

[0140] In formula (3), denotes the first position search step, denotes the first maximum position search step, denotes the maximum number of iterations, denote the fitness of the individual and the fitness of the global optimal individual, respectively; in formula (4), denotes the second position search step, denotes the second maximum position search step.

[0141] Thus, it can be seen from the foregoing formula (3) and formula (4) that the adjustment of the position search step not only depends on the number of iterations, but also considers the change of the fitness, and can be adaptively adjusted according to the fitness value of the individual and the search stage.

[0142] After calculating the two position search steps, the first random individual and the global optimal individual can be combined to generate an individual position update vector, the process of which is shown in the following step S34g3.

[0143] S34g3. Calculate the individual position update vector according to the global optimal individual at the nth iteration, the individual, the first random individual, the first position search step and the second position search step; in specific implementation, for example, but not limited to, the following formula (5) can be used to calculate the individual position update vector.

[0144] (5)

[0145] In formula (5), denotes the individual position update vector, denotes the global optimal individual, denote the individual and the first random individual, respectively.

[0146] It can be seen from the foregoing formula (5) that the introduction of the neighborhood search of the random individual in this embodiment enhances the local search ability; thus, after calculating the individual position update vector, the position update of the individual can be completed, the process of which is shown in the following step S34g4.

[0147] S34g4. The local search is performed on the any individual by using the individual position update vector to obtain the updated any individual, and after each individual in the individual population at the n th iteration is polled, the individual population at the n+1 th iteration is obtained; in this embodiment, the updated any individual can be obtained by using the individual position update vector plus the any individual (of course, the position vector of the any individual).

[0148] In this way, the position update of the individual is completed in the local search mode through the foregoing steps S34g1-S34g4.

[0149] Similarly, when the individual search mode of the any individual is the global search mode, the position update of the any individual can be completed through the following steps S34g5-S34g7, for example, but not limited to.

[0150] S34g5. A second random individual is selected from the individual population at the n th iteration, wherein the second random individual is different from the any individual.

[0151] After the second random individual is selected from the individual population at the n th iteration, the global search strength and the global search random number are determined, so as to subsequently perform the position update of the any individual based on the same; wherein the foregoing process is shown in the following steps S34g6 and S34g7.

[0152] S34g6. The global search strength is determined, and the global search random number is generated; in a specific application, the global search strength is randomly selected in [0, 1.5], and the global search random number is randomly selected in [-1, 1]; in this way, after the global search strength and the global search random number are obtained, the position update of the any individual is performed in combination with the second random individual and the global optimal individual; wherein the position update process is shown in the following step S34g7.

[0153] S34g7. The global search is performed on the any individual according to the global search strength, the global search random number, the second random individual and the global optimal individual to obtain the updated any individual, and after each individual in the individual population at the n th iteration is polled, the individual population at the n+1 th iteration is obtained.

[0154] In this embodiment, the global search can be performed on the any individual through the following formula (6), for example, but not limited to.

[0155] (6)

[0156] In formula (6), represents the updated any individual, respectively represent the any individual and the second random individual, represents a global search random number, represents a global search intensity, represents a global optimal individual.

[0157] Thus, by the aforementioned formula (6), the position update of the individual can be completed in a global search manner.

[0158] Finally, when the individual search manner of the any individual is a boundary-based search manner, the position update of the any individual is completed by the following steps S34g8-S34g10.

[0159] S34g8. The boundary search weight of the any individual is calculated; in the embodiment, the boundary search weight can be calculated by the following formula (7) for example but not limited to.

[0160] (7)

[0161] In formula (7), represents the boundary search weight of the any individual, respectively represent the maximum boundary search weight and the minimum boundary search weight.

[0162] Thus, the embodiment balances the exploration and development capabilities of the algorithm by the adaptive weight strategy of nonlinear change, thereby fully ensuring the effectiveness of the algorithm; of course, the weights of the individuals in the same iteration are the same; after the boundary search weight of the any individual is calculated, the search upper and lower bounds can be obtained, and the process is shown in the following step S34g9.

[0163] S34g9. The individual search upper and lower bounds are obtained; in the embodiment, there are the upper and lower bounds of the running power, the upper and lower bounds of the running speed, and the upper and lower bounds of the running time, so that after the individual search upper and lower bounds are obtained, the individual position update can be performed in combination with the aforementioned boundary search weight and the first search random number corresponding to the any individual, and the process is shown in the following step S34g10.

[0164] S34g10. The position of the any individual is updated according to the boundary search weight, the first search random number corresponding to the any individual, the individual search upper and lower bounds, to obtain the updated any individual, and after each individual in the individual population in the n th iteration is polled, the individual population in the n+1 th iteration is obtained.

[0165] In the embodiment, it has been described that each individual includes the operating power, the operating speed and the operating time length of each fan, and thus each individual corresponds to a vector (i.e., the position vector includes K sub-vectors) including K sub-vectors, and each sub-vector corresponds to the operating power, the operating speed and the operating time length of a fan. Thus, for the jth dimension of each sub-vector in the individual, the following formula (8) can be used for position updating, for example, but not limited to.

[0166] (8)

[0167] In formula (8), denotes the jth dimension of the kth sub-vector in the individual, denotes the updated , denote the boundary search weight of the individual and the corresponding first search random number, respectively, denote the individual search upper limit and the individual search lower limit of the jth dimension, respectively, j = 1, 2, 3, corresponding to the operating power, the operating speed and the operating time length, respectively.

[0168] Thus, based on the foregoing formula (8), the updating of the remaining dimensions of the remaining sub-vectors can be performed to obtain the updated individual.

[0169] Thus, after the position updating of each individual at the nth iteration is completed through the foregoing step S34g and its sub-steps, the foregoing steps S34a-S34g can be repeated until the iteration stop condition is met; wherein the loop search process is shown in the following step S34h.

[0170] S34h. Increase n by 1, and reacquire the individual population at the nth iteration until the iteration stop condition is met, to determine the fan control strategy with the minimum ventilation cost and the final temperature of the grain depot less than or equal to the safety threshold based on the global optimal individual when the iteration stop condition is met.

[0171] Thus, through the foregoing steps S31-S34 and the corresponding sub-steps, the solution of the ventilation and temperature control optimization model can be completed to obtain the fan control strategy with the minimum ventilation cost and the final temperature of the grain depot less than or equal to the safety threshold; wherein when the solved fan control strategy does not satisfy the foregoing constraint conditions, such as not satisfying the condition that the outdoor temperature is less than the average temperature of the grain depot in the dew point condition, the ventilation control can be directly skipped, the air conditioner can be turned on to reduce the temperature of the grain depot at the maximum power, and an alarm prompt can be performed to prompt the staff to pay attention to the temperature of the grain depot in time.

[0172] After obtaining the fan control strategy with the minimum ventilation cost and the final temperature of the grain depot being less than or equal to the safety threshold, the fan control strategy is taken as the optimal fan control strategy, and then the ventilation and temperature control of the grain depot are controlled based on the strategy, so as to control the operation power, speed and time length of each fan in the ventilation system of the grain depot, thereby realizing the accurate ventilation and temperature control of the grain depot.

[0173] Therefore, by means of the AI-based accurate temperature control method of the grain depot described in detail in the foregoing steps S1-S3, the application constructs a grain depot temperature prediction model combining a convolution network layer, an attention layer and a bidirectional gated recurrent network layer. The model extracts local and global features based on convolution and fuses the features to more comprehensively describe the grain condition features. Then, the attention mechanism is introduced to assign feature weights to highlight the features that have a greater impact on the prediction of the stored grain temperature. Next, the bidirectional gated recurrent network layer is combined to mine the global dependency relationship of the grain condition fusion features, and the grain depot temperature prediction is completed. Therefore, the application can better utilize the time sequence and multi-dimensional features of the data, thereby solving the problem of low accuracy of the grain depot temperature prediction caused by the complex nonlinear relationship between the traditional technology and other factors, improving the prediction accuracy of the stored grain temperature, and thus realizing the accurate ventilation and temperature control of the grain depot. Therefore, the method is very suitable for large-scale application and promotion.

[0174] As shown in Figure 4 the second aspect of the present embodiment provides a hardware system for implementing the AI-based accurate temperature control method of the grain depot described in the first aspect of the embodiment, comprising:

[0175] The acquisition unit is configured to acquire the grain condition information and the external environment information of the grain depot within a historical preset time length. The grain condition information includes the average temperature of the grain pile, the maximum temperature of the grain pile, the minimum temperature of the grain pile and the temperature and humidity in the grain depot, and the external environment information includes the atmospheric temperature and humidity.

[0176] The temperature prediction unit is configured to generate an input sequence by using the grain condition information and the external environment information, and input the input sequence into the grain depot temperature prediction model to obtain a temperature prediction sequence of the grain depot within a future preset time length.

[0177] The ventilation and temperature control unit is configured to generate a ventilation and temperature control strategy by using the temperature prediction sequence, and control the operation of the ventilation system of the grain depot according to the ventilation and temperature control strategy.

[0178] The grain depot temperature prediction model comprises a convolution network layer, an attention layer and a bidirectional gated recurrent network layer connected in sequence.

[0179] The convolution network layer is configured to extract features from the input sequence to obtain local grain condition features and global grain condition features, and fuse the local grain condition features and the global grain condition features to obtain grain condition fusion features.

[0180] an attention layer configured to perform attention weight calculation on the grain condition fusion feature by using an attention mechanism to obtain a grain condition fusion feature with assigned weights.

[0181] a bidirectional gated recurrent network layer configured to generate the temperature prediction sequence based on the grain condition fusion feature with assigned weights.

[0182] The working process, working details and technical effects of the system provided in this embodiment can be referred to the first aspect of the embodiment, and will not be repeated here.

[0183] As shown in Figure 5 The third aspect of the embodiment provides an AI-based stereoscopic ventilation precise temperature control device for grain warehouse. Taking the device as an electronic device, the device comprises a memory, a processor and a transceiver connected in sequence. The memory is configured to store a computer program. The transceiver is configured to receive and send messages. The processor is configured to read the computer program and execute the AI-based stereoscopic ventilation precise temperature control method of the first aspect of the embodiment.

[0184] For example, the memory can include, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a flash memory, a first-in first-out memory (FIFO) and / or a first-in last-out memory (FILO), etc. Specifically, the processor can include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor can be implemented in at least one of the following hardware forms: a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). In addition, the processor can include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (central processing unit). The coprocessor is a low-power processor for processing data in a standby state.

[0185] In some embodiments, the processor can be integrated with a GPU (Graphics Processing Unit) that is responsible for rendering and drawing the content required to be displayed on the display screen, for example, the processor can not be limited to a microprocessor of STM32F105 series, a RISC (reduced instruction set computer) microprocessor, an X86 architecture processor, or a processor integrated with an embedded NPU (neural-network processing unit); the transceiver can be but not limited to a WIFI wireless transceiver, a Bluetooth wireless transceiver, a GPRS (General Packet Radio Service) wireless transceiver, a ZigBee wireless transceiver, a 3G transceiver, a 4G transceiver, and / or a 5G transceiver, etc. In addition, the device can also include but not limited to a power module, a display screen, and other necessary components.

[0186] The working process, working details and technical effects of the electronic device provided in the embodiment can be referred to the first aspect of the embodiment, and will not be repeated here.

[0187] The fourth aspect of the embodiment provides a storage medium storing instructions of the AI-based precise temperature control method for three-dimensional ventilation of a granary, i.e., the storage medium stores instructions, and when the instructions run on a computer, the AI-based precise temperature control method for three-dimensional ventilation of a granary is executed.

[0188] The storage medium refers to a carrier for storing data, which can include but is not limited to a floppy disk, an optical disk, a hard disk, a flash memory, a USB flash disk, and / or a Memory Stick, etc., and the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.

[0189] The working process, working details and technical effects of the storage medium provided in the embodiment can be referred to the first aspect of the embodiment, and will not be repeated here.

[0190] The fifth aspect of the embodiment provides a computer program product containing instructions, which, when running on a computer, causes the computer to execute the AI-based precise temperature control method for three-dimensional ventilation of a granary as described in the first aspect of the embodiment, wherein the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.

[0191] Finally, it should be noted that the above description is only the preferred embodiment of the present application, and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. An AI-based method for precise temperature control of three-dimensional ventilation of a grain depot, characterized by, The method comprises the following steps: acquiring grain condition information and external environment information of the grain depot within a preset historical time length, wherein the grain condition information comprises grain pile average temperature, grain pile maximum temperature, grain pile minimum temperature and grain depot internal temperature and humidity, and the external environment information comprises atmospheric temperature and humidity; generating an input sequence using the grain condition information and the external environment information, and inputting the input sequence into a grain depot temperature prediction model to obtain a temperature prediction sequence of the grain depot within a preset future time length; generating a ventilation and temperature control strategy using the temperature prediction sequence, and controlling the operation of the grain depot ventilation system according to the ventilation and temperature control strategy; wherein the grain depot temperature prediction model comprises a convolutional network layer, an attention layer and a bidirectional gated recurrent network layer connected in sequence; the convolutional network layer is used for feature extraction of the input sequence to obtain local grain condition features and global grain condition features, and the local grain condition features and the global grain condition features are fused to obtain grain condition fusion features; the attention layer is used for attention weight calculation of the grain condition fusion features by using an attention mechanism to obtain grain condition fusion features with assigned weights; the bidirectional gated recurrent network layer is used for generating the temperature prediction sequence based on the grain condition fusion features with assigned weights; generating a ventilation and temperature control strategy using the temperature prediction sequence comprises: determining the grain depot grain pile maximum temperature within the preset future time length based on the temperature prediction sequence; judging whether the grain depot grain pile maximum temperature is greater than a safety threshold value; if yes, constructing a ventilation and temperature control optimization model with the optimization objective of minimizing the ventilation cost, wherein the variables of the ventilation and temperature control optimization model include the fan operating power, operating speed and operating time length of the grain depot ventilation system, and the constraint conditions of the ventilation and temperature control optimization model include that the final temperature of the grain depot is less than or equal to the safety threshold value, wherein the ventilation and temperature control optimization model comprises an energy consumption cost term, a grain depot ventilation loss cost term and a safety penalty term, the grain depot ventilation loss cost term is used to measure the grain moisture loss caused by ventilation, and the safety penalty term is used to measure the penalty cost between the final temperature of the grain depot and the safety threshold value, if the final temperature of the grain depot is greater than the safety threshold value, and the greater the difference between the final temperature of the grain depot and the safety threshold value, the greater the penalty cost, and if the final temperature of the grain depot is less than or equal to the safety threshold value, the penalty cost is 0; solving the ventilation and temperature control optimization model to obtain a fan control strategy with the minimum ventilation cost and the final temperature of the grain depot less than or equal to the safety threshold value, and taking the obtained fan control strategy as the ventilation and temperature control strategy; solving the ventilation and temperature control optimization model comprises: acquiring an individual population at the nth iteration, wherein each individual in the individual population at the nth iteration corresponds to a fan control scheme of the grain depot ventilation system; calculating the fitness of each individual in the individual population at the nth iteration based on the ventilation and temperature control optimization model, wherein the greater the fitness of any individual, the smaller the ventilation cost of the fan control strategy corresponding to the any individual; determining a global optimal individual at the nth iteration based on the fitness of each individual at the nth iteration; judging whether an iteration stop condition is met; If not, a search probability is determined, and a first search random number and a second search random number corresponding to each individual are generated; According to the search probability, and the first search random number and the second search random number corresponding to each individual, an individual search mode of each individual at the n th iteration is determined, wherein the individual search mode comprises a boundary-based search mode, a local search mode and a global search mode; The position of each individual is updated by using the individual search mode, so as to obtain an individual population at the n+1 th iteration; n is increased by 1, and the individual population at the n th iteration is reacquired until the iteration stop condition is met, so as to determine a fan control strategy with the minimum ventilation cost and the final temperature of the granary less than or equal to the safety threshold based on the global optimal individual at the time when the iteration stop condition is met; According to the search probability, and the first search random number and the second search random number corresponding to each individual, an individual search mode of each individual at the n th iteration is determined, comprising: For any individual in the individual population at the n th iteration, it is judged whether the first search random number corresponding to the individual is less than the search probability; If not, a search factor of the individual is calculated according to the fitness of the individual and the fitness of the global optimal individual at the n th iteration, otherwise, the individual search mode of the individual is determined as the boundary-based search mode; It is judged whether the second search random number of the individual is less than the search factor of the individual; If yes, the individual search mode of the individual is determined as the local search mode, otherwise, the individual search mode of the individual is determined as the global search mode, and after all individuals in the individual population at the n th iteration are polled, the individual search mode of each individual is obtained; The position of each individual is updated by using the individual search mode, so as to obtain an individual population at the n+1 th iteration, comprising: For any individual in the individual population at the n th iteration, if the individual search mode of the individual is the local search mode, a first random individual is selected from the individual population at the n th iteration, wherein the first random individual is different from the individual; A first position search step and a second position search step at the n th iteration are calculated; The first position search step and the second position search step are calculated by using the following formula (3) and formula (4); (3) (4) In formula (3), denotes a first position search step size, denotes a first position maximum search step size, denotes a maximum number of iterations, denotes fitness of the respective individual and fitness of the global best individual, respectively; in formula (4), denotes a second position search step size, denotes a second position maximum search step size; An individual position update vector is calculated according to the global optimal individual at the n th iteration, the individual, the first random individual, the first position search step and the second position search step; The individual position update vector is calculated by using the following formula (5); (5) In formula (5), denotes the individual position update vector, denotes the global optimum individual, denotes the respective individual and the first random individual; The individual is locally searched by using the individual position update vector, so as to obtain an updated individual, and after each individual in the individual population at the n th iteration is polled, an individual population at the n+1 th iteration is obtained; For any individual in the individual population at the nth iteration, if the individual search mode of the individual is a global search mode, a second random individual is selected from the individual population at the nth iteration, wherein the second random individual is different from the individual; A global search strength is determined, and a global search random number is generated; The global search is performed on the individual according to the global search strength, the global search random number, the second random individual and the global optimal individual, to obtain an updated individual, and after each individual in the individual population at the nth iteration is polled, an individual population at the (n+1)th iteration is obtained; The global search is performed on the individual by using the following formula (6); (6) In formula (6), denotes the updated any individual, denotes the any individual and the second random individual, respectively, denotes a global search random number, denotes a global search strength, denotes a global optimal individual; For any individual in the individual population at the nth iteration, if the individual search mode of the individual is a boundary-based search mode, a boundary search weight of the individual is calculated; The boundary search weight is calculated by using the following formula (7); (7) In formula (7), denotes the boundary search weight of the respective individual, denote the boundary search maximum weight and the boundary search minimum weight, respectively; An individual search upper limit and an individual search lower limit are obtained; The position of the individual is updated according to the boundary search weight, the first search random number corresponding to the individual, the individual search upper limit and the individual search lower limit, to obtain an updated individual, and after each individual in the individual population at the nth iteration is polled, an individual population at the (n+1)th iteration is obtained; For the jth dimension of each sub-vector in the individual, the position is updated by using the following formula (8); (8) In formula (8), denotes the jth dimension of the kth sub-vector of the individual, denotes the updated , denote the boundary search weight and the corresponding first search random number of the individual, respectively, denote the jth dimension of the individual search upper bound and the individual search lower bound, respectively, j = 1, 2, 3, corresponding to the running power, the running speed and the running time, respectively.

2. The method of claim 1, wherein, The convolutional network layer comprises a local convolution unit, a Transformer network unit and a feature fusion unit. The local convolution unit is configured to perform multiple dilated causal convolution processing on the input sequence to obtain local grain condition features. The Transformer network unit is configured to perform global feature extraction on the input sequence to obtain global grain condition features. The feature fusion unit is configured to perform feature fusion processing on the local grain condition features and the global grain condition features, so as to obtain the grain condition fusion features after the feature fusion processing.

3. The method of claim 2, wherein, The local convolution unit comprises a first dilated causal convolution structure layer, a second dilated causal convolution structure layer, a one-dimensional convolution layer and a feature splicing layer. The first dilated causal convolution structure layer is configured to perform one-time dilated causal convolution processing on the input sequence to obtain first initial local features, and input the first initial local features to the second dilated causal convolution structure layer. The second dilated causal convolution structure layer is configured to perform two-time dilated causal convolution processing on the first initial local features to obtain second initial local features. The one-dimensional convolution layer is configured to perform 1×1 convolution processing on the input sequence to obtain third initial local features. The feature splicing layer is configured to perform feature splicing on the second initial local features and the third initial local features to obtain the local grain condition features. The first and second dilated causal convolution structure layers have the same structure, and each includes a dilated causal convolution layer, a batch normalization layer, an exponential linear unit layer, and a regularization layer connected in sequence.

4. An AI-based precise temperature control system for three-dimensional ventilation of a grain depot, characterized by, The AI-based warehouse three-dimensional ventilation precise temperature control method of any one of claims 1-3, wherein the system comprises: An acquisition unit configured to acquire grain condition information and external environment information of the warehouse within a historical preset time period, wherein the grain condition information comprises grain pile average temperature, grain pile maximum temperature, grain pile minimum temperature, and warehouse internal temperature and humidity, and the external environment information comprises atmospheric temperature and humidity; A temperature prediction unit configured to generate an input sequence using the grain condition information and the external environment information, and input the input sequence into a warehouse temperature prediction model to obtain a temperature prediction sequence of the warehouse within a future preset time period; A ventilation and temperature control unit configured to generate a ventilation and temperature control strategy using the temperature prediction sequence, and control the warehouse ventilation system to operate according to the ventilation and temperature control strategy; The warehouse temperature prediction model comprises a convolutional network layer, an attention layer, and a bidirectional gated recurrent network layer connected in sequence; The convolutional network layer is configured to extract features of the input sequence to obtain local grain condition features and global grain condition features, and perform feature fusion on the local grain condition features and the global grain condition features to obtain grain condition fusion features; The attention layer is configured to perform attention weight calculation on the grain condition fusion features using an attention mechanism to obtain grain condition fusion features with assigned weights; The bidirectional gated recurrent network layer is configured to generate the temperature prediction sequence based on the grain condition fusion features with assigned weights.

Citation Information

Patent Citations

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

    CN116720620A

  • Chicken house temperature prediction algorithm based on TCN-Transformer

    CN119719990A

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

    CN120725247A