A collaborative management method for smart manufacturing enterprise departments based on blockchain technology
By using blockchain technology and BLS signature algorithm in intelligent manufacturing systems to optimize the PBFT consensus mechanism, the problem of low efficiency of information traceability and performance management is solved, and efficient data consensus and problem traceability are achieved, which is suitable for intelligent manufacturing systems.
Patent Information
- Application Number
- CN202411360562.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2044-09-27
AI Technical Summary
The existing collaborative management methods for manufacturing enterprises are difficult to effectively trace information, achieve performance and workload transparency, and the information interaction efficiency is insufficient, and the PBFT consensus mechanism has limitations in communication performance, making it difficult to apply to intelligent manufacturing systems.
Adopt the collaborative management method of intelligent manufacturing enterprise departments based on blockchain technology, and initialize the blockchain network for intelligent manufacturing, use the BLS signature algorithm and the PBFT consensus mechanism of node working value to conduct business request consensus, and issue performance rewards through smart contracts. , optimize consensus processes to improve efficiency.
By reducing the number of communications in the PBFT consensus process, the efficiency of information traceability and performance management is improved, fair and just performance management is ensured, and efficient data consensus and problem traceability are suitable for intelligent manufacturing systems.
Smart Images

Figure CN118886869B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of collaborative management technology, and in particular to a collaborative management method for departments of an intelligent manufacturing enterprise based on blockchain technology. Background Art
[0002] Smart manufacturing is a manufacturing model that combines intelligent machines and human experts. Based on precise process status tracking, sensors and other sensing devices are used to collect complete data in the manufacturing process, obtain sufficient information, and then upload it to the central database for data analysis and processing, so as to better manage manufacturing resources and implement the best manufacturing plan. The internal structure of smart manufacturing enterprises is relatively complex, and can be mainly divided into R&D department, production department, data analysis department, supervision department, sales department, operation and maintenance department, logistics department, after-sales department and financial department. In the traditional manufacturing model, if departments need to obtain information from each other, they need cumbersome application procedures, etc., and cannot share information in a timely manner, resulting in information island problems, which affects the effective interaction between departments.
[0003] Most of the existing collaborative management methods for manufacturing enterprises adopt centralized database storage, and all relevant data involved in the manufacturing process are uploaded to the central database for data analysis. However, the centralized storage method will face the problem of data loss caused by central node failure, and is also vulnerable to centralized malicious attacks, resulting in data errors, so there are great defects in data security.
[0004] Enterprise department management is internal management. All departments are authenticated and authorized. It is similar to the consortium chain in blockchain technology. Therefore, collaborative management among departments of smart manufacturing enterprises can be achieved through the consortium chain.
[0005] PBFT is the mainstream consensus mechanism in the alliance chain. It solves the problems of high computing power requirements and high electricity resource consumption of the proof-of-work consensus mechanism. It can tolerate 1 / 3 of the Byzantine nodes and maintain normal operation of the consensus. The communication complexity of the PBFT consensus mechanism reaches n^2, which makes it have great limitations in communication performance. When the number of nodes in the chain increases, the communication efficiency will drop rapidly. Smart manufacturing companies often need to carry out multiple product manufacturing projects simultaneously, which will continuously generate a large amount of data. Therefore, PBFT is difficult to be directly applied to smart manufacturing systems. Summary of the invention
[0006] The purpose of this invention is to provide a method for collaborative management of departments of intelligent manufacturing enterprises based on blockchain technology to solve the following technical problems:
[0007] The existing collaborative management methods of manufacturing enterprise departments are difficult to effectively trace information, achieve transparency in performance and workload, and solve the problem of insufficient efficiency in information exchange between departments.
[0008] The purpose of the present invention can be achieved through the following technical solutions:
[0009] A method for collaborative management of departments of an intelligent manufacturing enterprise based on blockchain technology, comprising the following steps:
[0010] S1: Initialize the blockchain network for smart manufacturing, where one blockchain node corresponds to a department in a smart manufacturing enterprise;
[0011] S2: The business request from the client is received through the blockchain network for smart manufacturing, and the blockchain nodes reach consensus on the business request. The consensus operation is mainly performed through the consistency protocol of the PBFT consensus mechanism based on the BLS signature algorithm and the node work value;
[0012] S3: Performance rewards are issued to various departments in the blockchain network for smart manufacturing through smart contracts.
[0013] As a further solution of the present invention: Step S1 comprises the following steps:
[0014] By creating a smart contract through the Genesis block, each department entity in the smart manufacturing enterprise initiates a request to join the blockchain network for smart manufacturing; the blockchain network verifies the identity of the department, and the verification becomes a node in the blockchain by generating a unique number and address information.
[0015] As a further solution of the present invention: the consistency protocol process of performing consensus operation on the service request sent by the client through the PBFT consensus mechanism based on the BLS signature algorithm and the node working value in step S2 includes the following steps:
[0016] S201: Each node in the blockchain network for smart manufacturing is elected as the master node in turn;
[0017] S202: Send a request message to the master node through the client<REQUEST,o,t,c> σ c ;
[0018] Among them, o represents the specific action of the request sent by the client, t represents the timestamp of the request, c represents the identity of the client, σ c The client's signature on the request. REQUEST contains the request message content m and its digest d(m);
[0019] S203: The master node checks whether the signature of the client to the request is the signature of the client itself, sorts the request message content m, and generates a pre-prepare message. At the same time, the master node sends the pre-prepare message to the slave node. The pre-prepare message is:
[0020] <<PRE-PREPARE,v,n,d> σ p ,m>;
[0021] Among them, v represents the number of the view, n represents the sequence number of this request, d represents the summary of the message content, m represents the specific content of the message, and σ p Signature of the pre-prepare message on behalf of the master node;
[0022] S204: The slave node verifies the signature of the pre-prepare message from the master node, and obtains the verification result after the verification. The verification content includes:
[0023] Whether the current slave node has a pre-prepare message with sequence number n but inconsistent signature under the current view v; whether the digest d is the same as the digest content of message m; whether the sequence number n is within the high and low watermarks; whether the signature is correct;
[0024] S205: If the slave node verifies that the result is yes, the verification is successful, and the slave node sends a prepare message to the master node:
[0025] <PREPARE,v,n,d,i> σ i ; where i represents the identity of the current node, σ i The message signature representing node i;
[0026] Otherwise, the prepare message is not sent;
[0027] S206: When the master node receives prepare messages from 2f nodes, where f represents the number of Byzantine nodes in the blockchain network, the following contents are checked:
[0028] Signature i Check whether the request n is correct; whether n is still within the high and low watermarks; whether the content of summary d is consistent with d in the pre-prepare message;
[0029] If the check results are all yes, the check passes and an aggregate signature is generated using the BLS signature algorithm;
[0030] S207: After the aggregate signature is obtained, the consistency protocol process for consensus on the business request enters the replica-commit stage, and the message after the aggregate signature is obtained:
[0031] <REPLICA-COMMIT,v,n,d,i,N> σ s ,
[0032] The master node sends the aggregated signed message to all slave nodes; where σ s represents the BLS aggregate signature, and N represents the serial number table of all participating nodes in the aggregate signature;
[0033] S208: The slave node receives the aggregate signature sent by the master node and verifies the aggregate signature. After the slave node verifies the aggregate signature, the consistency protocol process for consensus on the service request enters the primary-commit stage; the slave node sends the authentication message to the master node. The authentication message is:
[0034] <PRIMARY-COMMIT,v,n,d,N,i,σ s >σ i
[0035] Among them, σ s represents the BLS aggregate signature, σ i Represents the signature of node i;
[0036] S209: If the master node receives 2f primary-commit messages, it means that 2f nodes have passed the authentication of the BLS aggregate signature, and this consensus is reached;
[0037] The master node and the slave node send a reply message to the client:
[0038] <REPLY,v,t,c,i,r> ,
[0039] Among them, r represents the result of executing this operation o;
[0040] If the client receives f+1 reply messages, it means that the request is successful and the consensus is completed;
[0041] S2010: The next round of consensus is carried out, and the next node serves as the master node. The consistency protocol process of the blockchain nodes to reach consensus on the business request repeats steps S201 to S209 until all nodes have served as master nodes.
[0042] As a further solution of the present invention: generating an aggregate signature by using the BLS signature algorithm in step S206 includes the following steps:
[0043] The master node receives x prepare messages. According to the BLS signature algorithm, each prepare message corresponds to a private key pk i , the corresponding public key is
[0044] , and generate the signature corresponding to the prepare message ; Where, i = [1, .., x];
[0045] Combine X signatures through BLS aggregate signature, the formula is:
[0046] S=S1+S2+...+S x ;
[0047] Among them, the length of the aggregated signature is consistent with the length of a single signature.
[0048] As a further solution of the present invention: the verification of the aggregate signature from the node in S208 includes the following steps:
[0049] The slave node verifies the aggregate signature, and the calculation formula is:
[0050] ,
[0051] As long as both sides of the formula are proved to be equal, it means that the aggregate signature is correct. The proof process is as follows:
[0052] .
[0053] As a further solution of the present invention: in the step S209, after all nodes have served as master nodes, the work values of all nodes are sorted. When the blockchain nodes reach a consensus on a new business request, the selection of the master node in the blockchain nodes adopts a merit-based selection mode. After the master node is selected, the consistency protocol process for the blockchain nodes to reach a consensus on the business request repeats steps S201 to S209.
[0054] As a further solution of the present invention: the mode of selecting the best master node includes: setting a period T, updating the work value after the end of one period, selecting the node with the highest work value among the blockchain nodes as the master node, and if there are multiple nodes with the same work value, then selecting the node with the earliest node number.
[0055] As a further solution of the present invention: the calculation formula for how much the node work value increases or decreases after each round of consensus is shown in formula (1), and the calculation formula for the final score of the node work value after each cycle T is shown in formula (2):
[0056]
[0057] in, is the initial working value of node i, Represents the node work value of node i in the rth round of consensus; is an indicative function. When node i has malicious behavior in the rth round of consensus, ,otherwise ; represents the i-th node; PN represents that the node is a master node, and RN represents that the node is a slave node; t represents the number of consensus rounds in a cycle; the specific value of t is determined by the company's leadership; T represents the cycle number; represents the final work value obtained by node i in the Tth cycle;
[0058] When T is 0, it means that the selection of master nodes based on work value has not yet started, but is in the stage of taking turns to be elected as the master node. The value should be the initial working value Add the work value obtained by the t-round consensus; when the value is greater than 0, it means that T cycles of consensus based on the work value have been carried out to screen the master node. At this time, the node work value of the T-th cycle should be the final work value calculated in the previous cycle plus the work value obtained by the t-round consensus in the current cycle.
[0059] As a further solution of the present invention: Step S3 comprises the following steps:
[0060] Publish smart contracts to the blockchain network for invocation;
[0061] When a smart contract is called, the blockchain network authenticates the smart contract. If the identity is correct, the data will be read and performance rewards will be issued according to the smart contract. If the identity authentication fails, the execution will be stopped and the execution status will be recorded in the blockchain network.
[0062] Beneficial effects of the present invention:
[0063] The operation of consensus on business requests by blockchain nodes of the present invention is executed through the PBFT consensus mechanism (BLS-WPBFT) based on the BLS signature algorithm and the node work value, which reduces the number of communications in the PBFT consensus process. Through the blockchain network for intelligent manufacturing, blockchain nodes reach consensus on business requests. At the same time, a node in the blockchain corresponds to a department in an intelligent manufacturing enterprise, which is convenient for finding the root cause of the problem by using the traceability of the blockchain when problems occur in the product manufacturing process and lead to product quality problems; performance is issued to each department in the blockchain network for intelligent manufacturing through smart contracts, and the issuance operation is automatically executed by the smart contract, which improves the efficiency of performance management and ensures the fairness and justice of performance management. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] The present invention will be further described below in conjunction with the accompanying drawings.
[0065] Figure 1is a system flow chart of the present invention;
[0066] Figure 2 It is a consistency protocol flow chart of the PBFT consensus mechanism based on the BLS signature algorithm and node work value of the present invention;
[0067] Figure 3 This is the consistency protocol process of the traditional PBFT consensus mechanism of the present invention. DETAILED DESCRIPTION
[0068] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0069] See also Figure 1-3 As shown, the present invention is a method for collaborative management of departments of intelligent manufacturing enterprises based on blockchain technology, comprising the following steps:
[0070] S1: Initialize the blockchain network for smart manufacturing, where one blockchain node corresponds to a department in a smart manufacturing enterprise;
[0071] S2: The business request from the client is received through the blockchain network for smart manufacturing, and the blockchain nodes reach consensus on the business request. The consensus operation is mainly performed through the PBFT consensus mechanism based on the BLS signature algorithm and the node work value, namely BLS-WPBFT.
[0072] S3: Performance rewards are issued to various departments in the blockchain network for smart manufacturing through smart contracts.
[0073] For details, please refer to Figure 3 As shown in the figure, PBFT is the mainstream consensus mechanism in the alliance chain. It solves the problem of high computing power requirements and high power consumption of the proof-of-work consensus mechanism. It can tolerate 1 / 3 of the Byzantine nodes and maintain normal operation of the consensus. The communication complexity of the PBFT consensus mechanism reaches n^2, which makes it have great limitations in communication performance. When the number of nodes in the chain increases, the communication efficiency will drop rapidly. Smart manufacturing companies often need to carry out multiple product manufacturing projects simultaneously, which will continuously generate a large amount of data. Therefore, PBFT is difficult to be directly applied to smart manufacturing systems.
[0074] By introducing the BLS signature algorithm, the consistency operation of blockchain nodes to reach consensus on business requests is executed through BLS-WPBFT based on the BLS signature algorithm and node work value, reducing the number of communications in the PBFT consensus process. Through the blockchain network for smart manufacturing, blockchain nodes reach consensus on business requests. At the same time, a node in the blockchain corresponds to a department in a smart manufacturing enterprise, which makes it easy to use the traceability of the blockchain to find the root cause of the problem when problems occur in the product manufacturing process and lead to product quality problems.
[0075] Performance is distributed to various departments in the blockchain network for intelligent manufacturing through smart contracts. The distribution operation is automatically executed by smart contracts, which improves the efficiency of performance management and ensures the fairness of performance management.
[0076] In one embodiment of the present invention, step S1 includes the following steps:
[0077] By creating a smart contract through the Genesis block, each department entity in the smart manufacturing enterprise initiates a request to join the blockchain network for smart manufacturing; the blockchain network verifies the identity of the department, and the verification becomes a node in the blockchain by generating a unique number and address information.
[0078] Specifically, in one implementation of this embodiment, the following departments may be set up as needed: company leadership, R&D department, production department, data analysis department, sales department, logistics department, operation and maintenance department, after-sales department and finance department.
[0079] In one embodiment of the present invention, the consensus operation in step S2 using BLS-WPBFT based on the BLS signature algorithm and the node work value includes the following steps:
[0080] By introducing the BLS signature algorithm, the commit phase is changed to the replica-commit phase and the primary-commit phase. Please refer to Figure 2 As shown in the figure, the number of communications in the PBFT consensus process is reduced, and the communication complexity is reduced from n^2 to n. The master node in the consensus process is confirmed by calculating the work value of the node. At the same time, when problems occur in the product manufacturing process and lead to product quality problems, the traceability of the blockchain will be used to find the root cause of the problem. After T cycles, performance rewards will be issued according to the work value. The issuance operation is automatically executed by the smart contract, which improves the efficiency of performance management and ensures the fairness and justice of performance management.
[0081] Since PBFT requires all nodes to broadcast messages during the prepare and commit phases, its communication complexity reaches n^2, and the master node selection method is always random. Even nodes with poor consensus still have the same probability of becoming master nodes, which has a great negative impact on the application of PBFT in smart manufacturing scenarios. Therefore, by using BLS to optimize the consistency protocol process, and after all nodes have been elected as master nodes, the master node will be selected based on the node working value.
[0082] In one embodiment of the present invention, the consistency protocol process for blockchain nodes to reach consensus on the service request in step S2 includes the following steps:
[0083] S201: Each node in the blockchain network for smart manufacturing is elected as the master node in turn;
[0084] In one implementation of this embodiment, there are m nodes in the network, numbered N0 to N1. m , then N0 is the first master node. When N0 finishes producing blocks, or fails or acts maliciously, N1 will be elected as the master node, and so on. Here, N0 is set as the master node first.
[0085] S202: Send a request message to the master node through the client<REQUEST,o,t,c> σ c ;
[0086] Among them, o represents the specific action of the request sent by the client, t represents the timestamp of the request, c represents the identity of the client, σ c The client's signature on the request. REQUEST contains the request message content m and its digest d(m);
[0087] S203: The master node checks whether the signature of the client to the request is the signature of the client itself, sorts the request message content m, and generates a pre-prepare message. At the same time, the master node sends the pre-prepare message to the slave node. The pre-prepare message is:
[0088] <<PRE-PREPARE,v,n,d> σ p ,m>;
[0089] Among them, v represents the number of the view, n represents the sequence number of this request, d represents the summary of the message content, m represents the specific content of the message, and σ p Signature of the pre-prepare message on behalf of the master node;
[0090] S204: The slave node verifies the signature of the pre-prepare message from the master node, and obtains the verification result after the verification. The verification content includes:
[0091] Whether the current slave node has a pre-prepare message with sequence number n but inconsistent signature under the current view v; whether the digest d is the same as the digest content of message m; whether the sequence number n is within the high and low watermarks; whether the signature is correct;
[0092] S205: If the slave node verifies that the result is yes, the verification is successful, and the slave node sends a prepare message to the master node:
[0093] <PREPARE,v,n,d,i> σ i ; where i represents the identity of the current node, σ i The message signature representing node i;
[0094] Otherwise, the prepare message is not sent;
[0095] S206: When the master node receives prepare messages from 2f nodes, where f represents the number of Byzantine nodes in the blockchain network, the following contents are checked:
[0096] Signature i Check whether the request n is correct; whether n is still within the high and low watermarks; whether the content of summary d is consistent with d in the pre-prepare message;
[0097] If the check results are all yes, the check passes and an aggregate signature is generated using the BLS signature algorithm;
[0098] S207: After the aggregate signature is obtained, the consistency protocol process for consensus on the business request enters the replica-commit stage, and the message after the aggregate signature is obtained:
[0099] <REPLICA-COMMIT,v,n,d,i,N> σ s ,
[0100] The master node sends the aggregated signed message to all slave nodes; where σ s represents the BLS aggregate signature, and N represents the serial number table of all participating nodes in the aggregate signature;
[0101] S208: The slave node receives the aggregate signature sent by the master node and verifies the aggregate signature. After the slave node verifies the aggregate signature, the consistency protocol process for consensus on the service request enters the primary-commit stage; the slave node sends the authentication message to the master node. The authentication message is:
[0102] <PRIMARY-COMMIT,v,n,d,N,i,σ s >σ i
[0103] Among them, σ s represents the BLS aggregate signature, σ i Represents the signature of node i;
[0104] S209: If the master node receives 2f primary-commit messages, it means that 2f nodes have passed the authentication of the BLS aggregate signature, and this consensus is reached;
[0105] The master node and the slave node send a reply message to the client:
[0106] <REPLY,v,t,c,i,r> ,
[0107] Among them, r represents the result of executing this operation o;
[0108] If the client receives f+1 reply messages, it means that the request is successful and the consensus is completed;
[0109] S2010: The next round of consensus is carried out, and the next node serves as the master node. The blockchain nodes repeat steps S201 to S209 in the consistency protocol process for consensus on business requests until all nodes have served as master nodes.
[0110] In one embodiment of the present invention, generating an aggregate signature by using the BLS signature algorithm in step S206 includes the following steps:
[0111] The master node receives x prepare messages. According to the BLS signature algorithm, each prepare message corresponds to a private key pk i , the corresponding public key is ,
[0112] And generate the signature corresponding to the prepare message ; Where, i = [1, .., x];
[0113] The x signatures are combined through BLS aggregate signature, the formula is:
[0114] S=S1+S2+...+S x ;
[0115] Among them, the length of the aggregated signature is consistent with the length of a single signature.
[0116] Specifically, it involves the bilinear mapping e function. There is a function e. For two points P and Q on the curve, there is e(P, Q)→n, that is, function e can map points P and Q to a value, and function e satisfies the commutative law, the distributive law, and the associative law. In the BLS signature algorithm, let G be a generating point on the curve, m be the message content, pk be the private key, and the public key , then its signature should be , H(m) is the mapping of message m to a point on the curve. Therefore, according to the BLS signature algorithm, each prepare message corresponds to a private key pk i , the corresponding public key is ,
[0117] And generate the signature corresponding to the prepare message The length of the aggregated signature is consistent with that of a single signature, which can save storage space.
[0118] In one embodiment of the present invention, verifying the aggregate signature from the node in S208 includes the following steps:
[0119] The slave node verifies the aggregate signature, and the calculation formula is:
[0120] ,
[0121] As long as both sides of the formula are proved to be equal, it means that the aggregate signature is correct. The proof process is as follows:
[0122] .
[0123] In one embodiment of the present invention, in step S209, after all nodes have served as master nodes, the work values of all nodes are sorted. When the blockchain nodes reach a consensus on a new business request, the selection of the master node in the blockchain nodes adopts a merit-based selection mode. After the master node is selected, the process of the blockchain nodes reaching a consensus on the business request repeats steps S201 to S209.
[0124] In one embodiment of the present invention, the mode of selecting the best master node includes: setting a period T, updating the work value after the end of a period, selecting the node with the highest work value among the blockchain nodes as the master node, and if there are multiple nodes with the same work value, then selecting the node with the earliest node number.
[0125] In one implementation of this embodiment, the scoring rules for the node work value are as follows: the initial work value of all nodes is 100 points, the master node adds 3 points for each successful consensus completion, and deducts 3 points if it commits a crime or fails, and adds 1 point for each successful participation of the slave node in the consensus without committing a crime or failing, and deducts 1 point if it fails. In addition, if quality problems occur after the product is manufactured, the traceability of the blockchain will be used to find the node that caused the quality problem, and deduct 2 points from its work value. Since the master node obtains 2 points more work value than the slave node when a round of consensus is successfully completed, this can motivate all nodes to maintain good consensus behavior in order to be elected as the master node. Correspondingly, the consensus failure caused by the master node committing a crime or failing will also deduct 2 points more than the slave node, which can also better control the master node to actively complete the consensus.
[0126] In one embodiment of the present invention, the calculation formula for how much the node work value increases or decreases after each round of consensus is shown in formula (1), and the calculation formula for the final score of the node work value after each cycle T is shown in formula (2):
[0127]
[0128] in, is the initial working value of node i, Represents the node work value of node i in the rth round of consensus; is an indicative function. When node i has malicious behavior in the rth round of consensus, ,otherwise ; represents the i-th node; PN represents that the node is a master node, and RN represents that the node is a slave node; t represents the number of consensus rounds in a cycle; the specific value of t is determined by the company's leadership; T represents the cycle number; represents the final work value obtained by node i in the Tth cycle;
[0129] When T is 0, it means that the selection of master nodes based on work value has not yet started, but is in the stage of taking turns to be elected as the master node. The value should be the initial working value Add the work value obtained by the t-round consensus; when the value of T is greater than 0, it means that T cycles of consensus on the selection of master nodes based on the work value have been carried out. At this time, the node work value of the T-th cycle should be the final work value calculated in the previous cycle plus the work value obtained by the t-round consensus in the current cycle.
[0130] Specifically, by calculating the node work value, it is convenient to reflect the work status of department entities through the work value; at the same time, the traditional PBFT method of randomly selecting master nodes is changed to selecting master nodes based on node work value, which reduces the possibility of view switching and consensus failure caused by master node evil, and at the same time, the incentive mechanism of adding and subtracting work values of nodes is used to encourage each node to actively participate in consensus. In addition, the blockchain will automatically issue performance rewards based on the node work value using smart contracts to improve the efficiency of performance management.
[0131] In one embodiment of the present invention, step S3 includes the following steps:
[0132] Publish smart contracts to the blockchain network for invocation;
[0133] When a smart contract is called, the blockchain network authenticates the smart contract. If the identity is correct, the data will be read and performance rewards will be issued according to the smart contract. If the identity authentication fails, the execution will be stopped and the execution status will be recorded in the blockchain network.
[0134] In one implementation of this embodiment, the smart contract includes a performance reward issuance strategy; the performance reward issuance strategy includes: the smart contract mobilizing party, the performance reward issuance time, the performance reward issuance object and the performance reward issuance amount.
[0135] In the description of the present invention, it should be understood that the terms "upper", "lower", "left", "right", etc. indicate directions or positional relationships based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, and a specific direction structure and operation, and therefore, cannot be understood as a limitation on the present invention. In addition, "first" and "second" are only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0136] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", etc. should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0137] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.
Claims
1. A method for collaborative management of departments of intelligent manufacturing enterprises based on blockchain technology, characterized in that: The following steps are involved: S1: Initialize the blockchain network for smart manufacturing, where one blockchain node corresponds to a department in a smart manufacturing enterprise; S2: The business request from the client is received through the blockchain network for smart manufacturing, and the blockchain nodes reach consensus on the business request. The consensus operation is performed through the consistency protocol of the PBFT consensus mechanism based on the BLS signature algorithm and the node work value; S3: Performance rewards are issued to various departments in the blockchain network for smart manufacturing through smart contracts; The consistency protocol process of performing consensus operation on the service request sent by the client through the PBFT consensus mechanism based on the BLS signature algorithm and the node work value in step S2 includes the following steps: S201: Each node in the blockchain network for smart manufacturing is elected as the master node in turn; S202: Send a request message to the master node through the client<REQUEST,o,t,c> σc; Among them, o represents the specific action of the request sent by the client, t represents the timestamp of the request, c represents the identity of the client, σc represents the signature of the client on the request, and REQUEST contains the request message content m and its digest d(m); S203: The master node checks whether the signature of the client on the request is the signature of the client itself, sorts the request message content m, and generates a pre-prepare message. At the same time, the master node sends the pre-prepare message to the slave node. The pre-prepare message is: <<PRE-PREPARE,v,n,d> σp,m>; Where v represents the view number, n represents the sequence number of this request, d represents the summary of the message content, m represents the specific content of the message, and σp represents the signature of the primary node on the pre-prepare message; S204: The slave node verifies the signature of the pre-prepare message from the master node, and obtains the verification result after the verification. The verification content includes: Whether the current slave node has a pre-prepare message with sequence number n but inconsistent signature under the current view v; whether the digest d is the same as the digest content of message m; whether the sequence number n is within the high and low watermarks; whether the signature is correct; S205: If the slave node verifies that the result is yes, the verification is successful, and the slave node sends a prepare message to the master node: <PREPARE,v,n,d,i> σi; where i represents the identity of the current node, and σi represents the message signature of node i; Otherwise, the slave node does not send a prepare message to the master node; S206: When the master node receives prepare messages from 2f nodes, where f represents the number of Byzantine nodes in the blockchain network, the following contents are checked: Whether the signature σi and request n are correct; whether n is still within the high and low watermarks; whether the content of the summary d is consistent with d in the pre-prepare message; If the check results are all yes, the check passes and an aggregate signature is generated using the BLS signature algorithm; S207: After the aggregate signature is obtained, the consistency protocol process for consensus on the business request enters the replica-commit stage, and the message after the aggregate signature is obtained: <REPLICA-COMMIT,v,n,d,i,N> σs, The master node sends the aggregated signed message to all slave nodes; where σs represents the BLS aggregate signature, and N represents the serial number table of all participating nodes in the aggregate signature; S208: The slave node receives the aggregate signature sent by the master node and verifies the aggregate signature. After the slave node verifies the aggregate signature, the consistency protocol process for consensus on the service request enters the primary-commit stage; the slave node sends the authentication message to the master node. The authentication message is: <PRIMARY-COMMIT,v,n,d,N,i,σs> σi Among them, σs represents the BLS aggregate signature, and σi represents the signature of node i; S209: If the master node receives 2f primary-commit messages, it means that 2f nodes have passed the authentication of the BLS aggregate signature, and this consensus is reached; The master node and the slave node send a reply message to the client: <REPLY,v,t,c,i,r> , Among them, r represents the result of executing this operation o; If the client receives f+1 reply messages, it means that the request is successful and the consensus is completed; S2010: The next round of consensus is carried out, and the next node serves as the master node. The consistency protocol process of the blockchain nodes to reach consensus on the business request repeats steps S201 to S209 until all nodes have served as master nodes.
2. According to claim 1, a method for collaborative management of departments of intelligent manufacturing enterprises based on blockchain technology is characterized in that: The step S1 comprises the following steps: By creating a smart contract through the Genesis block, each department entity in the smart manufacturing enterprise initiates a request to join the blockchain network for smart manufacturing; the blockchain network verifies the identity of the department, and the verification becomes a node in the blockchain by generating a unique number and address information.
3. According to the method of collaborative management of departments of intelligent manufacturing enterprises based on blockchain technology in claim 1, it is characterized in that: In step S206, the aggregate signature is generated by the BLS signature algorithm, including the following steps: The master node receives x prepare messages. According to the BLS signature algorithm, each prepare message corresponds to a private key pk i , the corresponding public key is P i =pk i *G, and generate the signature S corresponding to the prepare message i =pk i *H(m i ), where i = [1, .., x]; The x signatures are combined through BLS aggregate signature, the formula is: S=S1+S2+...+S x ; Among them, the length of the aggregated signature is consistent with the length of a single signature.
4. According to claim 1, a method for collaborative management of departments of intelligent manufacturing enterprises based on blockchain technology is characterized in that: The verification of the aggregate signature from the node in S208 includes the following steps: The slave node verifies the aggregate signature, and the calculation formula is: e(G,S)=e(P1,H(m1))*e(P2,H(m2))*...*e(P x ,H(m x )), As long as both sides of the formula are proved to be equal, it means that the aggregate signature is correct. The proof process is as follows: e(G,S) =e(G,S1+S2+...+S x ) =e(G,S1)*e(G,S2)*...*e(G,S x ) =e(G,pk1*H(m1))*e(G,pk2*H(m2))*...*e(G,pk x *H(m x )) =e(pk1*G,H(m1))*e(pk2*G,H(m2))*...*e(pk x *G,H(m x )) =e(P1,H(m1))*e(P2,H(m2))*...*e(P x ,H(m x ))。 5. According to claim 1, a method for collaborative management of departments of intelligent manufacturing enterprises based on blockchain technology is characterized in that: In step S209, after all nodes have served as master nodes, the work values of all nodes are sorted. When the blockchain nodes reach a consensus on a new business request, the selection of the master node in the blockchain nodes adopts a merit-based selection mode. After the master node is selected, the consistency protocol process for the blockchain nodes to reach a consensus on the business request repeats steps S201 to S209.
6. According to claim 5, a method for collaborative management of departments of intelligent manufacturing enterprises based on blockchain technology is characterized in that: The modes for selecting the best master nodes include: Set a period T, update the work value after a period, select the node with the highest work value among the blockchain nodes as the master node, and if there are multiple nodes with the same work value, select the node with the earliest node number.
7. According to claim 6, a method for collaborative management of departments of intelligent manufacturing enterprises based on blockchain technology is characterized in that: The calculation formula for how much the node work value increases or decreases after each round of consensus is shown in formula (1), and the calculation formula for the final score of the node work value after each cycle T is shown in formula (2): Among them, N 0 is the initial working value of node i, represents the node work value of node i in the rth round of consensus; I(i) is an indicative function. When node i has malicious behavior in the rth round of consensus, I(i) = -1, otherwise I(i) = 1; N i represents the i-th node; PN represents that the node is a master node, and RN represents that the node is a slave node; t represents the number of consensus rounds in a cycle; the specific value of t is determined by the company's leadership; T represents the number of cycles; represents the final work value obtained by node i in the Tth cycle; When T is 0, it means that the selection of master nodes based on work value has not yet started, but is in the stage of taking turns to be elected as the master node. The value should be the initial working value N 0 Add the work value obtained by the t-round consensus; when the value of T is greater than 0, it means that T cycles of consensus based on the work value have been carried out to screen the master node. At this time, the node work value of the T-th cycle should be the final work value calculated in the previous cycle plus the work value obtained by the t-round consensus in the current cycle.
8. According to the method of collaborative management of departments of intelligent manufacturing enterprises based on blockchain technology in claim 1, it is characterized in that: The step S3 comprises the following steps: Publish smart contracts to the blockchain network for invocation; When a smart contract is called, the blockchain network authenticates the smart contract. If the identity is correct, the data will be read and performance rewards will be issued according to the smart contract. If the identity authentication fails, the execution will be stopped and the execution status will be recorded in the blockchain network.
