Keywords

1 Introduction

As a manufacturing resource sharing platform, cloud has attracted more and more attention in dealing with optimal resources allocation problems. The internal information delivering is quite mature due to the development of the Internet to this day. The competitive pressure is largely focused on the cooperation with external enterprises. Researchers and practitioners have created plenty of works in the manufacturing field of information sharing and sources configuration.

Cloud platform can provide computing, networking and storage capabilities based on services of hardware and software resources, which is quite an efficient and economical way where every enterprise upload its information, data, solution schemes, service abilities and so on. It does not need any extra costs of time, labor or purchase on software deployment, but sends orders directly to the cloud platform to obtain information or services in different types of all stages of a product lifecycle when enterprise users need a specific application. Though cloud platform is a useful way to deal with this kind of problem, most of companies lack enough trust in their partners, and in most cases refuse to share internal information and data in the cloud, which brings restrictions and obstacles to the cooperation, making it even harder in value convergence at the industry level.

Therefore, it is natural to consider using a particular technique to solve the trust problem in enterprise collaboration. While trust has long been a highly subjective human consensus, the biggest innovation of blockchain is that it provides a way for humans to build trust using rational technological means. Blockchain is a distributed ledger technology that uses a consensus mechanism to activate nodes to keep accounts together. In order to ensure the reliability of information, blockchain usually takes a chain structure and uses cryptographic technology to store information. The blocks obtained by mining are connected by storing the hash of the previous block. Once a new block is added to the chain, it would be extremely hard to delete or change it, which reflects its immutable property [1]. Furthermore, it is decentralized because data is automatically shared among all nodes without third-party interruption. Since every single node has a copy of the blockchain, each participant can get access to transfer records, which makes it transparent. With these superior features of blockchain technology, it can effectively eliminate the concerns among users and thus deal with the trust issues. And it has grabbed wide attention in more and more fields [2]. The authors in [3] constructed a precast supply chain information management framework based on blockchain to realize automatic information sharing, traceability, and transparency in the construction field. Li Z. et al. [4] utilize blockchain technology to optimize power distribution system and manage energy and capital flow among micro grids in a manner with high reliability. In addition, experts and scholars have also carried out deeply exploration in regions of financial, medical [5], healthcare [6], supply chain [7], manufacturing and so on. Abraham Z. [8] built a blockchain-based LCA framework to complete life cycle assessment system. X.L. Liu [9] proposed an blockchain-based PLM architecture. Literatures on the combination of blockchain and cloud have also emerged in recent years. Yuankai Z. [10] studied the application of blockchain technology to cloud manufacturing on consensus protocols. However, the previous literature and research have not addressed the obstacles to cooperation caused by trust among the participants in cloud platform, nor have they been targeted by business collaboration planning. Therefore, this paper combines the blockchain technology with the cloud platform to make up for the defects of the traditional architecture, so as to further implement the resource sharing and value convergence in the industry scope.

Now that the services from providers and demands published by users have converged on the cloud platform. What still remains an issue is the matching problem between requirements which needs to be decomposed and services. Hence, optimization of manufacturing service composition that is regarded as NP-hard problem is to be settled by choosing appropriate candidates for requirements from service pool by the certain rules, the result of which is the core content of proposed system. This kind of service combination process had been studied by many scholars [11]. Among these literatures, service composition results were evaluated through quality of service (QoS) attributes. Genetic algorithm is convenient to be employed in this kind of problem and its performance of global and local search can be effectively achieved through parameter adjustment. The purpose of this research is to establish a blockchain-based manufacturing service composition architecture and clarify its business collaboration system. Meanwhile, the related manufacturing service composition model operated automatically in the cloud platform is proposed. The optimization solutions will be recorded and broadcasted on the blockchain. Finally, Evolutionary genetic algorithm (GA) is adopted to solve the model.

2 Architecture of Blockchain-Based Manufacturing Service Composition

Based on the background mentioned above, an architecture of blockchain-based manufacturing service composition is introduced. Furthermore, the system workflow of the architecture is established in order to demonstrate the business process.

2.1 Architecture of the Proposed System

