A data processing method and system for a grain depot storage supervision cloud gateway
By using multimodal quality inspection and anomaly detection models, combined with smart contracts and blockchain technology, the problems of low data transmission efficiency and insufficient supervision in traditional grain depot storage operations have been solved. This has enabled accurate assessment of grain quality and automated management throughout the entire process, thereby improving the operational management level of grain depots.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-16
- Publication Date
- 2026-03-31
AI Technical Summary
Traditional grain depot storage operations rely on manual data entry and decentralized equipment for data collection. This results in low data transmission efficiency, an inability to achieve real-time updates, and makes it difficult for managers to keep track of operational progress and inventory status. This leads to potential for favoritism and fraud, difficulty in tracing anomalies, and a lack of effective supervision and data security guarantees.
An anomaly detection model employs a combination of technologies, including the construction of a multimodal quality inspection model and anomaly detection model. It combines spectral data, image data, and physicochemical testing data for multi-dimensional comprehensive analysis, utilizes edge fog nodes for initial data screening and retransmission, ensures data security through smart contracts and blockchain technology, and constructs a regulatory platform for 3D model display and decision support.
It has enabled precise assessment and anomaly detection of grain quality, improved the accuracy and security of data processing, formed a fully automated collaborative management mechanism, improved the operation and management level and decision-making efficiency of grain depots, and prevented violations.
Smart Images

