# Internet of Things Supervision System and Supply Chain Financial Supervision Methods Based on Blockchain Technology

Authors: Jun Zhang
Journal: Wireless Communications and Mobile Computing
 (2021)

---

## Abstract

With the continuous progress of blockchain technology, how to use it for commodity traceability has become a concern. This study mainly discusses the Internet of Things supervision system and supply chain financial supervision method based on blockchain technology. The whole blockchain network is a decentralized system, which consists of six layers: data layer, network layer, and consensus layer. These three layers are the foundation layer; the other three layers are incentive layer, contract layer, and application layer. The interface of the platform needs to be conceived in combination with the business of building materials. According to the functional differentiation, the required interfaces mainly include information generation interface, information verification, information retrieval, and other information interfaces. Smart contracts can process data, operate asset transactions, manage smart assets, and expand the ability of blockchain to use data. In this way, the blockchain technology can trace the source of the data, so as to ensure the authenticity and security of the data. Blockchain technology can be used in data tracking. Specifically, in the building materials industry, with the help of blockchain technology, building material mixing enterprises can see the raw materials such as sand and gravel purchased under the order, the region where they are produced, the time point of transportation, the carrier, etc. In the process of supply chain financial supervision experiment, when the pledge rate of building materials is within the range of [0.4206,1], the bank income under the block chain mode is higher. The system designed in this study realizes the certification and traceability of building materials and has good use value.


---

## Body

## 1. Introduction

With the development of Internet of Things and intelligent manufacturing, the variety and quantity of consumer products are increasing, and people’s dependence on consumer products is also deepening. However, in order to earn high profits, some illegal businesses put fake and shoddy products into the market and even renovate and resell the products, causing huge losses to people’s property safety. At the same time, people lose trust in the quality of products and even doubt the law enforcement of the regulatory authorities.In this paper, blockchain technology and Internet of Things identification technology are integrated and applied to the building material traceability system. Through the Internet of Things identification, the globally unique identification coding of building materials is realized, and all traceability information involving identification objects is obtained, so as to solve the problem of blockchain data explosion, all traceability information of consumer electronic products in each stage of the supply chain is transparent, traceable, and tamperable.The application of blockchain technology is becoming more and more widespread. The core problem solved by Olnes et al. is whether blockchain technology will lead to innovation and transformation of government processes. To solve this problem, he critically evaluated the benefits of blockchain technology, which is often exaggerated in the literature, and discussed their impact on government organizations and processes. Based on a rigorous evaluation, although he provided guidance for further research on the potential advantages of BC applications in e-government and the role of BC architecture and application governance in meeting social needs and public interests, the research process lacks data [1]. Möser et al. evaluated two weaknesses in Monero’s mixin sampling strategy based on experience. First, approximately 62% of transaction inputs with one or more mixins are susceptible to “chain reaction” analysis, that is, the actual input can be inferred by elimination. Secondly, the sampling method of Monero mixed coins can easily distinguish them from real coins by age distribution. Although there are still a large number of potentially privacy-sensitive transactions affected by these weaknesses after removing the mining pool activities in his research, the research process is too complicated [2]. Dorri et al. believe that connected smart cars provide a comprehensive range of services that benefit car owners, transportation authorities, car manufacturers, and other service providers. They believe that blockchain (BC) is a disruptive technology, and many applications from cryptocurrency to smart contracts have been discovered, which are potential solutions to these challenges. They proposed a BC-based architecture to protect the privacy of users and improve the security of the vehicle ecosystem. Although they qualitatively demonstrated the flexibility of the architecture against common security attacks, there is still a lack of experimental proof [3]. Lee and Lee believe that embedded devices will be widely used in the IoT environment. Small and micro-IoT devices can operate and communicate with each other without user involvement. In the proposed scheme, the embedded device requests its firmware update from the nodes in the blockchain network and obtains a response to determine whether its firmware is the latest. In his research, even when the firmware version is the latest, it is necessary to check its integrity, that is, the correctness of the firmware, and the research process is not novel enough [4].The entire blockchain network is a decentralized system, consisting of six layers: data layer, network layer, and consensus layer. These three layers are the basic layer; the other three layers are the incentive layer, the contract layer, and the application layer. The interface of the platform needs to be conceived in conjunction with the building material business. According to the functional distinction, the required interfaces mainly include information generation interfaces, information inspection, information retrieval, and other information interfaces. Smart contracts can process data, operate asset transactions, and manage smart assets, expanding the ability of the blockchain to utilize data. The blockchain performs distributed accounting, and all parties in the system can supervise each other. In this way, the blockchain technology realizes the tracing of the source of the data, thereby ensuring the authenticity and security of the data. Blockchain technology can be used in data tracking. Specifically, with the help of blockchain technology in the building materials industry, building material mixing companies can see where the raw materials such as sand and gravel are purchased from, and where they are produced, the time point of the carrier, the carrier, etc.The innovations of this article are mainly reflected in the following: (1) a detailed introduction to the blockchain technology and the Internet of Things building material supervision platform; (2) conducted an experimental analysis on the traceability of the blockchain and, at the same time, explored the impact of order volume fluctuations on bank financing decisions and conducted system performance testing and analysis.


## 2. Supply Chain Financial Supervision

### 2.1. Blockchain Technology

The consensus mechanism is to ensure that even if the nodes keep separate accounts, they can ensure that the accounts kept by each node will not conflict with each other [5, 6]. The consensus algorithm is used in the blockchain system to ensure that the database copy that has not been tampered with is the same as the correct database state [7]. That is, the consensus algorithm is used to ensure that the transactions in the log are eventually propagated to all normal operating nodes in the blockchain network and to ensure that the changes produced on all normal operating nodes are consistent [8, 9]. The consensus algorithm can be used not only as a means of identification but also as a means to prevent tampering [10]. The consensus algorithm is one of the core parts of the blockchain, and different consensus algorithms have different security and efficiency. Blockchain can deploy different company algorithms according to different usage scenarios with different efficiency and safety requirements to ensure a good user experience [11, 12].Assuming that the existingk voting nodes have signed (that is, voted) the message of a certain production node, then:
(1)Rsourse=Åi=0k‐1SignatureiÅTimestramp,Q=StrToIntSubStrEnd32HmodMQ.Among them,Q is a random number [13]. Assuming that it casts K votes in each round of recurring calculations and casts to K nodes, respectively, then each node is voted with the probability of PI:
(2)P1=KMd.Then, assuming that each node getsY votes with probability P2, we can get:
(3)P2=CMWY∗KMd∗1−KMdMd−Y.Assuming that the probability of being successfully selected as a production node isP3, we get:
(4)P3=∑i=Mw2MwMw!/i!Mw−i!∗KMdi∗1−KMdMw−i.The system selectsMq production nodes from Md candidate nodes. Then, let P4 be the probability that the candidate node is successfully selected as a production node, namely,
(5)P4=MqMd.WhenP3=P4, K can be calculated [14].


