Toothpaste production raw material tracing method and system based on block chain

By using a blockchain-based traceability method, utilizing unique traceability identifiers and smart contract verification, combined with IoT data collection and encryption technology, the problems of data tampering and isolation in toothpaste production raw material traceability have been solved, achieving full-process data traceability and security.

CN121481569APending Publication Date: 2026-02-06ZHONGSHAN DOMY CHEM IND
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202511636523.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-10
Publication Date
2026-02-06

AI Technical Summary

Technical Problem

Existing methods for tracing the source of toothpaste production raw materials rely on centralized systems, which are easily tampered with, have isolated data, lack cross-entity collaboration mechanisms, have poor real-time performance, are difficult to form a complete chain, have low verification efficiency, have extensive access control, make it difficult for consumers to obtain real data, and are difficult to supervise, resulting in traceability becoming a mere formality.

Method used

By adopting a blockchain-based traceability method, basic information of raw materials is bound to a unique traceability identifier. Combined with IoT data collection, encryption technology and smart contract verification, the traceability of toothpaste raw materials from supply to end user is made tamper-proof. A hierarchical access control traceability system is built to meet the query needs of multiple parties.

Benefits of technology

It enables full-process data traceability and verification of toothpaste raw materials, improves supply chain trust and management sophistication, ensures product safety, and meets the diverse query needs of consumers and regulators.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121481569A_ABST
    Figure CN121481569A_ABST
Patent Text Reader

Abstract

The invention discloses a toothpaste production raw material tracing method and system based on a block chain, and relates to the field of block chains, and the method comprises the steps: distributing a unique identifier for a raw material, binding basic information to form an initial data packet, taking a supplier as an alliance chain node, uploading the initial data packet, and verifying the qualification through an intelligent contract; the transportation data is encrypted in real time through the Internet of Things and edge calculation and is uploaded, and a detection report deviation value is verified during warehousing; raw materials and finished product batches are associated in a production link, and process parameter compliance is automatically checked and then written into a block; in the warehouse logistics link, environment data and transportation information are integrated, and a tracing sub-block is generated after a goods receiver is verified through code scanning; an improved PBFT consensus mechanism and a cryptographic algorithm are adopted to ensure data security, and transparent tracing of consumers, supervisors and enterprises is realized through hierarchical authority management. The method has the advantages that the raw materials and the finished product full-link data are bound through the unique traceability identifier, non-tampering traceability of the toothpaste raw materials from supply to the terminal is achieved, and multi-party hierarchical query requirements and product safety are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing, and in particular to a blockchain-based method and system for tracing the source of raw materials used in toothpaste production. Background Technology

[0002] As consumers increasingly demand product safety and transparency, traditional toothpaste raw material traceability systems face challenges such as data silos, the risk of information tampering, and a lack of trust. The decentralized, immutable, and traceable characteristics of blockchain technology offer an innovative solution for raw material traceability.

[0003] Currently, most toothpaste raw material traceability methods on the market rely on centralized systems. Data is stored in a single institution, making it susceptible to tampering and forgery due to human error or system vulnerabilities, raising questions about its reliability. Data at each stage of the supply chain is isolated, lacking cross-entity collaboration mechanisms, often resulting in information gaps or inconsistencies, making it difficult to form a complete chain. The labeling system is chaotic, with loose links between raw materials and finished product batches, making it easy to break the chain during traceability. Data collection relies on manual entry, which is not real-time and prone to errors, and weak encryption technology leads to a high risk of information leakage. The verification process relies on manual review or endorsement by a single institution, which is inefficient and easily affected by subjective factors. Access management is lax, making it difficult for consumers to obtain accurate data, and regulators also find it difficult to conduct comprehensive and penetrating supervision, ultimately rendering traceability a mere formality and failing to effectively guarantee raw material safety and supply chain trust. Summary of the Invention

[0004] To improve existing methods and systems, this paper provides a blockchain-based method and system for tracing the raw materials used in toothpaste production. This method binds raw materials and finished products to data across the entire supply chain through a unique traceability identifier. It combines IoT data collection, encryption technology, and smart contract verification to achieve tamper-proof traceability of toothpaste raw materials from supply to end consumer, meeting the needs of multiple parties for tiered inquiries and ensuring product safety and supply chain trust.