On the cloud platform, manufacturing resources are visualized in the form of services and so are requirements from customers which need to be decomposed in to subtasks. This paper proposed an architecture of blockchain-based manufacturing service composition which contains five layers including cloud users layer, application layer, blockchain service layer, cloud service layer and data resource layer, as shown in Fig. 1. A detailed description of this architecture is illustrated as follows.

Fig. 1.
figure 1

Architecture of blockchain-based manufacturing service composition

The cloud users layer. The cloud users layer provides interactive interface for platform users made up of customers and providers. The same user may play different roles in different transactional relationships. For instance, the manufacturer is on the demand side when purchasing while it also could be the service provider when dealing with the distributor. Customers have access to all information from the service provider about the content of the services and the manufacturing capabilities, which is highly credible and reliable stored in blocks.

The application layer. The application layer contains series of related services that meet the needs of demanders including each stage of the product lifecycle from raw materials to finished products, as well as other tradable processes that can be used to resources-sharing among enterprises.

The blockchain service layer. The blockchain service layer plays an important role in the whole architecture. The hash values of service information, transactions and manufacturing service composition results are to be stored permanently and published in this layer after data validation and broadcasting. It contains several basic components of blockchain. Smart contract is a computer protocol that technically facilitates the verification or enforcement of the execution of a contract in order to achieve the specific functions. Meanwhile, smart contract needs the support of consensus mechanism, which was defined as initial state of the system, establishing the process for reaching an agreement among network nodes. P2P network refers to the distributed network environment where blockchain operates. The encryption algorithm is widely used in data protection and digital signature so as to identify the certain user.

The cloud service layer. As the core layer of proposed architecture, the cloud service layer is planned to optimize service matching and to form the service composition as reasonable as possible. The process begins with manufacturing task decomposition, followed by service matching in service pool to subtasks, ended by an optimal composition scheme evaluated by QoS attributes. In order to avoid the storage capacity issues of the blockchain, huge amounts of original data are stored in cloud databases.

The data resource layer. This layer is meant to collect data about services, such as resource description, manufacturing capabilities, providers, function of components and so on. Manufacturing services or idle ones are gathered in this layer.

2.2 System Process of Proposed Architecture

According to the proposed architecture of blockchain-based manufacturing service composition, this sector introduces the system workflow to present the operation process. As shown in Fig. 2. When users publish a task demand on the cloud platform, the system will respond immediately and search for the optimal service composition. After the task assignment is completed, the system will broadcast the result (encrypted or not) to the blockchain through network intermediary, attached by executable smart contract in digital form. The provider promptly gets the notification through the similar process. Once accepting the task, contact with the user will immediately be generated to further complete the requirement task. Otherwise, the system continues to look for the next service provider. In other words, with the confirmation of service provider, the cloud platform ensures the collaboration relationship among them and updates the signed connection to the blockchain, in case of breach of contract and other dishonest circumstances. In addition, if the user refuses to accept the result, the system will re-execute the above process and remove the previous scheme. All records or indexes are permanently stored on the blockchain, because all nodes on a distributed network share the same data. Shortly, cloud platform is responsible for acquiring credible variations from the blockchain network, and in turn hashes stored in blockchains can be used as data integrity and authenticity proof. This mode effectively protects the rights and interests of both demander and provider, reflecting the great potential of blockchain technology to solve the trust issues in the process of transaction and cooperation in manufacturing field.

Fig. 2.
figure 2

System workflow of proposed blockchain-based architecture

3 Modeling of Manufacturing Service Composition

This section formulates a model to deal with the matching problem between tasks and services on the cloud platform. The evaluation criterion for the manufacturing service composition problem is based on comprehensive QoS attributes.

3.1 Problem Statement and QoS Attributes

Assuming that task demands received within a certain period of time arrive at the same time on the cloud platform, with uncertainty of its composition and type. The system combined these tasks into a batch and break them down in sequential order. The subtasks obtained by decomposing the task requirements of the system have corresponding service candidate sets in the cloud’s resource pool. Concretely, K task requests arrive in a certain period of time, described as TR = {tr1, tr2,…, trK}. Each of them contains ik subtasks, and trK = {strk1, strk2,…, strkik}. When the system starts to process these task requests, it rearranges the subtasks into a new sequence of combination according to predefined logical rules, donated as TR’ = {str1, str2,…, strN}, where strn represents the nth subtask of the new task sequence TR’. Let SP = {sp1, sp2,…, spM} be the providers combination set corresponding to different subtasks that need to be satisfied, where spm refers to the mth service set which gives a bunch of service candidates for subtask strm. The problem presents the service set spm = {spm1, spm2,…, spmNj} to describe service candidates sets for the single subtask. Thus, the purpose of optimization is to find an expectedly satisfactory combination as SP* = {sp1*, sp2*,…, spM*}.

