Improving Transactional Data System Based on an Edge Computing–Blockchain–Machine Learning Integrated Framework

: The modern industry, production, and manufacturing core is developing based on smart manufacturing (SM) systems and digitalization. Smart manufacturing’s practical and meaningful design follows data, information, and operational technology through the blockchain, edge computing, and machine learning to develop and facilitate the smart manufacturing system. This process’s proposed smart manufacturing system considers the integration of blockchain, edge computing, and machine learning approaches. Edge computing makes the computational workload balanced and similarly provides a timely response for the devices. Blockchain technology utilizes the data transmission and the manufacturing system’s transactions, and the machine learning approach provides advanced data analysis for a huge manufacturing dataset. Regarding smart manufacturing systems’ computational environments, the model solves the problems using a swarm intelligence-based approach. The experimental results present the edge computing mechanism and similarly improve the processing time of a large number of tasks in the manufacturing system.


Introduction
The progress of industrialization has been changed and transformed from automation to digitalization. Similarly, Industry 4.0 in Germany faces the same problems that originated in different countries, such as the Internet industry in the United States made by China, Japan Industry 4.1, and South Korea manufacturing Industry Innovation 3.0. The connection of entities is based on two main features. Digitalization and identification are important features for entity connection. From another perspective, the Internet of Things (IoT) is determined for managing the identification problems, which mostly happen in the Industrial Internet of Things (IIoT). The cyber-physical system is defined to solve the entities' connection problems.
In a recent development, smart manufacturing was named a core of modern production in the manufacturing industry's digitalization. Similarly, it is the smart factory's foundation [1]. The smart manufacturing process uses information technology (IT) to connect the facilities and terminal devices that are digitalized [2]. The interactions between the devices produce massive amounts of data, which causes multiple requirements for the processing of data, e.g., unstructured, able to handle massive amounts, and less time delay. Big data techniques, cloud computing techniques, and artificial intelligence techniques are presented to simplify data processing, which is part of data technology (DT). Furthermore, operational technology (OT) achievement is based on the combination of detailed control machines and data computation, e.g., a distributed control system, programmable logic controller, data acquisition, and supervisory control. Cloud manufacturing services are applied for further processes of the inner performance of smart manufacturing. This section presents a brief explanation of smart manufacturing and related techniques. There are three main topics discussed in this section-edge computing; blockchain; IoT, Industrial Internet of Things (IIoT), Industry 4.0, and cyber-physical systems (CPS).

Edge Computing
In recent years, many researchers have focused on the edge computing issue regarding intelligent manufacturing. To address some of the low latency and limited resources of this system, Yin et al. [3] proposed a novel visualization service for task scheduling based on fog computing and explored a new approach to the task scheduling algorithm based on a container role. The proposed system is able to reduce the delay rate of the tasks and improve the concurrent tasks on fog nodes. Lei et al. [4] presented the architecture of adaptive transmission containing edge computing and software-defined network (SDN) to solve the problem of data exchanging in IIoT and intelligent devices. Suganuma et al. [5] proposed the Flexible and Advanced Internet of Things (FLEC) to overcome the integration of traditional Internet of Things and edge computing problem that focuses on user positioning adapting to the environment. Lin et al. [6] presented the swarm optimization algorithm connected with a genetic algorithm to overcome the load balancing problem in traditional data placement based on optimizing the transfer time. To achieve detailed control of smart manufacturing systems, communication latency and a reliable environment are required. The multi-access edge computing (MEC) provides all the mentioned requirements. Similarly, cloud computing's capabilities and information technology provide environmental services on the edge network, despite the access technology [7]. Chen et al. [8] proposed a multi-micro-controller structure, which is the gateway for the Industrial Internet and combines the array-based programmable gateway of hardware with multiple scalable micro-controllers. Li et al. [9] proposed adaptive transmission architecture based on the centralized global support for am IIoT edge computing network. Another approach presented by Yu et al. [10] is the survey of edge computing performance on IoT applications-smart cities, smart farms, smart transportation, etc. Porambage et al. [11] showed an MEC overview for IoT applications realization and synergy.

