A granary management method, system, computer device and medium
By combining a digital twin of a grain warehouse with an IoT platform, intelligent management of the entire grain warehouse scenario is achieved. This solves the problems of incomplete monitoring, low digitalization, and fragmented processes in existing technologies, improves management accuracy and efficiency, reduces costs, and ensures the safety of grain storage.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- PERSIMMON HOLDINGS LTD
- Filing Date
- 2026-04-20
- Publication Date
- 2026-07-14
AI Technical Summary
The existing grain warehouse management model suffers from limited monitoring dimensions, low digitalization, fragmented processes, and insufficient visualization, resulting in low management accuracy and high costs, making it difficult to meet the needs of modern grain warehouses for large-scale and refined management.
By constructing a digital twin of the grain warehouse and combining it with the Internet of Things and a visual management platform, real-time mapping between the physical grain warehouse and the digital twin is achieved, enabling full-dimensional data collection and fusion, building a unified data platform, conducting intelligent management and control, identifying abnormal situations in real time, and generating optimization decision suggestions.
It has enabled intelligent management of grain warehouses across all scenarios, processes, and elements, improving management accuracy and efficiency, reducing management costs, and ensuring the safety of grain storage.
Smart Images

Figure CN122390629A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of grain warehouse management technology, and in particular to a grain warehouse management method, system, computer equipment and medium. Background Technology
[0002] Food security is a crucial component of national security. Grain warehouses, as the core carriers of grain storage, directly impact the quality and safety of stored grain through their management efficiency and control precision. Existing grain warehouse management models largely rely on manual inspections, traditional sensor monitoring, and simple data recording, resulting in several pain points: First, monitoring dimensions are limited, often only monitoring basic parameters like temperature and humidity, failing to comprehensively cover key indicators such as mold, pests, moisture changes, and equipment wear and tear. Furthermore, data collection is often delayed, hindering real-time control. Second, physical grain warehouses are disconnected from digital management, lacking a comprehensive digital mapping of the warehouse environment, grain pile status, and equipment operation. Managers cannot intuitively grasp the overall state of the grain warehouse, relying on experience-based judgments with low accuracy. Third, management processes are fragmented, with a lack of coordination and linkage between grain entry, storage, exit, and equipment maintenance processes, hindering data sharing and creating management loopholes. Fourth, visualization is low, only presenting simple numerical data and failing to provide intelligent functions such as anomaly warnings, process traceability, and simulation, making it difficult to meet the demands of modern, large-scale, and refined grain warehouse management. While some existing technologies incorporate the Internet of Things (IoT) or simple visualization techniques, they fail to achieve deep integration of digital twins with IoT and visualization management platforms. This hinders real-time linkage between physical grain warehouses and their digital twins, and prevents the realization of intelligent end-to-end control through visualization platforms. Consequently, issues such as insufficient control precision, low decision-making efficiency, and high management costs persist, making it difficult to meet the demands of high-quality grain warehouse management. Therefore, developing a comprehensive, multi-dimensional, and intelligent grain warehouse management solution based on digital twins, IoT, and visualization management platforms has become a pressing technical challenge. Summary of the Invention
[0003] The purpose of this invention is to propose a grain warehouse management method, system, computer equipment, and medium to address the shortcomings of existing grain warehouse management and monitoring, such as incomplete monitoring, low digitalization, fragmented processes, and insufficient visualization. This invention aims to achieve intelligent control of all scenarios, processes, and elements of grain warehouses, thereby improving management accuracy and efficiency, reducing management costs, and ensuring the safety of grain storage.
[0004] To achieve the above objectives, this invention proposes a grain warehouse management method, the specific steps of which are as follows: Step S1: By deploying IoT sensing devices inside and outside the grain warehouse, collect real-time grain warehouse environmental parameters, grain pile status parameters, storage equipment operation parameters and grain flow parameters, and preprocess the collected raw data to obtain standardized sensing data. Step S2: Based on the 3D model data of the physical grain warehouse, the preset grain warehouse parameters and standardized perception data, construct a digital twin of the grain warehouse and establish a real-time mapping relationship between the physical grain warehouse and the digital twin. Step S3: Build a visual management platform to integrate standardized sensing data, digital twin data, and data from the entire grain warehouse management process, and construct a unified data platform. Step S4: Interact with the digital twin through the visualization management platform to achieve intelligent control of grain warehouse environment regulation, grain pile status monitoring, equipment operation and maintenance, and grain circulation; at the same time, analyze and model based on historical and real-time data from the data platform to generate optimization decision suggestions. Step S5: In real time, compare the standardized sensing data with the preset threshold, combine the state simulation of the digital twin, identify abnormal situations and trigger the corresponding level of early warning, generate an emergency response plan, and push it to the visualization management platform to realize rapid response and handling of abnormal situations.
[0005] Preferably, in step S1, the data preprocessing employs a three-level processing mechanism: adaptive threshold cleaning, improved LSTM missing value imputation, and Z-score normalization. The specific steps are as follows: Step S11: Using an improved 3σ adaptive threshold algorithm, combined with the temporal characteristics of grain warehouse monitoring data, the outlier identification threshold is dynamically adjusted to remove outliers and noisy data from the collected data, retaining valid data; the formula for the improved 3σ adaptive threshold algorithm is as follows: ; ; ; in, An adaptive anomaly detection threshold for grain warehouse monitoring data. This is the weighted average of the raw time-series data from the sensor. As a correlation factor for the state of the grain pile, To achieve a dynamic correction coefficient that integrates time-series weights, regional correction coefficients, and seasonal adjustment coefficients, The weighted standard deviation of the raw time-series data from the sensor. For the number of samples, For the first i Secondary sampling data; Step S12: Using an improved Long Short-Term Memory (LSTM) network, combined with spatiotemporal correlation data from adjacent sensors, missing valid data is filled in; wherein, the improved LSTM network achieves accurate completion of missing data by embedding a spatiotemporal attention module, optimizing the gating activation function, and adding residual connections. Step S13: Convert the data collected by different types of sensors into standardized data in a unified format using the Z-score normalization algorithm.
[0006] Preferably, in step S2, the construction of the digital twin of the grain warehouse includes the following steps: Step S21: Using BIM technology combined with laser scanning technology, collect information on the structural dimensions, layout distribution, and equipment location of the physical entity of the grain warehouse, and construct a 1:1 high-precision three-dimensional basic model, covering the static elements of the silo group, conveying equipment, loading and unloading machinery, and grain pile zoning. Step S22: Import preset grain warehouse parameters, which include grain warehouse capacity, grain type, storage period, safety threshold and equipment parameters; Step S23: Integrate standardized sensing data into the three-dimensional basic model in real time to construct a digital twin of the grain warehouse, thereby realizing a full-dimensional digital mapping of the physical grain warehouse.
[0007] Preferably, the real-time mapping relationship is implemented based on a fusion technology of edge computing, federated learning, and dynamic time warping (DTW), and the specific steps are as follows: Step S24: Transmit the real-time data collected by the IoT sensing device to the edge node via 5G / Industrial Internet; Step S25: The edge nodes adopt a lightweight federated learning algorithm to achieve collaborative processing of multi-source sensor data, remove invalid data, and extract key feature data. Step S26: Using the Dynamic Time Warping (DTW) algorithm, align the temporal differences between the physical grain warehouse status data and the digital twin data, and synchronously update the processed data to the grain warehouse digital twin; the DTW distance calculation formula is as follows: ; Where x is the physical grain warehouse data sequence, and y is the digital twin data sequence. for and Euclidean distance, The time-series alignment weight is denoted by m, where m is the length of the physical grain warehouse data sequence and n is the length of the digital twin data sequence.
[0008] Preferably, in step S3, the visualization management platform adopts a dual-terminal architecture of Web + mobile terminal, and the data platform includes a data fusion module, a data storage module, and a data retrieval module. The specific steps are as follows: Step S31: Receive standardized sensing data from the IoT sensing layer, digital twin data from the digital twin layer, and full-process data of grain warehouse management; Step S32: Through the self-attention mechanism of the improved Transformer fusion model, the spatiotemporal correlation features of multi-source data are mined, and the multi-source data are integrated into a unified data resource; wherein, the formula of the self-attention mechanism of the improved Transformer fusion model is: ; Where Q, K, and V are the query matrix, key matrix, and value matrix, respectively. For spatiotemporal correlation enhancement matrix, Let T be the dimension of the key matrix, and T be the transpose operation. Step S33: The integrated data is stored in a data storage module that adopts a distributed storage + federated storage architecture. The data calling module provides a standardized data calling interface through a dynamic data scheduling algorithm based on an attention mechanism.
[0009] Preferably, in step S4, the intelligent control includes the following steps: Step S41: View the grain warehouse environment parameters presented by the digital twin through the visualization management platform. When the parameters are close to the preset threshold, the control command is automatically triggered to control the operation of related equipment, or the equipment is manually operated to achieve precise control of the grain warehouse environment. Step S42: View the three-dimensional image of the grain pile inside the warehouse through the VR perspective function of the digital twin, present the temperature field changes of the grain pile in combination with the heat map, analyze the risk of mold growth of the grain pile through gas sensor data, identify the types and quantities of pests through insect monitoring data, and record the trend of grain pile status changes. Step S43: Present the operating status of the warehousing equipment through a digital twin, analyze the equipment wear and tear by combining the equipment operating parameters, establish an equipment failure prediction model, and drive preventive maintenance. Step S44: View the dynamic process of grain entering and leaving the warehouse in real time through the visualization platform. Combine RFID data and weight data to automatically record relevant grain information, generate a visualized inventory ledger, and simulate the grain circulation process through a digital twin to optimize the operation plan.
[0010] Preferably, the generation of the optimization decision suggestions adopts a two-layer system of CNN-LSTM fusion prediction model + NSGA-Ⅲ multi-objective optimization algorithm, and the specific steps are as follows: Step S45: Based on the historical and real-time data of the data platform, construct a CNN-LSTM fusion prediction model. Extract spatial features through CNN and extract temporal features through LSTM to predict the trend of grain pile mold, equipment failure probability, and grain quality change pattern. Step S46: Using the prediction results output by the CNN-LSTM fusion prediction model, combined with historical management data from the data platform, analyze the trend of grain pile status changes, equipment operation patterns, grain circulation efficiency, and management costs; the fusion prediction model formula is as follows: ; in, The predicted value at time t , These are spatial feature data and temporal feature data, respectively. For bias terms, , These are the weight matrices output by CNN and LSTM, respectively. Step S47: Using the NSGA-III multi-objective optimization algorithm, with the three-dimensional optimization objectives of minimizing grain loss, minimizing management costs, and maximizing equipment lifespan, the algorithm collaboratively optimizes the grain storage environment control parameters, equipment maintenance cycle, and grain rotation plan to generate optimal decision recommendations. The fitness function formula for the multi-objective optimization is as follows: ; in, For fitness value, , These represent the maximum and minimum losses, respectively. , These represent the maximum and minimum costs, respectively. , These represent the maximum and minimum lifespan of the equipment, respectively. , , These are actual grain loss, management costs, and equipment lifespan, respectively. , , To optimize the weights.
[0011] Preferably, in step S5, the anomaly warning and emergency response adopts a fusion algorithm identification + dynamic threshold + intelligent solution generation system, and the specific steps are as follows: Step S51: Using the improved YOLOv8 and isolated forest fusion algorithm, combined with the dynamic threshold adaptive adjustment model, the standardized sensing data and dynamic threshold are compared in real time. Combined with the state simulation of the digital twin, abnormal situations in grain piles, environment, equipment and grain flow are identified. The improved YOLOv8 is used to process video surveillance data, and the loss function formula is: ; in, The value of the loss function. , , These are classification loss, bounding box loss, target confidence loss, and coordinate loss, respectively. , , For loss weights; The formula for dynamic threshold adaptive adjustment is as follows: ; in, The dynamic threshold at time t, Based on the threshold, For a period of time, This is real-time data at time t. , These are the mean and standard deviation of the historical data, respectively. , For adjustment coefficients; Step S52: Based on the severity of the abnormal situation, determine the warning priority using the AHP (Analytic Hierarchy Process) method, and trigger warnings at three levels: general warning, moderate warning, and severe warning. Step S53: Match the emergency response plan database to generate a targeted emergency response plan; Step S54: Push the emergency response plan to the management personnel. The management personnel can view the anomaly details and the abnormal status of the digital twin, track the response progress, record the response results, form an anomaly response ledger, and enter the response data into the emergency plan database simultaneously.
[0012] The present invention also provides a grain storage management system, comprising: The IoT sensing layer is used to deploy IoT sensing devices to collect grain warehouse environmental parameters, grain pile status parameters, storage equipment operating parameters, and grain circulation parameters, and to preprocess the raw data to output standardized sensing data. The digital twin layer is used to acquire the 3D model data of the physical entity of the grain warehouse, the preset grain warehouse parameters, and the standardized sensing data output by the IoT sensing layer, to construct a digital twin of the grain warehouse, establish a real-time mapping between the physical grain warehouse and the digital twin, and achieve dynamic synchronization between the two. The data middle platform layer is used to receive standardized sensing data from the IoT sensing layer, digital twin data from the digital twin layer, and data from the entire grain warehouse management process, and to perform data fusion, cleaning, storage, and retrieval to build a unified data sharing system. The visualization management platform layer is used to realize the visualization of data, interactive operation of digital twins, and intelligent control of grain warehouse environment regulation, grain pile status monitoring, equipment operation and maintenance, and grain circulation. At the same time, it receives the analysis results of the data middle platform layer and generates optimization decision suggestions and abnormal early warning information. The emergency response module is used to receive abnormal early warning information pushed by the visual management platform, generate corresponding emergency response plans, and push them to relevant management personnel to achieve rapid handling of abnormalities.
[0013] The present invention also provides a computer device, including: a memory and a processor; the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described grain warehouse management method.
[0014] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described grain warehouse management method.
[0015] Therefore, this invention proposes a grain warehouse management method, system, computer equipment, and medium, the beneficial effects of which are as follows: (1) This invention innovatively realizes the deep integration of digital twins, Internet of Things and visualization management platform, and constructs a real-time mapping between physical grain warehouse and digital twin, breaking the limitation of the disconnect between digitalization and physical scene in the existing technology. Managers can intuitively grasp the status of the whole scene and all elements of the grain warehouse through the visualization platform, realize "one screen overview and global control", and greatly improve the intuitiveness and accuracy of management.
[0016] (2) This invention realizes multi-dimensional and all-round data collection, covering all elements such as grain warehouse environment, grain pile status, equipment operation, and grain circulation. Combined with data preprocessing and fusion technology, it solves the problems of single monitoring dimension, data lag and disorder in the existing technology, and provides reliable data support for intelligent management and control.
[0017] (3) This invention can predict risks such as grain pile mold and equipment failure in advance through the simulation function of digital twins. Combined with the intelligent control and decision-making function of the visualization management platform, it realizes the transformation from "experience-driven" to "data-driven", improves the scientificity and foresight of decision-making, and realizes the coordinated linkage of various management processes, solving the problem of fragmentation of existing technology processes.
[0018] (4) The present invention constructs a graded abnormality early warning and emergency response mechanism. By combining real-time data monitoring and digital twin state simulation, it realizes rapid identification, early warning and response to abnormal situations, minimizes grain loss and equipment failure losses, and ensures the safety of grain storage.
[0019] (5) This invention can be adapted to grain warehouses of different sizes and types. It is highly versatile and flexible in deployment. It can effectively reduce the cost of manual management, improve management efficiency, and promote the transformation of grain warehouse management from the traditional extensive mode to full-process digitalization, dynamic visualization and intelligent refinement. It has significant practical value and promotion significance.
[0020] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0021] Figure 1 This is a flowchart of a grain warehouse management method according to the present invention; Figure 2 This is an architecture diagram of a grain storage management system according to the present invention. Detailed Implementation
[0022] To make the technical solutions, advantages, and objectives of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below. The described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention without creative effort are within the protection scope of the present invention.
[0023] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.
[0024] Example 1 like Figure 1 As shown, the present invention provides a grain warehouse management method, the specific steps of which are as follows: Step S1: By deploying IoT sensing devices inside and outside the grain warehouse, collect real-time grain warehouse environmental parameters, grain pile status parameters, storage equipment operation parameters and grain flow parameters, and preprocess the collected raw data to obtain standardized sensing data. Specifically, IoT sensing devices include, but are not limited to, temperature and humidity sensors, moisture sensors, gas sensors (detecting carbon dioxide, oxygen, phosphine, etc.), pest monitoring equipment, video surveillance equipment, vibration sensors, RFID readers, and weight sensors. Among these, temperature and humidity sensors, moisture sensors, gas sensors, and pest monitoring equipment are embedded inside the grain pile and on the inner wall of the grain silo to achieve comprehensive monitoring of the grain pile and grain silo environment; vibration sensors are deployed on storage equipment such as ventilators, conveyors, and gates to monitor the operating status of the equipment; RFID readers are deployed at the entrance and exit of the grain silo and at the grain pile partitions, and in conjunction with RFID tags on the grain packaging, collect grain circulation information; weight sensors are deployed at the bottom of the grain silo and on the conveying equipment to collect the weight of grain entering and leaving the warehouse and the weight of the stored grain; and video surveillance equipment covers the inside and outside of the grain silo and key operating areas to achieve visual monitoring.
[0025] Data preprocessing employs a three-stage algorithm: adaptive threshold cleaning, improved LSTM missing value imputation, and normalization. Specifically: First, by using an improved 3σ adaptive threshold algorithm, combined with the temporal characteristics of grain storage monitoring data, the outlier identification threshold is dynamically adjusted to eliminate data exceeding the sensor's range, abrupt changes, and noise (compared to the traditional 3σ algorithm, the adaptive threshold can be dynamically optimized based on the monitoring data characteristics of different areas and seasons of the grain pile, reducing false positives). The formula is as follows: ; ; ; in, An adaptive anomaly detection threshold for grain warehouse monitoring data. This is the weighted average of the raw time-series data from the sensor. The correlation factor for grain pile condition (determined jointly by grain pile moisture and temperature gradient, 0.6≤ ≤1.4), To achieve a dynamic correction coefficient that integrates time-series weights, regional correction coefficients, and seasonal adjustment coefficients, The weighted standard deviation of the raw time-series data from the sensor. For the number of samples, For the first i Secondary sampling data; Secondly, an improved Long Short-Term Memory (LSTM) network is used, combined with spatiotemporal correlation data from adjacent sensors, to complete the missing valid data. The improved LSTM network achieves accurate completion of missing data by embedding a spatiotemporal attention module, optimizing the gating activation function, and adding residual connections. Compared with the traditional linear interpolation method, the completion accuracy is improved by more than 30%, effectively avoiding data distortion caused by single interpolation. Finally, the Z-score normalization algorithm is used to convert the data collected by different types of sensors into standardized data in a unified format.
[0026] Step S2: Based on the 3D model data of the physical grain warehouse, the preset grain warehouse parameters and standardized perception data, construct a digital twin of the grain warehouse and establish a real-time mapping relationship between the physical grain warehouse and the digital twin. The specific steps for constructing a digital twin of a grain warehouse are as follows: Step S21: Using BIM technology combined with laser scanning technology, collect information such as the structural dimensions, layout distribution, and equipment location of the physical entity of the grain warehouse, and construct a 1:1 high-precision three-dimensional basic model with centimeter-level accuracy, covering static elements of the entire scene such as silo groups, conveying equipment, loading and unloading machinery, and grain pile zoning. Step S22: Import preset grain silo parameters, including grain silo capacity, grain type, storage period, safety thresholds (temperature and humidity thresholds, moisture thresholds, gas concentration thresholds, etc.), equipment parameters, etc. Step S23: Integrate the standardized perception data obtained in step S1 into the three-dimensional basic model in real time, endow the three-dimensional model with dynamic attributes, construct a digital twin of the grain warehouse, and realize the full-dimensional digital mapping of the physical grain warehouse.
[0027] The real-time mapping relationship is achieved through a fusion of edge computing, federated learning, and Dynamic Time Warping (DTW). The specific steps are as follows: Step S24: Transmit the real-time data collected by the IoT sensing device to the edge node via 5G / Industrial Internet; Step S25: The edge nodes adopt a lightweight federated learning algorithm to achieve collaborative processing of multi-source sensor data without leaking the privacy of the original data of each sensor, thereby eliminating invalid data and extracting key feature data. Step S26: Using the Dynamic Time Warping (DTW) algorithm, align the temporal differences between the physical grain warehouse status data and the digital twin data, and synchronously update the processed data to the grain warehouse digital twin; the DTW distance calculation formula is as follows: ; Where x is the physical grain warehouse data sequence, and y is the digital twin data sequence. for and Euclidean distance, The time-series alignment weight is denoted by m, where m is the length of the physical grain warehouse data sequence and n is the length of the digital twin data sequence.
[0028] Step S3: Build a visual management platform to integrate standardized sensing data, digital twin data, and data from the entire grain warehouse management process, and construct a unified data platform. Specifically, the visualization management platform adopts a dual-terminal architecture of web and mobile terminals, supporting multi-terminal access. The platform includes visualization display modules, interactive operation modules, intelligent control modules, decision analysis modules, and early warning modules. The data platform layer includes a data fusion module, a data storage module, and a data retrieval module. The data fusion module uses an improved Transformer fusion model, receiving standardized sensing data from the IoT sensing layer, digital twin data from the digital twin layer (including 3D model data and dynamically synchronized data), and data from the entire grain warehouse management process (including grain entry records, exit records, inventory ledgers, equipment maintenance records, and anomaly handling records). The self-attention mechanism formula of its improved Transformer fusion model is: ; Where Q, K, and V are the query matrix, key matrix, and value matrix, respectively. For spatiotemporal correlation enhancement matrix, Let T be the key matrix dimension, and T be the transpose operation. This formula is used to mine the spatiotemporal correlation features of multi-source data, eliminate data redundancy, fill the gap in data heterogeneity, and integrate multi-source data into a unified data resource (compared to traditional fusion algorithms, the data fusion efficiency is improved by 50%, and the accuracy of correlation feature recognition is improved by 35%). The data storage module adopts distributed storage technology combined with a federated storage architecture to store structured data (such as parameter thresholds and record data) and unstructured data (such as video data and 3D model data) separately, which not only ensures the security and scalability of data storage, but also achieves data privacy protection. The data retrieval module adopts a dynamic data scheduling algorithm based on an attention mechanism. According to the calling needs of the visualization management platform and various functional modules, it prioritizes the scheduling of high-frequency and critical data to improve the data retrieval response speed.
[0029] Step S4: Interact with the digital twin through the visualization management platform to achieve intelligent control of grain warehouse environment regulation, grain pile status monitoring, equipment operation and maintenance, and grain circulation; at the same time, analyze and model based on historical and real-time data from the data platform to generate optimization decision suggestions. Intelligent management and control includes the following steps: Step S41: View the grain warehouse environment parameters presented by the digital twin through the visualization management platform. When the parameters are close to the preset threshold, the control command is automatically triggered to control the operation of related equipment, or the equipment is manually operated to achieve precise control of the grain warehouse environment. Step S42: View the three-dimensional image of the grain pile in the warehouse through the VR perspective function of the digital twin, present the temperature field changes of the grain pile in combination with the heat map, analyze the risk of mold growth of the grain pile through gas sensor data, identify the types and quantities of pests through insect monitoring data, realize all-round and blind-spot-free monitoring of the grain pile status, and record the trend of grain pile status changes to provide a basis for subsequent management. Step S43: Present the operating status of the warehousing equipment through a digital twin, analyze the equipment wear and tear by combining the equipment operating parameters, establish an equipment failure prediction model, and drive preventive maintenance. Step S44: View the dynamic process of grain entering and leaving the warehouse in real time through the visualization platform. Combine RFID data and weight data to automatically record information such as the source, variety, quantity, storage location, and circulation time of the grain, and generate a visualized inventory ledger to achieve transparent management of grain source traceability, destination traceability, and accountability. At the same time, simulate the grain circulation process through a digital twin to optimize the entry and exit operation plan and improve operation efficiency.
[0030] The generation of optimized decision recommendations adopts a two-layer system of CNN-LSTM fusion prediction model + NSGA-Ⅲ multi-objective optimization algorithm. The specific steps are as follows: Step S45: Based on the historical and real-time data of the data platform, construct a CNN-LSTM fusion prediction model. Extract spatial features through CNN and extract temporal features through LSTM to predict the trend of grain pile mold, equipment failure probability, and grain quality change pattern. Step S46: Using the prediction results output by the CNN-LSTM fusion prediction model, combined with historical management data from the data platform, analyze the trend of grain pile status changes, equipment operation patterns, grain circulation efficiency, and management costs; the fusion prediction model formula is as follows: ; in, The predicted value at time t , These are spatial feature data and temporal feature data, respectively. For bias terms, , These are the weight matrices output by CNN and LSTM, respectively. Step S47: Using the NSGA-III multi-objective optimization algorithm, with the three-dimensional optimization objectives of minimizing grain loss, minimizing management costs, and maximizing equipment lifespan, the algorithm collaboratively optimizes the grain storage environment control parameters, equipment maintenance cycle, and grain rotation plan to generate optimal decision recommendations. The fitness function formula for the multi-objective optimization is as follows: ; in, For fitness value, , These represent the maximum and minimum losses, respectively. , These represent the maximum and minimum costs, respectively. , These represent the maximum and minimum lifespan of the equipment, respectively. , , These are actual grain loss, management costs, and equipment lifespan, respectively. , , To optimize the weights.
[0031] For example, based on historical temperature and humidity data, grain pile mold data, and environmental control costs, the temperature and humidity control thresholds and ventilation duration of grain warehouses can be optimized; based on equipment operating parameters and maintenance costs, the preventive maintenance cycle of equipment can be optimized; and based on grain inventory data, market demand, and storage losses, the grain rotation plan can be optimized, providing managers with scientific and accurate decision support.
[0032] Step S5: In real time, compare the standardized sensing data with the preset threshold, combine the state simulation of the digital twin, identify abnormal situations and trigger the corresponding level of early warning, generate an emergency response plan, and push it to the visualization management platform to realize rapid response and handling of abnormal situations.
[0033] Specifically, abnormal situations include excessive temperature and humidity in the grain pile, excessive moisture, abnormal gas concentrations (such as excessively high phosphine concentration and excessively low oxygen concentration), insect outbreaks, equipment malfunctions, grain theft, and fires. The preset thresholds adopt a dynamic threshold adaptive adjustment model, and the dynamic threshold adjustment formula is as follows: ; in, The dynamic threshold at time t, Based on the threshold, For a period of time, This is real-time data at time t. , These are the mean and standard deviation of the historical data, respectively. , To adjust the coefficients, the threshold is dynamically adjusted in real time based on grain variety, storage period, equipment type, seasonal changes, and historical abnormal data to avoid false alarms and missed alarms caused by fixed thresholds. Anomaly detection employs a fusion algorithm combining an improved YOLOv8 and Isolation Forest. The improved YOLOv8 algorithm is used to process video surveillance data, accurately identifying visual anomalies such as grain theft, fires, and equipment malfunctions. The improved YOLOv8 loss function formula is as follows: ; in, The value of the loss function. , , These are classification loss, bounding box loss, target confidence loss, and coordinate loss, respectively. , , For loss weights; The Isolation Forest algorithm is used to process time-series sensor data and quickly identify abnormal fluctuations in parameters such as temperature, humidity, moisture, and gas concentration in grain piles. Its Isolation Forest anomaly scoring formula is as follows: ; in, For anomaly scoring (0≤ ≤1), For the sample Average path length, The standard average path length, The data correlation coefficient, combined with the state simulation of the digital twin, enables comprehensive and seamless identification of abnormal situations. The warning level is divided into three levels: general warning, moderate warning, and severe warning. Different levels correspond to different warning methods (such as platform pop-ups, sound reminders, SMS push, telephone notifications, etc.). The warning priority is determined by the AHP hierarchical analysis method to ensure that key anomalies are pushed first.
[0034] When an anomaly is detected, the visualization management platform immediately triggers an alert of the corresponding level, calls upon the matching emergency response plan library, and generates a targeted and implementable emergency response plan. The emergency response plan is pushed to the mobile and web terminals of relevant management personnel. Management personnel can view the anomaly details and the abnormal status of the digital twin through the visualization platform, track the response progress in real time, and after the response is completed, the system automatically enters the response data into the plan library for model parameter optimization, improves the accuracy of subsequent emergency response plans, and minimizes losses.
[0035] Example 2 like Figure 2 As shown, this embodiment provides a grain warehouse management system based on digital twins, the Internet of Things (IoT), and a visual management platform to implement the grain warehouse management method in Embodiment 1 above. It includes an IoT sensing layer, a digital twin layer, a data middleware layer, a visual management platform layer, and an emergency response module. Data interaction between each layer and module is achieved through communication protocols (such as MQTT and HTTP), including: The IoT sensing layer is used to deploy IoT sensing devices to collect grain warehouse environmental parameters, grain pile status parameters, storage equipment operating parameters, and grain circulation parameters, and to preprocess the raw data to output standardized sensing data. The digital twin layer is used to acquire the 3D model data of the physical entity of the grain warehouse, the preset grain warehouse parameters, and the standardized sensing data output by the IoT sensing layer, to construct a digital twin of the grain warehouse, establish a real-time mapping between the physical grain warehouse and the digital twin, and achieve dynamic synchronization between the two. The data middle platform layer is used to receive standardized sensing data from the IoT sensing layer, digital twin data from the digital twin layer, and data from the entire grain warehouse management process, and to perform data fusion, cleaning, storage, and retrieval to build a unified data sharing system. The visualization management platform layer is used to realize the visualization of data, interactive operation of digital twins, and intelligent control of grain warehouse environment regulation, grain pile status monitoring, equipment operation and maintenance, and grain circulation. At the same time, it receives the analysis results of the data middle platform layer and generates optimization decision suggestions and abnormal early warning information. The emergency response module is used to receive abnormal early warning information pushed by the visual management platform, generate corresponding emergency response plans, and push them to relevant management personnel to achieve rapid handling of abnormalities.
[0036] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0037] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-including system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0038] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0039] It is worth noting that all contents not described in detail in this invention are existing technologies and are well known to those skilled in the art.
[0040] Therefore, this invention provides a grain warehouse management method, system, computer equipment, and medium. Through the deep integration of digital twins, the Internet of Things, and a visual management platform, it achieves intelligent control of all aspects and elements of grain warehouses across all scenarios. It solves the pain points of existing technologies such as incomplete monitoring, low digitalization, and fragmented processes, improves management accuracy and efficiency, reduces management costs and grain loss, and ensures the safety of grain storage. It has significant practical value and promotional significance.
[0041] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A grain warehouse management method, characterized in that, Includes the following steps: Step S1: By deploying IoT sensing devices inside and outside the grain warehouse, collect real-time grain warehouse environmental parameters, grain pile status parameters, storage equipment operation parameters and grain flow parameters, and preprocess the collected raw data to obtain standardized sensing data. Step S2: Based on the 3D model data of the physical grain warehouse, the preset grain warehouse parameters and standardized perception data, construct a digital twin of the grain warehouse and establish a real-time mapping relationship between the physical grain warehouse and the digital twin. Step S3: Build a visual management platform to integrate standardized sensing data, digital twin data, and data from the entire grain warehouse management process, and construct a unified data platform. Step S4: Interact with the digital twin through the visualization management platform to achieve intelligent control of grain warehouse environment regulation, grain pile status monitoring, equipment operation and maintenance, and grain circulation; at the same time, analyze and model based on historical and real-time data from the data platform to generate optimization decision suggestions. Step S5: In real time, compare the standardized sensing data with the preset threshold, combine the state simulation of the digital twin, identify abnormal situations and trigger the corresponding level of early warning, generate an emergency response plan, and push it to the visualization management platform to realize rapid response and handling of abnormal situations.
2. The grain storage management method according to claim 1, characterized in that, In step S1, the data preprocessing employs a three-level processing mechanism: adaptive threshold cleaning, improved LSTM missing value imputation, and Z-score normalization. The specific steps are as follows: Step S11: Using an improved 3σ adaptive threshold algorithm, combined with the temporal characteristics of grain warehouse monitoring data, the outlier identification threshold is dynamically adjusted to remove outliers and noisy data from the collected data, retaining valid data; the formula for the improved 3σ adaptive threshold algorithm is as follows: ; ; ; in, An adaptive anomaly detection threshold for grain warehouse monitoring data. This is the weighted average of the raw time-series data from the sensor. As a correlation factor for the state of the grain pile, To achieve a dynamic correction coefficient that integrates time-series weights, regional correction coefficients, and seasonal adjustment coefficients, The weighted standard deviation of the raw time-series data from the sensor. For the number of samples, For the first i Secondary sampling data; Step S12: Using an improved Long Short-Term Memory (LSTM) network, combined with spatiotemporal correlation data from adjacent sensors, missing valid data is filled in; wherein, the improved LSTM network achieves accurate completion of missing data by embedding a spatiotemporal attention module, optimizing the gating activation function, and adding residual connections. Step S13: Convert the data collected by different types of sensors into standardized data in a unified format using the Z-score normalization algorithm.
3. The grain storage management method according to claim 2, characterized in that, In step S2, the construction of the digital twin of the grain warehouse includes the following steps: Step S21: Using BIM technology combined with laser scanning technology, collect information on the structural dimensions, layout distribution, and equipment location of the physical entity of the grain warehouse, and construct a 1:1 high-precision three-dimensional basic model, covering the static elements of the silo group, conveying equipment, loading and unloading machinery, and grain pile zoning. Step S22: Import preset grain warehouse parameters, which include grain warehouse capacity, grain type, storage period, safety threshold and equipment parameters; Step S23: Integrate standardized sensing data into the three-dimensional basic model in real time to construct a digital twin of the grain warehouse, thereby realizing a full-dimensional digital mapping of the physical grain warehouse.
4. The grain storage management method according to claim 3, characterized in that, The real-time mapping relationship is implemented based on a fusion technology of edge computing, federated learning, and dynamic time warping (DTW). The specific steps are as follows: Step S24: Transmit the real-time data collected by the IoT sensing device to the edge node via 5G / Industrial Internet; Step S25: The edge nodes adopt a lightweight federated learning algorithm to achieve collaborative processing of multi-source sensor data, remove invalid data, and extract key feature data. Step S26: Using the Dynamic Time Warping (DTW) algorithm, align the temporal differences between the physical grain warehouse status data and the digital twin data, and synchronously update the processed data to the grain warehouse digital twin; the DTW distance calculation formula is as follows: ; Where x is the physical grain warehouse data sequence, and y is the digital twin data sequence. for and Euclidean distance, The time-series alignment weight is denoted by m, where m is the length of the physical grain warehouse data sequence and n is the length of the digital twin data sequence.
5. A grain storage management method according to claim 4, characterized in that, In step S3, the visualization management platform adopts a dual-terminal architecture of Web + mobile terminal. The data platform includes a data fusion module, a data storage module, and a data retrieval module. The specific steps are as follows: Step S31: Receive standardized sensing data from the IoT sensing layer, digital twin data from the digital twin layer, and full-process data of grain warehouse management; Step S32: Through the self-attention mechanism of the improved Transformer fusion model, the spatiotemporal correlation features of multi-source data are mined, and the multi-source data are integrated into a unified data resource; wherein, the formula of the self-attention mechanism of the improved Transformer fusion model is: ; Where Q, K, and V are the query matrix, key matrix, and value matrix, respectively. For spatiotemporal correlation enhancement matrix, Let T be the dimension of the key matrix, and T be the transpose operation. Step S33: The integrated data is stored in a data storage module that adopts a distributed storage + federated storage architecture. The data calling module provides a standardized data calling interface through a dynamic data scheduling algorithm based on an attention mechanism.
6. A grain storage management method according to claim 5, characterized in that, In step S4, the generation of the optimization decision suggestion adopts a two-layer system of CNN-LSTM fusion prediction model + NSGA-Ⅲ multi-objective optimization algorithm, and the specific steps are as follows: Step S45: Based on the historical and real-time data of the data platform, construct a CNN-LSTM fusion prediction model. Extract spatial features through CNN and extract temporal features through LSTM to predict the trend of grain pile mold, equipment failure probability, and grain quality change pattern. Step S46: Using the prediction results output by the CNN-LSTM fusion prediction model, combined with historical management data from the data platform, analyze the trend of grain pile status changes, equipment operation patterns, grain circulation efficiency, and management costs; the fusion prediction model formula is as follows: ; in, The predicted value at time t , These are spatial feature data and temporal feature data, respectively. For bias terms, , These are the weight matrices output by CNN and LSTM, respectively. Step S47: Using the NSGA-III multi-objective optimization algorithm, with the three-dimensional optimization objectives of minimizing grain loss, minimizing management costs, and maximizing equipment lifespan, the algorithm collaboratively optimizes the grain storage environment control parameters, equipment maintenance cycle, and grain rotation plan to generate optimal decision recommendations. The fitness function formula for the multi-objective optimization is as follows: ; in, For fitness value, , These represent the maximum and minimum losses, respectively. , These represent the maximum and minimum costs, respectively. , These represent the maximum and minimum lifespan of the equipment, respectively. , , These are actual grain loss, management costs, and equipment lifespan, respectively. , , To optimize the weights.
7. A grain storage management method according to claim 6, characterized in that, In step S5, the anomaly warning and emergency response adopts a fusion algorithm identification + dynamic threshold + intelligent solution generation system, and the specific steps are as follows: Step S51: Using the improved YOLOv8 and isolated forest fusion algorithm, combined with the dynamic threshold adaptive adjustment model, the standardized sensing data and dynamic threshold are compared in real time. Combined with the state simulation of the digital twin, abnormal situations in grain piles, environment, equipment and grain flow are identified. The improved YOLOv8 is used to process video surveillance data, and the loss function formula is: ; in, The value of the loss function. , , These are classification loss, bounding box loss, target confidence loss, and coordinate loss, respectively. , , For loss weights; The formula for dynamic threshold adaptive adjustment is as follows: ; in, The dynamic threshold at time t, Based on the threshold, For a period of time, This is real-time data at time t. , These are the mean and standard deviation of the historical data, respectively. , For adjustment coefficients; Step S52: Based on the severity of the abnormal situation, determine the warning priority using the AHP (Analytic Hierarchy Process) method, and trigger warnings at three levels: general warning, moderate warning, and severe warning. Step S53: Match the emergency response plan database to generate a targeted emergency response plan; Step S54: Push the emergency response plan to the management personnel. The management personnel can view the anomaly details and the abnormal status of the digital twin, track the response progress, record the response results, form an anomaly response ledger, and enter the response data into the emergency plan database simultaneously.
8. A grain storage management system, characterized in that, A grain storage management method according to any one of claims 1-7 includes: The IoT sensing layer is used to deploy IoT sensing devices to collect grain warehouse environmental parameters, grain pile status parameters, storage equipment operating parameters, and grain circulation parameters, and to preprocess the raw data to output standardized sensing data. The digital twin layer is used to acquire the 3D model data of the physical entity of the grain warehouse, the preset grain warehouse parameters, and the standardized sensing data output by the IoT sensing layer, to construct a digital twin of the grain warehouse, establish a real-time mapping between the physical grain warehouse and the digital twin, and achieve dynamic synchronization between the two. The data middle platform layer is used to receive standardized sensing data from the IoT sensing layer, digital twin data from the digital twin layer, and data from the entire grain warehouse management process, and to perform data fusion, cleaning, storage, and retrieval to build a unified data sharing system. The visualization management platform layer is used to realize the visualization of data, interactive operation of digital twins, and intelligent control of grain warehouse environment regulation, grain pile status monitoring, equipment operation and maintenance, and grain circulation. At the same time, it receives the analysis results of the data middle platform layer and generates optimization decision suggestions and abnormal early warning information. The emergency response module is used to receive abnormal early warning information pushed by the visual management platform, generate corresponding emergency response plans, and push them to relevant management personnel to achieve rapid handling of abnormalities.
9. A computer device, comprising: Memory and processor; The memory stores a computer program, characterized in that when the processor executes the computer program, it implements the steps of a grain storage management method according to any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When a computer program is executed by a processor, it implements the steps of a grain storage management method according to any one of claims 1-7.