AI-based hybrid consensus for blockchain
By using AI to dynamically select consensus protocols and nodes in a distributed ledger system, the problem of resource consumption of consensus protocol execution is solved, and more efficient resource utilization and system scalability are achieved.
Patent Information
- Application Number
- CN202010873778.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-08-27
- Filing Date
- 2020-08-26
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2040-08-26
AI Technical Summary
The execution of consensus protocols in distributed ledger systems consumes a lot of technical resources, resulting in robust node requirements, which may become a system obstacle.
Using artificial intelligence (AI) to select appropriate consensus protocols and nodes from the consensus protocol set, based on the security level of transactions and the critical data values, dynamically select super nodes or weak nodes for consensus processing, and optimize the use of computing resources.
By dynamically selecting consensus protocols and nodes, the consumption of technical resources is effectively reduced, the system's resource utilization and scalability are improved, and the dependence on robust nodes is reduced.
Smart Images

Figure CN112445612B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates generally to the field of networking, and more specifically to AI-based blockchain hybrid consensus. Background Art
[0002] A distributed ledger system (DLS) records transactions into an immutable ledger, often referred to as a blockchain. A blockchain includes a series of blocks, each of which has transactions recorded therein. In order to record transactions into blocks, a consensus protocol is executed by nodes (e.g., computing systems) participating in the DLS. However, the execution of the consensus protocol consumes technical resources (e.g., computing power, memory, energy). Therefore, technically robust nodes may be required to participate in the DLS, which may be a barrier to the adoption of the DLS. Summary of the invention
[0003] Implementations of the present disclosure generally relate to variable consensus protocols within a distributed ledger system (DLS). More specifically, implementations of the present disclosure relate to a blockchain hybrid consensus platform that uses artificial intelligence (AI) to select one or more consensus protocols from a set of consensus protocols and select nodes for recording transactions to a blockchain.
[0004] In some implementations, the actions include: providing a security level and a data criticality value of one or more transactions, the one or more transactions are to be recorded to a blockchain, and the blockchain belongs to a blockchain network; selecting a consensus protocol, the consensus protocol is selected from a consensus protocol set, and the consensus protocol is selected based on the security level and the data criticality value; defining a consensus node set, the consensus node set includes nodes from one of a super node pool and a weak node pool; and executing the consensus protocol by the consensus node set to record the one or more transactions to the blockchain. Other implementations of this aspect include corresponding systems, apparatuses, and computer programs encoded on a computer storage device and configured to perform the actions of the method.
[0005] These implementations and other implementations may each optionally include one or more of the following features: the actions also include: providing a weight assigned to a consensus protocol, the consensus protocol being executed based on the weight; the weight defining the number of consensus nodes in a set of consensus nodes that must verify one or more transactions to record the one or more transactions to the blockchain; the set of consensus protocols includes two or more consensus protocols with different computing requirements; super nodes have more computing resources than weak nodes; the security level and data criticality value are provided as an output of a machine learning (ML) model, the machine learning model receiving input data representing one or more transactions as input; and the consensus protocol is selected by the machine learning (ML) model, the machine learning model receiving the security level and data criticality as input.
[0006] The present disclosure also provides a computer-readable storage medium coupled to one or more processors and having instructions stored thereon, which when executed by the one or more processors cause the one or more processors to perform operations according to the implementation of the method provided herein.
[0007] The present disclosure also provides a system for implementing the method provided herein. The system includes one or more processors, and a computer-readable storage medium coupled to the one or more processors and having instructions stored thereon, which, when executed by the one or more processors, causes the one or more processors to perform operations according to the implementation of the method provided herein.
[0008] It should be understood that the method according to the present disclosure may include any combination of the various aspects and features described herein. That is, the method according to the present disclosure is not limited to the combination of the various aspects and features specifically described herein, but also includes any combination of the various aspects and features provided.
[0009] The details of one or more implementations of the present disclosure are set forth in the accompanying drawings and the description below. Other features and advantages of the present disclosure will be apparent from the description and drawings, and from the claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 Example systems are depicted in which implementations of the present disclosure may be performed.
[0011] Figure 2 An example conceptual architecture is depicted for implementations according to the present disclosure.
[0012] Figure 3A-3C A blockchain hybrid consensus platform according to an implementation of the present disclosure is depicted.
[0013] Figure 4 Depicted are example processes that may be performed in implementations of the present disclosure. DETAILED DESCRIPTION
[0014] Implementations of the present disclosure generally relate to variable consensus protocols within a distributed ledger system (DLS). More specifically, implementations of the present disclosure relate to a blockchain hybrid consensus platform that uses artificial intelligence (AI) to select one or more consensus protocols from a consensus protocol set and select nodes for recording transactions to a blockchain. As further described in detail herein, the AI-based blockchain consensus platform of the present disclosure determines the security and criticality of a transaction, and uses a hybrid consensus mechanism to select nodes from multiple types of nodes to perform consensus processing using a consensus protocol from a consensus protocol set.
[0015] In some implementations, the actions include: providing a security level and a data criticality value for one or more transactions, the one or more transactions to be recorded to a blockchain, and the blockchain belongs to a blockchain network; selecting a consensus protocol, the consensus protocol selected from a set of consensus protocols, and the consensus protocol selected based on the security level and the data criticality value; defining a consensus node set, the consensus node set including nodes from one of: a super node pool and a weak node pool; and executing the consensus protocol by the consensus node set to record the one or more transactions to the blockchain.
[0016] To provide further context for implementation of the present disclosure and as introduced above, a distributed ledger system (DLS) may also be referred to as a consensus network (e.g., composed of peer nodes) and a blockchain network, which enables participating entities to securely and immutably perform transactions and store data. Although the term blockchain is often associated with a specific network and / or use case (e.g., cryptocurrency transactions), blockchain is generally used herein to refer to a DLS without reference to any specific network and / or use case.
[0017] Blockchain can be described as a data structure that records transactions immutably. Blockchain includes two or more blocks, where each block (except the initial block) is linked to the immediately previous block. Linking blocks is achieved by using a cryptographic hash of the previous block and storing the hash in a subsequent block. Each block also includes a timestamp, its own cryptographic hash, and one or more transactions. Transactions that have been verified by the nodes of the blockchain network are hashed and encoded as a Merkle tree. The Merkle tree can be described as a data structure in which the data at the leaf nodes of the tree are hashed, and all hashes in each branch of the tree are cascaded at the root of the branch. This process continues up the tree to the root of the entire tree, which stores a hash representing all the data in the tree. The hash of a transaction that claims to be stored in the tree can be quickly verified by determining whether the hash is consistent with the structure of the tree.
[0018] As introduced above, the blockchain network can be provided as a public blockchain network, a private blockchain network, or a consortium blockchain network. The implementation of the present disclosure is further described in detail herein with reference to the consortium blockchain network. However, it is contemplated that the implementation of the present disclosure can be implemented in any suitable type of blockchain network.
[0019] Typically, a consortium blockchain network is private among participating entities. In a consortium blockchain network, the consensus process is controlled by an authorized set of nodes, which may be referred to as consensus nodes, with one or more consensus nodes operated by the respective entity (e.g., financial institution, insurance company). For example, a consortium of ten (10) entities (e.g., financial institutions, insurance companies) may operate a consortium blockchain network, with each entity operating at least one node in the consortium blockchain network.
[0020] In some examples, within a consortium blockchain network, a global blockchain is provided as a blockchain that is replicated across all nodes. That is, with respect to the global blockchain, all consensus nodes are in perfect state consensus. In order to reach a consensus (e.g., agree to add a block to the blockchain), a consensus protocol is implemented within the consortium blockchain network. Example consensus protocols include, but are not limited to, practical Byzantine fault tolerance (PBFT), proof of work (POW), proof of equity (POS), proof of importance (POI), proof of authority (POA), and any appropriate combination thereof. Different consensus protocols have different computational requirements. That is, some consensus protocols require a higher amount of computing power than other consensus protocols. For example, POS requires less computing power than POW, and PBFT requires less computing power than POS.
[0021] Implementations of the present disclosure are further described in detail herein with reference to a consortium blockchain network. However, it is contemplated that implementations of the present disclosure may be implemented in any suitable blockchain network.
[0022] Figure 1 An example environment 100 that can be used to perform implementations of the present disclosure is depicted. In some examples, the example environment 100 enables entities to participate in a consortium blockchain network 102. The example environment 100 includes computing devices 106, 108 and a network 110. In some examples, the network 110 includes a local area network (LAN), a wide area network (WAN), the Internet, or a combination thereof, and connects websites, user devices (e.g., computing devices), and backend systems. In some examples, the network 110 can be accessed through a wired and / or wireless communication link. In some examples, the network 110 enables communication with the consortium blockchain network 102 and communication within the consortium blockchain network 102. In general, the network 110 represents one or more communication networks. In some cases, the computing devices 106, 108 can be nodes of a cloud computing system (not shown), or each computing device 106, 108 can be a separate cloud computing system that includes multiple computers interconnected by a network and used as a distributed processing system.
[0023] In the depicted example, computing systems 106, 108 may each include any suitable computing system capable of participating as a node in consortium blockchain network 102. Examples of computing devices include, but are not limited to, servers, desktop computers, laptop computers, tablet computing devices, and smart phones. In some examples, computing systems 106, 108 host one or more computer-implemented services for interacting with consortium blockchain network 102. For example, computing system 106 may host a computer-implemented service for a first entity (e.g., Party A), such as a transaction management system used by the first entity to manage its transactions with one or more other entities (e.g., other parties). Computing system 108 may host a computer-implemented service for a second entity (e.g., Party B), such as a transaction management system used by the second entity to manage its transactions with one or more other entities (e.g., other parties). Figure 1 In the example of , the consortium blockchain network 102 is represented as a peer-to-peer network of nodes, and the computing systems 106 , 108 provide nodes of a first entity and a second entity participating in the consortium blockchain network 102 , respectively.
[0024] Figure 2 An example conceptual architecture 200 is depicted according to implementations of the present disclosure. The example conceptual architecture 200 includes party systems 202, 204, 206 corresponding to party A, party B, and party C, respectively. Each party (e.g., user, enterprise) participates in a blockchain network 212 provided as a peer-to-peer network including a plurality of nodes 214, at least some of which immutably record information in a blockchain 216. Although a single blockchain 216 is schematically depicted within the blockchain network 212, as described in further detail herein, multiple copies of the blockchain 216 are provided and maintained across the blockchain network 212.
[0025] In the depicted example, each participant system 202, 204, 206 is provided by or on behalf of participant A, participant B, and participant C, respectively, and acts as a corresponding node 214 within the blockchain network. As used herein, a node generally refers to an individual system (e.g., a computer, a server) that is connected to the blockchain network 212 and enables the corresponding participant to participate in the blockchain network. Figure 2 In the example of , a party corresponds to each node 214. However, it is contemplated that a party may operate multiple nodes 214 within the blockchain network 212, and / or multiple parties may share a node 214. In some examples, the party systems 202, 204, 206 communicate with or through the blockchain network 212 using a protocol (e.g., Hypertext Transfer Protocol Secure (HTTPS)) and / or using remote procedure calls (RPCs).
[0026] The nodes 214 may have varying degrees of capabilities within the blockchain network 212. For example, some nodes 214 have robust technical resources (e.g., processing power, memory) and may participate in the consensus process and / or store a complete copy of the blockchain 216. Other nodes 214 have fewer technical resources and may not participate in the consensus process and / or may only store a copy of a portion of the blockchain 216.
[0027] In view of this, implementations of the present disclosure distinguish between so-called supernodes and weak nodes. In some implementations, a supernode is a node that must be explicitly permitted to be appended to a block of a blockchain based on a consensus protocol. That is, a supernode always participates in the consensus process. In some implementations, a weak node is a node that sometimes participates in the consensus process. In some examples, and as further described in detail herein, a weak node is randomly selected from a set of nodes (i.e., a set of weak nodes) to be permitted to be appended to a block of a blockchain based on a consensus protocol. In some examples, a weak node has fewer technical resources (e.g., computing power, memory) than a supernode. For example, a weak node can be a mobile device (e.g., a smart phone, an Internet of Things (IoT) sensor, a laptop, an embedded device, etc.) with fewer technical resources than a device used as a supernode.
[0028] Blockchain (e.g. Figure 2 The blockchain 216) consists of a chain of blocks, each of which stores data. Examples of data include transaction data representing a transaction between two or more parties. Although transactions are used herein by way of non-limiting example, it is contemplated that any suitable data may be stored in the blockchain (e.g., documents, images, videos, audio). Examples of transactions may include, but are not limited to, the exchange of things of value (e.g., assets, products, services, currencies). Transaction data is immutably stored in the blockchain. That is, the transaction data cannot be changed.
[0029] Before being stored in a block, the transaction data is hashed. Hashing is the process of converting transaction data (provided as string data) into a fixed-length hash value (also provided as string data). It is impossible to de-hash the hash value to obtain the transaction data. Hashing ensures that even slight changes in the transaction data will result in completely different hash values. In addition and as noted above, hash values have a fixed length. That is, regardless of the size of the transaction data, the length of the hash value is fixed. Hashing includes processing the transaction data through a hash function to generate a hash value. Example hash functions include, but are not limited to, Secure Hash Algorithm (SHA)-256, which outputs a 256-bit hash value.
[0030] The transaction data of multiple transactions are hashed and stored in a block. For example, the hash value of two transactions is provided and itself is hashed to provide another hash. This process is repeated until a single hash value is provided for all transactions to be stored in a block. This hash value is called the Merkle root hash and is stored in the header of the block. A change in any transaction results in a change in its hash value and ultimately a change in the Merkle root hash.
[0031] Blocks are added to the blockchain through a consensus protocol. Multiple nodes within the blockchain network participate in the consensus protocol and perform work to add blocks to the blockchain. Such nodes are called consensus nodes. PBFT, POW, POS, and POA introduced above are used as non-limiting examples of consensus protocols. Consensus nodes execute consensus protocols to add transactions to the blockchain. As further described in detail herein, super nodes and weak nodes (randomly selected weak nodes) execute the selected consensus protocol to add transactions to the blockchain. That is, the consensus node set includes a super node set and a weak node set.
[0032] In more detail, the consensus node generates a block header, hashes all transactions in the block, and combines hashes in pairs to generate other hashes until a single hash is provided for all transactions in the block (the Merkle root hash), which is then added to the block header. The consensus node also determines the hash of the latest block in the blockchain (i.e., the last block added to the blockchain). The consensus node also adds a nonce value and a timestamp to the block header.
[0033] In some blockchain networks, cryptography is implemented to maintain the privacy of transactions. For example, if two nodes want to keep a transaction private so that other nodes in the blockchain network cannot discern the details of the transaction, the nodes can encrypt the transaction data. Example cryptography includes, but is not limited to, symmetric encryption and asymmetric encryption. Symmetric encryption refers to the cryptographic process of using a single key for encryption (generating ciphertext from plaintext) and decryption (generating plaintext from ciphertext). In symmetric encryption, the same key can be used for multiple nodes, so each node can encrypt / decrypt the transaction data.
[0034] Asymmetric encryption uses key pairs, each of which includes a private key and a public key, the private key is known only to the corresponding node, and the public key is known to any or all other nodes in the blockchain network. A node can encrypt data using the public key of another node, and the encrypted data can be decrypted using the private key of another node. For example, and again referring to Figure 2, Party A can use Party B's public key to encrypt data and send the encrypted data to Party B. Party B can use its private key to decrypt the encrypted data (ciphertext) and extract the original data (plaintext). Messages encrypted with a node's public key can only be decrypted using that node's private key.
[0035] Asymmetric encryption is used to provide digital signatures, which enable parties in a transaction to confirm the other parties in the transaction and the validity of the transaction. For example, a node can digitally sign a message, and another node can confirm that the message was sent by the node based on the digital signature of party A. Digital signatures can also be used to ensure that the message has not been tampered with during transmission. For example, and again referring to Figure 2 , Party A sends a message to Party B. Party A generates a hash of the message and then encrypts the hash using its private key to provide a digital signature as the encrypted hash. Party A appends the digital signature to the message and sends the message with the digital signature to Party B. Party B decrypts the digital signature using Party A's public key and extracts the hash. Party B hashes the message and compares the hashes. If the hashes are the same, Party B can confirm that the message is indeed from Party A and has not been tampered with.
[0036] As introduced above, the implementation of the present disclosure relates to a blockchain hybrid consensus platform that uses artificial intelligence (AI) to select one or more consensus protocols from a consensus protocol set and select nodes for recording transactions to the blockchain. As further described in detail herein, the AI-based blockchain consensus platform of the present disclosure determines the security and criticality of a transaction and uses a hybrid consensus mechanism to select nodes from multiple types of nodes to perform consensus processing using a consensus protocol from a consensus protocol set.
[0037] Implementations of the present disclosure are further described in detail herein with reference to example use cases. However, it is contemplated that implementations of the present disclosure may be implemented in any appropriate use case. Example use cases include a component supply chain for aircraft parts. For example, stakeholders within a supply chain may participate in a consortium blockchain network that is used to record transactions along the supply chain (e.g., the movement of components throughout the supply chain). In some examples, stakeholders may agree on different security and criticality of corresponding components. For example, common components may receive less attention in terms of security and criticality, while non-common components (e.g., components incorporating proprietary technology) may receive more attention in terms of security and criticality. In some examples, for a given product, a bill of materials (BOM) may be provided, and stakeholders may agree on the security and criticality of corresponding components within the BOM.
[0038] In an example use case, a context may be defined that indicates the requirements of the respective participants in the consortium blockchain network. For example, a participant may indicate that a particular component moving along a particular portion of the supply chain is of greater concern than a different component moving along other portions of the supply chain. In this manner, stakeholders may limit the scope of a blockchain transaction to a particular critical plant or purchase category. Thus, and as further described in detail herein, since the energy requirements for node processing will be proportional to the criticality of the transaction, implementations of the present disclosure enable stakeholders to implement a blockchain network across purchase categories.
[0039] To further illustrate the implementation of the present disclosure, example components may include engines, landing gear, and seat cushions. In an example supply chain, the engine may originate from the UK, the landing gear may originate from China, and the seat cushion may originate from India. The engine may be considered a very critical component in aircraft accessories. Therefore, as further described in detail herein, in transactions involving engines, the blockchain hybrid consensus platform assigns important weights to stricter consensus protocols. The landing gear may be considered a critical component in aircraft accessories, and outsourcing of the landing gear may bring risks. Therefore, as further described in detail herein, in transactions involving landing gear, the blockchain hybrid consensus platform assigns higher weights to stricter consensus protocols. In the example supply chain, the criticality and transaction value of transactions involving seat cushions may be considered relatively low. Therefore, in transactions involving seat cushions, the blockchain hybrid consensus platform assigns a larger weight to a less strict consensus protocol, which can be executed with a lower technical resource burden than a stricter consensus protocol.
[0040] Figure 3A-3C A blockchain hybrid consensus platform 300 according to an implementation of the present disclosure is depicted. Figure 3A , the blockchain hybrid consensus platform 300 includes an AI engine 302 that receives input data 304 and provides a verified block 306 for appending to the blockchain. In some examples, the input data 304 includes transaction data (e.g., data representing one or more transactions to be recorded in a block of the blockchain). As further described in detail herein, the AI engine 302 determines a security level of the transaction, assigns weights to consensus protocols in a consensus protocol set, and for each consensus protocol, selects a consensus node set from a super node set and a weak node set for performing consensus processing.
[0041] In general, the security level takes into account the value and criticality of the block, and the data criticality represents the relative importance of the data. In some examples, the data criticality can be customized for specific requirements. For example, considering a seat cushion, if it originates from India, the criticality and transaction value of the block will be low. As described in this article, by assigning greater weight to different consensus mechanisms, blocks containing transaction data for seat cushions can be approved quickly and resource-efficiently.
[0042] In some implementations, the AI engine 302 includes a neural network framework / chain 308, which includes a data evaluation mechanism 310, a hybrid consensus mechanism 312, and a node selection mechanism 314. As described in further detail herein, the data evaluation mechanism 310 receives a data value based on the input data 304 and determines the security level and criticality of the data value. In some examples, the data value represents a transaction value to be appended to a block of the blockchain. In some examples, the criticality represents the criticality of the data value determined by the AI engine 302. In some examples, the security level (e.g., in the range of 1-100) is based on the block value and the block criticality. For example, the input data 304 is provided as a data structure representing one or more transactions. In an example use case, the input data 304 includes a data structure representing the movement of a component along a supply chain, and may include one or more parameters representing it. Example parameters may include, but are not limited to, transaction value, source country, source seller, destination, and transmission mode. In some examples, the parameters are customizable for the corresponding context (e.g., the corresponding participant in the consortium blockchain). In some implementations, the data structure can be processed to determine data values from the input data 304 .
[0043] According to an implementation of the present disclosure, the AI engine 302 uses a neural network framework 308 to evaluate the security level of a transaction value. In some examples, the security level is based on one or more parameters representing one or more transactions (example parameters are provided above). The AI engine 302 uses a combination of algorithms to determine the security level. Example algorithms include, but are not limited to, generalized linear models (LM), k-nearest neighbors (KNN), support vector machines (SVM), and random forests.
[0044] In some implementations, the data evaluation mechanism 310 processes the data value and one or more parameters associated therewith through a machine learning (ML) model to provide a security level and data criticality. For example, the ML model receives the data value and one or more parameters associated therewith as input and provides a security level and data criticality as output.
[0045] In some implementations, the hybrid consensus mechanism 312 determines the consensus protocol to be used to append the block to the blockchain. The hybrid consensus mechanism selects a consensus protocol from a set of consensus protocols. Figure 3B As depicted in , and as described in further detail herein, weights are assigned to each consensus protocol in a set of consensus protocols (e.g., WA, WB, WC for consensus protocols A, B, C, respectively). In some implementations, weights are determined based on security levels and data criticality. In some examples, consensus protocols are provided to balance ease of computation and security. In some examples, consensus protocols are determined based on corresponding contexts. For example, a first party in a consortium blockchain network may have high security requirements regardless of the required computing resources, while a second party in the consortium blockchain network may have lower security requirements to enable a reduction in the burden on technical resources.
[0046] In some implementations, each weight represents a threshold number of nodes that must approve a transaction to be added to the blockchain. Figure 3B , the following example weights can be provided: consensus A-weight (WA) = 0.75, consensus B-weight (WB) = 0.20, and consensus C-weight (WC) = 0.05. Therefore, under consensus A, a transaction is validated when 75% of the consensus node set approves the transaction; under consensus B, a transaction is validated when 20% of the consensus node set approves the transaction; and under consensus C, a transaction is validated when 5% of the consensus node set approves the transaction.
[0047] In some implementations, the hybrid consensus mechanism 312 processes the security level and data criticality through an ML model to provide corresponding weights of the consensus protocol and select the consensus protocol to be used. For example, the ML model receives the security level and data criticality as input and provides the weights and the selected consensus protocol as output. In some examples, the input to the ML model may also include parameters associated with the transaction and / or context. As described herein, the consensus protocol and weights may be selected based on the security level and data criticality, where a more secure consensus protocol is selected for transactions with a higher security level and data criticality, and a less secure consensus protocol is selected for transactions with a lower security level and data criticality.
[0048] In some implementations, and as Figure 3CAs depicted in , the node selection mechanism 314 selects a set of consensus nodes for executing the consensus protocol. According to an implementation of the present disclosure, the consensus nodes to be included in the set of consensus nodes are selected from the corresponding node pools, and the corresponding node pools include a super node pool and a weak node pool. In some examples, the consensus nodes are selected from a single pool. For example, since the consensus protocol requires higher computing power, it can be determined that the super node will execute the consensus protocol. As another example, since the consensus protocol does not require higher computing power, it can be determined that the weak node will execute the consensus protocol. In some implementations, the node selection mechanism 314 processes the selected consensus protocol through an ML model to provide a set of consensus nodes to be used. For example, the ML model receives the selected consensus protocol as input and provides a set of consensus nodes as output.
[0049] In some implementations, the selection of nodes for each consensus protocol is probabilistic. That is, nodes that are executed as consensus nodes are randomly selected. In some examples, node selection is performed dynamically according to the security level of the transaction. In this way, processing time and computing requirements are optimized. For example, for transactions with a high security level, a larger weight is assigned to consensus A (higher security, but requires more computing power), and a lower weight is assigned to consensus B and / or consensus C (both have lower security and require less computing power than consensus A). In this example, node selection ensures that: in order to verify the transaction, more super nodes are selected for executing consensus A than for executing consensus B and consensus C, thereby optimizing the process.
[0050] Figure 4 An example process 400 is depicted that may be performed in an implementation of the present disclosure. In some examples, a computer program executed by one or more computing devices (e.g., Figure 1 The example process 400 may be provided by one or more computer executable programs executed by the backend system 106 of the system.
[0051] Receive input data (402). For example, and refer to Figure 3A , the AI engine 302 receives input data 304 representing one or more transactions to be recorded to a blockchain within a blockchain network. In some examples, the input data 304 is provided as a data structure representing one or more transactions (e.g., representing the movement of a part along a supply chain and may include one or more parameters representing the same).
[0052] Determine security level and data criticality (404). For example, input data 304 is processed to determine data values, and data evaluation mechanism 310 processes the data values and one or more parameters associated therewith through an ML model to provide security level and data criticality. For example, the ML model receives the data value and one or more parameters associated therewith as input, and provides security level and data criticality as output. Determine weights and select consensus protocol (406). For example, hybrid consensus mechanism 312 processes security level and data criticality through an ML model to provide corresponding weights of consensus protocols and select a consensus protocol to be used.
[0053] A set of consensus nodes is selected (408). For example, the node selection mechanism 314 processes the selected consensus protocol through an ML model to provide a set of consensus nodes to be used. For example, the ML model receives the selected consensus protocol as input and provides a set of consensus nodes as output. In some examples, the set of consensus nodes includes super nodes. In some examples, the set of consensus nodes includes weak nodes. A consensus process is performed (410). For example, each consensus node in the set of consensus nodes executes the selected consensus protocol. When at least a subset of the consensus nodes verifies that a transaction is to be included in a block of the blockchain, the transaction is thereby included. Based on the weight assigned to the selected consensus protocol, the number of consensus nodes included in the subset of consensus nodes is determined. Continuing with the example above, if consensus A with a weight of 0.75 is selected, the transaction is added to the block of the blockchain when 75% of the consensus nodes in the set of consensus nodes verify the transaction.
[0054] The implementation and all functional operations described in the present disclosure can be implemented in digital electronic circuits or in computer software, firmware or hardware, including the structures disclosed in the present disclosure and their structural equivalents, or in a combination of one or more thereof. The implementation can be implemented as one or more computer program products, that is, one or more modules of computer program instructions encoded on a computer-readable medium to be executed by a data processing device or to control the operation of the data processing device. The computer-readable medium can be a machine-readable storage device, a machine-readable storage substrate, a memory device, a material composition that affects a machine-readable propagation signal, or a combination of one or more thereof. The term "computing system" covers all devices, equipment and machines for processing data, including, for example, a programmable processor, a computer or multiple (CPU and / or GPU) processors or computers. In addition to hardware, the device may also include code (e.g., code) that creates an execution environment for the computer program in question, which constitutes a processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more thereof. A propagation signal is an artificially generated signal (e.g., a machine-generated electrical, optical or electromagnetic signal) that is generated to encode information for transmission to a suitable receiver device.
[0055] A computer program (also referred to as a program, software, software application, script, or code) may be written in any suitable form of a programming language (including compiled or interpreted languages), and it may be deployed in any suitable form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program does not necessarily correspond to a file in a file system. A program may be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or portions of code). A computer program may be deployed to execute on one or more computers located at one site or distributed across multiple sites and interconnected by a communications network.
[0056] The processes and logic flows described in the present disclosure may be performed by one or more programmable processors executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows may also be performed by, and apparatus may be implemented as, special purpose logic circuitry, such as an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit).
[0057] For example, processors suitable for executing computer programs include general and special purpose microprocessors, and any one or more processors of any suitable kind of digital computer. Typically, the processor will receive instructions and data from a read-only memory or a random access memory or both. The elements of a computer may include a processor for executing instructions and one or more memory devices for storing instructions and data. Typically, the computer will also include or be operably coupled to receive data from one or more mass storage devices (e.g., magnetic disks, magneto-optical disks, or optical disks) for storing data or to transfer data to one or more mass storage devices or both. However, the computer does not have to have such a device. Moreover, the computer may be embedded in another device (e.g., a mobile phone, a personal digital assistant (PDA), a mobile audio player, a global positioning system (GPS) receiver). Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, including, for example, semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices); magnetic disks (e.g., internal hard disks or removable disks); magneto-optical disks; and CD ROM and DVD-ROM disks. The processor and memory may be supplemented by or incorporated into a dedicated logic circuit.
[0058] To provide for interaction with a user, implementations may be implemented on a computer having a display device (e.g., a CRT (cathode ray tube), LCD (liquid crystal display), LED (light emitting diode) monitor) for displaying information to the user, as well as a keyboard and pointing device (e.g., a mouse or trackball), through which the user can provide input to the computer. Other types of devices may also be used to interact with the user. For example, feedback provided to the user may be any suitable form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any suitable form (including sound, speech, or touch).
[0059] The implementation may be implemented in a computing system that includes a back-end component (e.g., as a data server), or includes a middleware component (e.g., an application server), or includes a front-end component (e.g., a client computer with a graphical user interface or a web browser through which a user can interact with the implementation), or any suitable combination of one or more such back-end, middleware, or front-end components. The components of the system may be interconnected by any suitable form or medium of digital data communication (e.g., a communication network). Examples of communication networks include local area networks ("LANs") and wide area networks ("WANs") (e.g., the Internet).
[0060] A computing system may include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The relationship between client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
[0061] Although the present disclosure contains many details, these should not be interpreted as limitations on the scope of the present disclosure or the scope of what is claimed, but rather as descriptions of features specific to a particular implementation. Certain features described in the present disclosure in the context of separate implementations may also be implemented in combination in a single implementation. Conversely, various features described in the context of a single implementation may also be implemented separately in multiple implementations or in any suitable sub-combination. Moreover, although features may be described above as functioning in certain combinations and even initially claimed as such, in some cases one or more features in the claimed combination may be cut out of the combination, and the claimed combination may be directed to a sub-combination or a variant of a sub-combination.
[0062] Similarly, although operations are depicted in a particular order in the accompanying drawings, this should not be understood as requiring that such operations be performed in the particular order shown or in a continuous order or that all illustrated operations be performed in order to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. In addition, the separation of various system components in the above implementations should not be understood as requiring such separation in all implementations, and it should be understood that the described program components and systems can generally be integrated into a single software product or packaged into multiple software products.
[0063] Many implementations have been described. However, it will be appreciated that various modifications may be made without departing from the spirit and scope of the present disclosure. For example, the various forms of the processes shown above may be used, and steps may be reordered, added, or deleted. Therefore, other implementations are within the scope of the appended claims.
Claims
1. A computer-implemented method for hybrid consensus in a blockchain network, the method being executed by one or more processors and comprising: providing a security level and a data criticality value for one or more transactions to be recorded to a blockchain belonging to a blockchain network; selecting a consensus protocol, the consensus protocol having a weight corresponding to the security level and the data criticality value of the one or more transactions, the weight of the consensus protocol representing a threshold number of nodes that must approve the one or more transactions for recording the one or more transactions to the blockchain, the consensus protocol being selected from a set of consensus protocols, and the consensus protocol being selected by a machine learning (ML) model that receives the security level and the data criticality value as input; A set of consensus nodes is selected according to the computing power required by the consensus protocol corresponding to the security level and the data criticality value of the one or more transactions, the set of consensus nodes being selected from one of the following: Supernode pool, or Weak node pool; as well as In response to the set of consensus nodes executing the consensus protocol, the one or more transactions are recorded to the blockchain.
2. The method according to claim 1, Wherein the consensus protocol is executed based on the weights.
3. The method of claim 1, wherein the set of consensus protocols comprises two or more consensus protocols with different computational requirements.
4. The method of claim 1, wherein a supernode comprises more computing resources than a weak node.
5. The method of claim 1, wherein the security level and the data criticality value are provided as outputs of the machine learning (ML) model, the machine learning model receiving as input input data representing the one or more transactions.
6. A non-transitory computer-readable storage medium coupled to one or more processors and having instructions stored thereon, the instructions, when executed by the one or more processors, causing the one or more processors to perform operations for hybrid consensus in a blockchain network, the operations comprising: providing a security level and a data criticality value for one or more transactions to be recorded to a blockchain belonging to a blockchain network; selecting a consensus protocol, the consensus protocol having a weight corresponding to the security level and the data criticality value of the one or more transactions, the weight of the consensus protocol representing a threshold number of nodes that must approve the one or more transactions for recording the one or more transactions to the blockchain, the consensus protocol being selected from a set of consensus protocols, and the consensus protocol being selected by a machine learning (ML) model that receives the security level and the data criticality value as input; A set of consensus nodes is selected according to the computing power required by the consensus protocol corresponding to the security level and the data criticality value of the one or more transactions, the set of consensus nodes being selected from one of the following: Supernode pool, or Weak node pool; as well as In response to the set of consensus nodes executing the consensus protocol, the one or more transactions are recorded to the blockchain.
7. The computer-readable storage medium according to claim 6, Wherein the consensus protocol is executed based on the weights.
8. The computer-readable storage medium of claim 6, wherein the set of consensus protocols comprises two or more consensus protocols having different computational requirements.
9. The computer-readable storage medium of claim 6, wherein a supernode comprises more computing resources than a weak node.
10. The computer-readable storage medium of claim 6, wherein the security level and the data criticality value are provided as outputs of the machine learning (ML) model, the machine learning model receiving as input input data representing the one or more transactions.
11. A system comprising: one or more processors; as well as A computer-readable storage device, coupled to the one or more processors and having instructions stored thereon, which when executed by the one or more processors cause the one or more processors to perform operations for hybrid consensus in a blockchain network, the operations comprising: providing a security level and a data criticality value for one or more transactions to be recorded to a blockchain belonging to a blockchain network; selecting a consensus protocol, the consensus protocol having a weight corresponding to the security level and the data criticality value of the one or more transactions, the weight of the consensus protocol representing a threshold number of nodes that must approve the one or more transactions for recording the one or more transactions to the blockchain, the consensus protocol being selected from a set of consensus protocols, and the consensus protocol being selected by a machine learning (ML) model that receives the security level and the data criticality value as input; Define a set of consensus nodes, the set of consensus nodes is selected from one of the following: Supernode pool, or Weak node pools; and In response to the set of consensus nodes executing the consensus protocol, the one or more transactions are recorded to the blockchain.
12. The system according to claim 11, Wherein the consensus protocol is executed based on the weights.
13. The system of claim 11, wherein the set of consensus protocols comprises two or more consensus protocols having different computational requirements.
14. The system of claim 11, wherein the supernode comprises more computing resources than the weak node.
15. The system of claim 11, wherein the security level and the data criticality value are provided as outputs of the machine learning (ML) model, the machine learning model receiving as input input data representing the one or more transactions.
