<!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>
      <journal-title-group>
        <journal-title>Majorov International Conference on Software Engineering and Computer Systems, December</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Integrating Smart Contracts into Smart Factory Elements' Informational Interaction Model</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Julia Lyakhovenko</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ilia Viksnin</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sergey Chuprov</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>ITMO University</institution>
          ,
          <addr-line>Kronverksky Pr. 49, 197101, St. Petersburg, Russian Federation</addr-line>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2020</year>
      </pub-date>
      <volume>1</volume>
      <fpage>0</fpage>
      <lpage>11</lpage>
      <abstract>
        <p>The paper proposes a model for Smart Factory's elements informational interaction and organizing their functioning using smart contracts. An approach for modeling Smart Factory is based on the Enterprise Resource Planning organizational strategy, which assumes the division of the manufacturing process into modules, and is focused on continuous balancing and resource optimization. The proposed model includes a common Central Computer, modules for resource managing, agents responsible for operations, and task executors. The Central Computer receives a response from the External Environment, sends it to resource managing module, which determines the required amount of resources for the manufacturing operation and distribute tasks to the executors. To increase the production performance, two types of smart contracts are introduced: the former for defining a contract between the Smart Factory and the environment, and the latter for the production process organization. The integration of smart contracts into the production process allows to automate decision-making and control procedures, reduce the probability of manufacturing a low-quality product, and diminish the production costs.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Multi-agent system</kwd>
        <kwd>Smart contracts</kwd>
        <kwd>Smart factory</kwd>
        <kwd>Smart factory model</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>Smart contract is a block of computer code in which the agreement on the transaction between
the parties are formed. After the parties established the contract, it is maintained in the
blockchain and comes into force. Such contracts are used in various fields such as finance and
insurance, e-commerce, taxation and auditing, etc.</p>
      <p>
        The integration of smart contracts and blockchain technologies into various economy sectors
[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] is crucial for the Internet of Things (IoT) concept, which connects various physical objects
with each other via Internet and provides their informational interaction.
      </p>
      <p>
        Decision-making and execution control automation [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] in such an area as manufacturing
accelerates the production process, reduces its costs, and diminishes the number of system
vulnerabilities. The introduction of smart contract technology into the production system
(hereinafter referred to Smart Factories) allows to decrease risks of manufacturing a low-quality
product that does not meet the declared requirements, and ensures an increase in production
processes performance and accuracy. The advantages of integrating smart contracts into the
production process are their application transparency, immutability, self-executing property.
      </p>
      <p>The contribution of this work is twofold. First, we propose a Smart Factory model, which
is described in the Enterprise Resource Planning organizational strategy context. The model
divides manufacturing process into modules, and is focused on continuous balancing and
resource optimization. In addition, we integrate smart contracts into Smart Factory elements’
informational interaction model, which allows to regulate the relations with the External
Environment and between Smart Factory elements’.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Related Work</title>
      <p>
        Internet of Things (IoT) access control is a critical issue. In [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], the authors propose an intelligent
environment based on smart contracts, consisting of several contracts types: access control
contracts (ACCs), one judge contract (JC) and one register contract (RC). In such a system, each
ACC provides one access control method for the subject-object pair and implements it both
statically checking access rights based on predefined policies, and dynamically, verifying access
rights by checking the subject’s behavior. JC implements an abnormal behavior scoring method
to facilitate ACC dynamic check behavior by receiving abnormal behavior reports from the
ACC, assessing that behavior, and returning an appropriate penalty. The RC records information
on access control and abnormal behavior assessment methods, and provides functions (such as
registration, update, and deletion) to manage these methods.
      </p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] an intelligent logistics solution that includes smart contracts, logistics planning and
asset health monitoring in supply chain management was proposed. A prototype solution was
also implemented, demonstrating accountability, traceability, and responsibility for managing
the supply of various parties involved in the logistics scenario. The proposed solution uses a
smart contract system (SCS) that provides a recommended list of suppliers for a specific item to
be purchased. Once a list of suppliers is selected, the SCS sends notifications to the appropriate
suppliers and begins the negotiation process between buyer and supplier regarding conditions.
After the negotiation process is complete, a smart contract is established and a purchase order
is created. SCS receives periodic updates from the planner and condition monitoring modules
that provide information on the current purchase order status. These updates are used by SCS
to verify that the contract terms are met in accordance with the agreement. In the event of any
irregularities, SCS initiates the appropriate action specified in the contract, such as a certain
penalty or even cancellation of the purchase order.
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. Smart Factory Model</title>
      <p>
        In this paper we consider centralized factory elements informational interaction model. Under
