https://doi.org/10.31449/inf.v45i6.3729 Informatica 45 (2021) 119–123 119 Supply Chain Optimization of Agricultural Products in the Internet Environment with Blockchain Peicai Guan Department of Economic Management, Sichuan Top IT Vocational Institute, Chengdu, Sichuan 611743, China E-mail: cp5195@126.com Keywords: supply chain, blockchain, logistics, traceability Received: September 3. 2021 This paper briefly introduces blockchain and agricultural product supply chain and optimizes the agricultural product supply chain with blockchain. Then, an instance analysis is carried out by taking a flour mill in Sichuan Province as an example. The results show that the supply chain-based agricultural product supply chain could be properly applied to the supply chain management of the flour mill; the supply chain that adopted blockchain technology could effectively resist abnormal data modification and ensure the reliability of supply chain information, and it could also quickly trace the faulty link in the supply chain and improve the efficiency of supply chain management. Povzetek: Predstavljeno je uvajanje verižnih tehnologij v dobavno verigo kmetijskih produktov. 1 Introduction Products that are primarily processed or not processed in agricultural activities are called agricultural products, including aquatic products, cereals, vegetables, fruits, and poultry eggs. With the progress of science and technology, agricultural productivity has improved. In order to ensure production efficiency, the production areas of agricultural products gradually pay more attention to intensification and division of labor, i.e., different types of agricultural products are produced on a large scale in their respective suitable areas to meet the demand of other regions [1]. Although intensification and division of labor have improved the production efficiency of agricultural products, different kinds of agricultural products have different shelf lives; therefore, excellent logistics are needed to build a supply chain to efficiently transport agricultural products to other regions to ensure their values within the shelf lives [2]. The use of logistics in the supply chain can realize the transaction of agricultural products without the constraints of time and space. Although the supply chain organically integrates different trading members to form an interlocking network chain, which greatly expands the productivity, it also has some hidden dangers, i.e., once a node in the interlocking supply chain makes mistakes, the whole supply chain may not collapse immediately, but it will inevitably cause adverse effects; therefore, it is necessary to trace the source of agricultural products in the supply chain in time, i.e., to query the faulty links in the supply chain [3]. In the traditional supply chain, although the node enterprises are closely linked with each other, due to different reasons, they form an information island, which makes it more difficult to query the real information in the supply chain. The emergence of the Internet has driven the development of blockchain technology. The new decentralized and trust-free data framework of blockchain enables it to have the same nature to optimize the traditional agricultural product supply chain when combined with the supply chain. Tian [4] analyzed the application of radio frequency identification (RFID) and blockchain technology in the construction of the agricultural product supply chain. Mao et al. [5] proposed a credit evaluation system based on blockchain and found that long short term memory (LSTM) combined with blockchain had better performance for analyzing the credit evaluation text. 2 Blockchain Blockchain is a kind of distributed ledger database that leverages peer nodes in the network and consensus algorithms [6]. In the blockchain, different data blocks are connected in chronological order. The authenticity reliability of the data in the block is tested by the hash algorithm [7], and the trust relationship between the nodes where the block is located is realized by consensus algorithms. The block structure in the blockchain is shown Figure 1: The basic structure of a block in the blockchain. 120 Informatica 45 (2021) 119–123 P. Guan in Figure 1. The block head is an important part of the block, which stores version number [8], random number, timestamp [9], previous block hash, current block hash, and Merkle root; the block body seals up the relevant data of the transactions in which the block participates. These data are guaranteed to be true by digital signature and are summarized to the Merkle root by hash [10]. In the process of using blockchain, the blocks will not interact with the block body data directly but interact through the hash function in the block header. 3 Agricultural products supply chain and its optimization In order to improve the production efficiency of agricultural products, different types of agricultural products will choose different regions for large-scale production. Although this approach can maximize the production efficiency of agricultural products, it will also bring some problems. The main reason is that the consumption capacity of the origin of agricultural products is limited, and the surplus products will cause greater losses if they are not handled; therefore, it is necessary to have a reasonable supply chain to transport the surplus agricultural products to other regions through logistics to promote the interaction of agricultural products between different regions. Supply chains have been used in production and sales in many fields. Generally, the links of supply chains are similar [11], but the specific details are different due to the characteristics of each field. Figure 2 shows the basic links of the agricultural product supply chain. The first link is the production of agricultural products, which usually includes the planting, feeding, and harvesting of agricultural products. The second link is the treatment of agricultural products, and this link can be skipped according to the type of agricultural products. For example, agricultural products such as eggs that do not need to be processed can directly enter the storage link, while the agricultural products that need to be processed will be processed in this link. The third link is the storage of agricultural products. Due to the limited logistics and transportation capacity in the supply chain, it is impossible to transport the surplus agricultural products in a short time; thus, it is necessary to store the agricultural products, and the storage time depends on the shelf life of the agricultural products. The fourth link is the transportation of agricultural products. The agricultural products stored in the storage link are transported to the sales point of the target area through logistics. According to the types of agricultural products transported, the transportation link can not only be connected with the storage link but also directly connected with the treatment and production links. As the shelf life of agricultural products is often short, they need to be transported to the sales place immediately after production. The final link is the sales of agricultural products. When the agricultural products are transported to the corresponding sales place through logistics, they can be sold [12]. In the traditional supply chain of agricultural products, each link can be regarded as a node, and each node will record the operation and related information of agricultural products in the corresponding link of the node, such as the quality and shelf life of agricultural products, quality inspection personnel, recording time, etc., so as to facilitate the traceability of agricultural products in the future. The nodes that make up the supply chain can be different departments of the same enterprise, or different and cooperative enterprises. The Internet makes the nodes in the supply chain more closely connected, i.e., it makes the communication between nodes more convenient, and it also makes the nodes store more information about agricultural products. However, due to the various types, processing methods, and storage conditions of agricultural products, the food logistics supply chain is not only complex but also has a long cycle. An information island forms as the data storage and transmission formats of different node enterprises in the traditional supply chain are not the same, which is difficult to guarantee the authenticity and reliability of data. The optimized agricultural product supply chain is shown in Figure 3, and the sequence structure of the agricultural product supply chain is consistent with that of the traditional agricultural product supply chain. After using the blockchain for optimization, the agricultural product information of each link in the supply chain is no longer stored in the corresponding local node but uploaded to the block of the blockchain through the Internet [13]. 4 Case analysis 4.1 Object profile This study took a flour mill in Sichuan Province as an example. The flour mill mainly sells different kinds of flour and has many subsidiaries, which are respectively engaged in the production, processing, transportation, and sales of flour raw materials. Although the subsidiaries of the flour mill operate independently, they belong to the same flour mill, thus forming a complete supply chain. As the subsidiaries are under the same company, relatively complete data can be obtained by conducting an investigation in the headquarters of the flour mill. The supply chain formed by the subsidiary companies of the flour mill effectively improves the production and sales efficiency of flour. However, due to the independence of node enterprises in the supply chain, the behavior of Figure 2: The supply chain of agricultural products. Figure 3: The agricultural product supply chain optimized by blockchain. Supply Chain Optimization of Agricultural Products in the... Informatica 45 (2021) 119–123 121 “being both an athlete and a referee” reduces the examination intensity of each link. Whether it is due to operational errors or driven by interests, flour quality problems occur. In addition, the improvement of circulation efficiency means increased data of product circulation, greatly increasing the difficulty of positioning the faulty link in the supply chain. This study adopted the blockchain coupling supply chain to establish the supply chain logistics platform [14] to manage the logistics information of flour in the supply chain and realize the accurate positioning of quality control. 4.2 Agricultural products supply chain platform system The blockchain-based supply chain logistics platform system includes application web page, server, and blockchain network platform [15]. The basic framework of the supply chain platform is shown in Figure 4. The operation process of the platform system is as follows: ① after receiving the wheat, the subsidiary company in charge of wheat harvest conducts quality inspection and uploads the inspection data to the server connected with the blockchain network; ② the monitoring data of wheat quality are stored in the blockchain after being verified by the smart contract and consensus algorithm in the server and blockchain platform, and the blockchain platform will give every link in the supply chain a unique traceability source code [16]; ③ then, in the links of processing, storage, transportation, sales, etc., the node subsidiaries of different links detect the wheat or flour products and record the relevant data according to the above two steps, the data are stored in the blockchain after verification by the smart contract and consensus algorithm, and the traceability source code will be transferred in the blockchain in the circulation of the supply chain. 4.3 Test of the optimized agricultural product supply chain (1) Supply chain platform interface test The interface test is a unit test [17], which is used for checking whether the function of a system can work normally. This study used 360 browser to simulate the client in the system platform. The test content included the input of supply chain information and the query of supply chain information. The test process of the former is as follows: ① enter the supply chain information input page; ② click “information input”; ③ input and submit the data information of corresponding links in the supply chain; ④ wait for system feedback. The test process of the latter is as follows: ① enter the supply chain information query page; ② select the query target and scope of the supply chain; ③ click “information query”; ④ wait for system feedback. (2) Practical application test The improved agricultural product supply chain was applied to the selected flour mill. The content of the practical application test is as follows: ① Resistance to forged information: the original information of agricultural products in the production link of the supply chain was uploaded to the blockchain after being modified, whether the forged information of the previous link was stored in the database was queried in the subsequent supply chain link, and the operation was performed ten times. After that, the same experimental operations were carried out in the processing, storage, transportation, and sales links, ten times in each link. ② Traceability and positioning ability of the supply chain: the supply chain whose information of agricultural products in the processing link was modified in the previous section of “resistance to forged information” was used. In the supply chain query interface of the system platform, the batch number of the supply chain to be queried was input, and then “query” was clicked. After the query result was displayed, it was browsed and compared with the field survey result of the flour mill. 4.4 Experimental results Before applying the supply chain logistics platform to monitor the supply chain of the flour mill, the interface test was carried out on the supply chain information input function and supply chain information query function of the system platform in a laboratory, respectively. The test results are shown in Table 1. It was seen from the results in Table 1 that the four process steps of the supply chain information input function and the supply chain information query function of the system platform showed that the two function modules had passed the interface test. The system platform can be used in the supply chain monitoring of the flour mill. In order to verify the resistance of the supply chain optimized by blockchain to information tampering, the information of agricultural products in different links of the supply chain was tampered with separately, each link was tampered with ten times, and whether the tampered information is stored in the database is queried. The optimized supply chain was compared with the traditional supply chain, and the results are shown in Table 2. It was seen from Table 2 that the agricultural product information in the database of the traditional supply chain was successfully tampered with ten times in each link; however, the supply chain optimized by blockchain effectively resisted the ten times of tempering, and the information of agricultural products in every link of the improved supply chain was not tampered with. Figure 4: The basic framework of the blockchain-based agricultural products supply chain platform. 122 Informatica 45 (2021) 119–123 P. Guan In addition to testing the ability of supply chains to resist information tampering, this study also tested the traceability ability of the traditional supply chain and improved supply chain to agricultural product information. The traceability query results of the traditional supply chain and improved supply chain for flour agricultural products in batch 20191215003 are shown in Figure 5. Figure 5 shows that the complete supply chain from wheat treatment to sales could be queried in the two supply chains. The traditional supply chain without blockchain was unable to trace the link that caused quality problems, and the tampered information of product quality in the processing link was shown as “qualified”, which led to the result that the quality of products in the supply chain had problems, but the queried supply chain had no problems. The improved supply chain used blockchain, and every supply chain link had a unique ID, which was the traceability code of the corresponding supply chain link. Traceability code was the abstract code obtained by calculating the data information in the supply chain with the hash algorithm. In addition to the current block, the traceability code was also transferred to the next block and broadcast to the whole blockchain. It will only be officially deposited in the block after it has been verified by the consensus mechanism; thus, the problem in the processing link was intuitively seen, and the problem was not tampered with. The results further verified that the supply chain combined with blockchain could effectively resist illegal information modification, browse the supply chain information intuitively from the product supply chain query results, and quickly locate the link that caused flour quality problems. 5 Conclusion This paper briefly introduced the blockchain and the agricultural product supply chain and used the blockchain to optimize the agricultural product supply chain to strengthen the ability of the supply chain to resist information tampering and enhance the traceability ability of the supply chain. The final results are as follows: (1) the interface test results showed that the system platform could be used in the supply chain management of the flour mill; (2) compared with the traditional agricultural product supply chain, the optimized supply chain had good resistance to information tampering in different links; (3) when the optimized supply chain was used for traceability, the faulty link in the supply chain could be quickly located; the query result also showed that even if the information in the supply chain link was artificially modified, it ould not be stored in the blockchain because the modified traceability code did not match, which effectively guaranteed the reliability of supply chain information. References [1] Nir Kshetri. 1 Blockchain's roles in meeting key supply chain management objectives. International Journal of Information Management, 39:80-89, 2018. https://doi.org/10.1016/j.ijinfomgt.2017.12.005 [2] Selena Ahmed, and Noah ten Broek . Blockchain could boost food security. Nature, 550:43-43, 2017. https://doi.org/10.1038/550043e Step Supply chain information input test Steps Supply chain information query test ① Successfully enter the information input page ① Successfully enter the information query page ② Click the “input” button to jump out of the input box ② The query target and range can be selected normally ③ The information can be submitted successfully after input ③ The prompt box pops up successfully ④ The prompt box pops up successfully ④ Successfully display query results Table 1: Laboratory interface test results. Tampered link in the supply chain The number of times the traditional supply chain has been successfully tampered with The number of times the improved supply chain has been successfully tampered with Production link Ten times Ten times Treatment link Ten times Ten times Storage link Ten times Ten times Transportation link Ten times Ten times Sales link Ten times Ten times Table 2: Resistance of the traditional supply chain and improved supply chain to information tampering in different links. Figure 5: Traceability results of the traditional supply chain and improved supply chain for the treatment link. Supply Chain Optimization of Agricultural Products in the... Informatica 45 (2021) 119–123 123 [3] Olivier Hueber. The blockchain and the sidechain innovations for the electronic commerce beyond the Bitcoin's framework. International Journal of Transitions and Innovation Systems, 6(1):88-102, 2018. https://doi.org/10.1504/IJTIS.2018.10011689 [4] Feng Tian. An agri-food supply chain traceability system for China based on RFID & blockchain technology. 2016 13th International Conference on Service Systems and Service Management (ICSSSM), 1-6, 2016. https://doi.org/10.1109/ICSSSM.2016.7538424 [5] Dianhui Mao, Fan Wang, Zhihao Hao, and Haisheng Li. Credit Evaluation System Based on Blockchain for Multiple Stakeholders in the Food Supply Chain. International Journal of Environmental Research & Public Health, 15(8):1627, 2018. https://doi.org/10.3390/ijerph15081627 Viet-An Pham, Dinh-Hieu Hoang, Huy-Hoang Chung-Nguyen, Mai-Khiem Tran, and Minh-Triet Tran. Privacy Preserving Visual Log Service with Temporal Interval Query using Interval Tree-based Searchable Symmetric Encryption. Informatica, 44(2):115-125, 2020. https://doi.org/10.31449/inf.v44i2.3090 [6] Akashdeep Bhardwaj, G.V.B. Subrahmanyam, Vinay Avasthi, Hanumat Sastry. Ransomware: A Rising Threat of new age Digital Extortion. Indian Journal of Science & Technology, 9(14), 2015. https://doi.org/10.17485/ijst/2016/v9i14/82936 [7] Surjandy Surjandy, Meyliana Widjaja, Achmad Nizar Hidayanto, and Harjanto Prabowo. The latest adoption blockchain technology in supply chain management: a systematic literature review. ICIC Express Letters, 13(10):913-920. https://doi.org/10.24507/icicel.13.10.913 [8] Van Long Tran, Éric Renault, Viet Hai Ha, and Xuan Huyen Do. Time-stamp Incremental Checkpointing and Its Application for an Optimization of Execution Model to Improve Performance of CAPE. Informatica, 42(3):301-311, 2018. https://doi.org/10.31449/inf.v42i3.2244 [9] Mario Dobrovnik, David M. Herold, Elmar Fürst, and Sebastian Kummer. Blockchain for and in Logistics: What to Adopt and Where to Start. Logistics, 2(3):18, 2018. https://doi.org/10.3390/logistics2030018 [10] Abdelghani Boudjidj, Elkamel Merah, and Mohammed El Habib Souidi. Towards a formal multi-agent organizational modeling framework based on category theory. Informatica, 45(2):277- 288, 2021. https://doi.org/10.31449/inf.v45i2.2967 [11] Matthias Felder, and Michael Kuperberg. Blockchain @ Deutsche Bahn: Anwendungen für Mobility & Logistics. Dersenbahningenieur, 69(2):14-16, 2018. [12] Ming Li, Saijun Shao, Qiwen Ye, Gangyan Xu, and George Q. Huang. Blockchain-enabled logistics finance execution platform for capital-constrained E- commerce retail. 65:101962, 2020. https://doi.org/10.1016/j.rcim.2020.101962 [13] Poorva Dangayach. Pharmaceutical supply chain tracking system based on blockchain technology and radio frequency identification tags. International Journal of Business Research, 19(4):37-44, 2019. https://doi.org/10.18374/IJBR-19-4.4 [14] Lenny Koh, Alexandre Dolgui, and Joseph Sarkis. Blockchain in transport and logistics – paradigms and transitions. International Journal of Production Research, 58(7):2054-2062, 2020. https://doi.org/10.1080/00207543.2020.1736428 [15] Sachin S. Kamble, Angappa Gunasekaran, Milind Goswami, and Jaswant Manda. A systematic perspective on the applications of big data analytics in healthcare management. International Journal of Healthcare Management, 12(3):226-240, 2019. https://doi.org/10.1080/20479700.2018.1531606 [16] Yvonne Ziegler, Vincenzo Uli, Ferdinand Keller, and A. Kramer. The Impact of Blockchain Networks on Logistics: an Update. 38. mednarodna konferenca o razvoju organizacijskih znanosti, 2019. https://doi.org/10.18690/978-961-286-250-3.95 124 Informatica 45 (2021) 119–123 P. Guan