### 2.2. Internet of Things Building Material Supervision Platform

Taking into account the current development status of the building material industry, all parties in the industry chain on the platform can purchase raw materials such as sand and gravel, online financing of companies such as building materials, and track logistics capital flow data of all parties. The platform provides interfaces for all parties in the industry chain. [15, 16]. In the platform, there are actually two types of nodes in the entire blockchain network, one is the main node in the industry chain, and the other is the government supervision node [17]. All nodes are connected in the form of a consortium chain. The government supervision department node has the highest authority as a management role and can manage the authority of other nodes. For other entities in the platform, it can be connected to the corresponding blockchain through various network interfaces, the server side, to complete its own business [18, 19]. The overall architecture design of the building material transaction service platform based on blockchain is shown in Figure 1 [20].Figure 1
The overall architecture design of a building material trading service platform based on blockchain.Considering the difficulty of development of the entire platform, overall benefits, comprehensiveness of function coverage, etc., this article believes that the government should take the lead in the development of the platform and uniformly formulate the operating standards of the platform blockchain, and the main body in the platform shall follow the established rules and conduct transactions, which is also convenient for supervision. At the same time, every node in the blockchain operates according to the consensus mechanism and is responsible for distributed accounting [21].


### 2.3. Blockchain Traceability

(1)
When a business request triggers a transaction condition, the smart contract is executed, and the requesting node sends a transaction application to the endorsing node. For example, the dealer acts as a client to initiate a transaction with the retailer through the SDK or API, and the supervisor node is the endorsing node, the regulator first verifies dealer’s digital signature and then simulates the execution of the smart contract after the verification is passed. When dealer’s digital signature verification is passed and the transaction conditions meet the requirements of the smart contract status, the regulator node confirms that the dealer performs the transaction endorsement. And send the endorsement result back to the SDK or API and then apply for sorting to the sorting node through the SDK or API [22, 23](2)
Since this experiment is a stand-alone deployment, the Solo algorithm is used to sort only according to the order of transactions, and a group of transactions are confirmed and packaged to form a block. In this example, after confirmation, the generated block includes transaction records of dealers and retailers and also includes transaction records of dealers and manufacturers in previous transactions. Therefore, raw materials, production, and distribution are obtained in this link, traceability information of each link of retail [24](3)
The transaction information confirmed above is broadcast to the participants in the channel, and then, the information is added to the chain to form a block record; at the same time, each participant updates the node ledger [25]Table1 compares some technical characteristics of blockchain bitcoin, ethereum, and hyperledger.Table 1
Comparison of current mainstream blockchains.
Technical frameworkFunctionSmart contractMining/tokenConsistencyPermission controlTypePerformanceBitcoinDigital currencyNot possessed or weakYesPowWithoutPublic blockchain6TPS2EthereumSmart contractTuring completeYesPow, PoSWithoutPublic blockchain10+TPS restrictedHyperledgerBusiness networkMultilanguage support Turing completeNoMany kinds pluggableFabric CAAlliance chain1000+RipplePayment networkCodiusYesRPCAWithoutPublic blockchain1000+


### 2.4. Supply Chain Finance

Changes in the macroeconomic environment and the development of the industry will inevitably affect the supply chain where traders are located and various companies in the chain. Therefore, when banks assess the systemic risks of traders, they can not only look at the operating conditions of the macroeconomic environment. To investigate the development situation of the industry in two aspects, we should also make an accurate assessment of the competitiveness of the supply chain in which traders are located [26, 27].Suppose thatN types of financial production resources R are invested in M production units for production and the generalized C-D production function of financial resources:
(6)FiX=eλ∏n=1NXnan.Among them,F is the number of products of the production unit (industry) at time t. Solow residual value growth equation can be obtained:
(7)FFi=λi+∑n=1NanXXi.Among them,(8)Ft=Fi,t+1−Fi,t,Xi=Xt+1.Determine the parameter a by regression identification or DEA method, and set the macroscopic effect function of theq-level system:
(9)HqX,t=∫0Te−rta1pE+a2pE+a3p0Fdt.Among them,r is the bank interest rate, which mainly considers the time value of resource allocation. T is the resource optimization period. Then,
(10)X=Fieλ,t∏n=1NP/Piα1/∑m=1ma.It shows that the optimal allocation of resources is related to the price of input factors and the demand of the real economy. Defined by the resource structure:(11)XXi=X1Xm+SSm.S is the resource allocation structure, which can be determined by the dynamic model of the optimal allocation of resources among production units.
(12)xxn=1∑n=11anXXm∑n=1Na+∑n=1NSiS+a∑n=1NPPi+NPP1.SupposingAit is the production resources of t in the system production unit at i, then:
(13)ΔA=Wt+ΔNt+Dt=Wt+A1AΔA+Dt.


## 2.1. Blockchain Technology

The consensus mechanism is to ensure that even if the nodes keep separate accounts, they can ensure that the accounts kept by each node will not conflict with each other [5, 6]. The consensus algorithm is used in the blockchain system to ensure that the database copy that has not been tampered with is the same as the correct database state [7]. That is, the consensus algorithm is used to ensure that the transactions in the log are eventually propagated to all normal operating nodes in the blockchain network and to ensure that the changes produced on all normal operating nodes are consistent [8, 9]. The consensus algorithm can be used not only as a means of identification but also as a means to prevent tampering [10]. The consensus algorithm is one of the core parts of the blockchain, and different consensus algorithms have different security and efficiency. Blockchain can deploy different company algorithms according to different usage scenarios with different efficiency and safety requirements to ensure a good user experience [11, 12].Assuming that the existingk voting nodes have signed (that is, voted) the message of a certain production node, then:
(1)Rsourse=Åi=0k‐1SignatureiÅTimestramp,Q=StrToIntSubStrEnd32HmodMQ.Among them,Q is a random number [13]. Assuming that it casts K votes in each round of recurring calculations and casts to K nodes, respectively, then each node is voted with the probability of PI:
(2)P1=KMd.Then, assuming that each node getsY votes with probability P2, we can get:
(3)P2=CMWY∗KMd∗1−KMdMd−Y.Assuming that the probability of being successfully selected as a production node isP3, we get:
(4)P3=∑i=Mw2MwMw!/i!Mw−i!∗KMdi∗1−KMdMw−i.The system selectsMq production nodes from Md candidate nodes. Then, let P4 be the probability that the candidate node is successfully selected as a production node, namely,
(5)P4=MqMd.WhenP3=P4, K can be calculated [14].


## 2.2. Internet of Things Building Material Supervision Platform