Blockchain
Blockchain technology is one of the famous areas for trust and safety, which can apply in any related topics to keep the information and data private. Similarly, it is a novel technology for decentralized and distributed computing architecture that keeps the dataset with encrypted blocks in a chain [12][13][14]. Digital information related to transactions, date and time, amount, etc., which are elaborated in the transaction process, is all stored in blocks. The saved data are available within the distributed network, containing nodes' participants to validate the transaction. All nodes throughout blockchain are linked with each other and support the crypto and transaction codes. Another important feature in blockchain technology is the mathematical algorithms, which are very strong in this network. It provides block validation to minor nodes without any effect on data through the blockchain network, which is why blockchain is secure and transparent [15][16][17][18][19][20][21][22][23]. There are many of research requirements for addressing the security problems and recommendation systems based on blockchain and knowledge discovery technology [24][25][26][27][28][29]. This process needs to carry out the integration of blockchain and IoT. Similarly, the security issues which are mentioned by many authors specify the blockchain as a good solution. In [30], blockchain's key features are defined as trust, security, programmability, etc. A blockchain can be one of three different types-a public blockchain, a private blockchain, or a consortium blockchain. The public blockchain is famous for digital currencies. The main objective of a consortium blockchain is to combine the stakeholder and service trading entities. Li et al. [31] presented the energy trading system based on a consortium blockchain. Min [32] proposed to leverage blockchain methods to enhance supply chain flexibility in risky situations. In a business trading system, blockchain technology can be assumed for IoT applications for implementing private blockchains. In [33], an IoT-oriented data exchange system was designed based on the Hyperledger Fabric to overcome the automatic maintenance of a distributed management system problem.

Internet of Things, Industrial Internet of Things, Industry 4.0, and Cyber-Physical Systems
The growth of the IoT system provides substantial support for the digitalization environment. Furthermore, the IoT applications cover different perspectives-smart farms, smart cities, traffic monitoring, etc. Similarly, the machine-to-machine (M2M) techniques are also covered by IoT systems, which is a way forward of digitalizing the manufacturing system [34]. The abstraction of Industry 4.0 becomes apparent when IIoT meets the cyber-physical system (CPS), which is the best solution for improving the efficiency of productivity in smart manufacturing. Yang et al. [35] presents the IoT applications and issues in the smart manufacturing system. The conclusion of the proposed work shows that IoT visualized the interconnection of the physical world and cyberspace. On the other hand, in [36], a cyber-physical production system (CPPS) was proposed to authorize the dataset efficiency transferring based on the intelligent network and trustworthy communication technology. The Industrial Internet Consortium (IIC) is one of the most famous techniques launched in US top five companies-GE, AT&T, Cisco, Intel, and IBM. This technique mainly points to the standardization of network innovations, applications, and constructions; data circulation growth; and industrial digital transformation. The IIoT sub-concept was first launched in Germany by the name of Industry 4.0 and globally partial CPS facts based on artificial intelligence in smart manufacturing. In short, CPS shows the relationships between information and the physical world, relying on the interconnection of things. The IoT technology selects the interconnections between physical address objects to check if they are related to the industry or not. Table 1 shows the studies related to smart manufacturing systems. Ten studies are compared based on the industry sector, internal equipment, external equipment, and concept of creation.  Table 2 presents the recent challenges on the integration of blockchain and IoT technology in the smart manufacturing industry. The comparison shows the techniques applied in this research, the main contributions of the presented methods, the usage of blockchain and IoT, the challenges of the proposed systems, and the limitations of the research.

Integration of IoT and Blockchain
Testing the related researches to IoT and Blockchain

Yes Yes Yes
The level of complexity didn't minimized 9 Lei et al. [55] Blockchain and IoT integrated method Integrated method secure the sensing data.

Yes Yes Yes
No reduction on overheard communication 10 Ishan et al. [56] Centralized architecture Reducing the over-head computational based on centralized architecture