a centralized factory we mean a production model that has one common center responsible for
communication with the External Environment and production processes control. The Smart
Factory model description is formulated in the context of an Enterprise Resource Planning
(ERP) organizational strategy [
        <xref ref-type="bibr" rid="ref4 ref5">4, 5</xref>
        ], which assumes the division of the manufacturing into
modules, and is focused on continuous balancing and resources’ optimization. There are three
main groups of modules: finance, personnel, and operations. Our proposed model has one
common center and several control modules: a resource management module, an executor
management module, and an operations management module. To characterize a model, a
multi-agent approach was applied, which considers a system as a set of interacting intelligent
agents.
      </p>
      <p>The following types of agents were identified:
• Central Agent - Central Computer;
• Modules Agents: Resource Management Module Agent, Executor Management Module</p>
      <p>Agent, and Operations Management Module Agent (Comp1, Comp2, Comp3 respectively);
• executors.</p>
      <p>There is also some abstract wireless communication channel in the system. Figure 1 demonstrates
our proposed Smart Factory informational interaction model overview.</p>
      <p>Central Agent is the Central Computer, which communicates with the External
Environment (for example, with a customer), verifies the information received from the control
modules, and sends this information to the DataBase. The DataBase stores information about
orders received by the Smart Factory, the work of system agents and manufactured products.
Management Modules agents determine the available system resources, resources required
for the production, and perform task-distribution procedures. Executing agents have 
levels, for each level  access parameter is defined, i.e. set of executing agents:  =
{(11 |1), (12 |1), . . . , (1 |), ( |)}, where  is the agent’s access parameter: 0 ≤
 ≤ 1, that distributes agents by access levels and determines the available functionality. The
following parameters are defined for each agent-executor:
• a set of functions:  = {1, 2, . . . , }, which depends on the agent’s access level and
parameter;
• agent’s resource set:  = {1, 2, . . . , }, where  relates to the agent  ∈ ,
and  represents his level;
• the remaining time of executor  is  , if  ≈ 0, then the agent  is redirected
from the set of  to the  = { ∈  :  ≈ 0}, and
 =  ∖</p>
      <p>Each  = { ,  ,  }, where  = 0 if the agent is busy, and 1 if the
agent is free, and  is the agent’s coordinates. The information space can be described
as  =  ∪ ∪. . .∪, where  is the information on Smart Factory’s functionality,
 is the Smart Factory’s rules, and  is the information on Smart Factory’s consumers.</p>
      <p>Central agent has global knowledge on the information space. The resource management
module possesses information on the resources. The agent-executors management module
has information on the agent’s location and their status. The operations control module
has information on the diferent levels of executing agents’ functions, ways of transmitting
information over the communication channel such as encryption, transmission protocols, etc.
The combination of these modules constitutes a certain computer Shop.</p>
      <p>The manufacturing production can be represented as   = {1, 2, . . . , }, after
converting each product into some function by the Central agent:  =  (, , , , ),
this information is sent to the Shop, where, according to the provided function, resources, and
Comp2</p>
      <p>...</p>
      <p>Product</p>
      <p>Comp3
...</p>
      <p>Shop
executor1a
executor1b</p>
      <p>executor1n
abstrPr1a
abstrPr1b</p>
      <p>abstrPr1n
...
...</p>
      <p>...</p>
      <p>External Environment</p>
      <p>Central Computer
Comp1
the required time, tasks are distributed among the executors agents. The production process is
divided into several tasks:  = {1, 2, . . . , }, where  =  () and ∑︀  = ,
which means that all tasks are required to be performed to manufacture the product.</p>
      <p>Further, at each executing agents level, a task is performed, for which the access level and
functionality are defined. After that, the executing agents proceed to perform the assigned tasks,
the results of which are:  1,  1, . . . ,  1. Further
information on abstract products (represented by (1)) is sent to the Shop, where it is verified for
the correctness of their assigning to the executing agents. All verified abstract products are
assembled at . After that, information on the product is sent to the Central Computer, where
it is verified for compliance with the product requirements. If the verification procedure passed
successfully, the information on the product is sent to the DataBase, and the product is sent to
the customer.</p>
      <p>= ( 1) ∪ ( 1) ∪ . . . ∪ ( )
(1)</p>
    </sec>
    <sec id="sec-4">
      <title>4. Our Approach to Smart Contracts in Smart Factory</title>
      <p>For the centralized factory model, we introduce two smart contracts’ types. The former assure