Taking into account the current development status of the building material industry, all parties in the industry chain on the platform can purchase raw materials such as sand and gravel, online financing of companies such as building materials, and track logistics capital flow data of all parties. The platform provides interfaces for all parties in the industry chain. [15, 16]. In the platform, there are actually two types of nodes in the entire blockchain network, one is the main node in the industry chain, and the other is the government supervision node [17]. All nodes are connected in the form of a consortium chain. The government supervision department node has the highest authority as a management role and can manage the authority of other nodes. For other entities in the platform, it can be connected to the corresponding blockchain through various network interfaces, the server side, to complete its own business [18, 19]. The overall architecture design of the building material transaction service platform based on blockchain is shown in Figure 1 [20].Figure 1
The overall architecture design of a building material trading service platform based on blockchain.Considering the difficulty of development of the entire platform, overall benefits, comprehensiveness of function coverage, etc., this article believes that the government should take the lead in the development of the platform and uniformly formulate the operating standards of the platform blockchain, and the main body in the platform shall follow the established rules and conduct transactions, which is also convenient for supervision. At the same time, every node in the blockchain operates according to the consensus mechanism and is responsible for distributed accounting [21].


## 2.3. Blockchain Traceability

(1)
When a business request triggers a transaction condition, the smart contract is executed, and the requesting node sends a transaction application to the endorsing node. For example, the dealer acts as a client to initiate a transaction with the retailer through the SDK or API, and the supervisor node is the endorsing node, the regulator first verifies dealer’s digital signature and then simulates the execution of the smart contract after the verification is passed. When dealer’s digital signature verification is passed and the transaction conditions meet the requirements of the smart contract status, the regulator node confirms that the dealer performs the transaction endorsement. And send the endorsement result back to the SDK or API and then apply for sorting to the sorting node through the SDK or API [22, 23](2)
Since this experiment is a stand-alone deployment, the Solo algorithm is used to sort only according to the order of transactions, and a group of transactions are confirmed and packaged to form a block. In this example, after confirmation, the generated block includes transaction records of dealers and retailers and also includes transaction records of dealers and manufacturers in previous transactions. Therefore, raw materials, production, and distribution are obtained in this link, traceability information of each link of retail [24](3)
The transaction information confirmed above is broadcast to the participants in the channel, and then, the information is added to the chain to form a block record; at the same time, each participant updates the node ledger [25]Table1 compares some technical characteristics of blockchain bitcoin, ethereum, and hyperledger.Table 1
Comparison of current mainstream blockchains.
Technical frameworkFunctionSmart contractMining/tokenConsistencyPermission controlTypePerformanceBitcoinDigital currencyNot possessed or weakYesPowWithoutPublic blockchain6TPS2EthereumSmart contractTuring completeYesPow, PoSWithoutPublic blockchain10+TPS restrictedHyperledgerBusiness networkMultilanguage support Turing completeNoMany kinds pluggableFabric CAAlliance chain1000+RipplePayment networkCodiusYesRPCAWithoutPublic blockchain1000+


## 2.4. Supply Chain Finance

Changes in the macroeconomic environment and the development of the industry will inevitably affect the supply chain where traders are located and various companies in the chain. Therefore, when banks assess the systemic risks of traders, they can not only look at the operating conditions of the macroeconomic environment. To investigate the development situation of the industry in two aspects, we should also make an accurate assessment of the competitiveness of the supply chain in which traders are located [26, 27].Suppose thatN types of financial production resources R are invested in M production units for production and the generalized C-D production function of financial resources:
(6)FiX=eλ∏n=1NXnan.Among them,F is the number of products of the production unit (industry) at time t. Solow residual value growth equation can be obtained:
(7)FFi=λi+∑n=1NanXXi.Among them,(8)Ft=Fi,t+1−Fi,t,Xi=Xt+1.Determine the parameter a by regression identification or DEA method, and set the macroscopic effect function of theq-level system:
(9)HqX,t=∫0Te−rta1pE+a2pE+a3p0Fdt.Among them,r is the bank interest rate, which mainly considers the time value of resource allocation. T is the resource optimization period. Then,
(10)X=Fieλ,t∏n=1NP/Piα1/∑m=1ma.It shows that the optimal allocation of resources is related to the price of input factors and the demand of the real economy. Defined by the resource structure:(11)XXi=X1Xm+SSm.S is the resource allocation structure, which can be determined by the dynamic model of the optimal allocation of resources among production units.
(12)xxn=1∑n=11anXXm∑n=1Na+∑n=1NSiS+a∑n=1NPPi+NPP1.SupposingAit is the production resources of t in the system production unit at i, then:
(13)ΔA=Wt+ΔNt+Dt=Wt+A1AΔA+Dt.


## 3. Design Experiment of Building Materials Supervision System

### 3.1. Platform Logical Architecture

There is no centralized or layered structure in the blockchain network. It is a decentralized system as a whole, consisting of six layers: data layer, network layer, and consensus layer. These three layers are the basic layer; the other three layers are the incentive layer, the contract layer, and the application layer. Data collection, verification, and operation are mainly processed in the data layer and network layer. The consensus and incentive layer includes smart contracts, consensus protocols, and incentive mechanisms. The contract layer and the application layer implement blockchain-based activities into practice. The components or technologies related to the six layers are shown in Table2.Table 2
Components or technologies related to the six layers.
Layer nameMain technology or componentsData layerData block, chain structure, timestamp, Merkle tree, hash algorithmNetwork layerP2P network, authentication mechanism, broadcast protocolConsensus layerPoW, PoS, DPoS, PBFTIncentive layerScript coding, incentive mechanismContract layerSmart contract, script code, IBM Azure BaaSApplication layerCryptocurrency, healthcare, cloud services


### 3.2. Application Layer Design

In the building material trading service platform, each subject needs to carry out various businesses at the application layer. Building material mixing companies, raw material suppliers, construction companies, and financial institutions publish, transmit, and query information and combine the blockchain technology platform to record the information flow therein, and each subject can query information within its own authority; at the same time, government regulatory agencies can monitor data in real time, which is also a promotion to the development of the entire industry. In the application layer, government regulatory agencies need to be equipped with a platform PC terminal for authorization and supervision; for each entity in the industry chain, it needs to be equipped with an enterprise-level PC terminal and an APP terminal.For the design of the development layer of the building materials trading service platform, the main purpose of the development layer is to enable the interaction of information between the subjects in the platform and to facilitate the design of various functions and programs.(1)
Interface managementThe interface of the platform needs to be conceived in conjunction with the building material business. According to the functional distinction, the required interfaces mainly include information generation interfaces, information inspection, information retrieval, and other information interfaces.(2)
Smart contractIn fact, smart contracts can also perform data processing, asset transaction operations, and smart asset management, expanding blockchain’s ability to use data. In the building material transaction service platform, building material companies, construction companies, and raw material supply companies can query transportation information and transaction information through smart contracts. Financial institutions can review all aspects of corporate information through smart contracts. Smart contracts can improve the efficiency of various businesses in the platform. At the same time, the government supervision department conducts supervision through smart contracts to check whether the system is abnormal.(3)
Consensus mechanismThe consensus mechanism is the mechanism by which blockchain nodes reach consensus on the entire network. According to the characteristics of the multicenter interaction of the building materials industry business, this paper should choose the pool verification and pool mechanism. Through this consensus mechanism, the transaction efficiency between the subjects in the system can be improved. Semicentralization also makes competition between each node too big. In this case, even mobile terminals with small computing power have the possibility to access the blockchain, providing convenience for all parties on the platform.