[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: Blockchain-based methods for tracing the source of raw materials used in toothpaste production include: Based on the category attributes of toothpaste production raw materials, a unique traceability identifier is assigned to each batch of raw materials, a raw material basic information dataset is constructed, and the unique traceability identifier is bound to the basic information dataset to form an initial traceability data package; The supplier is designated as an authorized node in the blockchain consortium chain. The initial traceability data package is uploaded to the consortium chain node. The validity of the supplier's digital certificate and the consistency of the hash value of the qualification document are verified through smart contracts. If the verification is successful, the data is written to the blockchain. Data during transportation is collected in real time by IoT terminal devices, pre-processed by edge computing nodes and encrypted using the national cryptographic SM4 algorithm. The data is then transmitted to blockchain nodes to automatically trigger data on-chain and generate traceability sub-blocks for transportation links. After the raw materials arrive at the toothpaste manufacturing company, they undergo warehousing inspection. Key raw materials are subject to special testing, and test reports are generated and uploaded to the blockchain. The deviation between the company's self-inspection data and third-party test data is compared through smart contracts, and the test data is written into the blockchain to form a traceability block for the inspection process. In the toothpaste production process, by linking raw materials and finished product batches, and combining real-time collection of production process parameters and equipment status, the blockchain smart contract automatically verifies the compliance of the data and binds the entire production data into the block. After the finished toothpaste is put into storage, the storage node collects storage environment data and binds it with the finished product batch number and the associated raw material traceability mark, and then puts it on the blockchain. After the finished product is put out of the warehouse, the terminal logistics node collects transportation data and scans the code to verify the recipient, integrates the storage data and the terminal logistics data, and generates a storage and logistics traceability block. Based on the improved PBFT consensus mechanism, multi-role node collaborative verification is carried out. Data immutability is ensured through hash encryption and digital signatures. A hierarchical access control traceability system is built, allowing consumers, regulators, and enterprises to query data based on their permissions, forming a transparent traceability system across the entire chain.

[0006] Preferably, the step of assigning a unique traceability identifier to each batch of raw materials based on the category attributes of toothpaste production raw materials, constructing a raw material basic information dataset, and binding the unique traceability identifier to the basic information dataset to form an initial traceability data package specifically includes: Each batch of raw materials for toothpaste production is assigned a unique identifier, including supplier code, raw material type code, production batch number, timestamp, and blockchain hash prefix; Collect information on each batch of raw materials to build a basic information dataset, including raw material name, chemical composition and content, production process parameters, shelf life threshold, storage environment requirements, supplier name and qualification number; The generated unique traceability identifier is associated and bound with the basic information dataset and integrated into the initial traceability data package.

[0007] Preferably, the step of using the supplier as an authorized node in the blockchain consortium chain, uploading the initial traceability data package to the consortium chain node, and verifying the validity of the supplier's digital certificate and the consistency of the hash value of the qualification document through a smart contract, with the verified data being written to the blockchain, specifically includes: As an authorized node in the blockchain consortium chain, the supplier logs into the traceability system through a dedicated node digital certificate and verifies the legality of the certificate; After logging in, upload the generated initial traceability data package to the consortium blockchain node, and also upload the raw material factory test report, production license, and third-party testing agency certification documents; The blockchain system verifies the legitimacy of the supplier's digital certificate through smart contracts and compares the hash value of the qualification document with the preset benchmark value. After verification, the supplier node information, initial raw material traceability data, and qualification documents will be written into the blockchain.

[0008] Preferably, the step of collecting data in real time during transportation via IoT terminal devices, preprocessing it through edge computing nodes, encrypting it using the national cryptographic SM4 algorithm, and transmitting it to blockchain nodes to automatically trigger data on-chaining and generate a transportation traceability sub-block specifically includes: Based on IoT terminal devices, the system collects transportation location data, monitors environmental parameters, and records transportation bumps. By scanning the RFID tags on the raw material packaging that are bound to the unique traceability identifier, the loading and unloading status can be confirmed and the transportation time and transit node information can be recorded. The collected transportation data is deduplicated and outliers are removed by edge computing nodes. The processed data is then encrypted using the national cryptographic SM4 algorithm and transmitted to the blockchain node. Based on the data on-chain process triggered by smart contracts, a traceability sub-block for the transportation process is generated, and the sub-block is linked to the initial block in a chain.

[0009] Preferably, after the raw materials arrive at the toothpaste manufacturing enterprise, an incoming inspection is carried out, key raw materials are subjected to special testing, test reports are generated and uploaded to the blockchain, and the deviation values ​​between the enterprise's self-inspection data and third-party test data are compared through smart contracts. The test data is then written into the blockchain to form a traceability block for the inspection process. Specifically, this includes: After the raw materials arrive at the toothpaste manufacturing company, the basic information and transportation data of the batch of raw materials are retrieved from the blockchain by scanning the RFID tags of the raw materials. Based on the inspection standards, the appearance, physicochemical indicators and safety indicators of raw materials are tested, the self-inspection results are recorded, third-party testing agency nodes are introduced to conduct special tests, test reports are generated and uploaded to the blockchain; The blockchain system compares the deviation between the enterprise's self-inspection data and the third-party testing data through smart contracts. If the deviation exceeds the threshold, the process of warehousing the batch of raw materials is frozen, triggering a re-inspection mechanism. After verification, the inspection data is written into the blockchain to form a traceability block for the inspection process, generating a hash value for the qualified entry certificate, which is then bound to the unique traceability identifier of the raw materials.

[0010] Preferably, in the toothpaste production process, by associating raw materials with finished product batches, combining real-time collection of production process parameters and equipment status, and after the blockchain smart contract automatically verifies the data compliance, the entire production data is bound and written into the blockchain. Specifically, this includes: When raw materials are put into production, the unique traceability identifier of each batch of raw materials is identified by the RFID tag on the raw material packaging. The raw material batch identifiers of the same batch of toothpaste are associated and a raw material batch-finished product batch mapping table is formed. Real-time collection of process data during production, recording of operating status data of production equipment, and uploading of mapping relationship table, process parameter data and equipment operating status data to blockchain system; The blockchain system initiates a smart contract to verify whether the uploaded process parameters meet the preset standard range. After the verification is passed, the production data is written into the production traceability block.

[0011] Preferably, after the finished toothpaste is put into storage, the warehousing node collects storage environment data and binds it with the finished product batch number and associated raw material traceability identifier, and then uploads it to the blockchain. After the finished product leaves the warehouse, the terminal logistics node collects transportation data and scans the code to verify the recipient, integrates the warehousing data and terminal logistics data, and generates a warehousing and logistics traceability block, specifically including: After the finished toothpaste is transported to the warehousing center, the warehousing nodes collect storage environment data through IoT devices, and record the inventory quantity, the time of entry into the warehouse and the planned time of exit from the warehouse. The collected warehousing data is bound to the finished product batch number and the unique traceability identifier of the raw materials associated with the finished product, and the integrated warehousing data is uploaded to the blockchain system. After the finished product leaves the warehouse, the terminal logistics node collects transportation data in real time and confirms the delivery status through the traceability QR code on the finished product packaging that is associated with the raw material traceability mark; The blockchain system integrates warehousing data and terminal logistics data to generate warehousing and logistics traceability blocks, and establishes a chain link with the production process blocks.

[0012] Preferably, the multi-role node collaborative verification based on the improved PBFT consensus mechanism, the data immutability guaranteed by hash encryption and digital signature, and the construction of a hierarchical access control traceability system, where consumers, regulators, and enterprises can query data based on their permissions, forming a transparent traceability system across the entire chain, specifically include: Blockchain consortium chains utilize an improved and practical Byzantine fault-tolerant consensus mechanism for collaborative verification among multiple roles of nodes. When new traceability data is added, the data is distributed to all consensus nodes. Each node independently verifies the data hash value. If more than 2 / 3 of the nodes pass the verification, the block is confirmed and written to the blockchain. All on-chain data is protected by a combination of hash encryption and digital signature. Each node stores a complete copy of the blockchain data. Any attempt by a node to tamper with the data will result in the block hash value of that node being inconsistent with other nodes and will be judged as invalid data by the consensus mechanism.

[0013] Furthermore, a blockchain-based traceability system for toothpaste production raw materials is proposed, including: Traceability Identification Management Module: Generates a unique traceability identifier for each batch of raw materials, associates it with basic raw material information, and forms an initial data package; Supplier Node Management Module: Verifies supplier qualifications and authorizes them as consortium blockchain nodes, verifies their identity through digital certificates, and ensures the legality of data upload permissions; Smart contract verification module: Automatically verifies the hash value of supplier qualification documents, the validity of digital certificates, and data compliance, and blocks abnormal data from being uploaded to the blockchain; Data acquisition module: Collects real-time data on the transportation environment and production equipment status through IoT devices; Edge computing processing module: Denoises and compresses the raw data from the transportation production process, and transmits it to the blockchain node after encryption using the SM4 algorithm; Inspection and comparison module: Integrates enterprise self-inspection and third-party testing reports, analyzes deviation values ​​through smart contracts, and triggers re-inspection or freezes problematic batches; Warehouse and logistics tracking module: Monitors the finished product storage environment, associates raw materials and finished products with identification, records inbound and outbound logistics data, and generates full-chain logistics blocks; Consensus and Security Module: Based on the improved PBFT mechanism, it realizes multi-node collaborative verification and ensures data immutability through hash encryption and digital signature; Processor: The processor is used to handle the calculation process of each formula and the construction calculation process of each model.

[0014] Compared with the prior art, the advantages of the present invention are: By binding raw material information with a unique traceability identifier and combining it with the consortium blockchain's authorized node mechanism and smart contract verification, automatic verification of supplier qualifications and testing data is achieved, ensuring the authenticity and compliance of source data. The Internet of Things (IoT) collects data in real time from all stages of transportation, production, and warehousing. After edge computing preprocessing and encryption using the national cryptographic SM4 algorithm, the data is uploaded to the blockchain. Combined with an improved PBFT consensus mechanism and hash encryption and digital signature technology, data tampering is technically prevented, and the efficiency of multi-node collaborative verification is improved. Simultaneously, by linking raw materials and finished product batches and integrating enterprise self-inspection and third-party testing data, traceability and verifiability of the entire production process data are achieved. The tiered permission design meets the differentiated query needs of consumers, regulators, and enterprises, effectively solving pain points such as unclear toothpaste raw material sources, disconnected supply chain data, and high regulatory difficulty. This strengthens product safety and improves supply chain trust and management sophistication. Attached Figure Description

[0015] Figure 1 This is a schematic diagram of the method proposed in this invention; Figure 2 This is a schematic diagram illustrating the formation of the initial source tracing data packet proposed in this invention; Figure 3 This is a schematic diagram of the initial traceability data packet being uploaded to the blockchain as proposed in this invention; Figure 4 This is a schematic diagram of the sub-block for generating traceability in the transportation process proposed in this invention; Figure 5 This is a schematic diagram of the traceability block for the formation and inspection process proposed in this invention; Figure 6 This is a schematic diagram of the end-to-end production data binding and writing block proposed in this invention; Figure 7 This is a schematic diagram of the generated warehousing and logistics traceability block proposed in this invention; Figure 8 This is a schematic diagram illustrating the formation of a fully transparent traceability system proposed in this invention. Detailed Implementation

[0016] The following description is intended to disclose the invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art.

[0017] A blockchain-based traceability system for toothpaste production raw materials includes: Traceability Identification Management Module: Generates a unique traceability identifier for each batch of raw materials, associates it with basic raw material information, and forms an initial data package; Supplier Node Management Module: Verifies supplier qualifications and authorizes them as consortium blockchain nodes, verifies their identity through digital certificates, and ensures the legality of data upload permissions; Smart contract verification module: Automatically verifies the hash value of supplier qualification documents, the validity of digital certificates, and data compliance, and blocks abnormal data from being uploaded to the blockchain; Data acquisition module: Collects real-time data on the transportation environment and production equipment status through IoT devices; Edge computing processing module: Denoises and compresses the raw data from the transportation production process, and transmits it to the blockchain node after encryption using the SM4 algorithm; Inspection and comparison module: Integrates enterprise self-inspection and third-party testing reports, analyzes deviation values ​​through smart contracts, and triggers re-inspection or freezes problematic batches; Warehouse and logistics tracking module: Monitors the finished product storage environment, associates raw materials and finished products with identification, records inbound and outbound logistics data, and generates full-chain logistics blocks; Consensus and Security Module: Based on the improved PBFT mechanism, it realizes multi-node collaborative verification and ensures data immutability through hash encryption and digital signature; Processor: The processor is used to handle the calculation process of each formula and the construction calculation process of each model.

[0018] See Figure 1 As shown, the blockchain-based method for tracing the raw materials used in toothpaste production includes: Step 1: Assign a unique traceability identifier to each batch of raw materials based on the category attributes of the raw materials used in toothpaste production, construct a basic information dataset of raw materials, and bind the unique traceability identifier to the basic information dataset to form an initial traceability data package; Step 2: Designate the supplier as an authorized node in the blockchain consortium chain, upload the initial traceability data package to the consortium chain node, and verify the validity of the supplier's digital certificate and the consistency of the hash value of the qualification document through a smart contract. If the verification is successful, write it to the blockchain. Step 3: Collect data in real time during transportation through IoT terminal devices, preprocess the data through edge computing nodes, encrypt it using the national cryptographic SM4 algorithm, and transmit it to the blockchain node to automatically trigger data on-chain and generate a traceability sub-block for the transportation process; Step 4: After the raw materials arrive at the toothpaste manufacturing company, an incoming inspection is carried out. Special tests are conducted on key raw materials, test reports are generated and uploaded to the blockchain, and the deviation values ​​between the company's self-inspection data and third-party test data are compared through smart contracts. The test data is then written into the blockchain to form a traceability block for the inspection process. Step 5: In the toothpaste production process, by linking raw materials and finished product batches, and combining real-time collection of production process parameters and equipment status, the blockchain smart contract automatically verifies the compliance of the data and binds the entire production data into the blockchain. Step Six: After the finished toothpaste is put into storage, the warehousing node collects storage environment data and binds it with the finished product batch number and the associated raw material traceability identifier, and then puts it on the blockchain. After the finished product is put out of the warehouse, the terminal logistics node collects transportation data and scans the code to verify the recipient, integrates the warehousing data and terminal logistics data, and generates a warehousing and logistics traceability block. Step 7: Based on the improved PBFT consensus mechanism, conduct multi-role node collaborative verification, ensure data immutability through hash encryption and digital signature, build a hierarchical access control traceability system, and enable consumers, regulators, and enterprises to query data based on their permissions, forming a transparent traceability system across the entire chain.

[0019] See Figure 2 As shown, a unique traceability identifier is assigned to each batch of raw materials based on the category attributes of the raw materials used in toothpaste production. A basic information dataset of raw materials is constructed, and the unique traceability identifier is bound to the basic information dataset to form the initial traceability data package, which specifically includes: Each batch of raw materials for toothpaste production is assigned a unique identifier, including supplier code, raw material type code, production batch number, timestamp, and blockchain hash prefix; Collect information on each batch of raw materials to build a basic information dataset, including raw material name, chemical composition and content, production process parameters, shelf life threshold, storage environment requirements, supplier name and qualification number; The generated unique traceability identifier is associated and bound with the basic information dataset and integrated into the initial traceability data package.

[0020] Specifically, in the initial data entry module of the blockchain traceability system, the generated unique traceability identifier is associated and bound with the basic information dataset of the corresponding batch of raw materials. This ensures that each identifier corresponds to only one dataset, avoiding situations where multiple identifiers correspond to the same dataset or one identifier corresponds to multiple datasets. After binding, the data integrity is verified to check whether each component of the identifier is complete and whether there are any missing basic information. If any missing or incorrect information is found, it is promptly reported to the supplier for supplementation and correction until all information is complete and accurate, forming an initial traceability data package that can be used for subsequent on-chain operations.

[0021] See Figure 3 As shown, the supplier is designated as an authorized node in the blockchain consortium chain. The initial traceability data package is uploaded to the consortium chain node, and the validity of the supplier's digital certificate and the consistency of the hash value of the qualification document are verified through a smart contract. Once the verification is successful, the data is written to the blockchain. Specifically, this includes: As an authorized node in the blockchain consortium chain, the supplier logs into the traceability system through a dedicated node digital certificate and verifies the legality of the certificate; After logging in, upload the generated initial traceability data package to the consortium blockchain node, and also upload the raw material factory test report, production license, and third-party testing agency certification documents; The blockchain system verifies the legitimacy of the supplier's digital certificate through smart contracts and compares the hash value of the qualification document with the preset benchmark value. After verification, the supplier node information, initial raw material traceability data, and qualification documents will be written into the blockchain.

[0022] Specifically, the smart contract pre-stores two core verification rules: First, the validity rule for qualification documents, which automatically extracts the validity information of production licenses and third-party certification documents and compares it with the current system time. If any document has expired, an alarm mechanism is immediately triggered, and the system sends an alarm notification to the supplier node and the consortium blockchain management node. Second, the consistency rule for file hash values, which involves the consortium blockchain management node generating and storing a baseline hash value for the qualification documents of compliant suppliers in advance using the SHA-256 algorithm. The smart contract calculates the hash value of the qualification documents uploaded by the supplier in real time and compares it with the baseline hash value. If the deviation exceeds the allowable range, it is determined that the document may have been tampered with, the information of that batch of raw materials is rejected from being uploaded to the blockchain, and the supplier is required to re-upload the original, unmodified documents. Once the smart contract verification is successful, the system will organize the data according to the block header-block body structure and write it to the blockchain: the block header contains the hash value of the previous block, the timestamp of the current block generation, and the Merkle root; the block body stores the encrypted digest of the initial traceability data package and qualification documents; after the block is generated, the system will send a confirmation notification of successful data upload to the supplier nodes and synchronously update the blockchain data copies of each node in the consortium blockchain to ensure that all authorized nodes can obtain the initial traceability information of this batch of raw materials, laying the foundation for data association in subsequent transportation and inspection stages.

[0023] See Figure 4 As shown, data collected in real time during transportation via IoT terminal devices, pre-processed by edge computing nodes, encrypted using the national cryptographic algorithm SM4, and transmitted to blockchain nodes automatically triggers data uploading to the blockchain, generating a traceability sub-block for the transportation process. Specifically, this includes: Based on IoT terminal devices, the system collects transportation location data, monitors environmental parameters, and records transportation bumps. By scanning the RFID tags on the raw material packaging that are bound to the unique traceability identifier, the loading and unloading status can be confirmed and the transportation time and transit node information can be recorded. The collected transportation data is deduplicated and outliers are removed by edge computing nodes. The processed data is then encrypted using the national cryptographic SM4 algorithm and transmitted to the blockchain node. Based on the data on-chain process triggered by smart contracts, a traceability sub-block for the transportation process is generated, and the sub-block is linked to the initial block in a chain.

[0024] Specifically, the system initiates real-time data collection of the latitude and longitude coordinates of the transport vehicle across the entire transportation chain, synchronously generating location timestamps to form a complete transportation route trajectory; temperature and humidity sensors continuously monitor the raw material storage environment, and when the temperature exceeds the 0-30℃ range or the humidity exceeds the 30%-60% range, the equipment immediately triggers a local audible and visual alarm, and simultaneously sends an anomaly notification via mobile network to designated terminals of suppliers, manufacturers, and logistics company personnel, including the anomaly type, occurrence time, and current location; vibration sensors monitor the vibration intensity during transportation in real time, and when the vibration acceleration exceeds 5g, automatically record the duration and peak value of the abnormal vibration, and prioritize its collection and storage along with abnormal environmental data; in addition, when the transport vehicle arrives at a transfer station, the equipment automatically collects transfer information, including the transfer station name, arrival time, departure time, and the name and employee number of the station operator, forming a transfer node data chain; Edge computing nodes use the national cryptographic algorithm SM4 to symmetrically encrypt the standardized transportation dataset, generating encrypted data packets. These packets are then transmitted to designated nodes on the blockchain consortium chain via HTTPS. Upon receiving the encrypted data packets, the blockchain nodes automatically invoke a pre-defined smart contract. The contract first verifies the encryption integrity of the data packets, then checks whether the unique traceability identifier in the data matches the initial traceability data already on the chain. After confirming that the data ownership is correct, it automatically extracts key information from the data packets to generate a transportation traceability sub-block. The sub-block header contains the hash value of the initial block, the timestamp of the current block generation, and the Merkle root of the transportation data. The block body stores the encrypted transportation dataset digest, ensuring an immutable chain association with the initial block.

[0025] See Figure 5 As shown, after the raw materials arrive at the toothpaste manufacturing company, an incoming inspection is carried out. Specialized tests are conducted on key raw materials, generating test reports which are uploaded to the blockchain. A smart contract compares the deviation between the company's self-inspection data and third-party testing data, and the test data is written into the blockchain, forming a traceability block for the inspection process. Specifically, this includes: After the raw materials arrive at the toothpaste manufacturing company, the basic information and transportation data of the batch of raw materials are retrieved from the blockchain by scanning the RFID tags of the raw materials. Based on the inspection standards, the appearance, physicochemical indicators and safety indicators of raw materials are tested, the self-inspection results are recorded, third-party testing agency nodes are introduced to conduct special tests, test reports are generated and uploaded to the blockchain; The blockchain system compares the deviation between the enterprise's self-inspection data and the third-party testing data through smart contracts. If the deviation exceeds the threshold, the process of warehousing the batch of raw materials is frozen, triggering a re-inspection mechanism. After verification, the inspection data is written into the blockchain to form a traceability block for the inspection process, generating a hash value for the qualified entry certificate, which is then bound to the unique traceability identifier of the raw materials.

[0026] Specifically, the blockchain system automatically invokes a pre-defined cross-validation smart contract. The contract first extracts self-inspection data uploaded by the enterprise's warehousing nodes and specialized testing data uploaded by third-party testing nodes, matching them according to the dimensions of the same indicator, the same batch, and different nodes. Then, the contract calculates the deviation rate between the two sets of data and applies different deviation threshold rules based on the type of raw materials. If the deviation rate of all indicators is within the allowable range, the contract determines that the verification is passed and automatically generates a qualified inspection result. If the deviation of any indicator exceeds the threshold, the contract immediately freezes the warehousing process of that batch of raw materials, sends an alarm notification of excessive data deviation to the warehousing node, the third-party node, and the consortium blockchain management node, and triggers a re-inspection mechanism, requiring both parties to resample and retest and upload new data until the deviation meets the requirements.

[0027] See Figure 6As shown, in the toothpaste production process, by linking raw materials and finished product batches, and combining real-time collection of production process parameters and equipment status, the blockchain smart contract automatically verifies the data compliance and binds the entire production data into the blockchain. Specifically, this includes: When raw materials are put into production, the unique traceability identifier of each batch of raw materials is identified by the RFID tag on the raw material packaging. The raw material batch identifiers of the same batch of toothpaste are associated and a raw material batch-finished product batch mapping table is formed. Real-time collection of process data during production, recording of operating status data of production equipment, and uploading of mapping relationship table, process parameter data and equipment operating status data to blockchain system; The blockchain system initiates a smart contract to verify whether the uploaded process parameters meet the preset standard range. After the verification is passed, the production data is written into the production traceability block.

[0028] Specifically, when raw materials enter the production line through the feeding port, the RFID reader automatically scans the RFID tags on the raw material packaging, reads the unique traceability identifier, and uploads it to the production node system. The system categorizes all raw material identifiers put into production within the same time period according to the finished product production batch, generating a raw material batch-finished product batch mapping table. This table is stored using a Merkle tree structure: each raw material batch identifier serves as a leaf node of the tree, and is aggregated upwards layer by layer through hash calculation, ultimately forming a Merkle tree with the finished product batch number as the root node. This ensures both the accurate association between raw materials and finished products and allows for quick verification of the completeness of the associated data through the root node. After the mapping table is generated, the system automatically marks the finished product batch number and binds it to the raw material identifier for storage.

[0029] See Figure 7 As shown, after the finished toothpaste is put into storage, the warehousing node collects storage environment data and binds it with the finished product batch number and associated raw material traceability identifier, and then uploads it to the blockchain. After the finished product leaves the warehouse, the terminal logistics node collects transportation data and scans the code to verify the recipient, integrating the warehousing data and terminal logistics data to generate a warehousing and logistics traceability block, which specifically includes: After the finished toothpaste is transported to the warehousing center, the warehousing nodes collect storage environment data through IoT devices, and record the inventory quantity, the time of entry into the warehouse and the planned time of exit from the warehouse. The collected warehousing data is bound to the finished product batch number and the unique traceability identifier of the raw materials associated with the finished product, and the integrated warehousing data is uploaded to the blockchain system. After the finished product leaves the warehouse, the terminal logistics node collects transportation data in real time and confirms the delivery status through the traceability QR code on the finished product packaging that is associated with the raw material traceability mark; The blockchain system integrates warehousing data and terminal logistics data to generate warehousing and logistics traceability blocks, and establishes a chain link with the production process blocks.

[0030] Specifically, the system integrates the warehousing dataset with the terminal logistics dataset and transmits it to the blockchain node through an encrypted channel, triggering smart contract verification: verifying data integrity and consistency between finished product batches and raw material identifiers; after successful verification, a warehousing and logistics traceability block is generated according to the block header-block body structure: the block header contains the hash value of the previous production stage block, the current timestamp, and the dataset Merkle root; the block body stores the encrypted dataset digest; after the block is generated, it is synchronized to each authorized node of the consortium blockchain, and the system sends a data upload success notification to logistics companies and retailers; at the same time, query permissions are opened: consumers can scan the finished product QR code to view logistics node information, and regulatory authorities can retrieve complete warehousing and logistics data to ensure full-chain traceability coverage.

[0031] See Figure 8 As shown, a multi-role node collaborative verification system is implemented based on an improved PBFT consensus mechanism. Data immutability is ensured through hash encryption and digital signatures. A hierarchical access control traceability system is constructed, allowing consumers, regulators, and enterprises to query data based on their permissions, forming a transparent, end-to-end traceability system. Specifically, this includes: Blockchain consortium chains utilize an improved and practical Byzantine fault-tolerant consensus mechanism for collaborative verification among multiple roles of nodes. When new traceability data is added, the data is distributed to all consensus nodes. Each node independently verifies the data hash value. If more than 2 / 3 of the nodes pass the verification, the block is confirmed and written to the blockchain. All on-chain data is protected by a combination of hash encryption and digital signature. Each node stores a complete copy of the blockchain data. Any attempt by a node to tamper with the data will result in the block hash value of that node being inconsistent with other nodes and will be judged as invalid data by the consensus mechanism.

[0032] Specifically, all data that passes consensus undergoes a dual process of hash encryption and digital signature: the SHA-256 algorithm is used to generate a fixed-length hash value for the data, and then the node to which the data belongs signs the hash value with its private key, forming a complete data packet consisting of data, hash value, and node signature. When the data packet is written to the blockchain, the system stores it in a block header-block body structure. The block header contains the hash value of the data packet and the hash value of the previous block, and the block body stores the encrypted data packet digest. At the same time, the consortium blockchain initiates full node replica synchronization: each consensus node receives newly generated block data in real time, automatically verifies the continuity of the block header hash value, and updates the locally stored complete blockchain replica after the verification is passed. This ensures that if any node's data is tampered with, it can be quickly detected by comparing with replicas of other nodes, thus guaranteeing the immutability of data from the storage level.

[0033] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, the above description focuses on specific embodiments of this specification. Additionally, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0034] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