Yes Yes Yes
Reduction of computational over-head has no effect on energy consumption changes The development of smart manufacturing underpins integrating information technology, data technology, and operational systems. The ever-increasing facilities and devices are leading to data processing and application challenges in existing technology. To reduce this issue's effectiveness, multi-access edge computing was extracted from cloud technology as a solution for the mentioned problems and for its ability to simplify the data processing in the Industrial Internet of Things and industrial cloud computing [57]. Another issue in the smart manufacturing system is the transmission of data and business transactions. Blockchain technology is a suitable answer to overcome this issue, which stabilizes data transmission and business transactions by using the distributed control mechanism [58]. Smart manufacturing systems' immense data processing causes the issues mentioned in [59,60]-high dimensionality, feature space, etc. Deep learning allows the data processing to automatically go through complex feature abstraction using multiple layers, and similarly provides advanced data analysis for smart manufacturing. The challenges mentioned above are being analyzed using state-of-the-art machine learning techniques and smart manufacturing applications. Figure 1 shows the data-driven role in the smart manufacturing system. The data-driven process is divided into three main layers named data-driven, manufacturing system, and benefits. The data-driven layer contains machine learning, deep learning, artificial intelligence, the Internet of Things, big data, and cloud computing techniques. After data-driven, the manufacturing system layer contains three main steps, named technology in manufacturing, network, and advanced analysis. This step's important information includes the design, process, equipment, records, customers, suppliers, parts, and workforce information. The last layer of the data-driven system has the manufacturing system's benefits: quality, energy, cycle time, etc.

Data Driven
Manufacturing System Benefits  The main contributions of this paper are: • Investigating the multi-access edge computing potential problems, blockchain, and machine learning in the smart manufacturing system. • The proposed approach's conceptual scenario is the integration of multi-access edge computing, blockchain, and machine learning. • The multi-access edge computing changed the smart manufacturing architecture from centralized management to decentralized style. • Addressing the terminal device's task assignment issue. • Representing the allocation issue between the edge servers. • Providing an optimization process by applying the swarm intelligence to the presented smart manufacturing system. • The main objectives of applying machine learning in this system are reducing the manufacturing environment's predicted values and improving the productivity rate. • Securing the information of stored data in blocks based on blockchain technology. • Improving the productivity and cost reduction using blockchain technology.
The rest of this paper is divided up as follows: Section 2 presents the proposed integrated model's conceptual scenario in smart manufacturing. Section 3 presents the final result and validation of the system's performance, and we conclude this paper in the conclusion section.

System Architecture of the Proposed Smart Manufacturing Environment
The integration of edge computing, blockchain, and machine learning can simplify data processing and transactions in s smart manufacturing system. The following steps present the details of the proposed method in a smart manufacturing system.

Prototype System Based on Edge Computing
The edge computing system's main concept is to apply the computing technique as close to a data source as possible. Figure 2 presents the edge computing architecture in the smart manufacturing system. The local infrastructure is used to process the data in an edge-computing system, and it takes the cloud server to the hardware. There are three main layers in the edge computing system named the physical layer, network layer, and application layer. The physical layer consists of sensors, robots, actuators, etc., organizing the physical layer's main components. The second layer contains the various edge servers, which process the terminal devices for the third layer's input. Unlike a cloud server, an edge server provides a computational service limited to capacity and resources. The root of enterprise-level applications is IIoT cloud server data processing, all done in the application layer. Enterprise information systems (EIS), supply chain managements (SCM), and smart contracts (SC) are some application layer examples. Applying edge computing in smart manufacturing is far greater than cloud server supplementary resources. Edge computing's prosperity is highly based on virtualization technologies. Virtualization technology contains virtual machines and containers. The main differences between them are the implementation and level of isolation; in the virtual machine, the implementation needs hardware visualization. In the virtual container, the performance is based on light-weight visualization.