### 3.3. Storage Layer Design

The blockchain performs distributed accounting. For example, if the financial business is booked in the building material trading service platform, the borrower is a building material company, the lender is a financial institution, and the lender can establish its own lending account chain and withdrawing the account chain; when the borrower receives the loan, he can visit the lender node to verify. After the verification is passed, both the lender and the borrower can write to their own account chain. Therefore, all parties in the system can supervise each other. In this way, blockchain technology can trace the origin of the data to ensure the authenticity and security of the data.Blockchain technology can be used in data tracking. Specifically, with the help of blockchain technology in the building material industry, building material mixing companies can see where the raw materials such as sand and gravel are purchased from and where they are produced, the time point of the carrier, etc. In this case, the purchaser can verify whether this is the high-quality tree I ordered through blockchain technology. From the source of the tree to its transportation to purchaser’s hand, the information of each link is recorded in the “block” and was added to the “chain.” Buyers, raw material providers, and transporters can all see clear and transparent records from this “chain” to confirm whether the building materials are of high quality. This is the use of blockchain data storage features.(1)
Key and authentication mechanismThe key and authentication mechanism mainly includes the identity information authentication of the traceability enterprise and the distribution of key pairs. It uses asymmetric encryption, digital signature, PK I (Public Key Infrastructure, public key infrastructure) authentication system, and other cryptographic technologies. The traceable enterprise after the identity authentication can obtain the key pair issued by the key management center. The key pair includes a public key and a private key. When the user invokes the smart contract, the verifier will verify the prechained data. After confirming that the data is legal, the data is encrypted with the public key, and then, the traceability information is recorded in the zone blockchain. When reading the information in the blockchain, the smart contract can be called to obtain encrypted data, and the corresponding traceability information can be obtained after decryption with the private key.(2)
Authority managementIn the building material traceability system, some transaction information has a certain degree of privacy and can only be accessed by specific users. However, blockchain technology has the characteristics of information transparency and information sharing. Without restrictions, in the blockchain network, any user can obtain any information in the block, which leads to the disclosure of user privacy information. In this regard, this article proposes user rights management, and different types of users have different access rights, thus ensuring user information security and preventing user privacy information from leaking. This article assigns permissions based on the tasks and needs of traceability companies, regulatory agencies, and consumers in the building material traceability system.


### 3.4. Security Layer Design

For the design of platform’s security layer, two problems are mainly solved. Firstly, ensure that the users on the platform meet the regulations, and secondly, set the permissions of the platform reasonably, that is, restrict the access scope of each subject.(1)
Identity verification and auditThe identity of each subject participating in the blockchain system needs to undergo a qualification review before entering the platform, because in the building material transaction service platform, the alliance chain has been chosen. The nodes in the alliance chain are not unlimited, and the products are mixed. In the Ningshi trading platform, the transaction behavior must be strictly monitored, and the nodes in the nonsystem cannot perform arbitrary operations on the data on the chain.(2)
Access controlBased on business transactions, it is necessary to manage the authority of the subjects in the platform, and then, the administrator sets the authority for it. This is done on the one hand to ensure the quality of platform transactions; on the other hand, it can be beneficial to management and supervision. Access control is implemented based on the asymmetric encryption technology of the blockchain, and only the subject with the secret key corresponding to the node has the right to access specific data information.


### 3.5. Infrastructure Layer Design

In the entire consortium chain, the infrastructure layer contains various servers and network facilities. With the support of these technologies, the main body of the platform can use the technological “black box” to obtain services on the platform without clarifying the operation mode. In the blockchain-based building material transaction service platform, the infrastructure layer mainly provides data resources and blockchain service resources. Data resources are all kinds of information gathered in the platform, and the platform can integrate relevant data. Each entity in the building material transaction service platform can access data resources according to their own needs and provide references for their own decision-making trends. Blockchain service resources means that through the infrastructure layer of the building material transaction service platform, each subject in the building material transaction service platform does not need to separately configure the information storage, calculation, and blockchain architecture, as long as it is settled in the building materials. These services can be enjoyed in the trading service platform.


## 3.1. Platform Logical Architecture

There is no centralized or layered structure in the blockchain network. It is a decentralized system as a whole, consisting of six layers: data layer, network layer, and consensus layer. These three layers are the basic layer; the other three layers are the incentive layer, the contract layer, and the application layer. Data collection, verification, and operation are mainly processed in the data layer and network layer. The consensus and incentive layer includes smart contracts, consensus protocols, and incentive mechanisms. The contract layer and the application layer implement blockchain-based activities into practice. The components or technologies related to the six layers are shown in Table2.Table 2
Components or technologies related to the six layers.
Layer nameMain technology or componentsData layerData block, chain structure, timestamp, Merkle tree, hash algorithmNetwork layerP2P network, authentication mechanism, broadcast protocolConsensus layerPoW, PoS, DPoS, PBFTIncentive layerScript coding, incentive mechanismContract layerSmart contract, script code, IBM Azure BaaSApplication layerCryptocurrency, healthcare, cloud services


## 3.2. Application Layer Design

In the building material trading service platform, each subject needs to carry out various businesses at the application layer. Building material mixing companies, raw material suppliers, construction companies, and financial institutions publish, transmit, and query information and combine the blockchain technology platform to record the information flow therein, and each subject can query information within its own authority; at the same time, government regulatory agencies can monitor data in real time, which is also a promotion to the development of the entire industry. In the application layer, government regulatory agencies need to be equipped with a platform PC terminal for authorization and supervision; for each entity in the industry chain, it needs to be equipped with an enterprise-level PC terminal and an APP terminal.For the design of the development layer of the building materials trading service platform, the main purpose of the development layer is to enable the interaction of information between the subjects in the platform and to facilitate the design of various functions and programs.(1)
Interface managementThe interface of the platform needs to be conceived in conjunction with the building material business. According to the functional distinction, the required interfaces mainly include information generation interfaces, information inspection, information retrieval, and other information interfaces.(2)
Smart contractIn fact, smart contracts can also perform data processing, asset transaction operations, and smart asset management, expanding blockchain’s ability to use data. In the building material transaction service platform, building material companies, construction companies, and raw material supply companies can query transportation information and transaction information through smart contracts. Financial institutions can review all aspects of corporate information through smart contracts. Smart contracts can improve the efficiency of various businesses in the platform. At the same time, the government supervision department conducts supervision through smart contracts to check whether the system is abnormal.(3)
Consensus mechanismThe consensus mechanism is the mechanism by which blockchain nodes reach consensus on the entire network. According to the characteristics of the multicenter interaction of the building materials industry business, this paper should choose the pool verification and pool mechanism. Through this consensus mechanism, the transaction efficiency between the subjects in the system can be improved. Semicentralization also makes competition between each node too big. In this case, even mobile terminals with small computing power have the possibility to access the blockchain, providing convenience for all parties on the platform.