[0035] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A blockchain-based method for tracing the source of raw materials in toothpaste production, characterized in that: include: Based on the category attributes of toothpaste production raw materials, a unique traceability identifier is assigned to each batch of raw materials, a raw material basic information dataset is constructed, and the unique traceability identifier is bound to the basic information dataset to form an initial traceability data package; The supplier is designated as an authorized node in the blockchain consortium chain. The initial traceability data package is uploaded to the consortium chain node. The validity of the supplier's digital certificate and the consistency of the hash value of the qualification document are verified through smart contracts. If the verification is successful, the data is written to the blockchain. Data during transportation is collected in real time by IoT terminal devices, pre-processed by edge computing nodes and encrypted using the national cryptographic SM4 algorithm. The data is then transmitted to blockchain nodes to automatically trigger data on-chain and generate traceability sub-blocks for transportation links. After the raw materials arrive at the toothpaste manufacturing company, they undergo warehousing inspection. Key raw materials are subject to special testing, and test reports are generated and uploaded to the blockchain. The deviation between the company's self-inspection data and third-party test data is compared through smart contracts, and the test data is written into the blockchain to form a traceability block for the inspection process. In the toothpaste production process, by linking raw materials and finished product batches, and combining real-time collection of production process parameters and equipment status, the blockchain smart contract automatically verifies the compliance of the data and binds the entire production data into the block. After the finished toothpaste is put into storage, the storage node collects storage environment data and binds it with the finished product batch number and the associated raw material traceability mark, and then puts it on the blockchain. After the finished product is put out of the warehouse, the terminal logistics node collects transportation data and scans the code to verify the recipient, integrates the storage data and the terminal logistics data, and generates a storage and logistics traceability block. Based on the improved PBFT consensus mechanism, multi-role node collaborative verification is carried out. Data immutability is ensured through hash encryption and digital signatures. A hierarchical access control traceability system is built, allowing consumers, regulators, and enterprises to query data based on their permissions, forming a transparent traceability system across the entire chain.