the relationship between the External Environment and the Smart Factory, the latter is used to
organize the work inside the factory.</p>
      <p>The response for product  manufacturing comes from the External Environment. Then, the
Central agent determines the required resources and functionality:  =  (, , , , ).
If the  manufacturing is possible, a smart contract is composed between the Factory and
the External Environment:  =  (, , ), where  is a producing
time limit, which is determined by the External Environment,  is a function that
defines the resources and functionality, required to be performed by the factory:  =
 ( ,  ,  , ,  ). However, there are several conditions for the contract generation
process:
• if  → 0 :  =  ;
• if  ∈  &lt;  :  =  ;
•  ≥ .</p>
      <p>Information on the established contract is sent to the DataBase:  = {1, 2, 3, ...},
where  = (). After the  manufacturing response is transferred from the
Central agent to the Shop, the Shop split the production procedure into certain tasks:  =
{1, 2, . . . , },  =  (). For each task, the access level , resources amount 
and functionality are defined : ( ) = {, , }.</p>
      <p>In the next step, the Shop forms internal smart contracts:  =  (, , ,  , ),
where  ⊂  is set of task executors agents, and ,  are functionality
and resources amount of these agents. In addition, the following contracts’ conditions are
introduced:
• ≥ .
• if  ≥  (, , ) :  =  ;
•  → 0 :  =  ;
• () ≤ , , ;
If one of the contact’s conditions does not met, the contract is canceled.</p>
      <p>When the contract is established, information on it is sent to the factory’s DataBase:  =
{1, 2, 3, . . .}, where  is represented by (2). That is, knowledge on the
contract  is linked to the knowledge on the previous contract  − 1. This blocks’ sequence
forms a chain of related information. Information on the first contract 0 is defined as:
0 = (0).</p>
      <p>= () × (− 1)
(2)</p>
    </sec>
    <sec id="sec-5">
      <title>5. Conclusion</title>
      <p>In this paper, we proposed a novel approach for Smart Factory elements informational interaction
using smart contracts. The model is based on a multi-agent approach and ERP organizational
strategy, which divides the production process into several modules and is focused on continuous
balancing and resources optimization. Two smart contract types are introduced: the former for
generating a contract between the Smart Factory and the External Environment, and the latter
for manufacturing organizing inside the Smart Factory. The smart contracts integration into
the production process allows to automate decision-making and execution control, reduce the
probability of manufacturing a low-quality product, and decrease production costs.As future
plans, we intend to enhance the proposed Smart Factory elements’ informational interaction
model and integrate other manufacturing organization means into it, as well as conduct an
empirical study to assess the performance gain with smart contracts.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Zhang</surname>
          </string-name>
          , S. Kasahara,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Shen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Jiang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Wan</surname>
          </string-name>
          ,
          <article-title>Smart contract-based access control for the internet of things</article-title>
          ,
          <source>IEEE Internet of Things Journal</source>
          <volume>6</volume>
          (
          <year>2018</year>
          )
          <fpage>1594</fpage>
          -
          <lpage>1605</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>M.</given-names>
            <surname>Wohrer</surname>
          </string-name>
          , U. Zdun,
          <article-title>Smart contracts: security patterns in the ethereum ecosystem and solidity</article-title>
          , in: 2018
          <source>International Workshop on Blockchain Oriented Software Engineering (IWBOSE)</source>
          , IEEE,
          <year>2018</year>
          , pp.
          <fpage>2</fpage>
          -
          <lpage>8</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>E. J.</given-names>
            <surname>Umble</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. R.</given-names>
            <surname>Haft</surname>
          </string-name>
          ,
          <string-name>
            <surname>M. M. Umble</surname>
          </string-name>
          ,
          <article-title>Enterprise resource planning: Implementation procedures and critical success factors</article-title>
          ,
          <source>European journal of operational research 146</source>
          (
          <year>2003</year>
          )
          <fpage>241</fpage>
          -
          <lpage>257</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>M.</given-names>
            <surname>Al-Mashari</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Al-Mudimigh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Zairi</surname>
          </string-name>
          ,
          <article-title>Enterprise resource planning: A taxonomy of critical factors</article-title>
          ,
          <source>European journal of operational research 146</source>
          (
          <year>2003</year>
          )
          <fpage>352</fpage>
          -
          <lpage>364</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>S.</given-names>
            <surname>Rouhani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Deters</surname>
          </string-name>
          ,
          <article-title>Security, performance, and applications of smart contracts: A systematic survey</article-title>
          ,
          <source>IEEE Access 7</source>
          (
          <year>2019</year>
          )
          <fpage>50759</fpage>
          -
          <lpage>50779</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>