## 3.3. Storage Layer Design

The blockchain performs distributed accounting. For example, if the financial business is booked in the building material trading service platform, the borrower is a building material company, the lender is a financial institution, and the lender can establish its own lending account chain and withdrawing the account chain; when the borrower receives the loan, he can visit the lender node to verify. After the verification is passed, both the lender and the borrower can write to their own account chain. Therefore, all parties in the system can supervise each other. In this way, blockchain technology can trace the origin of the data to ensure the authenticity and security of the data.Blockchain technology can be used in data tracking. Specifically, with the help of blockchain technology in the building material industry, building material mixing companies can see where the raw materials such as sand and gravel are purchased from and where they are produced, the time point of the carrier, etc. In this case, the purchaser can verify whether this is the high-quality tree I ordered through blockchain technology. From the source of the tree to its transportation to purchaser’s hand, the information of each link is recorded in the “block” and was added to the “chain.” Buyers, raw material providers, and transporters can all see clear and transparent records from this “chain” to confirm whether the building materials are of high quality. This is the use of blockchain data storage features.(1)
Key and authentication mechanismThe key and authentication mechanism mainly includes the identity information authentication of the traceability enterprise and the distribution of key pairs. It uses asymmetric encryption, digital signature, PK I (Public Key Infrastructure, public key infrastructure) authentication system, and other cryptographic technologies. The traceable enterprise after the identity authentication can obtain the key pair issued by the key management center. The key pair includes a public key and a private key. When the user invokes the smart contract, the verifier will verify the prechained data. After confirming that the data is legal, the data is encrypted with the public key, and then, the traceability information is recorded in the zone blockchain. When reading the information in the blockchain, the smart contract can be called to obtain encrypted data, and the corresponding traceability information can be obtained after decryption with the private key.(2)
Authority managementIn the building material traceability system, some transaction information has a certain degree of privacy and can only be accessed by specific users. However, blockchain technology has the characteristics of information transparency and information sharing. Without restrictions, in the blockchain network, any user can obtain any information in the block, which leads to the disclosure of user privacy information. In this regard, this article proposes user rights management, and different types of users have different access rights, thus ensuring user information security and preventing user privacy information from leaking. This article assigns permissions based on the tasks and needs of traceability companies, regulatory agencies, and consumers in the building material traceability system.


## 3.4. Security Layer Design

For the design of platform’s security layer, two problems are mainly solved. Firstly, ensure that the users on the platform meet the regulations, and secondly, set the permissions of the platform reasonably, that is, restrict the access scope of each subject.(1)
Identity verification and auditThe identity of each subject participating in the blockchain system needs to undergo a qualification review before entering the platform, because in the building material transaction service platform, the alliance chain has been chosen. The nodes in the alliance chain are not unlimited, and the products are mixed. In the Ningshi trading platform, the transaction behavior must be strictly monitored, and the nodes in the nonsystem cannot perform arbitrary operations on the data on the chain.(2)
Access controlBased on business transactions, it is necessary to manage the authority of the subjects in the platform, and then, the administrator sets the authority for it. This is done on the one hand to ensure the quality of platform transactions; on the other hand, it can be beneficial to management and supervision. Access control is implemented based on the asymmetric encryption technology of the blockchain, and only the subject with the secret key corresponding to the node has the right to access specific data information.


## 3.5. Infrastructure Layer Design

In the entire consortium chain, the infrastructure layer contains various servers and network facilities. With the support of these technologies, the main body of the platform can use the technological “black box” to obtain services on the platform without clarifying the operation mode. In the blockchain-based building material transaction service platform, the infrastructure layer mainly provides data resources and blockchain service resources. Data resources are all kinds of information gathered in the platform, and the platform can integrate relevant data. Each entity in the building material transaction service platform can access data resources according to their own needs and provide references for their own decision-making trends. Blockchain service resources means that through the infrastructure layer of the building material transaction service platform, each subject in the building material transaction service platform does not need to separately configure the information storage, calculation, and blockchain architecture, as long as it is settled in the building materials. These services can be enjoyed in the trading service platform.


## 4. Blockchain Building Materials Supervision System

### 4.1. Blockchain Traceability Analysis

