Research Article

Research on Grain Food Blockchain Traceability Information Management Model Based on Master-Slave Multichain

Algorithm 2

Data upload algorithm.
Input: data saved from the chain, Standard Data (SD)
Output: slave chain ID, slave chain data key value, ID code, data summary, product batch number and hash value; 1: input SD
(1) if Hash(R) = H
(2)  if time ≤ 0.1 s
(3)   simplify SD (Simplify keywords of input data SD)
(4)   return Slave chain ID, slave chain data key value, ID code, data summary, product batch number and hash value
(5)  else
(6) else
(7) else return none