<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Blockchain-Based Risk Tracing of Animal-Derived Food Supply Chain 1</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Qiaoling Dai</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Xinliang Liu</string-name>
          <email>bliuxinl@btbu.edu.cn</email>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Mengqi Zhang</string-name>
          <email>czhangmengqi@st.btbu.edu.cn</email>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Tongna Mu</string-name>
          <email>dmutongna@scjgj.beijing.gov.cn</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Yanzhao Ren</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Beijing Institute for Food Inspection, Beijing Municipal Center for Food Safety Monitoring and Risk Assessment</institution>
          ,
          <addr-line>Beijing 100094</addr-line>
          ,
          <country country="CN">China</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>National Engineering Laboratory for Agri-product Quality Traceability</institution>
          ,
          <addr-line>Beijing 100048</addr-line>
          ,
          <country country="CN">China</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>School of Computer Science and Engineering, Beijing Technology and Business University</institution>
          ,
          <addr-line>Beijing 100048</addr-line>
          ,
          <country country="CN">China</country>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>School of E-Business and Logistics, Beijing Technology and Business University</institution>
          ,
          <addr-line>Beijing 100048</addr-line>
          ,
          <country country="CN">China</country>
        </aff>
      </contrib-group>
      <fpage>6</fpage>
      <lpage>11</lpage>
      <abstract>
        <p>The animal-derived food supply chain is lengthy and complex, and each link has certain risk factors. This paper analyzed the potential risks in the supply chain in order to ensure the safety of animal-derived food and the traceability of supply chain risks. Combining blockchain with the traditional animal-derived food supply chain, we proposed a risk-tracing model. Finally, we constructed a risk-tracing system based on Hyperledger Fabric. The results show that the system realizes the whole-process supervision of animal-derived food safety to ensure data transparency and traceability in the entire supply chain, so as to ensure the food safety of animal-derived food.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;blockchain</kwd>
        <kwd>animal-derived food</kwd>
        <kwd>supply chain</kwd>
        <kwd>risk-tracing</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>Food safety has become a major concern for society in recent years. The food supply chain is
complex, with information asymmetry in each link, low information transparency, and difficulties
with quality and safety traceability [1]. Traditional supply chain systems rely on centralized data
storage, which makes it difficult to recover when the central data is lost. Using blockchain technology
to achieve information security, traceability, and transparency in the food supply chain has become a
research hotspot. Blockchain technology can ensure that all data is not tampered with, and
information can be traced [2]. But, there is relatively little research on risk analysis in each link of the
food supply chain, especially for the specific scenarios of animal-derived food supply chain risk
tracing. Compared with other food supply chains, the structure and links of the animal-derived food
supply chain are more complex. Problems in any link will cause safety problems, and the traceability
of risks in its supply chain is particularly important.</p>
      <p>This paper first introduced the concept of blockchain technology, and then analyzed the risks in all
links of the animal-derived food supply chain. Aiming at the problems existing in the traditional
animal-derived food supply chain, this paper constructed a safety risk-tracing model with blockchain
technology and realized the risk-tracing system based on the Hyperledger Fabric technology
architecture.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Introduction of bockchain concept and risk analysis of animal-derived food</title>
      <p>supply chain</p>
    </sec>
    <sec id="sec-3">
      <title>2.1. Concept of blockchain technology</title>
      <p>Blockchain is a decentralized distributed database ledger [3], which is a data structure containing
blocks of transaction information linked by time sequence [4]. It adopts a peer-to-peer network
structure. Transactions can occur directly between nodes without third-party auditing [5]. Blockchain
data is maintained by all nodes, which greatly enhances the authenticity of recorded data. The
blockchain uses timestamp technology to link the information on the chain in chronological order,
recording the complete history of blockchain transactions and enabling traceability of any one
transaction [6]. Once the data is written into the blockchain, it will be stamped with a timestamp. As a
proof of the existence of the block data, no one can easily tamper with the transaction information,
which has high security. In addition to the encrypted private information of the transaction parties,
anyone can query the blockchain data and develop related applications through the open interface, so
the information of the whole system is highly transparent. The asymmetric encryption mechanism of
blockchain can generate keys for each transaction in the food supply chain, enabling data encryption,
digital signatures, and login authentication. The data upload operation of each link in the supply chain
will be attached with a digital signature to ensure that the data of each link cannot be forged.</p>
    </sec>
    <sec id="sec-4">
      <title>2.2. Risk analysis of animal-derived food supply chain</title>
      <p>There are certain risk factors in each link of the animal-derived food supply chain, from animal
