Raw material warehouse data evidence storage management system based on block chain
By using edge computing nodes for data processing and feature extraction, combined with hash fingerprinting and intelligent priority storage, the problem of blockchain network congestion is solved, enabling efficient and reliable storage and timely response of raw material warehouse environmental monitoring data.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-25
- Publication Date
- 2026-03-31
AI Technical Summary
In existing technologies, directly uploading high-frequency data to the blockchain causes network congestion, leading to delays in the storage of environmental monitoring data in raw material warehouses and affecting the accurate assessment of quality status.
Edge computing nodes are introduced for data processing and feature extraction. Through multi-level data compression and hash fingerprinting mechanisms, the amount of data uploaded to the blockchain is reduced. An intelligent priority evidence storage mechanism is adopted to ensure rapid evidence storage for critical events.
It effectively solves the problems of data storage delay and real-time monitoring requirements, realizes efficient data processing and reliable data storage, and ensures timely response and quality safety of raw material storage environment.
Smart Images

Figure CN121765016A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of blockchain data management technology, specifically relating to a blockchain-based raw material warehouse data storage and management system. Background Technology
[0002] In the fields of supply chain management and the Internet of Things (IoT), ensuring the authenticity, traceability, and tamper-proof nature of critical data has become a core aspect of guaranteeing product quality and safety. Blockchain technology, with its decentralized and immutable characteristics, provides the technological foundation for building a trusted data storage system, with on-chain data storage being a crucial step in achieving reliable traceability.
[0003] Real-time environmental monitoring of raw material warehouses is a crucial aspect of supply chain data management, especially for perishable raw materials, whose quality status is highly dependent on continuous recording of storage environment parameters such as temperature and humidity. By deploying a sensor network in the warehouse and utilizing blockchain for data notarization, the aim is to achieve reliable traceability and status authentication throughout the entire raw material storage process.
[0004] Current technologies typically write temperature and humidity data collected by sensors directly into the blockchain in the form of transactions. However, in actual operation, uploading high-frequency data to the blockchain can easily cause congestion in the blockchain network's transaction pool, resulting in significant delays in data storage. This delay prevents real-time monitoring data from reflecting the true changes in the raw material storage environment in a timely manner. Especially for perishable raw materials, the delayed data updates may make it impossible to accurately determine their actual shelf life, increasing the risk of misjudgment of quality and economic losses.
[0005] Therefore, there is an urgent need for a raw material warehouse data management solution that can balance the credibility of data storage and real-time performance. Summary of the Invention
[0006] The purpose of this invention is to provide a blockchain-based raw material warehouse data storage and management system to solve the problems in the prior art where high-frequency data is directly uploaded to the blockchain, causing blockchain network congestion and significant data storage delays, which in turn affect the real-time monitoring of the raw material storage environment and the accurate judgment of its quality status.
[0007] The technical solution of this invention is a blockchain-based data storage and management system for raw material warehouses. This system includes a data acquisition module, edge computing nodes, a trusted data gateway, and a blockchain storage network. The data acquisition module is deployed inside the raw material warehouse to continuously collect environmental parameter data from various monitoring points within the warehouse. These environmental parameters include at least temperature and humidity data.
[0008] The data acquisition module contains multiple high-precision sensor units. The sensor units collect data according to a preset 2-second sampling period and send the collected raw environmental parameter data to the edge computing node in real time through an industrial-grade wireless communication protocol.
[0009] Edge computing nodes receive raw environmental parameter data streams from data acquisition modules and perform multi-level data processing and feature extraction operations on these streams. Each edge computing node integrates a data preprocessing unit, a feature calculation unit, and a first-level data compression unit.
[0010] The data preprocessing unit first performs outlier filtering and data smoothing on the received raw environmental parameter data, eliminating invalid data points caused by transient sensor interference. The feature calculation unit then performs statistical feature calculations on the preprocessed environmental parameter time series data, including but not limited to the average, maximum, minimum, and standard deviation within each 30-second time window. The first-level data compression unit then performs lossless encoding and compression on the calculated statistical feature data, generating a compact feature data packet.
[0011] The trusted data gateway is deployed between edge computing nodes and the blockchain evidence storage network, undertaking the core functions of data format standardization, timestamp synchronization, and data fingerprint generation. The trusted data gateway includes a data encapsulation unit, a secure hash unit, and a local cache database.
[0012] The data encapsulation unit receives feature data packets from edge computing nodes and binds these packets with precise timestamps obtained from the National Time Service Center, encapsulating them into standard data records. The secure hashing unit uses the national cryptographic SM3 hash algorithm to calculate a corresponding 256-bit data fingerprint for each standard data record.
[0013] The local cache database is used to temporarily store standard data records and their corresponding data fingerprints. The storage strategy is first-in, first-out, and the maximum cache capacity is 10,000 records.
[0014] The blockchain-based evidence storage network consists of multiple consensus nodes and employs an improved Practical Byzantine Fault-Tolerant consensus mechanism. Instead of directly storing detailed feature data packets containing environmental parameters, the network only receives and records data fingerprints sent by a trusted data gateway.
[0015] Each transaction containing a data fingerprint is packaged into a new block after being verified by more than 2 / 3 of the consensus nodes. This block is connected to the previous blockchain through a cryptographic hash pointer, forming an immutable evidence storage chain.
[0016] Furthermore, the system also includes a data verification and auditing service module. This module provides an interface for end users to verify the authenticity of data. When a user needs to verify the environmental data of the raw material warehouse within a certain time period, the user submits a query request to the data verification and auditing service module. This module first retrieves the corresponding standard data record from the local cache database or associated backup storage, and then recalculates the data fingerprint of the record using the same national cryptographic SM3 hash algorithm.
[0017] Finally, the module compares the recalculated data fingerprint with the corresponding data fingerprint recorded on the blockchain evidence storage network. If the two are completely identical, it is determined that the environmental data record has not been tampered with since its collection, and the verification is successful; if they are inconsistent, a data tampering alarm is generated.
[0018] In a preferred embodiment of the present invention, the feature calculation unit in the edge computing node also integrates a rate of change detection algorithm. This algorithm calculates in real time the difference between the average value of environmental parameters within the current time window and the average value of the previous time window.
[0019] When the rate of change of temperature or humidity is detected to be higher than the preset mutation threshold for two consecutive time windows, the feature calculation unit will immediately generate a high-priority event flag and send the flag along with the feature data packet of the current time window to the trusted data gateway.
[0020] Upon receiving data with high-priority event markers, the trusted data gateway will prioritize processing the data and immediately submit its data fingerprint to the blockchain evidence storage network to ensure that critical state changes can be quickly evidenced.
[0021] In another preferred embodiment of the present invention, the trusted data gateway is also configured with a dual-channel submission mechanism. Regular data fingerprints are submitted to the blockchain evidence storage network through a standard transaction channel. For data with high-priority event markers, the data fingerprints are submitted through a separate, fast channel. This fast channel enjoys higher transaction processing priority within the blockchain network and is configured with dedicated bandwidth resources to ensure low-latency confirmation of high-priority evidence storage requests.
[0022] In another preferred embodiment of the present invention, the data persistence strategy of the local cache database includes periodic backups to a distributed file storage system. The backup cycle is set to be performed once every 24 hours. During the backup process, the integrity of the stored data records is simultaneously verified to ensure the security and recoverability of the cached data in long-term storage.
[0023] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention introduces edge computing nodes to perform localized processing and feature extraction on raw high-frequency environmental data, significantly compressing the amount of data requiring on-chain notarization from the original second-level sampling points to statistical feature data packets within a 30-second time window. This significantly reduces the data throughput directly submitted to the blockchain network. This fundamentally alleviates the transaction pool congestion problem of the blockchain network, enabling data fingerprints to be recorded quickly and effectively resolving the contradiction between data notarization latency and real-time monitoring requirements.
[0024] 2. This invention constructs a four-level trust system consisting of raw data, standard data records, data fingerprints, and blockchain-based notarization. Raw environmental data and its characteristic data packets are stored on edge nodes and local caches, while the blockchain only stores its immutable data fingerprints. During data auditing, the authenticity of the data is verified by comparing the consistency between the recalculated data fingerprint and the on-chain fingerprint. This separate storage and hash verification mechanism ensures data integrity and tamper-proofness while avoiding the storage and performance overhead of putting all detailed data on the blockchain, achieving a highly efficient balance between trustworthiness and system efficiency.
[0025] 3. This invention designs an intelligent priority-based evidence storage mechanism based on data change rate. The system can automatically identify abnormal changes in environmental parameters and prioritize the evidence storage of data characterizing such critical events. By setting high-priority event markers and a fast submission channel, it ensures that when significant adverse changes occur in the raw material storage environment, the relevant evidence storage information can be quickly confirmed by the blockchain network. This provides reliable and timely data for taking timely quality intervention measures, greatly improving the system's actual effectiveness and response speed in ensuring the quality and safety of perishable raw materials. Attached Figure Description
[0026] Figure 1 This is a schematic diagram of the overall technical architecture of the blockchain-based raw material warehouse data storage and management system proposed in this invention. Figure 2 This is a schematic diagram of the core principle framework of multi-level data processing and feature extraction at edge computing nodes in this invention; Figure 3 This is a logical framework diagram of the trusted data gateway data standardization and fingerprint generation process in this invention; Figure 4 This is a schematic diagram illustrating the multi-level interaction between the blockchain evidence storage network and the data verification service in this invention; Figure 5 This is a schematic diagram of the principle framework of the intelligent priority evidence storage mechanism based on rate of change detection in this invention. Detailed Implementation
[0027] Please refer to the attached document. Figures 1 to 5This embodiment details the specific technical implementation of a blockchain-based data storage and management system for raw material warehouses. The system aims to solve the problems of blockchain network congestion and storage delays caused by the high-frequency uploading of environmental monitoring data from raw material warehouses to the blockchain. It achieves efficient data processing and reliable data storage by constructing a collaborative working system that includes a data acquisition module, edge computing nodes, a trusted data gateway, and a blockchain storage network.
[0028] The data acquisition module is the physical sensing layer of the system, and it is densely deployed at various key monitoring points inside the raw material warehouse. These monitoring points are optimized according to the distribution of raw material stacks, the air circulation characteristics within the warehouse, and historical areas of abnormal temperature and humidity, ensuring that there are no blind spots in the collection of environmental parameters.
[0029] The core of the data acquisition module consists of multiple high-precision sensor units specifically designed for industrial warehouse environments, featuring dustproof, moisture-proof, and electromagnetic interference-resistant characteristics. Each high-precision sensor unit integrates a temperature sensor and a humidity sensor. The temperature sensor achieves a measurement accuracy of ±0.1 degrees Celsius, and the humidity sensor achieves a measurement accuracy of ±2% relative humidity. The high-precision sensor units operate with a strict 2-second sampling cycle, continuously capturing temperature and humidity data from the monitoring points. The acquired raw environmental parameter data is transmitted in real time via industrial-grade wireless communication protocols, such as wireless sensor network protocols based on the IEEE 802.15.4 standard.
[0030] The communication protocol employs a frequency hopping mechanism and a data packet retransmission strategy to address signal attenuation and multipath effects that may be caused by the complex metal structure within the warehouse, ensuring that the original data stream can be sent to the edge computing node stably and with a low bit error rate.
[0031] Edge computing nodes, serving as the data processing hub on the edge side of the system, are typically deployed in communication rooms or dedicated cabinets within the warehouse. They are connected to the aggregation nodes of the data acquisition modules via wired networks to receive raw environmental parameter data streams from various high-precision sensor units.
[0032] Please refer to the attached document. Figure 2 The internal software architecture of the edge computing node is divided into three core processing units: a data preprocessing unit, a feature calculation unit, and a first-level data compression unit, which process the data stream in sequence.
[0033] The data preprocessing unit first performs cleaning and normalization operations on the incoming raw environmental parameter data. Internally, it maintains a dynamic data buffer to temporarily store data points from the last five sampling periods, or 10 seconds. For each newly arriving data point, the data preprocessing unit compares it with the historical data in the buffer and applies an outlier detection algorithm based on the Laida criterion.
[0034] Specifically, the algorithm calculates the arithmetic mean and standard deviation of the data sequence in the buffer. If the absolute value of a new data point deviates from the mean by more than three times the standard deviation, the data point is determined to be an invalid data point caused by transient interference from the sensor and is discarded.
[0035] For data points that pass outlier detection, the data preprocessing unit further employs a moving average filter with a window size of 3 for data smoothing to suppress random noise. The environmental parameter time series data, after outlier filtering and data smoothing, are marked as valid preprocessed data and sent to the feature calculation unit.
[0036] The feature calculation unit is responsible for extracting representative statistical features from continuous time series data. This unit internally employs a sliding time window mechanism with a fixed window length of 30 seconds. Since the original sampling period is 2 seconds, each time window contains 15 valid preprocessed data points.
[0037] The feature calculation unit maintains an independent time window for the temperature and humidity data streams of each monitoring point. Every time the time window slides once, that is, every 30 seconds, the feature calculation unit performs a round of statistical feature calculations on all 15 data points within the window.
[0038] The calculations include four core statistics: mean, maximum, minimum, and standard deviation. The mean reflects the overall level of the environmental parameter within the time window; the maximum and minimum values characterize the range of fluctuation of the parameter; and the standard deviation quantifies the dispersion of the parameter.
[0039] These statistical features together constitute a condensed description of the environmental conditions within a 30-second time period. The feature calculation unit combines the temperature and humidity statistical features calculated for the same time window and the same monitoring point to form a structured feature data set.
[0040] In addition, the feature calculation unit integrates a key rate of change detection function. This function is designed to identify abrupt changes in environmental parameters. The rate of change detection algorithm continuously tracks the change in the average value of a certain environmental parameter within a continuous time window.
[0041] Specifically, the algorithm defines a rate of change threshold: for temperature, this threshold is set to 2 degrees Celsius per minute; for humidity, this threshold is set to 5% relative humidity per minute. The algorithm calculates the absolute difference between the average value of the current time window and the average value of the immediately preceding time window, and converts this difference into a rate of change per minute.
[0042] If the calculated rate of change exceeds two consecutive time windows (i.e., for at least 60 seconds) and is higher than its corresponding preset mutation threshold, the feature calculation unit determines that a significant environmental parameter mutation event has occurred.
[0043] At this point, the feature calculation unit immediately generates a high-priority event flag, which is a specific binary flag set to logic 1. This high-priority event flag is then associated with the feature data set of the current time window that triggered the event.
[0044] The first-level data compression unit receives a set of structured feature data from the feature calculation unit, along with potentially accompanying high-priority event markers. The unit's task is to convert this text or binary format feature data into a more compact format to reduce network transmission overhead.
[0045] The first-level data compression unit uses a lossless coding compression algorithm, such as the LZ77 algorithm or a variant thereof, to compress the feature data set. The compression process removes redundant information from the data, generating a feature data packet with a significantly reduced size.
[0046] If the original feature data set includes high-priority event markers, these markers will also be compressed into the feature data packet, or explicitly identified in the packet's metadata header. Finally, the first-level data compression unit outputs the compressed feature data packet, ready to be sent to the trusted data gateway.
[0047] The trusted data gateway is a crucial bridge connecting edge computing environments and blockchain-based evidence storage networks, undertaking the core tasks of data standardization, timestamp synchronization, and data fingerprint generation. Please refer to the appendix. Figure 3 The trusted data gateway contains three main parts: a data encapsulation unit, a secure hash unit, and a local cache database.
[0048] The data encapsulation unit is responsible for receiving feature data packets sent from various edge computing nodes. For each received feature data packet, the data encapsulation unit first decompresses it to restore the structured feature data set and possible high-priority event markers.
[0049] Subsequently, the data encapsulation unit communicates with the time server of the National Time Service Center via a dedicated network time protocol client to obtain a high-precision Coordinated Universal Time (UTC) timestamp. This timestamp typically has millisecond-level precision. The data encapsulation unit binds this precise timestamp with the restored feature data set, the corresponding monitoring point identifier, and the edge computing node identifier of the data source, encapsulating them together into a standard data record. The standard data record uses a predefined binary or JSON format to ensure structural consistency and parsability.
[0050] The secure hash unit performs a cryptographic hash operation on each encapsulated standard data record to generate its unique data fingerprint. This system specifies the use of the national cryptographic standard SM3 hash algorithm.
[0051] This algorithm takes standard data records of arbitrary length as input, and after steps such as padding, message expansion, and compression function iteration, outputs a fixed-length 256-bit hash value, i.e., a data fingerprint. This data fingerprint has strong collision resistance, meaning that any small modification to the original standard data record will lead to a large and unpredictable change in the calculated data fingerprint. A secure hash unit generates a corresponding SM3 data fingerprint for each processed standard data record.
[0052] The local cache database is a high-performance key-value store system used for temporary storage of massive amounts of standard data records and their corresponding SM3 data fingerprints generated by the system. Its storage strategy follows a first-in, first-out (FIFO) principle: when the number of data records in the database reaches its preset maximum cache capacity of 10,000, the oldest stored data record is automatically removed to make room for new data.
[0053] Each standard data record and its SM3 data fingerprint are stored as a key-value pair in the database. Metadata such as its timestamp and monitoring point identifier are also stored to facilitate rapid retrieval and querying later. Furthermore, the local cache database implements a data persistence strategy, including periodic backups to a remote distributed file storage system, such as a system based on the Hadoop distributed file architecture.
[0054] Backup operations are typically performed automatically every 24 hours. During the backup process, the system performs a cyclic redundancy check (CRC) calculation on the set of data records to be backed up to ensure the integrity of data transmission and storage.
[0055] The blockchain-based evidence storage network forms the system's trusted anchor, consisting of multiple geographically distributed consensus nodes operated by different stakeholders. These consensus nodes are interconnected through a peer-to-peer network. The network employs an improved Practical Byzantine Fault-Tolerant consensus mechanism to achieve state consistency.
[0056] Under this mechanism, the network does not directly store standard data records or their characteristic data packets from the trusted data gateway, but only receives and records SM3 data fingerprints generated by the secure hash unit of the trusted data gateway.
[0057] Please refer to the attached document. Figure 4When a trusted data gateway wants to submit a data fingerprint, it packages it into a specific notarization transaction and broadcasts it to the blockchain notarization network. Upon receiving this transaction, the consensus nodes in the network verify it, including checking the correctness of the transaction format and the sender's identity and permissions. Subsequently, the consensus nodes proceed with the consensus process.
[0058] The improved Practical Byzantine Fault-Tolerant consensus mechanism requires participating nodes to reach an agreement on the order of a batch of transactions, including the notarized transaction, through multiple rounds of message exchange. Only after more than two-thirds of the consensus nodes have verified and approved the batch of transactions will these transactions be packaged into a new block by the designated master node. Each new block contains a cryptographic hash pointer pointing to the hash value of the previous block, thus forming an interlocking, immutable notarized chain starting from the genesis block. Once a block containing the data fingerprint is successfully added to the chain, the data fingerprint is considered to have been immutably notarized.
[0059] The system also includes a dedicated data verification and auditing service module, providing end-users such as warehouse managers, auditors, or quality control personnel with data authenticity verification services. This module is typically provided externally in the form of an application programming interface (API) or a web service.
[0060] When a user needs to verify the authenticity of raw material warehouse environmental data at a specific monitoring point within a specific time period, the user submits a structured query request to the data verification and auditing service module. This request must include at least the target monitoring point identifier, the start timestamp, and the end timestamp.
[0061] Upon receiving a query request, the data verification and auditing service module first accesses the local cache database of the trusted data gateway based on the request parameters, or accesses the associated backup distributed file storage system if the data has been archived, to retrieve all standard data records within the specified time range and monitoring points.
[0062] For each retrieved standard data record, the data verification and auditing service module recalculates the data fingerprint of that record using the same national cryptographic SM3 hash algorithm as the secure hash unit. Following this, the module queries the blockchain evidence storage network to obtain official data fingerprints related to that monitoring point, recorded within the corresponding time interval.
[0063] Finally, the data verification and auditing service module compares the locally recalculated data fingerprint with the data fingerprint retrieved from the blockchain. If the two fingerprints match perfectly for a given record, it is determined that the environmental data record has not been tampered with since its generation and storage, and the verification is successful. The module then returns a successful verification message and related data to the user.
[0064] If any inconsistency is detected, i.e., the recalculated fingerprint does not match the on-chain fingerprint, the data verification and auditing service module will immediately generate a data tampering alarm. This alarm will be sent to designated security operations personnel via the system's integrated messaging mechanism, such as SMS, email, or an internal alarm platform, indicating a potential data integrity issue.
[0065] For scenarios involving sudden changes in environmental parameters, the system implements an intelligent priority-based evidence storage mechanism. Please refer to the appendix. Figure 5 The core of this mechanism lies in the rate of change detection algorithm integrated in the feature calculation unit of the edge computing node. As mentioned earlier, when the algorithm detects that the rate of change of temperature or humidity exceeds its preset abrupt change threshold for more than two consecutive time windows, it will generate a high-priority event marker.
[0066] This tag is transmitted to the trusted data gateway along with the feature data packet. The trusted data gateway has a priority processing logic. When its data encapsulation unit or subsequent processing stage recognizes that the incoming feature data packet is accompanied by a high-priority event tag, it will immediately switch the processing path of the data packet to the priority queue. This means that the encapsulation, hash calculation, and other steps of this data packet will be executed before other regular data packets.
[0067] More importantly, the trusted data gateway is configured with a dual-channel submission mechanism. Regular data fingerprints are submitted to the blockchain evidence storage network through a standard transaction channel, where transaction processing follows the conventional queuing and fee mechanisms. However, for data fingerprints corresponding to data with high-priority event markers, the trusted data gateway submits them through a separate, fast channel. This fast channel is given higher processing priority within the blockchain evidence storage network, and the network reserves dedicated bandwidth resources for these transactions.
[0068] When packaging transactions, consensus nodes prioritize high-priority transactions in the fast channel. This ensures that when significant adverse changes occur in the raw material storage environment, such as a sudden temperature rise due to a cooling system failure, the data fingerprint representing this critical event can be rapidly confirmed by the blockchain network with extremely low latency, providing crucial timeliness for managers to take timely intervention measures.
[0069] At the system deployment and operation level, the high-precision sensor units in the data acquisition module need to be calibrated on-site regularly, with a recommended calibration cycle of 3 months, to ensure the long-term accuracy of the measurement data. The hardware selection of the edge computing nodes should have sufficient computing power to handle the real-time processing needs of concurrent data streams from multiple monitoring points, and their operating system is usually a streamlined and hardened Linux distribution.
[0070] Trusted data gateways must be deployed in areas with high network reliability and security measures, and their communication links with the National Time Service Center should have redundant backups. The consensus nodes of the blockchain evidence storage network are jointly maintained by all parties involved in raw material supply chain management, such as warehouse operators, raw material suppliers, logistics companies, and regulatory agencies, to ensure decentralized trust in the system. The application programming interface (API) of the data verification and auditing service module should be designed with strict access control and authentication mechanisms to prevent unauthorized data queries and verification operations.
[0071] Through the precise coordination of the aforementioned modules, the entire system achieves efficient processing, reliable storage, and convenient auditing of massive amounts of monitoring data from raw material warehouse environments. Its core advantages lie in significantly reducing the amount of data uploaded to the blockchain through edge computing, ensuring data immutability through the combination of hash fingerprints and blockchain, and guaranteeing rapid response to critical events through an intelligent priority mechanism, thereby improving the overall intelligence level and data credibility of raw material warehouse management.
[0072] This embodiment is a further optimization and extension of the system described in the above embodiments, focusing on enhancing the intelligence level of data processing and the flexibility of the system architecture to cope with more complex warehouse environments and diverse auditing needs.
[0073] In the feature computation unit of the edge computing node, in addition to performing basic statistical feature calculations and rate of change detection, this embodiment introduces a machine learning-based anomaly pattern recognition submodule. This submodule trains offline on the edge computing node or receives a lightweight machine learning model, such as a support vector machine model or an autoencoder model, from the cloud.
[0074] The model is trained using historical, normal temperature and humidity time-series data to learn patterns of fluctuations in normal environmental parameters. In real-time operation, this submodule not only focuses on statistical characteristics within a 30-second time window but also performs pattern analysis on the raw or pre-processed data sequences within the window. The model calculates the deviation score between the current time window's data sequence and the learned normal pattern.
[0075] When the deviation score exceeds a preset anomaly threshold for two consecutive time windows, the feature calculation unit will generate an anomaly pattern marker even if the rate of change of its statistical characteristics does not reach the mutation threshold. This marker has a similar processing priority to high-priority event markers and will also trigger the priority processing flow of the trusted data gateway and the fast submission channel of the blockchain. This enables the system to detect more subtle, slow but persistent abnormal trends, such as a decrease in temperature control accuracy caused by the slow aging of equipment.
[0076] Regarding the trusted data gateway, this embodiment upgrades the architecture of its local cache database. In addition to the basic first-in-first-out cache, a long-term archive storage area is added. This archive storage area uses cold data storage technology to store standard data records that have exceeded a certain period of time, such as 30 days, but still have potential audit value.
[0077] The archiving process is automated. When data has lived in the first-in-first-out (FIFO) cache for 30 days, the system automatically migrates it to the archive storage area. The archive storage area is deeply integrated with the distributed file storage system and employs erasurecoding data redundancy technology, which improves data persistence and reliability while ensuring storage economy.
[0078] Furthermore, the trusted data gateway's data encapsulation unit supports pluggable data serialization formats. In addition to the default binary format, it can also select formats such as JSON, Protocol Buffers, or Apache Avro to encapsulate standard data records, adapting to the data parsing needs of different downstream systems or auditing tools.
[0079] This embodiment explores the expansion of cross-chain interoperability for blockchain-based evidence storage networks. The main evidence storage chain still employs a consortium blockchain with an improved practical Byzantine fault-tolerant consensus mechanism. However, the system also incorporates a cross-chain relay module that periodically, for example daily, anchors the block header hash of newly added blocks on the main chain, or the Merkle root hash of a batch of data fingerprints, to a public blockchain, such as the Ethereum mainnet or other public chains with higher global consensus security.
[0080] This process is achieved by sending a notarization transaction containing these hash values to the public blockchain. The advantage of this is that it leverages the stronger immutability and global visibility of the public blockchain to provide an additional, higher level of security for the entire raw material warehouse data notarization system. During data auditing, the verification service can not only verify the existence and consistency of the data fingerprint on the private consortium blockchain, but also further verify the existence of its corresponding anchoring information on the public blockchain, thus providing stronger credible proof.
[0081] In this embodiment, the data verification and auditing service module enhances its analytical capabilities. In addition to providing verification of the authenticity of individual records, it also offers a time-series-based data consistency analysis report. When a user submits a data verification request for a given time period, the module performs trend analysis on the verified data after completing basic fingerprint comparison.
[0082] For example, it can plot temperature and humidity variation curves within a given time period and mark abrupt changes or abnormal patterns automatically identified by the system. Simultaneously, it can calculate the environmental parameter compliance rate within that time period—the percentage of time parameters remain within preset safety ranges—and generate a visualized audit report. This value-added service helps users more intuitively understand the overall condition and historical changes of the warehouse environment, enhancing the decision-support value of the data.
[0083] At the system communication security level, this embodiment strengthens the confidentiality and integrity protection during data transmission. The wireless communication between the data acquisition module and the edge computing node, in addition to employing an industrial-grade wireless communication protocol, adds link-layer encryption based on the national cryptographic algorithm SM4.
[0084] Wired communication between edge computing nodes and trusted data gateways, as well as between trusted data gateways and the blockchain evidence storage network, is mandated to use Transport Layer Security (TLS) version 1.2 or higher for encryption. All application programming interface (API) calls between internal system modules must be based on two-way authentication using digital certificates to prevent unauthorized access and man-in-the-middle attacks.
[0085] Finally, this embodiment considers system maintainability and monitoring. A centralized log collection and performance monitoring platform is introduced. All modules, including the sensor status of the data acquisition module, the processing load of edge computing nodes, the cache hit rate and commit latency of the trusted data gateway, and the block production status of the blockchain network, are collected in real time and displayed on a unified monitoring dashboard.
[0086] The system has set alarm thresholds for various indicators. When any indicator becomes abnormal, such as a significant increase in edge node processing latency or excessively long blockchain network transaction confirmation time, the monitoring platform will immediately trigger an alarm, notifying the operations and maintenance team to intervene and ensure the stable operation of the system. This comprehensive monitoring system provides a solid management foundation for large-scale deployment and long-term operation and maintenance.
[0087] With the enhanced features described in Example 2, the system not only possesses all the advantages of the above examples, but also significantly improves the intelligence of anomaly detection, the flexibility of data storage, the robustness of system security, the richness of auditing functions, and the convenience of operation and maintenance management. It can better adapt to complex and ever-changing industrial application scenarios and increasingly stringent data compliance requirements.
[0088] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0089] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A blockchain-based raw material warehouse data storage and management system, characterized in that, include: The data acquisition module is deployed inside the raw material warehouse to continuously collect environmental parameter data from various monitoring points within the warehouse. The environmental parameters include at least temperature and humidity data. Edge computing nodes are used to receive raw environmental parameter data streams from the data acquisition module and perform multi-level data processing and feature extraction operations on the data streams. The edge computing node integrates a data preprocessing unit, a feature calculation unit, and a first-level data compression unit. The trusted data gateway is deployed between edge computing nodes and the blockchain evidence storage network, and undertakes the core functions of data format standardization, timestamp synchronization and data fingerprint generation. The trusted data gateway includes a data encapsulation unit, a secure hash unit, and a local cache database. The data encapsulation unit receives feature data packets from edge computing nodes and binds the feature data packets with precise timestamps obtained from the National Time Service Center, encapsulating them into standard data records; the secure hashing unit uses the national cryptographic SM3 hash algorithm to calculate each standard data record and generate a corresponding data fingerprint; the local cache database is used to temporarily store standard data records and their corresponding data fingerprints. The blockchain evidence storage network consists of multiple consensus nodes and employs an improved practical Byzantine fault-tolerant consensus mechanism. This network does not directly store detailed feature data packets of environmental parameters, but only receives and records data fingerprints sent by trusted data gateways. Each transaction containing a data fingerprint is packaged into a new block after being verified by more than two-thirds of the consensus nodes. This block is connected to the previous blockchain through a cryptographic hash pointer, forming an immutable evidence storage chain.
2. The blockchain-based raw material warehouse data storage and management system according to claim 1, characterized in that, The data preprocessing unit first performs outlier filtering and data smoothing on the received raw environmental parameter data to remove invalid data points caused by instantaneous sensor interference. The feature calculation unit then performs statistical feature calculations on the preprocessed environmental parameter time series data, including the average, maximum, minimum and standard deviation within each 30-second time window. The first-level data compression unit performs lossless encoding and compression on the calculated statistical feature data to generate a compact feature data packet.
3. The blockchain-based raw material warehouse data storage and management system according to claim 1, characterized in that, The system also includes a data verification and auditing service module; this module provides an interface for verifying the authenticity of data to end users. When a user needs to verify the environmental data of the raw material warehouse within a certain time period, the user submits a query request to the data verification and auditing service module. The module first retrieves the corresponding standard data record from the local cache database or associated backup storage, and then recalculates the data fingerprint of the record using the same national cryptographic SM3 hash algorithm; Finally, the module compares the recalculated data fingerprint with the corresponding data fingerprint recorded on the blockchain evidence storage network. If the two are completely consistent, it is determined that the environmental data record has not been tampered with since its collection, and the verification is successful. If they are inconsistent, a data tampering alarm is generated.
4. The blockchain-based raw material warehouse data storage and management system according to claim 1, characterized in that, The feature calculation unit in the edge computing node also integrates a rate of change detection algorithm; The algorithm calculates the difference between the average value of environmental parameters in the current time window and the average value in the previous time window in real time. When the rate of change of temperature or humidity is detected to be higher than the preset mutation threshold for two consecutive time windows, the feature calculation unit will immediately generate a high-priority event flag and send the flag along with the feature data packet of the current time window to the trusted data gateway.
5. The blockchain-based raw material warehouse data storage and management system according to claim 4, characterized in that, Upon receiving data with a high-priority event tag, the trusted data gateway will prioritize processing the data and immediately submit its data fingerprint to the blockchain evidence storage network.
6. The blockchain-based raw material warehouse data storage and management system according to claim 5, characterized in that, The trusted data gateway is configured with a dual-channel submission mechanism; Regular data fingerprints are submitted to the blockchain evidence storage network through standard transaction channels; For data marked with high-priority events, its data fingerprint is submitted through a separate fast channel; this fast channel enjoys higher transaction processing priority within the blockchain network and is configured with dedicated bandwidth resources.
7. The blockchain-based raw material warehouse data storage and management system according to claim 1, characterized in that, The data persistence strategy for the local cache database includes periodic backups to a distributed file storage system; The backup cycle is set to be performed every 24 hours, and the integrity of the stored data records is checked during the backup process.
8. The blockchain-based raw material warehouse data storage and management system according to claim 1, characterized in that, The outlier filtering operation performed by the data preprocessing unit on the raw environmental parameter data is as follows: An outlier detection algorithm based on the Raida criterion is applied to calculate the arithmetic mean and standard deviation of the data buffer sequence. When the absolute value of the deviation of a new data point from the mean exceeds three times the standard deviation, it is determined to be an invalid data point and is removed.
9. The blockchain-based raw material warehouse data storage and management system according to claim 1, characterized in that, The data preprocessing unit further smooths the environmental parameter data after outlier filtering by using a moving average filter with a window size of 3. The feature calculation unit has a sliding time window mechanism with a fixed window length of 30 seconds. Since the original sampling period is 2 seconds, each time window contains 15 effective preprocessed data points.
10. The blockchain-based raw material warehouse data storage and management system according to claim 1, characterized in that, The first-level data compression unit uses a lossless coding compression algorithm to compress the feature data set, generating a feature data packet with a significantly reduced size.