2. The method for tracing the source of toothpaste production raw materials based on blockchain according to claim 1, characterized in that, The method of assigning a unique traceability identifier to each batch of raw materials based on the category attributes of toothpaste production raw materials, constructing a raw material basic information dataset, and binding the unique traceability identifier to the basic information dataset to form an initial traceability data package specifically includes: Each batch of raw materials for toothpaste production is assigned a unique identifier, including supplier code, raw material type code, production batch number, timestamp, and blockchain hash prefix; Collect information on each batch of raw materials to build a basic information dataset, including raw material name, chemical composition and content, production process parameters, shelf life threshold, storage environment requirements, supplier name and qualification number; The generated unique traceability identifier is associated and bound with the basic information dataset and integrated into the initial traceability data package.

3. The method for tracing the source of toothpaste production raw materials based on blockchain according to claim 1, characterized in that, The process of designating the supplier as an authorized node in the blockchain consortium chain, uploading the initial traceability data package to the consortium chain node, and verifying the validity of the supplier's digital certificate and the consistency of the hash value of the qualification document through a smart contract, with the verified data being written to the blockchain, specifically includes: As an authorized node in the blockchain consortium chain, the supplier logs into the traceability system through a dedicated node digital certificate and verifies the legality of the certificate; After logging in, upload the generated initial traceability data package to the consortium blockchain node, and also upload the raw material factory test report, production license, and third-party testing agency certification documents; The blockchain system verifies the legitimacy of the supplier's digital certificate through smart contracts and compares the hash value of the qualification document with the preset benchmark value. After verification, the supplier node information, initial raw material traceability data, and qualification documents will be written into the blockchain.

