IoT + blockchain traceability solution

The way of IoT hardware (Bluetooth/wifi) plus blockchain can effectively map real-world instances on the chain. This article introduces a hardware-based tire blockchain anti-counterfeiting traceability and channel management program ideas.

More blockchain technology and application classification:

Blockchain applicationBlockchain     development

Ethernet Square | Fabric | BCOS | cryptography | consensus algorithm | bitcoinOther chain

Token EconomyTraditional Financial Scenarios | Decentralized Finance | Anti-counterfeiting Traceability | Data Sharing | Trusted Deposit

 

1. The overall idea plan:

The technical solution for tire traceability is shown in Figure 1. Two types of users: B-end user data on the chain, C-end user information query:

(1) End B:

In order to reduce the workload of scanning codes for B-end users, the method of "one batch, one code" is adopted for data uploading. That is, the traceable Bluetooth on each tire has an Individual ID, and a batch (N) tires has the same Group ID. Based on the storage characteristics of Fabric, on each channel, such as manufacturers, distributors, retailers, etc., the data on the chain uses the key-value pair <Group ID: corresponding channel information>.

(2) C terminal:

Based on this design scheme, the C-end user Bluetooth stores Group ID, Individual ID, and basic product information. The user logs in to the APP, then obtains these three types of information in Bluetooth, and sends two information, Group ID and Individual ID, to the cloud. The cloud returns the traceability information details to the APP, and compares the information returned by the cloud with the basic product information from Bluetooth. If they are consistent, then Think it is genuine.

 

IoT + blockchain traceability solution

Figure 1 Preliminary plan for tire information traceability

Note:

In this plan, a batch of tires is the minimum granularity of the transaction flow. If the splitting or cross-selling of a batch of tires is considered, the additional Sub Group ID can be used (further consideration is required).

2. Hardware function

This solution is only for the development of traceable Bluetooth. The Bluetooth module needs to store data: Group ID, Individual ID, and product information. Use a fixed data format, and then use asymmetric encryption for data confidentiality. The manufacturer generates public and private keys in advance, the public key is used for data encryption, and the private key is placed in the background server to facilitate decryption of encrypted data. Use the public key to encrypt the stored data and write the generated cipher text into Bluetooth.

 

IoT + blockchain traceability solution

Figure 2 Example of Bluetooth module storage

3. Software function

(1) Client

1) Read data in Bluetooth: Group ID, individual ID, product information

2) Send Group ID and individual ID information to the server, and wait for the return of traceability details.

3) The server returns traceability information to the APP.

4) The APP side selectively displays the data to the customer. The Bluetooth data and the cloud data are first compared. If the match is correct, it can be recognized as a genuine product and displayed to the user. The whole process is shown in Figure 3.

 

IoT + blockchain traceability solution

Figure 3 APP function

(2) Server:

The server is composed of the nodejs background + Fabric blockchain network, which opens the blockchain storage and query interface to the outside world. The state ledgers in Fabric are all key-value pairs with the Group ID as the "key" and the corresponding traceability information as the "value" (because the information is stored with the Group ID as the "key"), so it must be taken out with the Group ID as the index Traceability information, Figure 4 is the basic structure of the traceability function server, which can be divided into two parts in terms of data flow.

1) Data storage:

Each B-end user obtains the Group ID by scanning the QR code, and stores it in the Fabric ledger in the format of "Group ID + own channel information" on each channel.

2) Data query:

The C-end user obtains the stored ciphertext through Bluetooth, decrypts it with the private key stored in the node background, obtains the Group ID and Individual ID in the plaintext, and uses the Group ID to query the traceability information, and finally returns the traceability information + Individual ID to the APP , As shown in Figure 4, for example, the Group ID obtained by decryption, the Individual ID are respectively (G01235, G01235_P234), and then use G01235 to query on the blockchain, and finally return the query result to the user with G01235_P234.

 

IoT + blockchain traceability solution

Figure 4 Blockchain background functions


Original link: Internet of Things + Blockchain Traceability Solution

Guess you like

Origin blog.csdn.net/JonasErosonAtsea/article/details/109236221