Service Validation Based on Blockchain
The blockchain technology in smart manufacturing consists of two main contributions. The first one is IIoT, and edge computing servers' smart manufacturing changes from cloudcentered to the distributed system architecture. In this process, the blockchain system is applied to strengthen data integrity and decrease data transmission risk to authorize the validation key and identification in a distributed manner. To avoid operation defectiveness, the data transactions should be time-stamped through the hash code and refrain from positioning the fake data in the linked chain. The second one is the consensus mechanism, which is used to decide whether adding a validated block into blockchain is possible or not. Smart manufacturing digitalization recommends manufacturing virtualization, leading the cloud manufacturing service from another point of view. Figure 3 presents the manufacturing system based on two main fields, contents and metadata: identify the unique service and give a detailed description of the process. The service block was created based on the manufacturing system abstraction, and similarly broadcasting the distributed manufacturing in-network service to further validate network entities. The service transaction block creation is based on purchasing and querying the manufacturing service. The transaction block is in the same manufacturing system network, and validates based on the other peer-to-peer entities. Similarly, the transaction block adds to the blockchain transaction system too. In contrast, blockchain's transaction process organizes the smart contract between the business partners, facilitates the inner protocols, and verifies a contract's performance.

Machine Learning-Based Smart Manufacturing
Based on the recent new technologies-big data, IoT, etc.-smart facilities are positively developing intelligence manufacturing to impact the cross-organization in smart manufacturing systems. The manufacturing system is experiencing an unexampled data extension based on the data collection from sensors in various formats, structures, and semantics. Data collection is based on the multiple manufacturing systems, e.g., lines of product, manufacturing equipment, processes, etc. Hug data in the manufacturing system need data modeling and analysis to handle the high-volume dataset growth and support the real-time data-processing. Machine learning techniques contain some advantages for improving smart manufacturing: cost reduction, security, fault reduction, increasing production, operator safety, etc. These advantages include a great and strong bond for the operating procedure. Furthermore, the system's fault detection is one of the decisive components for predictive preservation, and it is essential in the case of industry. Figure 4 presents the overall architecture of smart manufacturing based on the integration of edge computing, blockchain, and machine learning. Each of these methods is well-known, but the integration between them has a huge effect on the manufacturing industry regarding safety, cost reduction, increasing production, etc. The edge computing section is based on the physical, network, and application layers. The physical layer provides the smart sensors connected to the IoT platform for real-time data collection and monitoring. Similarly, in this layer, the ability to check the condition of machines is also available. The network layer updates the information and tracks the dataset over time. The application layer corresponds and reviews the data quality, and finally measures and reports the monitoring results. The edge computing process's final report moves to a blockchain service for securing the collected information in blocks. This information is in terms of assets, design, and block security. The process moves to the machine learning section to control the quality of the service and fault rate prediction. In this section, there is a various level of data analysis. This process contains predictive analysis, diagnostic analysis, descriptive analysis, and prescriptive analysis. The main goal of descriptive analysis is to give the product manufacturing process and operation information, capturing the environmental conditions and parameters. If the product's performance decreases, the diagnosis analysis examines the issue and presents the reason for the problem. The predictive analysis operates the statistical models and predicts the possible future equipment and products based on a historical dataset. The final analysis is the prescriptive analysis, which further recommends actions and measures the identification to improve the rates of outcomes, solve the problems, and present each final decision outcome. Based on the advanced machine learning analysis, the smart facilities are highly optimized. This process's benefits are reducing the costs of operation, meeting changing consumer demands, improving productivity, and reducing downtime.
Equations (1) and (2) present the evaluation of cost reduction in manufacturing industry based on machine learning prediction process. In the first step is a derivation function applied to decrease the error of cost function. The cost function is evaluated below: where g n is the predicted value and xh n is the actual value of the cost prediction process.
The predictive accuracy evaluation is based on two main metrics: mean absolute prediction error (MAPE) and normalized root mean square error (NRMSE). Equations (3) and (4) present the MAPE and NRMSE evaluations.
The MAPE evaluates the prediction's total error compared with initial values, and NRMSE evaluates the normalized squared errors.

Fault Assessment Diagnostic Analysis
Generally, the manufacturing system faces failures based on abnormal and degradation operations. The failing causes high costs, disqualifies the product, and causes lower productivity. Based on the implementation of a smart manufacturing system, it is necessary for smart factories to monitor the condition of machines, identify the primary defects, recognize the root causes of failures, and finally combine the information for manufacturing system production [61]. Based on the data collected from sensors, there are many machine learning algorithms to investigate the fault diagnosis and classification [62]. The convolutional neural network (CNN) combines feature learning and identification into one model and has been applied in many sectors-wind generator [63], rotor [64], bearing [65][66][67][68], etc.

