Chaincode recommendation based on existing chaincodes
By constructing a smart contract relationship graph and using graph mining and machine learning algorithms to dynamically recommend and update smart contracts, the problem of fixed business rules of smart contracts in the blockchain network is solved, and the flexibility and adaptability of the blockchain network are enhanced. .
Patent Information
- Application Number
- CN202080068135.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-06
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2040-10-06
AI Technical Summary
The fixed business rules of existing smart contracts in the blockchain network cannot adapt, resulting in lost opportunities when members have trading opportunities but lack effective smart contracts, and smart contracts cannot be dynamically changed, limiting the flexibility and adaptability of the blockchain network. sex.
By building a smart contract relationship graph, using graph mining and machine learning algorithms to identify patterns, dynamically recommend new smart contracts, allow blockchain peers to negotiate and approve new smart contracts, and achieve dynamic updating and expansion of smart contracts.
It realizes dynamic changes in the rules of the blockchain network, supports changes that are effective for all parties, enhances the flexibility and adaptability of the blockchain network, and can dynamically expand and change business opportunities when there are transaction opportunities.
Smart Images

Figure CN114450708B_ABST
Abstract
Description
Technical Field
[0001] The present application generally relates to storing data on a blockchain, and more particularly, to an apparatus capable of evaluating existing smart contracts between peers in a blockchain network and recommending new smart contracts based on the existing smart contracts. Background Art
[0002] A centralized database stores and maintains data in a single database at one location (e.g., a database server). The location is typically a central computer, such as a desktop central processing unit (CPU), a server CPU, or a mainframe computer. Information stored on a centralized database is typically accessible from multiple different points. Multiple users or client workstations can work on a centralized database simultaneously, for example, based on a client / server configuration. A centralized database is easy to manage, maintain, and control, especially for security purposes, due to its single location. Within a centralized database, data redundancy is minimized because a single storage place for all data also implies that a given data set has only one master record.
[0003] However, centralized databases have significant disadvantages. For example, if fault tolerance is not considered, centralized databases have a single point of failure. Therefore, if a hardware failure (e.g., hardware, firmware, and / or software failure) occurs, all data within the database is lost and work for all users is interrupted. In addition, centralized databases are highly dependent on network connectivity. As a result, the slower the connection, the amount of time required for each database access increases. Another disadvantage is that bottlenecks occur due to the single location when the centralized database experiences high traffic. In addition, centralized databases provide limited access to data because the database only maintains one copy of the data.
[0004] Organizations have recently turned to blockchain as a means of securely storing data that is not restricted by a central entity and can be accessed from multiple points. In order to enforce requirements between members of the blockchain without a central authority, smart contracts (also referred to as chain codes in this article) are pre-developed and negotiated and executed within the blockchain network during transactions. Smart contracts are visible to members and ensure that all parties to the transaction fulfill their obligations. Typically, smart contracts include business rules for blockchain participants, and they enter the blockchain when they are initialized. The rules in smart contracts are "hard-coded" so that they do not change over time. While this increases security, it also prevents adaptation within the blockchain network, resulting in lost opportunities when members have trading opportunities but do not have a valid smart contract to make a ruling. Therefore, a solution that overcomes these shortcomings and limitations is needed. Summary of the invention
[0005] One example embodiment provides an apparatus comprising: a memory configured to store chaincode relationships present in a blockchain peer group within a blockchain network; a processor configured to identify a new chaincode to be implemented for one or more blockchain peers in the blockchain peer group of the blockchain network based on the existing chaincode relationships; and a network interface configured to send a message with a recommendation to implement the new chaincode to the one or more blockchain peers.
[0006] Preferably, the present invention provides an apparatus, wherein the memory is configured to store an identifier of an existing chain code as a first set of nodes on a graph, and an identifier of each blockchain peer in a blockchain peer group as a second set of nodes on the graph, and the processor is configured to connect the first set of nodes corresponding to the existing chain code and the second set of nodes corresponding to the blockchain peers with edges based on the existing chain code relationship.
[0007] Preferably, the present invention provides an apparatus wherein the processor is configured to identify new chaincodes to be implemented based on chaincode patterns mined from chaincode relationships present in a graph.
[0008] Preferably, the present invention provides an apparatus, wherein the processor is further configured to predict, via one or more machine learning algorithms, a set of attributes to be included in the new chaincode based on attributes included in existing chaincode relationships.
[0009] Preferably, the present invention provides an apparatus wherein the new chaincode comprises changes to one or more properties of an established chaincode relationship between two blockchain peers.
[0010] Preferably, the present invention provides an apparatus wherein the new chaincode comprises a new chaincode relationship between two or more blockchain peers that do not have a chaincode relationship.
[0011] Preferably, the present invention provides an apparatus wherein the processor is further configured to receive approval to implement the new chaincode from one or more blockchain peers, and in response, activate the new chaincode within the blockchain network.
[0012] Preferably, the present invention provides an apparatus, wherein the processor is further configured to receive a rejection of implementing the new chaincode from one or more blockchain peers, and in response, store information about the rejection of the new chaincode for future prediction.
[0013] Preferably, the present invention provides an apparatus, wherein the processor is further configured to receive a modification to one or more attributes of the new chaincode and activate the modified new chaincode within the blockchain network.
[0014] From a second aspect, the present invention provides a method, comprising: storing existing chain code relationships of a blockchain peer group within a blockchain network; identifying a new chain code to be implemented for one or more blockchain peers in the blockchain peer group of the blockchain network based on the existing chain code relationships in the blockchain peer group; and sending a message with a suggestion to implement the new chain code to the one or more blockchain peers.
[0015] Preferably, the present invention provides a method, wherein the storing includes storing an identifier of each existing chain code as a first node set on a graph, storing an identifier of each blockchain peer in a blockchain peer group as a second node set on the graph, and connecting the first node set corresponding to the existing chain code and the second node set corresponding to the blockchain peer with an edge based on the existing chain code relationship.
[0016] Preferably, the present invention provides a method wherein the identifying comprises identifying new chaincodes to be implemented based on chaincode patterns mined from existing chaincode relationships within a graph.
[0017] Preferably, the present invention provides a method wherein the identifying further comprises predicting, via one or more machine learning algorithms, a set of attributes to be included in the new chaincode based on attributes included in existing chaincode relationships.
[0018] Preferably, the present invention provides a method wherein the new chaincode comprises a change in one or more properties of an existing chaincode relationship between two blockchain peers.
[0019] Preferably, the present invention provides a method wherein the new chaincode comprises a new chaincode relationship between two or more blockchain peers that do not have an existing chaincode relationship.
[0020] Preferably, the present invention provides a method further comprising receiving approval from one or more blockchain peers to implement the new chaincode, and in response, activating the new chaincode within the blockchain network.
[0021] Preferably, the present invention provides a method further comprising receiving a rejection to implement the new chaincode from one or more blockchain peers, and in response, storing information about the rejection to implement the new chaincode for future prediction.
[0022] Preferably, the present invention provides a method, which further includes receiving a modification to the new chaincode, and activating the modified new chaincode within the blockchain network.
[0023] From a third aspect, the present invention provides a non-transitory computer-readable medium comprising instructions, which when read by a processor causes the processor to perform a method, the method comprising: storing existing chain code relationships of a blockchain peer group within a blockchain network; identifying a new chain code to be implemented for one or more blockchain peers in the blockchain peer group of the blockchain network based on the existing chain code relationships between the blockchain peer groups; and sending a message with a suggestion to implement the new chain code to the one or more blockchain peers.
[0024] Preferably, the present invention provides a non-transitory computer-readable medium, wherein the identifying further comprises predicting a set of attributes included in the new chaincode based on attributes included in existing chaincode relationships via one or more of machine learning and artificial intelligence. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 is a diagram illustrating a computing environment for recommending a new chaincode according to an example embodiment.
[0026] Figure 2A is a diagram illustrating a blockchain architecture configuration according to an example embodiment.
[0027] Figure 2B is a diagram illustrating a blockchain transaction flow according to various example embodiments.
[0028] Figure 3A is a diagram illustrating a permissioned blockchain network according to example embodiments.
[0029] Figure 3B is a diagram illustrating another permissioned blockchain network according to example embodiments.
[0030] Figure 3C is a diagram illustrating a permissionless blockchain network according to example embodiments.
[0031] Figure 4A is a diagram illustrating a process of proposing a new chaincode to blockchain peers according to an example embodiment.
[0032] Figure 4B is a diagram illustrating a graph of existing chain code relationships according to an example embodiment.
[0033] Figure 4C is a diagram illustrating a new proposed chaincode based on an existing chaincode according to an example embodiment.
[0034] Figure 5 is a diagram illustrating a method of proposing a new chaincode to peers of a blockchain network according to an example embodiment.
[0035] Fig. 6Ais a diagram illustrating an example system configured to perform one or more operations described herein according to an example embodiment.
[0036] Figure 6B is a diagram illustrating another example system configured to perform one or more operations described herein according to an example embodiment.
[0037] Figure 6C is a diagram illustrating another example system configured to utilize smart contracts according to example embodiments.
[0038] Fig.6D is a diagram illustrating yet another example system configured to utilize blockchain according to example embodiments.
[0039] Fig. 7A is a diagram illustrating a process in which a new block is added to a distributed ledger according to an example embodiment.
[0040] Figure 7B is a diagram illustrating the contents of a new data block according to an example embodiment.
[0041] Figure 7C is a diagram illustrating a blockchain for digital content according to example embodiments.
[0042] Fig.7D is a diagram illustrating a block structure that may represent a block in a blockchain according to example embodiments.
[0043] Fig. 8A is a diagram illustrating an example blockchain storing machine learning (artificial intelligence) data according to example embodiments.
[0044] Figure 8B is a diagram illustrating an example quantum-secure blockchain according to an example embodiment.
[0045] Fig. 9 is a diagram illustrating an example system that supports one or more of the example embodiments. DETAILED DESCRIPTION
[0046] It is readily understood that the components of the present invention, as generally described and illustrated in the figures herein, may be arranged and designed in a variety of different configurations. Therefore, the following detailed description of embodiments of at least one of the methods, devices, non-transitory computer-readable media, and systems as represented in the figures is not intended to limit the scope of application as claimed, but is merely representative of selected embodiments.
[0047] In one or more embodiments, the features, structures or characteristics described in this specification may be combined or removed in any suitable manner. For example, throughout the specification, the use of the phrases "exemplary embodiments", "some embodiments" or other similar language refers to the fact that a specific feature, structure or characteristic described in conjunction with the embodiment may be included in at least one embodiment. Therefore, the phrases "exemplary embodiments", "in some embodiments", "in other embodiments" or other similar language appearing throughout the specification do not necessarily all refer to the same set of embodiments, and the described features, structures or characteristics may be combined or removed in any suitable manner in one or more embodiments. In addition, in the figure, any connection between elements may allow unidirectional and / or bidirectional communication, even if the depicted connection is a unidirectional or bidirectional arrow. Moreover, any device depicted in the accompanying drawings may be a different device. For example, if a mobile device is shown as sending information, a wired device may also be used to send information.
[0048] In addition, although the term "message" may have been used in the description of the embodiment, the application can be applied to many types of networks and data. In addition, although certain types of connections, messages and signaling can be described in exemplary embodiments, the application is not limited to certain types of connections, messages and signaling.
[0049] Example embodiments provide methods, systems, components, non-transitory computer-readable media, devices, and / or networks that can build and mine a graph of chaincode relationships among blockchain peers and make recommendations for new chaincode relationships among one or more blockchain peers.
[0050] In one embodiment, the application utilizes a decentralized database (such as a blockchain) as a distributed storage system, which includes multiple nodes that communicate with each other. The decentralized database includes an append-only, immutable data structure, similar to a distributed ledger that can maintain records between mutually untrusted parties. Untrusted parties are referred to herein as peers or peer nodes. Each peer maintains a copy of the database record, and no single peer can modify the database record without consensus between distributed peers. For example, peers can execute a consensus protocol to verify blockchain storage transactions, group storage transactions into blocks, and build a hash chain on the blocks. The process forms an account book by sorting storage transactions as needed to maintain consistency. In various embodiments, a licensed blockchain and / or a permissionless blockchain can be used. In a public or permissionless blockchain, anyone can participate without a specific identity. Public blockchains can involve native cryptocurrencies and use consensus based on various protocols such as proof of work (PoW). On the other hand, a licensed blockchain database provides secure interactions between groups of entities that share a common goal but do not fully trust each other, such as enterprises that exchange funds, goods, information, etc.
[0051] Applications can utilize blockchains that operate arbitrary, programmable logic that is customized as a decentralized storage solution and is called a "smart contract" or "chaincode". In some cases, there may be specialized chaincodes for management functions and parameters, which are called system chaincodes. Applications can also utilize smart contracts as trusted distributed applications that take advantage of the tamper-proof nature of the blockchain database and the underlying agreement between nodes, which is called endorsement or endorsement policy. Blockchain transactions associated with the application can be "endorsed" before being submitted to the blockchain, while unendorsed transactions are ignored. The endorsement policy allows the chaincode to specify the endorsers of the transaction in the form of a set of peer nodes required for endorsement. When the client sends the transaction to the peers specified in the endorsement policy, the transaction is executed to verify the transaction. After verification, the transaction enters the sorting phase, in which a consensus protocol is used to produce an ordered sequence of endorsed transactions grouped into blocks.
[0052] Applications can utilize nodes that are communication entities of blockchain systems. A "node" can perform a logical function, meaning that multiple nodes of different types can run on the same physical server. Nodes are grouped in trust domains and are associated with logical entities that control them in various ways. Nodes can include different types, such as clients or submitting client nodes that submit transaction calls to endorsers (e.g., peers) and broadcast transaction proposals to ordering services (e.g., ordering nodes). Another type of node is a peer node, which can receive transactions submitted by clients, deliver (commit) transactions, and maintain the state and copy of the ledger of blockchain transactions. Peers can also have the role of endorsers, although this is not required. Ordering service nodes or orderers are nodes that run communication services for all nodes, and when delivering transactions and modifying the blockchain world state, they implement delivery guarantees, such as broadcasting to each peer node in the system, which is another name for the initial blockchain transaction, which typically includes control and setup information.
[0053] Applications can utilize a ledger, which is an ordered, tamper-proof record of all state transitions of a blockchain. State transitions can result from chaincode invocations (i.e., transactions) submitted by parties (e.g., client nodes, ordering nodes, endorser nodes, peer nodes, etc.). Each party (such as a peer node) can maintain a copy of the ledger. Transactions can result in a set of asset key-value pairs being delivered to the ledger as one or more operands, such as create, update, delete, etc. The ledger includes a blockchain (also referred to as a chain) for storing unchangeable ordered records in blocks. The ledger also includes a state database that maintains the current state of the blockchain.
[0054] Applications can utilize a chain as a transaction log that is structured as hash-linked blocks, and each block contains a sequence of N transactions, where N is equal to or greater than one. The block header includes a hash of the block transactions, as well as a hash of the header of the previous block. In this way, all transactions on the ledger can be sorted and cryptographically linked together. Therefore, it is impossible to tamper with the ledger data without breaking the hash link. The hash of the most recently added blockchain block represents every transaction on the chain that came before it, so that all peer nodes can be ensured to be in a consistent and trusted state. The chain can be stored on the peer node file system (i.e., local, attached storage, cloud, etc.), thereby efficiently supporting the append-only nature of blockchain workloads.
[0055] The current state of the immutable ledger represents the latest values of all keys included in the chain transaction log. Since the current state represents the latest key values known to the channel, it is sometimes called the world state. Chaincode invocations execute transactions against the current state data of the ledger. In order to make these chaincode interactions efficient, the latest values of the keys can be stored in the state database. The state database can simply be an indexed view into the chain's transaction log, so it can be regenerated from the chain at any time. The state database can be automatically restored (or generated if necessary) when the peer node starts up and before the transaction is accepted.
[0056] In a blockchain network, a negotiation process occurs between blockchain participants (peers) to define the business rules for asset transactions. Once defined, business rules are usually hard-coded into smart contracts and cannot be changed to adapt to new opportunities. In addition, this opportunity loss becomes more serious when participants have a trading opportunity but lack a smart contract to manage such a transaction.
[0057] Example embodiments address this problem with a system that can dynamically propose new smart contracts (chaincodes) based on existing smart contract relationships and participant profiles to be curated and approved by such participants. Once peer nodes reach agreement on a new smart contract, the new smart contract can be published and participants can conduct transactions under the new smart contract.
[0058] The system can automatically suggest new smart contracts in the blockchain network based on patterns identified in the constructed transaction knowledge base. Patterns can be identified using graph mining, which can mine the graph of chaincode relationships to identify relationships and their attributes, and perform artificial intelligence techniques (e.g., machine learning) to identify patterns of attributes in existing smart contracts. Once the system suggests a smart contract containing new rules, it is submitted for approval by participants and can be published / activated after approval. For example, machine learning such as recurrent neural networks (RNNs) can be used to predict the smart contract to be suggested and the attributes of the suggested smart contract based on historical smart contracts between participants of the blockchain.
[0059] The system can model smart contract relationships within a blockchain network as nodes on a graph. For example, a first set of nodes can represent blockchain peers in the network, while a second set of nodes can represent different smart contracts therein. Edges can connect peers to smart contracts in which they participate. This graph structure can be mined by the system to identify patterns and make recommendations for new smart contracts. When the system recommends a new smart contract, the system recommends new edges on the graph between existing blockchain peers. In some embodiments, the system may be implemented in a blockchain peer such as an administrative peer. As another example, the system may be installed and run on each peer or group of peers in the blockchain network. The system can analyze data from blockchains and transactions and make recommendations for new smart contracts with new properties.
[0060] Example embodiments may recommend new smart contracts between blockchain peers already in the system, and also recommend properties of the new smart contract. Examples of new smart contracts include recommendations between supermarkets and manufacturers, hospitals and laboratories, exporters and logistics companies, etc. It should be understood that these are merely examples, and smart contracts may be recommended for different types of entities, including any chain, in which new business rules (smart contracts) may be identified and recommended based on past transactions and needs (here, artificial intelligence may also play a role in recommendations). For example, when the system identifies that a transaction between a hospital and a laboratory that is located in the network but not connected would bring commercial benefits (e.g., due to price, term, volume of service delivery, etc.), the hospital and laboratory may receive a recommendation to start a new smart contract.
[0061] The properties of the newly proposed smart contract can be determined by artificial intelligence (AI) and / or machine learning, which can predict the type of properties / contract guidelines that should be recommended based on various factors including current smart contract properties, market data, geographic data, changes in entities, etc. For example, a recursive neural network (RNN) is an example of a type of artificial intelligence that can be used to suggest smart contracts. RNN is a class of artificial neural networks in which the connections between nodes form a directed graph along a time series. This allows it to exhibit time-dynamic behavior. Unlike a feedforward neural network, RNN can use its internal state (memory) to process the input sequence. RNN can be used to process existing smart contracts and their properties to identify the proposed smart contract and its properties.
[0062] For example, the system can monitor the transactions (peer relationships) of the network, their contracts and properties. Peers and smart contracts can be graphed and represented by edges between them. The graph can be mined for common behavior patterns. In addition, machine learning and / or artificial intelligence can be used to make suggestions for modifying existing smart contract relationships and initiating new smart contract relationships. Suggestions can be based on properties such as price, delivery date, SLA, fines, etc. In some embodiments, new smart contracts are not allowed to survive until the peers involved have mutually agreed.
[0063] Some benefits of example embodiments include dynamic changes to the rules of a blockchain network after the blockchain network is launched. The system can identify new chaincode relationships that may be beneficial to one or more members of the blockchain and suggest new chaincodes (smart contracts) that manage the new chaincode relationships. Thus, business opportunities can be dynamically expanded / changed within the blockchain to support changes that can be effective for all parties.
[0064] Figure 1 A blockchain network 100 is shown including a plurality of blockchain peers 110, 120, 130, 140, 150, and 160. In this example, the blockchain network is a permissioned blockchain, where the blockchain is private. Each of the peers 110-160 can store a replica / copy of the blockchain ledger including the blockchain and the state database. The peers 110-160 can be connected to each other via a network such as the Internet, a private network, or the like. Although Figure 1 Not shown, but it should be understood that the blockchain network 100 may include other entities, such as one or more ordering services, clients, off-chain storage entities, etc. In this example, any of the peers 110-160 may act as a recommendation peer for recommending new smart contracts. For purposes of example, blockchain peer 120 is an administrative peer in which a recommendation system according to various embodiments is installed and executed.
[0065] In this example, blockchain peers 110-160 can transact with each other in any number of fields and industries such as supply chain, cold chain, finance, healthcare, distribution, manufacturing, etc. Individual peers can pre-sign contracts to create different smart contracts. These smart contracts can be stored in blockchain ledgers, such as in GESSIS blocks, etc. When new peers join the network, they can join one or more existing smart contracts.
[0066] According to various embodiments, the recommending peers (i.e., blockchain peers) 120 may also recommend new smart contracts (chain codes) to the peers 110-160 based on existing smart contract relationships, business profiles, etc. For example, the blockchain peers 120 may maintain a smart contract relationship graph 122 that stores existing smart contract relationships between the blockchain peers 110-160. An example of the smart contract relationship graph 122 is shown in FIG. Figure 4B As shown in the example of , but the embodiment is not limited thereto. Any of the peers 110-160 can be used as a recommended peer. Moreover, more than one peer can be used as a recommended peer. As another example, a trusted off-chain entity, client, etc. can make a smart contract recommendation when they access blockchain data.
[0067] exist Figure 1 In the example of , a recommending blockchain peer 120 identifies a new smart contract that can be implemented between organizations corresponding to peers 110 and 150, and sends a message to each of peers 110 and 150 proposing the new smart contract. If both peers 110 and 150 approve the new smart contract, the recommending peer 120 may publish such a smart contract and activate it to the blockchain network 100. As another example, if one of peers 110 and / or 150 rejects the recommended smart contract, a reason for the rejection may be provided from the corresponding peer and stored by the recommending peer 120 to enhance future recommendations. As another example, peers 110 and 150 may modify one or more of the terms / criteria of the new proposed smart contract and reach an agreement after negotiation. Once the agreement is in place, the new smart contract may be published / initiated in real time. In addition, existing evidence of the new smart contract and / or graphics used to propose the new smart contract may be stored on the blockchain, such as Figure 7B as shown in the example.
[0068] Figure 2A A blockchain architecture configuration 200 is shown according to an example embodiment. Figure 2A, the blockchain architecture 200 may include certain blockchain elements, for example, a set of blockchain nodes 202. The blockchain nodes 202 may include one or more nodes 204 and 210 (these four nodes are described by way of example only). These nodes participate in multiple activities, such as blockchain transaction addition and verification processes (consistency). One or more of the blockchain nodes 204 and 210 may endorse transactions based on endorsement policies and may provide ordering services for all blockchain nodes in the architecture 200. The blockchain nodes may initiate blockchain authentication and seek to write to the blockchain immutable ledger stored in the blockchain layer 216, a copy of which may also be stored on the underlying physical infrastructure 214. The blockchain configuration may include one or more applications 224, which are linked to an application programming interface (API) 222 to access and execute stored program / application code 220 (e.g., chain code, smart contracts, etc.), which may be created according to the customized configuration sought by the participants and may maintain its own state, control its own assets, and receive external information. This may be deployed as a transaction and installed on all blockchain nodes 204 and 210 via attachment to the distributed ledger.
[0069] The blockchain foundation or platform 212 may include layers of blockchain data, services (e.g., cryptographic trust services, virtual execution environments, etc.), and support physical computer infrastructure that can be used to receive and store new transactions and provide access to auditors attempting to access data entries. The blockchain layer 216 may expose an interface that provides access to the virtual execution environment necessary to process program code and participate in the physical infrastructure 214. Cryptographic trust services 218 may be used to verify transactions such as asset exchange transactions and keep information private.
[0070] Figure 2A The blockchain architecture configuration of the blockchain platform 212 can process and execute program / application code 220 via one or more interfaces exposed by the blockchain platform 212 and the services provided. The code 220 can control blockchain assets. For example, the code 220 can store and transmit data and can be executed by the nodes 204-210 in the form of a smart contract, and the associated chain code or other code elements with conditions are subject to its execution. As a non-limiting example, a smart contract can be created to perform reminders, updates, and / or other notifications of changes, updates, etc. The smart contract itself can be used to identify the rules associated with the authorization and access requirements and use of the ledger. For example, read data 226 can be processed by one or more processing entities (e.g., virtual machines) included in the blockchain layer 216 to create a processing result to be written to the blockchain, and the processing result includes write data 228. The physical infrastructure 214 can be used to retrieve any data or information described herein.
[0071] Smart contracts can be created via high-level applications and programming languages, and then written to blocks in a blockchain. A smart contract can include executable code that is registered, stored, and / or replicated to a blockchain (e.g., a distributed network of blockchain peers). A transaction is the execution of smart contract code, which can be executed in response to a condition associated with the smart contract being satisfied. The execution of a smart contract can trigger (one or more) trusted modifications to the state of a digital blockchain ledger. The (one or more) modifications to the blockchain ledger caused by the execution of a smart contract can be automatically replicated throughout the distributed network of blockchain peers through one or more consensus protocols.
[0072] Smart contracts can write data to the blockchain in the format of key-value pairs. In addition, smart contract code can read values stored in the blockchain and use them in application operations. Smart contract code can write the output of various logical operations to the blockchain. The code can be used to create temporary data structures in virtual machines or other computing platforms. The data written to the blockchain can be public and / or can be encrypted and maintained as private. Temporary data used / generated by the smart contract is kept in memory by the supplied execution environment and then deleted once the data required by the blockchain is identified.
[0073] Chaincodes may utilize additional features including code interpretation of smart contracts with additional features. As described herein, chaincode may be program code deployed on a computing network where it is executed and validated by chain validators together during a consensus process. The chaincode receives a hash and retrieves from a blockchain a hash associated with a data template created with the aid of a previously stored feature extractor. If the hash of the hashed identifier matches the hash created from the stored identifier template data, the chaincode sends an authorization key to the requested service. The chaincode may write data associated with cryptographic details to the blockchain.
[0074] Figure 2B An example of a blockchain transaction flow 250 between nodes of a blockchain according to an example embodiment is shown. Figure 2B, the transaction flow may include a transaction proposal 291 sent by the application client node 260 to the peer node 281 as an endorser. The peer node 281 may verify the client signature and execute the chaincode function to initiate the transaction. The output may include the chaincode result, the key / value set version read in the chaincode (read set), and the key / value set written in the chaincode (write set). If approved, the proposal response 292 is sent back to the client node 260 along with the endorsement signature. The client node 260 assembles the endorsements into a transaction payload 293 and broadcasts it to the sorting node 284. The sorting node 284 then delivers the sorted transaction as a block to all peer nodes 281-283 on the channel. Before delivery to the blockchain, each peer node 281-283 can verify the transaction. For example, the peer can check the endorsement policy to ensure that the correct assignment of the specified peer has signed the result and the signature has been authenticated against the transaction payload 293.
[0075] Reference again Figure 2B , the client node 260 initiates a transaction 291 by constructing a request and sending it to the peer node 281 as an endorser. The client node 260 may include an application that utilizes a supporting software development kit (SDK) (which utilizes an available API) to generate a transaction proposal. The proposal is a request to invoke a chaincode function so that data can be read and / or written to the ledger (i.e., write a new key-value pair for an asset). The SDK can be used as a shim to encapsulate the transaction proposal into an appropriate structured format (e.g., protocol buffers over remote procedure calls (RPCs)) and use the client's cryptographic certificate to generate a unique signature for the transaction proposal.
[0076] In response, peer node 281 can verify that (a) the transaction proposal is well formed, (b) the transaction has not been submitted in the past (replay attack protection), (c) the signature is valid, and (d) the submitter (in this example, client node 260) is properly authorized to perform the proposed operation on the channel. Peer node 281 can input the transaction proposal as an argument to the invoked chaincode function. The chaincode is then executed against the current state database to produce a transaction result including a response value, a read set, and a write set. However, the ledger is not updated at this time. At 292, the value set is passed back to the SDK of client node 260 along with the signature of peer node 281 as a proposal response 292, which parses the payload to be consumed by the application.
[0077] In response, the application of the client node 260 checks / verifies the endorsed peer signature and compares the proposal response to determine whether the proposal response is the same. If the chain code only queries the ledger, the application will check the query response and generally not submit the transaction to the sorting node 284. If the client application wants to submit the transaction to the sorting node 284 to update the ledger, the application determines whether the specified endorsement policy has been met before submission (i.e., whether all peer nodes required for the transaction have endorsed the transaction). Here, the client may include only one of the multiple parties to the transaction. In this case, each client can have their own endorsement node, and each endorsement node will need to endorse the transaction. The architecture enables the endorsement policy to be enforced by the peers and supported in the delivery confirmation phase even if the application chooses not to check the response or otherwise forward the unprotected transaction.
[0078] After successful checks, in step 293, the client node 260 assembles the endorsements into a transaction and broadcasts the transaction proposal and response to the ordering node 284 within the transaction message. The transaction may contain a read / write set, an endorsing peer signature, and a channel ID. The ordering node 284 does not need to check the entire contents of the transaction in order to perform its operations, but the ordering node 284 can simply receive transactions from all channels in the network, sort them chronologically by channel, and create a block of transactions by channel.
[0079] The block of transactions is delivered from the ordering node 284 to all peer nodes 281-283 on the channel. The transactions 294 within the block are verified to ensure that any endorsement policies are satisfied and that the state of the ledger for the read set variables has not changed since the read set was generated by the transaction execution. The transactions in the block are marked as valid or invalid. In addition, at step 295, each peer node 281-283 appends the block to the chain of the channel, and for each valid transaction, the write set is delivered to the current state database. Events are emitted to notify the client application that the transaction (call) has been immutably attached to the chain, and whether the transaction is valid or invalid.
[0080] Figure 3AAn example of a permissioned blockchain network 300 is shown, featuring a distributed, decentralized peer-to-peer architecture. In this example, a blockchain user 302 can initiate a transaction to a permissioned blockchain 304. In this example, the transaction can be a deployment, call, or query, and can be issued through a client-side application utilizing an SDK, directly through an API, etc. The network can provide access to regulators 306 such as auditors. The blockchain network operator 308 manages member permissions, such as registering regulators 306 as "auditors" and blockchain users 302 as "clients." Auditors can be restricted to querying only the ledger, while clients can be authorized to deploy, call, and query certain types of chaincodes.
[0081] Blockchain developers 310 can write chaincodes and client-side applications. Blockchain developers 310 can deploy chaincodes directly to the network through an interface. In order to include credentials from traditional data sources 312 in the chaincode, developers 310 can use out-of-band connections to access the data. In this example, blockchain users 302 connect to the permissioned blockchain 304 through peer nodes 314. Before conducting any transactions, peer nodes 314 retrieve the user's registration and transaction certificates from the certificate authority 316 that manages user roles and permissions. In some cases, blockchain users must have these digital certificates in order to trade on the permissioned blockchain 304. At the same time, users trying to utilize chaincodes may need to verify their credentials on traditional data sources 312. In order to confirm the user's authorization, the chaincode can use an out-of-band connection to the data through a traditional processing platform 318.
[0082] Figure 3B Another example of a permissioned blockchain network 320 is shown, featuring a distributed, decentralized peer-to-peer architecture. In this example, a blockchain user 322 can submit transactions to a permissioned blockchain 324. In this example, the transaction can be a deployment, call, or query, and can be issued through a client-side application utilizing an SDK, directly through an API, etc. The network can provide access to regulators 326 such as auditors. The blockchain network operator 328 manages member permissions, such as registering regulators 326 as "auditors" and registering blockchain users 322 as "clients." Auditors can be restricted to querying only the ledger, while clients can be authorized to deploy, call, and query certain types of chaincodes.
[0083] Blockchain developers 330 write chaincodes and client applications. Blockchain developers 330 can deploy chaincodes directly to the network through interfaces. In order to include credentials from traditional data sources 332 in chaincodes, developers 330 can use out-of-band connections to access data. In this example, blockchain users 322 connect to the network through peer nodes 334. Before conducting any transactions, peer nodes 334 retrieve the user's registration and transaction certificates from certificate authorities 336. In some cases, blockchain users must have these digital certificates in order to trade on the permissioned blockchain 324. At the same time, users trying to use chaincodes need to verify their certificates on traditional data sources 332. To confirm the user's authorization, the chaincode can use an out-of-band connection to the data through a traditional processing platform 338.
[0084] In some embodiments, the blockchain herein may be a permissionless blockchain. In contrast to a permissioned blockchain that requires permission to join, anyone can join a permissionless blockchain. For example, to join a permissionless blockchain, a user can create a personal address and begin interacting with the network by submitting transactions and thereby adding entries to the ledger. Additionally, all parties may choose to run nodes on the system and employ a mining protocol to help validate transactions.
[0085] Figure 3C A process 350 of a transaction processed by a permissionless blockchain 352 including a plurality of nodes 354 is shown. A sender 356 desires to send a payment or some other form of value (e.g., a deed, medical record, contract, goods, services, or any other asset that can be encapsulated in a digital record) to a receiver 358 via the permissionless blockchain 352. In one embodiment, each of the sender 356 and the receiver 358 may have a digital wallet (associated with the permissionless blockchain 352) that provides user interface controls and display of transaction parameters. In response, the transaction is broadcast to the nodes 354 throughout the permissionless blockchain 352. Depending on the network parameters of the permissionless blockchain 352, the nodes verify 360 the transaction based on rules established by the creator of the permissionless blockchain 352 (which may be predefined or dynamically assigned). For example, this may include verifying the identities of the parties involved, etc. The transaction may be verified immediately, or it may be placed in a queue with other transactions, and the nodes 354 determine whether the transaction is valid based on the network rule set.
[0086] In structure 362, valid transactions are formed into blocks and sealed with locks (hashes). This process can be performed by a node in mining node 354. The mining node can utilize additional software dedicated to mining and creating blocks of the permissionless blockchain 352. Each block can be identified by a hash (e.g., a 256-bit number, etc.) created using an algorithm agreed upon by the network. Each block can include a header, a pointer or reference to the hash of the header of the previous block in the chain, and a valid transaction group. The reference to the previous block hash is associated with the creation of a secure independent blockchain.
[0087] Before blocks can be added to the blockchain, they must be validated. Validation of the permissionless blockchain 352 may include proof of work (PoW), which is the solution to a puzzle derived from the header of the block. Figure 3C Not shown in the example, but another process for validating blocks is proof-of-stake. Unlike proof-of-work, where an algorithm rewards miners for solving a mathematical problem, with proof-of-stake, the creators of new blocks are chosen in a deterministic manner based on their wealth (also defined as "stake"). Similar proofs are then performed by the selected / chosen nodes.
[0088] Through mining 364, nodes attempt to solve the block by incrementally changing a variable until the solution meets the network-wide goal. This creates a PoW, thereby ensuring the correct answer. In other words, potential solutions must prove that computing resources are exhausted in solving the problem. In some types of permissionless blockchains, miners can be rewarded with value (e.g., coins, etc.) for correctly mining blocks.
[0089] Here, in addition to the formation chain of blocks, the PoW process makes the modification of the blockchain extremely difficult, because an attacker must modify all subsequent blocks in order for a block to be received. In addition, as new blocks are mined, the difficulty of modifying blocks increases, and the number of subsequent blocks increases. Through distribution 366, successfully verified blocks are distributed through the permissionless blockchain 352, and all nodes 354 add the blocks to the majority chain, which is the auditable ledger of the permissionless blockchain 352. In addition, the value in the transaction submitted by the sender 356 is deposited or otherwise transferred to the digital wallet of the receiver 358.
[0090] Example embodiments introduce the concept of mapping blockchain peers to smart contracts using a graph structure. In addition, the system can make recommendations about new smart contracts between blockchain peers based on patterns mined from the graph structure. As described herein, a graph is a network of nodes and the relationships (edges) between them, and can be used to model the behavior of individuals or objects interacting with each other in a blockchain environment.
[0091] Figure 4A 4 shows a process 400A for proposing a new chaincode to a blockchain peer, according to an example embodiment. Figure 4B shows a diagram 400B of a chaincode representing peer and existing chaincode relationships according to an example embodiment, and Figure 4C A diagram 400C is shown with a new suggested chaincode 450 based on an existing chaincode, according to an example embodiment.
[0092] exist Figure 4A-4C In the example of , each organization participating in the blockchain network has its own corresponding peer in the blockchain and obtains services to execute business processes. Chaincode (also known as smart contracts) is a business rule written in a programming language. The chaincode can run automatically without human intervention or third-party supervision. The blockchain ledger is an ordered and inviolable record of all transactions submitted. It consists of a blockchain and a state database. In addition, the system that executes process 400A and generates graphs 400B and 400C can be a peer node, a client, a trusted off-chain entity, etc. The system can be called a recommendation system that recommends new smart contracts in an adaptive manner based on the dynamic needs and changes of participants in the blockchain network. Systems and methods for matching a company's service contracts using a knowledge base and artificial intelligence.
[0093] refer to Figure 4A In 402, the system creates a graph 400B ( Figure 4B ), graph 400B maps existing entities and smart contracts that can be retrieved from storage. In this step, the system can map smart contract input and output parameters to public ontology concepts. In this example, graph 400B includes a first set of nodes 431 representing blockchain peers 430 included in the blockchain network and a second set of nodes 441 representing different chain codes currently present in the blockchain network. In addition, edges 432 connect blockchain peers to the smart contracts in which they participate. In addition, Figure 4B An example of properties 442 of smart contract A is shown in FIG. Properties may include standards to be managed by the smart contract, including rules, constraints and values of constraints, delivery requirements, output requirements, agreed SLAs, and the like.
[0094] For example, graph 400B may be stored in a knowledge database 418 that stores graphs mapping entities and smart contracts and feedback from entities that do not accept system suggestions for new smart contracts. Note that this last information is used in future recommendations to avoid suggesting smart contracts that have been disapproved by one or more entities associated with the recommended smart contract.
[0095] Reference again Figure 4A, at 404, the system can mine the graph 400B to find common smart contract properties. In this example, the system can find similar rules and assets that exist in multiple smart contracts. Examples of algorithms used in this step include support vector machines, which are supervised learning models with associated learning algorithms that analyze data for classification and regression analysis. An example of a new smart contract 450 identified from existing smart contract relationships is shown in Figure 4C The curve graph 400C is shown.
[0096] exist Figure 4C In the example of , a new smart contract 450 connects two peers / organizations (i.e., peers 3 and 7) that were not previously connected to each other. The new smart contract 450 can be identified / determined based on the existing smart contracts between peers 3 and 2 and between peers 7 and 9. In addition, the properties 452 of the new smart contract 450 can be determined based on a machine learning model and / or artificial intelligence (such as an RNN), which learns based on existing smart contract relationships, profiles of participants, etc., and makes the suggested properties 452 for the new smart contract 450.
[0097] Reference again Figure 4A , in 406, the system can dynamically propose a new smart contract 450 to two or more organizations / peers (i.e., peers 3 and 7) in the blockchain network. For example, a message with a proposal to implement the new smart contract 450 can be sent from the managing peer to the peers involved in the new smart contract. It should be understood that the new smart contract can be a new relationship between two or more peers in the blockchain network that have not yet transacted with each other. As another example, the new smart contract can be a modification or new terms for an already existing smart contract relationship between two or more peers of the blockchain network.
[0098] In other words, based on existing smart contract properties, the system can suggest new smart contracts to already connected entities, and even to disconnected entities. Examples of algorithms used in this step include, but are not limited to, link prediction as common neighbors or Jaccard coefficient.
[0099] At 408, the system can determine whether approval has been received from each of the peers involved in the new smart contract 450. For example, a simple condition can be used to verify whether the proposal is approved by all entities related to the smart contract proposed by the system. This process can be done by the network's management board or automatically using consensus.
[0100] In response to receiving the approval in 408, the system can publish the new smart contract in 410 and store it in the smart contract repository 416 including active smart contracts, thereby activating the smart contract. In this step, all entities related to the new smart contract accept the terms present in the new smart contract (i.e., assets, rules, and entities involved), so the system can now publish the new smart contract.
[0101] However, in response to receiving a rejection from one of the parties in 408, the system can request feedback from the entity in 412. In the event that one or more entities do not approve the proposed smart contract, the system requests feedback so that similar proposals can be avoided in the future for the entities that did not approve the proposal. Additionally, the system can register the entity's reasons for the disapproval in 414. For example, the system can register the feedback and flag the disapproved proposal so that the system can avoid similar proposals in the future for the entities that did not approve the proposal.
[0102] Despite Figure 4A Not shown, one or more of the parties may also provide suggestions to make changes to the new smart contract 450. For example, one of the peer parties / organizations may request to change one or more attributes. If both parties agree to the modified proposed smart contract, then the smart contract is published and made active.
[0103] Figure 5 A method 500 of proposing a new chaincode to peers of a blockchain network is shown according to an example embodiment. Figure 5 In 510, the method may include storing existing chaincode relationships of a blockchain peer group within a blockchain network. The chaincode relationship may include properties of a smart contract running within the blockchain network. The properties may identify characteristics, values, conditions, constraints, etc. of the contract, which are enforced between contract parties, etc.
[0104] Chaincode relationships can be stored in a graph, where each blockchain peer is represented using a first set of nodes and each smart contract is represented using a second set of nodes. Edges can be used to connect nodes of blockchain peers to nodes of smart contracts to identify which peers participate in which smart contracts. These relationships represented within the graph can be mined (e.g., graph mining, structure mining, pattern mining, etc.) based on one or more predictive algorithms.
[0105] In some embodiments, storing may include storing an identifier of each existing chaincode as a first set of nodes on a graph, storing an identifier of each blockchain peer in the group of blockchain peers as a second set of nodes on the graph, and connecting the first set of nodes corresponding to the existing chaincodes and the second set of nodes corresponding to the blockchain peers with an edge based on the existing chaincode relationships.
[0106] At 520, the method may include predicting new chaincodes to be implemented for one or more blockchain peers in the blockchain peer group of the blockchain network based on existing chaincode relationships in the blockchain peer group. For example, a machine learning algorithm and / or artificial intelligence (e.g., RNN, etc.) may be performed based on the relationships between peers and smart contract properties to identify patterns, identify possible improvements, identify gaps, etc. The system may process the graph using a graph mining process. For example, graph mining may be performed using various software tools that analyze properties of the graph, predict how the structure and properties of the graph affect chaincode relationships, and develop new chaincodes that match patterns in the graph.
[0107] In some embodiments, the prediction may include predicting a set of attributes to be included in the new chaincode based on the attributes included in the existing chaincode relationship via one or more of machine learning and artificial intelligence. For example, artificial intelligence such as RNNs may be used to suggest smart contracts. RNNs may be trained based on historical smart contracts and attributes. In some embodiments, the new chaincode may include a change in one or more attributes of an existing chaincode relationship between two blockchain peers. In some embodiments, the new chaincode may include a new chaincode relationship between two or more blockchain peers that do not have an existing chaincode relationship.
[0108] At 530, the method may include transmitting a message with a proposal to implement the new chaincode to one or more blockchain peers. In some embodiments, the method may also include receiving an approval to implement the new chaincode from the one or more blockchain peers, and in response, activating the new chaincode within the blockchain network. As another example, the method may include receiving a rejection to implement the new chaincode from the one or more blockchain peers, and in response, storing information about the rejection of the new chaincode for future prediction. As another example, the method may include receiving a modification to the new chaincode, and activating the modified new chaincode within the blockchain network.
[0109] Fig. 6A An example system 600 is shown including a physical infrastructure 610 configured to perform various operations according to an example embodiment. Fig. 6A, the physical infrastructure 610 includes a module 612 and a module 614. The module 614 includes a blockchain 620 and a smart contract 630 (which may reside on the blockchain 620), which may perform any operation step 608 (in the module 612) included in any example embodiment. The step / operation 608 may include one or more embodiments described or depicted, and may represent output or written information written or read from one or more smart contracts 630 and / or blockchain 620. The physical infrastructure 610, the module 612, and the module 614 may include one or more computers, servers, processors, memories, and / or wireless communication devices. In addition, the module 612 and the module 614 may be the same module.
[0110] Figure 6B Another example system 640 is shown that is configured to perform various operations according to an example embodiment. Figure 6B , system 640 includes module 612 and module 614. Module 614 includes blockchain 620 and smart contract 630 (which may reside on blockchain 620), which may perform any operation step 608 (in module 612) included in any example embodiment. Step / operation 608 may include one or more embodiments described or depicted, and may represent output or written information written or read from one or more smart contracts 630 and / or blockchain 620. Physical infrastructure 610, module 612, and module 614 may include one or more computers, servers, processors, memories, and / or wireless communication devices. In addition, module 612 and module 614 may be the same module.
[0111] Figure 6C An example system configured to utilize a smart contract configuration between contracting parties and an intermediary server configured to enforce the terms of the smart contract on a blockchain according to an example embodiment are shown. Figure 6C , configuration 650 may represent a communication session, asset transfer session, or process or procedure driven by a smart contract 630 that explicitly identifies one or more user device entities 652 and / or 656. The execution, operation, and results of the smart contract execution may be managed by a server 654. The content of the smart contract 630 may need to be digitally signed by one or more of the user device entities 652 and 656 that are parties to the smart contract transaction. The results of the smart contract execution may be written to the blockchain 620 as a blockchain transaction. The smart contract 630 resides on the blockchain 620, which may reside on one or more computers, servers, processors, memories, and / or wireless communication devices.
[0112] Fig.6D A system 660 including a blockchain is shown according to an example embodiment. Fig.6DIn the example of , an application programming interface (API) gateway 662 provides a public interface for accessing blockchain logic (e.g., smart contracts 630 or other chaincodes) and data (e.g., distributed ledgers, etc.). In this example, the API gateway 662 is a public interface for executing transactions (calls, queries, etc.) on the blockchain by connecting one or more user device entities 652 and 656 to a blockchain peer (i.e., server 654). Here, server 654 is a blockchain network peer component that saves a copy of the world state and allows user device entities 652 and 656 to query the distributed ledger for data on the world state, as well as submit transactions to the blockchain network, where, according to the smart contract 630 and the endorsement policy, the endorsement peer will run the smart contract 630.
[0113] The above embodiments may be implemented in hardware, a computer program executed by a processor, firmware, or a combination thereof. The computer program may be contained on a computer-readable medium, such as a storage medium. For example, the computer program may reside in a random access memory ("RAM"), a flash memory, a read-only memory ("ROM"), an erasable programmable read-only memory ("EPROM"), an electrically erasable programmable read-only memory ("EEPROM"), a register, a hard disk, a removable disk, a compact disk read-only memory ("CD-ROM"), or any other form of storage medium known in the art.
[0114] An exemplary storage medium may be coupled to a processor such that the processor may read information from the storage medium and write information to the storage medium. In an alternative, the storage medium may be integrated into the processor. The processor and the storage medium may reside in an application specific integrated circuit ("ASIC"). In an alternative, the processor and the storage medium may reside as discrete components.
[0115] Fig. 7A shows a process 700 of adding a new block to a distributed ledger 720 according to an example embodiment, and Figure 7B The contents of the structure of a new data block 730 for a blockchain according to an example embodiment are shown. Fig. 7A, a client (not shown) may submit a transaction to a blockchain node 711, 712, and / or 713. A client may be an instruction received from any source to enact an activity on a blockchain 722. As an example, a client may be an application that acts on behalf of a requester (e.g., a device, a person, or an entity) to propose a transaction to a blockchain. Multiple blockchain peers (e.g., blockchain nodes 711, 712, and 713) may maintain the state of the blockchain network and a copy of the distributed ledger 720. Different types of blockchain nodes / peers may exist in a blockchain network, including an endorsement peer that simulates and endorses a transaction proposed by a client, and a delivery peer that confirms the endorsement, verifies the transaction, and delivers the transaction to the distributed ledger 720. In this example, blockchain nodes 711, 712, and 713 may perform the roles of an endorser node, a deliverer node, or both.
[0116] The distributed ledger 720 includes a blockchain that stores an immutable, ordered record in blocks, and a state database 724 (the current world state) that maintains the current state of the blockchain 722. There can be one distributed ledger 720 per channel, and each peer maintains its own copy of the distributed ledger 720 for each channel of which it is a member. The blockchain 722 is a transaction log that is structured as hash-linked blocks, where each block contains a sequence of N transactions. Blocks may include transactions such as Figure 7B The various components shown in . The link of a block can be generated by adding the hash of the previous block header to the block header of the current block ( Fig. 7A ). In this way, all transactions on blockchain 722 are ordered and cryptographically linked together, thereby preventing tampering of blockchain data without breaking the hash link. In addition, due to the link, the last block in blockchain 722 represents every transaction that came before it. Blockchain 722 can be stored on a peer file system (local or attached storage), which supports append-only blockchain workloads.
[0117] The current state of the blockchain 722 and distributed ledger 720 may be stored in a state database 724. Here, the current state data represents the latest values of all keys ever included in the chain transaction log of the blockchain 722. Chaincode invocations execute transactions against the current state in the state database 724. In order to make these chaincode interactions very efficient, the latest values of all keys are stored in the state database 724. The state database 724 may include an indexed view into the transaction log of the blockchain 722, so that the indexed view can be regenerated from the chain at any time. The state database 724 may be automatically restored (or generated if necessary) at peer startup before a transaction is accepted.
[0118] The endorsing node receives the transaction from the client and endorses the transaction based on the simulation results. The endorsing node saves the smart contract that simulates the transaction proposal. When the endorsing node endorses the transaction, the endorsing node creates a transaction endorsement, which is a signed response from the endorsing node to the client application indicating the endorsement of the simulated transaction. The method of endorsing the transaction depends on the endorsement policy that can be specified within the chaincode. An example of an endorsement policy is "a majority of endorsing peers must endorse the transaction". Different channels can have different endorsement policies. The endorsed transaction is forwarded by the client application to the sorting service 710.
[0119] The ordering service 710 accepts endorsed transactions, orders them into blocks, and delivers these blocks to delivery peers. For example, when a threshold of transactions is reached, a timer expires, or another condition, the ordering service 710 can initiate a new block. Fig. 7A In the example of , blockchain node 712 is a committing peer that has received data for a new data block 730 stored on blockchain 722. The first block in a blockchain may be referred to as a genesis block, which includes information about the blockchain, its members, data stored therein, and the like.
[0120] The sorting service 710 may consist of a cluster of sorters. The sorting service 710 does not process transactions, smart contracts, or maintain a shared ledger. Instead, the sorting service 710 may accept endorsed transactions and specify the ordering of these transactions to be delivered to the distributed ledger 720. The architecture of the blockchain network may be designed so that a specific implementation of "sorting" (e.g., Solo, Kafka, BFT, etc.) becomes a pluggable component.
[0121] Transactions are written to the distributed ledger 720 in a consistent order. The ordering of transactions is established to ensure that updates to the state database 724 are valid when they are delivered to the network. Unlike cryptocurrency blockchain systems where ordering is performed by solving or mining cryptographic puzzles, in this example, the parties to the distributed ledger 720 can choose the ordering mechanism that best suits the network.
[0122] When the ordering service 710 initializes a new data block 730, the new data block 730 may be broadcast to the delivery peers (e.g., blockchain nodes 711, 712, and 713). In response, each delivery peer verifies the transaction within the new data block 730 by checking to ensure that the read set and the write set still match the current world state in the state database 724. Specifically, the delivery peer may determine whether the existing read data is the same as the current world state in the state database 724 when the endorser simulates the transaction. When the delivery peer confirms the transaction, the transaction is written to the blockchain 722 on the distributed ledger 720, and the state database 724 is updated with the write data from the read-write set. If the transaction fails, that is, if the delivery peer finds that the read-write set does not match the current world state in the state database 724, the transaction ordered into the block will still be included in the block, but it will be marked as invalid, and the state database 724 will not be updated.
[0123] refer to Figure 7B , a new data block 730 (also referred to as a data block) stored on the blockchain 722 of the distributed ledger 720 may include multiple data segments, such as a block header 740, block data 750, and block metadata 760. It should be understood that the various illustrated blocks and their contents, such as the new data block 730 and its contents. Figure 7B The examples shown in FIG. 7 are merely examples and are not intended to limit the scope of the example embodiments. New data block 730 may store transaction information of N transactions (e.g., 1, 10, 100, 500, 1000, 2000, 3000, etc.) in block data 750. New data block 730 may also include information (e.g., Fig. 7A In particular, the block header 740 may include a hash of the header of the previous block. The block header 740 may also include a unique block number, a hash of the block data 750 of the new data block 730, etc. The block number of the new data block 730 may be unique and assigned in various sequences, such as increasing / sequentially starting from zero.
[0124] The block data 750 may store transaction information for each transaction recorded within the new data block 730. For example, the transaction data may include one or more of transaction type, version, timestamp, channel ID of the distributed ledger 720, transaction ID, epoch, payload visibility, chaincode path (deploy tx), chaincode name, chaincode version, inputs (chaincode and function), client (creator) identity such as public key and certificate, client's signature, endorser's identity, endorser signature, proposed hash, chaincode event, response status, namespace, read set (list of keys and versions read by the transaction, etc.), write set (list of keys and values, etc.), start key, end key, list of keys, Merkel tree query digest, etc. Transaction data may be stored for each of the N transactions.
[0125] According to various embodiments, the block data 750 may also store graph data 752 of existing key relationships between peers in the blockchain network that supports the newly recommended chaincode. The graph data 752 may include peers and smart contracts represented as nodes, where edges between peers and smart contracts represent connections. The graph data 752 includes one or more of the steps, features, processes, and / or actions described or depicted herein. Therefore, the graph data 752 can be stored in an immutable log of blocks on the distributed ledger 720. Some of the benefits of storing the graph data 752 on the blockchain are reflected in the various embodiments disclosed and depicted herein. Although in Figure 7B , the graphics data 752 is depicted in the tile data 750 , but it may also be located in the tile header 740 or the tile metadata 760 .
[0126] The block metadata 760 may store multiple fields of metadata (e.g., as a byte array, etc.). The metadata fields may include a signature on block creation, a reference to the last configured block, a transaction filter identifying valid and invalid transactions within the block, the last offset persisted by the sorting service that sorts the block, and the like. The signature, last configured block, and sorter metadata may be added by the sorting service 710. At the same time, the deliverer of the block (such as the blockchain node 712) may add validity / invalidity information based on endorsement policies, verification of read / write sets, and the like. The transaction filter may include a byte array of size equal to the number of transactions in the block data 750 and a verification code identifying whether the transaction is valid / invalid. In some embodiments, although in Figure 7B Not shown, but block metadata 760 may store therein metadata of the recommended smart contract.
[0127] Figure 7CAn embodiment of a blockchain 770 for digital content according to embodiments described herein is shown. Digital content may include one or more files and associated information. Files may include media, images, video, audio, text, links, graphics, animations, web pages, documents, or other forms of digital content. The immutable, append-only aspect of the blockchain serves as a security measure to protect the integrity, validity, and authenticity of digital content, making it suitable for use in legal proceedings where admissibility rules apply or other settings of evidence are considered, or where the presentation and use of digital information is of additional interest. In this case, the digital content may be referred to as digital evidence.
[0128] The blockchain can be formed in a variety of ways. In one embodiment, the digital content can be included in and accessed from the blockchain itself. For example, each block of the blockchain can store a hash value of the reference information (e.g., header, value, etc.) along with the associated digital content. The hash value and the associated digital content can then be encrypted together. Thus, the digital content of each block can be accessed by decrypting each block in the blockchain, and the hash value of each block can be used as a basis for referencing the previous block. This can be illustrated as follows:
[0129] Block 1 Block 2 Block N
[0130] Hash value 1 Hash value 2 Hash value N
[0131] Digital content 1 Digital content 2 Digital content N
[0132] In one embodiment, the digital content may not be included in the blockchain. For example, the blockchain may store a cryptographic hash of the contents of each block without any digital content. The digital content may be stored in another storage area or memory address associated with the hash value of the original file. The other storage area may be the same storage device used to store the blockchain, or may be a different storage area, or even a separate relational database. The digital content of each block may be referenced or accessed by obtaining or querying the hash value of the block of interest, and then looking up in the storage area the value stored corresponding to the actual digital content. This operation may be performed, for example, by a database gatekeeper. This may be illustrated as follows:
[0133]
[0134] exist Figure 7C In the example embodiment of the present invention, the blockchain 770 includes a plurality of blocks 7781, 7782, ... 778 that are cryptographically linked in an ordered sequence. N , where N ≥ 1. Used to link blocks 7781, 7782, ... 778 NThe password may be any one of a number of keyed or non-keyed hash functions. In one embodiment, blocks 7781, 7782, ... 778 N Subjected to a hash function that produces an n-digit alphanumeric output (where n is 256 or another number) based on an input based on the information in the block. Examples of such hash functions include, but are not limited to, SHA-type (SHA stands for Secure Hash Algorithm) algorithms, Merkle-Damagard algorithms, HAIFA algorithms, Merkle-tree algorithms, random number-based algorithms, and non-collision-resistant PRF algorithms. In another embodiment, blocks 7781, 7782, ... 778 N May be cryptographically linked by a function other than a hash function.For purposes of illustration, the following description is made with reference to a hash function (eg, SHA-2).
[0135] Blocks 7781, 7782, ... 778 in the blockchain N Each of the blocks includes a header, a version of the file, and a value. As a result of the hashing in the blockchain, the header and value are different for each block. In one embodiment, the value may be included in the header. As described in more detail below, the version of the file may be the original file or a different version of the original file.
[0136] The first block 7781 in the blockchain is called a genesis block and includes a header 7721, an original file 7741, and an initial value 7761. The hashing scheme used for the genesis block and in fact in all subsequent blocks can vary. For example, all the information in the first block 7781 can be hashed together and at once, or each piece of information or part of the information in the first block 7781 can be hashed separately, and then hashing of the separately hashed parts can be performed.
[0137] The header 7721 may include one or more initial parameters, which may include, for example, a version number, a timestamp, a current value, root information, a difficulty level, a consensus protocol, a duration, a media format, a source, descriptive keywords, and / or other information associated with the original file 7741 and / or the blockchain. The header 7721 may be generated automatically (e.g., by blockchain network management software) or manually by a blockchain participant. N Unlike the header in , header 7721 in the genesis block does not reference a previous block simply because there is no previous block.
[0138] The original file 7741 in the origin block can be, for example, data captured by the device with or without processing before the device is included in the blockchain. The original file 7741 is received from the device, media source, or node through a system interface. The original file 7741 is associated with metadata, which can be generated manually or automatically by a user, device, and / or system processor, for example. The metadata can be included in the first block 7781 associated with the original file 7741.
[0139] The value 7761 in the origin block is an initial value generated based on one or more unique attributes of the original file 7741. In one embodiment, the one or more unique attributes may include a hash value of the original file 7741, metadata of the original file 7741, and other information associated with the file. In one embodiment, the initial value 7761 may be based on the following unique attributes:
[0140] 1) SHA-2 calculates the hash value of the original file
[0141] 2) Originating device ID
[0142] 3) The start timestamp of the original file
[0143] 4) The original storage location of the original file
[0144] 5) The blockchain network member ID for the software currently controlling the original file and associated metadata
[0145] Other blocks in the blockchain: 7782 to 778 N It also has a header, file, and value. However, unlike the first block 7781, the headers 7722 to 772 in the other blocks N Each of the remaining blocks includes a hash value of the immediately preceding block. The hash value of the immediately preceding block may be a hash of just the header of the preceding block, or may be a hash value of the entire preceding block. By including the hash value of the preceding block in each of the remaining blocks, tracking from the Nth block back to the originating block (and associated original file) may be performed on a block-by-block basis, as indicated by arrow 780, to establish an auditable and immutable chain of custody.
[0146] Headers 7722 to 772 in other blocks N Each of the may also include other information, such as a version number, a timestamp, a random number, root information, a difficulty level, a consensus protocol, and / or other parameters or information associated with the corresponding file and / or the general blockchain.
[0147] Files 7742 to 774 in other blocks NThe original file may be equal to the original file, or may be a modified version of the original file in the origin block, depending on, for example, the type of processing performed. The type of processing performed may vary from block to block. The processing may involve, for example, any modification of the file in the previous block, such as editing information or otherwise changing the contents of the file, taking information away from the file, or adding or appending information to the file.
[0148] Additionally or alternatively, processing may involve simply copying a file from a previous block, changing the storage location of a file, analyzing a file from one or more previous blocks, moving a file from one storage device or memory location to another storage device or memory location, or performing an action with respect to the file of the blockchain and / or its associated metadata. Processing involving analyzing a file may include, for example, appending, including, or otherwise associating various analytical, statistical, or other information associated with the file.
[0149] Other blocks in other blocks 7762 to 776 N The value in each of the blocks is a unique value, and all of these values are different as a result of the processing performed. For example, the value in any one block corresponds to an updated version of the value in the previous block. The update is reflected in the hash of the block to which the value was assigned. The value of the block thus provides an indication of what processing was performed in the block, and also allows tracking back through the blockchain to the original file. This tracking confirms the chain of custody of the file throughout the blockchain.
[0150] For example, consider a situation where portions of a file in a previous block were redacted, chunked, or pixelated in order to protect the identity of the person shown in the file. In this case, the block that includes the redacted file will include metadata associated with the redacted file, such as how the redaction was performed, who performed the redaction, a timestamp when the redaction occurred, etc. The metadata may be hashed to form the value. Because the metadata for the block is different from the information that was hashed to form the value in the previous block, the values are different from each other and can be recovered upon decryption.
[0151] In one embodiment, when any one or more of the following occurs, the value of the previous block (e.g., the calculated new hash value) can be updated to form the value of the current block. In this example embodiment, the new hash value can be calculated by hashing all or part of the information mentioned below.
[0152] a) If the file has been manipulated in any way (for example, if the file has been redacted, copied, altered, accessed, or some other action has been taken), then the new SHA-2 computed hash value)
[0153] b) New storage location for the file
[0154] c) New metadata associated with the file is identified
[0155] d) Transferring access to or control of a file from one blockchain participant to another
[0156] Fig.7D An embodiment of a block that can represent the structure of a block in blockchain 790 according to one embodiment is shown. i Including head 772 i 、File 774 i The sum is 776 i .
[0157] Head 772 i Including previous block Block i-1 The hash value of the previous block and additional reference information, such as any of the information types discussed herein (e.g., header information including references, properties, parameters, etc.). All blocks reference the hash of the previous block, except of course the origin block. The hash value of the previous block can be just the hash of the header in the previous block, or the hash of all or part of the information in the previous block, including files and metadata.
[0158] File 774 i The system includes a plurality of data, such as sequentially data 1, data 2, ..., data N. The data are tagged with metadata 1, metadata 2, ..., metadata N describing the content and / or characteristics associated with the data. For example, the metadata of each data may include a timestamp indicating the data, processing data, keywords indicating the person or other content depicted in the data, and / or other characteristics that may help establish the validity and content of the file as a whole, and in particular information of its use as digital evidence, for example, as described in conjunction with the embodiments discussed below. In addition to the metadata, each data may be tagged with a reference REF1, REF2, ..., REF to a previous data. N to mark to prevent tampering, gaps in the file, and sequential reference through the file.
[0159] Once metadata is assigned to data (e.g., by a smart contract), the metadata cannot be altered without the hash changing, which can be easily identified as invalid. Thus, metadata creates a data log of information that can be accessed for use by participants in the blockchain.
[0160] Value 776 i A hash or other value calculated based on any of the types of information discussed previously. For example, for any given block i, the value of the block can be updated to reflect the processing performed on the block, such as a new hash value, a new storage location, new metadata for the associated file, a transfer of control or access, an identifier, or other actions or information to be added. Although the value in each block is shown as separate from the metadata of the file and header data, in another embodiment, the value can be based in part or in whole on the metadata.
[0161] Once the blockchain 770 is formed, at any point in time, an immutable chain of custody of the file can be obtained by querying the blockchain for the transaction history of values across blocks. The query or tracking process can begin by decrypting the value of the currently included block (e.g., the last (Nth) block), and then continue to decrypt the values of other blocks until the origin block is reached and the original file is restored. Decryption can also involve decrypting the header and file in each block and associated metadata.
[0162] Decryption is performed based on the type of encryption that occurs in each block. This can involve the use of a private key, a public key, or a public-private key pair. For example, when asymmetric encryption is used, a blockchain participant or a processor in the network can generate a public and private key pair using a predetermined algorithm. The public and private keys are associated with each other through some mathematical relationship. The public key can be publicly distributed to be used as an address to receive messages from other users, such as an IP address or a home address. The private key is kept secret and is used to digitally sign messages sent to other blockchain participants. The signature is included in the message so that the recipient can verify it using the sender's public key. In this way, the recipient can be sure that only the sender can send the message.
[0163] Generating a key pair can be similar to creating an account on the blockchain, but without having to actually register it anywhere. Moreover, each transaction performed on the blockchain is digitally endorsed by the sender using his private key. This signature ensures that only the owner of the account can track and process (if within the scope of permission determined by the smart contract) the files on the blockchain.
[0164] Fig. 8A and Figure 8B Further examples of use cases of blockchain that may be incorporated and used herein are shown. Specifically, Fig. 8A An example 800 of a blockchain 810 storing machine learning (artificial intelligence) data is shown. Machine learning relies on large amounts of historical data (or training data) to build predictive models for making accurate predictions about new data. Machine learning software (e.g., neural networks, etc.) can often sift through millions of records to find non-intuitive patterns.
[0165] exist Fig. 8AIn the example of , host platform 820 builds and deploys a machine learning model for predictive monitoring of asset 830. Here, host platform 820 may be a cloud platform, an industrial server, a web server, a personal computer, a user device, etc. Asset 830 may be any type of asset (e.g., a machine or equipment, etc.), such as an airplane, a locomotive, a turbine, medical machinery and equipment, oil and gas equipment, a ship, a vessel, a vehicle, etc. As another example, asset 830 may be a non-tangible asset, such as stocks, currency, digital coins, insurance, etc.
[0166] Blockchain 810 can be used to significantly improve both the training process 802 of the machine learning model and the prediction process 804 based on the trained machine learning model. For example, in 802, historical data can be stored on blockchain 810 by the asset 830 itself (or through an intermediary, not shown), rather than requiring data scientists / engineers or other users to collect data. This can significantly reduce the collection time required by the host platform 820 when performing predictive model training. For example, using smart contracts, data can be directly and reliably passed directly from its origin to blockchain 810. By using blockchain 810 to ensure the security and ownership of the collected data, smart contracts can send data directly from assets to individuals who use the data to build machine learning models. This allows data to be shared between assets 830.
[0167] The collected data can be stored in the blockchain 810 based on a consensus mechanism. The consensus mechanism pulls in (permissioned nodes) to ensure that the data being recorded is verified and accurate. The recorded data is time-stamped, cryptographically signed, and immutable. Therefore, it is auditable, transparent, and secure. In some cases (i.e., supply chain, healthcare, logistics, etc.), adding IoT devices that write directly to the blockchain can increase the frequency and accuracy of the data being recorded.
[0168] In addition, training the machine learning model on the collected data may be performed by the host platform 820 for several rounds of refinement and testing. Each round may be based on additional data or data that was not previously considered to help expand the knowledge of the machine learning model. In 802, the different training and testing steps (and the data associated therewith) may be stored on the blockchain 810 by the host platform 820. Each refinement of the machine learning model (e.g., changes to variables, weights, etc.) may be stored on the blockchain 810. This provides a verifiable proof of how the model was trained and what data was used to train the model. In addition, when the host platform 820 has implemented the final trained model, the resulting model may be stored on the blockchain 810.
[0169] After the model has been trained, it can be deployed to a field environment where predictions / decisions can be made based on the execution of the final trained machine learning model. For example, in 804, the machine learning model can be used for condition-based maintenance (CBM) of assets such as aircraft, wind turbines, healthcare machines, etc. In this example, data fed back from asset 830 can be input into the machine learning model and used to make event predictions, such as failure events, error codes, etc. The determinations made by executing the machine learning model at the host platform 820 can be stored on the blockchain 810 to provide auditable / verifiable proof. As a non-limiting example, the machine learning model can predict a future failure / failure of a portion of the asset 830 and create an alert or notification to replace the portion. The data behind the decision can be stored on the blockchain 810 by the host platform 820. In one embodiment, the features and / or actions described and / or depicted herein can occur on or with respect to the blockchain 810.
[0170] New transactions for a blockchain can be gathered together into a new block and added to an existing hash. Then, it is encrypted to create a new hash for the new block. When a transaction is encrypted, it is added to the next list of transactions, and so on. The result is a chain of blocks where each block contains the hash of all the previous blocks. The computers storing these blocks periodically compare their hashes to make sure they all agree. Any computer that disagrees discards the record that caused the problem. This method is good for ensuring that the blockchain is tamper-proof, but it is not perfect.
[0171] One way to game the system is for a dishonest user to change the list of their favorite transactions, but keep the hash the same. This can be done by brute force, in other words, by changing the record, encrypting the result, and seeing if the hash value is the same. If not, it is tried again and again until a matching hash is found. The security of the blockchain is based on the belief that ordinary computers can only perform such brute force attacks on completely unrealistic time scales, such as the age of the universe. In contrast, quantum computers are much faster (1000 times faster) and therefore pose a much greater threat.
[0172] Figure 8B An example 850 of a quantum-safe blockchain 852 that implements quantum key distribution (QKD) to prevent quantum computing attacks is shown. In this example, blockchain users can verify each other's identities using QKD. This uses quantum particles such as photons to send information, which an eavesdropper cannot copy without destroying the quantum particles. In this way, the sender and receiver can be confident of each other's identity through the blockchain.
[0173] exist Figure 8BIn the example of , there are four users 854, 856, 858, and 860. Each pair of users can share a secret key 862 (i.e., QKD) between them. Since there are four nodes in this example, there are six pairs of nodes, and therefore six different secret keys 862 are used, including QKD AB , QKD AC , QKD AD , QKD BC , QKD BD and QKD CD Each pair can create a QKD by sending information using quantum particles such as photons, which an eavesdropper cannot copy without destroying the QKD. In this way, a pair of users can be confident of each other's identity.
[0174] The operation of blockchain 852 is based on two processes: (i) the creation of transactions, and (ii) the construction of blocks that aggregate new transactions. New transactions can be created similarly to traditional blockchain networks. Each transaction can contain information about the sender, the receiver, the creation time, the amount (or value) to be transferred, a list of reference transactions that prove that the sender has funds for the operation, etc. The transaction record is then sent to all other nodes, where it is entered into a pool of unconfirmed transactions. Here, two parties (i.e., a pair of users in 854-860) authenticate the transaction by providing their shared secret key 862 (QKD). The quantum signature can be attached to each transaction, making it extremely difficult to tamper with it. Each node checks its entry on the local copy of blockchain 852 to verify that each transaction has sufficient funds. However, the transaction has not yet been confirmed.
[0175] Instead of performing a traditional mining process on blocks, a broadcast protocol can be used to create blocks in a decentralized manner. In a predetermined time period (e.g., a few seconds, minutes, hours, etc.), the network can apply the broadcast protocol to any unconfirmed transactions, thereby achieving Byzantine agreement (consensus) on the correct version of the transaction. For example, each node can have a private value (the transaction data of that particular node). In the first round, the nodes send their private values to each other. In subsequent rounds, the nodes transmit the information they received from other nodes in the previous round. Here, honest nodes are able to create a complete set of transactions in a new block. The new block can be added to blockchain 852. In one embodiment, the features and / or actions described and / or depicted herein may occur on or relative to blockchain 852.
[0176] Fig. 9An example system 900 is shown that supports one or more of the example embodiments described and / or depicted herein. System 900 includes a computer system / server 902 that can operate with many other general or special computing system environments or configurations. Examples of well-known computing systems, environments, and / or configurations suitable for use with computer system / server 902 include, but are not limited to, personal computer systems, server computer systems, thin clients, fat clients, handheld or laptop devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputer systems, mainframe computer systems, and distributed cloud computing environments including any of the above systems or devices, etc.
[0177] Computer system / server 902 may be described in the general context of computer system executable instructions, such as program modules, executed by the computer system. In general, program modules may include routines, programs, objects, components, logic, data structures, etc. that perform specific tasks or implement specific abstract data types. Computer system / server 902 may be practiced in a distributed cloud computing environment, where tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules may be located in local and remote computer system storage media including memory storage devices.
[0178] like Fig. 9 As shown, the computer system / server 902 in the cloud computing node 900 is shown in the form of a general-purpose computing device. The components of the computer system / server 902 may include, but are not limited to, one or more processors or processing units 904, a system memory 906, and a bus that couples various system components including the system memory 906 to the processing unit 904.
[0179] Bus refers to one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example and not limitation, these architectures include Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
[0180] Computer system / server 902 generally includes various computer system readable media. Such media can be any available media that can be accessed by computer system / server 902, and it includes volatile and non-volatile media, removable and non-removable media. In one embodiment, system memory 906 implements the flow charts of other figures. System memory 906 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 910 and / or cache 912. Computer system / server 902 may also include other removable / non-removable, volatile / non-volatile computer system storage media. As an example only, storage system 914 may be provided for reading from and writing to a non-removable, non-volatile magnetic medium (not shown and commonly referred to as a "hard drive"). Although not shown, a disk drive for reading from and writing to a removable, non-volatile disk (e.g., a "floppy disk") may be provided, as well as an optical disk drive for reading from or writing to a removable, non-volatile optical disk such as a CD-ROM, DVD-ROM or other optical media. In this case, each can be connected to the bus through one or more data medium interfaces. As will be further depicted and described below, the memory 906 may include at least one program product having a set (eg, at least one) of program modules configured to perform the functions of various embodiments of the present application.
[0181] As an example and not limitation, a program / utility 916 having a set (at least one) of program modules 918, as well as an operating system, one or more application programs, other program modules, and program data, may be stored in memory 906. Each of the operating system, one or more application programs, other program modules, and program data, or some combination thereof, may include an implementation of a networking environment. Program modules 918 generally perform the functions and / or methods of various embodiments of the application as described herein.
[0182] As will be appreciated by those skilled in the art, various aspects of the present application may be implemented as a system, method or computer program product. Therefore, various aspects of the present application may take the form of a complete hardware embodiment, a complete software embodiment (including firmware, resident software, microcode, etc.) or a combination of software and hardware embodiments, which may be collectively referred to as "circuit", "module" or "system" herein. In addition, various aspects of the present application may take the form of a computer program product included in one or more computer-readable media containing computer-readable program code thereon.
[0183] The computer system / server 902 may also communicate with one or more external devices 920, such as a keyboard, a pointing device, a display 922, etc.; one or more devices that enable a user to interact with the computer system / server 902; and / or any device that enables the computer system / server 902 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may occur via an I / O interface 924. In addition, the computer system / server 902 may communicate with one or more networks such as a local area network (LAN), a general wide area network (WAN), and / or a public network (e.g., the Internet) via a network adapter 926. As depicted, the network adapter 926 communicates with other components of the computer system / server 902 via a bus. It should be understood that, although not shown, other hardware and / or software components may be used in conjunction with the computer system / server 902. Examples include, but are not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.
[0184] Although exemplary embodiments of at least one of the systems, methods, and non-transient computer-readable media are shown in the drawings and described in the foregoing detailed description, it will be understood that the present application is not limited to the disclosed embodiments, but is capable of numerous rearrangements, modifications, and substitutions as set forth and defined in the appended claims. For example, the capabilities of the systems of the drawings may be performed by one or more of the modules or components described herein or in a distributed architecture, and may include a transmitter, a receiver, or a pairing of both. For example, all or part of the functions performed by each module may be performed by one or more of these modules. In addition, the functions described herein may be performed at various times and may be related to various events inside or outside the module or component. Moreover, the information sent between the various modules may be sent between the modules via at least one of the following: a data network, an Internet, a voice network, an Internet protocol network, a wireless device, a wired device, and / or via multiple protocols. Moreover, messages sent or received by any module may be sent or received directly and / or via one or more other modules.
[0185] Those skilled in the art will appreciate that a "system" may be implemented as a personal computer, server, console, personal digital assistant (PDA), cellular phone, tablet computing device, smart phone, or any other suitable computing device, or combination of devices. Presenting the above functions as being performed by a "system" is not intended to limit the scope of the present application in any way, but is intended to provide an example of many embodiments. In fact, the methods, systems, and devices disclosed herein may be implemented in localized and distributed forms consistent with computing technology.
[0186] It should be noted that some of the system features described in this specification have been presented as modules in order to more specifically emphasize their implementation independence. For example, a module can be implemented as a hardware circuit including a custom very large scale integration (VLSI) circuit or gate array, an off-the-shelf semiconductor such as a logic chip, a transistor, or other discrete components. A module can also be implemented in a programmable hardware device, such as a field programmable gate array, a programmable array logic, a programmable logic device, a graphics processing unit, etc.
[0187] Modules can also be implemented at least in part with software executed by various types of processors. The identification unit of the executable code can, for example, include one or more physical or logical blocks of computer instructions, which can, for example, be organized as objects, processes, or functions. However, the executable code of the identification module does not need to be physically located together, but can include different instructions stored in different locations, which, when logically combined together, include the module and achieve the specified purpose of the module. In addition, the module can be stored on a computer-readable medium, which can be, for example, a hard drive, a flash memory device, a random access memory (RAM), a magnetic tape, or any other such medium for storing data.
[0188] In practice, a module of executable code may be a single instruction or multiple instructions, and may even be distributed over several different code segments, between different programs, and across several memory devices. Similarly, operational data may be identified and shown within a module, and may be embodied in any suitable form and organized within any suitable type of data structure. The operational data may be collected as a single data set, or may be distributed over different locations including different storage devices, and may exist, at least in part, only as electronic signals on a system or network.
[0189] It is easy to understand that the components of the present application, as generally described and shown in the drawings herein, can be arranged and designed in a variety of different configurations. Therefore, the detailed description of the embodiments is not intended to limit the scope of the claimed application, but is only a representative of the selected embodiments of the present application.
[0190] Those skilled in the art will readily appreciate that the above content may be practiced with steps in different orders and / or with hardware elements having configurations different from those disclosed. Therefore, although the present application has been described based on these preferred embodiments, some modifications, variations, and alternative configurations will be apparent to those skilled in the art.
[0191] Although preferred embodiments of the present application have been described, it should be understood that the described embodiments are merely illustrative and that the scope of the present application is limited solely by the appended claims when considering its full range of equivalents and modifications (e.g., protocols, hardware devices, software platforms, etc.).
Claims
1. A device for smart contract recommendation, comprising: A storage device configured to store the chain code relationship existing in a group of blockchain peers in the blockchain network as a graph, in which the peers and the existing smart contracts are identified by nodes, and the relationship between the peers and the existing smart contracts is identified by edges between the nodes; The processor is configured as: performing a graph mining operation on the edges in the graph to identify smart contract relationships between the peers based on existing smart contracts; executing a machine learning model on the identified smart contract relationships returned from the graph mining operation to identify properties of a new smart contract to connect two or more blockchain peers from the set of blockchain peers in the blockchain network that are not currently connected via an existing smart contract; as well as A network interface is configured to send a message to the one or more blockchain peers, the message having a suggestion for implementing the new smart contract to connect the two or more blockchain peers.
2. The device according to claim 1, wherein: The storage device is configured to store an identifier of an existing smart contract as a first set of nodes on the graph, and to store an identifier of each blockchain peer in the group of blockchain peers as a second set of nodes on the graph, and the processor is configured to connect the first set of nodes corresponding to the existing smart contract and the second set of nodes corresponding to the blockchain peers with an edge based on an existing chain code relationship.
3. The device according to claim 2, wherein: The processor is configured to identify the new smart contract to implement based on chaincode patterns mined from chaincode relationships present within the graph.
4. The device according to claim 1, wherein: The processor is further configured to predict, via one or more machine learning algorithms of the machine learning model, a set of attributes to be included in the new smart contract based on attributes included in the existing chaincode relationship.
5. The device according to claim 1, wherein: The new smart contract includes changes to one or more properties of an established chaincode relationship between two blockchain peers.
6. The device according to claim 1, wherein: The new smart contract includes a new chaincode relationship between the two or more blockchain peers corresponding to the new edge in the graph.
7. The device according to claim 1, wherein: The processor is further configured to receive approval from the one or more blockchain peers to implement the new smart contract, and in response, activate the new smart contract within the blockchain network.
8. The device according to claim 1, wherein: The processor is further configured to receive a rejection of implementing the new smart contract from the one or more blockchain peers, and in response, store information about the rejection of the new smart contract for future prediction.
9. The device according to claim 1, wherein: The processor is also configured to receive a modification to one or more properties of the new smart contract and activate the modified new smart contract within the blockchain network.
10. A method for smart contract recommendation, comprising: Storing chaincode relationships existing among a set of blockchain peers within a blockchain network as a graph, wherein the peers and existing smart contracts are identified by nodes, and edges are provided between the nodes, wherein the edges identify relationships between the peers and the existing smart contracts; performing a graph mining operation on the edges in the graph to identify smart contract relationships between the peers based on existing smart contracts; executing a machine learning model on the identified smart contract relationships returned from the graph mining operation to identify properties of a new smart contract to connect two or more blockchain peers from the set of blockchain peers in the blockchain network that are not currently connected via an existing smart contract; as well as A message is sent to the one or more blockchain peers, the message having a proposal for implementing the new smart contract to connect the two or more blockchain peers.
11. The method according to claim 10, wherein: The storing includes storing an identifier of the existing smart contract as a first set of nodes on the graph, storing an identifier of each blockchain peer in the set of blockchain peers as a second set of nodes on the graph, and connecting the first set of nodes corresponding to the existing smart contract and the second set of nodes corresponding to the blockchain peers with an edge based on an existing chain code relationship.
12. The method according to claim 11, wherein: The identifying includes identifying the new smart contract to implement based on chaincode patterns mined from existing chaincode relationships within the graph.
13. The method according to claim 10, wherein: The identifying further comprises predicting, via one or more machine learning algorithms of the machine learning model, a set of attributes to be included in the new smart contract based on attributes included in an existing chaincode relationship.
14. The method according to claim 10, wherein: The new smart contract includes changes to one or more properties of an existing chaincode relationship between two blockchain peers.
15. The method according to claim 10, wherein: The new smart contract includes a new chaincode relationship between the two or more blockchain peers corresponding to the new edge in the graph.
16. The method of claim 10, further comprising receiving approval from the one or more blockchain peers to implement the new smart contract, and in response, activating the new smart contract within the blockchain network.
17. The method of claim 10, further comprising receiving a rejection of implementing the new smart contract from the one or more blockchain peers, and in response, storing information about the rejection of the new smart contract for future prediction.
18. The method of claim 10, further comprising receiving a modification to the new smart contract, and activating the modified new smart contract within the blockchain network.
19. A non-transitory computer readable medium comprising instructions which, when read by a processor, cause the processor to perform a method comprising: Storing chaincode relationships existing among a set of blockchain peers within a blockchain network as a graph, wherein the peers and existing smart contracts are identified by nodes, and edges are provided between the nodes, wherein the edges identify relationships between the peers and the existing smart contracts; performing a graph mining operation on the edges in the graph to identify smart contract relationships between the peers based on existing smart contracts; executing a machine learning model on the identified smart contract relationships returned from the graph mining operation to identify properties of a new smart contract to connect two or more blockchain peers from the set of blockchain peers in the blockchain network that are not currently connected via an existing smart contract; as well as A message is sent to the one or more blockchain peers, the message having a proposal for implementing the new smart contract to connect the two or more blockchain peers.
20. The non-transitory computer-readable medium of claim 19, wherein the identifying further comprises predicting, via one or more machine learning algorithms of the machine learning model, a set of attributes to be included in the new smart contract based on attributes included in the existing chaincode relationship.
Citation Information
Patent Citations
Binding version stamp for smart contracts
US20190288853A1
