A two-level electronic coding traceability and association de-assignment method for corrosive liquid tanks
By combining QR code dual-mode electronic tags and blockchain technology with smart contracts for the full lifecycle management of corrosive liquid containers, the problem of traceability and safety management of corrosive liquid containers in traditional methods has been solved, enabling reliable traceability and safety assessment, and reducing safety risks and trust costs.
Patent Information
- Application Number
- CN202611295604.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-25
- Publication Date
- 2026-11-10
AI Technical Summary
Traditional methods struggle to achieve reliable traceability and intelligent risk control across the entire chain for corrosive liquid containers. They also fail to quickly and accurately assess the chemical compatibility of historically stored liquids and the fatigue of the container structure, leading to safety hazards and mixed-use risks. Furthermore, they lack scientific lifespan prediction and liability definition.
By employing dual-mode electronic tags with QR codes and blockchain technology, immutable barrel-liquid dynamic characteristic anchoring data is generated through the initial pressure-temperature baseline curve. Combined with smart contracts, a tiered security assessment is conducted, including historical compatibility pre-inspection, structural integrity verification, and lifespan threshold verification. A multi-party digitally signed security reset certificate is generated to achieve full lifecycle management.
It enables reliable traceability and safe management of corrosive liquid tanks, automates risk assessment, reduces trust costs, provides scientific life prediction and liability definition, and improves safety and management efficiency.
Smart Images