4. The method for tracing the source of toothpaste production raw materials based on blockchain according to claim 1, characterized in that, The process of collecting data in real time during transportation via IoT terminal devices, preprocessing it through edge computing nodes, encrypting it using the national cryptographic SM4 algorithm, and transmitting it to blockchain nodes to automatically trigger data on-chaining and generate a transportation traceability sub-block specifically includes: Based on IoT terminal devices, the system collects transportation location data, monitors environmental parameters, and records transportation bumps. By scanning the RFID tags on the raw material packaging that are bound to the unique traceability identifier, the loading and unloading status can be confirmed and the transportation time and transit node information can be recorded. The collected transportation data is deduplicated and outliers are removed by edge computing nodes. The processed data is then encrypted using the national cryptographic SM4 algorithm and transmitted to the blockchain node. Based on the data on-chain process triggered by smart contracts, a traceability sub-block for the transportation process is generated, and the sub-block is linked to the initial block in a chain.

5. The method for tracing the source of toothpaste production raw materials based on blockchain according to claim 1, characterized in that, After the raw materials arrive at the toothpaste manufacturing company, they undergo warehousing inspection. Key raw materials are subject to specialized testing, and test reports are generated and uploaded to the blockchain. A smart contract compares the deviation between the company's self-inspection data and third-party testing data, and the test data is written into the blockchain to form a traceability block for the inspection process. Specifically, this includes: After the raw materials arrive at the toothpaste manufacturing company, the basic information and transportation data of the batch of raw materials are retrieved from the blockchain by scanning the RFID tags of the raw materials. Based on the inspection standards, the appearance, physicochemical indicators and safety indicators of raw materials are tested, the self-inspection results are recorded, third-party testing agency nodes are introduced to conduct special tests, test reports are generated and uploaded to the blockchain; The blockchain system compares the deviation between the enterprise's self-inspection data and the third-party testing data through smart contracts. If the deviation exceeds the threshold, the process of warehousing the batch of raw materials is frozen, triggering a re-inspection mechanism. After verification, the inspection data is written into the blockchain to form a traceability block for the inspection process, generating a hash value for the qualified entry certificate, which is then bound to the unique traceability identifier of the raw materials.