breeding, slaughtering, production and processing, storage and transportation, catering production, to
wholesale and retail sales [7]. This section analyzed the risks in each link of the animal-derived foods
supply chain to lay the foundation for the risk tracing of the entire supply chain.</p>
      <p>(1)Raw and auxiliary material risks. The main ingredients and accessorial ingredients of food
generally have the risks of food-borne stimulants, allergens, genetically modified organisms, and
unidentified irradiation treatments. For sports events, it is very important to strictly control the supply
chain of animal-derived food and effectively reduce the risk of food-borne stimulants [8].</p>
      <p>(2)Risks in livestock breeding and slaughtering. In livestock breeding and slaughtering, there are
mainly risks of chemical inputs, pollution, and illegal drug addition. Pollution risks include
environmental pollution, feed pollution, veterinary drug pollution, disease livestock and poultry
pollution, and pathogenic bacteria pollution. The risks of illegal addition include the illegal addition
of veterinary drugs, the illegal addition of food additives, etc.</p>
      <p>(3) Food production and processing risks. The main sources of food safety risks in the entire
supply chain are risks in food production and processing [9]. Food production and processing links
have certain risk factors, such as food additives beyond the scope and limit of use, thermal
processing temperature and time is not insufficient to lead to excessive microorganisms, packaging
is not disinfected or damaged, resulting in biological and chemical pollution.</p>
      <p>(4) Food circulation risks. When the circulation conditions change, there are certain food safety
risks [10], such as excessive total bacterial count due to improper storage conditions.</p>
      <p>(5) Catering production risks. With reference to the announcement of the State Administration
for Market Regulation on the issuance of food safety operating specifications for catering services [11],
there are three main risks in the catering production link: raw material input; pollution in the process
of production; and pollution in the state of ready-to-eat.</p>
      <p>The above is the risk analysis of the animal-derived food supply chain in each link. The focus of
food safety risk control is to record the risks in each link in detail so that information supervision
and traceability of the whole supply chain may be facilitated.</p>
    </sec>
    <sec id="sec-5">
      <title>3. Model construction and system design</title>
      <p>Based on the above risk analysis of the animal-derived food supply chain, we simulated the
business scenario of safety risk traceability in the supply chain and constructed and designed the
system model combined with blockchain technology. We realized the risk traceability of the supply
chain through the query and call of intelligent contracts.</p>
    </sec>
    <sec id="sec-6">
      <title>3.1. Blockchain architecture of animal-derived food supply chain</title>
      <p>In the blockchain-based food supply chain traceability system, each node is independent of each
other, and the storage consistency is maintained and guaranteed through the consensus mechanism. At
the same time, the independence of each node prevents the loss of information in any link of the
supply chain and affects the overall operation of the system, ensuring the security of the system. The
blockchain architecture of the animal-derived food supply chain includes the application layer, control
layer, consensus layer, network layer, and data layer.</p>
      <p>The application layer encapsulates the application scenarios of the animal-derived food supply
chain. Through the application layer, the risks involved in each link of the supply chain can be
integrated, and the whole process can be traced.</p>
      <p>The control layer consists of process models, smart contracts, and various script codes. Smart
contracts can realize standardized supply chain information entry through automatic execution,
solving the problem of low efficiency in manual processing of events. The contract is programmable,
enabling the flexible expansion of business logic.</p>
      <p>
        The consensus layer encapsulates various consensus algorithms. The blockchain relies on a