QoS attribute value is an ideal comprehensive criterion to evaluate the utility of a composition of manufacturing services, describing qualitative concept of the components in a quantitative way. Basic parameters of QoS attribute mainly include: cost, time, availability and reliability. Cost is the fee that users need to spend on material and execution, which is a pretty critical concern to make decisions. Time contains manufacturing period provided by suppliers and responding time determined by the system. Availability refers to whether the service is accessible to use when allocated a request. Reliability is reflected by failure rate, representing the ability to perform required functionality. This paper also take throughput into account which is the capability and operational efficiency of the system. Since this research combines blockchain technology with cloud platform to build a trusted collaborative system. In addition to the first five factors, number of defaults which implies the compliance records in smart contract is also considered to enhance the objectivity and integrity of the assessment.

As each QoS attributes is quantified into numeric property values, it is necessary to normalize them whose range vary greatly. We use Eq. (1) shown below for both positive and negative attributes. q and q’ refer to the original and normalized values for continence which involve maximum and minimum QoS values.

$$ q^{\prime} = \left\{ {\begin{array}{*{20}l} {\frac{{q - q_{min} }}{{q_{max} - q_{min} }}\left( {q_{max}^{^{\prime}} - q_{min}^{^{\prime}} } \right) + q_{min}^{^{\prime}} } \hfill & {\;\;\;if\,\,q\,\,is\,\,positive} \hfill \\ {\frac{{q_{max} - q}}{{q_{max} - q_{min} }}\left( {q_{max}^{^{\prime}} - q_{min}^{^{\prime}} } \right) + q_{min}^{^{\prime}} } \hfill & {\;\;\;if\,\,q\,\,is\,\,negaitive} \hfill \\ 1 \hfill & {\;\;\;otherwise} \hfill \\ \end{array} } \right. $$
(1)

where \(q_{max} \ne q_{min}\). In the formula, \(q_{max}^{^{\prime}}\) and \(q_{min}^{^{\prime}}\) represent the new maximum and minimum values after interval normalization respectively.

3.2 Expression of Manufacturing Service Composition Model

In order to acquire the optimal service composition and provider combination scheme to meet the needs from request tasks. There comes a comprehensive mathematical model based on the QoS attributes explained above shown as:

$$ F\left( x \right) = \left\{ {\sum\nolimits_{j = 1}^{M} {C\left( {sp_{j} } \right)} ,\sum\nolimits_{j = 1}^{M} {T\left( {sp_{j} } \right)} ,\prod\nolimits_{j = 1}^{M} {Ava\left( {sp_{j} } \right),Rel\left( {sp_{j} } \right)} } \right\} $$
(2)
$$ s.t. \left( {Thr\left( {sp_{j} } \right)} \right) \ge Const\_Thr $$
(3)
$$ { }\left( {Nod\left( {sp_{j} } \right)} \right) \le Const\_Nod $$
(4)

Where Const_Thr and Const_Nod are predefined rated throughput and number of defaults, respectively. If number of defaults exceeds a certain amount, this provider will be of low credit and customers will refuse to accept service. To ensure the user experience, the system must be able to withstand a certain throughput to ensure normal operation. Aim to find an optimal solution from all feasible results, QoS attributes of cost and time need to be minimized and availability and reliability need to be maximized simultaneously. Herein, we use an aggregated function of the comprehensive utility expressed as follows:

$$ f\left( {sp_{j} } \right) = \omega_{1} \left( {q_{max}^{^{\prime}} - C\left( {sp_{j} } \right)} \right) + \omega_{2} \left( {q_{max}^{^{\prime}} - T\left( {sp_{j} } \right)} \right) + \omega_{3} Ava\left( {sp_{j} } \right) + \omega_{4} Rel\left( {sp_{j} } \right) $$
(5)

In this equation, ω1, ω2, ω3, ω4 represent the weights of mentioned four QoS properties and \(\sum \omega_{i} = 1\). We use this formula as objective function later to evaluate performance of service composition and further take its inverse as fitness value to do comparison among service candidates.

4 Algorithm and Simulation Experiment

The mathematical problem described in the previous section is a typical discrete optimization problem. Many existing evolutionary optimization algorithms can be used to solve it. Compared with other algorithms like particle swarm optimization (PSO), simulated annealing (SA) and so on, genetic algorithm has superior comprehensive performance in terms of convergence speed, global search and operationality. And the effectiveness of GA has been demonstrated in many previous studies. Therefore, GA is adopted in this paper to solve the service composition model, and a simulation experiment is designed to verify the effectiveness of the proposed system.

4.1 GA for the Proposed Composition Model

This research used real-coded method in genetic algorithm. For a manufacturing task request TR’ that includes a sequence of M subtasks, we code the optional viable services corresponding to all subtasks as integers. One single individual or one chromosome stands for an alternative composition scheme SP. Each gene represents the selected service candidate for related subtask. Then, set the number of the population NP and generate the initial chromosomes. The fitness function of the jth chromosome is defined as Eq. (6).

$$ fitness\left( {sp_{j} } \right) = f\left( {sp_{j} } \right) + f_{const} \left( {sp_{j} } \right) $$
(6)

Herein, \(f\left( {sp_{j} } \right)\) is the aggregate objective function illustrated in detail in the previous section and \(f_{const} \left( {sp_{j} } \right)\) is measurement of service \(sp_{j}\)’s feasibility, defined as follows:

$$ \begin{gathered} f_{const} \left( {sp_{j} } \right) = \;N\__{const} *\sum\nolimits_{j = 1}^{M} {\left( {max\left( {0,\frac{{N\left( {sp_{j} } \right) - N_{0} }}{{N_{0} }}} \right)} \right)} \hfill \\ + Thr\_const*\sum\nolimits_{j = 1}^{M} {\left( {max\left( {0,\frac{{Thr_{0} - Thr\left( {sp_{j} } \right)}}{{Thr_{0} }}} \right)} \right)} \hfill \\ \end{gathered} $$
(7)

where \(i = 1,2, \ldots ,\prod\nolimits_{j = 1}^{M} {N_{j} }\), N_const and Thr_const are two fairly large constants. Obviously, the fitness value is better when smaller. The goal of optimization is to select the chromosome with the smallest possible fitness function value.

4.2 Experimental Results and Analysis

Simulation experiment assumes that there are three users initiated demands on the cloud platform in a certain time range. In order to have an advantage in terms of overall system utility, treats it as a task sequence TR = {tr1, tr2, tr3}. The tasks are decomposed depending on their characteristics as \(\left\{ {\left\{ {tr_{1}^{1} ,tr_{1}^{2} ,tr_{1}^{3} } \right\},\left\{ {tr_{2}^{1} } \right\},\left\{ {tr_{3}^{1} ,tr_{3}^{2} } \right\}} \right\}\) to form a new executed sequence TR’, which includes six subtasks to be processed by services provided by suppliers. We present it in the form of \(TR^{^{\prime}} = \left\{ {str_{1} ,str_{2} ,str_{3} ,str_{4} ,str_{5} ,str_{6} } \right\} \) that its subtasks correspond sequentially to each other. It is assumed that the candidate service pool corresponding to each subtask contains 10 service instances with different QoS attribute values. For the datasets of QoS attributes, cost and time are assigned in [102,103] respectively; availability and reliability are generated randomly between [0.8,1]; number of defaults is set to be [0,60] and should be no more than 50 ineffective nodes; the flow size of throughput is between [0,102] and need to be larger than 2 Mbps. All these attribute values are located in the interval [0,1] after unified standardization. We design the weights of cost, time, availability and reliability are all 0.25. For the genetic algorithm, the parameters Pc, Pm, Ps, NP, MAXGEN are set to be 0.8, 0.1, 0.9, 100, 100, respectively. Finally, we performed simulation experiments on the clarified manufacturing service composition scenario and obtain the convergence curve shown as Fig. 3. It converges quickly to a constant value after iteration and comes the optimal composition scheme (5, 9, 7, 5, 10, 8) with a minimum fitness value 1.7824. More specifically, \(sp^{*} = \left\{ {sp_{1}^{5} ,sp_{2}^{9} ,sp_{3}^{7} ,sp_{4}^{5} ,sp_{5}^{10} ,sp_{6}^{8} } \right\}\) is the optimal blockchain-based manufacturing service composition scheme and the three task requirements should match the service {5, 9, 7}, {5}, {10, 8} respectively. On the one hand, this optimization solution proves the validity of the algorithm in terms of computation time and results. A usable optimization result was obtained after an 18-step iteration. On the other hand, it also implies the usability of the proposed framework and system in the whole product lifecycle process of manufacturing enterprises.

In the proposed blockchain-based manufacturing service composition system, information about QoS attributes can be submitted by the service provider, or obtained through user feedback. The optimal composition scheme will then be formed after the service composition model which is calculated with GA. As illustrated in Sect. 2, once the service provider accepts the manufacturing task, a new block generated to record the cooperation information whose function could be defined by collaboration smart contract. Then the block will be published on the network, which is verified by the nodes and then broadcasted to the blockchain. At this point, the deal cannot be retracted or broken. After the completion of the manufacturing task, in the case that both customers and services providers fulfill their corresponding obligations, a new block containing the payment information with the functions defined by payment smart contract is created, which is also verified by the nodes and recorded on the blockchain. So far a complete transaction procedure ended, and system will update the QoS attribute information for the next evaluation.

The traditional information service system is based on the independent and centralized system provided by software operators. And the manufacturing information of products is difficult to integrate and share along the value chain. The Blockchain-based manufacturing service composition architecture proposed in this paper creates a new manufacturing paradigm based on blockchain technology. It can help users to carry out their own data sharing/service exchange in an open environment. Meanwhile, in order to protect the security of internal data of enterprises, the application of cryptography and the design of decentralized consensus mechanism effectively eliminate the concerns of enterprise users and solve the biggest trust barrier that limits the wide implementation of existing third-party information sharing systems. In addition, all peer-to-peer nodes in distributed network are consensus-oriented, and the mining mechanism allows more users with different roles to make contributions to the system and gain new value. In the real world scenario, the system proposed in this paper is especially suitable for the core enterprises that plays a leading role in industry. On the one hand, the huge scale of core enterprises makes their upstream and downstream industrial chains involved numerous and complex. Therefore, a manufacturing information service platform covering all types of users is urgently needed. On the other hand, core enterprises often have high requirements on the confidentiality of data information, which is the biggest obstacle for core enterprises to establish collaborative sharing system. Which is exactly what blockchain technology is inherently capable of solving this security issue.

Fig. 3.
figure 3

Optimization process of composition model

5 Conclusion and Future Work

This paper proposed a system that combined cloud platform to work with blockchain technology, which not only preserve the unchanged transactions or events permanently, but also makes information accurately traceable. The introduced architecture makes full use of the advantages of cloud platform in resource allocation and gets rid of the centralized controller, which contributes advanced development to manufacturing industry in terms of fairness and credibility. In this way, the proposed method is quite useful for distrusting among enterprises and strength business synergy. Additionally, due to the mining process of blockchain itself and the verification mechanism based on consensus algorithm, the system not only can safeguard the interests of users, but also enables all nodes to obtain extra benefits. On the basis of the architecture, this research establishes a combinatorial optimization model of manufacturing services on cloud platform and tackles it by genetic evolutionary algorithm. Evaluation criteria are acquired from the QoS attributes, and the optimization results of the model will in turn update the QoS datasets recorded in the blockchain. Moreover, simulation experiment shows that the whole process of blockchain-based manufacturing service composition architecture is effective and owns enough ability to select optimal composite schemes to handle the task requests.

In future work, this kind of framework should be applied in more practical scenarios, where there will be more unexpected problems to be solved, e.g. the design of smart contracts and the agreement of consensus mechanism, etc. In the meantime, it is also necessary to develop more accurate models and algorithms to tackle service composition optimization problems in order to further improve its performance.