6. The method for tracing the source of raw materials for toothpaste production based on blockchain according to claim 1, characterized in that, In the toothpaste production process, by linking raw materials and finished product batches, and combining real-time collection of production process parameters and equipment status, the blockchain smart contract automatically verifies data compliance and binds the entire production process data into the blockchain. Specifically, this includes: When raw materials are put into production, the unique traceability identifier of each batch of raw materials is identified by the RFID tag on the raw material packaging. The raw material batch identifiers of the same batch of toothpaste are associated and a raw material batch-finished product batch mapping table is formed. Real-time collection of process data during production, recording of operating status data of production equipment, and uploading of mapping relationship table, process parameter data and equipment operating status data to blockchain system; The blockchain system initiates a smart contract to verify whether the uploaded process parameters meet the preset standard range. After the verification is passed, the production data is written into the production traceability block.

7. The method for tracing the source of raw materials for toothpaste production based on blockchain according to claim 1, characterized in that, After the finished toothpaste is stored, the warehousing node collects storage environment data and binds it with the finished product batch number and associated raw material traceability identifier, then uploads it to the blockchain. After the finished product leaves the warehouse, the terminal logistics node collects transportation data and scans codes to verify the recipient, integrating the warehousing data and terminal logistics data to generate a warehousing and logistics traceability block, specifically including: After the finished toothpaste is transported to the warehousing center, the warehousing nodes collect storage environment data through IoT devices, and record the inventory quantity, the time of entry into the warehouse and the planned time of exit from the warehouse. The collected warehousing data is bound to the finished product batch number and the unique traceability identifier of the raw materials associated with the finished product, and the integrated warehousing data is uploaded to the blockchain system. After the finished product leaves the warehouse, the terminal logistics node collects transportation data in real time and confirms the delivery status through the traceability QR code on the finished product packaging that is associated with the raw material traceability mark; The blockchain system integrates warehousing data and terminal logistics data to generate warehousing and logistics traceability blocks, and establishes a chain link with the production process blocks.