consensus mechanism to ensure the unification of the entire network of data stored and maintained by
each node. Early blockchains adopted a PoW (Proof of Work) mechanism that relies on computing
power to ensure accounting consistency [5]. With the continuous development of blockchain
technology, researchers have proposed mechanisms such as PoS (Proof of Stake), DPoS (Delegated
Proof of Stake) [12], and PBFT (Practical Byzantine Fault Tolerance) [
        <xref ref-type="bibr" rid="ref9">13</xref>
        ].
      </p>
      <p>The network layer encapsulates the network structure and communication mechanisms of the
blockchain system. Each node on the blockchain communicates through the peer-to-peer mechanism
to jointly maintain the consistency of the blockchain ledger. The data layer includes transaction data
blocks, timestamps, public keys, private keys, encryption mechanisms, etc. It is the lowest data
structure of the entire blockchain system. It adopts hash algorithms, asymmetric encryption, and other
technologies to realize the reliability and security of transactions. This study adopted an on-chain and
off-chain dual-chain data storage mode combined with an offline database. Blockchain storage was
interconnected with relational database storage.</p>
    </sec>
    <sec id="sec-7">
      <title>3.2. Design of supply chain risk-tracing model</title>
      <p>Regulators
Authentication</p>
      <p>Qualifications
Risk Managers</p>
      <p>Consumer</p>
      <p>Safety risk traceability</p>
      <p>Node network
Reach a consensus</p>
      <p>This study, combined with the research on blockchain technology and the corresponding
blockchain network nodes of enterprises in other food-related fields, designed the nodes and
risk-tracing process corresponding to the supply chain links and established a risk-tracing model
covering all links of the supply chain.</p>
      <p>As shown in Figure 1, risk managers in each link upload and maintain data to ensure the reliability
of data sources. Each livestock and poultry will be bound with a unique code before slaughter. All the
recorded information is called to the smart contract to be uploaded to the chain. After each node
receives the information, it is verified by the consensus algorithm to reach a storage agreement. A
digital signature will be attached after the information from each link is successfully uploaded to the
chain. Each link corresponds to multiple nodes. Each node contains all the contents of the blockchain
and jointly uploads and maintains the data. After the nodes reach a consensus, the whole life cycle of
the product identified by the code will be completely recorded on the blockchain. Consumers and
regulators can quickly trace any link in the supply chain through this system to effectively ensure the
quality and safety of food.</p>
    </sec>
    <sec id="sec-8">
      <title>3.3. Smart contract design of animal-derived food supply chain</title>
      <p>Based on the business scenario of risk tracing in the animal-derived food supply chain, this
research designed smart contracts to realize data uploading and realize the traceability function
through query and call. Smart contracts define the access mode to the ledger. The ledger can be
queried or updated through the functions in the smart contract. After the smart contract is installed and
instantiated on the node, the client application can interact with the blockchain ledger through the
smart contract.</p>
    </sec>
    <sec id="sec-9">
      <title>4. Experiment and result analysis</title>
    </sec>
    <sec id="sec-10">
      <title>4.1. Experimental environment</title>
      <p>Hyperledger Fabric needs to run in a Linux environment. The system run on the Ubuntu Linux
v16.04 operating system under a VMware virtual machine. The front-end was built based on the
RuoYi-Vue framework, using Node.js as the middleware to connect the front-end and the blockchain
server, and storing data in the blockchain by calling smart contracts. At the same time, the hash value
of the data will generate blocks through consensus, and the blocks will be stored in the blockchain
ledger and transmitted to the front-end blockchain browser. The relational database used MySQL to
record key information at each link of the animal-derived food supply chain. Picture files such as
livestock and poultry growth status and quarantine certificates were stored in the FastDFS distributed
file system. The blockchain network used a single-machine multi-node deployment method, with five
organizations in the consortium chain, including one order node and five peer nodes, to realize data
upload and maintenance in each link.</p>
    </sec>
    <sec id="sec-11">
      <title>4.2. Experimental results</title>
      <p>Through the analysis of each link of the animal-derived food supply chain, combined with the