Results
In this section, a brief explanation of the results is provided. Section 3.1 presents the process of data collection and dataset information. Section 3.2 presents the performance evaluation of the proposed system. Section 3.3 presents smart manufacturing challenges and opportunities.

Implementation Environment
The implementation of the proposed system structure and environment is presented in this section. Table 3 summarizes the purposed system experimental setup. All the experiments were done on an Intel(R) Core(TM) i7-8700 @3.20 GHz processor with 32 GB memory. Moreover, the docker environment was processed in the 18.06.1-ce version, and the container configuration in the virtual machine was processed based on the docker composer 1.13.0 version. The Hyperledger Fabric framework project is from the Linux Foundation.  Figure 5 shows the operation of the transaction process function. For improving the assets and participants, create, delete, update, and other functions were defined in the blockchain network. The functions of the transaction processor were implemented in JavaScript and defined as a smart contract. The specified ShareRecord function is used to update the manufacturing records based on the events and registry. To control the domain model elements, the access control language (ACL) is needed. ACL provides the ability to define rules to specify the roles and users, which are authorized to make changes in the business network domain. Figure 6 shows the ACL rules defined in this network that give participants access to make changes in the network.

Dataset Management
The smart manufacturing system's data increase in volume based on the traditional algorithms' ability, mostly when the user wants to extract useful information from the collected dataset. High sample volume in a large dataset, when the records are not similar, needs the consolidation and isolation algorithms for implementation and knowledge utilization. In this research, the data were collected from various sources related to IoT; the production equipment was collected from various sensors to monitor the product in real-time-e.g., the built-in sensors measured, monitored, and reported the status of manufacturing equipment and product based on the temperature, humidity, pressure, etc. Figure 7 shows the data-driven process in smart manufacturing.   Table 4 presents the configuration of IoT devices and sensors for real-time data collection. During the smart manufacturing (SM) cycle, the IoT devices are located in the main areas of manufacturing resources at various levels, e.g., machines, factories, etc. The radio-frequency identification (RFID) tags are mainly configured enough in practical documents to report important machines' quality, design, and production procedures in the manufacturing process.

Optimization
Smart manufacturing based on the edge computing system has high scalability and huge IIoT devices, which is suitable based on the expansion potentiality. Data analysis and transmission are considered computational tasks. They are supposed to allocate data on an edge server or cloud to recognize the suitable task assignment for reducing the process time of the incoming task. There are X defined device terminals, Y edge nodes, and one industrial server for the cloud to design this issue in smart manufacturing. Within the manufacturing process, the requests from terminal devices are managed by a cloud or edge server. The process timing for the tasks in edge server requires two main components called computation time θ y i,c and data transmission time θ y i,d ; see Equation (5).
The task computation time in an edge server is evaluated based on Equation (6).
y is defined as the edge server, i represents the task computation time, and a y i,n represents the edge server's computational resources through the n period of maintaining tasks. L is defined as the length of the tasks. The task processing time in a cloud server is evaluated as it was presented in Equation (7): The computation time in the cloud is defined as θ t i,c . Data transmission between the edge and device is defined as θ y i,d . The transmission time from the edge server to cloud is defined as θ y,t i,d . The task assignment's presented issue is the deployment of a parallel mechanism and heterogeneous units' processing in the computational task assignment issue. Accordingly, the swarm intelligence approach is applied in this process.

Swarm Intelligence
Generally, the swarm intelligence (SI) approach is a famous process among artificial intelligence algorithms. Two main strategies follow based on this algorithm named approximate and non-deterministic to consider and utilize the searching spaces to find the near-optimal solutions [69]. SI contains various approaches; among them, the artificial bee colony (ABC) algorithm demonstrates SI's classic features. The importance and required process for intelligence performance, self-organization, collective behavior, and decentralization of SI are sufficient [70]. Moreover, the mentioned three features contain the simple mechanism control, which is tuned with only two parameters. The bee colony's size determines whether the solution can be dropped or whether there is no need to drop it. Figure 8 shows the process of solving the computational task problem based on the artificial bee colony workflow.

