Data processing method and system for grain depot collection and storage supervision cloud gateway
Through the multi-technology integration of abnormal judgment models and multimodal quality inspection models, the problems of low data transmission efficiency and insufficient supervision in traditional grain storage operations have been solved, and efficient, safe and intelligent management of grain storage operations has been achieved.
Patent Information
- Application Number
- CN202510799762.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-16
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-06-16
AI Technical Summary
Traditional grain storage operations rely on manual data entry and decentralized equipment collection. Data transmission efficiency is low and real-time updates cannot be achieved, making it difficult for managers to grasp the progress of operations and inventory status in a timely manner. Favoritism and fraud are common, and abnormal tracing is difficult. There is a lack of effective supervision measures and data security guarantees.
An anomaly judgment model that integrates multiple technologies is used to perform initial data screening and retransmission through edge fog nodes. A multimodal quality inspection model and anomaly detection model are constructed. Multi-dimensional analysis is performed by combining spectral, image, and physical and chemical test data. The spatiotemporal graph convolutional network is used to predict storage status changes, and a supervision platform is built for 3D model display.
It has achieved efficient supervision, accurate decision-making and risk prevention and control, improved the accuracy and security of data processing, formed a full-process automated collaborative management mechanism, and improved the level of grain warehouse operation and management.
Smart Images

