A blockchain and RFID-based experimental reagent full-life-cycle tracing and risk control system and application
Patent Information
- Application Number
- CN202611030205.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-11
- Publication Date
- 2026-10-09
AI Technical Summary
[0009]针对现有技术的不足,本发明提供一种基于区块链与 RFID 的实验试剂全生命周期追溯与风险控制系统及应用,通过数据指纹可信锚定、动态风控算法、完备智能合约、边缘离线自治及标准化细节设计,实现数据不可篡改、风险前置拦截、权限精细管控及流程闭环追溯,克服现有技术中存在的数据易篡改、风险管控被动、合约逻辑空白、系统协同缺失及落地性差的缺陷
1、在数据可信性方面,本发明采用SHA-256哈希算法结合联盟链共识机制,将全流程事件、风险日志及权限校验记录上链存证,并由边缘计算网关直接进行ECDSA签名,从技术上杜绝了人工篡改的可能性,解决了现有技术中数据易篡改、可信追溯能力缺失的问题。
Smart Images

Figure CN122885068A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a blockchain and RFID-based full lifecycle traceability and risk control system and its application for laboratory reagents, belonging to the field of laboratory safety management technology. Background Technology
[0002] Universities, research institutes, and third-party testing organizations have long faced pain points in the management of experimental reagents (especially hazardous chemicals), such as poor data reliability, passive risk control, lack of core technical details, insufficient system coordination capabilities, and weak feasibility. Existing management solutions all have obvious defects.
[0003] In terms of data storage and reliable traceability, traditional paper ledgers and stand-alone software ledgers are prone to loss and alteration. Furthermore, centralized management systems often have excessive administrator privileges, leading to the risk of backend tampering with inventory, usage, and environment logs. Existing blockchain solutions (such as the patent application with publication number CN113052458A) simply record circulation information, lacking hash anchoring, signature verification, and off-chain anchoring mechanisms for original data, making it impossible to verify the authenticity of the data. In addition, such solutions rely on external enterprise nodes, making cross-institutional coordination difficult. They fail to achieve a unique code for each item and a fingerprint binding relationship with on-chain data, making the traceability chain prone to breakage and making it difficult to form a credible chain of evidence with legal evidentiary force after an incident.
[0004] In terms of risk management, existing technologies generally exhibit passive and static characteristics, with insufficient proactive prevention capabilities. For example, the intelligent storage cabinet for hazardous chemicals based on the safety and environmental protection of university laboratories disclosed in Chinese patent document CN117894119A only achieves basic temperature, humidity, and volatile organic compound (VOC) collection. It lacks a precise matching algorithm for incompatibilities, a dynamic threshold adaptation model, leakage location logic, and a graded closed-loop disposal mechanism. It cannot intercept incompatible combinations such as acids and alkalis, oxidants and reducing agents, and flammable materials and strong oxidants at the moment of reagent storage. Environmental early warning generally uses fixed thresholds and fails to dynamically adjust them based on the hazard level of the reagents. Risk disposal relies on manual intervention and lacks automatic cabinet locking and graded early warning closed-loop mechanisms, resulting in delayed detection of hidden dangers and low disposal efficiency.
[0005] In terms of blockchain smart contract applications, existing solutions (such as the blockchain-based method and system for safe management of chemical reagents in university laboratories disclosed in Chinese patent document CN113052458A) use smart contracts only for data broadcasting. They do not define standardized reagent asset data structures, lifecycle state machines, refined permission verification algorithms, and closed-loop logic for risk events. This results in the inability to solidify the static attributes, dynamic risk attributes, and real-time status of reagents, and the inability to achieve automatic flow of states such as warehousing, requisition, expiration, and disposal. Permission management only roughly distinguishes between administrators and ordinary users and cannot achieve triple verification of role-permission-risk level, making it easy for high-risk reagents to be requisitioned without authorization.
[0006] In terms of edge computing and blockchain collaboration, existing solutions only enable edge devices to perform data collection functions, lacking local decision-making capabilities and relying on the cloud or blockchain network for operation; they lack offline caching, signature verification, and consensus mechanisms for network outage recovery; data from multiple cabinets and laboratories are isolated from each other, and cross-regional allocation lacks standardized approval and traceability processes, forming data silos.
[0007] In terms of the completeness of technical solutions, existing technologies often focus on functional descriptions and lack clear hardware models, parameter ranges, interface protocols, detailed algorithm definitions, complete contract fields, interaction processes, and judgment thresholds. They tend to fall into the category of utility models, which makes it impossible for those skilled in the art to reproduce the system based on the solution, resulting in poor adaptability and reusability.
[0008] In summary, existing technologies are essentially a rudimentary combination of device stacking and simple on-chain implementation. They lack trusted data mechanisms, proactive risk control algorithms, complete contract logic, edge offline capabilities, and practical implementation details, and cannot meet the core management needs of reliable, controllable, and traceable experimental reagents throughout their entire lifecycle. Summary of the Invention
[0009] To address the shortcomings of existing technologies, this invention provides a blockchain and RFID-based experimental reagent full lifecycle traceability and risk control system and application. Through trusted data fingerprint anchoring, dynamic risk control algorithms, complete smart contracts, edge offline autonomy, and standardized detailed design, it achieves data immutability, proactive risk interception, fine-grained access control, and closed-loop process traceability, overcoming the defects of existing technologies such as easy data tampering, passive risk control, blank contract logic, lack of system collaboration, and poor implementation.
[0010] The technical solution of the present invention is as follows: A blockchain and RFID-based experimental reagent lifecycle traceability and risk control system includes a smart storage cabinet, a consortium blockchain network, and a handheld RFID terminal, wherein: Intelligent storage cabinets serve as edge sensing and decision-making nodes, used for the physical storage of reagents, environmental data acquisition, local risk decision-making, and execution control. Consortium blockchain networks serve as distributed trusted ledgers for data fingerprinting, smart contract execution, and multi-node collaborative consensus. Handheld RFID terminals serve as mobile operation terminals for field warehousing, inventory counting, and waste registration. The intelligent storage cabinet, the consortium blockchain network, and the handheld RFID terminal communicate encryptedly through a local area network or 5G network to achieve data exchange, command transmission, and status synchronization.
[0011] Preferably, the intelligent storage cabinet includes a cabinet body, an RFID identification component, an environmental sensor array, an edge computing gateway, an execution control component, and a display and interaction component. The cabinet body is made of 1.5mm thick cold-rolled steel plate or 304 stainless steel through an integral bending forming process. The surface of the cabinet body is coated with an anti-static epoxy coating with a thickness of 20μm to 25μm, and the surface resistance is controlled within 10 ohms. 6 Ω to 10 9 Within the Ω range; the cabinet interior is divided by 4 layers of horizontally adjustable partitions, with the partition spacing adjustable from 150mm to 350mm; each partition is divided into 3 to 4 independent storage units by longitudinal stainless steel strips, with unit net dimensions of 300mm wide × 450mm deep × 300mm high; a 120mm diameter ventilation opening is opened at the bottom of the cabinet back panel, equipped with a miniature axial flow exhaust fan with an air volume of 50±5m³ / h and a wind pressure of not less than 80Pa, and a honeycomb activated carbon filter (activated carbon filling amount not less than 500g); grounding bolts are provided at the four corners of the cabinet, with a grounding resistance of not more than 4Ω, and the entire cabinet reaches the IP54 protection level; a cabinet door is installed on one side of the cabinet, and the cabinet door adopts a double-layer hollow structure, with an outer layer of 1.5mm steel plate and an inner layer of 1.2mm steel plate, and 50mm thick aluminum silicate fireproof cotton filling in between; the cabinet door is equipped with a DC12V explosion-proof electromagnetic lock, with a lock body pulling force of not less than 1500N, and is used in conjunction with a door magnetic switch to detect the cabinet door opening status; The RFID identification component includes a UHF directional antenna, an RFID reader, and adapter tags. Each partition has a 20mm diameter circular hole at its center on the bottom surface to embed one UHF directional antenna. The antenna gain is 8±0.5dBi, the horizontal beamwidth is 70°, and the vertical beamwidth is 50°. The antenna radiation field is confined within the corresponding storage unit, and the crosstalk suppression rate is not less than 95%. All antennas are connected to the integrated RFID reader at the top of the cabinet via a low-loss coaxial cable (no more than 2m long, 50Ω impedance) and an SMA connector. The RFID reader is a fixed reader based on the Impinj R2000 chip (such as the Impinj Speedway R420 or an equivalent solution), supporting 4 / 8 / 16-channel time-division polling, with a transmit power of 10dB. The RFID reader is continuously adjustable from 1dBm to 30dBm (in 1dBm steps), with a reading rate of no less than 200 tags / second, and supports Received Signal Strength Indicator (RSSI) analysis. The RFID reader's communication interface includes one RS485 channel (9600bps baud rate) and one 100Mbps Ethernet channel, communicating with the edge computing gateway via RS485 bus or Ethernet. The compatible tags are selected based on the reagent characteristics: room temperature reagents use flexible anti-metal tags (50mm×30mm, 915MHz operating frequency); -40℃ to +85℃ frozen reagents use low-temperature resistant ceramic tags; concentrated acid / strong alkali reagents use PET-encapsulated corrosion-resistant tags. The compatible tag has a 96-bit EPC area and a 512-bit user area, with a writing distance of no less than 5cm and a reading distance of no less than 15cm. The environmental sensor array includes temperature and humidity sensors, VOC sensors, and smoke sensors. One digital temperature and humidity sensor (model SHT30 or AHT20) is fixed in the middle of each side wall inside the cabinet. The measurement range is -40℃ to +85℃ for temperature and 0%RH to 100%RH for humidity, with an accuracy of ±0.3℃ for temperature and ±2%RH for humidity. It uses I2C communication (addresses 0x40 to 0x47). The temperature and humidity sensors are extended via a PCA9548 I2C multiplexer and then connected to an edge computing gateway. One VOC sensor (model SGP30 or MP503) is fixed at each of the top and bottom diagonals of the cabinet. The SGP30 has a TVOC measurement range of 0 to 60,000 ppb, and the MP503 has a VOC measurement range of 1 to 50 ppm. The response time is less than 5 seconds. It uses UART or I2C communication. A photoelectric smoke sensor (such as JTY-GD-ZM992 or equivalent) is fixed at the top of the cabinet. The operating voltage is DC9V to DC24V, and it has a switch output (high-level alarm). The data acquisition cycle of the temperature and humidity sensor, VOC sensor and smoke sensor is 5 seconds. The data is uploaded to the edge computing gateway via Modbus RTU (slave addresses 1 to 8) or MQTT protocol (QoS=1). The edge computing gateway serves as the core decision-making and communication hub of the intelligent storage cabinet. Its hardware utilizes a Rockchip RK3568 quad-core processor (Cortex-A55 architecture, 2.0GHz), 4GB LPDDR4 memory, 32GB eMMC storage, and integrates a neural network processing unit (NPU) with 1.0 TOPS computing power. Gateway peripherals include two Gigabit Ethernet ports, four USB 3.0 ports, four RS485 ports, eight GPIO ports (DC12V / 1A), and one DC12V power input. The gateway software runs Ubuntu 20.04LTS, deployed using Docker 24.0.6 containerization, and includes four core services: RFID read / write service (multi-threaded polling, thread count equals channel count, parsing EPC and RSSI, identifying tag appearance / disappearance events, event generation cycle 200ms). Sensor data acquisition service, 5-second acquisition cycle, uses median filtering with a window width of 5 combined with Kalman filtering for noise reduction. The filtering formula is as follows: ,in, Z is the filtered value at time k. k K is the original measured value. k The Kalman gain ranges from 0.1 to 0.5. A blockchain light node client, based on FabricGatewaySDK, employing TLS two-way authentication and ECDSA transaction signature algorithm; The local risk decision engine, written in C++, performs compatibility matching, leak location, timeout timing, and threshold judgment. When the network is interrupted, cached events are accompanied by timestamps and ECDSA signatures, with a cache capacity of no less than 1,000 entries. After the network is restored, the data is re-uploaded in batches. The execution control components include an electromagnetic lock control module, an exhaust fan control module, and an audible and visual alarm module. The electromagnetic lock control module is implemented via a relay (DC12V / 5A) through the edge computing gateway GPIO, with an unlocking time of 5±1 seconds. The exhaust fan control module is started and stopped via a relay through the edge computing gateway GPIO and supports PWM speed regulation (duty cycle 0% to 100%). The audible and visual alarm module uses a red LED (brightness not less than 500cd / m²) in conjunction with a buzzer (volume not less than 85dB), which is triggered synchronously when an alarm is triggered. The interactive display components are integrated into the front of the cabinet door, including a 7-inch capacitive touchscreen, a dual-lens camera, and a fingerprint module. The touchscreen is 7 inches in size with a resolution of 1024×600, connected via DVI and USB, and runs an embedded Linux interactive program. The dual-lens camera is 2 megapixels, connected via USB, and runs a face recognition algorithm; the similarity calculation formula is as follows: Similarity = (A·B) / (‖A‖×‖B‖), where A and B are the registered feature vector and the real-time feature vector, respectively. The judgment threshold is not less than 0.85. The fingerprint module uses a semiconductor sensor, the recognition time is not greater than 0.5 seconds, the false rejection rate is not greater than 1%, and it is connected via USB.
[0012] Preferably, the consortium blockchain network adopts the Hyperledger Fabric 2.5 architecture, deployed on 5 physical servers (configured with 8-core Xeon processors, 16GB DDR4 memory, and 500GB SSD). The node configuration includes 3 Orderer nodes (using the Raft consensus algorithm, port 7050), 5 Peer nodes (corresponding to the administrator organization, laboratory organization, safety officer organization, waste organization, and audit organization, respectively, port 7051), and 1 CA node (port 7054). A global channel, the reagent channel, is created, with a block size of 128MB and a block time of 2 seconds. The data storage strategy is to store data fingerprints (hash values) and indexes on-chain, and store raw data off-chain in the InfluxDB time-series database and the IPFS distributed file system. The smart contract is written in Go, and the endorsement strategy is set to take effect upon signature by any two organization nodes.
[0013] Further preferred Hyperledger Fabric 2.5 architecture includes identity service, ordering service, peer nodes, channels, and smart contract lifecycle management components. Among them, the identity service implements decentralized identity management based on X.509 digital certificates, the ordering service adopts the Raft consensus algorithm and consists of a consensus cluster composed of 3 Orderer nodes, peer nodes maintain ledger copies and execute smart contracts, channels realize private communication and data isolation between multiple organizations, and smart contract lifecycle management supports four-stage deployment of contracts: packaging, installation, approval, and submission. For laboratory reagent management scenarios, the consortium blockchain network has made the following adaptive improvements based on the standard architecture: Light Node Client Adaptation: Deploy the Fabric Gateway SDK light client in the edge computing gateway, retain transaction signing, status query and event listening functions, communicate with cloud peer nodes through TLS two-way authentication, reduce edge-side memory consumption, and adapt to edge computing gateway hardware constraints. Offline event caching and consensus mechanism: A ring signature cache queue with a capacity of no less than 1,000 records is set up locally on the edge computing gateway. When the network is interrupted, the event is stored locally with an ECDSA signature and timestamp. After the network is restored, the events are retransmitted in batches in chronological order. The smart contract writes the offline signature into the ledger after verifying its validity. Enhanced Private Data Set: Define a private data set within the channel. For the original hazard level field of highly toxic reagents, access is restricted to peer nodes of the safety officer organization and the audit organization. Other nodes can only see the hash value, achieving a balance between federation sharing and privacy protection.
[0014] Preferably, the consortium blockchain network deploys three types of smart contracts: reagent lifecycle management contract, security risk warning contract, and hierarchical access control contract. These three types of smart contracts form a closed-loop control logic through on-chain calls. The reagent lifecycle management contract defines the following data structure: unique reagent ID (generated based on SHA-256 algorithm, 32 bytes), RFID-EPC (96 bits), name, CAS number, batch number, specifications, production date, expiration date, storage conditions (including upper and lower temperature limits, light protection / explosion protection Boolean value), hazard category (1-ordinary, 2-flammable, 3-corrosive, 4-toxic, 5-strong oxidizing), incompatibility list (hazard category array), status (created / in stock / issued / expired / discarded), location (cabinet number-layer-unit), creation time and update time; methods include reagent creation, location update, requisition event, return event, expiration update, disposal, and multi-condition query. The transaction hash calculation formula is: transaction hash = SHA-256(reagent ID‖event type‖timestamp‖operator ID); The safety risk warning contract defines the following data structure: Warning ID, Warning Type (Incompatibility / Temperature Exceeding Limit / VOC Exceeding Limit / Timeout / Expiration), Warning Level (Warning / Critical), Associated Reagent ID, Trigger Time, Location, Person in Charge, Handling Status, and Warning Details. Methods include generating warnings, handling warnings, unresolved queries, and historical tracing. The leak location formula is: Leakage element = max(RSSI1,RSSI2,...,RSSI) n ) In the formula, RSSI n This represents the received signal strength indicator value of the tag received by the nth UHF directional antenna, in dBm, and typically ranges from -80dBm (long distance / weak signal) to -30dBm (short distance / strong signal). n represents the total number of UHF directional antennas in the smart storage cabinet, which is equal to the number of storage units (in this embodiment, 4 layers × 4 units = 16 antennas). max() represents the maximum value function. The larger the RSSI value, the closer the tag is to the corresponding antenna.
[0015] The hierarchical access control contract defines role enumeration: system administrator, laboratory administrator, experimenter, safety officer, and waste disposal specialist. The permission mapping rule is that experimenters can only use reagents with a hazard level of no more than 3. The verification formula is: permission passed = role matching ∩ hazard level ≤ user limit ∩ user status normal.
[0016] Preferably, the handheld RFID terminal uses a Chainway C72 or an equivalent industrial-grade PDA, runs Android 11, and is equipped with an octa-core CPU, 4GB of RAM, and 64GB of storage; the RFID module operates in the UHF band, with a reading distance of 5 to 7 meters, and supports tag writing and reading; peripherals include a 13-megapixel camera, an NFC module, 4G / Wi-Fi, and Bluetooth 5.0; the APP functions cover inventory entry, tag writing, inventory comparison, waste registration, photo hash generation, and on-chain transaction initiation; data encryption uses the AES-256 algorithm, and communication uses the TLS 1.3 protocol.
[0017] The application of the above-mentioned blockchain and RFID-based experimental reagent lifecycle traceability and risk control system follows these steps: Step 1: Deployment of the consortium blockchain network, node registration, and system initialization; Step 2: Reagent warehousing and filing, label binding, and data fingerprinting on the blockchain; Step 3: Pre-emptive risk control of reagent storage location and incompatibility; Step 4: Real-time monitoring and dynamic hierarchical early warning of environmental parameters; Step 5: Reagent requisition and return, access control and timeout management; Step 6: Reagent expiration warning, access freeze, and closed-loop disposal; Step 7: Offline autonomous operation, data retransmission and collaborative traceability.
[0018] Preferably, step 1 specifically includes: deploying the Hyperledger Fabric 2.5 network, generating the genesis block and channel configuration, having the CA node issue an X.509 certificate, completing node TLS registration, deploying three types of smart contracts and initializing parameters. Among these, the compatibility rules include mutual repulsion between acids and bases, mutual repulsion between oxidants and reducing agents, and mutual repulsion between flammable materials and strong oxidants. The basic temperature threshold is set to 20℃ to 25℃, the basic timeout duration is set to 2 hours, and the face similarity threshold is set to 0.85. The face and fingerprint information of the administrator and experimenters are recorded, and the feature hash is backed up on the blockchain.
[0019] Preferably, step 2 specifically includes: the administrator uses a handheld RFID terminal to scan a blank label and enters the reagent name, CAS number, batch number, specifications, production date, expiration date, storage conditions, hazard category, and incompatibilities; the handheld RFID terminal automatically generates a unique reagent ID and calculates the SHA-256 hash value: hash value = SHA-256 (reagent information plaintext); the reagent lifecycle management contract is called to create the reagent, the hash value and key fields are uploaded to the blockchain, the EPC, expiration date, and hazard category are written into the RFID tag, the complete information is encrypted with AES and stored locally on the terminal, and synchronized to the edge computing gateway.
[0020] Preferably, step 3 specifically includes: after the reagent is placed in the storage unit, the RFID reader polls and identifies the EPC, and the edge computing gateway performs compatibility matching through the RSSI positioning unit. Contraindication determination = (New reagent category ∩ Surrounding contraindication categories) ≠
[0021] If a forbidden combination is detected, the buzzer and red indicator light will be triggered to alarm, the electromagnetic lock will be locked, the touch screen will display conflict information, and an early warning will be generated and uploaded to the blockchain. If no forbidden combination is detected, the location will be updated on the blockchain and the lock will be released.
[0022] Preferably, step 4 specifically includes: adjusting the dynamic temperature threshold in reverse according to the hazard level (the higher the hazard level, the stricter the threshold), and the calculation formula is: upper limit = 25 × (1 - 0.1 × (hazard level - 1)). If the temperature exceeds the standard for 10 consecutive minutes, a temperature warning will be generated. VOC graded control: when the concentration exceeds 30 ppm, a warning will be activated and the exhaust fan will be turned on automatically. When it exceeds 80 ppm, a VOC leak warning will be generated and the leak location algorithm will be executed to trace the source. When the smoke sensor is triggered, the highest level warning will be generated and the fire protection system will be linked.
[0023] The leakage localization algorithm is based on the principle of near-field localization using signal strength. Its core assumption is that within a sealed storage unit, the antenna receives the highest RSSI value when it is closest to the VOC leakage source (reagent bottle) and the UHF antenna embedded in the bottom surface of the partition. The algorithm execution flow is as follows: Reference calibration: During system initialization, standard tags are placed in each storage unit to record the reference RSSI matrix R0 (16×16 matrix) of each antenna to each unit, eliminating antenna gain differences and multipath effects; Real-time monitoring: When the VOC concentration exceeds the 80ppm threshold, the leak scanning mode is triggered. The RFID reader completes polling of 16 antennas within 500ms to obtain the current RSSI vector R = [RSSI1, RSSI2, ..., RSSI...]. 16 ]; Difference calculation: Calculate the relative signal strength ΔRSSIᵢ = RSSIi - R oi (Subtract the baseline value) to eliminate background environmental interference; Location determination: Take the antenna number corresponding to the maximum value of ΔRSSI, map it to the memory cell coordinates (layer-cell), and that is the location of the leakage source; Confidence assessment: If the difference between the maximum ΔRSSI and the second largest value is less than 3dB, it is marked as a "suspected leak area" and triggers a joint investigation of adjacent units; if the difference is ≥3dB, it is marked as "precise location".
[0024] Enhanced source tracing: The location results are linked to the reagent lifecycle contract, automatically extracting the CAS number, hazard category and MSDS information of all reagents in the leak unit, generating structured early warning details including the characteristics of the leaked substance, emergency response plan and diffusion risk assessment, and pushing them to the safety officer's terminal.
[0025] Preferably, step 5 specifically includes: the experimenter authenticates via face or fingerprint with a similarity of not less than 0.85; the edge computing gateway calls the permission contract to perform triple verification: role matching verification, danger level limit verification, and user status verification; after the verification is passed, the electromagnetic lock unlocks for 5 seconds, the experimenter takes out the reagent, and after the RFID reader tag disappears, the gateway generates a requisition event and uploads it to the blockchain, and at the same time starts the timeout timer. The timeout threshold is adjusted in reverse according to the danger level (the higher the danger level, the shorter the allowed usage time): timeout = 2 × (1 - 0.2 × danger level); if the reagent is not returned within the timeout period, an early warning push is generated; when the reagent is returned, the RFID reader tag is reset, the gateway generates a return event and uploads it to the blockchain, and the timer is terminated.
[0026] Triple verification includes: The first layer: Role matching verification, which verifies whether the mapping relationship between the operator's role and the operation type is valid, that is, whether the correspondence between the operation type and the role enumeration meets the preset rules. The experimenter role is only allowed to perform the requisition and return operations, and the waste specialist is only allowed to perform the waste disposal operation.
[0027] The second layer: hazard level limit verification, which verifies whether the hazard level of the reagent does not exceed the authorized limit of the operator's role. The specific mapping rules are as follows: the lab technician can use reagents with a hazard level of no more than 3, the lab administrator can use reagents with a hazard level of no more than 4, and the safety officer and system administrator can use reagents of all hazard levels.
[0028] The third layer: User status verification, which verifies whether the operator's account status is normal, excluding three abnormal states: expired account, frozen account, and account in training period; the user status field is stored in the permission control contract and dynamically updated by the administrator, and status change events are synchronously recorded on the blockchain for evidence storage.
[0029] The authorization approval formula is: Authorization approved = Role matching ∩ Reagent hazard level ≤ User role limit ∩ User status normal; The verification passes only when all three conditions are met simultaneously, and the electromagnetic lock is unlocked; If any condition is not met, the touch screen displays the specific reason for rejection and generates an authorization rejection event for on-chain auditing.
[0030] Preferably, step 6 specifically includes: at 2:00 AM every day, regularly traversing the reagents in the on-chain inventory and comparing their expiration dates; generating an expiration warning when the expiration date is no more than 30 days away; if the expiration date has passed, updating the status to expired and freezing the requisition permission; waste disposal specialists use handheld RFID terminals to scan tags, select disposal methods, and take photos of the packaging; after the terminal generates a photo hash, it calls the contract to update the status to waste, uploads the hash value to the on-chain, and completes the closed loop of the entire life cycle.
[0031] Preferably, step 7 specifically includes: when the network is interrupted, the gateway switches to offline autonomous mode and caches signed events; after the network is restored, the data is retransmitted in batches according to the time sequence and on-chain consensus is completed; multi-cabinet data synchronization and cross-cabinet approval traceability are supported; during auditing, the entire chain data can be retrieved and an evidence chain can be generated by entering EPC or unique ID.
[0032] The beneficial effects of this invention are as follows: 1. Regarding data trustworthiness, this invention adopts the SHA-256 hash algorithm combined with the consortium blockchain consensus mechanism to store the entire process of events, risk logs and permission verification records on the blockchain for evidence preservation, and the edge computing gateway directly performs ECDSA signing, which technically eliminates the possibility of manual tampering and solves the problems of easy data tampering and lack of trustworthy traceability in the existing technology.
[0033] 2. Regarding the risk prevention and control model, this invention uses a built-in incompatibility matching algorithm, environmental dynamic threshold algorithm, and leakage location algorithm to intercept incompatible combinations the instant the reagent is stored. It also adjusts the environmental monitoring thresholds in reverse according to the reagent's hazard level (the higher the hazard level, the stricter the temperature and VOC thresholds), thereby achieving graded handling of environmental hazards. This transforms the risk management model from passive post-event handling to proactive pre-event prevention, solving the problems of passive and static risk management and insufficient pre-emptive prevention capabilities in existing technologies.
[0034] 3. Regarding the completeness of contract logic, the reagent lifecycle management contract, security risk warning contract, and hierarchical access control contract deployed in this invention cover the entire lifecycle status flow of reagents, the closed-loop management of risk events, and the full-dimensional verification of permissions. Through the triple verification mechanism of role matching ∩ danger level ≤ user limit ∩ normal user status, it accurately intercepts unauthorized requisition behavior, solving the problems of blank smart contract functions and missing core control logic in existing technologies.
[0035] 4. In terms of system collaboration and offline autonomy, the edge computing gateway of the present invention has local risk decision-making capabilities. When the network is interrupted, it can cache signed events and automatically retransmit them in batches and complete consensus synchronization after recovery. It also supports multi-cabinet data synchronization and cross-cabinet approval traceability, which solves the problems of edge and blockchain separation, weak offline autonomy capabilities and multi-source data silos in the prior art.
[0036] 5. Regarding feasibility, this invention specifies the hardware model (such as Rockchip RK3568, ImpinjR2000, SHT30 / AHT20, SGP30 / MP503, etc.), interface protocol, algorithm formula, contract fields, and implementation steps. The selected hardware are all mature products on the market with a stable supply chain. Those skilled in the art can directly reproduce the system based on this solution, which solves the problems of vague details and poor feasibility in the prior art. Attached Figure Description
[0037] Figure 1 This is a schematic diagram of the structure of the present invention; Figure 2 This is a schematic diagram of the application process of the present invention. Detailed Implementation
[0038] The present invention will be further described below with reference to the embodiments and accompanying drawings, but is not limited thereto.
[0039] Example 1: like Figure 1 As shown, this embodiment provides a blockchain and RFID-based experimental reagent lifecycle traceability and risk control system, including an intelligent storage cabinet, a consortium blockchain network, and a handheld RFID terminal, wherein: Intelligent storage cabinets serve as edge sensing and decision-making nodes, used for the physical storage of reagents, environmental data acquisition, local risk decision-making, and execution control. Consortium blockchain networks serve as distributed trusted ledgers for data fingerprinting, smart contract execution, and multi-node collaborative consensus. Handheld RFID terminals serve as mobile operation terminals for field warehousing, inventory counting, and waste registration. The intelligent storage cabinet, the consortium blockchain network, and the handheld RFID terminal communicate encryptedly through a local area network or 5G network to achieve data exchange, command transmission, and status synchronization.
[0040] The intelligent storage cabinet includes a cabinet body, RFID identification components, an environmental sensor array, an edge computing gateway, execution control components, and display and interaction components. The cabinet body is made of 1.5mm thick cold-rolled steel plate or 304 stainless steel through an integrated bending process. The surface of the cabinet body is coated with a 20μm to 25μm thick antistatic epoxy coating, with a surface resistance controlled at 10 ohms. 6Ω to 10 9 Within the Ω range; the cabinet interior is divided by 4 layers of horizontally adjustable partitions, with the partition spacing adjustable from 150mm to 350mm; each partition is divided into 3 to 4 independent storage units by longitudinal stainless steel strips, with unit net dimensions of 300mm wide × 450mm deep × 300mm high; a 120mm diameter ventilation opening is opened at the bottom of the cabinet back panel, equipped with a miniature axial flow exhaust fan with an air volume of 50±5m³ / h and a wind pressure of not less than 80Pa, and a honeycomb activated carbon filter (activated carbon filling amount not less than 500g); grounding bolts are provided at the four corners of the cabinet, with a grounding resistance of not more than 4Ω, and the entire cabinet reaches the IP54 protection level; a cabinet door is installed on one side of the cabinet, and the cabinet door adopts a double-layer hollow structure, with an outer layer of 1.5mm steel plate and an inner layer of 1.2mm steel plate, and 50mm thick aluminum silicate fireproof cotton filling in between; the cabinet door is equipped with a DC12V explosion-proof electromagnetic lock, with a lock body pulling force of not less than 1500N, and is used in conjunction with a door magnetic switch to detect the cabinet door opening status; The RFID identification component includes a UHF directional antenna, an RFID reader, and adapter tags. Each partition has a 20mm diameter circular hole at the center of its bottom surface to embed one UHF directional antenna. The antenna gain is 8dBi, the horizontal beamwidth is 70°, and the vertical beamwidth is 50°. The antenna radiation field is confined within the corresponding storage unit, and the crosstalk suppression rate is no less than 95%. All antennas are connected to the integrated RFID reader at the top of the cabinet via a low-loss coaxial cable (no more than 2m long, 50Ω impedance) and an SMA connector. The RFID reader is a fixed reader based on the Impinj R2000 chip (such as the Impinj Speedway R420 or an equivalent solution), supporting 4 / 8 / 16-channel time-division polling, with a transmit power of 10dBm. Continuously adjustable within a range of 30dBm (in 1dBm steps), with a reading rate of no less than 200 tags / second, and supports Received Signal Strength Indicator (RSSI) analysis; the RFID reader communication interface includes one RS485 (baud rate 9600bps) and one 100Mbps Ethernet, communicating with the edge computing gateway via RS485 bus or Ethernet. The adapter tags are selected according to the characteristics of the reagents: room temperature reagents use flexible anti-metal tags (size 50mm×30mm, operating frequency 915MHz), -40℃ to +85℃ frozen reagents use low temperature resistant ceramic tags, and concentrated acid / strong alkali reagents use PET-encapsulated corrosion-resistant tags. The adapter tag has a 96-bit EPC area and a 512-bit user area, with a writing distance of no less than 5cm and a reading distance of no less than 15cm. The environmental sensor array includes temperature and humidity sensors, VOC sensors, and smoke sensors. One digital temperature and humidity sensor (model SHT30 or AHT20) is fixed in the middle of each side wall inside the cabinet. The measurement range is -40℃ to +85℃ for temperature and 0%RH to 100%RH for humidity, with an accuracy of ±0.3℃ for temperature and ±2%RH for humidity. It uses I2C communication (addresses 0x40 to 0x47). The temperature and humidity sensors are extended via a PCA9548 I2C multiplexer and then connected to an edge computing gateway. One VOC sensor (model SGP30 or MP503) is fixed at each of the top and bottom diagonals of the cabinet. The SGP30 has a TVOC measurement range of 0 to 60. The MP503 has a VOC measurement range of 1 to 50 ppm and a response time of less than 5 seconds. It uses UART or I2C communication and connects to the gateway via the UART or I2C interface. A photoelectric smoke sensor (such as JTY-GD-ZM992 or equivalent) is fixed at the top of the cabinet. The operating voltage is DC9V to DC24V, and the switch signal is connected to the gateway GPIO. The data from the temperature and humidity sensor, VOC sensor and smoke sensor use Modbus RTU or MQTT protocol, with a collection period of 5 seconds. The data is uploaded to the edge computing gateway via Modbus RTU (slave addresses 1 to 8) or MQTT protocol (QoS=1). The edge computing gateway serves as the core decision-making and communication hub of the intelligent storage cabinet. Its hardware utilizes a Rockchip RK3568 quad-core processor (Cortex-A55 architecture, 2.0GHz), 4GB LPDDR4 memory, 32GB eMMC storage, and integrates a neural network processing unit (NPU) with 1.0 TOPS computing power. Gateway peripherals include two Gigabit Ethernet ports, four USB 3.0 ports, four RS485 ports, eight GPIO ports (DC12V / 1A), and one DC12V power input. The gateway software runs Ubuntu 20.04LTS, deployed using Docker 24.0.6 containerization, and includes four core services: RFID read / write service (multi-threaded polling, thread count equals channel count, parsing EPC and RSSI, identifying tag appearance / disappearance events, event generation cycle 200ms). Sensor data acquisition service, 5-second acquisition cycle, uses median filtering with a window width of 5 combined with Kalman filtering for noise reduction. The filtering formula is as follows: ,in, Z is the filtered value at time k. k K is the original measured value. k The Kalman gain ranges from 0.1 to 0.5. A blockchain light node client, based on FabricGatewaySDK, employing TLS two-way authentication and ECDSA transaction signature algorithm; The local risk decision engine, written in C++, performs compatibility matching, leak location, timeout timing, and threshold judgment. When the network is interrupted, cached events are accompanied by timestamps and ECDSA signatures, with a cache capacity of no less than 1,000 entries. After the network is restored, the data is re-uploaded in batches. The services communicate with each other via shared memory. When the network is interrupted, the decision engine generates an event cache with an ECDSA signature and timestamp, which is then transmitted to the blockchain in batches after the network is restored.
[0041] The execution control components include an electromagnetic lock control module, an exhaust fan control module, and an audible and visual alarm module. The electromagnetic lock control module is implemented via a relay (DC12V / 5A) through the edge computing gateway GPIO, with an unlocking time of 5±1 seconds. The exhaust fan control module is started and stopped via a relay through the edge computing gateway GPIO and supports PWM speed regulation (duty cycle 0% to 100%). The audible and visual alarm module uses a red LED (brightness not less than 500cd / m²) in conjunction with a buzzer (volume not less than 85dB), which is triggered synchronously when an alarm is triggered. The interactive display components are integrated into the front of the cabinet door, including a 7-inch capacitive touchscreen, a dual-lens camera, and a fingerprint module. The touchscreen is 7 inches in size with a resolution of 1024×600, connected via DVI and USB, and runs an embedded Linux interactive program. The dual-lens camera is 2 megapixels, connected via USB, and runs a face recognition algorithm; the similarity calculation formula is as follows: Similarity = (A·B) / (‖A‖×‖B‖), where A and B are the registered feature vector and the real-time feature vector, respectively. The judgment threshold is not less than 0.85. The fingerprint module uses a semiconductor sensor, the recognition time is not greater than 0.5 seconds, the false rejection rate is not greater than 1%, and it is connected via USB.
[0042] The consortium blockchain network adopts the Hyperledger Fabric 2.5 architecture and is deployed on 5 physical servers (configured with 8-core Xeon processors, 16GB DDR4 memory, and 500GB SSD). The node configuration includes 3 Orderer nodes (using the Raft consensus algorithm, port 7050), 5 Peer nodes (corresponding to the administrator organization, laboratory organization, safety officer organization, waste organization, and audit organization, respectively, port 7051), and 1 CA node (port 7054). A global channel, the reagent channel, is created. The block size is 128MB, the block time is 2 seconds, and the data storage strategy is to store data fingerprints (hash values) and indexes on-chain, and store raw data off-chain in the InfluxDB time-series database and the IPFS distributed file system. The smart contract is written in Go, and the endorsement strategy is set to take effect upon signature by any two organization nodes.
[0043] The Hyperledger Fabric 2.5 architecture includes an identity service, an ordering service, peer nodes, channels, and smart contract lifecycle management components. The identity service implements decentralized identity management based on X.509 digital certificates. The ordering service adopts the Raft consensus algorithm and consists of a consensus cluster composed of three Orderer nodes. Peer nodes maintain ledger copies and execute smart contracts. Channels enable private communication and data isolation between multiple organizations. The smart contract lifecycle management supports four-stage deployment of contracts: packaging, installation, approval, and submission. For laboratory reagent management scenarios, the consortium blockchain network has made the following adaptive improvements based on the standard architecture: Light Node Client Adaptation: Deploy the Fabric Gateway SDK light client in the edge computing gateway, retain transaction signing, status query and event listening functions, communicate with cloud peer nodes through TLS two-way authentication, reduce edge-side memory consumption, and adapt to edge computing gateway hardware constraints. Offline event caching and consensus mechanism: A ring signature cache queue with a capacity of no less than 1,000 records is set up locally on the edge computing gateway. When the network is interrupted, the event is stored locally with an ECDSA signature and timestamp. After the network is restored, the events are retransmitted in batches in chronological order. The smart contract writes the offline signature into the ledger after verifying its validity. Enhanced Private Data Set: Define a private data set within the channel. For the original hazard level field of highly toxic reagents, access is restricted to peer nodes of the safety officer organization and the audit organization. Other nodes can only see the hash value, achieving a balance between federation sharing and privacy protection.
[0044] The reason for deploying 5 physical servers is as follows: the Raft consensus algorithm requires an odd number of Orderer nodes to achieve majority decision-making; this invention sets up 3 Orderer nodes. Meanwhile, each of the 5 participating organizations needs 1 Peer node to ensure the independence of ledger replicas. To balance cost and availability, Orderer and Peer reuse deployment is adopted, with 3 servers each hosting 1 Orderer node and 1 Peer node, and the remaining 2 servers each hosting 1 Peer node. An additional 1 independently deployed CA node is also provided, for a total of 5 physical servers. The division of server functions is shown in the table below: Server-1 Orderer-1 + Peer-1 Administrator organization 7050 / 7051 / 7054 Server-2 Orderer-2 + Peer-2 Laboratory organization 7050 / 7051 Server-3 Orderer-3 + Peer-3 Safety Officer Organization 7050 / 7051 Server-4 Peer-4 Waste organization 7051 Server-5 Peer-5 + CA Node Audit organization + certificate service 7051 / 7054 In terms of fault tolerance design, Raft consensus can tolerate the failure of one Orderer node; when any two servers fail, the remaining three Peer nodes still meet the endorsement policy requirements, ensuring system availability.
[0045] The global channel (reagent-channel) creation process is as follows: The cryptogen tool is used to generate the MSP certificate directory structure for five organizations; the configtxgen tool is used to generate the system channel genesis block and application channel configuration transactions; the administrator submits the channel creation transaction to the Orderer service; each organization's peer node executes the join-channel command and synchronizes the ledger; finally, anchor nodes for each organization are set up, and the Gossip protocol is enabled for data distribution within the organization; the block size is 128MB, and the block time is 2 seconds; the data storage strategy is to store data fingerprints (hash values) and indexes on-chain, and store raw off-chain data in the InfluxDB time-series database and the IPFS distributed file system; the smart contract is written in Go, and the endorsement strategy is set to take effect upon signature by any two organization nodes.
[0046] The consortium blockchain network deploys three types of smart contracts: reagent lifecycle management contract, security risk warning contract, and hierarchical access control contract. These three smart contracts form a closed-loop control logic through on-chain calls. The reagent lifecycle management contract defines the following data structure: unique reagent ID (generated based on SHA-256 algorithm, 32 bytes), RFID-EPC (96 bits), name, CAS number, batch number, specifications, production date, expiration date, storage conditions (including upper and lower temperature limits, light protection / explosion protection Boolean value), hazard category (1-ordinary, 2-flammable, 3-corrosive, 4-toxic, 5-strong oxidizing), incompatibility list (hazard category array), status (created / in stock / issued / expired / discarded), location (cabinet number-layer-unit), creation time and update time; methods include reagent creation, location update, requisition event, return event, expiration update, disposal, and multi-condition query. The transaction hash calculation formula is: transaction hash = SHA-256(reagent ID‖event type‖timestamp‖operator ID); The safety risk warning contract defines the following data structure: Warning ID, Warning Type (Incompatibility / Temperature Exceeding Limit / VOC Exceeding Limit / Timeout / Expiration), Warning Level (Warning / Critical), Associated Reagent ID, Trigger Time, Location, Person in Charge, Handling Status, and Warning Details. Methods include generating warnings, handling warnings, unresolved queries, and historical tracing. The leak location formula is: Leakage element = max(RSSI1,RSSI2,...,RSSI) n ) In the formula, RSSI n This represents the received signal strength indicator value of the tag received by the nth UHF directional antenna, in dBm, and typically ranges from -80dBm (long distance / weak signal) to -30dBm (short distance / strong signal). n represents the total number of UHF directional antennas in the smart storage cabinet, which is equal to the number of storage units (in this invention, 4 layers × 4 units = 16 antennas). max() represents the maximum value function. The larger the RSSI value, the closer the tag is to the corresponding antenna.
[0047] The hierarchical access control contract defines role enumeration: system administrator, laboratory administrator, experimenter, safety officer, and waste disposal specialist. The permission mapping rule is that experimenters can only use reagents with a hazard level of no more than 3. The verification formula is: permission passed = role matching ∩ hazard level ≤ user limit ∩ user status normal.
[0048] Preferably, the handheld RFID terminal uses a Chainway C72 or an equivalent industrial-grade PDA, runs Android 11, and is equipped with an octa-core CPU, 4GB of RAM, and 64GB of storage; the RFID module operates in the UHF band, with a reading distance of 5 to 7 meters, and supports tag writing and reading; peripherals include a 13-megapixel camera, an NFC module, 4G / Wi-Fi, and Bluetooth 5.0; the APP functions cover inventory entry, tag writing, inventory comparison, waste registration, photo hash generation, and on-chain transaction initiation; data encryption uses the AES-256 algorithm, and communication uses the TLS 1.3 protocol.
[0049] In this embodiment, the core algorithms are all integrated into the edge computing gateway or smart contract, and the formula parameters are calibrated experimentally and optimized using historical data training to ensure the accuracy of risk control.
[0050] Algorithm for constructing reagent compatibility topology graph: The system maintains an undirected graph G=(V,E), where the vertex set V represents the reagents currently in stock, and the edge set E represents compatibility relations (no edges indicate taboos). When a new reagent is added to the stock, the following steps are executed: Extract the incompatibilities list (hazard category array) of the new reagent and generate its incompatibilities set F; Iterate through all reagents in the surrounding storage units and extract the hazard category set {G1, G2, ..., G...} for each reagent. m}; Calculate the tabu intersection: Conflict = F∩(∪G) i ); If Conflict ≠ If so, the storage unit is marked as a conflict hotspot in the topology diagram, triggering an alarm. If Conflict= If the new reagent is added to the vertex set V, an edge connection is established between it and its surrounding compatible reagents, and the topology graph is updated. The topology map is dynamically updated as the reagent status changes, and it supports the visualization of the compatibility status of each storage unit, providing data support for optimizing the laboratory safety layout.
[0051] NPU-based leakage propagation prediction model: A lightweight leak propagation prediction network (using MobileNetV3-SSD architecture, parameter size <5MB, inference latency <100ms) was deployed using the 1.0 TOPS NPU integrated in the RK3568. The model input is: Leakage source location (layer-unit coordinates); Current VOC concentration gradient (difference between top and bottom sensors); Exhaust fan operating status (wind speed, wind direction); Cabinet door open / close status (affects airflow pattern); The model output is: VOC concentration spatial distribution prediction map for the next 5 minutes; List of affected high-risk reagents (sorted by distance and compatibility); Recommended priority rating.
[0052] The model runs in real time at the edge, providing safety officers with "predictive action suggestions" and elevating risk management from "post-event response" to "pre-event prediction." The model's training data comes from sensor time-series data and simulation data from historical leakage events, and is updated quarterly across multiple laboratory nodes through a federated learning framework to protect the data privacy of each node.
[0053] The hash-based evidence storage algorithm is used for the trusted anchoring of reagent events and raw data. The formula is: Transaction hash = SHA-256(Reagent ID | Event Type | Timestamp | Operator ID) This algorithm is integrated into handheld terminals and smart contracts. The hash value is recorded on the blockchain along with the transaction, serving as the sole credential for verifying data authenticity. This data fingerprint mechanism is not simply data redundancy, but rather aims to resolve the contradiction between the limited on-chain storage capacity of the blockchain and the need for verifying the integrity of the original off-chain data: by recording the SHA-256 digest of the original information on the blockchain, it ensures the lightweight nature of the on-chain data while making it possible to detect any tampering with the original off-chain data by recalculating the hash and comparing it with the on-chain evidence.
[0054] Incompatibility matching algorithms are used for pre-storage risk interception of reagents. The formula is: Contraindication determination result = (New reagent hazard category ∩ Surrounding reagent contraindication category) ≠ ∅ The algorithm has a built-in incompatibility rule library, which pre-stores incompatible combinations such as acids and bases, oxidants and reducing agents, and flammable substances and strong oxidants, and verifies the risk of reagent coexistence in real time.
[0055] The environmental dynamic threshold algorithm is used to adapt the early warning standards for reagent hazard levels (the higher the hazard level, the stricter the threshold). The formula is: Temperature threshold upper limit = basic upper limit × (1 - 0.1 × (hazard level - 1)) To achieve precise control at different levels.
[0056] The storage unit where the leaked reagent is located is determined by the maximum signal strength of each antenna.
[0057] The hierarchical access control contract defines roles including system administrator, lab administrator, experimenter, safety officer, and waste disposal specialist. The built-in permission verification formula is: Permission granted = Role matching ∩ Reagent hazard level ≤ User limit ∩ User status normal Implement triple verification of role, danger level, and user status.
[0058] Example 2: This embodiment provides an application of a blockchain and RFID-based experimental reagent lifecycle traceability and risk control system. The system is as described in Embodiment 1, and the steps are as follows: After the system is powered on, the consortium blockchain nodes start up and complete consensus synchronization. The smart storage cabinet performs hardware self-tests, and the environmental sensor array, RFID reader, and edge computing gateway enter the ready state. The administrator initializes role permission mapping in the hierarchical access control contract through the backend management terminal: the experimenter can only use reagents with a hazard level of no more than 3, the safety officer is responsible for early warning and disposal, and the waste disposal specialist performs disposal operations. The system initialization is completed by entering the incompatibility rules, algorithm parameters, and facial / fingerprint feature hashes.
[0059] After the reagents arrive, the administrator uses a handheld RFID terminal to scan blank labels and enter the reagent name, CAS number, batch number, expiration date, storage conditions, hazard level, and incompatibilities. The terminal automatically generates a unique ID for the reagent, calls a hash algorithm to generate a data hash, initiates a reagent transaction, and uploads the hash value and key fields to the consortium blockchain. Simultaneously, simplified information is written to the RFID tag, and complete information is encrypted and uploaded to the local database, completing the "one item, one code, one fingerprint" binding relationship. After the administrator places the tagged reagent into the designated unit of the smart storage cabinet, the RFID reader identifies the tag, the edge computing gateway automatically updates the reagent location and calls the contract to upload it to the blockchain, and the reagent status is initialized to "in stock".
[0060] The moment the reagent is stored, the edge computing gateway executes a mismatch matching algorithm to compare the new reagent with the dangerous categories of surrounding reagents. If a mismatch is found, the gateway immediately triggers a buzzer alarm, illuminates a red indicator light, locks the electromagnetic lock, displays conflict information on the touchscreen, and simultaneously calls the security risk warning contract to generate a "mismatch" warning on the blockchain. The warning is automatically lifted after the administrator adjusts the reagent's position.
[0061] During storage, the sensor collects temperature, humidity and VOC data in real time. After Kalman filtering, the gateway executes an environmental dynamic threshold algorithm to determine the risk according to the reagent's hazard level: if the temperature exceeds the standard for 10 consecutive minutes, a "temperature exceeds the standard" warning is generated; if the VOC concentration exceeds 30 ppm, the exhaust fan is automatically started; if it exceeds 80 ppm, a "VOC leak" warning is generated and a leak location algorithm is executed to trace the source. The warning is pushed to the safety officer's terminal in real time.
[0062] The lab technician selects the requisition option on the smart storage cabinet touchscreen and completes facial or fingerprint authentication. The edge computing gateway invokes a tiered access control contract to perform triple permission verification. After successful verification, the electromagnetic lock unlocks for 5 seconds, allowing the technician to retrieve the reagent. Once the RFID reader identifies the tag and it disappears, the gateway generates a requisition event and uploads it to the blockchain, simultaneously initiating a timeout period. The timeout threshold is dynamically calculated based on the hazard level (higher hazard levels have shorter timeouts). Timeout threshold = Base duration × (110.2 × Risk level) If the reagent is not returned within the specified time, the gateway generates an "overdue return" warning and sends a notification. After the lab technician returns the reagent, the RFID tag is reset, the gateway generates a return event and uploads it to the blockchain, and the timer is terminated.
[0063] Every day at 2 AM, a scheduled task on the consortium blockchain iterates through all reagents in stock and compares their expiration dates: if the expiration date is no more than 30 days away, a "soon to expire" warning is generated; if the expiration date has passed, the contract is invoked to update the reagent status to "expired," and the lab technician's access rights are frozen. Waste disposal specialists use handheld RFID terminals to scan expired or discarded reagent tags, select a disposal method, and take a photo of the packaging; the terminal generates a photo hash, invokes the contract to update the reagent status to "discarded," and uploads the hash value to the blockchain, completing the closed loop of the reagent's entire lifecycle.
[0064] When the laboratory network is interrupted, the edge computing gateway of the smart storage cabinet automatically switches to offline mode, independently performing identity verification, prohibition checks, environmental monitoring, and cabinet door locking. All operational events and risk data are generated and cached with signatures. After the network is restored, the gateway batch-transmits data to the blockchain in chronological order to complete consensus synchronization and ensure no data loss. During security audits or incident tracing, auditors can enter the reagent's RFID-EPC or unique ID to retrieve the reagent's entire lifecycle transaction records, risk warning logs, and permission verification records from the consortium blockchain. Combined with raw data from off-chain sensors and operational images, a complete and tamper-proof chain of evidence is formed.
[0065] Example 3: This embodiment provides a collaborative working mechanism between multiple intelligent storage cabinets and a consortium blockchain network, targeting scenarios of reagent dispensing and collaborative management across multiple laboratories and buildings in large research institutes or universities. The steps are as follows: When a specific reagent is insufficient in a smart storage cabinet (cabinet A) of Laboratory A, while a smart storage cabinet (cabinet B) of Laboratory B has surplus inventory, the administrator of Laboratory A initiates a cross-cabinet transfer request through the backend terminal. This request is submitted to the consortium blockchain network as a transaction, calling the "transfer request" method in the reagent lifecycle management contract, recording the transferring cabinet number, receiving cabinet number, reagent ID, requested quantity, applicant identity, and timestamp. Since the endorsement policy requires signatures from any two organizational nodes to be effective, the nodes of Laboratory A and Laboratory B respectively endorse and sign the transaction to ensure that the transfer request is confirmed by both parties.
[0066] After receiving the allocation notification on the touchscreen, the administrator of Lab B performs local access verification and facial recognition, opens the cabinet door, and retrieves the target reagent. When the RFID reader tag disappears, the edge computing gateway of Cabinet B generates a local retrieval event and caches it, while simultaneously broadcasting the event to the consortium blockchain via the local area network. During reagent transfer, the handheld RFID terminal continuously reads the tag RSSI, records the transfer path and timestamp, and uploads the data to the edge computing gateway after AES encryption.
[0067] After the reagents are delivered to Laboratory A, the administrator scans the tag using a handheld terminal. The RFID reader in cabinet A recognizes the tag, and the edge computing gateway calls the contract to execute the "cross-cabinet entry" method, updating the reagent location to the corresponding storage unit in cabinet A and triggering a mismatch matching algorithm for local risk control verification. If the verification passes, the status remains "in stock" and an entry event is generated and uploaded to the blockchain; if a mismatch exists, the cabinet is locked and an early warning process is executed, the entry is rejected, and the administrator is notified to adjust the storage location.
[0068] The consortium blockchain's audit nodes synchronize all the aforementioned transactions in real time, forming a complete traceability chain across cabinets and laboratories. Auditors can enter the reagent's unique ID to query the reagent's complete transfer records, environmental exposure history, and operator identities between different storage cabinets, achieving trusted collaboration and precise traceability across regions and institutions, and providing an atomicity guarantee mechanism for cross-cabinet transfers. Cross-cabinet transfers involve state changes between two independent storage cabinets (cabinet B "out" → cabinet A "in"), requiring consistency of the chained state. This embodiment uses the Saga pattern to implement distributed transactions. Forward operation: Cabinet B generates a "transfer outbound" event, changes its status to "in transit", and locks it on the blockchain; Compensation operation: If the transfer timeout exceeds the preset threshold or the cabinet A's inbound verification fails, a compensation transaction is triggered, the cabinet B's status is rolled back to "in stock", and the lock is released; Idempotency guarantee: Each transfer transaction generates a globally unique transfer ID, which is embedded in the TID area of the RFID tag to prevent duplicate entries. Eventual consistency: By leveraging the immutability of blockchain, the transfer ID is ensured to be unique across the entire network, and audit nodes can verify the integrity of the transfer loop.
[0069] This mechanism solves the problem of inconsistent status in multi-cabinet collaboration and avoids the management blind spot of "reagents being lost during transportation".
[0070] Example 4: This embodiment provides the local decision-making logic of the edge computing gateway in offline mode and the conflict arbitration mechanism after recovery. It elaborates on the system's offline autonomy and disaster recovery mechanism for extreme scenarios such as laboratory network interruption, blockchain node failure, or regional network outage. The steps are as follows: When the edge computing gateway of the smart storage cabinet detects that the TCP long connection with the consortium blockchain network has been lost for more than 30 seconds, it automatically switches to offline autonomous mode. In this mode, the local risk decision engine independently undertakes all control logic: identity authentication relies on the locally stored facial feature vector and fingerprint template, and is completed through cosine similarity algorithm and fingerprint comparison; when reagents are stored, the incompatibility matching algorithm is executed, and the intersection operation is performed by calling the surrounding reagent hazard categories stored in the local SQLite database; environmental monitoring performs discrimination based on the locally cached dynamic threshold parameters; all control commands (electromagnetic lock, exhaust fan, audible and visual alarm) are directly driven by local GPIO.
[0071] All events generated offline (including requisition, return, alerts, compatibility conflicts, and environmental exceedances) are written to a local circular cache queue in chronological order. Each record includes the event type, reagent ID, operator ID, timestamp, original sensor value, and a local ECDSA private key signature. The cache capacity is designed to be no less than 1000 records, and a FIFO strategy is used for management. When the cache reaches its capacity limit, the earliest event record is digested locally and then transferred to the eMMC persistent storage area to ensure that critical evidence is not lost.
[0072] After the network is restored, the edge computing gateway first sends a "state synchronization request" to the blockchain network to obtain the latest block height on the chain and the local reagent state hash. It then compares the state change summary during the offline period to identify potential conflicts. If there is no conflict (i.e., no other node on the chain has performed a state change on the reagent during the offline period), cached transactions are submitted in batches in chronological order. Each transaction is accompanied by a signature and timestamp generated during the offline period. The smart contract verifies the validity of the signature and writes it into the ledger. If there is a conflict (e.g., a reagent was marked as expired by a node on the chain during the offline period, but a usage event occurred locally), a "conflict arbitration" process is triggered: the on-chain state is given priority (because the on-chain state is confirmed by consensus), and the local abnormal event is marked as "pending audit" and pushed to the security officer terminal for manual review.
[0073] In multi-cabinet scenarios, each cabinet operates independently during offline periods. After network recovery, offline event summaries are exchanged via the edge computing gateway's P2P synchronization protocol. These summaries are then mutually endorsed and uploaded to the blockchain in batches, ensuring eventual consistency of data across multiple cabinets. This mechanism enables the system to maintain uninterrupted core business operations and prevent data loss even in disaster scenarios such as network outages and node failures. Upon recovery, it automatically completes consensus synchronization with the blockchain mainnet.
[0074] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. All equivalent substitutions, optimizations, and adaptations made based on the technical solutions of the present invention should be included within the scope of protection of the present invention.
Claims
1. A blockchain and RFID-based full lifecycle traceability and risk control system for laboratory reagents, characterized in that, This includes smart storage cabinets, a consortium blockchain network, and handheld RFID terminals, among which: Intelligent storage cabinets, acting as edge sensing and decision-making nodes, are used for the physical storage of reagents, environmental data acquisition, local risk decision-making, and execution control. Consortium blockchain networks, as distributed trusted ledgers, are used for data fingerprinting, smart contract execution, and multi-node collaborative consensus. Handheld RFID terminals serve as mobile operation terminals for field warehousing, inventory counting, and waste registration. The intelligent storage cabinet, the consortium blockchain network, and the handheld RFID terminal communicate encryptedly through a local area network or 5G network to achieve data exchange, command transmission, and status synchronization.
2. The experimental reagent full lifecycle traceability and risk control system based on blockchain and RFID as described in claim 1, characterized in that, The intelligent storage cabinet includes a cabinet body, RFID identification components, an environmental sensor array, an edge computing gateway, an execution control component, and a display and interaction component. The interior of the cabinet is divided by partitions, an exhaust fan is installed at the bottom of the cabinet back panel, and a cabinet door is installed on one side of the cabinet body. The cabinet door is equipped with a DC12V explosion-proof electromagnetic lock. The RFID identification components include UHF directional antennas, RFID readers, and adapter tags. A circular hole is opened in the center of the bottom surface of each partition to embed a set of UHF directional antennas. All antennas are connected to the RFID reader integrated at the top of the cabinet via low-loss coaxial cables and SMA connectors. The RFID reader communicates with the edge computing gateway. The adapter tags are selected according to the characteristics of the reagents. Flexible anti-metal tags are used for reagents at room temperature, ceramic tags are used for reagents frozen from -40℃ to +85℃, and PET-encapsulated anti-corrosion tags are used for concentrated acid / strong alkali reagents. The environmental sensor array includes a temperature and humidity sensor, a VOC sensor, and a smoke sensor. One digital temperature and humidity sensor is fixed in the middle of the side wall of each layer inside the cabinet. The temperature and humidity sensor is connected to the edge computing gateway after being expanded by a PCA9548I2C multiplexer. One VOC sensor is fixed at each of the top and bottom diagonals of the cabinet. One photoelectric smoke sensor is fixed at the top of the cabinet. The data from the temperature and humidity sensor, VOC sensor, and smoke sensor are uploaded to the edge computing gateway. As the core decision-making and communication hub of the smart storage cabinet, the edge computing gateway has four core services built-in: RFID read and write service; Sensor data acquisition service, 5-second acquisition cycle, uses median filtering with a window width of 5 combined with Kalman filtering for noise reduction. The filtering formula is as follows: ,in, Z is the filtered value at time k. k K is the original measured value. k The Kalman gain ranges from 0.1 to 0.
5. A blockchain light node client, based on FabricGatewaySDK, employing TLS two-way authentication and ECDSA transaction signature algorithm; The local risk decision engine performs compatibility matching, leak location, timeout timing, and threshold judgment. When the network is interrupted, cached events are accompanied by timestamps and ECDSA signatures, and batch retransmissions are performed after the network is restored. The execution control components include an electromagnetic lock control module, an exhaust fan control module, and an audible and visual alarm module. The electromagnetic lock control module is implemented via relays using the GPIO of the edge computing gateway, and the exhaust fan control module is started and stopped via relays using the GPIO of the edge computing gateway. The audible and visual alarm module uses a red LED in conjunction with a buzzer, which is triggered synchronously when an alarm is triggered. The interactive display components are integrated into the front of the cabinet door, including a touchscreen, a binocular camera, and a fingerprint module; the touchscreen runs an embedded Linux interactive program; the binocular camera runs a face recognition algorithm, and the similarity calculation formula is: Similarity = (A·B) / (‖A‖×‖B‖), where A and B are the registered feature vector and the real-time feature vector, respectively. The judgment threshold is not less than 0.85, and the fingerprint module uses a semiconductor sensor.
3. The experimental reagent full lifecycle traceability and risk control system based on blockchain and RFID as described in claim 2, characterized in that, The consortium blockchain network adopts the Hyperledger Fabric 2.5 architecture and is deployed on 5 physical servers. The node configuration includes 3 Orderer nodes, 5 Peer nodes, and 1 CA node. A global channel, the reagent channel, is created. The data storage strategy is to store data fingerprints and indexes on-chain and store raw data off-chain in the InfluxDB time-series database and the IPFS distributed file system.
4. The experimental reagent full lifecycle traceability and risk control system based on blockchain and RFID as described in claim 3, characterized in that, The consortium blockchain network deploys three types of smart contracts: reagent lifecycle management contract, security risk warning contract, and hierarchical access control contract. These three smart contracts form a closed-loop control logic through on-chain calls. The reagent lifecycle management contract defines the following data structure: unique reagent ID, RFID-EPC, name, CAS number, batch number, specifications, production date, expiration date, storage conditions, hazard category, incompatibilities list, status, location, creation time, and update time; methods include reagent creation, location update, requisition event, return event, expiration update, disposal, and multi-condition query; the transaction hash calculation formula is: transaction hash = SHA-256(reagent ID‖event type‖timestamp‖operator ID); The security risk warning contract defines the following data structure: Warning ID, Warning Type, Warning Level, Associated Reagent ID, Trigger Time, Location, Person in Charge, Handling Status, and Warning Details. Methods include generating warnings, handling warnings, unresolved queries, and historical tracing. The leak location formula is: Leakage element = max(RSSI1,RSSI2,...,RSSI) n ) In the formula, RSSI n This represents the tag signal strength indication value received by the nth UHF directional antenna, in dBm, and typically ranges from -80dBm to -30dBm. n represents the total number of UHF directional antennas in the smart storage cabinet, which is equal to the number of storage units; max() represents the maximum value function. The larger the RSSI value, the closer the tag is to the corresponding antenna. The hierarchical access control contract defines role enumeration: system administrator, laboratory administrator, experimenter, safety officer, and waste disposal specialist. The permission mapping rule is that experimenters can only use reagents with a hazard level of no more than 3. The verification formula is: permission passed = role matching ∩ hazard level ≤ user limit ∩ user status normal.
5. The application of the blockchain and RFID-based experimental reagent lifecycle traceability and risk control system as described in claim 4, characterized in that, The steps are as follows: Step 1: Deployment of the consortium blockchain network, node registration, and system initialization; Step 2: Reagent warehousing and filing, label binding, and data fingerprinting on the blockchain; Step 3: Pre-emptive risk control of reagent storage location and incompatibility; Step 4: Real-time monitoring and dynamic hierarchical early warning of environmental parameters; Step 5: Reagent requisition and return, access control and timeout management; Step 6: Reagent expiration warning, access freeze, and closed-loop disposal; Step 7: Offline autonomous operation, data retransmission and collaborative traceability.
6. The application of the blockchain and RFID-based experimental reagent lifecycle traceability and risk control system as described in claim 5, characterized in that, Step 1 specifically includes: deploying the Hyperledger Fabric 2.5 network, generating the genesis block and channel configuration, having the CA node issue an X.509 certificate, completing node TLS registration, deploying three types of smart contracts and initializing parameters. Among these, the compatibility rules include mutual exclusion between acids and bases, mutual exclusion between oxidants and reducing agents, and mutual exclusion between flammable materials and strong oxidants. The basic temperature threshold is set to 20℃ to 25℃, the basic timeout duration is set to 2 hours, and the face similarity threshold is set to 0.
85. The face and fingerprint information of the administrator and experimenters are recorded, and the feature hash is backed up on the blockchain.
7. The application of the blockchain and RFID-based experimental reagent lifecycle traceability and risk control system as described in claim 6, characterized in that, Step 2 specifically includes: the administrator uses a handheld RFID terminal to scan a blank label and enters the reagent name, CAS number, batch number, specifications, production date, expiration date, storage conditions, hazard category, and incompatibilities; the handheld RFID terminal automatically generates a unique reagent ID and calculates the SHA-256 hash value: hash value = SHA-256 (reagent information plaintext); the reagent lifecycle management contract is called to create the reagent, the hash value and key fields are uploaded to the blockchain, the EPC, expiration date, and hazard category are written into the RFID tag, the complete information is encrypted with AES and stored locally on the terminal, and synchronized to the edge computing gateway.
8. The application of the blockchain and RFID-based experimental reagent lifecycle traceability and risk control system as described in claim 7, characterized in that, Step 3 specifically includes the following steps: After the reagent is placed in the storage unit, the RFID reader polls and identifies the EPC, and the edge computing gateway performs compatibility matching through the RSSI positioning unit. Contraindication determination = (New reagent category ∩ Surrounding contraindication categories) ≠ ; If a forbidden combination is detected, the buzzer and red indicator light will be triggered to alarm, the electromagnetic lock will be locked, the touch screen will display conflict information, and an early warning will be generated and uploaded to the blockchain. If no forbidden combination is detected, the location will be updated on the blockchain and the lock will be released. Preferably, step 4 specifically includes: adjusting the dynamic temperature threshold in reverse according to the hazard level, with the calculation formula being: upper limit = 25 × (1 - 0.1 × (hazard level - 1)); generating a temperature warning if the temperature exceeds the standard for 10 consecutive minutes; VOC graded control: triggering a warning and automatically turning on the exhaust fan when the concentration exceeds 30 ppm; generating a VOC leak warning and executing a leak location algorithm to trace the source when the concentration exceeds 80 ppm; and generating the highest-level warning and linking the fire protection system when the smoke sensor is triggered.
9. The application of the blockchain and RFID-based experimental reagent lifecycle traceability and risk control system as described in claim 8, characterized in that, Step 5 specifically includes the experimenter authenticating via face or fingerprint, the edge computing gateway calling the permission contract to perform triple verification: role matching verification, danger level limit verification, and user status verification. After the verification is successful, the electromagnetic lock unlocks, the experimenter takes out the reagent, and after the RFID reader tag disappears, the gateway generates a requisition event and uploads it to the blockchain. At the same time, a timeout timer is started, and the timeout threshold is adjusted in reverse according to the danger level: timeout = 2 × (1 - 0.2 × danger level). If the reagent is not returned within the timeout period, an early warning push is generated. When the reagent is returned, the RFID reader tag is reset, the gateway generates a return event and uploads it to the blockchain, and the timer is terminated.
10. The application of the blockchain and RFID-based experimental reagent lifecycle traceability and risk control system as described in claim 9, characterized in that, Step 6 specifically includes: daily routine of scanning the reagents in the on-chain inventory and comparing their expiration dates; generating an expiration warning when the expiration date is no more than 30 days away; updating the status to expired and freezing the requisition permission when the expiration date has passed; waste disposal specialists use handheld RFID terminals to scan tags, select disposal methods and take photos of the packaging; after the terminal generates a photo hash, it calls the contract to update the status to waste and uploads the hash value to the on-chain, completing the closed loop of the entire life cycle. Preferably, step 7 specifically includes: when the network is interrupted, the gateway switches to offline autonomous mode and caches signed events; after the network is restored, the data is retransmitted in batches according to the time sequence and on-chain consensus is completed; multi-cabinet data synchronization and cross-cabinet approval traceability are supported; during auditing, the entire chain data can be retrieved and an evidence chain can be generated by entering EPC or unique ID.
Citation Information
Patent Citations
College laboratory chemical reagent safety management method and system based on block chain
CN113052458A
Hazardous chemical substance intelligent storage cabinet based on safety and environmental protection of college laboratories
CN117894119A