Performance Evaluation
The test models are generated based on the following patterns. The task length follows a uniform distribution in the range of [1,10] million specifications. The data volume is defined as 100 KB to 10 MB. The time delay is 100 milliseconds to 10 s. The average processing performance based on the edge server is defined as 10 million instructions per second (MIPS). The cloud volume is 1000 MIPS. Edge server and device connections work through wireless communication. The edge server and cloud connections go through broadband. Tasks are specified to the evident edge server, which forwards the information to the cloud. This causes the edge server to be limited to processing enough resources for the under-processed task during the delay time. Figures 9 and 10  To show edge computing's effectiveness in the system of smart manufacturing, Figure 11 shows a various number of incomes based on three main frameworks, i.e., cloud, edge, and mixed-mode. The meanings of these three scenarios show the computational task between them. As shown in Figure 11, the mixed-mode shows the combined outperformance of edge and cloud. Similarly, it is increasing the number of tasks along with the cloud mode's average processing time. When the tasks are less than the cloud server's capacity, there is a decrease at a certain level; on the other hand, if the number of functions increases, then the edge server does not modify the processing time appropriately.  Figure 12 shows each algorithm's delay rate in different edge computing nodes (ECNs). When the number of nodes increases in the edge computing system, the amount of equipment production also reduces due to the network's delay reduction. Based on the presented results, the network delay in the IKCD process is the shortest one, and RD is the worst among the compared methods. Based on the ECNs in the system, when there are between 1 and 3, the IKCD method is better than KCD, and when the number of ECNs is more than three, based on the network latency, the differences between IKCD and KCD decrease. Figure 13 presents the system cost deployment differences for the ECNs. We can see the ECNs incurred greater costs based on the system node increases. Based on the deployment of ECNs for the higher costs, the costs for all three methods increased. Comparing the three methods, IKCD had the highest and most outstanding performance. The RD method's deployment used a number of ECNs randomly and did not deploy any node in the production node. This process caused the node to be chosen without consideration and constraints. The deployed nodes recorded in the KCD process are based on the Euclidean distance between the devices, which is not sensible and causes the network delay and access time communication for data processing in real-time requirements.   The results show the advantages of the IKCD method, and similarly, show the reduction of network delay based on the ECNs and increasing the computing cost of ECNs. The sum of the process decreases at the start and then increases.

Challenges and Opportunities of the Smart Manufacturing System
Data management, performance evaluation, and standardization of edge computing in the IIoT system are briefly explained in the above sections. Analyzing the proposed system based on the integrated methods reveals great opportunities and challenges for edge networks, data processing, security, etc., in IIoT technology related to edge computing. The below information explains several challenges and opportunities for smart manufacturing systems.
• Data offloading and load balancing: The IIoT system having various devices, which are important in data offloading among the large servers and devices. The IIoT system, based on edge computing, reflecting on data processing, increases this process's difficulty. • Edge intelligence: In a recent IIoT system designed based on edge computing, the devices could only accomplish the light-weight tasks. To make the system intelligent, edge intelligence (EI) must be applied to the process. • Data sharing security: One of the IIoT system's advantages is the huge amount of data in real-time devices, websites, etc., which is efficient to improve industrial production.

Conclusions and Future Research
Smart manufacturing is a favorable movement for the evolution of the manufacturing industry and production in a new industry. The manufacturing system's implementation causes the support of data technology, information technology, and operational technology, surrounded by the development of integrated edge computing, blockchain, and machine learning based on the Industrial Internet for operational processes in the manufacturing environment. This paper's proposed system was designed based on integrating edge computing, blockchain technology, and machine learning to support the manufacturing system's design. The assignment problem of the system was formulated based on the optimization model. Unlike other research in edge computing and IIoT, the presented method's stresses illuminate the integration method's importance in future developments.
The future research plan is to improve the manufacturing system more and analyze it in more detail. The blockchain system's applications can be quantified and further analyzed. Other technologies can be incorporated to enhance the development of the manufacturing system. The experiments and results can be analyzed with an on-site dataset to identify the possible impact factors and regulate the proposed model's configured parameters.