Figure CN120687777B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of grain depot supervision technology, and in particular to a data processing method and system for a cloud gateway for grain depot storage and supervision. Background Technology
[0002] With the deepening of the food security strategy, intelligent management of grain depot storage operations has become increasingly crucial. However, there are currently many problems in grain depot storage operations that urgently need to be addressed, seriously affecting food security and the healthy development of the industry.
[0003] Regarding data updates, traditional grain depot operations rely heavily on manual data entry and decentralized equipment collection, resulting in low data transmission efficiency and an inability to achieve real-time updates. This makes it difficult for managers to keep abreast of operational progress and inventory status, impacting the timeliness of decision-making. Fraudulent practices persist despite repeated crackdowns. Due to the lack of effective supervision and data security mechanisms, operators can exploit data vulnerabilities to engage in unauthorized operations, such as tampering with weighing data or falsely reporting grain quality, causing losses to national grain resources. Anomaly tracing is extremely difficult. Grain depot operational data is large and scattered, with a lack of effective correlation between data from different stages. When anomalies occur, it is difficult to quickly locate the source of the problem and the responsible party, failing to effectively deter violations. Summary of the Invention
[0004] The anomaly detection model of this invention, which integrates multiple technologies, improves the accuracy of data processing and enables efficient supervision, precise decision-making, and risk prevention and control.
[0005] The technical solution proposed in this invention is: a data processing method for a cloud gateway for grain depot storage and monitoring, the method comprising:
[0006] Collect relevant job information and encapsulate the job information into a smart contract;
[0007] The edge fog nodes perform initial quality screening, data integrity checks, and duplicate data comparisons on the sample data in the operation information. The data processed by the edge fog nodes is then transmitted to the cloud gateway using a confirmation and retransmission mechanism.
[0008] By integrating spectral data, image data, and physicochemical testing data, a multimodal quality inspection model is constructed to conduct a comprehensive multi-dimensional analysis of grain quality.
[0009] Construct an anomaly detection model to detect anomalies in the weighing data of qualified grains;
[0010] Based on the grain weighing data and preset standards, calculate the deduction data for moisture and impurities, screen out unqualified grains, and use spatiotemporal graph convolutional networks to predict the trend of grain storage status changes.
[0011] A monitoring platform is built, which uses the collected relevant operational data and the analytical data generated based on the relevant operational data to construct a 3D model.
[0012] Preferably, the relevant job information collection process is as follows:
[0013] Biometric verification is performed using capacitive fingerprint sensors and near-infrared iris imaging technology. Encrypted data and digital signatures are transmitted to edge sensing nodes, and the data from the edge sensing nodes is transmitted to edge fog nodes. An RFID reader array monitors the vehicle's location in real time and uses a Kalman filter algorithm to smooth the positioning results. A temperature and humidity sensor group collects the current ambient temperature and humidity data in real time. The weighbridge controller collects weight data and processes the weight data using median filtering and moving average filtering algorithms.
[0014] Preferably, the smart contract adopts a time-driven mechanism. When the job information changes, the corresponding time is triggered, and the smart contract responds and executes immediately. The job information is permanently stored in the blockchain. The blockchain storage uses a Merkle tree structure to organize the job information, with each job information as a leaf node. Parent nodes are generated through pairwise hash calculations, up to the root node.
[0015] Preferably, the edge fog node processing procedure is as follows:
[0016] The overall appearance score of the grain is calculated based on the color score, grain fullness score, and impurity content score, and grains with an unqualified overall appearance score are removed; the edge fog node performs validity judgment on the smart contract data and removes invalid data; the edge fog node retains the latest duplicate data based on the timestamp and uses the latest data to replace the old data in the cache table.
[0017] Preferably, the specific content of the multimodal quality inspection model is as follows:
[0018] The data is preprocessed. The multimodal quality inspection model uses a ResNet-50 model pre-trained on a large-scale public grain quality inspection dataset as the base network, a Transformer model, and a multilayer perceptron. The parameters of the pre-trained model are transferred to the quality inspection task of this grain depot and fine-tuned based on the sample data of this grain depot. During the training process, the cross-entropy loss function is used. The quality of the grain is judged by a judgment function.
[0019] Preferably, the anomaly detection model is as follows:
[0020] An anomaly detection model is constructed that integrates an improved isolated forest algorithm, an anomaly detection algorithm based on variational autoencoder, and an anomaly detection algorithm based on Transformer. The data fusion layer employs a weighted fusion method, taking into account the different applicability of each algorithm at different stages of grain depot operations. The fused result... The calculation formula is:
[0021] ;
[0022] in: , , The results are presented for the improved isolated forest algorithm, the anomaly detection algorithm based on variational autoencoder, and the anomaly detection algorithm based on Transformer. For time Changes in weighting coefficients
[0023] Preferably, the process for predicting the trend of grain storage status changes is as follows:
[0024] A graph structure is constructed, treating each storage unit of the grain depot as a node. Connections between nodes are established based on the physical adjacency between storage units and the order of grain storage time, forming a graph that reflects spatiotemporal characteristics. Inventory data is input into the network for spatiotemporal feature extraction. Through multi-layer graph convolution and temporal convolution operations, the state change patterns between different storage units and within the same unit at different times are explored. The extracted features are then used to predict future changes in the grain storage environment.
[0025] Preferably, the specific process of the regulatory platform is as follows:
[0026] By leveraging WebGL technology and GIS maps, grain depot operation data is transformed into 3D visualizations, intuitively presenting information on inventory levels, vehicle locations, and operational progress. Through an intelligent decision support module, the processed data is analyzed to generate suggestions for operational scheduling optimization and inventory allocation decisions.
[0027] The present invention also provides a data processing system for a cloud gateway for grain depot storage and supervision, the system being used to execute the aforementioned data processing method for a cloud gateway for grain depot storage and supervision.
[0028] The present invention also provides a computer-readable storage medium storing a computer program, which is executed by a processor to implement the aforementioned data processing method for a cloud gateway for grain depot storage and monitoring.
[0029] The beneficial effects of this invention are:
[0030] In the device perception layer and data transmission link, multi-technology deep integration is innovatively achieved. The IC card data processing combines quantum key distribution technology and biometric recognition technology. 256-bit symmetric key encryption is combined with a 500dpi capacitive fingerprint sensor and a 640×480 resolution near-infrared iris imaging technology to ensure data security and accurate identity authentication. The data transmission adopts a hybrid scheme of Zigbee wireless communication network, software-defined network (SDN), and quantum encryption. The Zigbee network is responsible for the internal data transmission in the device perception layer, while SDN and quantum encryption guarantee the efficient and secure transmission of data between the cloud gateway processing layer and the supervision platform layer. Compared with the single technology application in traditional grain depots, this system realizes an all-round improvement in data collection security, transmission stability, and efficiency, laying a solid data foundation for grain depot supervision.
[0031] In terms of data processing and anomaly judgment, multiple advanced algorithms and models are integrated to form an intelligent processing system. For grain inspection, a multi-modal fusion quality inspection model is used to integrate spectral, image, and physical and chemical detection data, and accurate quality assessment is achieved through transfer learning; for grain weighing, an improved isolation forest algorithm is adopted, introducing a time series weighted factor and a job rule constraint weight to improve the accuracy of anomaly detection. On this basis, a fusion anomaly judgment model is constructed, integrating the improved isolation forest algorithm, the anomaly detection algorithm based on variational autoencoder (VAE), the anomaly detection algorithm based on Transformer, etc. The data preprocessing layer processes the original data specifically, the multi-algorithm detection layer analyzes the data from different angles, the data fusion layer dynamically allocates weights according to the grain depot operation stage to fuse the results, and the decision output layer accurately judges anomalies accordingly. This integrated innovation breaks the limitations of traditional single algorithms. Through algorithm collaboration and dynamic fusion, it significantly enhances the ability to process complex data in grain depots and judge anomalies, providing a more scientific and reliable decision-making basis for grain depot management.
[0032] An automated collaborative management mechanism covering the entire process of grain depot storage and supervision is constructed. From data collection in the device perception layer, to data processing, analysis, and storage in the cloud gateway processing layer, and then to visual display and decision support in the supervision platform layer, each module collaborates closely. In terms of operation process collaboration, taking the grain inbound operation as an example, each layer module automatically completes links such as identity verification, data collection and processing, and instruction issuance and execution, achieving full-process automation. In anomaly handling collaboration, once anomalies such as abnormal weighing data occur, all modules of the system immediately联动, complete operations such as alarm, suspension of operations, and re-inspection, forming a closed-loop management. This mechanism changes the traditional grain depot management mode with dispersion and high dependence on manual labor, realizes the high-efficiency, intelligent, and standardized grain depot storage and supervision work, and greatly improves the grain depot operation management level. Brief Description of the Drawings
[0033] Figure 1 It is a flowchart of a data processing method for a cloud gateway for grain depot storage and supervision according to the present invention;
[0034] Figure 2 This is a flowchart illustrating the quality inspection process of a data processing method for a cloud gateway for grain depot storage and supervision, as described in this invention. Detailed Implementation
[0035] The following description is intended to disclose the present invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art. The basic principles of the invention defined in the following description can be applied to other embodiments, modifications, improvements, equivalents, and other technical solutions that do not depart from the spirit and scope of the invention.
[0036] It is understood that the term "a" should be understood as "at least one" or "one or more", that is, in one embodiment, the number of an element can be one, while in another embodiment, the number of the element can be multiple, and the term "a" should not be understood as a limitation on the number.
[0037] like Figure 1 and Figure 2 As shown, the main contents of this solution are as follows: Collecting relevant operational information and encapsulating it into smart contracts; using edge fog nodes to perform initial quality screening, data integrity checks, and duplicate data comparisons on sample data in the operational information; transmitting the processed data to the cloud gateway using a confirmation and retransmission mechanism; fusing spectral data, image data, and physicochemical testing data to construct a multimodal quality inspection model for multi-dimensional comprehensive analysis of grain quality; constructing an anomaly judgment model that integrates an improved isolated forest algorithm, an anomaly detection algorithm based on variational autoencoders, and an anomaly detection algorithm based on Transformers to detect anomalies in the weighing data of qualified grain; calculating deduction data for moisture and impurities based on the grain weighing data and preset standards to screen out unqualified grain; using a spatiotemporal graph convolutional network to predict the trend of grain storage status changes; and constructing a monitoring platform based on WebGL technology and GIS maps. The monitoring platform uses the collected relevant operational data and the analysis data generated based on the relevant operational data to construct a 3D model.
[0038] Data Processing System Architecture - Device Awareness Layer:
[0039] The equipment sensing layer consists of devices such as IC cards, weighbridge controllers, barcode scanners, RFID reader arrays, and temperature and humidity sensor groups. The IC cards store the operator's identification information. (including number) ,Name Permission levels ) and task data (Task number) Grain varieties Planned work time The weighbridge controller collects weighing data in real time. (gross weight) Tare weight ,net weight Weighing time (Sampling frequency is 1 time / second); the scanner acquires sample barcode information. Barcode information of quality inspection results The scanning resolution reaches 300 dpi; the RFID reader array is used to locate operating vehicles, with the reader operating in the 902-928MHz frequency band and an adjustable communication distance of 0-10 meters; the temperature and humidity sensor group monitors the environmental data of the grain depot. (temperature Measurement accuracy ±0.5℃, humidity Measurement accuracy ±3%RH). These devices connect to edge sensing nodes via a Zigbee wireless communication network. The Zigbee network uses a star topology and operates on channels 11-26 of the 2.4GHz band with a data transmission rate of 250kbps, enabling initial data aggregation.
[0040] Data perception and collection
[0041] IC card data processing
[0042] The IC card has a built-in security chip with independent data encryption and decryption functions. When personnel authenticate their identity, a fingerprint image is first captured using a capacitive fingerprint sensor. The sensor converts the fingerprint's ridge information into a digital signal, generating a fingerprint feature vector. The system pre-stores fingerprint feature vectors as follows: An algorithm based on minutiae matching is adopted. The algorithm first extracts minutiae (such as forks and termination points of fingerprint lines) from the fingerprint image, and then determines whether a match is made by calculating the similarity of the position and orientation of these minutiae. If the similarity score exceeds a preset threshold (e.g., 80 points, which can be set according to actual conditions), then... =1 indicates successful fingerprint verification. For iris recognition, near-infrared imaging technology is used to acquire iris images with a resolution of 640×480. After image acquisition, image preprocessing (including noise reduction and normalization) and feature extraction (extracting features such as iris texture and ring structure) are performed to generate an iris feature vector. Compared with pre-stored iris feature vectors To compare the two, the Hamming distance is used to calculate the difference. If the difference is less than a set threshold (e.g., 0.3), then... =1, iris verification successful. After successful biometric verification, the IC card uses a 256-bit symmetric key K generated using quantum key distribution technology to store the person's identity information. (serial number ,Name Permission levels ) and task data (Task number) Grain varieties Planned work time Encryption is performed using the Advanced Encryption Standard (AES) algorithm. The encrypted data is... At the same time, use the private key. Sign the encrypted data to generate a digital signature. The IC card transmits encrypted data and digital signatures to the edge sensing node via the TLS 1.3 protocol. After receiving the data, the edge sensing node first verifies the digital signature using the public key (PK). After successful verification, the data is decrypted using the symmetric key K to obtain the original personnel identity information and job task data.
[0043] Vehicle location data processing
[0044] The RFID reader array uses active RFID technology, with the reader transmitting radio frequency signals at a fixed frequency (e.g., 10 times per second). When a vehicle enters the reader's communication range (0-10 meters), the RFID tag installed on the vehicle receives the signal, modulates its stored vehicle identification information (such as license plate number and vehicle type), and reflects it back to the reader. The reader receives the reflected signal, demodulates and decodes it to obtain the vehicle identification information.
[0045] When calculating the distance between the vehicle and the reader, the RFID signal strength is used as a reference. (Unit: dBm), using the formula Calculation. Among them, The reference signal strength at 1 meter is taken as -30dBm, which is the standard signal strength measured in the grain depot under interference-free conditions. The signal attenuation coefficient for the grain depot environment is set to 2.5. This coefficient was derived through extensive testing and statistical analysis of signal attenuation in different areas and time periods within the grain depot. To improve the accuracy of distance calculation, each reader samples the signal strength every second, and the average value is taken after five consecutive samples as the current signal strength. .
[0046] In the triangulation process, to reduce positioning errors caused by factors such as multipath propagation of signals, a weighted least squares method is used to optimize the positioning results. Let the coordinates of the three RFID readers be... , , The calculated distances are respectively , , Weights are assigned to each distance based on the stability of the signal strength. , , (The more stable the signal strength, the higher the weight; the value range is 0-1, and...) The vehicle coordinates are calculated using the following formula. :
[0047] ;
[0048] Temperature and humidity data collection
[0049] The temperature and humidity sensor array uses digital sensors with built-in high-precision temperature and humidity sensing elements and A / D conversion circuits. Each sensor node is equipped with an independent microcontroller (MCU) responsible for data acquisition, processing, and communication control. The sensor nodes are distributed according to the spatial layout of the grain depot warehouse. For warehouses with an area of less than 500 square meters, at least 5 sensor nodes are arranged, located at the four corners and the center of the warehouse; for warehouses with an area of more than 500 square meters, one additional sensor node is added for every additional 100 square meters.
[0050] The sensor nodes operate on a 10-minute data acquisition cycle. At the beginning of each cycle, the MCU controls the temperature and humidity sensing element to acquire the current ambient temperature. and humidity Data. After the acquired analog signals are converted into digital signals by an A / D conversion circuit, they are first filtered using a median filtering algorithm to remove random noise interference. Specifically, five consecutively acquired data points (…) , , , , Arrange the data in ascending order and take the median value as the filtered temperature data. Humidity data The same filtering method is used.
[0051] The filtered data is stored in the sensor node's memory, awaiting transmission instructions from the Zigbee network. Upon receiving a transmission instruction from the edge sensing node, the sensor node will record the temperature... ,humidity The sensor node packages its own node ID and other information into a data frame and sends it to the edge sensing node via the Zigbee network. To ensure the reliability of data transmission, the Automatic Repeat Request (ARQ) protocol is used. If the edge sensing node does not receive the data frame within a specified time, the sensor node automatically retransmits the data, up to a maximum of 3 times.
[0052] Weighbridge data collection optimization
[0053] The weighbridge controller uses high-precision load cells with a measurement accuracy of ±0.1%FS (FS being full scale). During data acquisition, to prevent data fluctuations caused by vibrations, impacts, and external electromagnetic interference from vehicles entering and leaving the weighbridge, a moving average filtering algorithm is introduced in addition to the median filtering algorithm.
[0054] The specific implementation method is as follows: Set a data window with a length of 10, and collect new weighing data each time. Then, add it to the data window, remove the oldest data in the data window, and calculate the average of the 10 data points in the data window as the valid weighing data for this time. .Right now ,in For the first in the data window One set of raw data.
[0055] In addition, the weighbridge controller also features automatic zero-point calibration. Every morning when the grain depot is not in operation, the weighbridge controller automatically performs zero-point calibration. By collecting empty load data over a period of time (e.g., 10 minutes), the average of these data is calculated as the new zero-point reference value. If the deviation between the currently measured empty load data and the new zero-point reference value exceeds a set threshold (e.g., ±0.5 kg), the measurement data is automatically corrected to ensure the accuracy of the weighing data. Simultaneously, the weighbridge controller uses the CRC-16 checksum algorithm to verify the transmitted data. At the data sending end, the CRC checksum is calculated and appended to the end of the data frame. At the receiving end, the CRC checksum is recalculated and compared with the checksum from the sending end. If they do not match, the data transmission is considered incorrect, and the data is retransmitted.
[0056] The data sensing and acquisition section is the cornerstone of the entire grain depot storage and supervision system, undertaking the crucial task of acquiring and initially processing raw data. Firstly, it achieves comprehensive capture of various key information during grain depot storage operations, covering multiple dimensions such as operator identity, task assignments, vehicle location dynamics, grain weight changes, and grain depot environmental conditions. This provides a rich and accurate data foundation for subsequent data processing, analysis, and decision-making.
[0057] Secondly, by performing preprocessing operations such as encryption, verification, and noise reduction on the collected data, the accuracy, integrity, and security of the data are effectively guaranteed. This prevents erroneous or maliciously tampered data from entering the system, avoiding deviations in subsequent analysis and decision-making due to data quality issues, and ensuring the reliability of system operation.
[0058] Finally, this section establishes a data transmission channel between the on-site equipment and the cloud gateway, achieving efficient and stable data transmission. This lays the foundation for the cloud gateway to perform in-depth data analysis, mining, and storage management, enabling the entire system to form a complete closed loop from data acquisition and transmission to processing and application, thereby achieving effective supervision and intelligent management of grain depot storage operations.
[0059] For example, in the wheat storage operation at a large grain depot, at 8:30 a.m., the truck transporting wheat entered the depot. The driver, carrying an IC card, approached the identity verification terminal at the entrance. The IC card first underwent fingerprint recognition; a capacitive fingerprint sensor quickly captured the driver's fingerprint image. The system compared the captured fingerprint feature vector with pre-stored fingerprint features. After successful verification, iris recognition was then performed. Near-infrared imaging technology acquired the driver's iris image, and after a series of processing steps, iris verification was also successfully completed.
[0060] At this point, the IC card uses a quantum key to encrypt the driver's identity information (ID, name, and access level) and the current job data (job ID: Warehousing-20240801-001, grain type: wheat, planned job time: 8:30-11:30 on the same day) stored on the card, and signs it with a private key. The data is then transmitted to the edge sensing node via the TLS 1.3 protocol. After verifying the digital signature and decrypting the data, the edge sensing node sends the information to the cloud gateway for job registration.
[0061] The vehicle continues to the weighbridge area, where the weighbridge controller collects the vehicle's weight data once per second. After the vehicle is fully on the weighbridge and stable, the controller processes the collected data using median filtering and moving average filtering algorithms to obtain accurate gross weight data. Simultaneously, the weighbridge controller calculates the CRC-16 checksum of the data and transmits the weight data and checksum to the edge sensing node, which then forwards them to the cloud gateway.
[0062] As vehicles travel within the grain depot, an array of RFID readers distributed throughout the depot continuously communicates with the RFID tags on the vehicles to obtain their real-time location information. The readers calculate the distance between themselves and the vehicles based on signal strength, and determine the precise coordinates of the vehicles using triangulation algorithms and weighted least squares methods. This location data is then transmitted to a cloud gateway for real-time monitoring of the vehicles' operational trajectories within the grain depot.
[0063] During vehicle sampling and quality inspection, a scanner scans the sample barcode and the quality inspection result barcode, obtains relevant information, and transmits it to the edge sensing node, ultimately reaching the cloud gateway for processing and recording. Simultaneously, temperature and humidity sensor arrays inside the grain depot periodically collect temperature and humidity data every 10 minutes. After filtering, the data is transmitted via the Zigbee network to the edge sensing node and then aggregated at the cloud gateway, providing data support for environmental monitoring and grain storage management at the grain depot.
[0064] Throughout the entire warehousing process, the data sensing and acquisition unit acquires and transmits various types of data in real time and accurately, providing strong data support for the cloud gateway to monitor and analyze the operation process and for grain depot managers to make decisions, ensuring that the wheat warehousing operation is carried out efficiently, orderly and safely.
[0065] Edge sensing nodes and edge fog nodes together constitute the edge computing layer of the grain depot storage and monitoring system. They are functionally synergistic and logically interconnected, jointly enabling efficient data flow and preprocessing from the device layer to the cloud gateway. Edge sensing nodes are deployed near the device sensing layer at the grain depot operation site, while edge fog nodes are located at the grain depot's edge computing center or nearby network nodes. The device layer transmits raw data (such as IC card encrypted data and RFID positioning signals) to the edge sensing nodes via a Zigbee network. Data that has undergone preliminary processing is then transmitted from the edge sensing nodes to the edge fog nodes, triggering deep preprocessing logic. Edge sensing nodes are responsible for resolving the heterogeneity and synchronization issues at the device layer, ensuring data format uniformity and time accuracy. Edge fog nodes focus on data validity and value, filtering out low-value and redundant data, reducing the data processing load on the cloud gateway. Edge sensing nodes handle technical verification, while edge fog nodes handle business verification, thereby preventing misjudgments, improving the accuracy of data preprocessing, reducing the data processing load on the cloud gateway, and improving the efficiency and accuracy of the entire data processing process. For example, without using the edge computing layer, the cloud gateway needs to process 1,000 data entries per second, but after using it, it only needs to process 400 data entries per second, reducing CPU utilization from 80% to 30%, and significantly improving data processing efficiency.
[0066] Data Processing System Architecture - Cloud Gateway Processing Layer:
[0067] The cloud gateway processing layer adopts a heterogeneous multi-core processor architecture, including general-purpose computing cores (processing power). ) and dedicated data processing core (processing capacity) Total processing capacity Equipped with a distributed storage module, it uses blockchain technology to store critical data, with a storage capacity of [missing information]. The heat dissipation system is based on a liquid-air cooling composite temperature control system, which monitors the internal temperature in real time through temperature sensors. ,when At the high temperature threshold (e.g., 65℃), the liquid cooling system operates at full power, and the air-cooled fan speed increases to [a certain value]. (e.g., 6000 RPM); when (At the low temperature threshold, such as 15℃), the liquid cooling flow rate is dynamically adjusted based on the difference between the temperature and the threshold. Air-cooled speed The formula is , ( , This is an adjustment coefficient, with a value ranging from 0 to 1. Minimum liquid cooling flow rate, (Minimum fan speed); when (At this time, the liquid cooling system operates at low power consumption, while the air cooling system maintains the lowest speed.) .
[0068] Data collection, storage, and analysis:
[0069] Job registration data processing
[0070] Job Information (including job number) ,type ,personnel ,time ,vehicle This is encapsulated as a smart contract. Contract rules. It covers three aspects: storage, permissions, and transmission.
[0071] Storage rules: JSON format is used to store job information in a key-value pair structure. This facilitates rapid retrieval and processing of subsequent data.
[0072] Access rules: based on user access levels Define access permissions. When When =1 (administrator), they have read and write permissions for all job information; when =2 (Regular Employees) can only read job information associated with themselves. Access verification is performed through the smart contract's built-in access control functions. This function is implemented based on the permission level. Determine user's job information The system determines whether the operation is allowed or prohibited and returns the result.
[0073] Transmission Rules: Data transmission is performed using the HTTP / 3 protocol. HTTP / 3, based on the QUIC protocol, features multiplexing and 0-RTT connection establishment, effectively improving data transmission efficiency and stability. Before transmission, the smart contract compresses the job information J using the Zstandard compression algorithm, achieving a compression ratio of 3:1-5:1, reducing data transmission volume and network bandwidth usage.
[0074] When the job information is complete and identity verification is successful (i.e.) ,in For personnel identification information, For task data, When the signature (PK being the public key) is used, the smart contract executes automatically. The execution process is as follows: First, the job information is... hash value The hash value of the current block is calculated by concatenating it with the hash value PrevHash of the previous block in the blockchain. This method permanently stores operational information on the blockchain, ensuring data immutability. Then, the operational information is pushed to the monitoring platform in real time via the WebSockets protocol. The WebSockets protocol establishes a persistent connection, enabling bidirectional data communication. After receiving the data, the monitoring platform parses and displays it on a visual interface, such as presenting operational progress in a timeline format, allowing managers to easily monitor the grain depot's operational dynamics in real time.
[0075] To improve the efficiency of smart contract execution, an event-driven mechanism is adopted. When job information J changes (such as adding a new job or updating the job status), the corresponding event is triggered, and the smart contract responds and executes immediately, avoiding the resource waste caused by polling. Simultaneously, the blockchain storage uses a Merkle tree structure to organize job information, treating each job as a leaf node, generating parent nodes through pairwise hash calculations, up to the root node. When data integrity needs to be verified, only the root node's hash value needs to be verified, greatly improving data verification efficiency.
[0076] The operation registration data processing section plays a crucial role in information recording and management within the grain depot storage and supervision system. Firstly, it enables accurate registration and storage of information throughout the entire grain depot storage and procurement process. Key information during the operation (personnel, time, type, vehicles, etc.) is stored in a standardized and structured manner on the blockchain, forming an immutable operation file. This provides a reliable basis for subsequent operation traceability and liability determination.
[0077] Secondly, the access control rules of smart contracts ensure the security and privacy of operational information. Users with different permissions can only access data related to their responsibilities, preventing the leakage of sensitive information and avoiding unauthorized modification or misoperation of data, thus maintaining the authenticity and integrity of the data.
[0078] Furthermore, the efficient data transmission mechanism enables timely synchronization of operational information to the monitoring platform, allowing managers to access real-time operational dynamics and support scientific decision-making. For example, operational resources can be rationally allocated and operational processes optimized based on operational registration information, thereby improving the efficiency of grain depot storage operations. In addition, the application of event-driven and Merkle tree technologies enhances the system's performance and data processing capabilities, ensuring stable and efficient operation even when a large amount of operational information is generated rapidly.
[0079] Vehicle location data processing
[0080] 1. RFID reader / writer working mechanism
[0081] The RFID reader / writer uses an active operating mode and operates at a fixed frequency. (Unit: Hz, value is 10) Continuously transmits radio frequency signals. The signal coverage area is fan-shaped with a radius of [missing information]. (Value taken as 10 meters). The frequency of the radio frequency signal transmitted by the reader is... (902-928MHz), initial signal strength value (Unit: dBm, value -30). When the work vehicle enters this area, the RFID tag installed on the vehicle (with built-in unique ID: After receiving the signal, it uses backscatter modulation technology to transmit its stored vehicle identification information (license plate number: Vehicle type: The signal is modulated onto the reflected signal and transmitted back to the reader.
[0082] 2. Distance calculation optimization
[0083] Calculating the distance between the vehicle and the reader At that time, a strategy of multiple sampling and averaging is adopted. The reader / writer performs sampling every... (Unit: s, value 1) The signal strength R is sampled once, and then continuously sampled. (Taking values 5 times) yields the signal strength sequence. Take the average value. The final signal strength is used for distance calculation. The distance calculation formula is as follows: ,in The reference signal strength at 1 meter (value -30dBm) This is the environmental attenuation coefficient for grain depots (value 2.5). This coefficient was obtained through linear regression analysis of a large amount of RFID signal strength and actual distance data in different areas and at different times in the grain depot, and it can be well adapted to the complex environment of grain depots.
[0084] 3. Improved positioning algorithm
[0085] To further improve positioning accuracy, a Kalman filter algorithm is introduced to smooth the positioning results. The calculated vehicle coordinates (x, y) are used as observations, combined with the predicted coordinates from the previous moment, and through the prediction and update steps of the Kalman filter, more accurate and stable real-time vehicle coordinates are obtained. In the context of grain depot storage and monitoring, vehicle movement is not entirely ideal, and the complex environment within the grain depot (such as metal grain piles and buildings) can interfere with RFID signals, affecting positioning accuracy. When introducing the Kalman filter algorithm to smooth the vehicle positioning results, the following optimizations are made based on the specific conditions of the grain depot:
[0086] In a grain depot environment, vehicle motion primarily occurs in a two-dimensional plane; therefore, a two-dimensional state-space model is constructed. The vehicle's state vector is defined. for:
[0087] ;
[0088] in: and They are respectively The horizontal and vertical coordinates of the vehicle in the two-dimensional plane at any given time. and They are respectively Vehicles at all times direction and velocity in direction
[0089] State transition matrix Considering the relatively stable and slow-changing characteristics of vehicle speeds within the grain depot, the following applies:
[0090] ;
[0091] in: The time interval between two positioning operations is defined in this scheme. The RFID reader / writer operates every [time interval missing]. =One location attempt is made per second for the vehicle (actual accuracy may vary slightly depending on the vehicle's signal reception). Approximately 1 second. This matrix illustrates the linear relationship between vehicle position and speed over time.
[0092] Process noise matrix This is used to describe the uncertainties in vehicle movement. Within a grain depot, vehicle movement may be affected by factors such as uneven road surfaces and turns. Based on statistical data from actual tests at the grain depot, it is set as a diagonal matrix:
[0093] ;
[0094] in: and It reflects the uncertainty of location and has a relatively large value; and This reflects the uncertainty of speed and has a relatively small value. For example, by testing vehicle driving data multiple times in different areas of the grain depot and combining it with the least squares fitting error, the speed can be determined. = =0.1, = =0.01.
[0095] exist At any given moment, based on the previous moment ( The optimal estimated state at time ( ) and state transition matrix Predict the state at the current moment. :
[0096] ;
[0097] At the same time, update the covariance matrix of the predicted state. :
[0098] ;
[0099] in: This is the covariance matrix of the optimal estimated state at the previous time step, reflecting the degree of uncertainty in the estimated state. In the grain depot scenario, since the vehicle's travel path is relatively fixed (e.g., mainly traveling on roads, in work areas, etc.), preliminary constraints can be applied to the prediction results. For example, if the predicted vehicle position exceeds the grain depot's road or work area, the predicted position is corrected based on historical travel paths and the current direction to bring it back to a reasonable area.
[0100] Measurement Matrix The vehicle's state vector is mapped to the observation space. In this scheme, the observed values are the vehicle coordinates calculated using an RFID positioning algorithm. Therefore, the measurement matrix is:
[0101] ;
[0102] Measurement noise matrix The measurement errors in the RFID positioning process are described. Within the grain depot, RFID signals are significantly affected by environmental interference, resulting in relatively high measurement noise. Based on statistical analysis of multiple experimental data, a diagonal matrix is defined as follows:
[0103] ;
[0104] in: and Reflecting respectively coordinates and The measurement error of the coordinates. Through numerous RFID positioning experiments conducted at different locations and time periods in the grain depot, and combined with mean square error calculations, the error was determined. = =0.5
[0105] Calculate Kalman gain :
[0106] ;
[0107] Based on observed values And the predicted state, update the optimal estimated state. :
[0108] ;
[0109] At the same time, update the covariance matrix of the optimal estimated state. :
[0110] ;
[0111] in: It is an identity matrix.
[0112] In practical applications at grain depots, to better adapt to environmental changes, the measurement noise matrix can be dynamically adjusted based on the positioning errors of vehicles in different areas (such as entrances, weighing areas, and sampling areas). The parameters. For example, in areas near grain piles with significant signal interference, appropriately increase... and The value of is adjusted to improve the algorithm's adaptability to measurement errors.
[0113] Through the above optimization process of the Kalman filter algorithm combined with the specific conditions of the grain depot, the vehicle motion law and the characteristics of the grain depot environment can be effectively utilized to smooth the positioning results, obtain more accurate and stable real-time vehicle coordinates, and provide reliable vehicle location information for the grain depot storage and supervision system.
[0114] 4. Data Transmission and Convergence
[0115] The reader will calculate the vehicle coordinates (x, y) and vehicle identification information ( , , ) and positioning time The data is encapsulated into data frames and transmitted to edge sensing nodes via a Zigbee network. The edge sensing nodes align and associate the vehicle positioning data with the personnel and task information collected by the IC card and the weighing data collected by the weighbridge, forming a complete vehicle operation data chain, which is then transmitted to the cloud gateway for further processing.
[0116] By acquiring real-time vehicle location information within the grain depot, managers can intuitively grasp the entire operational trajectory of vehicles from entering the depot, weighing, sampling, quality inspection to storage, promptly identifying abnormal stops or incorrect routes in the operational process, optimizing operational scheduling, and improving storage efficiency. Precise positioning can prevent safety accidents such as collisions and unauthorized driving within the grain depot. For example, when a vehicle approaches a dangerous area (such as a high grain pile or equipment operating area), the system can issue an alarm in a timely manner to ensure the safety of personnel and equipment. It provides key location information for subsequent data processing. Correlation with weighing data allows analysis of weight changes at different vehicle locations to determine if there are any abnormalities in loading or unloading; combined with operational registration data, it can verify the compliance of the operational process. When vehicle location data is combined with personnel information collected by IC cards, the correspondence between personnel and vehicles can be confirmed, preventing unauthorized personnel from using vehicles; and when linked with weighbridge data processing, vehicle location information can determine whether a vehicle is within the weighbridge weighing area, and combined with weighing data, it can analyze whether the vehicle's dwell time and weight changes during the weighing process are reasonable, preventing cheating. The system provides vehicle location information for operational registration data processing, improving operational process records. In grain sampling, inspection, and weighing data processing, vehicle location data serves as spatial dimension information, assisting in analyzing the distribution of different operational stages within the grain depot and optimizing operational route planning. In grain storage data processing, vehicle location is used to determine whether a vehicle has entered the storage area, and combined with moisture and impurity deduction data, storage operation efficiency is analyzed. Vehicle location data is transmitted to the monitoring platform via a data transmission module using a hybrid SDN and quantum encryption scheme. The monitoring platform uses this data to display vehicle locations in real-time on a 3D visualization interface, and combines this with a GIS map to present the vehicle's movement trajectory within the grain depot, providing managers with an intuitive operational monitoring view. Simultaneously, as part of the grain's entire lifecycle data, vehicle location data, through blockchain traceability technology, enables traceability and querying of the vehicle's operational process.
[0117] Grain sampling data processing
[0118] 1. Refine the smart contract verification rules
[0119] Sample data (serial number ,time ,variety ,state Encapsulated within a smart contract, its built-in verification rules The specific execution process is as follows:
[0120] Uniqueness verification: Existing sample numbers are stored using a hash table. When new sample data... Upon entry, calculate hash value The system quickly searches the hash table for a duplicate hash value. If it exists, it further compares the specific ID information; if they match, the ID is considered duplicated, and the data entry is rejected; otherwise, it is... The hash value is stored in a hash table.
[0121] Time verification: Obtain the sampling time of the current sample. Determine whether it is within the specified working hours (8:00-18:00), and calculate the time interval between the last sampling of the same type. Let the time of the last sampling of the same type be... ,but .when Outside of working hours, or If the time is measured in minutes, the time is deemed unreasonable and the data fails verification.
[0122] Field integrity validation: Define the set of required fields for sample data. traverse the data The field to count the number of missing fields. .like ( Represents a set If the number of missing elements (i.e., the field missing rate) exceeds 10%, the data is considered incomplete and will not be accepted.
[0123] Traditional grain depot operations rely on manual registration and verification processes, which are prone to data tampering (such as falsely reporting grain quality or falsifying weighing data) and make it difficult to trace responsibility. For example, the timing of manual data entry can be arbitrarily adjusted, rendering process traceability ineffective. Long manual review cycles (such as daily centralized reviews) make it impossible to intercept violations in real time. For example, abnormal weighing data may be discovered only after grain has been stored, preventing the timely removal of substandard grain. Smart contract technology uses a consortium blockchain architecture (such as Hyperledger Fabric). Operational information is stored on the blockchain in the form of smart contracts, using a Merkle tree structure to organize data and ensure immutability. Each operation information acts as a leaf node, generating parent nodes through pairwise hash calculations until the root node, thus achieving data integrity verification. When operation information (such as weighing data or sample status) changes, contract execution is automatically triggered; upon receiving device signals (such as IC card verification or weighbridge data upload), the corresponding logic (such as granting sampling permissions) is immediately executed. Built-in access control functions (such as AccessControl) restrict data read / write access based on the operator's permission level (administrator / regular employee). For example, regular employees can only read their own associated work records and cannot modify others' data. A hash table is used to check for duplicate records (e.g., the same vehicle being weighed repeatedly); required fields (e.g., work time, grain type) are checked for missing information, and data entry is rejected if the missing field rate exceeds 10%; work time is verified to be within the specified range (e.g., 8:00-18:00), and the time interval between sampling and weighing is verified to be reasonable (e.g., an interval <1 minute is considered abnormal). Upon successful verification, the work information is automatically stored on the blockchain and the next step is triggered (e.g., automatically notifying inspection personnel after sampling); automatic alarms are triggered in case of abnormalities (e.g., suspending warehouse operations when water deduction exceeds the threshold), and violation logs are recorded. Once data is on the blockchain, it cannot be modified. The distributed ledger nature of blockchain ensures that any tampering requires simultaneous control of more than 51% of the nodes, which is extremely costly. For example, even if the weighbridge data is maliciously tampered with after being stored on the blockchain, the original record can still be traced. A blockchain explorer allows users to query the entire lifecycle of a work operation (from sampling to warehouse timestamps, operators, and test results), reducing accountability traceability time from two hours of manual inquiry to minutes. Smart contracts automatically connect each step; for example, after IC card verification, the weighbridge is automatically unlocked and a work number is generated, reducing manual operation steps by more than 30%. Contract verification is executed at the edge fog node, removing unqualified data (such as samples with an appearance score <60 points) in real time, preventing invalid data from flowing into the cloud gateway, and improving data processing efficiency by 40%.
[0124] 2. Enhanced edge fog node filtering rules
[0125] Edge fog nodes are selected according to the filtering rules. The sample data is processed as follows:
[0126] Initial quality screening: The appearance score of grains is calculated using a weighted average of multiple indicators. A color score is included. (weight) =0.4), Particle fullness score Weight =0.3), impurity content score (weight) =0.3), then the total appearance score .when Samples scoring less than 6 points are immediately disqualified. During the scoring process, color is assessed using image recognition technology to analyze the similarity between the grain's color distribution and the standard color chart; grain fullness is determined based on features such as grain size and shape in the image; and impurity content is calculated by the percentage of impurity pixels in the image.
[0127] Data integrity check: In addition to the field integrity verification by the smart contract, fog nodes further check the validity of the field content. For example, for the time field... Check if its format conforms to the standard time format (e.g., "YYYY-MM-DDHH:MM:SS"); for the variety field Verify whether it is in the preset list of grain varieties. If invalid content is found, it will be considered as incomplete data and removed.
[0128] Duplicate data comparison: For identical The fog nodes retain the data with the latest timestamp. This is achieved by maintaining a [database structure]. A cache table with timestamps as keys and timestamps as values is used. Each time new data is received, the corresponding values are compared in the cache table. The timestamp is updated, and if the timestamp of new data is updated, the data in the cache table is replaced.
[0129] 3. Data transmission and interaction optimization
[0130] Data filtered by the fog nodes is transmitted to the cloud gateway via the Zigbee network. To ensure transmission reliability, an acknowledgment and retransmission mechanism is employed. Fog nodes send data frames. At that time, a unique serial number (SN) is assigned to it, and after the cloud gateway receives it, it returns an acknowledgment frame. This includes the sequence number of the received data frame. If the fog node is within the specified time If no acknowledgment frame for the corresponding SN is received within 500ms, the data frame will be retransmitted, up to a maximum of 3 times.
[0131] Through rigorous verification via smart contracts and screening by fog nodes, sample data with duplicate numbers, abnormal times, incomplete data, and substandard quality are effectively excluded, ensuring that the sampling data entering the cloud gateway is authentic, accurate, and complete, providing a reliable data foundation for subsequent grain quality inspection and other processes. Time verification rules constrain sampling time, preventing violations; uniqueness verification prevents duplicate records, ensuring data accuracy and standardization, which helps standardize grain depot sampling procedures and improve operational management. Fog nodes perform preliminary screening and processing of data at the edge, eliminating a large amount of invalid data, reducing data transmission volume and the processing load on the cloud gateway, and improving the overall system's data processing efficiency. Grain sampling data originates from sample barcode information collected by a scanner. Linked with IC card data processing, the system can verify the identity of sampling personnel, ensuring the standardization and traceability of sampling operations. Simultaneously, information such as sampling time is linked to vehicle weighing time collected from the weighbridge, allowing analysis of the reasonableness of the time interval between weighing and sampling, and assisting in determining the smoothness of the operational process. It provides raw sample data for grain inspection data processing; information such as sample variety and condition is the foundation for subsequent inspection and analysis. Linked with operational registration data processing, it improves operational process records, integrating sampling operations into the entire grain storage and procurement chain. In grain weighing data processing, the combination of sample data and weighing data can analyze the quality and weight relationship of different batches of grain. The processed data is transmitted to the monitoring platform via a data transmission module using a hybrid SDN and quantum encryption scheme. When the monitoring platform displays the progress of grain storage and procurement operations, the data status of the sampling stage (e.g., completed, pending inspection) is visually presented as important node information. Furthermore, in blockchain traceability, sampling data is a crucial link in grain quality traceability.
[0132] For example, during rice purchasing operations at a grain depot, at 9:00 AM on November 15, 2024, a sampler took a sample from a vehicle transporting rice and obtained sample data: [Sample Number] The time is "20241115001". The date is "2024-11-15 09:00:00", and the variety is... The data is labeled "rice," and its state Sst is "pending verification." The data first enters the smart contract for verification: in the uniqueness verification process, calculations are performed... The hash value, after being checked in the hash table, has no duplicates; during time verification, Within the working hours and with an interval greater than 10 minutes since the last rice sampling; field integrity verification passed, all required fields were present and none were missing. After smart contract verification passed, data was transmitted to the edge fog node. The fog node screened the data: in the initial quality screening stage, image recognition technology was used to analyze the samples and score their color. The score is 75 points, with a good grain fullness rating. The score is 70 points, based on impurity content. The overall appearance score is calculated based on a score of 60. =0.4×75+0.3×70+0.3×60=69 points, which is greater than 60 points, so the sample data passed the initial quality screening. In the data completeness check, the content of each field was correctly formatted and within the valid range; no duplicate data was found in the duplicate data comparison. Finally, the sample data passed the fog node screening and was transmitted to the cloud gateway for subsequent inspection and analysis.
[0133] Grain Inspection Data Processing
[0134] In grain inspection data processing, a multimodal fusion quality inspection model is constructed. Fusion of spectral data Image data Physicochemical test data The multimodal fusion quality inspection model organically integrates ResNet-50 (images), Transformer (spectral data), and MLP (physicochemical data) through four stages: data preprocessing, single-modal feature extraction, cross-modal feature fusion, and comprehensive decision output, to achieve multi-dimensional comprehensive analysis of grain quality. Specific details are as follows:
[0135] Data preprocessing: For spectral data Near-infrared spectrometers were used to acquire the raw spectral signals. These signals were then denoised using a Savitzky-Golay filtering algorithm to smooth the spectral curves and remove high-frequency noise. Let the raw spectral data be... Filtered data ,in The result is calculated using the Savitzky-Golay filter formula. Then, normalization is performed, as shown in the formula below. This ensures that the data values range from [0,1]. Image data Captured by a high-resolution industrial camera, the image is first converted to grayscale using the following formula: ( , , These represent the red, green, and blue channel values of the color image, respectively. Image enhancement is then performed using a histogram equalization algorithm to improve image contrast and make the texture and impurities of the grain image more prominent. (Physicochemical testing data) The data includes indicators such as moisture content, protein content, and impurity ratio. Outliers in the data are handled using the 3σ principle. If an indicator value exceeds the mean plus or minus three times the standard deviation, it is considered an outlier and replaced with the mean.
[0136] Model building and training:
[0137] A transfer learning strategy was adopted, selecting a ResNet-50 model pre-trained on a large-scale public grain quality inspection dataset as the base network (processing image data), a Transformer model (processing spectral data), and a multilayer perceptron (MLP, processing physicochemical detection data). The parameters of the pre-trained model were transferred to the quality inspection task of this grain depot, and then fine-tuned based on the sample data of this grain depot.
[0138] During training, the cross-entropy loss function is used. ,in For the sample size, For the number of categories (e.g., grain quality grade categories). For the sample Category The true label (0 or 1). Predict samples for the model Category The probability of [the outcome]. Update the model parameters using the Adam optimizer, setting the learning rate to [a certain value]. =0.001, training batch size is batch_size=32, training epochs is 50.
[0139] The function execution is evaluated:
[0140] Judgment function ( For the standard set, When executing (for a threshold set), it iterates through the quality inspection data. Each item. Taking moisture content testing as an example, obtain sample varieties. In the standard set Find the corresponding moisture content standard The threshold set corresponds to the moisture content threshold. Detection value Compared with the threshold, if If the project passes, the system returns "Pass"; otherwise, it returns "Fail". The model also outputs the probability of each sample belonging to a different quality level for management reference.
[0141] The grain image is input into the ResNet model. The input layer of the ResNet model first performs grayscale processing to reduce computational complexity, then histogram equalization is used to enhance contrast and highlight grain texture and impurity features, and finally normalization is performed. The feature layer of the ResNet model uses a pre-trained ResNet-50 model (trained on a public grain quality inspection dataset), retaining the first 17 convolutional layers (removing fully connected layers) to extract spatial features of the image (such as grain shape, color distribution, and impurity outlines). The last convolutional layer outputs a 7×7×2048 feature map, which is compressed into a 2048-dimensional feature vector through global average pooling (GAP). The grain spectral signal is input into the Transformer model. The input layer of the Transformer model removes high-frequency noise through Savitzky-Golay filtering and then normalizes the signal. The feature layer of the Transformer model is then constructed. A Transformer model with two encoder layers is built, each encoder containing multi-head self-attention (8 heads) and a feedforward neural network (FFN). The input spectral sequence is injected with temporal information through positional encoding, and an attention mechanism is introduced. The final encoder layer outputs a 1024-dimensional feature vector. This method captures the local and global correlations of spectral signals (such as the relationship between absorption peaks at specific wavelengths and grain quality). Grain physicochemical testing data are input into the MLP model. After outlier data is removed from the input layer of the MLP model, it is normalized to the interval [0,1] using Min-Max. The feature layer of the MLP model has two fully connected network layers with the following structure: Input layer (dimension = number of physicochemical indicators, e.g., 3D) - Hidden layer (64-dimensional, ReLU activation) - Output layer (32-dimensional feature vector). This is used to map low-dimensional physicochemical indicators to a high-dimensional feature space, capturing nonlinear relationships between indicators (such as the correlation between moisture and impurity content). In the fusion layer, the feature vectors extracted from the three vectors are fused across modalities through feature concatenation and weight allocation. The concatenated fused vector is... Through trainable weight matrix Compressed to a 1024-dimensional vector The weights are obtained by optimizing the cross-entropy loss function, automatically learning the importance of different modalities, and setting weights for different image features based on their importance. Simultaneously, a modal interaction attention module is introduced into the fusion layer to calculate the mutual attention between image and spectral features, enhancing the complementarity between spectral and image features. Finally, a threshold decision is made in the decision layer, and the decision result is output. The decision layer first fuses the features in a fully connected layer. Input a two-layer fully connected network (1024-256-2), and output the quality classification probability (pass / fail) through Softmax: Set the qualified probability threshold , if , output "Pass", otherwise "Fail". For example, if a sample image shows a low impurity rate (high confidence output by ResNet-50), the water content meets the standard in the spectral detection (high probability output by Transformer), and the physical and chemical data is normal (normal output by MLP), after fusion , it is judged as qualified. When the fusion model conducts model training and optimization, ResNet-50 loads the ImageNet pre-trained weights, Transformer loads the pre-trained weights for the spectral classification task, MLP is randomly initialized, the first 10 convolutional layers of ResNet-50 are frozen, and only the parameters of the last 7 layers and the fusion layer are fine-tuned to adapt to the specific grain images in the granary (such as the color differences between wheat and paddy), and all parameters of Transformer and MLP are fine-tuned, and it is trained using the historical quality inspection data of the granary (about 100,000 batches). This multi-modal fusion quality inspection model is a model of three different dimensions, extracting features of three different dimensions of grain appearance, composition, and standards, realizing the detection of grain quality, and improving the accuracy of grain quality detection. And when a single modality is abnormal (such as the image being blurred due to camera lens contamination), other modalities can be used for compensatory judgment (spectral data can still accurately detect the variety), improving the robustness of the model.
[0142] By fusing multi-modal data, comprehensively analyzing the grain quality from multiple dimensions, compared with single-data detection, it can evaluate the grain quality more comprehensively and accurately, avoid misjudgment caused by single-index judgment, and provide a reliable quality basis for links such as grain purchase, storage, and sales. Automated data processing and model judgment reduce the workload and time consumption of manual inspection, improve the inspection efficiency, and are especially suitable for the rapid quality inspection requirements of a large number of grain batches in the granary. Strict quality judgment standards and processes ensure that grains that do not meet the quality requirements do not enter the market or storage links, guarantee grain safety, and safeguard the rights and interests of consumers. The continuously accumulated inspection data can be used to further optimize the quality inspection model, improve the accuracy and adaptability of the model, and at the same time provide data support for the quality management and decision-making of the granary.
[0143] Spectral data, image data, and physicochemical test data are collected by their respective testing devices, belonging to the data sources of the device's sensing layer. Associated with barcode scanning data processing, the sample barcode information acquired by the barcode can be linked to specific test samples, ensuring a one-to-one correspondence between test data and samples. Associated with IC card data processing, it can record inspection personnel information and clarify inspection responsibilities. It provides subsequent test results for grain sampling data processing, completing the entire data chain from sampling to testing. Associated with operation registration data processing, it incorporates inspection operations into the entire grain storage operation process record. In grain weighing data processing, test results can be combined with grain weight data to analyze the storage conditions of grains of different qualities, providing a reference for grain depot pricing and sales strategies. Associated with grain storage data processing, it allows for the rational allocation of grain storage locations and conditions based on test results, such as prioritizing storage locations with better ventilation for lower-quality grains. The processed test data is transmitted to the monitoring platform via a data transmission module using a hybrid SDN and quantum encryption scheme. The regulatory platform displays inspection results in visual charts, such as the proportion of grains of different quality grades and the distribution of various indicators. In blockchain traceability, inspection data serves as key information on grain quality, making it convenient for users to check the quality changes of grains from acquisition to sale.
[0144] For example, during the inspection of a newly purchased batch of wheat at a grain depot, near-infrared spectrometers were first used to collect spectral data from the wheat samples. After Savitzky-Golay filtering and normalization, preprocessed spectral data was obtained. Images of wheat samples were captured using an industrial camera, and then subjected to grayscale conversion and histogram equalization to acquire image data. Simultaneously, physicochemical testing equipment was used to determine the wheat's moisture content, protein content, impurity ratio, and other physicochemical data. .
[0145] The processed data is then input into the multimodal fusion quality inspection model. The ResNet-50 network in the model extracts texture, shape, and other features from the image data, the Transformer model analyzes the composition information of the spectral data, and the MLP processes the physicochemical detection data. After calculation, the model outputs the probability that the batch of wheat belongs to different quality grades.
[0146] Judgment function The various indicators are assessed, such as the detected wheat moisture content. =12%, based on wheat varieties in the standard set The standard for moisture content found in the database is no more than 13%, and the corresponding threshold in the threshold set is... =13%, the project passed. All indicators were evaluated sequentially, and ultimately all indicators for this batch of wheat met the standards. The evaluation function returned "Pass," and the grain depot could accept the batch of wheat for storage.
[0147] Grain weighing data processing
[0148] Data preprocessing:
[0149] In the grain storage environment, the dimensions of grain weighing data differ significantly, such as the large range of gross weight, tare weight, and net weight values, while the weighing time is usually presented as a timestamp. To better process this data, net weight data... The following normalization formula is used:
[0150] ;
[0151] in: and These are the minimum and maximum net weights of the batch of grain within a certain time period (such as the current day). This is a correction function for grain varieties. Different grain varieties have different densities, bulk density, and other characteristics, which will affect the range of net weight values. For example, for wheat varieties, =1; For rice varieties, considering their relatively high moisture content and low bulk density... =0.8. By introducing this correction function, the normalized data can better reflect the actual situation of the grain depot.
[0152] Grain depot operations exhibit clear temporal patterns, with busy morning and evening peak hours and relatively stable operations during the middle of the day. To capture these temporal characteristics, time interval features are crucial. The calculation formula is adjusted as follows:
[0153] ;
[0154] in: This is the current weighing time. This is the last weighing time. This refers to peak operating hours for grain depots, such as [7:00, 9:00] and [16:00, 18:00]. This is an adjustment factor for off-peak hours. Considering the relatively long vehicle weighing intervals during off-peak hours, and to balance data characteristics, we take... .
[0155] Anomaly detection model construction:
[0156] In a grain depot environment, different operating times and grain varieties have a significant impact on anomaly detection. Therefore, isolated scores... The calculation formula is refined as follows:
[0157] ;
[0158] in: As a time-series weighting factor, recent data better reflects the current operational status in grain depot operations. Its calculation formula is: , This represents the current data's sequence number within the time series. This represents the total amount of data. Weighting the constraints on work rules, for example, during nighttime work (22:00-6:00), there may be a risk of violations due to fewer workers. =1.2; normal period =0.8. For the first The path length of data points in an isolated tree. The number of isolated trees, It is related to the number of samples The relevant average path length compensation function, , For harmonic numbers, . As an influencing factor for grain varieties, this applies to high-value grain varieties that are prone to weighing anomalies, such as premium rice. Ordinary grains =1.
[0159] In the context of grain depots, considering the impact of different equipment precision and environmental factors on the data, the reconstruction error... The calculation formula is:
[0160] ;
[0161] in, For the number of data samples, For the first Real weighing data For the first The reconstructed weighing data This is the reference weighing value for this grain variety under standard conditions. Environmental impact factors are determined based on environmental parameters such as temperature, humidity, and dust levels in the grain depot. For example, high humidity in the grain depot may affect the weighing accuracy of the weighbridge. =1.1; Under normal environmental conditions, =1.
[0162] In grain depot storage data processing, anomaly scoring is performed by combining grain depot operational procedures and data correlation. The calculation formula is:
[0163] ;
[0164] in, The length of the data sequence. For the first One weighing data, and respectively with The mean and standard deviation of the data within the centered sliding window. These are weighting coefficients, determined based on the importance of the data in the workflow, such as in the critical step of vehicle weighing. =1.2; other auxiliary components, =0.8. This is a function for the stage of the work process; when the grain is in the weighing stage of entering the warehouse, =1; In the outbound weighing stage =0.9.
[0165] The data fusion layer employs a weighted fusion method, taking into account the varying applicability of different algorithms at different stages of grain depot operations. The fused result... The calculation formula is:
[0166] ;
[0167] in, , , The results are presented for the improved Isolation Forest (IIF) algorithm, the anomaly detection algorithm based on Variational Autoencoder (VAE), and the anomaly detection algorithm based on Transformer. For time The changing weighting coefficients, In the initial stage of grain depot operations, due to the limited amount of data, the improved Isolation Forest algorithm can more quickly detect anomalies. =0.6, =0.2, =0.2; As the job progresses and the amount of data increases, the advantages of the Transformer-based algorithm become apparent. =0.3, =0.3, =0.4. At the start of the morning rush hour, with limited data, the Improved Isolation Forest (IIF) algorithm has a higher weight (e.g., 60%) because it can quickly identify obvious outliers without requiring a large amount of data; VAE and Transformer algorithms have lower weights (20% each) because these two algorithms are less stable when initial data is insufficient. During the continuous operation phase, with sufficient data, the Transformer algorithm's weight increases to 40% because it excels at analyzing time-series patterns; the IIF and VAE weights are adjusted to 30% each, achieving a balanced detection of "global anomalies + time-series anomalies + distribution anomalies". When ambient humidity is high (potentially affecting weighbridge accuracy), the VAE algorithm's weight automatically increases to 50% (because it is sensitive to data reconstruction errors and can better reflect equipment interference), while the weights of other algorithms decrease accordingly. The calculated result is compared with a preset threshold (e.g., 0.8). If the index exceeds the threshold, it is judged as an anomaly, triggering an alarm and suspending related operations (e.g., vehicle weighing process); if it does not exceed the threshold, the data passes verification and proceeds to the next stage (e.g., water and impurity deduction calculation). IIF captures sudden outliers (such as a sudden change in weight during a single weighing due to a weighbridge malfunction), VAE identifies data anomalies caused by environmental interference (such as continuously high weight values due to humidity), and Transformer detects process violations (such as vehicles not being weighed in the correct order). The combination of these three technologies can detect over 90% of violations, avoiding the limitations of a single algorithm. Dynamic weight adjustments make the detection strategy more aligned with actual needs. For example, during nighttime operations, the weight of IIF is increased (due to a higher risk of violations), prioritizing the detection of human-caused data tampering; during heavy rain, the weight of VAE is increased, focusing on monitoring the impact of the environment on the equipment.
[0168] Grain depot weighing data faces challenges such as large dimensional differences (e.g., gross weight / net weight spanning hundreds of tons), environmental interference (temperature and humidity affect weighbridge accuracy), and clock asynchrony. Directly inputting this data into the model can lead to misjudgments or unstable training. For example, equipment clock deviations may cause weighing time to become disconnected from vehicle positioning time, making it impossible to correlate and analyze the compliance of operational processes; dusty environments may cause weighbridge data jumps, misleading anomaly detection. By refining the data preprocessing layer formula, the raw weighing data can be more accurately normalized and feature extracted based on the grain depot environment and grain variety characteristics, eliminating dimensional differences and environmental interference. This provides high-quality data input for subsequent anomaly detection algorithms, improving the model's detection accuracy. This step can increase the noise removal rate to 95%, time synchronization accuracy to the 10-millisecond level, and model training convergence speed by 40%. A single algorithm is insufficient to handle diverse violations. For example, the Isolation Forest algorithm excels at global outlier detection but cannot capture time-series anomalies in continuous weighing fluctuations; VAEs are sensitive to environmental disturbances but struggle to distinguish the normal fluctuation ranges of different grain varieties; Transformers are suitable for analyzing time series patterns but are insensitive to sudden jumps. The formula transformations of the multi-algorithm detection layers closely integrate grain depot operational patterns, environmental factors, and differences in grain varieties, enabling each algorithm to better adapt to the complex and ever-changing scenarios of grain depots. For instance, the improved Isolation Forest algorithm considers the impact of operational time and grain variety on anomaly detection, the VAE-based algorithm considers the impact of environmental factors on reconstruction errors, and the Transformer-based algorithm considers the impact of operational processes on anomaly scores, thereby improving the detection performance of each algorithm in the grain depot environment. Grain depot operations are characterized by phases (such as concentrated vehicle weighing during the morning rush hour) and environmental sensitivity (such as rain affecting weighbridge accuracy), making it difficult to balance efficiency and accuracy with fixed detection strategies. For example, in the initial stages of operations, it is necessary to quickly intercept obvious anomalies, while in the stable period, in-depth analysis of time-series data is required. The formula of the data fusion layer dynamically adjusts the weights of each algorithm according to the grain depot operation stage, so that the fusion result can better reflect the advantages of each algorithm in the current scenario, avoid the limitations of a single algorithm, realize the complementary advantages of multiple algorithms, and improve the decision-making accuracy and reliability of the comprehensive anomaly judgment model.
[0169] The formulas in the data preprocessing layer directly rely on the raw data collected by the equipment sensing layer, such as the gross weight, tare weight, net weight, and weighing time data collected by the weighbridge controller. Preprocessing this data provides effective input for subsequent anomaly detection algorithms, achieving a seamless connection from raw data collection to data processing and ensuring data accuracy and usability. The anomaly detection results of the multi-algorithm detection layer are interconnected with other stages in grain weighing data processing. For example, detected anomaly data can provide a reference for moisture and impurity deduction calculations in grain warehouse data processing; if weighing anomalies are found, it may be necessary to re-check the moisture and impurity content of the grain. Simultaneously, anomaly data can also assist in grain inspection data processing, determining the relationship between grain quality and weighing, and further investigating the causes of anomalies. The anomaly judgment results from the decision output layer are transmitted to the regulatory platform through the data transmission and display section. Based on these results, the regulatory platform displays relevant information about the anomaly data in a visual manner, such as the distribution, type, and occurrence time of the anomaly data. Furthermore, this anomaly data can also be used as part of the entire lifecycle data of grain storage and procurement, enabling traceability in blockchain traceability, enhancing the transparency and credibility of grain warehouse data, and providing comprehensive decision support for grain warehouse management.
[0170] For example, during corn purchasing operations at a grain depot, a truck transporting corn was weighed at night (11:00 PM). The weighbridge controller collected the vehicle's gross weight. =55000 kg, tare weight =15000 kg, net weight =40000 kg, weighing time =23:00, last weighing time =22:00.
[0171] Normalization treatment: Minimum net weight of corn in the grain depot on that day =30000 kg, maximum value =50,000 kg, the grain variety is corn. =1. Therefore, the normalized net weight is: .
[0172] Time interval feature extraction: Due to the nighttime work period, time interval features... =1 hour.
[0173] Improved Isolation Forest Algorithm (IIF): Assuming a forest is constructed... =50 isolated trees, this data point is in the _th Path length in an isolated tree =5, total data volume =100, current data sequence number =80, then the time series weighting factor 0.8. Nighttime work. =1.2, corn is a common grain. =1. Calculate isolated fractions: Set a threshold. , The algorithm determines that this data is abnormal.
[0174] Anomaly detection algorithm based on variational autoencoder (VAE): assuming the reconstructed net weight data =38,000 kg, the reference weighing value of this corn variety under standard conditions. =40,000 kg, environmental impact factor =1.1, number of data samples =10. Calculate the reconstruction error: The threshold was set to 0.02, because... If the value is greater than 0.02, the algorithm determines that the data is abnormal.
[0175] Transformer-based anomaly detection algorithm: assuming the mean of data within a sliding window centered on the data point... =35000 kg, standard deviation =2000 kg, the data is from the critical weighing stage upon warehousing. =1.2, currently in the warehousing and weighing stage. =1. Calculate the anomaly score: The threshold is set at 2.5, because... If the value is >2.5, the algorithm determines that the data is abnormal.
[0176] During the nighttime operation phase, set =0.6, =0.2, =0.2. Therefore, the result after fusion is... Set decision thresholds. =0.8, because > The comprehensive anomaly detection model determines that the weighing data is abnormal and sends the anomaly information to the monitoring platform to remind staff to conduct an inspection.
[0177] Grain warehouse data processing
[0178] Grain warehouse data processing comprises two parts: moisture and impurity deduction management and inventory status analysis. Specific details are as follows:
[0179] Water and impurity deduction data processing: Water deduction data and miscellaneous data The calculation is based on grain weighing data and preset standards. Taking moisture deduction as an example, it is based on the grain variety. Retrieve the corresponding moisture standard value from the standard library. The actual moisture content obtained from weighing is known. Water deduction The calculation formula is ,in This is the net weight of the grain. (Deduct impurities) The calculation method is similar, based on the impurity standard value. and actual impurity content Through formula The result is obtained from the calculation. , With set threshold , The comparison is performed, and the threshold is set based on factors such as grain variety and storage requirements. > or > When the smart contract alarm mechanism is triggered, the contract immediately sends an alarm message to the operator's terminal and suspends the current warehouse operation process to prevent unqualified grain from entering the warehouse.
[0180] Inventory Status Analysis: Inventory data is analyzed using a Spatiotemporal Graph Convolutional Network (ST-GCN). Each storage unit in the grain depot is treated as a graph node. The number of nodes is Build a node set .side Represents a node and The relationships between these elements include spatial adjacency and temporal sequence relationships. Spatial adjacency is determined by calculating the physical distance between storage units. Confirmed, when When the distance threshold is reached (e.g., 5 meters), two nodes are considered adjacent, and an edge is added. The time series relationship is established according to the order of grain storage time, and the state of the same storage unit at different time points constitutes the time series edge.
[0181] The model input is a spatiotemporal graph. and the feature vector corresponding to each node (Including grain storage volume and temperature) ,humidity (Information such as...). Through multi-layer graph convolution operations and temporal convolution operations, spatiotemporal features are extracted to predict trends in grain storage status. For example, predicting future... Temperature change of a storage cell within an hour and humidity changes ,like (Temperature change threshold) or (Humidity change threshold) The system generates an early warning message, prompting staff to take measures such as ventilation and dehumidification.
[0182] Through rigorous moisture and impurity deduction calculations and threshold judgments, the moisture and impurity content of grain entering the grain depot is ensured to meet storage standards, preventing losses due to mold, pests, and other quality issues, and guaranteeing the quality and safety of stored grain. ST-GCN is used to analyze and predict inventory status, helping grain depot managers to anticipate changes in grain storage conditions, rationally allocate storage resources, and develop scientific operational plans for ventilation, dehumidification, and grain handling, reducing storage losses and improving inventory management efficiency. Smart contract alarms and operational suspension mechanisms intervene promptly when moisture and impurity deductions are abnormal, preventing non-compliant operations from continuing, ensuring safe and standardized grain depot operations, and avoiding quality disputes and economic losses caused by violations. Accurate moisture and impurity deduction data and inventory status analysis results provide data support for grain depot cost accounting, sales pricing, and procurement planning decisions. For example, the actual grain acquisition cost can be assessed based on moisture and impurity deductions, and sales strategies can be adjusted according to changes in inventory status.
[0183] The calculation of deductions for water and impurities relies on the net weight data of the grain collected by the weighbridge controller. Temperature in inventory status analysis ,humidity Data is collected in real time by a group of temperature and humidity sensors. Simultaneously, vehicle location information located by an RFID reader array helps determine whether the grain transportation to the storage area is normal. Grain weighing data provides basic weight and quality parameters for calculating moisture and impurities; grain quality indicators obtained from grain inspection data processing serve as a reference for setting moisture and impurity deduction standards. Storage operation information recorded in the operation registration data processing is combined with the grain storage data processing results to fully present the storage operation process. Sample information obtained from grain sampling data processing can be correlated with inventory status analysis results to trace quality changes in different batches of grain during storage. The processed moisture and impurity deduction data, inventory status analysis results, and early warning information are transmitted to the monitoring platform via a data transmission module using a hybrid SDN and quantum encryption scheme. The monitoring platform displays information such as moisture and impurity deduction status of stored grain and status change trends of each storage unit in visual charts, facilitating real-time monitoring of grain depot operations by managers; in blockchain traceability, storage data, as key information in the grain storage process, allows for tracing the quality control situation during grain storage.
[0184] During wheat storage operations at a grain depot, a batch of wheat was weighed and its net weight was obtained. =5000 kg, actual moisture content =14%, according to the standard value for moisture content in the wheat variety database. =13%, which can be calculated using the deduction formula. = (0.14 − 0.13) × 5000 = 50 kg. The set water deduction threshold. =40 kg, due to The smart contract immediately triggered an alarm, sending a warning to the handheld terminals of the on-site workers, and simultaneously suspending the wheat's storage process, pending re-inspection or reprocessing by staff.
[0185] Regarding inventory status analysis, taking a grain depot storage unit as an example, the current stored wheat quantity is 100 tons, and the real-time temperature is... =25℃, humidity =65%. Based on the ST-GCN model, the humidity of this storage unit is predicted to rise to 75% within the next 6 hours, exceeding the set humidity change threshold. =5%. The system generates an early warning message, prompting staff to ventilate and dehumidify the storage unit, effectively preventing wheat from becoming moldy due to excessive humidity.
[0186] Data Processing System Architecture - Regulatory Platform Layer: Data Processing and Display
[0187] The regulatory platform layer utilizes WebGL technology to construct a 3D visualization interface, combining GIS maps to display grain depot layouts, operational progress, and inventory distribution. It integrates a blockchain explorer to achieve end-to-end data traceability. An intelligent decision support module is provided, generating suggestions for operational scheduling and inventory management based on data analysis results.
[0188] Data transmission employs a hybrid scheme of software-defined networking (SDN) and quantum encryption. The specific operation process is as follows:
[0189] SDN Dynamic Path Selection: SDN Controller Collects Network Traffic Matrix in Real Time ( Represents a node To the node Traffic (in Mbps) and node load vector ( Represents a node The load rate, with a value ranging from [0,1], is used. Path optimization is performed using Dijkstra's algorithm combined with a load balancing strategy, with the objective function being... ,in For path, For the edge The weights are determined based on factors such as link bandwidth and latency. This is the load impact factor (value 0.5). Representing an edge Connected nodes. When the traffic on a link in the network exceeds a threshold. (e.g., 80% of link bandwidth) or node load exceeding a threshold When (0.8), the SDN controller triggers path reselection and recalculates the optimal transmission path.
[0190] Quantum encryption implementation: A quantum key QK is generated using quantum key distribution (QKD) technology, with a key length of 256 bits. One-time pad (OTP) encryption is employed, and the encryption formula for data D is E = D ⊕ QK (⊕
[0191] (This represents an XOR operation). Before data transmission, the sender and receiver negotiate a key pair via a quantum channel. To ensure key reliability, key negotiation is performed again every 1000 data packets transmitted.
[0192] Data Packetization and Transmission: The processed data (such as job registration data J, grain inspection data Q, etc.) is divided into fixed-size data packets, each 1024 bytes in size. Each data packet includes a header containing the source address. Destination address Group number A checksum (using the CRC-32 checksum algorithm) is used. Data packets are transmitted to edge sensing nodes via the Zigbee network, and then forwarded to the monitoring platform via the SDN network. During transmission, an acknowledgment and retransmission (ARQ) mechanism is used. After receiving a data packet, the receiving end verifies the checksum. If it is correct, it returns an acknowledgment frame (ACK). If there is an error or the packet is not received within a timeout period, a retransmission request (NACK) is sent. The sending end can retransmit a maximum of 3 times.
[0193] The data display on the regulatory platform is based on WebGL technology and GIS maps. Functional details are as follows:
[0194] 3D Visualization: A 3D model of the grain depot is constructed, presenting the buildings, warehouses, equipment, and other entities in a three-dimensional format. For grain inventory data, inventory levels are displayed using bar charts of different colors and heights, organized by warehouse. For example, green indicates sufficient inventory, yellow indicates an inventory warning, and red indicates insufficient inventory; the height of the bar chart is proportional to the inventory level. Real-time vehicle location information is updated, and vehicle movement trajectories are displayed as dynamic icons in the 3D scene. Users can zoom in and out of the scene using the mouse wheel and drag the viewpoint while holding down the left mouse button to view the real-time status of the grain depot from all angles.
[0195] Data interaction functions: Grain depot locations and surrounding information are marked on a GIS map. Clicking the grain depot icon on the map brings up a detailed information window displaying basic information about the grain depot and current operational progress. For full lifecycle data of grain, users can click on a specific batch of grain records to view the complete process data from acquisition, sampling, inspection, weighing to storage, including time, operators, and test results. Visual charts (such as pie charts of quality grade distribution and line charts of inventory changes) support data filtering and drill-down functions, allowing users to select specific time periods and grain varieties to view detailed data.
[0196] Intelligent Decision Display: Information such as job scheduling suggestions and inventory management strategies generated by the intelligent decision support module is displayed in a combination of lists and charts. For example, job scheduling suggestions are presented as Gantt charts to show the job plan, and inventory management strategies are presented through comparative analysis charts to show the advantages and disadvantages of different solutions. At the same time, explanations of the decision-making basis are provided, displaying relevant data indicators and analysis processes to assist managers in understanding and making decisions.
[0197] Quantum encryption technology ensures that data is not stolen or tampered with during transmission. Even if the data is intercepted, it cannot be decrypted without the quantum key, providing extremely high security for grain depot storage and monitoring data. SDN dynamic path selection optimizes the transmission path based on real-time network conditions, avoiding network congestion, improving data transmission speed and stability, and ensuring that data is delivered to the monitoring platform in a timely manner to meet real-time monitoring needs. The combination of 3D visualization and GIS maps presents complex grain depot data in an intuitive and easy-to-understand format, allowing managers to quickly grasp the overall operation of the grain depot, including inventory status, operational progress, and vehicle locations. Rich data interaction functions and intelligent decision-making displays enable managers to deeply analyze data, obtain valuable information, and provide a scientific basis for grain depot operational scheduling, inventory management, procurement, and sales decisions, improving the level of intelligent grain depot management. By combining blockchain traceability technology with data display, users can trace the entire lifecycle of grain from storage to delivery, enhancing the transparency and credibility of grain depot data and helping to ensure grain quality and safety and accountability.
[0198] The data transmission section receives raw data (such as IC card data I, weighbridge weighing data W, etc.) collected by the device sensing layer and processed data (such as operation registration data J, grain inspection result data, etc.) from the data storage and analysis layer, encrypts it, and transmits it to the monitoring platform via an optimized path. The data display section presents this data in a visual format, allowing managers to intuitively understand the results of device sensing and data storage and analysis. The cloud gateway processing layer performs in-depth analysis, anomaly detection, and storage management on the data before transmitting it to the data transmission section. The data transmission section relies on data provided by the cloud gateway processing layer for transmission, while the content displayed in the data display section also originates from the data processed by the cloud gateway processing layer. The two sections collaborate to achieve a complete data flow from processing to transmission and display. During data transmission, some key data (such as operation registration data, grain inspection data, etc.) is stored on the blockchain. The data display section integrates a blockchain explorer to enable querying and displaying of blockchain data, supporting traceability of grain lifecycle data. The data transmission and display sections provide interfaces and a display platform for the application of blockchain data, enhancing data credibility and traceability.
[0199] For example, during a corn purchase operation at a grain depot, the weighing data W and grain inspection data Q collected by the weighbridge controller are processed by the cloud gateway and prepared for transmission to the monitoring platform. The SDN controller detects that the traffic on a certain link in the current network has reached a threshold. Immediately based on the network traffic matrix T and the node load vector L, the transmission path is recalculated using an optimization algorithm, and a path with lower load is selected for data transmission.
[0200] Before transmission, the sender and receiver negotiate a 256-bit quantum key (QK) using quantum key distribution technology and encrypt the data using a one-time pad method. The data is divided into 1024-byte data packets, header information is added, and then transmitted through the Zigbee and SDN networks. After receiving the data packets, the receiver verifies the checksum, and returns an acknowledgment frame (ACK) upon confirmation that the data has been successfully transmitted.
[0201] After receiving the data, the monitoring platform updates the bar chart for the corresponding warehouse in real time on the 3D visualization interface, displaying the inventory quantity of newly received corn. The current location of the vehicles transporting corn is marked on the GIS map, and their movement trajectory is dynamically displayed. Managers can click on the record of that batch of corn to view complete data from acquisition and sampling to inspection and weighing, including inspection results such as moisture content and impurity ratio. The intelligent decision support module generates inventory allocation suggestions based on inventory data and market demand, and displays the inventory changes and benefit analysis before and after the allocation in chart form to assist managers in making decisions.
[0202] The processes described above with reference to the flowcharts in the embodiments disclosed in this invention can be implemented as computer software programs. The embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication component, and / or installed from a removable medium. When the computer program is executed by a central processing unit (CPU), it performs the functions defined in the methods of this application. It should be noted that the computer-readable medium described above in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wire segments, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless segments, wire segments, optical fibers, RF, etc., or any suitable combination thereof.
[0203] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0204] Those skilled in the art should understand that the embodiments of the present invention described above and shown in the accompanying drawings are merely examples and do not limit the present invention. The purpose of the present invention has been fully and effectively achieved. The functions and structural principles of the present invention have been shown and explained in the embodiments. Without departing from the stated principles, the implementation of the present invention may have any variations or modifications.
Claims
1. A data processing method for a grain depot storage supervision cloud gateway, characterized in that, The method comprises: Collect relevant job information, and encapsulate the job information into a smart contract; Perform quality preliminary screening, data integrity check and repeated data comparison on sample data in the job information through an edge fog node, and transmit the data processed by the edge fog node to a cloud gateway using a confirmation retransmission mechanism; Fusion spectrum data, image data and physicochemical detection data, construct a multi-modal quality inspection model, and perform multi-dimensional comprehensive analysis on grain quality; Construct an abnormality judgment model to perform abnormality detection on the grain inspection data of the qualified grain; According to the grain inspection data and the preset standard, calculate the water deduction data and the impurity deduction data, screen out unqualified grain, and predict the storage state change trend of the grain using a spatio-temporal graph convolution network; Construct a supervision platform, and the supervision platform constructs a 3D model using the collected relevant job data and analysis data generated based on the relevant job data; The specific content of the multi-modal quality inspection model is as follows: Preprocess the data, select a ResNet-50 model pre-trained on a large-scale public grain quality inspection data set as a basic network, a Transformer model and a multi-layer perception machine, migrate the parameters of the pre-trained model to the grain warehouse quality inspection task, and fine-tune based on the sample data of the grain warehouse; in the training process, a cross-entropy loss function is used; whether the grain quality is qualified is judged by a judgment function; The abnormality judgment model is as follows: Anomaly judgment model is constructed by fusing improved isolation forest algorithm, anomaly detection algorithm based on variational autoencoder and anomaly detection algorithm based on Transformer, a weighted fusion method is adopted in the data fusion layer, considering the applicability differences of each algorithm in different stages of grain depot operation, the fused result The calculation formula is: ; wherein: , , are the detection results of the improved Isolation Forest algorithm, the anomaly detection algorithm based on variational autoencoder, and the anomaly detection algorithm based on Transformer, respectively; is a weight coefficient that changes over time . The grain storage state change trend prediction process is as follows: Build a graph structure, regard each storage unit of the grain warehouse as a node, establish the connection between the nodes according to the physical adjacent relationship between the storage units and the storage time sequence of the grain, form a graph reflecting the space-time characteristics, input the inventory data into the network, and perform space-time feature extraction; through multi-layer graph convolution and time convolution operation, the state change law between different storage units and at different times of the same unit is mined; the extracted features are used to predict the change of the future grain storage environment.
2. The data processing method for the cloud gateway of grain depot storage supervision according to claim 1, characterized in that, The relevant job information collection process is as follows: Biometric verification is performed using a capacitive fingerprint sensor and near-infrared iris imaging technology, encrypted data and digital signatures are transmitted to an edge perception node, edge perception node data is transmitted to an edge fog node, an RFID reader array monitors the vehicle position in real time, and a Kalman filtering algorithm is used to smooth the positioning results; a temperature and humidity sensor group collects current environment temperature and humidity data in real time; a weighbridge controller collects weight, and a median filtering algorithm and a sliding average filtering algorithm are used for weight data processing.
3. The data processing method for the grain depot storage supervision cloud gateway according to claim 2, characterized in that, The smart contract adopts a time-driven mechanism, when the job information changes, the corresponding time is triggered, and the smart contract responds immediately; The job information is permanently stored in a blockchain, and the blockchain storage organizes the job information in a Merkle tree structure, takes each job information as a leaf node, generates a parent node through pairwise hash calculation, and reaches a root node.
4. The data processing method for the cloud gateway of grain depot storage supervision according to claim 3, characterized in that, The edge fog node processing process is as follows: According to the color score, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain appearance total score is calculated, the grain 5. The data processing method for the grain depot storage supervision cloud gateway according to claim 4, characterized in that, 6. A data processing system for a grain storage supervision cloud gateway, characterized in that, 7. A computer readable storage medium characterized by
Citation Information
Patent Citations
System for automatic unloading of an agricultural material
CN103732479A
Cloud gateway for grain depot collection and storage supervision and data processing method of cloud gateway
CN114429327A