This experiment uses the production and sales data of building materials after 2018, involving 8 batches of tie fabrics, and the total number of building materials produced is about 10,000. It is calculated based on the unique identification code of each tie and the finished materials tracked by the experiment about 10,000, so the data volume is relatively small, using a single-machine multinode network for development.The research uses Tencent Cloud platform environment. Hyperledger Fabric’s Chaincode is mainly written in Go language and runs in the Dockor container network environment. Therefore, it is necessary to install GO software and Docker and download and install Fabric files and related configuration files from the official website. The web front end uses the tomcat server, and the traceable data is stored in the mysql database before being connected to the blockchain. The environment configuration is shown in Table3.Table 3
Environment configuration.
TypesNameDescriptionHardware environmentTencent CloudOperating system: CentOS7.0RAM: 2 GCPU: 1 HNetwork card: 1 MSoftware environmentFabricRunning version: Release-1.2Fabric-samplesRunning version: Release-1.2TomcatRunning version: 7.0.90Mysq|Running version: 5.6.31The transaction information of building material manufacturers, manufacturers, distributors, and retailers has been registered in the blockchain to form a queryable transaction process; the raw materials and finished building materials can be queried and verified, respectively, and the corresponding information can be returned. Information such as manufacturers and origins of origin can be traced to the blockchain. The above blockchain traceability results are provided to the front-end page of the platform for retailers and regulators to verify and inquire. The retailer only verifies the country where the goods are imported and proves that they are authorized distributors; the regulator can verify the names and countries of the parties involved in the entire supply chain. The front-end page controls the display data authority of the retailer and the regulator. The retailer only returns the country of origin of the product and its own name when querying, and the query of the regulator returns the country of origin of the product and the names of each participant. When the inquirer finds that the source information description on the tie-in identification plate is different from that on the traceability system, for example, the material identification plate says “building materials” and the query results are inconsistent, and the feedback information is directly submitted on the system. The blockchain product query page is shown in Figure2.Figure 2
Blockchain product query page (fromhttps://www.blockchain.com/).Company A is a trading company engaged in building materials, specializing in providing raw materials to downstream building materials manufacturing companies. Company A has accumulated more than ten years of experience in the building material market. It has comprehensive channels and a high market share in the building material market. However, most of the business transactions between the building material market and downstream manufacturing companies are based on receiving goods first and manufacturing. The company only pays after passing the inspection. However, purchasing in the building material market requires a large amount of cash flow, which leads to a shortage of funds for A company and affects the normal operation of the company. Company A has stocked a batch of building materials in its warehouse at this time, which is a strategic stockpile of the company and plans to sell it in the spring of the next year. In order to solve the financial dilemma as soon as possible, company A used this batch of building materials as pledges to apply to bank B for warehouse receipt pledge financing. The specific parameter value setting is shown in Table4.Table 4
Specific parameter value settings.
ParameterQuantity of pledged commodities (tons)Market unit price of pledged commodities (thousand yuan/ton)Bank capital cost rateFinancing rateProbability of defaultValue200080.0230.070.3Under the traditional model, the expected return function of the bank increases monotonically in the interval [0, 0.7403] and decreases monotonously in the interval [0.7403, 0.8420]. When the return coefficient is 0.7403, the maximum expected return is obtained, and the return value is 290.3829, which can be seen in the traditional mode. Both the highest quality pledge rate and bank’s best expected return are lower than the results under the blockchain model. Figure3 shows the comparison results of the yield curves of the two models.Figure 3
Comparison of the yield curves of the two models.It can be seen from Figure3 that there is a critical point pledge rate for both models, so that bank’s yield curve shows a trend that first increases and then decreases as the pledge rate increases. In addition, the pledge rate is within the range of [0, 0.4206]. The expected income of the bank under the traditional model is higher than that of the blockchain model. This is because the bank in the blockchain model has to pay the cost of blockchain information, and the information cost is related to the pledge of goods When the pledge rate is too low, the income of the bank is too low to offset the cost of the blockchain, so the pledge rate is within the range of [0, 0.4206]. The expected income of the bank under the blockchain model is low. In the traditional chain model, when the pledge rate is within the range of [0.4206, 1], bank’s income under the blockchain model is higher. This is because there is no possibility of traders cheating loans under the blockchain model, and the bank has the best quality The pledge rate decision is not affected by the probability of traders defrauding loans, and bank’s loan income is sufficient to offset the input cost of the blockchain, so bank’s expected return must be higher than the traditional model.


### 4.2. Impact of Order Volume Fluctuations on Bank Financing Decisions

Keeping other parameters unchanged, so that the standard deviation of the market order quantity of the pledged goods of the traders will change, the optimal expected income and pledge rate changes of the bank under the blockchain mode can be obtained. The change curve is shown in Figure4. It can be seen from Figure 4 that under the condition that other parameters remain unchanged, as the standard deviation of the market order quantity of the merchant pledged goods increases, bank’s best quality pledge rate and the best expected return both decrease. Therefore, the expected return of the bank and the pledge rate are both negatively correlated with the standard deviation of the market order quantity of the pledge, which shows that for the pledge with more volatility in the market order volume, at the end of the pledge period, the total market value of the pledge is lower than the loan principal and interest. And it is more likely to cause traders to default, so banks need to reduce the financing pledge rate reasonably (as shown in Table 5).Figure 4
Bank’s optimal expected return and pledge rate change under the blockchain model.Table 5
The impact of the standard deviation of the pledged commodity market order quantity on bank’s expected return and pledge rate.
Standard deviation (σ)857.3860.2863.14866.03868.91871.80874.69877.57880.46Pledge rate (w)0.8610.8590.8570.8550.85330.85130.84930.84730.8453Expected incomeE (W)440.8439.1437.4435.6433.9432.2430.5428.8427.0Keeping other parameters unchanged and changing the discount rate of pledged goods, bank’s optimal expected income and pledge rate change under the blockchain model can be obtained. The change curve is shown in Figure5. It can be seen from Figure 5 that under the condition that other parameters remain unchanged, as the discount rate of the end-of-period processing of pledged commodities by traders increases, bank’s highest quality pledge rate and optimal expected return both increase. Therefore, the expected income of the bank and the pledge rate are positively correlated with the discount of the pledge of the pledge, which shows that the smaller the loss caused by the backlog of the pledge at the end of the period, the higher the possibility of traders’ performance, and the bank can reasonably increase financing pledge rate. Table 6 shows the impact of the discount rate of pledged goods processing at the end of the period on bank’s income and pledge rate.Figure 5
Bank’s optimal expected return and pledge rate change under the blockchain model.Table 6
The effect of the discount rate of pledged products at the end of the period on bank’s income and pledge rate.
Deal with discountβ0.250.30.350.40.50.550.60.250.3Pledge ratew0.8150.8230.8310.8380.85490.86280.87080.8150.823Expected incomeE (W)430.0441.86453.64465.42488.99500.77512.55430.08441.86Keep other parameters unchanged, change the difference between the traditional model and the block chain model of trader’s default probability, calculate the difference between bank’s optimal expected income and the pledge rate under the two models, and the change curve is shown in Figure6. The optimal expected return and pledge rate are shown in Table 7.Figure 6
The change in the difference between bank’s optimal expected return and the pledge rate under the two models.Table 7
Optimal expected return and pledge rate.
Probability of default difference0.050.150.200.250.300.350.450.050.15Pledge rate difference0.1020.12390.13070.13590.14010.14350.14650.10240.1239Expected return difference142.7147.14148.52149.59150.44151.14152.26142.73147.14


### 4.3. System Performance Test and Analysis

This section mainly tests the actual operating efficiency of the improved blockchain and analyzes the test results to verify the practicability of the traceability system proposed in this article. First, the improved blockchain is deployed on 6 virtual machines. After the deployment is completed, the blockchain network is started to test the system delay and throughput by sending proposals and query requests. In order to reduce the interference of system communication time and ensure the accuracy of test results, this article arranges the test process in the blockchain network, through writing shell script commands, using multithreaded mode to send transaction requests in the Fabric cli environment, after multiple tests. The system delay is shown in Table8, and the system throughput is shown in Table 9.Table 8
System delay after multiple tests.
Proposal request transactionsTest 1 system running time (s)Test 2 system running time (s)Test 3 system running time (s)Average running time (s)System delay (ms)Throughput (TPS)10003.202.143.232.862.86350.0620004.225.605.375.062.53395.0030006.168.307.307.252.42413.6040008.508.2511.109.282.32430.88500011.3212.2012.4712.002.40416.78600013.5014.4216.6114.842.47404.22700017.7319.3520.1019.062.72367.26800021.3628.6826.7025.583.20312.74900030.4332.2038.8033.813.76266.191000042.1738.3644.5841.704.17239.79Table 9
System throughput.
Proposal request transactionsTest 1 system running time (s)Test 2 system running time (s)Test 3 system running time (s)Average running time (s)System delay (ms)Throughput (TPS)10002.683.302.252.742.74364.5220005.315.206.385.632.82355.2430007.129.468.838.472.82354.19400010.609.639.8010.012.50399.60500015.7912.6513.4013.952.79358.51600017.5516.7218.3017.522.92342.40700021.8021.0019.1420.652.95339.04800023.7324.6022.5923.642.95338.41900026.3025.2225.5125.682.85350.511000032.6227.9330.4430.333.03329.71In order to facilitate observation, the system performance test results are simulated through MATLAB, and the simulation graphs of throughput in the two cases of system proposal request and query request are shown in Figure7. The system throughput under the proposal request, when the proposal request increases from 1000 to 4000, the system throughput gradually increases from 350.06 to 430.88, but when the proposal request exceeds 4000, the system throughput begins to show a downward trend. This is because the number of requests exceeds the processing capacity of the node, which leads to thread blockage and degrades system performance. The system throughput under the query request, when the query request increases from 1000 to 10000, the system throughput basically stabilizes at about 350. This is because during the query request process, the blockchain only performs read operations but not write operations and does not occupy system resources, so the system throughput is relatively stable. It can be seen that the average throughput of transaction processing in the unimproved blockchain network is only between ten and 100, which is difficult to meet actual needs. The average throughput of the improved blockchain network is about 300, which meets the basic needs of the current system operation. For the system delay, the unimproved blockchain has a higher delay, and the highest delay reaches the second level, which is difficult to meet the actual demand. The improved blockchain saves the resource loss caused by communication between nodes, so the average system delay is about 2 ms. In practical applications, the system delay also includes the delay generated during network communication, but the overall system delay will still perform well.Figure 7
The simulation graph of throughput in the two cases of obtaining system proposal request and query request.


## 4.1. Blockchain Traceability Analysis

This experiment uses the production and sales data of building materials after 2018, involving 8 batches of tie fabrics, and the total number of building materials produced is about 10,000. It is calculated based on the unique identification code of each tie and the finished materials tracked by the experiment about 10,000, so the data volume is relatively small, using a single-machine multinode network for development.The research uses Tencent Cloud platform environment. Hyperledger Fabric’s Chaincode is mainly written in Go language and runs in the Dockor container network environment. Therefore, it is necessary to install GO software and Docker and download and install Fabric files and related configuration files from the official website. The web front end uses the tomcat server, and the traceable data is stored in the mysql database before being connected to the blockchain. The environment configuration is shown in Table3.Table 3
Environment configuration.
TypesNameDescriptionHardware environmentTencent CloudOperating system: CentOS7.0RAM: 2 GCPU: 1 HNetwork card: 1 MSoftware environmentFabricRunning version: Release-1.2Fabric-samplesRunning version: Release-1.2TomcatRunning version: 7.0.90Mysq|Running version: 5.6.31The transaction information of building material manufacturers, manufacturers, distributors, and retailers has been registered in the blockchain to form a queryable transaction process; the raw materials and finished building materials can be queried and verified, respectively, and the corresponding information can be returned. Information such as manufacturers and origins of origin can be traced to the blockchain. The above blockchain traceability results are provided to the front-end page of the platform for retailers and regulators to verify and inquire. The retailer only verifies the country where the goods are imported and proves that they are authorized distributors; the regulator can verify the names and countries of the parties involved in the entire supply chain. The front-end page controls the display data authority of the retailer and the regulator. The retailer only returns the country of origin of the product and its own name when querying, and the query of the regulator returns the country of origin of the product and the names of each participant. When the inquirer finds that the source information description on the tie-in identification plate is different from that on the traceability system, for example, the material identification plate says “building materials” and the query results are inconsistent, and the feedback information is directly submitted on the system. The blockchain product query page is shown in Figure2.Figure 2
Blockchain product query page (fromhttps://www.blockchain.com/).Company A is a trading company engaged in building materials, specializing in providing raw materials to downstream building materials manufacturing companies. Company A has accumulated more than ten years of experience in the building material market. It has comprehensive channels and a high market share in the building material market. However, most of the business transactions between the building material market and downstream manufacturing companies are based on receiving goods first and manufacturing. The company only pays after passing the inspection. However, purchasing in the building material market requires a large amount of cash flow, which leads to a shortage of funds for A company and affects the normal operation of the company. Company A has stocked a batch of building materials in its warehouse at this time, which is a strategic stockpile of the company and plans to sell it in the spring of the next year. In order to solve the financial dilemma as soon as possible, company A used this batch of building materials as pledges to apply to bank B for warehouse receipt pledge financing. The specific parameter value setting is shown in Table4.Table 4
Specific parameter value settings.
ParameterQuantity of pledged commodities (tons)Market unit price of pledged commodities (thousand yuan/ton)Bank capital cost rateFinancing rateProbability of defaultValue200080.0230.070.3Under the traditional model, the expected return function of the bank increases monotonically in the interval [0, 0.7403] and decreases monotonously in the interval [0.7403, 0.8420]. When the return coefficient is 0.7403, the maximum expected return is obtained, and the return value is 290.3829, which can be seen in the traditional mode. Both the highest quality pledge rate and bank’s best expected return are lower than the results under the blockchain model. Figure3 shows the comparison results of the yield curves of the two models.Figure 3
Comparison of the yield curves of the two models.It can be seen from Figure3 that there is a critical point pledge rate for both models, so that bank’s yield curve shows a trend that first increases and then decreases as the pledge rate increases. In addition, the pledge rate is within the range of [0, 0.4206]. The expected income of the bank under the traditional model is higher than that of the blockchain model. This is because the bank in the blockchain model has to pay the cost of blockchain information, and the information cost is related to the pledge of goods When the pledge rate is too low, the income of the bank is too low to offset the cost of the blockchain, so the pledge rate is within the range of [0, 0.4206]. The expected income of the bank under the blockchain model is low. In the traditional chain model, when the pledge rate is within the range of [0.4206, 1], bank’s income under the blockchain model is higher. This is because there is no possibility of traders cheating loans under the blockchain model, and the bank has the best quality The pledge rate decision is not affected by the probability of traders defrauding loans, and bank’s loan income is sufficient to offset the input cost of the blockchain, so bank’s expected return must be higher than the traditional model.


## 4.2. Impact of Order Volume Fluctuations on Bank Financing Decisions

Keeping other parameters unchanged, so that the standard deviation of the market order quantity of the pledged goods of the traders will change, the optimal expected income and pledge rate changes of the bank under the blockchain mode can be obtained. The change curve is shown in Figure4. It can be seen from Figure 4 that under the condition that other parameters remain unchanged, as the standard deviation of the market order quantity of the merchant pledged goods increases, bank’s best quality pledge rate and the best expected return both decrease. Therefore, the expected return of the bank and the pledge rate are both negatively correlated with the standard deviation of the market order quantity of the pledge, which shows that for the pledge with more volatility in the market order volume, at the end of the pledge period, the total market value of the pledge is lower than the loan principal and interest. And it is more likely to cause traders to default, so banks need to reduce the financing pledge rate reasonably (as shown in Table 5).Figure 4
Bank’s optimal expected return and pledge rate change under the blockchain model.Table 5
The impact of the standard deviation of the pledged commodity market order quantity on bank’s expected return and pledge rate.
Standard deviation (σ)857.3860.2863.14866.03868.91871.80874.69877.57880.46Pledge rate (w)0.8610.8590.8570.8550.85330.85130.84930.84730.8453Expected incomeE (W)440.8439.1437.4435.6433.9432.2430.5428.8427.0Keeping other parameters unchanged and changing the discount rate of pledged goods, bank’s optimal expected income and pledge rate change under the blockchain model can be obtained. The change curve is shown in Figure5. It can be seen from Figure 5 that under the condition that other parameters remain unchanged, as the discount rate of the end-of-period processing of pledged commodities by traders increases, bank’s highest quality pledge rate and optimal expected return both increase. Therefore, the expected income of the bank and the pledge rate are positively correlated with the discount of the pledge of the pledge, which shows that the smaller the loss caused by the backlog of the pledge at the end of the period, the higher the possibility of traders’ performance, and the bank can reasonably increase financing pledge rate. Table 6 shows the impact of the discount rate of pledged goods processing at the end of the period on bank’s income and pledge rate.Figure 5
Bank’s optimal expected return and pledge rate change under the blockchain model.Table 6
The effect of the discount rate of pledged products at the end of the period on bank’s income and pledge rate.
Deal with discountβ0.250.30.350.40.50.550.60.250.3Pledge ratew0.8150.8230.8310.8380.85490.86280.87080.8150.823Expected incomeE (W)430.0441.86453.64465.42488.99500.77512.55430.08441.86Keep other parameters unchanged, change the difference between the traditional model and the block chain model of trader’s default probability, calculate the difference between bank’s optimal expected income and the pledge rate under the two models, and the change curve is shown in Figure6. The optimal expected return and pledge rate are shown in Table 7.Figure 6
The change in the difference between bank’s optimal expected return and the pledge rate under the two models.Table 7
Optimal expected return and pledge rate.
Probability of default difference0.050.150.200.250.300.350.450.050.15Pledge rate difference0.1020.12390.13070.13590.14010.14350.14650.10240.1239Expected return difference142.7147.14148.52149.59150.44151.14152.26142.73147.14


## 4.3. System Performance Test and Analysis

This section mainly tests the actual operating efficiency of the improved blockchain and analyzes the test results to verify the practicability of the traceability system proposed in this article. First, the improved blockchain is deployed on 6 virtual machines. After the deployment is completed, the blockchain network is started to test the system delay and throughput by sending proposals and query requests. In order to reduce the interference of system communication time and ensure the accuracy of test results, this article arranges the test process in the blockchain network, through writing shell script commands, using multithreaded mode to send transaction requests in the Fabric cli environment, after multiple tests. The system delay is shown in Table8, and the system throughput is shown in Table 9.Table 8
System delay after multiple tests.
Proposal request transactionsTest 1 system running time (s)Test 2 system running time (s)Test 3 system running time (s)Average running time (s)System delay (ms)Throughput (TPS)10003.202.143.232.862.86350.0620004.225.605.375.062.53395.0030006.168.307.307.252.42413.6040008.508.2511.109.282.32430.88500011.3212.2012.4712.002.40416.78600013.5014.4216.6114.842.47404.22700017.7319.3520.1019.062.72367.26800021.3628.6826.7025.583.20312.74900030.4332.2038.8033.813.76266.191000042.1738.3644.5841.704.17239.79Table 9
System throughput.
Proposal request transactionsTest 1 system running time (s)Test 2 system running time (s)Test 3 system running time (s)Average running time (s)System delay (ms)Throughput (TPS)10002.683.302.252.742.74364.5220005.315.206.385.632.82355.2430007.129.468.838.472.82354.19400010.609.639.8010.012.50399.60500015.7912.6513.4013.952.79358.51600017.5516.7218.3017.522.92342.40700021.8021.0019.1420.652.95339.04800023.7324.6022.5923.642.95338.41900026.3025.2225.5125.682.85350.511000032.6227.9330.4430.333.03329.71In order to facilitate observation, the system performance test results are simulated through MATLAB, and the simulation graphs of throughput in the two cases of system proposal request and query request are shown in Figure7. The system throughput under the proposal request, when the proposal request increases from 1000 to 4000, the system throughput gradually increases from 350.06 to 430.88, but when the proposal request exceeds 4000, the system throughput begins to show a downward trend. This is because the number of requests exceeds the processing capacity of the node, which leads to thread blockage and degrades system performance. The system throughput under the query request, when the query request increases from 1000 to 10000, the system throughput basically stabilizes at about 350. This is because during the query request process, the blockchain only performs read operations but not write operations and does not occupy system resources, so the system throughput is relatively stable. It can be seen that the average throughput of transaction processing in the unimproved blockchain network is only between ten and 100, which is difficult to meet actual needs. The average throughput of the improved blockchain network is about 300, which meets the basic needs of the current system operation. For the system delay, the unimproved blockchain has a higher delay, and the highest delay reaches the second level, which is difficult to meet the actual demand. The improved blockchain saves the resource loss caused by communication between nodes, so the average system delay is about 2 ms. In practical applications, the system delay also includes the delay generated during network communication, but the overall system delay will still perform well.Figure 7
The simulation graph of throughput in the two cases of obtaining system proposal request and query request.


## 5. Conclusion

In the building material trading service platform, each subject needs to carry out various businesses at the application layer. Building material mixing companies, raw material suppliers, construction companies, and financial institutions publish, transmit, and query information and combine the blockchain technology platform to record the information flow therein, and each subject can query information within its own authority; at the same time, government regulatory agencies can monitor data in real time, which is also a promotion to the development of the entire industry.For the design of the development layer of the building material trading service platform, because the main purpose of the development layer is to enable the interaction of information between the subjects in the platform and to facilitate the design of various functions and programs. The interface of the platform needs to be conceived in conjunction with the building material business. According to the functional distinction, the required interfaces mainly include information generation interfaces, information inspection, information retrieval, and other information interfaces.In fact, smart contracts can also perform data processing, asset transaction operations, and smart asset management, expanding blockchain’s ability to use data. In the building material transaction service platform, building material companies, construction companies, and raw material supply companies can query transportation information and transaction information through smart contracts. Financial institutions can review all aspects of corporate information through smart contracts. Smart contracts can improve the efficiency of various businesses in the platform. At the same time, the government supervision department conducts supervision through smart contracts to check whether the system is abnormal. The system designed in this research has realized the certification and traceability of building materials and has good use value.



---

*Source: 2411424-2021-12-24.xml*