8. The method for tracing the source of toothpaste production raw materials based on blockchain according to claim 1, characterized in that, The aforementioned multi-role node collaborative verification based on the improved PBFT consensus mechanism, ensuring data immutability through hash encryption and digital signatures, and constructing a hierarchical access control traceability system, allows consumers, regulators, and enterprises to query data based on their permissions, forming a transparent end-to-end traceability system. Specifically, this includes: Blockchain consortium chains utilize an improved and practical Byzantine fault-tolerant consensus mechanism for collaborative verification among multiple roles of nodes. When new traceability data is added, the data is distributed to all consensus nodes. Each node independently verifies the data hash value. If more than 2 / 3 of the nodes pass the verification, the block is confirmed and written to the blockchain. All on-chain data is protected by a combination of hash encryption and digital signature. Each node stores a complete copy of the blockchain data. Any attempt by a node to tamper with the data will result in the block hash value of that node being inconsistent with other nodes and will be judged as invalid data by the consensus mechanism.

9. A blockchain-based toothpaste production raw material traceability system, used to implement the blockchain-based toothpaste production raw material traceability method as described in any one of claims 1-8, characterized in that, include: Traceability Identification Management Module: Generates a unique traceability identifier for each batch of raw materials, associates it with basic raw material information, and forms an initial data package; Supplier Node Management Module: Verifies supplier qualifications and authorizes them as consortium blockchain nodes, verifies their identity through digital certificates, and ensures the legality of data upload permissions; Smart contract verification module: Automatically verifies the hash value of supplier qualification documents, the validity of digital certificates, and data compliance, and blocks abnormal data from being uploaded to the blockchain; Data acquisition module: Collects real-time data on the transportation environment and production equipment status through IoT devices; Edge computing processing module: Denoises and compresses the raw data from the transportation production process, and transmits it to the blockchain node after encryption using the SM4 algorithm; Inspection and comparison module: Integrates enterprise self-inspection and third-party testing reports, analyzes deviation values ​​through smart contracts, and triggers re-inspection or freezes problematic batches; Warehouse and logistics tracking module: Monitors the finished product storage environment, associates raw materials and finished products with identification, records inbound and outbound logistics data, and generates full-chain logistics blocks; Consensus and Security Module: Based on the improved PBFT mechanism, it realizes multi-node collaborative verification and ensures data immutability through hash encryption and digital signature; Processor: The processor is used to handle the calculation process of each formula and the construction calculation process of each model.

Citation Information

Cited By

  • Titanium forging full life cycle production data traceability management system based on block chain

    CN121810319A

  • Portable agricultural product quality tracing method and system based on block chain

    CN121998670A

  • Customer bar code tracing management method and system based on block chain

    CN122089346A