application scenarios of the blockchain, this research designed a blockchain-based animal-derived
food supply chain risk-tracing system. Through this system, the operation of each link in the supply
chain was simulated and uploaded to the chain. Finally, the tracing source code generated in the
catering production and sales process was used to trace the risk of the whole process of food. Figure 2
shows the blockchain browser. You can see the current block information and node information.
Figure 3 shows the details of the whole process of breeding livestock and poultry. The breeding base
files the livestock and poultry breeding and records and uploads the data of additives and drug use
involved in the livestock and poultry breeding process. Figure 4 is the food tracing page based on the
food tracing source code, showing the risk characteristic information of animal-derived food from
livestock and poultry breeding to final catering and retail. Consumers and regulators can quickly
query the information contained in each link of the supply chain. This page also shows the blocks
generated by each link. You can view the details of this block, including pre-hash, current block data
hash, transaction ID, timestamp, and other information.
Fig.3 Example of livestock and poultry breeding process details on blockchain</p>
    </sec>
    <sec id="sec-12">
      <title>5. Conclusion</title>
      <p>The blockchain has significant advantages, which make it have a wide range of application
scenarios in the field of supply chains. This paper proposed a safety risk-tracing model of the
animal-derived food supply chain based on blockchain technology and realized the safety risk-tracing
system through experimental verification, which can provide a solution to the problems of
information asymmetry and risk tracing in the animal-derived food supply chain. However, there are
still some deficiencies in this study. For example, during data recording, even if the digital signature
of blockchain technology can ensure a certain degree of data credibility, there is still the problem of
insufficient reliability of data sources. It is necessary to further combine the Internet of Things
technology to realize the automatic detection and transmission of data to ensure the credibility of data
sources.</p>
    </sec>
    <sec id="sec-13">
      <title>6. Acknowledgments</title>
      <p>7. References</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <article-title>China (2021YFD2100605), and the Beijing Science</article-title>
          and Technology Planning Project
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <source>(Z191100008619007)</source>
          [1]
          <string-name>
            <surname>He</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          (
          <year>2016</year>
          )
          <article-title>Food supply chain management</article-title>
          .
          <source>China Light</source>
          Industry Press. Beijing. [2]
          <string-name>
            <surname>Ding</surname>
            ,
            <given-names>J.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wu</surname>
            ,
            <given-names>Q.L.</given-names>
          </string-name>
          (
          <year>2021</year>
          )
          <article-title>Research review and develop prospects of food supply chain</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <article-title>traceability system based on blockchain</article-title>
          .
          <source>J. Food &amp; Machinery</source>
          .,
          <volume>37</volume>
          (
          <issue>02</issue>
          ):
          <fpage>72</fpage>
          -
          <lpage>77</lpage>
          . [3]
          <string-name>
            <surname>Pearson</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>May</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leontidis</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          , et al. (
          <year>2019</year>
          )
          <article-title>Are Distributed Ledger Technologies the</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <article-title>panacea for food traceability?</article-title>
          .
          <source>J. Global Food Security.</source>
          ,
          <volume>20</volume>
          :
          <fpage>145</fpage>
          -
          <lpage>149</lpage>
          . [4]
          <string-name>
            <surname>Yang</surname>
            ,
            <given-names>H.Q.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sun</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhao</surname>
            ,
            <given-names>X.C.</given-names>
          </string-name>
          (
          <year>2018</year>
          )
          <article-title>Build mutual trust supply chain information system</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <article-title>based on blockchain</article-title>
          .
          <source>J. Science &amp; Technology Progress and Policy</source>
          .,
          <volume>35</volume>
          (
          <issue>05</issue>
          ):
          <fpage>21</fpage>
          -
          <lpage>31</lpage>
          . [5]
          <string-name>
            <surname>Yuan</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>F.Y.</given-names>
          </string-name>
          (
          <year>2016</year>
          )
          <article-title>Blockchain：the state of the art and future trends</article-title>
          .
          <source>J. Acta</source>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <string-name>
            <given-names>Automatica</given-names>
            <surname>Sinica</surname>
          </string-name>
          .,
          <volume>42</volume>
          (
          <issue>4</issue>
          ):
          <fpage>481</fpage>
          -
          <lpage>494</lpage>
          . [6]
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>A.D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Du</surname>
            ,
            <given-names>X.H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          , et al. (
          <year>2018</year>
          )
          <article-title>Research progress of blockchain technology</article-title>
          and its
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <article-title>application in information security</article-title>
          .
          <source>J. Journal of Software</source>
          .,
          <volume>29</volume>
          (
          <issue>07</issue>
          ):
          <fpage>2092</fpage>
          -
          <lpage>2115</lpage>
          . [7]
          <string-name>
            <surname>Jin</surname>
            ,
            <given-names>H.S.</given-names>
          </string-name>
          , Liu,
          <string-name>
            <surname>Y.S.</surname>
          </string-name>
          (
          <year>2015</year>
          )
          <article-title>Risk identification and safety supervision and management of</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <article-title>agricultural product supply chains</article-title>
          .
          <source>J. Food Science</source>
          .,
          <volume>36</volume>
          (
          <issue>13</issue>
          ):
          <fpage>265</fpage>
          -
          <lpage>271</lpage>
          . [8]
          <string-name>
            <surname>Shi</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tan</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          (
          <year>2022</year>
          )
          <article-title>Research status of stimulant pollution in food</article-title>
          .
          <source>J. Journal of Food Safety &amp;</source>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          Quality.,
          <volume>13</volume>
          (
          <issue>07</issue>
          ):
          <fpage>2217</fpage>
          -
          <lpage>2222</lpage>
          . [9]
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>J.N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>Q.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chen</surname>
            ,
            <given-names>T.Q.</given-names>
          </string-name>
          (
          <year>2019</year>
          )
          <article-title>Research on food safety risk management from the</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          <article-title>perspective of supply chain network</article-title>
          .
          <source>J. China Condiment</source>
          .,
          <volume>44</volume>
          (
          <issue>12</issue>
          ):
          <fpage>167</fpage>
          -
          <lpage>171</lpage>
          . [10]
          <string-name>
            <surname>Sheng</surname>
            ,
            <given-names>J.P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Su</surname>
            ,
            <given-names>W.F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Luo</surname>
            ,
            <given-names>Y.B.</given-names>
          </string-name>
          (
          <year>2020</year>
          )
          <article-title>Risk analysis and control in the field of food circulation</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          <string-name>
            <given-names>J.</given-names>
            <surname>Science</surname>
          </string-name>
          and Technology of Food Industry.,
          <volume>41</volume>
          (
          <issue>19</issue>
          ):
          <fpage>240</fpage>
          -
          <lpage>243</lpage>
          . [11]
          <article-title>State Administration for Market Regulation</article-title>
          . (
          <year>2019</year>
          )
          <article-title>Announcement of the State Administration</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          https://www.samr.gov.cn/spjys/tzgg/201902/t20190226_
          <fpage>291361</fpage>
          .html. [12]
          <string-name>
            <surname>Yuan</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ni</surname>
            ,
            <given-names>X.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zeng</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , et al. (
          <year>2018</year>
          )
          <article-title>Blockchain consensus algorithms：the state of the art</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          <article-title>and future trends</article-title>
          .
          <source>J. Acta Automatica Sinica</source>
          .,
          <volume>44</volume>
          (
          <issue>11</issue>
          ):
          <fpage>2011</fpage>
          -
          <lpage>2022</lpage>
          . [13]
          <string-name>
            <surname>Castro</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Liskov</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          (
          <year>2002</year>
          )
          <article-title>Practical byzantine fault tolerance and proactive recovery</article-title>
          .
          <source>J. ACM</source>
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          <source>Transactions on Computer Systems</source>
          .,
          <volume>20</volume>
          (
          <issue>4</issue>
          ):
          <fpage>398</fpage>
          -
          <lpage>461</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>