Figure CN120687777A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of grain depot supervision, and in particular to a data processing method and system for a grain depot storage and supervision cloud gateway. Background Art
[0002] As food security strategies are further advanced, intelligent management of grain storage operations is becoming increasingly critical. However, current grain storage operations face numerous pressing challenges, severely impacting food security and the healthy development of the industry.
[0003] In terms of data updating, traditional grain storage operations rely heavily on manual data entry and decentralized equipment collection. This results in inefficient data transmission and a lack of real-time updates, making it difficult for managers to keep abreast of operational progress and inventory status, hindering the timeliness of decision-making. Favoritism and fraud persist despite repeated prohibitions. Due to the lack of effective regulatory measures and data security mechanisms, operators can exploit data loopholes to conduct illegal operations, such as tampering with weighing data and misreporting grain quality, resulting in losses to national grain resources. Tracing anomalies is difficult due to the large volume and fragmented nature of grain storage operational data, and the lack of effective correlation between data at various stages. When anomalies occur, it is difficult to quickly locate the source of the problem and the responsible party, failing to effectively deter illegal behavior. Summary of the Invention
[0004] The anomaly judgment model that integrates multiple technologies in the present invention improves the accuracy of data processing and realizes efficient supervision, accurate decision-making and risk prevention and control.
[0005] The technical solution proposed by the present invention is: a data processing method for a grain storage and supervision cloud gateway, the method comprising: Collect relevant operation information and encapsulate the operation information into smart contracts; The edge fog node performs initial quality screening, data integrity check, and duplicate data comparison on the sample data in the job information, and transmits the data processed by the edge fog node to the cloud gateway using the confirmation and retransmission mechanism; Integrate spectral data, image data, and physical and chemical test data to build a multimodal quality inspection model and conduct a multi-dimensional comprehensive analysis of grain quality; Build an anomaly judgment model to detect anomalies in the weight data of grains with qualified quality; Based on the grain weight data and preset standards, the water and impurity deduction data are calculated to screen out unqualified grains, and the spatiotemporal graph convolutional network is used to predict the trend of grain storage status changes; Build a supervision platform that uses the collected relevant operation data and analysis data generated based on the relevant operation data to build a 3D model.
[0006] Preferably, the relevant operation information collection process is as follows: Capacitive fingerprint sensors and near-infrared iris imaging technology are used for biometric verification, and encrypted data and digital signatures are transmitted to edge sensing nodes. The edge sensing node data is then transmitted to the edge fog node. The RFID reader array monitors the vehicle position in real time, and the Kalman filter algorithm is used to smooth the positioning results. The temperature and humidity sensor group collects the current ambient temperature and humidity data in real time. The weighing scale controller collects weight and processes the weight data using the median filter algorithm and the sliding average filter algorithm.
[0007] 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, and the blockchain storage adopts a Merkle tree structure to organize the job information, with each job information as a leaf node, and a parent node is generated through pairwise hash calculation until the root node.
[0008] Preferably, the edge fog node processing process is as follows: The total appearance score of the grain is calculated based on the color score, grain fullness score and impurity content score, and grain with unqualified total appearance score is eliminated; the edge fog node judges the validity of the smart contract data and eliminates 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.
[0009] Preferably, the specific content of the multimodal quality inspection model is as follows: The data was preprocessed, and the multimodal quality inspection model selected the ResNet-50 model pre-trained on a large-scale public grain quality inspection dataset as the basic network, Transformer model and multi-layer perceptron. The parameters of the pre-trained model were 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 was used; and the judgment function was used to determine whether the grain quality was qualified.
[0010] Preferably, the abnormality judgment model is as follows: An anomaly judgment model is constructed by integrating the improved isolation forest algorithm, the anomaly detection algorithm based on variational autoencoder and the anomaly detection algorithm based on Transformer. The data fusion layer adopts the weighted fusion method. Taking into account the applicability differences of each algorithm at different stages of grain storage operations, the fusion results are The calculation formula is: ; in: 、 、 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 are respectively; Over time Changing weight coefficient
[0011] Preferably, the grain storage status change trend prediction process is as follows: A graph structure is constructed, and each storage unit in the grain warehouse is regarded as a node. Connections between nodes are established based on the physical proximity between storage units and the chronological order of grain storage, forming a graph that reflects spatiotemporal characteristics. Inventory data is input into the network for spatiotemporal feature extraction. Through multi-layer graph convolution and time convolution operations, the state change patterns between different storage units and the same unit at different times are explored. The extracted features are used to predict future changes in the grain storage environment.
[0012] Preferably, the specific process of the supervision platform is as follows: With the help of WebGL technology and GIS maps, grain warehouse operation data is converted into 3D visualization images, intuitively presenting inventory quantity, vehicle location, and operation progress information; through the intelligent decision support module, the processed data is analyzed and processed to generate operation scheduling optimization and inventory allocation decision recommendations.
[0013] The present invention also provides a data processing system for a cloud gateway for grain storage and supervision, and the system is used to execute the data processing method for a cloud gateway for grain storage and supervision.
[0014] The present invention also provides a computer-readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the data processing method for a grain storage and supervision cloud gateway.
[0015] Beneficial effects of the present invention: Innovatively, multiple technologies are deeply integrated at the device perception layer and in the data transmission process. IC card data processing combines quantum key distribution with biometric recognition technology. 256-bit symmetric key encryption, coupled with a 500dpi resolution capacitive fingerprint sensor and 640×480 resolution near-infrared iris imaging, ensures data security and accurate identity authentication. Data transmission utilizes a hybrid solution of Zigbee wireless communication networks, software-defined networking (SDN), and quantum encryption. The Zigbee network is responsible for data transmission within the device perception layer, while SDN and quantum encryption ensure efficient and secure data transmission between the cloud gateway processing layer and the supervisory platform. Compared to traditional grain depots employing a single technology, this system achieves comprehensive improvements in data collection security, transmission stability, and efficiency, laying a solid data foundation for grain depot supervision.
[0016] In terms of data processing and anomaly detection, multiple cutting-edge algorithms and models are integrated to form an intelligent processing system. Grain inspection utilizes a multimodal fusion quality inspection model, integrating spectral, image, and physical and chemical test data, leveraging transfer learning to achieve accurate quality assessment. Grain weighing employs an improved isolation forest algorithm, incorporating time series weighting factors and operational rule constraint weights to enhance anomaly detection accuracy. On this basis, a fusion anomaly detection model is constructed, integrating the improved isolation forest algorithm, an anomaly detection algorithm based on a variational autoencoder (VAE), and an anomaly detection algorithm based on a Transformer. The data preprocessing layer provides targeted processing of raw data, while the multi-algorithm detection layer analyzes data from different perspectives. The data fusion layer dynamically assigns weights to the fusion results based on the grain depot's operational stage, and the decision output layer uses this to accurately identify anomalies. This integrated innovation transcends the limitations of traditional single algorithms. Through algorithmic collaboration and dynamic fusion, it significantly enhances the ability to process complex grain depot data and detect anomalies, providing a more scientific and reliable basis for decision-making in grain depot management.
[0017] An automated collaborative management mechanism covering the entire process of grain storage and supervision has been established. From data collection at the device perception layer, to data processing, analysis and storage at the cloud gateway processing layer, to visual display and decision support at the supervision platform layer, all modules work closely together. In terms of operational process collaboration, taking grain warehousing operations as an example, modules at each layer automatically complete identity authentication, data collection and processing, and instruction issuance and execution, achieving full process automation. In the case of abnormal weight data, once there is an abnormality in the weight data, the various modules of the system will immediately work together to complete operations such as alarming, suspending operations, and re-inspecting, forming a closed-loop management. This mechanism changes the traditional model of decentralized grain depot management and high manual dependence, realizes the efficiency, intelligence and standardization of grain storage and supervision, and greatly improves the level of grain depot operation and management. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 This is a flow chart of a data processing method for a grain storage and supervision cloud gateway of the present invention; Figure 2 The present invention is a flow chart of the quality inspection process of a data processing method for a grain storage and supervision cloud gateway. DETAILED DESCRIPTION
[0019] The following description is intended to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are for illustrative purposes only, and those skilled in the art will readily appreciate other obvious variations. The basic principles of the present invention defined in the following description may be applied to other embodiments, variations, improvements, equivalents, and other technical solutions that do not depart from the spirit and scope of the present invention.
[0020] It is to be understood that the term "one" should be understood as "at least one" or "one or more", that is, in one embodiment, the number of an element may be one, while in another embodiment, the number of the elements may be multiple, and the term "one" should not be understood as a limitation on the quantity.
[0021] like Figure 1 and Figure 2 As shown in the figure, the main content of this solution is to collect relevant operation information and encapsulate the operation information into a smart contract; perform initial quality screening, data integrity check and duplicate data comparison on the sample data in the operation information through the edge fog node, and transmit the data processed by the edge fog node to the cloud gateway using the confirmation and retransmission mechanism; integrate spectral data, image data and physical and chemical test data to build a multimodal quality inspection model, and conduct a multi-dimensional comprehensive analysis of grain quality; build an anomaly judgment model that integrates the improved isolation forest algorithm, the anomaly detection algorithm based on the variational autoencoder and the anomaly detection algorithm based on the Transformer, and perform anomaly detection on the weight data of grain with qualified quality; calculate the water deduction data and the impurity deduction data according to the grain weight data and the preset standards, screen out unqualified grain, and use the spatiotemporal graph convolutional network to predict the trend of grain storage status changes; build a supervision platform based on WebGL technology and GIS maps, and the supervision platform uses the collected relevant operation data and the analysis data generated based on the relevant operation data to build a 3D model.
[0022] Data processing system architecture - device perception layer: The equipment perception layer consists of IC cards, scale controllers, scanners, RFID reader arrays, temperature and humidity sensor groups, etc. The IC card stores the identity information of the operator. (Including number ,Name , permission level ) and job task data (Task No. , grain varieties , Planned working time ); The scale controller collects weighing data in real time (Gross Weight , tare weight ,net weight , weighing time , sampling frequency is 1 time / second); the scanner obtains the sample barcode information Barcode information with quality inspection results , scanning resolution reaches 300dpi; RFID reader array is used to locate the working vehicle, the reader operating frequency band is 902-928MHz, and the communication distance is adjustable from 0-10 meters; the temperature and humidity sensor group monitors the environmental data of the grain depot (temperature Measurement accuracy ±0.5℃, humidity These devices are connected to edge sensing nodes via a Zigbee wireless communication network. The Zigbee network uses a star topology, operates on channels 11-26 in the 2.4 GHz frequency band, and has a data transmission rate of 250 kbps, enabling initial data aggregation.
[0023] Data perception and collection IC card data processing The IC card has a built-in security chip and has independent data encryption and decryption functions. When the operator performs identity authentication, the capacitive fingerprint sensor first collects the fingerprint image, and the sensor converts the fingerprint texture information into a digital signal to generate a fingerprint feature vector. The fingerprint feature vector pre-stored in the system is , using an algorithm based on minutiae matching The algorithm first extracts the minutiae (such as the bifurcation and end points of the lines) in the fingerprint image, and then determines whether it matches by calculating the similarity of the position, direction and other information of the minutiae. If the similarity score exceeds the preset threshold (such as 80 points, which can be set according to the actual situation), then =1, indicating that the fingerprint verification is successful. For iris recognition, near-infrared imaging technology is used to obtain iris images with a resolution of 640×480. After image acquisition, image preprocessing (including denoising and normalization) and feature extraction (extracting iris texture, ring structure and other features) are performed to generate an iris feature vector. . and the pre-stored iris feature vector Compare and use Hamming distance to calculate the difference between the two. If the difference is less than the set threshold (such as 0.3), then =1, iris verification is successful. When the biometric feature verification is passed, the IC card uses the 256-bit symmetric key K generated by quantum key distribution technology to store the personal identity information. (serial number ,Name , permission level ) and job task data (Task No. , grain varieties , Planned work time ) for encryption. The encryption algorithm uses the Advanced Encryption Standard (AES), and 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 the encrypted data and digital signature to the edge sensing node through the TLS1.3 protocol. After receiving the data, the edge sensing node first uses the public key PK to verify the digital signature. ,After the verification is passed, the symmetric key K is used to decrypt the data to obtain the ,original personnel identity information and work task data.
[0024] Vehicle positioning data processing The RFID reader array uses active RFID technology. The reader transmits 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 attached to the vehicle receives the signal, modulates the vehicle identification information (such as license plate number and vehicle type) stored in the tag, and reflects it back to the reader. The reader then demodulates and decodes the reflected signal to obtain the vehicle identification information.
[0025] When calculating the distance between the vehicle and the reader, the RFID signal strength (Unit: dBm), using the formula Calculation. Among them, The reference signal strength at 1 meter is -30dBm, which is the standard signal strength measured in a grain depot without interference. is the grain depot environmental attenuation coefficient, with a value of 2.5. This coefficient is obtained through a large number of tests on the 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 once every 1 second, and the average value after 5 consecutive samples is taken as the current signal strength. .
[0026] In the process of triangulation positioning, in order to reduce the positioning error caused by factors such as signal multipath propagation, the weighted least squares method is used to optimize the positioning results. Assume that the coordinates of the three RFID readers are 、 、 The calculated distances are 、 、 , giving each distance a weight 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 : ; Temperature and humidity data collection The temperature and humidity sensor group 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 warehouse. For warehouses less than 500 square meters, at least five sensor nodes are deployed, located at the four corners and the center. For warehouses larger than 500 square meters, one sensor node is added for every additional 100 square meters.
[0027] The sensor node has a collection cycle of 10 minutes. At the beginning of each cycle, the MCU controls the temperature and humidity sensitive elements to collect the current environment temperature. and humidity After the collected analog signal is converted into a digital signal by the A / D conversion circuit, it is first filtered and the median filter algorithm is used to remove random noise interference. The specific method is to collect 5 consecutive data ( 、 、 、 、 ) Arrange them in ascending order and take the middle value as the filtered temperature data ; Humidity data The same filtering method is used.
[0028] The filtered data is stored in the memory of the sensor node, waiting for the transmission instruction of the Zigbee network. When the transmission instruction is received from the edge sensing node, the sensor node will ,humidity The sensor node automatically retransmits the data up to three times if it fails to receive the data frame within the specified time.
[0029] Optimization of weighbridge data collection The scale controller uses a high-precision load cell with a measurement accuracy of ±0.1% FS (FS = full scale). During data collection, a sliding average filter is used in addition to a median filter to prevent data fluctuations caused by vibration and impact when the vehicle is loaded and unloaded on the scale, as well as external electromagnetic interference.
[0030] The specific implementation method is: set a data window with a length of 10, and each time new weighing data is collected Then, add it to the data window, remove the earliest data in the data window, and then calculate the average value of the 10 data in the data window as the effective weighing data of this time. .Right now ,in The first The original data.
[0031] In addition, the scale controller also has an automatic zero-point calibration function. Every morning when there is no operation in the grain warehouse, the scale controller automatically performs zero-point calibration. By collecting no-load data within a period of time (such as 10 minutes), the average value of these data is calculated as the new zero-point reference value. If the deviation between the currently measured no-load data and the new zero-point reference value exceeds the set threshold (such as ±0.5kg), the measurement data is automatically corrected to ensure the accuracy of the weighing data. At the same time, the scale controller uses the CRC-16 checksum algorithm to check the transmitted data. The CRC checksum of the data is calculated at the data sending end and attached to the end of the data frame. The receiving end recalculates the CRC checksum of the received data and compares it with the checksum of the sending end. If there is inconsistency, it is considered that the data transmission is wrong and the data is required to be resent.
[0032] Data perception and collection is the cornerstone of the entire grain storage and management system, carrying out the critical task of acquiring and initially processing raw data. Firstly, it comprehensively captures all key information during grain storage operations, including operator identity, task schedules, vehicle location dynamics, grain weight changes, and the state of the grain storage environment. This provides a rich and authentic data foundation for subsequent data processing, analysis, and decision-making.
[0033] Secondly, by performing pre-processing operations such as encryption, verification, and denoising on the collected data, we effectively ensure the accuracy, integrity, and security of the data. This prevents erroneous or maliciously tampered data from entering the system, avoids deviations in subsequent analysis and decision-making due to data quality issues, and ensures the reliability of system operation.
[0034] Finally, this section establishes a data transmission channel between on-site equipment and the cloud gateway, enabling efficient and stable data transmission. This lays the foundation for the cloud gateway to conduct in-depth data analysis, mining, and storage management. This enables the entire system to form a complete closed loop from data collection and transmission to processing and application, thereby achieving effective supervision and intelligent management of grain storage operations.
[0035] For example, during wheat storage at a large grain depot, a truck transporting wheat enters the depot at 8:30 a.m. The driver brings their IC card to the authentication terminal at the entrance. The IC card first performs fingerprint recognition, and the capacitive fingerprint sensor quickly captures the driver's fingerprint image. The system then compares the captured fingerprint feature vector with pre-stored fingerprint features. Once verification is successful, iris recognition is performed, using near-infrared imaging technology to capture the driver's iris image. After a series of processing, iris verification is also successful.
[0036] The IC card then uses quantum keys to encrypt the driver's identity information (number, name, and authority level) and the task data (task number: warehousing-20240801-001, grain type: wheat, and scheduled operation time: 8:30 AM to 11:30 AM) stored on the card. The IC card then signs the data with a private key and transmits it to the edge sensing node via the TLS 1.3 protocol. The edge sensing node verifies the digital signature, decrypts the data, and sends it to the cloud gateway for job registration.
[0037] The vehicle continues to the weighbridge area, where the scale controller collects vehicle weight data at a frequency of once per second. After the vehicle is fully loaded and stabilized, the scale controller processes the collected data using median filtering and sliding average filtering algorithms to obtain accurate gross weight data. Simultaneously, the scale controller calculates the CRC-16 checksum of the data and transmits the weight data and checksum to the edge sensing node, which then forwards it to the cloud gateway.
[0038] As vehicles navigate the grain depot, an array of RFID readers and writers distributed throughout the depot continuously communicates with the RFID tags on the vehicles, acquiring real-time vehicle location information. The readers calculate the distance to the vehicle based on signal strength and determine the vehicle's precise coordinates using a triangulation algorithm and weighted least squares method. These location data is then transmitted to a cloud gateway for real-time monitoring of the vehicle's trajectory within the depot.
[0039] During the sampling and quality inspection process on the vehicle, a scanner scans the sample barcode and the quality inspection result barcode, obtains relevant information, and transmits it to the edge sensing node. The information ultimately reaches the cloud gateway for processing and recording. Simultaneously, a temperature and humidity sensor group within the grain depot regularly collects temperature and humidity data every 10 minutes. After filtering, the data is transmitted to the edge sensing node via the Zigbee network and aggregated to the cloud gateway, providing data support for the depot's environmental monitoring and grain storage management.
[0040] During the entire warehousing process, the data perception and collection part obtains and transmits various types of data in real time and accurately, providing strong data support for the cloud gateway's supervision and analysis of the operation process and the decision-making of grain warehouse managers, ensuring that the wheat warehousing operation is carried out efficiently, orderly and safely.
[0041] Edge sensing nodes and edge fog nodes together constitute the edge computing layer of the grain depot's storage and monitoring system. They collaborate functionally and are logically tightly connected, enabling efficient data transfer and preprocessing from the device layer to the cloud gateway. Edge sensing nodes are deployed near the device sensing layer at the grain depot's operational site, while edge fog nodes are located at the depot's edge computing center or nearby network nodes. The device layer transmits raw data (such as IC card encryption data and RFID positioning signals) to the edge sensing nodes via the Zigbee network. After preliminary processing, the data is transmitted from the edge sensing nodes to the edge fog nodes, triggering deep preprocessing logic. Edge sensing nodes address heterogeneity and synchronization issues at the device layer, ensuring uniform data format and accurate time. Edge fog nodes focus on data validity and value, filtering out low-value and redundant data, and reducing the data processing load on the cloud gateway. Edge sensing nodes perform technical verification, while edge fog nodes perform operational verification. This prevents misjudgments, improves the accuracy of data preprocessing, reduces the data processing load on the cloud gateway, and enhances the efficiency and accuracy of the entire data processing process. For example, when the edge computing layer is not used, the cloud gateway needs to process 1,000 pieces of data per second. After using it, it only needs to process 400 pieces of data per second. The CPU utilization rate is reduced from 80% to 30%, and the data processing effect is significantly improved.
[0042] Data processing system architecture - cloud gateway processing layer: The cloud gateway processing layer adopts a heterogeneous multi-core processor architecture, including general computing cores (processing power ) and dedicated data processing cores (processing power ), total processing capacity Equipped with distributed storage modules, it uses blockchain technology to store key data with a storage capacity of The cooling system is based on liquid cooling and air cooling composite temperature control, and the internal temperature is monitored in real time through the temperature sensor. ,when (high temperature threshold, such as 65°C), the liquid cooling system runs at full power and the air cooling fan speed is increased to (such as 6000RPM); when (low temperature threshold, such as 15°C), the liquid cooling flow rate is dynamically adjusted according to the difference between the temperature and the threshold and air cooling speed , the formula is , ( 、 is the adjustment coefficient, the value range is 0-1, is the minimum liquid cooling flow rate, is the minimum fan speed); when (When the liquid cooling system runs at low power consumption, the air cooling system maintains the lowest speed .
[0043] Data collection and analysis: Job registration data processing Job Information (Including job number ,type ,personnel ,time ,vehicle ) is encapsulated as a smart contract. Contract rules Covering three aspects: storage, permissions and transmission: Storage rules: Use JSON format to store job information in a structured key-value pair format, facilitating quick access and processing of subsequent data.
[0044] Permission rules: Based on personnel authority level Divide access rights. =1 (Administrator), has read and write permissions for all job information; when =2 (ordinary employees), can only read the job information associated with themselves. Permission verification is done through the access control function built into the smart contract Implementation, this function is based on the permission level Determine user's job information The result of allowing or prohibiting the operation is returned.
[0045] Transmission rules: Data transmission uses the HTTP / 3 protocol. Based on the QUIC protocol, HTTP / 3 features multiplexing and 0-RTT connection establishment, effectively improving data transmission efficiency and stability. Before transmission, the smart contract compresses the job information using the Zstandard compression algorithm, achieving a compression ratio of 3:1-5:1, reducing data transmission volume and network bandwidth usage.
[0046] When the job information is complete and authenticated (i.e. ,in For personnel identity information, For job task data, The smart contract is automatically executed when the signature is signed and PK is the public key. The execution process is as follows: First, the job information Hash value It is concatenated with the hash value PrevHash of the previous block in the blockchain to calculate the hash value of the current block. This permanently stores operational information on the blockchain, ensuring that the data cannot be tampered with. This information is then pushed to the supervisory platform in real time via the WebSockets protocol. The WebSockets protocol establishes a persistent connection, enabling two-way data communication. After receiving the data, the supervisory platform analyzes and displays it in a visual interface, such as a timeline showing operational progress, allowing managers to monitor the depot's operational status in real time.
[0047] To improve the efficiency of smart contract execution, an event-driven mechanism is employed. When job information J changes (such as a new job or an updated job status), a corresponding event is triggered, prompting the smart contract to immediately execute, avoiding the resource waste associated with polling. Furthermore, blockchain storage uses a Merkle tree structure to organize job information, treating each job as a leaf node. Pairwise hash calculations are used to generate parent nodes, ultimately leading to the root node. When data integrity verification is required, only the root node hash value needs to be verified, significantly improving data verification efficiency.
[0048] The operation registration data processing component plays a key role in information recording and management within the grain storage and collection supervision system. First, it enables accurate registration and storage of information throughout the entire grain storage and collection process. Key operational information (operators, time, type, vehicles, etc.) is stored in a standardized and structured manner on the blockchain, creating an unalterable operation archive that provides a reliable basis for subsequent operation traceability and accountability.
[0049] Secondly, the security and privacy of operational information are guaranteed through the permission control rules of smart contracts. Users with different permissions can only access data related to their responsibilities, preventing the leakage of sensitive information. It also protects data from illegal tampering or misoperation, maintaining the authenticity and integrity of the data.
[0050] Furthermore, an efficient data transmission mechanism enables timely synchronization of operational information with the supervisory platform, allowing managers to obtain real-time operational updates and support informed decision-making. For example, based on operational registration information, operational resources can be rationally allocated, operational processes optimized, and the efficiency of grain storage and collection operations improved. Furthermore, the application of event-driven and Merkle tree technologies enhances system performance and data processing capabilities, ensuring stable and efficient operation despite the rapid generation of large amounts of operational information.
[0051] Vehicle positioning data processing 1. RFID reader working mechanism The RFID reader uses active working mode and uses a fixed frequency (Unit: Hz, value is 10) Continuously send radio frequency signals. The signal coverage area is fan-shaped with a radius of (The value is 10 meters). The frequency of the radio frequency signal sent by the reader is (902-928MHz), the initial signal strength value is (Unit: dBm, value -30). When the working vehicle enters the range, the RFID tag installed on the vehicle (built-in unique ID: ) receives the signal and uses backscatter modulation technology to transmit the vehicle identification information (license plate number: 、Vehicle type: ) is modulated onto the reflected signal and transmitted back to the reader.
[0052] 2. Distance calculation optimization Calculating the distance between the vehicle and the reader When multiple sampling and averaging strategies are adopted, the reader (Unit: s, value 1) Sample the signal strength R once, and continuously sample (value 5) times to get the signal strength sequence . Take the average As the final signal strength for distance calculation. The distance calculation formula is ,in is the reference signal strength at 1 meter (value -30dBm), is the grain depot environmental attenuation coefficient (valued at 2.5). This coefficient is obtained by performing linear regression analysis on a large amount of RFID signal strength and actual distance data in different areas and time periods of the grain depot, and can better adapt to the complex environment of the grain depot.
[0053] 3. Positioning algorithm improvement To further improve positioning accuracy, a Kalman filter algorithm is introduced to smooth the positioning results. The vehicle coordinates (x, y) calculated at each time are used as observation values, combined with the predicted coordinates at 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 grain storage and supervision scenario, the movement of the vehicle is not completely in line with the ideal state, and the complex environment inside the grain depot (such as metal grain piles, buildings, etc.) will interfere with the RFID signal, affecting positioning accuracy. When introducing the Kalman filter algorithm to smooth the vehicle positioning results, the following optimization is performed based on the specific conditions of the grain depot: In the grain storage environment, the movement of the vehicle is mainly carried out in the two-dimensional plane, so a two-dimensional state space model is constructed. Define the state vector of the vehicle for: ; in: and They are The horizontal and vertical coordinates of the vehicle in the two-dimensional plane at this moment, and They are Vehicles at the time Direction and Speed in direction State transition matrix Considering the characteristics of relatively stable and slowly changing vehicle speeds in the grain depot, the following are obtained: ; in: is the time interval between two positionings. In this solution, the RFID reader is = 1 second to try to locate the vehicle (the actual positioning may vary slightly due to the vehicle signal reception situation), so Approximately 1 second. This matrix reflects the linear relationship between vehicle position and velocity over time.
[0054] Process noise matrix It is used to describe the uncertainty of vehicle movement. In a grain depot, vehicle movement may be affected by factors such as uneven road surface and turning. According to the actual test data statistics of the grain depot, it is set as a diagonal matrix: ; in: and Reflects the uncertainty of the position, and the value is relatively large; and Reflects the uncertainty of speed, and the value is relatively small. For example, by testing vehicle driving data in different areas of the grain depot multiple times, combined with the least squares fitting error, we can determine = =0.1, = =0.01.
[0055] exist moment, according to the previous moment ( The optimal estimated state at time and the state transition matrix , predict the current state : ; At the same time, update the covariance matrix of the predicted state : ; in: is the covariance matrix of the optimal estimated state at the previous moment, reflecting the uncertainty of the estimated state. In the grain depot scenario, since vehicle driving paths are relatively fixed (e.g., primarily on roads and work areas), initial constraints can be placed on the prediction results. For example, if the predicted vehicle position exceeds the grain depot road or work area, the predicted position can be corrected based on the historical driving path and current direction to return it to a reasonable area.
[0056] Measurement Matrix The vehicle state vector is mapped to the observation space. In this scheme, the observation value is the vehicle coordinate calculated by the RFID positioning algorithm. , so the measurement matrix is: ; Measurement noise matrix Describes the measurement error in the RFID positioning process. In the grain warehouse, the RFID signal is greatly disturbed by the environment and the measurement noise is relatively high. Based on the statistics of multiple experimental data, it is set as a diagonal matrix: ; in: and Reflect separately Coordinates and The measurement error of coordinates is determined by conducting a large number of RFID positioning experiments at different locations and time periods in the grain depot, combined with mean square error calculation. = =0.5 Calculate Kalman gain : ; According to the observed value and the predicted state, update the optimal estimated state : ; At the same time, update the covariance matrix of the optimal estimated state : ; in: is the identity matrix.
[0057] In the actual application of grain depots, in order to better adapt to environmental changes, the measurement noise matrix can also be dynamically adjusted according to the positioning error of the vehicle in different areas (such as entrance, weighing area, sampling area, etc.). For example, in the area near the grain pile where the signal interference is large, it is appropriate to increase and The value of is used to improve the algorithm's adaptability to measurement errors.
[0058] Through the above-mentioned Kalman filter algorithm optimization process combined with the specific conditions of the grain depot, the vehicle motion patterns 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.
[0059] 4. Data transmission and integration The reader will calculate the vehicle coordinates (x, y), vehicle identification information ( 、 、 ) and positioning time The data is encapsulated into data frames and transmitted to the edge sensing node via the Zigbee network. The edge sensing node aligns and correlates the vehicle positioning data with the operator and task information collected by the IC card and the weighing data collected by the scale, forming a complete vehicle operation data chain. The data is then transmitted to the cloud gateway for subsequent processing.
[0060] Real-time vehicle location information within the grain depot allows managers to intuitively track the entire vehicle operation process, from entry to weighing, sampling, quality inspection, and warehouse operation. This allows them to promptly identify abnormal stalls or incorrect routes in the operation process, optimize operation scheduling, and improve storage efficiency. Precise positioning prevents safety incidents such as vehicle collisions and illegal driving within the grain depot. For example, when a vehicle approaches a hazardous area (such as a high grain pile or equipment operation area), the system can issue an immediate alarm to ensure the safety of personnel and equipment. This provides critical location information for subsequent data processing. When linked with weighing data, it can analyze vehicle weight fluctuations at different locations to determine if there are any loading or unloading anomalies. Combined with operation registration data, it can verify operational compliance. When vehicle location data is combined with operator information captured via IC cards, it can confirm the correspondence between operator and vehicle, preventing unauthorized use of vehicles. Linked with scale data processing, vehicle location information can be used to determine whether the vehicle is within the scale's weighing area. Combined with weighing data, it can be used to analyze the vehicle's dwell time and weight fluctuations during the weighing process to prevent fraud. Vehicle location information is provided for operation registration data processing, improving operational process records. In grain sampling, inspection, and weighing data processing, vehicle location data serves as spatial information to assist in analyzing the distribution of different operational links within the grain depot and optimizing operation route planning. In grain storage data processing, vehicle location is used to determine whether a vehicle has entered the storage area and, combined with water and debris deduction data, analyze storage efficiency. Vehicle location data is transmitted to the monitoring platform via a data transmission module using a hybrid SDN and quantum encryption solution. The monitoring platform uses this data to display vehicle locations in real time on a 3D visualization interface, combining it with a GIS map to visualize vehicle movement within the depot, providing managers with an intuitive operational monitoring view. Furthermore, as part of the grain lifecycle data, vehicle location data enables traceability and query of vehicle operations through blockchain traceability technology.
[0061] Grain sampling data processing 1. Refinement of smart contract verification rules Sample data (serial number ,time ,variety ,state ) is encapsulated in a smart contract with built-in validation rules The specific execution process is as follows: Uniqueness verification: Use hash table to store existing sample numbers, and when new sample data When entering, calculate Hash value , quickly find out whether there is the same hash value in the hash table. If it exists, then further compare the specific number content. If they are consistent, it is determined that the number is repeated and the data entry is rejected; if it does not exist, then and its hash value are stored in the hash table.
[0062] Time verification: Get 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 . Assume that the last sampling time of the same type is ,but .when outside of working hours, or If the time is longer than the specified time (in minutes), the data will be deemed unreasonable and fail verification.
[0063] Field integrity verification: define the required field set for sample data , traverse the data Fields, count the number of missing fields .like ( Representing a collection If the field missing rate exceeds 10%, the data is considered incomplete and will not be accepted.
[0064] Traditional grain storage operations rely on manual registration and verification processes, which pose the risk of data tampering (such as misreporting grain quality or falsifying weighing data) and hinder accountability. For example, manual entry times can be arbitrarily adjusted, rendering process traceability ineffective. Long manual review cycles (such as daily centralized audits) prevent real-time interception of irregularities. For example, irregularities in weighing data might be discovered only after grain has been stored, preventing timely removal of substandard grain. Smart contract technology utilizes a consortium blockchain architecture (such as Hyperledger Fabric). Operational information is stored on the blockchain as smart contracts, organized using a Merkle tree structure to ensure immutability. Each operation is treated as a leaf node, and pairwise hashing is performed to generate a parent node, ultimately leading to the root node, ensuring data integrity. Changes in operation information (such as weighing data or sample status) automatically trigger contract execution. Upon receiving device signals (such as IC card verification or weighbridge data upload), the corresponding logic (such as enabling sampling permissions) is immediately executed. Built-in access control functions (such as AccessControl) restrict data read and write access based on the operator's permission level (administrator / staff). For example, staff can only read their own associated work records and cannot modify the data of others. A hash table check prevents duplicate records (e.g., repeated weighing of the same vehicle). Required fields (such as operation time and grain type) are checked for missing fields; entry is rejected if the missing field rate exceeds 10%. Operation times are verified to be within the specified range (e.g., 8:00 AM to 6:00 PM) and the time interval between sampling and weighing is reasonable (an interval of less than 1 minute is considered abnormal). Once verified, the operation information is automatically uploaded to the blockchain for storage, triggering the next step (e.g., automatically notifying the inspector upon completion of sampling). Automatic alarms are generated in the event of anomalies (e.g., suspending warehouse operations if water deduction exceeds a threshold), and a violation log is recorded. Once data is uploaded to the blockchain, it cannot be modified. The blockchain's distributed ledger ensures that any tampering requires the simultaneous control of at least 51% of the nodes, which is extremely costly. For example, once weighbridge data is uploaded to the blockchain, even if the equipment is maliciously tampered with, the original record remains traceable. The blockchain browser allows users to query the entire lifecycle of an operation (from sampling to warehouse timestamps, operators, and test results), reducing accountability time from two hours for manual queries to minutes. Smart contracts automatically connect all steps. For example, upon successful IC card verification, the scale equipment is automatically unlocked and a job number is generated, reducing manual operation steps by over 30%. Contract verification is performed on edge fog nodes, eliminating unqualified data (such as samples with an appearance score of less than 60) in real time, preventing invalid data from entering the cloud gateway and improving data processing efficiency by 40%.
[0065] 2. Strengthening the screening rules for edge fog nodes Edge fog nodes are based on screening rules Process the sample data. The specific operations are as follows: Initial quality screening: Grain appearance scoring is calculated using a multi-dimensional weighted index. (Weight =0.4), Grain Fullness Score Weight =0.3), impurity content score (Weight =0.3), then the total appearance score .when If the score is less than 6, the sample data is directly rejected. During the scoring process, color is analyzed using image recognition technology to analyze the similarity of the grain color distribution with the standard color chart; grain fullness is determined based on characteristics such as grain size and shape in the image; and impurity content is calculated based on the proportion of impurity pixels in the image.
[0066] Data integrity check: In addition to the field integrity verified by the smart contract, the fog node further checks the validity of the field content. For example, for the time field , check whether its format complies with the standard time format (such as "YYYY-MM-DDHH:MM:SS"); for the variety field , verify whether it is in the preset list of grain varieties. If there is invalid content, it will also be considered incomplete data and will be eliminated.
[0067] Repeated data comparison: for the same The fog node retains the data with the latest timestamp. A cache table with the key and timestamp as the value. Every time new data is received, the corresponding If the timestamp of the new data is updated, the data in the cache table will be replaced.
[0068] 3. Data transmission and interaction optimization The data filtered by the fog node is transmitted to the cloud gateway through the Zigbee network. To ensure the reliability of transmission, a confirmation retransmission mechanism is adopted. When it is received, the cloud gateway will assign a unique serial number SN to it and return a confirmation frame , which contains the sequence number of the received data frame If the fog node is within the specified time If the confirmation frame of the corresponding SN is not received within (e.g. 500ms), the data frame will be resent up to 3 times.
[0069] Through the strict verification of smart contracts and the screening of fog nodes, sample data with duplicate numbers, time anomalies, incomplete data, and substandard quality can be effectively excluded, ensuring that the sampling data entering the cloud gateway is true, accurate, and complete, providing a reliable data foundation for subsequent grain quality inspections and other links. The time verification rules constrain the sampling time to avoid illegal operations; the uniqueness verification prevents duplicate records, ensures the accuracy and standardization of the data, and helps to standardize the sampling operation process of grain warehouses and improve the level of operation management. The fog node performs preliminary screening and processing of the data at the edge, eliminating a large amount of invalid data, reducing the amount of data transmission and the processing load of the cloud gateway, and improving the data processing efficiency of the entire system. The grain sampling data comes from the sample barcode information collected by the scanner. Linked to IC card data processing, it verifies the identity of sampling personnel, ensuring the standardization and traceability of sampling operations. Furthermore, by linking sampling time and other information with vehicle weighing times collected from scale data, it analyzes the appropriateness of the time interval between vehicle weighing and sampling, assisting in determining the smooth operation process. It provides raw sample data for grain inspection data processing. Sample type, condition, and other information form the basis for subsequent inspection and analysis. Linked to operation registration data processing, it improves operational records and integrates sampling operations into the overall grain collection and storage chain. In grain inspection and weighing data processing, sample data can be combined with weighing data to analyze the relationship between the quality and weight of different grain batches. The processed data is transmitted to the supervisory platform via the data transmission module using a hybrid SDN and quantum encryption solution. When displaying the progress of grain collection and storage operations, the supervisory platform visualizes the sampling data status (e.g., completed, pending inspection) as key node information. Furthermore, within blockchain traceability, sampling data is a key component of grain quality traceability.
[0070] For example, during the rice purchasing operation at a grain depot, at 9:00 am on November 15, 2024, a sampler sampled a vehicle transporting rice and obtained sample data: is "20241115001", time is "2024-11-15 09:00:00", variety The data is first entered into the smart contract for verification: In the uniqueness verification, the calculation The hash value of , after querying the hash table, has no duplication; when verifying the time, The data is within the working time range and the time interval between the last rice sampling is greater than 10 minutes; the field integrity verification is passed, and all required fields are present and not missing. After the smart contract verification is passed, the data is transmitted to the edge fog node. The fog node screens the data: in the initial quality screening stage, the sample is analyzed by image recognition technology, and the color score is The grain fullness score is 75 points. The impurity content score is 70 points. The total appearance score is 60 points. =0.4×75+0.3×70+0.3×60=69 points, which is greater than 60 points. This sample data passed the initial quality screening. During the data integrity check, the content of each field was formatted correctly and within the valid range. Duplicate data comparison showed no data with the same number. Finally, this sample data was screened by the fog node and transmitted to the cloud gateway for subsequent inspection and analysis.
[0071] Grain inspection data processing In grain inspection data processing, a multimodal fusion quality inspection model is constructed , fused spectral data , image data , physical and chemical test data The multimodal fusion quality inspection model integrates ResNet-50 (image), Transformer (spectral), and MLP (physical and chemical data) through four steps: data preprocessing, single-modal feature extraction, cross-modal feature fusion, and comprehensive decision output, to achieve a multi-dimensional comprehensive analysis of grain quality. Specific details are as follows: Data preprocessing: For spectral data , using a near-infrared spectrometer to collect, after obtaining the original spectral signal, first perform denoising, use the Savitzky-Golay filter algorithm to smooth the spectral curve and remove high-frequency noise. Assume that the original spectral data is , filtered data ,in It is calculated by the Savitzky-Golay filter formula. Then normalization is performed, and the formula is , so that the data value range is [0,1]. Image data It is captured by a high-resolution industrial camera and first grayscale processed to convert the color image into a grayscale image. The formula is ( 、 、 The red, green, and blue channel values of the color image are respectively). Then, image enhancement is performed using a histogram equalization algorithm to increase the contrast of the image, making the texture, impurities, and other features of the grain image more obvious. Physical and chemical test data Including indicators such as moisture content, protein content, and impurity ratio, the outliers in the data are processed using the 3σ principle. If an indicator value exceeds the range of the mean plus or minus 3 times the standard deviation, it is considered an outlier and replaced by the mean.
[0072] Model building and training: Using a transfer learning strategy, we selected a ResNet-50 model pre-trained on a large-scale public grain quality inspection dataset as the base network (for processing image data), a Transformer model (for processing spectral data), and a multi-layer perceptron (MLP) for processing physical and chemical testing data. The parameters of the pre-trained model were transferred to the grain depot's quality inspection task, and then fine-tuned based on the depot's sample data.
[0073] During training, the cross entropy loss function is used ,in is the sample size, is the category number (such as grain quality grade category), For samples Belong to category The true label (0 or 1), Predict samples for the model Belong to category The Adam optimizer is used to update the model parameters, and the learning rate is set to =0.001, the training batch size is batch_size=32, and the number of training rounds is epochs=50.
[0074] Judgment function execution: Judgment function ( For the standard set, is a threshold set) when executing, traverse the quality inspection data For each item. Take moisture content detection as an example, obtain sample variety , in the standard set Find the corresponding moisture content standard , the corresponding moisture content threshold in the threshold set . The detection value Compared with the threshold, if , the project passes; if all items pass, it returns "Pass", otherwise it returns "Fail". At the same time, the model outputs the probability of each sample belonging to different quality levels for the manager's reference.
[0075] The grain image is input into the ResNet model. The input layer of the ResNet model first grayscales it to reduce computational complexity, then uses histogram equalization to enhance contrast, highlighting grain texture and impurity features, and finally performs normalization. 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 the fully connected layers) to extract the 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 it. Feature layer of the Transformer model. Construct a Transformer model with 2 Encoder layers. Each Encoder contains multi-head self-attention (8 heads) and a feedforward neural network (FFN). Input the spectral sequence, inject the timing information through positional encoding (Positional Encoding), and introduce the attention mechanism. The last layer of Encoder outputs a 1024-dimensional feature vector , capturing the local and global correlation of spectral signals (such as the relationship between specific wavelength absorption peaks and grain quality). The grain physical and chemical test data is input into the MLP model. After the input layer of the MLP model removes outlier data, it is normalized to the interval [0,1] through Min-Max. The feature layer of the MLP model has a two-layer fully connected network with the following structure: input layer (dimension = number of physical and chemical indicators, such as 3 dimensions) - hidden layer (64 dimensions, ReLU activation) - output layer (32-dimensional feature vector ), which is used to map low-dimensional physical and chemical indicators to high-dimensional feature space and capture the nonlinear relationship 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 modal features through feature splicing and weight distribution. The fused vector after splicing is , through the trainable weight matrix Compress to 1024-dimensional vector , the weights are optimized through the cross entropy loss function, automatically learning the importance of different modalities and setting the weights of different image features according to their importance. At the same time, the modal interaction attention module is introduced in the fusion layer to calculate the mutual attention between the image and spectral features, enhancing the complementarity between spectral features and image features. Finally, the decision layer makes a threshold decision and outputs the decision result. The decision layer first combines the fusion features in the fully connected layer. Input a two-layer fully connected network (1024-256-2) and output the quality classification probability (qualified / unqualified) through Softmax: . Set the pass probability threshold ,like , output "Pass", otherwise "Fail". For example, a sample image shows a low impurity rate (ResNet-50 outputs high confidence), the spectral detection moisture content meets the standard (Transformer outputs high probability), and the physical and chemical data have no abnormalities (MLP output is normal). After fusion , and was judged as qualified. During model training and optimization, the ResNet-50 model was loaded with pre-trained ImageNet weights, and the Transformer model was loaded with pre-trained weights for the spectral classification task. The MLP was randomly initialized, and the first 10 convolutional layers of the ResNet-50 were frozen. Only the parameters of the last 7 layers and the fusion layer were fine-tuned to adapt to the specific grain images of the granary (such as the color differences between wheat and rice). All Transformer and MLP parameters were fine-tuned, and training was conducted using historical granary quality inspection data (approximately 100,000 batches). This multimodal fusion quality inspection model uses models of different dimensions to extract features from three different dimensions: grain appearance, composition, and standard. This enables grain quality detection and improves the accuracy of grain quality testing. Furthermore, when a single modality exhibits an anomaly (such as blurry images due to camera lens contamination), the other modalities can compensate (spectral data can still accurately detect the variety), enhancing model robustness.
[0076] By integrating multimodal data, a comprehensive analysis of grain quality from multiple dimensions is conducted. Compared to single-data testing, this approach can more comprehensively and accurately assess grain quality, avoid misjudgments caused by single-metric assessments, and provide reliable quality assurance for grain procurement, storage, and sales. Automated data processing and model analysis reduce the workload and time required for manual inspections, improving inspection efficiency. This approach is particularly suitable for the rapid quality inspection needs of large batches of grain at grain depots. Strict quality assessment standards and processes ensure that grain that does not meet quality requirements does not enter the market or storage process, ensuring food security and protecting consumer rights. The continuously accumulated inspection data can be used to further optimize the quality inspection model, improving its accuracy and adaptability, while also providing data support for quality management and decision-making at grain depots.
[0077] Spectral data, image data, and physical and chemical test data are collected by corresponding testing equipment and serve as data sources for the device's perception layer. Linked to scanner data processing, sample barcode information captured by the scanner can be linked to specific inspection samples, ensuring a one-to-one correspondence between inspection data and samples. Linked to IC card data processing, it records inspector information and clarifies inspection responsibilities. It provides subsequent inspection results for grain sampling data processing, completing the complete data chain from sampling to inspection. Linked to operation registration data processing, it incorporates inspection operations into the overall grain storage process. In grain weight data processing, inspection results can be combined with grain weight data to analyze the storage status of grains of varying quality, providing a reference for grain depot pricing and sales strategies. Linked to grain storage value data processing, it rationally arranges grain storage locations and conditions based on inspection results, such as prioritizing storage locations with better ventilation for lower-quality grain. Processed inspection data is transmitted to the supervision platform via the data transmission module using a hybrid solution of SDN and quantum encryption. The supervision platform displays the inspection results in visual charts, such as the proportion of grain 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 inquire about changes in grain quality from purchase to sale.
[0078] For example, during the inspection of a new batch of wheat purchased by a grain depot, the spectral data of the wheat sample was first collected using a near-infrared spectrometer. After Savitzky-Golay filtering and normalization, the pre-processed spectral data is obtained. The wheat sample image is taken with an industrial camera, grayscaled and histogram equalized to obtain image data. At the same time, physical and chemical testing equipment is used to measure the moisture content, protein content, impurity ratio and other physical and chemical testing data of wheat. .
[0079] Input the processed data into the multimodal fusion quality inspection model The ResNet-50 network in the model extracts features such as texture and shape from image data, the Transformer model analyzes the composition of spectral data, and the MLP processes physical and chemical test data. The model calculates the probability that the wheat batch belongs to different quality grades.
[0080] Judgment function To judge various indicators, such as the moisture content of wheat = 12%, based on wheat variety in standard set The moisture content standard is found to be no more than 13%, and the corresponding threshold value in the threshold set is =13%, the project passes. All indicators are evaluated sequentially. Finally, all indicators of this batch of wheat meet the standards. The judgment function returns "Pass", and the grain depot can accept this batch of wheat for storage.
[0081] Grain weighing data processing Data preprocessing: In the grain storage environment, the dimensions of grain weight data vary significantly. For example, the range of values for gross weight, tare weight, and net weight is large, and the weighing time is usually presented in the form of a timestamp. In order to better process these data, for net weight data , using the following normalization formula: ; in: and They are respectively the minimum net weight and maximum net weight of the batch of grain within a certain time period (such as the day). is the grain variety correction function. Different grain varieties have different characteristics such as density and bulk density, which will affect the numerical range of net weight. For example, for wheat varieties, =1; for rice varieties, considering their relatively high water 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.
[0082] Grain storage operations have obvious time patterns, such as busy operations during peak hours in the morning and evening, and relatively stable operations during the middle period. In order to capture these time characteristics, the time interval feature The calculation formula is adjusted to: ; in: is the current weighing moment, The time of last weighing. These are the peak hours for grain depot operations, such as [7:00, 9:00] and [16:00, 18:00]. is the off-peak period adjustment coefficient. Considering that the vehicle weighing interval is relatively long during off-peak period, in order to balance the data characteristics, .
[0083] Abnormal judgment model construction: In a grain storage environment, different operation periods and grain varieties have a greater impact on abnormality judgment. The calculation formula is refined as follows: ; in: is the time series weighting factor. In grain storage operations, recent data can better reflect the current operation status. Its calculation formula is: , is the sequence number of the current data in the time series, is the total data volume. is the weight of the operation rule constraint. For example, during night operation (22:00-6:00), there may be risks of illegal operation due to the small number of operators. =1.2; normal period =0.8. For the The path length of a data point in an isolated tree, is the number of isolated trees, is related to the sample size The associated average path length compensation function, , is the harmonic number, . This is the influencing factor of grain varieties. For high-value grain varieties that are prone to weighing anomalies, such as high-quality rice ; Ordinary food =1.
[0084] In the grain warehouse scenario, considering the impact of equipment accuracy and environmental factors on data in different grain warehouses, the reconstruction error The calculation formula is: ; in, is the number of data samples, For the Real weighing data, For the Reconstructed weighing data, It is the reference weighing value of this grain variety under standard conditions. It is an environmental influencing factor, which is determined based on the temperature, humidity, dust and other environmental parameters of the grain warehouse. For example, when the humidity in the grain warehouse is high, it may affect the weighing accuracy of the scale. =1.1; when the environment is normal, =1.
[0085] In the grain storage data processing, combined with the grain storage operation process and data correlation, the abnormal score The calculation formula is: ; in, is the length of the data sequence, For the Weighing data, and Respectively The mean and standard deviation of the data in the sliding window centered at . is the weight coefficient, which is determined according to the importance of the data in the operation process. For example, in the key link of vehicle weighing, =1.2; other auxiliary links, =0.8. It is the function of the operation process stage. When it is in the stage of grain storage and weighing, =1; in the outbound weighing stage =0.9.
[0086] The data fusion layer adopts weighted fusion method, taking into account the applicability differences of various algorithms at different stages of grain storage operations, and the fusion results The calculation formula is: ; in, 、 、 These are the detection results of the improved isolation forest algorithm (IIF), the anomaly detection algorithm based on variational autoencoder (VAE), and the anomaly detection algorithm based on Transformer. Over time The weight coefficient of the change, At the beginning of the grain storage operation, due to the small amount of data, the improved isolation forest algorithm can more quickly capture anomalies. =0.6, =0.2, =0.2; As the operation progresses and the amount of data increases, the advantages of the Transformer-based algorithm become more prominent. =0.3, =0.3, =0.4. At the beginning of the morning rush hour, when data volume is low, the Improved Isolation Forest (IIF) algorithm is weighted higher (e.g., 60%) because it can quickly identify significant outliers without requiring a large amount of data. The VAE and Transformer algorithms are weighted lower (20% each) because these algorithms are less stable when data is insufficient. During the ongoing operation phase, when data volume is sufficient, the Transformer algorithm is weighted higher to 40% because it excels at analyzing time series patterns. The IIF and VAE weights are adjusted to 30% each, achieving balanced detection of "global anomalies, time series anomalies, and distribution anomalies." When ambient humidity is high (which may affect weighbridge accuracy), the VAE algorithm's weight is automatically increased to 50% (because it is sensitive to data reconstruction errors and can better reflect equipment interference), and the weights of the other algorithms are reduced accordingly. The calculated result is compared with a preset threshold (e.g., 0.8). If the index exceeds the threshold, an anomaly is detected, an alarm is triggered, and related operations (such as vehicle weighing) are suspended. If it does not exceed the threshold, the data passes verification and proceeds to the next step (such as water and impurity deduction calculations). IIF captures sudden outliers (such as a single jump in weighing due to a scale failure), VAE identifies data anomalies caused by environmental interference (such as humidity causing elevated consecutive weighing values), and Transformer identifies process violations (such as vehicles not being weighed in sequence). Combined, these three algorithms can detect over 90% of violation scenarios, avoiding the limitations of a single algorithm. Dynamic weighting allows detection strategies to better meet actual needs. For example, during nighttime operations, IIF weighting is increased (due to the higher risk of violations), prioritizing detection of data tampering. During heavy rain, VAE weighting is increased to focus on monitoring environmental impacts on equipment.
[0087] Grain warehouse weighing data faces significant dimensional discrepancies (e.g., gross / net weight spans of hundreds of tons), environmental interference (temperature and humidity affect scale accuracy), and clock asynchrony. Directly inputting this data into the model can lead to misjudgments or unstable training. For example, equipment clock deviation can cause weighing times to become disconnected from vehicle positioning times, making it impossible to correlate and analyze operational process compliance. Dusty environments can also cause scale data to jump, misleading anomaly detection. By refining the data preprocessing formula, we can more accurately normalize and extract features from the raw weighing data based on the warehouse environment and grain type characteristics. This eliminates dimensional discrepancies and environmental interference, provides high-quality data input for the subsequent anomaly detection algorithm, and improves model accuracy. This step improves noise rejection to 95%, time synchronization accuracy to 10 milliseconds, and accelerates model training convergence by 40%. A single algorithm is unable to address diverse violations. For example, the Isolation Forest algorithm excels at global outlier detection but cannot detect time-series anomalies associated with continuous weighing fluctuations; VAEs are sensitive to environmental disturbances but struggle to distinguish the normal fluctuation ranges of different grain varieties; and Transformers are suitable for analyzing time series patterns but insensitive to sudden jumps. Formula transformations in the multi-algorithm detection layer closely integrate grain warehouse operating patterns, environmental factors, and differences in grain varieties, enabling each algorithm to better adapt to the complex and changing scenarios of grain warehouses. For example, the improved Isolation Forest algorithm considers the impact of operating time and grain variety on anomaly judgment, the VAE-based algorithm considers the impact of environmental factors on reconstruction error, and the Transformer-based algorithm considers the impact of operating processes on anomaly scores, thereby improving the detection performance of each algorithm in grain warehouse environments. Grain warehouse operations are characterized by phases (such as the concentration of vehicles weighing during the morning rush hour) and environmental sensitivity (such as rainy days affecting weighbridge accuracy). Fixed detection strategies struggle to balance efficiency and accuracy. For example, rapid interception of obvious anomalies is crucial during the initial stages of operations, while in-depth analysis of time series data is required during the stabilization phase. The formula of the data fusion layer dynamically adjusts the weights of each algorithm according to the grain warehouse 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, achieve the complementary advantages of multiple algorithms, and improve the decision-making accuracy and reliability of the comprehensive anomaly judgment model.
[0088] Formulas in the data preprocessing layer directly rely on raw data collected by the device perception layer, such as gross weight, tare weight, net weight, and weighing time data collected by the scale controller. Preprocessing this data provides effective input for subsequent anomaly detection algorithms, achieving a seamless transition from raw data collection to data processing, ensuring data accuracy and usability. The anomaly detection results of the multi-algorithm detection layer are interconnected with other steps in grain weight inspection data processing. For example, detected anomaly data can provide a reference for water and impurity deduction calculations in grain warehouse data processing. If an anomaly is detected, rechecking the grain's moisture and impurity content may be necessary. Furthermore, anomaly data can assist in grain inspection data processing, determining the relationship between grain quality and weighing, and further troubleshooting the cause of the anomaly. The anomaly detection results of the decision output layer are transmitted to the supervisory platform via the data transmission and display component. Based on these results, the supervisory platform visualizes relevant information about the anomaly data, such as its distribution, type, and occurrence time. Furthermore, this anomaly data can be included as part of the entire grain storage lifecycle data and traced within the blockchain traceability system, enhancing the transparency and credibility of grain warehouse data and providing comprehensive decision support for warehouse management.
[0089] For example, in a corn purchasing operation at a grain depot, a vehicle transporting corn is weighed at night (23:00). The scale controller collects the gross weight of the vehicle. =55000 kg, tare weight =15000 kg net weight =40000 kg, weighing time =23:00, the time of last weighing =22:00.
[0090] Normalization: The minimum net weight of corn in the grain depot on that day =30,000 kg, maximum =50,000 kg, the grain variety is corn, =1. Then the normalized net weight is: .
[0091] Time interval feature extraction: Due to the nighttime operation period, time interval features =1 hour.
[0092] Improved Isolation Forest Algorithm (IIF): Assume that = 50 isolated trees, the data point is in Path length in an isolated tree =5, total data volume =100, current data sequence number =80, then the time series weighting factor 0.8. Night operation, =1.2, corn is a common food, = 1. Calculate the isolated fraction: . Set the threshold , , the algorithm determines that this data is abnormal.
[0093] Anomaly detection algorithm based on variational autoencoder (VAE): Assuming the reconstructed net weight data =38,000 kg, the reference weight 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 is set to 0.02, because >0.02, the algorithm determines that the data is abnormal.
[0094] Transformer-based anomaly detection algorithm: Assume that the data mean in the sliding window centered on the data point =35000 kg, standard deviation =2000 kg, data is in the key link of weighing in the warehouse, =1.2, in the stage of warehousing weighing, = 1. Calculate the anomaly score: The threshold is set to 2.5, because >2.5, the algorithm determines that the data is abnormal.
[0095] During the night operation phase, set =0.6, =0.2, =0.2. The fusion result is . Set the decision threshold =0.8, due to > The comprehensive abnormality judgment model determines that the weighing data is abnormal, and sends the abnormal information to the supervision platform to remind the staff to check.
[0096] Grain warehouse data processing Grain warehouse data processing includes two parts: water and impurity deduction management and inventory status analysis. The specific details are as follows: Water deduction and miscellaneous data processing: water deduction data and miscellaneous data The calculation is based on the grain weight data and the preset standard. Taking the water deduction calculation as an example, according to the type of grain Get the corresponding moisture standard value from the standard library , the actual moisture content obtained by weighing is known , water deduction The calculation formula is ,in This is the net weight of grain. The calculation method is similar, based on the impurity standard value and actual impurity content , through the formula The calculated 、 and set threshold 、 For comparison, the threshold is set according to factors such as grain type 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.
[0097] Inventory status analysis: Use the spatiotemporal graph convolutional network (ST-GCN) to analyze inventory data. Each storage unit of the grain warehouse is regarded as a graph node. , the number of nodes is , build a node set .side Representation node and The relationship between the two includes spatial adjacency and time series. Spatial adjacency is calculated by calculating the physical distance between storage units. OK, when (distance threshold, such as 5 meters), the 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 status of the same storage unit at different time points constitutes the time series edge.
[0098] Model input is a spatiotemporal graph And the feature vector corresponding to each node (including food storage capacity, temperature ,humidity Through multi-layer graph convolution and time convolution operations, spatiotemporal features are extracted to predict the trend of grain storage status changes. For example, Temperature change of a storage unit within an hour and humidity changes ,like (temperature change threshold) or (Humidity change threshold), the system generates early warning information, prompting staff to take measures such as ventilation and dehumidification.
[0099] Through rigorous water and impurity deduction calculations and threshold assessments, the system ensures that the moisture and impurity content of grain entering the granary meets storage standards, preventing losses due to quality issues such as mold and insect infestation, and ensuring the quality and safety of stored grain. Using ST-GCN to analyze and predict inventory status, granary managers can proactively identify changing trends in grain storage conditions, rationally allocate storage resources, and develop effective plans for ventilation, dehumidification, and warehouse turnover, thereby reducing grain storage losses and improving inventory management efficiency. Smart contract alarms and operation suspension mechanisms provide timely intervention when water and impurity deduction anomalies occur, preventing non-compliant operations from continuing. This ensures safe and standardized operations in granaries and avoids quality disputes and financial losses caused by non-compliant operations. Accurate water and impurity deduction data and inventory status analysis provide data support for granary decision-making, including cost accounting, sales pricing, and procurement planning. For example, the actual purchase cost of grain can be assessed based on water and impurity deduction data, allowing sales strategies to be adjusted based on inventory changes.
[0100] The calculation of water and impurity deduction depends on the net weight data of grain collected by the scale controller , Temperature in Inventory Status Analysis ,humidity Data is collected in real time by a temperature and humidity sensor array. Vehicle location information, detected by an RFID reader array, helps determine whether grain transportation to the storage area is proceeding normally. Grain weighing data provides the basis for calculating water and impurity deductions. Grain quality indicators derived from grain inspection data processing serve as a reference for setting water and impurity deduction standards. The storage operation information recorded by operation registration data processing is combined with the grain storage data processing results to provide a complete picture of the storage operation process. Sample information obtained from grain sampling data processing can be linked to inventory status analysis results to trace quality changes between different batches of grain during storage. Processed water and impurity deduction data, inventory status analysis results, and warning information are transmitted to the monitoring platform via a data transmission module using a hybrid SDN and quantum encryption solution. The monitoring platform displays visual charts showing the water and impurity deduction status of stored grain and status trends of each storage unit, enabling managers to monitor storage operations in real time. In blockchain traceability, storage data, as key information in the grain storage process, can be used to trace quality control throughout the storage process.
[0101] When a batch of wheat was weighed in a grain warehouse, the net weight was obtained. =5000 kg, actual moisture content =14%, according to the wheat variety query standard database, moisture standard value =13%, calculated by the water deduction formula =(0.14−0.13)×5000=50 kg. The set water deduction threshold = 40 kg, due to , the smart contract immediately triggers an alarm, sends an alert to the on-site operator's handheld terminal, and suspends the warehousing operation of the batch of wheat, waiting for the staff to re-inspect or process it.
[0102] In terms of inventory status analysis, taking a storage unit in a grain warehouse as an example, the current storage volume of wheat is 100 tons, and the real-time temperature =25℃, humidity =65%. The ST-GCN model predicts that the humidity of the storage unit will rise to 75% in 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 mold caused by excessive humidity.
[0103] Data Processing System Architecture - Regulatory Platform Layer: Data Processing and Display The supervisory platform layer uses WebGL technology to build a 3D visualization interface, integrating GIS maps to display grain warehouse layout, operation progress, and inventory distribution. It also integrates a blockchain browser to enable full data traceability. It also provides an intelligent decision-making support module to generate recommendations for operation scheduling, inventory management, and other areas based on data analysis results.
[0104] Data transmission uses a hybrid solution of software-defined networking (SDN) and quantum encryption. The specific operation process is as follows: SDN dynamic path selection: SDN controller collects network traffic matrix in real time ( Representation node To Node Traffic, unit: Mbps) and node load vector ( Representation node The load rate ranges from [0,1]. Dijkstra algorithm is used in combination with load balancing strategy to optimize the path. The objective function is: ,in For the path, For the edge The weight of (determined by factors such as link bandwidth and delay), is the load influence coefficient (value is 0.5), Represents an edge When the traffic on a link in the network exceeds the threshold (such as 80% of the link bandwidth) or the node load exceeds the threshold When θ is 0.8, the SDN controller triggers path reselection and recalculates the optimal transmission path.
[0105] Quantum encryption implementation: Quantum key distribution (QKD) technology is used to generate a 256-bit quantum key QK. One-time pad (OTP) encryption is used, and the data D is encrypted using the formula E = D ⊕ QK (⊕ represents an exclusive-or operation). Before data transmission, the sender and receiver complete key negotiation over the quantum channel to establish a secure key pair. To ensure key reliability, key negotiation is performed again after every 1,000 data packets are transmitted.
[0106] Data grouping and transmission: The processed data (such as operation registration data J, grain inspection data Q, etc.) is divided into fixed-size data packets, the packet size is 1024 bytes. Each data packet adds header information, including the source address , destination address , group number , checksum (using the CRC-32 algorithm). 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-retransmission (ARQ) mechanism is employed. Upon receiving a data packet, the receiver verifies the checksum and returns an acknowledgment frame (ACK) if it is correct. If an error occurs or the checksum is not received after a timeout, a retransmission request (NACK) is sent. The sender can retransmit up to three times.
[0107] The data display of the supervision platform is based on WebGL technology and GIS maps. The functional details are as follows: 3D Visualization: Build a 3D model of the grain warehouse, presenting the warehouse buildings, warehouses, equipment, and other entities in three dimensions. Grain inventory data is displayed using bar charts of varying colors and heights, organized by warehouse. For example, green indicates sufficient inventory, yellow indicates a warning level, and red indicates insufficient inventory. The height of the bar chart is proportional to the inventory level. Vehicle location information is updated in real time, with dynamic icons displaying vehicle movement within the 3D scene. Users can zoom in and out using the mouse wheel and drag the mouse button to view the warehouse's real-time status from all angles.
[0108] Data interaction: Mark the grain depot location and surrounding information on the GIS map. Clicking the depot icon on the map will bring up a detailed information window displaying basic depot information, current operation progress, and more. For data on the entire grain lifecycle, users can click on a grain batch record to view the complete process from procurement, sampling, inspection, weighing, to warehouse operation, including time, operators, and test results. Visual charts (such as quality grade distribution pie charts and inventory change line charts) support data filtering and drilling, allowing users to select specific time periods and grain types to view detailed data.
[0109] Intelligent Decision Display: The intelligent decision support module generates job scheduling suggestions, inventory management strategies, and other information, which are presented in a combination of lists and charts. For example, job scheduling suggestions display job plans in the form of Gantt charts, while inventory management strategies demonstrate the pros and cons of different options through comparative analysis charts. Decision-making rationales are also explained, along with relevant data indicators and analysis processes, to assist managers in understanding and making decisions.
[0110] Quantum encryption technology ensures data cannot be 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 storage and regulatory data. SDN dynamic path selection optimizes transmission paths based on real-time network status, avoiding network congestion, improving data transmission speed and stability, and ensuring timely data delivery to the regulatory platform, meeting real-time monitoring requirements. 3D visualization combined with GIS maps presents complex grain warehouse data in an intuitive and easy-to-understand format, allowing managers to quickly understand the overall operation of the grain warehouse, including inventory status, operation progress, and vehicle location. Rich data interaction features and intelligent decision-making display enable managers to deeply analyze data and obtain valuable insights, providing a scientific basis for decision-making in grain warehouse operation scheduling, inventory management, procurement and sales, and enhancing the intelligent level of grain warehouse management. By integrating blockchain traceability technology with data display, users can trace the entire life cycle of grain from storage to delivery, enhancing the transparency and credibility of grain warehouse data, helping to ensure food quality and safety and accountability.
[0111] The data transmission component receives raw data collected by the device perception layer (such as IC card data I and weighing scale data W) and processed data by the data collection, storage, and analysis layer (such as operation registration data J and grain inspection results), encrypts the data, and transmits it to the supervision platform via an optimized path. The data display component presents this data in a visual format, allowing managers to intuitively understand the results of device perception and data collection, storage, and analysis. The cloud gateway processing layer performs in-depth data analysis, anomaly detection, and storage management before passing the processed data to the data transmission component. The data transmission component relies on data provided by the cloud gateway processing layer for transmission, while the content displayed by the data display component also derives from the processed data from the cloud gateway processing layer. The two components work together to complete the complete data flow from processing to transmission and display. During the data transmission process, some key data (such as operation registration data and grain inspection data) is stored on the blockchain. The data display component integrates a blockchain browser to enable querying and displaying blockchain data, supporting traceability of grain data throughout its lifecycle. The data transmission and display component provides an interface and display platform for blockchain data applications, enhancing data credibility and traceability.
[0112] For example, in a corn purchasing operation at a grain depot, the weighing data W and grain inspection data Q collected by the scale controller are processed by the cloud gateway and are ready to be transmitted to the supervision platform. The SDN controller detects that the traffic of a link in the current network has reached the threshold. ,Immediately according to the network traffic matrix T and the node load vector L, the transmission path is recalculated ,through the optimization algorithm, and a path with lower load is selected for data ,transmission.
[0113] 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. The data is then divided into 1024-byte packets, with header information added before transmission over the Zigbee and SDN networks. Upon receiving the packet, the receiver verifies the checksum and, upon confirmation, returns an acknowledgment frame (ACK), confirming successful data transmission.
[0114] After receiving the data, the supervisory platform displays a real-time bar chart of the corresponding warehouse in the 3D visualization interface, showing the inventory level of newly arrived corn. The current location of the corn transporting vehicle is marked on the GIS map, and its movement trajectory is dynamically displayed. Managers can click on the record for a batch of corn to view complete data from procurement, sampling, inspection, and weighing, including test results such as moisture content and impurity percentage. The intelligent decision support module generates inventory transfer recommendations based on inventory data and market demand, and graphically displays inventory changes and benefit analysis before and after the transfer to assist managers in making decisions.
[0115] The embodiments disclosed in the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. The embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part, and / or installed from a removable medium. When the computer program is executed by the central processing unit (CPU), the above-mentioned functions defined in the method of the present application are executed. It should be noted that the computer-readable medium mentioned above in the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, a system, device or device of an electrical, magnetic, optical, electromagnetic, infrared segment or semiconductor, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more wire segments, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction 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, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including, but not limited to, an electromagnetic signal, an optical signal, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, electrical wire, optical fiber cable, RF, etc., or any suitable combination thereof.
[0116] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of the systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or portion of code that contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the boxes can also occur in an order different from that marked in the accompanying drawings. For example, two boxes shown in succession can actually be executed substantially in parallel, or they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, as well as the combination of boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified functions or operations, or can be implemented using a combination of dedicated hardware and computer instructions.
[0117] Those skilled in the art should understand that the embodiments of the present invention described above and shown in the accompanying drawings are only examples and do not limit the present invention. The objectives of the present invention have been fully and effectively achieved. The functional and structural principles of the present invention have been demonstrated and explained in the embodiments. Without departing from the principles, the implementation methods of the present invention may be subject to any deformation or modification.
Claims
1. A data processing method for a grain storage and supervision cloud gateway, characterized in that: The method comprises: Collect relevant operation information and encapsulate the operation information into smart contracts; The edge fog node performs initial quality screening, data integrity check, and duplicate data comparison on the sample data in the job information, and transmits the data processed by the edge fog node to the cloud gateway using the confirmation and retransmission mechanism; Integrate spectral data, image data, and physical and chemical test data to build a multimodal quality inspection model and conduct a multi-dimensional comprehensive analysis of grain quality; Build an anomaly judgment model to detect anomalies in the weight data of grains with qualified quality; Based on the grain weight data and preset standards, the water and impurity deduction data are calculated to screen out unqualified grains, and the spatiotemporal graph convolutional network is used to predict the trend of grain storage status changes; Build a supervision platform that uses the collected relevant operation data and analysis data generated based on the relevant operation data to build a 3D model.
2. A data processing method for a grain storage and supervision cloud gateway according to claim 1, characterized in that: The relevant operation information collection process is as follows: Capacitive fingerprint sensors and near-infrared iris imaging technology are used for biometric verification, and encrypted data and digital signatures are transmitted to edge sensing nodes. The edge sensing node data is then transmitted to the edge fog node. The RFID reader array monitors the vehicle position in real time, and the Kalman filter algorithm is used to smooth the positioning results. The temperature and humidity sensor group collects the current ambient temperature and humidity data in real time. The weighing scale controller collects weight and processes the weight data using the median filter algorithm and the sliding average filter algorithm.
3. A data processing method for a grain storage and 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 and executes immediately; Job information is permanently stored in the blockchain. The blockchain storage uses the Merkle tree structure to organize job information, with each job information as a leaf node, and generates a parent node through pairwise hash calculation until the root node.
4. A data processing method for a grain storage and supervision cloud gateway according to claim 3, characterized in that: The edge fog node processing process is as follows: The total appearance score of the grain is calculated based on the color score, grain fullness score and impurity content score, and grain with unqualified total appearance score is eliminated; the edge fog node judges the validity of the smart contract data and eliminates 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.
5. A data processing method for a grain storage and supervision cloud gateway according to claim 4, characterized in that: The specific content of the multimodal quality inspection model is as follows: The data was preprocessed. A multimodal quality inspection model used a ResNet-50 model pre-trained on a large-scale public grain quality inspection dataset as the base network, Transformer model, and multi-layer perceptron. The parameters of the pre-trained model were transferred to the grain depot's quality inspection task and fine-tuned based on the depot's sample data. During the training process, the cross entropy loss function is used; the judgment function is used to determine whether the grain quality is qualified.
6. A data processing method for a grain storage and supervision cloud gateway according to claim 5, characterized in that: The abnormality judgment model is as follows: An anomaly judgment model is constructed by integrating the improved isolation forest algorithm, the anomaly detection algorithm based on variational autoencoder and the anomaly detection algorithm based on Transformer. The data fusion layer adopts the weighted fusion method. Taking into account the applicability differences of each algorithm at different stages of grain storage operations, the fusion results are The calculation formula is: ; in: 、 、 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 are respectively; Over time The weight coefficient of the change.
7. A data processing method for a grain storage and supervision cloud gateway according to claim 6, characterized in that: The process of predicting the trend of grain storage status changes is as follows: A graph structure is constructed, and each storage unit in the grain warehouse is regarded as a node. Connections between nodes are established based on the physical proximity between storage units and the chronological order of grain storage, forming a graph that reflects spatiotemporal characteristics. Inventory data is input into the network for spatiotemporal feature extraction. Through multi-layer graph convolution and time convolution operations, the state change patterns between different storage units and the same unit at different times are explored. The extracted features are used to predict future changes in the grain storage environment.
8. A data processing method for a grain storage and supervision cloud gateway according to claim 7, characterized in that: The specific process of the regulatory platform is as follows: With the help of WebGL technology and GIS maps, grain warehouse operation data is converted into 3D visualization images, intuitively presenting inventory quantity, vehicle location, and operation progress information; through the intelligent decision support module, the processed data is analyzed and processed to generate operation scheduling optimization and inventory allocation decision recommendations.
9. A data processing system for a grain storage and supervision cloud gateway, characterized in that: The system is used to execute a data processing method for a grain storage and supervision cloud gateway as described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement a data processing method for a grain storage and supervision cloud gateway as described in any one of claims 1 to 8.
Citation Information
Patent Citations
System for automatic unloading of an agricultural material
CN103732479A
Management system for grain purchase
CN112749934A
Cloud gateway for grain depot collection and storage supervision and data processing method of cloud gateway
CN114429327A
Cloud gateway for grain depot storage supervision
CN114460989A
Grain depot AI video supervision analysis method and system
CN116416281A