Figure CN123070973A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of industrial hazardous chemical safety management and supply chain traceability technology, specifically involving a two-level electronic coding traceability and association removal method for corrosive liquid drums. Background Technology
[0002] The handling and transportation of corrosive liquids (such as acids and alkalis) is a critical aspect of high-risk industries such as chemicals, pharmaceuticals, and electronics. These liquids are unstable and can easily lead to leaks, pollution, or even explosions if not properly managed. Traditional management methods, relying on paper records and manual inspections, are ill-suited to addressing increasingly complex supply chain collaboration and compliance requirements. With the development of the Internet of Things (IoT) and blockchain technologies, the industry is seeking to achieve end-to-end reliable traceability and intelligent risk control through digital means.
[0003] Traditional methods struggle to establish and maintain a strong correlation between containers and the liquids they contain. After liquid supply, information from older batches is lost, making it impossible to trace the complete history of the containers, posing significant risks of mixing and safety hazards. Pre-supply safety checks rely heavily on operator experience and visual observation, lacking quantitative indicators. Key risks such as the chemical compatibility of historically stored liquids and the fatigue of the container structure cannot be quickly and accurately assessed automatically. Data on the number of times containers have been used, their storage time, and the levels of corrosion they have experienced are scattered and not effectively integrated. It is impossible to scientifically predict the remaining lifespan of containers based on this historical data; disposal is only possible after problems occur or after a fixed lifespan is reached, which is neither safe nor economical. During the circulation of chemical containers, there is a lack of mutual trust among the containers, the chemical delivery system in FAB plants, and the chemical storage areas in semiconductor plants. In the event of an accident, data can be easily altered unilaterally, leading to difficulties in determining liability. Summary of the Invention
[0004] To address the aforementioned problems in the existing technology, this invention provides a two-level electronic coding traceability and association deactivation method for corrosive liquid tanks. The objective of this invention can be achieved through the following technical solutions: A two-level electronic coding traceability and association deactivation method for corrosive liquid tanks includes: S1: Each corrosive liquid tank is equipped with a QR code dual-mode electronic tag as a permanent tank body code; upon first use, while registering the basic information of the tank body, the initial pressure-temperature baseline curve during the initial chemical supply module supply process is collected, and the baseline curve is hashed and uploaded to the blockchain along with batch process parameters and quality data to generate tamper-proof tank-liquid initial dynamic characteristic anchoring data. S2: When liquid supply is required, after scanning the tank code, the tank condition safety assessment process is automatically executed. The smart contract calls the preset rules to check the compatibility of the tank with the historical liquids it has contained. When all checks are passed, the smart contract automatically executes the association removal operation and generates a security reset certificate with multi-party digital signatures on the blockchain, recording the reason, time and assessment results of the removal. S3: After allocating a new batch code, while establishing a new association, the hash value of the security reset certificate from the previous cycle is packaged together with the new process data and uploaded to the chain, so that the new batch data inherits the lifecycle state of the old batch. S4: After the client scans the code, a full life cycle report is displayed, showing the changes in the corrosivity level of the liquid contained in the barrel and the number of times it has been used through trend charts; if the number of times the barrel has been used or the cumulative usage time is close to the design life, the system will push a warning message to the user and provide information on the nearest recycling or testing point.
[0005] Specifically, the dual-mode QR code electronic tag is bonded to the inner surface of the barrel using corrosion-resistant epoxy structural adhesive, and RFID wireless reading is preferred; in the presence of metal shielding or strong electromagnetic interference, it automatically switches to QR code visual recognition.
[0006] Specifically, the initial pressure-temperature baseline curve is acquired by a temperature and pressure sensor, and the duration covers the entire liquid supply process. The acquired data is encrypted and written into the RFID user area of the QR code dual-mode electronic tag. It is then hashed together with batch process parameters and quality data to generate a digest, which is uploaded to the blockchain quality channel along with the original encrypted data to form tamper-proof barrel-liquid dynamic feature anchoring data.
[0007] Specifically, the security assessment process is driven by smart contracts and executed automatically according to tiered rules. The specific process includes: Historical compatibility pre-check: The contract reads all historical batches of the barrel on the chain with corrosion level-chemical group labels. If the liquid to be supplied has a conflicting combination with any of the already recorded containers in the incompatible reaction table, the process is immediately terminated and the incompatible code is returned. Structural integrity verification: Extract the encrypted initial pressure-temperature baseline summary written at the factory from the RFID area of the QR code dual-mode electronic tag, perform hash comparison with the empty barrel baseline under the same working condition sampled locally in real time at the node, and determine structural fatigue or lining damage by Hamming distance, and refuse to disconnect the association; Lifetime threshold verification: On-chain dual counters for accumulated usage count and accumulated storage time. If either reaches the designed lifetime threshold, an irrevocable scrapping state is triggered, and any subsequent release request will be rolled back directly. Once the historical compatibility pre-check, structural integrity verification, and lifetime threshold check have all passed, the contract pushes the security assessment event to the FAB plant, the semiconductor plant, and the third-party inspection agency nodes. The three parties use their respective private keys to perform ECDSA signatures on the assessment result digest. When the signature content is consistent, the contract generates a security reset certificate with multi-party digital signatures and writes its hash value into a new block to complete the association removal.
[0008] Specifically, the core of the historical container liquid compatibility chemical group-corrosion level two-dimensional labeling system is the method for rapid matching and risk prevention: Before each liquid supply, the system automatically maps the chemical group and corrosivity level of the main hazardous components of the liquid to be contained, and writes the group-level code into the batch metadata. For combinations that do not trigger hard conflicts, the smart contract calculates a compatibility score based on the inter-family reactivity coefficient multiplied by the grade difference coefficient, and determines whether to return a suggestion to change buckets based on the compatibility score.
[0009] Specifically, the security reset certificate is a digital asset capable of full-cycle state management; the security reset certificate is modeled as a state machine on the blockchain, with states including valid, used, and revoked. It is valid when initially generated; when a new batch is successfully established, the state automatically changes to used; if fraud or error is found during subsequent evaluations, the state can be updated to revoked upon joint decision by authorized nodes. Specifically, the method for generating the security reset certificate is as follows: it is encoded as a deterministic function of the smart contract. The function will only be triggered after the entire tiered security assessment process has been passed, and it will automatically assemble elements such as signatures from all parties into a standardized certificate data packet.
[0010] Specifically, the lifecycle state is continuously accumulated on the chain in the form of a bucket-event-certificate triple, forming an irreversible directed event flow. The specific structure and management rules are as follows: Each event contains 6 required fields: event type, timestamp and block height, family-level code for this batch, security reset certificate hash, remaining lifetime percentage, and location hash. The smart contract has a built-in targeted event flow verification function to control the sequential jump of the event types; When packaging and adding to the blockchain, the hash of the security reset certificate from the previous cycle must be written into the new event field to form a one-way pointer. The client recursively reads the pointer to reconstruct the complete lifecycle graph of the bucket and calculates the cumulative number of uses, cumulative holding time, and corrosion level change curve in real time.
[0011] The contract provides a read-only function that returns the remaining lifetime percentage and the hash of the recent event field location.
[0012] Specifically, the full lifecycle report is a multi-view interactive interface dynamically generated by the client, and the data fusion and generation logic is as follows: The client scans the barrel's code and concurrently calls the blockchain API to read the directional event stream. It also reads the most recent encrypted sensor data from the RFID user area of the electronic tag and merges the on-chain and off-chain data as the data basis for the report. Based on aggregated data, a time series curve of corrosion level and a heatmap of cumulative usage intensity are automatically generated; each data point in the time series curve is anchored to a security reset certificate event on the chain that contains a family-level code. The report interface has an embedded read-only function that calculates and displays the remaining lifespan percentage in real time. When the value is lower than a preset threshold, it not only pushes a warning message, but also automatically parses the location hash into geographic coordinates and calls the map service to display the route navigation to the nearest recycling or detection point embedded in the interface.
[0013] Specifically, the trend chart is a visualization component that supports multi-dimensional data correlation analysis, and its generation and interaction logic is as follows: The trend chart uses a dual Y-axis design, with the primary Y-axis plotting the time series of corrosion levels and the secondary Y-axis simultaneously plotting the decay curve of the remaining lifetime percentage. Each data point in the diagram is anchored to an on-chain event; users can click on any data point to drill down and view the details of the security reset certificate corresponding to that event, the Hamming distance value of the structural integrity verification at that time, and the chemical group code of that container; The trend chart's timeline supports dynamic scaling, allowing you to view the entire lifecycle since the bucket was enabled, or focus on a user-defined specific time period for detailed analysis of local trends.
[0014] Specifically, the trend chart backend adopts an incremental on-chain-off-chain hybrid index: the on-chain stores event hashes and key fields, while the off-chain nodes maintain columnar storage files divided by time, supporting random point lookups and batch exports; when the user performs local zooming, the frontend uses a Bloom filter to locate the required columnar storage shards to achieve data retrieval and frontend rendering.
[0015] Specifically, the remaining lifespan warning push adopts a dual-channel mechanism of on-chain events + off-chain messages: when the on-chain contract detects that the remaining lifespan percentage is lower than the threshold, it triggers an event and writes it into the block; at the same time, the distributed message queue of the factory cloud platform sends warning messages with digital signatures to the user's mobile terminal, the recycling point ERP, and the logistics scheduling system in parallel.
[0016] Specifically, the information on the most recent recycling or detection point is dynamically generated by the AI path planning engine: The AI path planning engine is connected to the factory's digital twin system. When a remaining lifespan warning is triggered, it uses the current location as the starting point and the designated recycling or detection point as the ending point, and uses the minimum path safety risk and the highest passage efficiency as multi-objective optimization functions to perform real-time path calculation. The planned routes are pushed to the client interface and simultaneously updated to the factory's digital twin system for logistics scheduling and safety monitoring throughout the factory.
[0017] Specifically, the factory digital twin system is a virtual model that is synchronized in real time with the physical factory environment; its construction and association rules are as follows: The system continuously updates the workshop map and dynamic obstacle information through the deployed LiDAR SLAM navigation module and IoT sensor network; The digital twin system maintains a digital mirror image of each corrosive liquid tank, whose status is synchronized with the lifecycle data and real-time location recorded on the blockchain; When performing AI path planning or simulating emergency response, high-fidelity simulation and deduction are performed based on the real-time data provided by the digital twin system.
[0018] The beneficial effects of this invention are as follows: This invention records every association and deassociation operation using blockchain and leverages the inheritance of secure reset certificate hashes to ensure that new batches of data naturally carry the history of older batches, forming an immutable and unbroken traceability chain. A tiered security assessment process driven by smart contracts is designed to automatically perform historical compatibility pre-checks, structural integrity verification, and lifetime threshold checks, transforming subjective judgment into objective decision-making based on data and rules. Full lifecycle data is recorded using a bucket-event-certificate triplet, and trend charts are generated on the client side to visually display corrosion changes and lifetime decay. Predictive early warnings are achieved through a remaining lifetime percentage model, and recycling point information is proactively pushed, achieving a leap from "passive response" to "proactive management." Utilizing the multi-party digital signature and immutability of blockchain, secure certificate resets require three-party signatures, and all operations are recorded, providing credible and neutral evidence for post-event auditing and liability determination, significantly reducing trust costs. Attached Figure Description
[0019] To facilitate understanding by those skilled in the art, the present invention will be further described below with reference to the accompanying drawings.
[0020] Figure 1 This is a schematic diagram of the overall structure of a two-level electronic coding traceability and association deactivation method for a corrosive liquid tank according to the present invention; Figure 2 This is a schematic diagram of the physical layer structure in this invention; Figure 3This is a schematic diagram of the blockchain layer in this invention; Figure 4 This is a schematic diagram of the service layer structure in this invention; Figure 5 This is a schematic diagram of the application layer structure in this invention; Detailed Implementation
[0021] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of example embodiments to those skilled in the art. Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring aspects of this disclosure. The blocks shown in the drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices. The flowcharts shown in the drawings are merely illustrative and do not necessarily include all contents and operations / steps, nor do they necessarily have to be performed in the order described. For example, some operations / steps can be broken down, while others can be combined or partially combined. Therefore, the actual execution order may change depending on the actual situation.
[0022] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided.
[0023] Please see Figure 1-5 A two-level electronic coding traceability and association deactivation method for corrosive liquid tanks, comprising: S1: Each corrosive liquid tank is equipped with a QR code dual-mode electronic tag as a permanent tank body code; upon first use, while registering the basic information of the tank body, the initial pressure-temperature baseline curve during the initial chemical supply module supply process is collected, and the baseline curve is hashed and uploaded to the blockchain along with batch process parameters and quality data to generate tamper-proof tank-liquid initial dynamic characteristic anchoring data. S2: When liquid supply is required, after scanning the tank code, the tank condition safety assessment process is automatically executed. The smart contract calls the preset rules to check the compatibility of the tank with the historical liquids it has contained. When all checks are passed, the smart contract automatically executes the association removal operation and generates a security reset certificate with multi-party digital signatures on the blockchain, recording the reason, time and assessment results of the removal. S3: After allocating a new batch code, while establishing a new association, the hash value of the security reset certificate from the previous cycle is packaged together with the new process data and uploaded to the chain, so that the new batch data inherits the lifecycle state of the old batch. S4: After the client scans the code, a full life cycle report is displayed, showing the changes in the corrosivity level of the liquid contained in the barrel and the number of times it has been used through trend charts; if the number of times the barrel has been used or the cumulative usage time is close to the design life, the system will push a warning message to the user and provide information on the nearest recycling or testing point.
[0024] Specifically, the dual-mode QR code electronic tag is bonded to the inner surface of the barrel using corrosion-resistant epoxy structural adhesive, and RFID wireless reading is preferred; in the presence of metal shielding or strong electromagnetic interference, it automatically switches to QR code visual recognition.
[0025] In this embodiment, a groove with a depth of 3-5 mm is pre-reserved on the surface of the barrel. The bottom of the groove is flat, and its size matches the label shell. A two-component corrosion-resistant epoxy structural adhesive is evenly applied into the groove. The adhesive layer formed after curing not only has high bonding strength but also effectively resists the erosion of various chemical solvents.
[0026] Embed the label into the groove and apply constant pressure until the adhesive is initially cured, ensuring that the label surface is flush with or slightly lower than the outer wall of the barrel, thus avoiding direct scratches during transportation and use.
[0027] In an ideal, interference-free environment, the system defaults to and prioritizes the RFID wireless reading mode. Operators use handheld RFID readers to quickly and efficiently acquire barrel codes in batches within a few meters, greatly improving the efficiency of inbound and outbound operations, inventory checks, and other processes.
[0028] Triggering conditions for QR code visual recognition: This function is implemented by the reader's built-in logic circuitry and software algorithm. The system automatically switches when the reader is in one of the following two typical interference environments: When the barrel is made of metal or densely stacked on a metal shelf, the RFID signal is severely attenuated due to electromagnetic shielding, and the reader detects the received signal strength indication. Near large motors and frequency converters, environmental electromagnetic noise causes the communication error rate to soar, and the reader fails to read the code three times in a row.
[0029] Once the above conditions are met, the reader immediately triggers the switching logic and prompts the operator via sound, light, or screen information: "Interference detected. Please use the camera to scan the QR code." The operator then uses the built-in camera of the same device or mobile phone to visually recognize the QR code on the label.
[0030] As a permanent optical backup, QR codes ensure that the identification code of the bucket can still be reliably read even in the most extreme electromagnetic environments, fundamentally avoiding business process interruptions caused by the "loss of connection" of the tag.
[0031] Specifically, the initial pressure-temperature baseline curve is acquired by a temperature and pressure sensor, and the duration covers the entire CDM liquid supply process. The acquired data is encrypted and written into the RFID user area of the QR code dual-mode electronic tag. It is then hashed together with batch process parameters and quality data to generate a digest, which is uploaded to the blockchain quality channel along with the original encrypted data to form tamper-proof barrel-liquid dynamic feature anchoring data.
[0032] In this embodiment, data acquisition is controlled by the PLC of the liquid supply system. When the liquid supply nozzle is fully connected to the tank opening and a "liquid supply start" signal is received, the acquisition program is automatically triggered; when the liquid supply reaches the set capacity and a "liquid supply end" signal is received, the acquisition terminates. This ensures that the duration fully covers the entire initial liquid supply process.
[0033] The raw pressure-temperature data streams (such as P1,T1; P2,T2; ... Pn,Tn) are immediately encrypted using the AES-128 algorithm at the industrial gateway. The key is dynamically generated by the system backend and bound to the unique code of the bucket.
[0034] The encrypted data is written into the RFID user storage area of the dual-mode electronic tag with QR code on the barrel. This operation "carries" the crucial initial dynamic feature data onto the physical barrel, achieving object-data binding and providing an offline data source for subsequent rapid on-site verification.
[0035] The system invokes the national cryptographic SM3 hash algorithm to calculate a unique fixed-length digest for the following dataset: The raw data for the initial pressure-temperature baseline curve mentioned above.
[0036] The process parameters for this batch (such as liquid supply rate, ambient temperature and humidity).
[0037] The quality data for this batch (such as liquid purity and density test reports).
[0038] Subsequently, the SM3 hash digest, key batch metadata (not all raw data to save on-chain resources), and the raw data ciphertext stored in the RFID zone are packaged together as a transaction and uploaded to the blockchain's dedicated quality traceability channel.
[0039] Through the above process, an immutable record is created on the blockchain. This record not only contains static batch information, but more importantly, it uniquely anchors the dynamic physical response characteristics of the bucket upon its first use through a hash value. This establishes a strong correlation between the "digital fingerprint" containing dynamic characteristics and the bucket in the physical world.
[0040] Uniqueness: Even if the same batch of liquid is supplied to different process equipment, the pressure-temperature curves generated due to the differences in microstructure will be different, thus making the anchoring data of each barrel unique.
[0041] Immutability: Any alteration to the original data will cause its hash value to mismatch with the digest of the record on the chain, and will be immediately detected by the system.
[0042] Verifiability: In the subsequent "structural integrity verification", the barrel structure can be verified to have degraded by reading the encrypted baseline data of the RFID area and comparing it with the on-chain hash, or by calculating the similarity with the curve collected in real time.
[0043] Specifically, the security assessment process is driven by smart contracts and executed automatically according to tiered rules. The specific process includes: Historical compatibility pre-check: The contract reads all historical batches of the barrel on the chain with corrosion level-chemical group labels. If the liquid to be supplied has a conflicting combination with any of the already recorded containers in the incompatible reaction table, the process is immediately terminated and the incompatible code is returned. Structural integrity verification: Extract the encrypted initial pressure-temperature baseline summary written at the factory from the RFID area of the QR code dual-mode electronic tag, perform hash comparison with the empty barrel baseline under the same working condition sampled locally in real time at the node, and determine structural fatigue or lining damage by Hamming distance, and refuse to disconnect the association; Lifetime threshold verification: On-chain dual counters for accumulated usage count and accumulated storage time. If either reaches the designed lifetime threshold, an irrevocable scrapping state is triggered, and any subsequent release request will be rolled back directly. Once the historical compatibility pre-check, structural integrity verification, and lifetime threshold check have all passed, the contract pushes the security assessment event to the FAB plant, the semiconductor plant, and the third-party inspection agency nodes. The three parties use their respective private keys to perform ECDSA signatures on the assessment result digest. When the signature content is consistent, the contract generates a security reset certificate with multi-party digital signatures and writes its hash value into a new block to complete the association removal.
[0044] In this embodiment, a dedicated "bucket condition security assessment" smart contract is deployed on the blockchain. During initialization, this contract pre-configures key global parameters and a rule base, including: Global Incompatible Reaction Table: Stored in the contract state variables as a two-dimensional matrix, where row and column indices represent different "chemical family codes" and matrix element values are 0 (allowed) or 1 (prohibited), defining compatibility rules for any two chemical substances to be continuously contained.
[0045] Design life threshold: Defines the maximum number of uses and the maximum cumulative holding time for each type of container.
[0046] Hamming distance tolerance threshold: Sets the upper limit of baseline alignment deviation used to determine structural integrity (e.g., set to 50, exceeding which is considered a failure).
[0047] The automated execution of the tiered security assessment process is as follows: 1) Historical compatibility pre-check Trigger: The smart contract is triggered when a liquid supply request is initiated by scanning the tank's code. The input parameter is the chemical group code of the liquid to be supplied.
[0048] Execution: The contract automatically reads all historical contents records of the bucket on the chain and iterates through the "chemical family code" of each historical batch.
[0049] Decision: For each historical code, it is indexed along with the code of the intended liquid supply to query the on-chain "forbidden reaction table". If a result of 1 (forbidden) is found, the contract immediately terminates all subsequent processes, returns a specific forbidden code (such as ERROR_INCOMPATIBLE) to the client, and records the failure event. This rule implements a "one-vote veto" for high-risk mixing.
[0050] 2) Structural integrity verification Trigger: Executes only after historical compatibility pre-check passes.
[0051] Data Acquisition: Operators use handheld devices to read the encrypted initial pressure-temperature baseline curve data stored in the RFID area of the electronic tag on the tank, which is encrypted using AES. The device decrypts the data through the backend service to obtain the initial baseline data. Simultaneously, a new round of pressure-temperature data sampling is performed on the current empty tank under the same operating conditions as the first liquid supply (such as the same temperature and static state) to generate a real-time baseline.
[0052] Comparison and Judgment: The smart contract receives the two baseline data sets mentioned above and calculates the normalized Hamming distance between them. If the calculated distance value is greater than the preset tolerance threshold, it is determined that the barrel may have structural fatigue or lining damage, the evaluation process terminates, and a structural verification failure code is returned.
[0053] 3) Lifetime threshold verification Trigger: Executed only after structural integrity verification is passed.
[0054] Execution: The smart contract reads two incremental counters for the bucket on the chain: cumulative usage count and cumulative holding time.
[0055] Decision: The contract compares these two real-time values with preset design lifetime thresholds. If either value reaches or exceeds the threshold, the contract marks the bucket's state as irrevocably obsolete. Subsequently, any requests to unlink the bucket will be automatically rejected and rolled back by the contract. This rule ensures that the bucket's hard upper limit on lifespan is not exceeded.
[0056] After all three tiered checks are passed, the smart contract treats this as a major security event. The contract automatically pushes the security assessment pass event and its SM3 digest to the clients of the three pre-defined key participating nodes—the FAB plant, the semiconductor plant, and the third-party testing agency. Each party uses its private key to perform an ECDSA digital signature on the received event digest and returns the signature to the smart contract. The smart contract verifies that the signatures of all three parties are valid and based on the same event digest. Upon successful verification, the contract automatically performs the following operations: Generate a security reset certificate: Assemble the assessment results, timestamps, third-party signatures, and other elements into a standardized security reset certificate.
[0057] Complete the unlinking process: Write the hash value of the certificate as a new transaction to a new block on the blockchain. This operation marks the formal unlinking of the old association from a legal and technical perspective, and the bucket enters a "relinkable" state.
[0058] State Update: Triggers an on-chain state update for the bucket, preparing it for the next step of allocating new batch codes.
[0059] Specifically, the core of the historical container liquid compatibility chemical group-corrosion level two-dimensional labeling system is the method for rapid matching and risk prevention: Before each liquid supply, the system automatically maps the chemical group and corrosivity level of the main hazardous components of the liquid to be contained, and writes the group-level code into the batch metadata. The smart contract has a built-in disallowance table, which uses pairwise chemical group codes as row and column indices. The matrix element values 0 / 1 represent allowing / prohibiting continuous filling, respectively. A hard conflict interruption is immediately triggered if and only if the disallowance bit corresponding to any of the chemical groups of the liquid to be supplied is 1 in any of the three most recent historical records in the container. For combinations that do not trigger hard conflicts, the smart contract calculates a compatibility score based on the inter-family reactivity coefficient multiplied by the grade difference coefficient, and determines whether to return a suggestion to change buckets based on the compatibility score.
[0060] In this embodiment, common corrosive chemicals are classified into 8 groups according to their reaction characteristics: F1: Strong oxidizing acids (nitric acid, chromic acid, etc.) F2: Strong reducing acids (hydrochloric acid, hydrobromic acid, etc.) F3: Organic acids (acetic acid, formic acid, etc.) F4: Strong bases (sodium hydroxide, potassium hydroxide, etc.) F5: Weakly basic compounds (ammonia, sodium carbonate, etc.) F6: Organic solvents (acetone, benzene, etc.) F7: Halogenated compounds (chlorine water, bromine water, etc.) F8: Special reagent family (peroxides, cyanides, etc.) Based on material corrosion rate, it is divided into 5 levels: L1: Very mild L2: Mild L3: Moderate L4: Severe L5: Extremely severe The system has a built-in material database. When the liquid to be contained is entered, it automatically parses its main hazardous components to generate a "family-level" two-dimensional code. For example, concentrated nitric acid is coded as "F1-L5" and 30% hydrochloric acid is coded as "F2-L4". This code is written to the blockchain as metadata along with the batch information.
[0061] Specifically, the security reset certificate is a digital asset capable of full-cycle state management; the security reset certificate is modeled as a state machine on the blockchain, with states including valid, used, and revoked. It is valid when initially generated; when a new batch is successfully established, the state automatically changes to used; if fraud or error is found during subsequent evaluations, the state can be updated to revoked upon joint decision by authorized nodes. Specifically, the method for generating the security reset certificate is as follows: it is encoded as a deterministic function of the smart contract. The function will only be triggered after the entire tiered security assessment process has been passed, and it will automatically assemble elements such as signatures from all parties into a standardized certificate data packet.
[0062] Specifically, the lifecycle state is continuously accumulated on the chain in the form of a bucket-event-certificate triple, forming an irreversible directed event flow. The specific structure and management rules are as follows: Each event contains 6 required fields: event type, timestamp and block height, family-level code for this batch, security reset certificate hash, remaining lifetime percentage, and location hash. The smart contract has a built-in targeted event flow verification function to control the sequential jump of the event types; When packaging and adding to the blockchain, the hash of the security reset certificate from the previous cycle must be written into the new event field to form a one-way pointer. The client recursively reads the pointer to reconstruct the complete lifecycle graph of the bucket and calculates the cumulative number of uses, cumulative holding time, and corrosion level change curve in real time.
[0063] The contract provides a read-only function that returns the remaining lifetime percentage and the hash of the recent event field location.
[0064] Specifically, the full lifecycle report is a multi-view interactive interface dynamically generated by the client, and the data fusion and generation logic is as follows: The client scans the barrel's code and concurrently calls the blockchain API to read the directional event stream. It also reads the most recent encrypted sensor data from the RFID user area of the electronic tag and merges the on-chain and off-chain data as the data basis for the report. Based on aggregated data, a time series curve of corrosion level and a heatmap of cumulative usage intensity are automatically generated; each data point in the time series curve is anchored to a security reset certificate event on the chain that contains a family-level code. The report interface has an embedded read-only function that calculates and displays the remaining lifespan percentage in real time. When the value is lower than a preset threshold, it not only pushes a warning message, but also automatically parses the location hash into geographic coordinates and calls the map service to display the route navigation to the nearest recycling or detection point embedded in the interface.
[0065] Specifically, the trend chart is a visualization component that supports multi-dimensional data correlation analysis, and its generation and interaction logic is as follows: The trend chart uses a dual Y-axis design, with the primary Y-axis plotting the time series of corrosion levels and the secondary Y-axis simultaneously plotting the decay curve of the remaining lifetime percentage. Each data point in the diagram is anchored to an on-chain event; users can click on any data point to drill down and view the details of the security reset certificate corresponding to that event, the Hamming distance value of the structural integrity verification at that time, and the chemical group code of that container; The trend chart's timeline supports dynamic scaling, allowing you to view the entire lifecycle since the bucket was enabled, or focus on a user-defined specific time period for detailed analysis of local trends.
[0066] Specifically, the trend chart backend adopts an incremental on-chain-off-chain hybrid index: the on-chain stores event hashes and key fields, while the off-chain nodes maintain columnar storage files divided by time, supporting random point lookups and batch exports; when the user performs local zooming, the frontend uses a Bloom filter to locate the required columnar storage shards to achieve data retrieval and frontend rendering.
[0067] Specifically, the remaining lifespan warning push adopts a dual-channel mechanism of on-chain events + off-chain messages: when the on-chain contract detects that the remaining lifespan percentage is lower than the threshold, it triggers an event and writes it into the block; at the same time, the distributed message queue of the factory cloud platform sends warning messages with digital signatures to the user's mobile terminal, the recycling point ERP, and the logistics scheduling system in parallel.
[0068] In this embodiment, the three states—valid, used, and revoked—cannot be physically deleted once written, therefore a "state reason" field is required. The contract adds a bytes32 reasonHash to the event to store the IPFS address for subsequent auditing.
[0069] Authorized nodes jointly decide to adopt a "threshold gate" scheme: a 2 / 3 multisignature is maintained in the NodeAccessControl contract, and when revokeCert is called, it first checks whether the multisignature has reached the threshold before changing the status. In this way, even if a single node's private key is leaked, it cannot unilaterally revoke the status.
[0070] The "pass" decision in the tiered security assessment process is made by an off-chain assessment microservice that first writes the conclusion in a private Fabric dataset and then calls createCert. The conclusion data is not public, but the conclusion hash is public, thus achieving "privacy logging".
[0071] The directional event flow sequence check function has a built-in "state machine transition table" that uses an 8-bit unsigned integer mask to represent the allowed preceding type. For example, the preceding mask for event type 3 (measure) only allows 0 or 3 to prevent the measurement value from appearing before evaluation.
[0072] In Fabric transactions packaged and uploaded to the blockchain, the "previous event hash" is passed in as transient data. The chaincode first verifies whether it is equal to the latest event hash of the bucket in the world state, and then writes it into a new block to ensure that the pointers are unidirectional and continuous.
[0073] If a fork rollback occurs, the block height of Fabric will increase but the block number will not be continuous. The monitoring process can detect the rollback by comparing the lastConfigIndex in the block metadata, immediately set the ClickHouse partition to "invalid", and resynchronize from the previous stable height to ensure that the off-chain index is strictly consistent with the on-chain index.
[0074] When reconstructing the lifecycle graph on the client side and recursively reading pointers, a strategy of "batch 100 events + one GraphQL" is adopted. The front end uses AsyncIterator to pull the data in batches to avoid memory jitter caused by thousands of events at once.
[0075] Cumulative usage count = number of times event type 1 (use) occurs; Cumulative storage time = sum of time differences between adjacent use→measure or use→use; The corrosion rate curve is directly taken from the corrosion rate field in the event. If the absolute value of the curve slope exceeds the threshold of 0.15 for 3 consecutive times, the front end will automatically highlight it in red and prompt "suspected of accelerating corrosion".
[0076] RFID user area encryption details: The user area consists of 640 bits, divided into: Version 4bit; 20-bit counter (supports 1 million write cycles); Sensor encryption is 256 bits; 32-bit checksum (CRC32-MPEG); Reserve 328 bits for future writing of multiple logistics signatures; The label is written using the "lock before write" (BlockPermalock instruction) to prevent unauthorized rewriting during transportation.
[0077] If the edge gateway fails CRC verification three times, it will immediately report a "tag tampering" event, triggering an independent audit process on the blockchain.
[0078] Data fusion is completed in the Service Worker, prioritizing reading from the IndexedDB cache; missing fields in on-chain events are placed using "hole markers" to ensure the chart remains continuous.
[0079] The heatmap uses the HSL color space, with saturation mapped to intensity and brightness mapped to temperature, making it suitable for colorblind users. After the Canvas 2D drawing is completed, a "remaining lifetime percentage" contour line is overlaid to make it easy to locate the critical zone at a glance.
[0080] The columnar storage file uses Apache Parquet, version 2.6, with dictionary encoding and RLE enabled, and a compression ratio of 8:1.
[0081] The Bloom filter has a false positive rate of 0.5% and a bit width of 16KB, which can be stored in the front-end IndexDB. The filter key is family + day-level timestamp, and the value is the fragment file name.
[0082] During local scaling, the front end first calculates the visible time window, performs bitwise operations with the filter, and only sends an HTTPRange request (Accept-Ranges: bytes) after a match is found, fetching the corresponding 4 MB fragment, with an average time of 180 ms; then WebAssembly is used to decompile Parquet, rendering 100,000 points while maintaining a frame rate of over 55 fps.
[0083] The gas limit for on-chain events ResidualLifeWarn is fixed at 52k to prevent block congestion caused by misuse of complex logic; the event data is only 128 bytes to ensure that the Fabric configuration block does not expand.
[0084] The factory cloud message queue uses RocketMQ 5.0 and supports "timed messages". The first alert is sent when the lifespan is 15%, the second at 10%, and the third at 5%. The interval can be configured in the background.
[0085] After receiving the push notification on the mobile device, the user needs to reply with the heartbeat packet signed by ED25519. If no reply is received within 30 seconds, the cloud platform will automatically upgrade the channel: a dual call via telephone voice and SMS to ensure that the system can be detected even during night shifts.
[0086] Specifically, the information on the most recent recycling or detection point is dynamically generated by the AI path planning engine: The AI path planning engine is connected to the factory's digital twin system. When a remaining lifespan warning is triggered, it uses the current location as the starting point and the designated recycling or detection point as the ending point, and uses the minimum path safety risk and the highest passage efficiency as multi-objective optimization functions to perform real-time path calculation. The planned routes are pushed to the client interface and simultaneously updated to the factory's digital twin system for logistics scheduling and safety monitoring throughout the factory.
[0087] Specifically, the factory digital twin system is a virtual model that is synchronized in real time with the physical factory environment; its construction and association rules are as follows: The system continuously updates the workshop map and dynamic obstacle information through the deployed LiDAR SLAM navigation module and IoT sensor network; The digital twin system maintains a digital mirror image of each corrosive liquid tank, whose status is synchronized with the lifecycle data and real-time location recorded on the blockchain; When performing AI path planning or simulating emergency response, high-fidelity simulation and deduction are performed based on the real-time data provided by the digital twin system.
[0088] In this embodiment, the multi-objective optimization function has two main objectives: minimizing path safety risk and maximizing traffic efficiency. In practice, these two objectives may conflict; for example, the safest path may not be the fastest. Therefore, a multi-objective optimization algorithm is needed to find a set of Pareto optimal solutions, and then select one solution based on specific requirements.
[0089] Define the safety risk function F1: The safety risk of a path is determined by multiple factors, such as the density of people on the path, whether a dedicated passage is used, and the physical conditions of the path (such as width and slope).
[0090] And the traffic efficiency function F2: the efficiency of the path, which is usually determined by the path length, travel time (considering congestion and waiting), etc.
[0091] The problem is modeled as a graph, where nodes represent locations and edges represent path segments. Each edge has multiple attributes: length, security risk value, travel time, etc.
[0092] Specific implementation methods include: 1. Graph Modeling: Let the factory area map be a graph G=(V, E), where V is the set of nodes (e.g., intersections, key equipment points), and E is the set of edges (paths connecting the nodes). Each edge e∈E has the following properties: Length l(e); Safety risk value r(e): calculated from multiple sub-factors, for example: r(e) = w1 * personnel density (e) + w2 * dedicated passage sign (e) + w3 * path complexity (e) + ... Where personnel density (e) can be obtained through IoT sensors; dedicated passage sign (e) is a 0 / 1 variable (1 indicates a dedicated passage, 0 indicates not); path complexity (e) may include the number of turns, gradient, etc. Weights w1, w2, w3... need to be set according to actual safety requirements.
[0093] Travel time t(e): related to length l(e) and current congestion, and may change dynamically based on real-time data.
[0094] 2. Simultaneously minimize two objectives: total security risk R(P) and total travel time T(P), where P is a path from the starting point s to the ending point t.
[0095] definition: R(P)=Σ {e∈P} r(e) T(P) = Σ {e∈P} t(e) Seek the Pareto optimal solution, i.e. there is no other path P' such that at least one of R(P') <= R(P) and T(P') <= T(P) holds strictly.
[0096] 3. Taking multi-objective Dijkstra's algorithm as an example: Initialization: Each node v maintains a solution set, recording the cost vector (R, T) of the Pareto optimal path from the starting point s to v. The solution set of the starting point s is initialized to {(0,0)}, and other nodes are initialized to empty. A priority queue is created, and the starting point s is added to the queue. The priority can be sorted according to the weighted sum of R and T or according to a certain objective value, but for multi-objectives, non-dominated sorting is usually used.
[0097] Loop: Take a node v and its corresponding cost vector (R) from the queue. v ,Tv Iterate through all neighboring nodes u of v. For each edge e = (v, u): compute the new cost vector (R). new ,T new ) = (R v + r(e), T v + t(e)). Check if the new cost vector is dominated by an existing vector in the current solution set of node u. If it is, skip it. If the new cost vector is not dominated by any vector in the current solution set of node u, then (R) new ,T new Add node u to the solution set of u, remove all vectors in the solution set of u that are dominated by the new vector, and then add node u to the queue with the new cost vector.
[0098] Termination: The algorithm terminates when the queue is empty. The solution set at the endpoint t is the set of cost vectors for the Pareto optimal path from s to t.
[0099] 4. After obtaining the Pareto front, one of the multiple Pareto optimal paths needs to be selected. This can be determined by the decision-maker's preferences. For example, a comprehensive objective function can be defined: U(P)=λ*R(P)+(1-λ)*T(P).
[0100] Where λ∈[0,1] is a weighting parameter, representing the degree of importance attached to safety risks. λ=1 indicates that only safety is considered, and λ=0 indicates that only efficiency is considered.
[0101] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. A two-level electronic coding traceability and association deactivation method for corrosive liquid tanks, characterized in that, include: S1: Each corrosive liquid container is equipped with a QR code dual-mode electronic tag as a permanent container identification code; Upon first use, while registering the basic information of the tank body, the initial pressure-temperature baseline curve during the initial chemical supply module supply process is collected. The baseline curve, along with batch process parameters and quality data, is hashed and uploaded to the blockchain to generate unalterable tank-liquid initial dynamic characteristic anchoring data. S2: When liquid supply is required, after scanning the tank code, the tank condition safety assessment process is automatically executed. The smart contract calls the preset rules to check the compatibility of the tank with the historical liquids it has contained. When all checks are passed, the smart contract automatically executes the association removal operation and generates a security reset certificate with multi-party digital signatures on the blockchain, recording the reason, time and assessment results of the removal. S3: After allocating a new batch code, while establishing a new association, the hash value of the security reset certificate from the previous cycle is packaged together with the new process data and uploaded to the chain, so that the new batch data inherits the lifecycle state of the old batch. S4: After the client scans the code, a full life cycle report is displayed, showing the changes in the corrosivity level of the liquid contained in the barrel and the number of times it has been used through trend charts; if the number of times the barrel has been used or the cumulative usage time is close to the design life, the system will push a warning message to the user and provide information on the nearest recycling or testing point.
2. The method according to claim 1, characterized in that, The dual-mode QR code electronic tag is bonded to the inner surface of the barrel with corrosion-resistant epoxy structural adhesive, and RFID wireless reading is preferred; in the presence of metal shielding or strong electromagnetic interference, it automatically switches to QR code visual recognition.
3. The method according to claim 1, characterized in that, The initial pressure-temperature baseline curve is acquired by a temperature and pressure sensor, and its duration covers the entire liquid supply process. The acquired data is encrypted and written into the RFID user area of the QR code dual-mode electronic tag. It is then hashed together with batch process parameters and quality data to generate a digest, which is uploaded to the blockchain quality channel along with the original encrypted data to form tamper-proof barrel-liquid dynamic feature anchoring data.
4. The method according to claim 1, characterized in that, The security assessment process is driven by smart contracts and executed automatically according to tiered rules. The specific process includes: Historical compatibility pre-check: The contract reads all historical batches of the barrel on the chain with corrosion level-chemical group labels. If the liquid to be supplied has a conflicting combination with any of the already contained records in the incompatible reaction table, the process is immediately terminated and the incompatible code is returned. Structural integrity verification: Extract the encrypted initial pressure-temperature baseline summary written at the time of manufacture from the RFID area of the dual-mode electronic tag with the QR code, perform hash comparison with the baseline of the chemical tank under the same working conditions sampled locally in real time at the node, and determine structural fatigue or lining damage by Hamming distance, and refuse to disconnect the association; Lifetime threshold verification: On-chain dual counters for accumulated usage count and accumulated storage time. If either reaches the designed lifetime threshold, an irrevocable scrapping state is triggered, and any subsequent release request will be rolled back directly. Once the historical compatibility pre-check, structural integrity verification, and lifetime threshold check have all passed, the contract pushes the security assessment event to the FAB plant, the semiconductor plant, and the third-party inspection agency nodes. The three parties use their respective private keys to perform ECDSA signatures on the assessment result digest. When the signature content is consistent, the contract generates a security reset certificate with multi-party digital signatures and writes its hash value into a new block to complete the association removal.
5. The method according to claim 1, characterized in that, Based on the historical container liquid compatibility chemical group-corrosion level two-dimensional labeling system, the method for rapid matching and risk prevention is as follows: Before each liquid supply, the system automatically maps the chemical group and corrosivity level of the main hazardous components of the liquid to be contained, and writes the group-level code into the batch metadata. For combinations that do not trigger hard conflicts, the smart contract calculates a compatibility score based on the inter-family reactivity coefficient multiplied by the grade difference coefficient, and determines whether to return a suggestion to change buckets based on the compatibility score.
6. The method according to claim 1, characterized in that, The security reset certificate is a digital asset that can be managed in its entire lifecycle. The security reset certificate is modeled as a state machine on the blockchain, and its state includes valid, used, and revoked. It is valid when it is initially generated. When a new batch is successfully established, the state automatically changes to used. If fraud or error is found during the evaluation in subsequent stages, the state can be updated to revoked after a joint decision by authorized nodes.
7. The method according to claim 1, characterized in that, The method for generating the security reset certificate is as follows: it is encoded as a deterministic function of the smart contract. The function will only be triggered after the entire tiered security assessment process has been passed, and it will automatically assemble the signatures of all parties and other elements into a standardized certificate data packet.
8. The method according to claim 1, characterized in that, The lifecycle state is continuously accumulated on the chain in the form of a bucket-event-certificate triple, forming an irreversible directed event flow. The specific structure and management rules are as follows: Each event contains 6 required fields: event type, timestamp and block height, family-level code for this batch, security reset certificate hash, remaining lifetime percentage, and location hash. The smart contract has a built-in targeted event flow verification function to control the sequential jump of the event types; When packaging and adding to the blockchain, the hash of the security reset certificate from the previous cycle must be written into the new event field to form a one-way pointer; The client reconstructs the complete lifecycle graph of the bucket by recursively reading pointers, and calculates the cumulative number of uses, cumulative holding time, and corrosion level change curve in real time; The contract provides a read-only function that returns the remaining lifetime percentage and the hash of the recent event field location.
9. The method according to claim 1, characterized in that, The full lifecycle report is a dynamically generated multi-view interactive interface from the client. The data fusion and generation logic is as follows: The client scans the barrel's code and concurrently calls the blockchain API to read the directional event stream. It also reads the most recent encrypted sensor data from the RFID user area of the electronic tag and merges the on-chain and off-chain data as the data basis for the report. Based on aggregated data, a time series curve of corrosion level and a heatmap of cumulative usage intensity are automatically generated; each data point in the time series curve is anchored to a security reset certificate event on the chain that contains a family-level code. The report interface has an embedded read-only function that calculates and displays the remaining lifespan percentage in real time. When the value is lower than a preset threshold, it not only pushes a warning message, but also automatically parses the location hash into geographic coordinates and calls the map service to display the route navigation to the nearest recycling or detection point embedded in the interface.
10. The method according to claim 1, characterized in that, The trend chart is a visualization component that supports multi-dimensional data correlation analysis. Its generation and interaction logic is as follows: The trend chart uses a dual Y-axis design. The main Y-axis plots the time series of corrosion levels, while the secondary Y-axis simultaneously plots the decay curve of the remaining lifetime percentage. Each data point in the diagram is anchored to an on-chain event; Users can click on any data point to drill down and view the details of the security reset certificate corresponding to the event, the Hamming distance value of the structural integrity verification at that time, and the chemical group code of the contents. The trend chart's timeline supports dynamic scaling, allowing you to view the entire lifecycle since the bucket was enabled, or focus on a user-defined specific time period for detailed analysis of local trends.
11. The method according to claim 1, characterized in that, The trend chart backend uses an incremental on-chain-off-chain hybrid index: the on-chain stores event hashes and key fields, while the off-chain nodes maintain columnar storage files sharded by time, supporting random point lookups and batch exports; when users zoom in locally, the frontend uses a Bloom filter to locate the required columnar storage shards to achieve data retrieval and frontend rendering.
12. The method according to claim 1, characterized in that, The remaining lifespan warning push adopts a dual-channel mechanism of on-chain events + off-chain messages: when the on-chain contract detects that the remaining lifespan percentage is lower than the threshold, it triggers an event and writes it into the block; at the same time, the distributed message queue of the factory cloud platform sends warning messages with digital signatures to the user's mobile terminal, the recycling point ERP, and the logistics scheduling system in parallel.
13. The method according to claim 1, characterized in that, The information on the most recent recycling or detection point is dynamically generated by the AI path planning engine: The AI path planning engine is connected to the factory's digital twin system. When a remaining lifespan warning is triggered, it uses the current location as the starting point and the designated recycling or detection point as the ending point, and uses the minimum path safety risk and the highest passage efficiency as multi-objective optimization functions to perform real-time path calculation. The planned routes are pushed to the client interface and simultaneously updated to the factory's digital twin system for logistics scheduling and safety monitoring throughout the factory.
14. The method according to claim 1, characterized in that, The factory digital twin system is a virtual model that is synchronized with the physical factory environment in real time; its construction and association rules are as follows: The system continuously updates the workshop map and dynamic obstacle information through the deployment of LiDAR SLAM navigation modules and IoT sensor networks; The digital twin system maintains a digital mirror image of each corrosive liquid tank, whose status is synchronized with the lifecycle data and real-time location recorded on the blockchain; When performing AI path planning or simulating emergency response, high-fidelity simulation and deduction are performed based on the real-time data provided by the digital twin system.
