Method and system for determining blockchain-based deadlock resolution
By obtaining and selecting transaction information in the blockchain system, and using blockchain contracts to achieve cross-network transaction selection and settlement, the deadlock problem between different blockchain networks is solved, effective asset liquidity and information exchange is achieved, and confidential information is protected.
Patent Information
- Application Number
- CN202180030787.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-05-04
- Filing Date
- 2021-02-22
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2041-02-22
AI Technical Summary
In a blockchain-based payment system, cross-network deadlock problem is difficult to effectively solve because different blockchain networks adopt different technologies and privacy protection needs, transaction information is invisible and difficult to effectively solve.
Through a computing system associated with an entity, transaction information is obtained from the blockchain, transaction selection process is iterated, transaction subsets and incremental values are determined, encrypted versions of blockchain transactions are added, and transaction selection and settlement are achieved across networks using blockchain contracts.
Provides an effective, fair, reliable and transparent deadlock solution that ensures dynamic mobility and liquidity utilization of each entity's assets across different blockchain networks, protects confidential information, and ensures fairness through globally-wide protocols.
Smart Images

Figure CN115485687B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure generally relates to systems and methods for blockchain-based deadlock resolution. Background Art
[0002] Historically, interbank payments were settled through a net settlement system (e.g., by netting payable amounts), but as the volume and value of transactions have increased, central banks have become wary of the risks associated with a delayed net settlement system. Currently, central banks favor a real-time gross settlement (RTGS) system. In RTGS, payment instructions (e.g., payment transactions) are settled individually and immediately in full. However, the benefits of instant finality often come with high liquidity costs for banks. The liquidity requirements of an RTGS system are huge; in fact, the daily transfer volume of a typical interbank payment system can be a large fraction of a country's annual GDP. Usually, due to insufficient liquidity, participating banks within the same network cannot settle their payments individually, causing the system to come to a standstill, known as gridlock. To solve gridlock, central banks typically combine RTGS with a liquidity saving mechanism (LSM), where in-network deadlock resolution is one of the most effective solutions.
[0003] However, as financial institutions are building different blockchain-based infrastructures to provide services, resolving cross-network (or inter-network) deadlocks poses challenges. Different blockchain networks may be built using different blockchain technologies (e.g., different cryptographic schemes), and for privacy protection reasons, transaction information (e.g., payments, balances) of one blockchain network may be invisible to another blockchain network. In these scenarios, how to resolve cross-network deadlocks in blockchain-based payment systems has become an attractive challenge. Summary of the Invention
[0004] Various embodiments of the present application may include systems, methods, and non-transitory computer-readable media for blockchain-based deadlock resolution.
[0005] According to one aspect, a method for blockchain-based deadlock resolution may include, for each of a plurality of blockchains: obtaining, by a computing system associated with an entity, one or more first blockchain transactions and one or more second blockchain transactions from the blockchain, the one or more first blockchain transactions corresponding respectively to one or more revenue value transfers associated with the entity, and the one or more second blockchain transactions corresponding respectively to one or more expenditure value transfers associated with the entity; performing one or more iterations of a transaction selection process by the computing system associated with the entity, wherein each of the one or more iterations of the transaction selection process includes: determining a subset of the one or more first blockchain transactions; selecting a subset of the one or more second blockchain transactions based on the determined subset of the one or more first blockchain transactions and the balance of the blockchain account of the entity on the blockchain; determining an incremental value associated with the blockchain based on the subset of the one or more first blockchain transactions, the subset of the one or more second blockchain transactions, and the balance of the blockchain account on the blockchain, wherein the incremental value corresponds to a value transfer between the blockchain account on the blockchain and one or more different blockchain accounts of the entity on one or more different blockchains among the plurality of blockchains; and adding a third blockchain transaction to the blockchain, the third blockchain transaction including an encrypted version of one or more identifiers corresponding to the selected subset of the one or more second blockchain transactions and the incremental value; and terminating the one or more iterations of the transaction selection process in response to obtaining a fourth blockchain transaction from the blockchain, the fourth blockchain transaction indicating convergence of transaction selection on each of the plurality of blockchains.
[0006] In some embodiments, the method may further include, before performing the one or more iterations of the transaction selection process: obtaining, by the computing system, a blockchain transaction in each of the blockchains indicating the start of the transaction selection process.
[0007] In some embodiments, adding the third blockchain transaction to the blockchain includes: sending the third blockchain transaction to one or more blockchain nodes associated with the blockchain for addition to the blockchain. Wherein, the third blockchain transaction invokes a blockchain contract on the blockchain, and the blockchain contract is executable to aggregate the one or more identifiers in the third blockchain transaction with a plurality of other identifiers in a plurality of other blockchain transactions.
[0008] In some embodiments, determining the subset of the one or more first blockchain transactions includes: for a first iteration of the one or more iterations of the transaction selection process: determining that the subset of the one or more first blockchain transactions includes each of the one or more first blockchain transactions; and for each of the one or more iterations of the one or more iterations of the transaction selection process other than the first iteration: by the computing system, obtaining from the blockchain one or more blockchain transactions generated by the blockchain contract, the one or more blockchain transactions including a plurality of identifiers; and determining the subset of the one or more first blockchain transactions based on the plurality of identifiers.
[0009] In some embodiments, selecting the subset of the one or more second blockchain transactions includes: determining a first total by aggregating a plurality of values associated with a global set of first blockchain transactions, where the global set of first blockchain transactions includes the one or more first blockchain transactions of each of the plurality of blockchains; determining a second total by aggregating a global set of balances, where the global set of balances includes the balances of the blockchain accounts of the entity on each of the plurality of blockchains; and selecting one or more second blockchain transactions from a global set of second blockchain transactions such that the sum of the one or more values associated with the selected one or more second blockchain transactions is not greater than the sum of the first total and the second total, where the global set of second blockchain transactions includes one or more second blockchain transactions obtained for each of the plurality of blockchains.
[0010] In some embodiments, the global set of second blockchain transactions is respectively associated with a priority ranking; and selecting the one or more second blockchain transactions from the global set of second blockchain transactions includes selecting the one or more second blockchain transactions based on the priority ranking.
[0011] In some embodiments, the priority ranking of the global set of second blockchain transactions is determined chronologically.
[0012] In some embodiments, determining the incremental value associated with the blockchain includes: obtaining a first total associated with the subset of the one or more first blockchain transactions and a second total associated with the subset of the one or more second blockchain transactions; and subtracting the sum of the first total and the balance of the blockchain account from the second total to determine the incremental value.
[0013] In some embodiments, the encrypted version of the incremental value is generated based on a homomorphic commitment scheme or a homomorphic encryption scheme.
[0014] In some embodiments, each blockchain transaction among the one or more first blockchain transactions and the one or more second blockchain transactions includes: an index corresponding to the blockchain transaction, a homomorphic encryption version of the amount corresponding to the value transfer, and an identifier associated with the recipient of the corresponding value transfer, wherein the homomorphic encryption version of the value transfer amount is based on a homomorphic commitment scheme or a homomorphic encryption scheme.
[0015] In some embodiments, the third blockchain transaction further includes a zero-knowledge range proof demonstrating that a first sum is not less than a second sum, the first sum including the balance of the blockchain account on the blockchain and a first total associated with the subset of the one or more first blockchain transactions, and the second sum including a second total associated with the subset of the one or more second blockchain transactions and the incremental value.
[0016] In some embodiments, the method may further include, for each blockchain among the plurality of blockchains: obtaining from the blockchain a proof demonstrating that the sum of the global set of incremental values associated with the entity is equal to zero, wherein the global set of incremental values includes the incremental values associated with each of the plurality of blockchains.
[0017] According to another aspect, a non-transitory computer-readable storage medium is configured with instructions executable by one or more processors to cause the one or more processors to perform the method of any of the foregoing embodiments.
[0018] According to yet another aspect, an apparatus for blockchain-based deadlock resolution includes a plurality of modules for performing the method of any of the foregoing embodiments.
[0019] According to another aspect, a system for blockchain-based deadlock resolution may include a plurality of sensors and a computer system including a first computing device and a second computing device, the computer system including a processor and a non-transitory computer-readable storage medium storing instructions executable by the processor, the operations the instructions cause the system to perform when executed by the processor including: for each of a plurality of blockchains: obtaining, via a computing system associated with an entity, one or more first blockchain transactions and one or more second blockchain transactions from the blockchain, the one or more first blockchain transactions corresponding respectively to one or more revenue value transfers associated with the entity, and the one or more second blockchain transactions corresponding respectively to one or more expenditure value transfers associated with the entity; performing one or more iterations of a transaction selection process via the computing system associated with the entity, wherein each of the one or more iterations of the transaction selection process includes: determining a subset of the one or more first blockchain transactions; selecting a subset of the one or more second blockchain transactions based on the determined subset of the one or more first blockchain transactions and the balance of the entity's blockchain account on the blockchain; determining an incremental value associated with the blockchain based on the subset of the one or more first blockchain transactions, the subset of the one or more second blockchain transactions, and the balance of the blockchain account on the blockchain, wherein the incremental value corresponds to a value transfer between the blockchain account on the blockchain and one or more different blockchain accounts of the entity on one or more different blockchains among the plurality of blockchains; and adding a third blockchain transaction to the blockchain, the third blockchain transaction including encrypted versions of one or more identifiers and the incremental value corresponding to the selected subset of the one or more second blockchain transactions; and terminating the one or more iterations of the transaction selection process in response to obtaining a fourth blockchain transaction from the blockchain, the fourth blockchain transaction indicating convergence of transaction selection on each of the plurality of blockchains.
[0020] According to another aspect, a non-transitory computer-readable storage medium for blockchain-based deadlock resolution may be configured with instructions executable by one or more processors, and the operations performed by the one or more processors when the instructions are executed include: for each of a plurality of blockchains: obtaining, by a computing system associated with an entity, one or more first blockchain transactions and one or more second blockchain transactions from the blockchain, where the one or more first blockchain transactions respectively correspond to one or more revenue value transfers associated with the entity, and the one or more second blockchain transactions respectively correspond to one or more expenditure value transfers associated with the entity; performing one or more iterations of a transaction selection process by the computing system associated with the entity, where each of the one or more iterations of the transaction selection process includes: determining a subset of the one or more first blockchain transactions; selecting a subset of the one or more second blockchain transactions based on the determined subset of the one or more first blockchain transactions and the balance of the blockchain account of the entity on the blockchain; determining an incremental value associated with the blockchain based on the subset of the one or more first blockchain transactions, the subset of the one or more second blockchain transactions, and the balance of the blockchain account on the blockchain, where the incremental value corresponds to a value transfer between the blockchain account on the blockchain and one or more different blockchain accounts of the entity on one or more different blockchains among the plurality of blockchains; and adding a third blockchain transaction to the blockchain, the third blockchain transaction including an encrypted version of one or more identifiers and the incremental value corresponding to the selected subset of the one or more second blockchain transactions; and terminating the one or more iterations of the transaction selection process in response to obtaining a fourth blockchain transaction from the blockchain, the fourth blockchain transaction indicating the convergence of transaction selection on each of the plurality of blockchains.
[0021] According to yet another other embodiment, an apparatus for performing blockchain-based deadlock resolution may include an acquisition module, a transaction selection module, and a termination module. In some embodiments, the acquisition module may, for each of a plurality of blockchains, acquire one or more first blockchain transactions respectively corresponding to one or more revenue value transfers associated with an entity and one or more second blockchain transactions respectively corresponding to one or more expenditure value transfers associated with the entity. In some embodiments, the transaction selection module may perform one or more iterations of a transaction selection process, wherein each of the one or more iterations of the transaction selection process includes: determining a subset of the one or more first blockchain transactions; selecting a subset of the one or more second blockchain transactions based on the determined subset of the one or more first blockchain transactions and the balance of the blockchain account of the entity on the blockchain; determining an incremental value associated with the blockchain based on the subset of the one or more first blockchain transactions, the subset of the one or more second blockchain transactions, and the balance of the blockchain account on the blockchain, wherein the incremental value corresponds to a value transfer between the blockchain account on the blockchain and one or more different blockchain accounts of the entity on one or more different blockchains among the plurality of blockchains; and adding a third blockchain transaction to the blockchain, the third blockchain transaction including one or more identifiers corresponding to the selected subset of the one or more second blockchain transactions and an encrypted version of the incremental value. In some embodiments, the termination module may terminate the one or more iterations of the transaction selection process in response to obtaining a fourth blockchain transaction from the blockchain, the fourth blockchain transaction indicating convergence of transaction selection on each of the plurality of blockchains.
[0022] The embodiments disclosed herein have one or more technical effects. In some embodiments, a blockchain-based method collects information on revenue and expenditure transactions of multiple entities, identifies a subset of transactions that are settleable, and settles the identified transactions through a decentralized multi-step mechanism in which all entities participate. This mechanism is implemented through the automatic operation of blockchain contracts. This provides an effective, fair, reliable, and transparent solution for transactions and any potential deadlocks. In other embodiments, the method arranges records of the assets and liabilities of multiple entities across multiple blockchain networks, facilitating the dynamic movement of each entity's assets across blockchain networks to meet the entity's transaction needs. This allows for trusted information exchange between different blockchain networks with different characteristics (such as consensus protocols, access rules, and participating nodes). This trusted information exchange between blockchain networks improves the effective utilization of each entity's liquidity and the opportunity for deadlock resolution. In some embodiments, transaction information within a blockchain network is visible only to relevant parties, and confidential information such as payment amounts is protected by commitments and proven by zero-knowledge range proofs. This protects the confidential information of the participating entities. In some embodiments, transactions to be settled are proposed based on a first-in, first-out protocol on a global scale across multiple participants and multiple networks, and all participants are involved in every step of the deadlock resolution process. This ensures fairness in the ultimate resolution for all participants.
[0023] After considering the following description and the appended claims in reference to the accompanying drawings, these features of the systems, methods, and non-transitory computer-readable media disclosed herein, as well as the operating methods of the related elements of the structures, the functions, the combinations of components, and the economics of manufacture, will become more apparent, all of which form a part of this document, wherein, in the various drawings, like reference numerals denote corresponding parts. However, it should be clearly understood that the drawings are for illustrative and descriptive purposes only and are not intended as a definition of the limitations of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 Shows a network environment related to a blockchain according to some embodiments.
[0025] Figure 2 Shows a framework for implementing blockchain transactions according to some embodiments.
[0026] Figure 3 Shows an example network environment for implementing blockchain-based deadlock resolution according to some embodiments.
[0027] Figure 4 Shows an example diagram of a computing system for implementing blockchain-based deadlock resolution according to some embodiments.
[0028] Figure 5Illustrates an example blockchain contract for implementing blockchain - based deadlock resolution according to some embodiments.
[0029] Figure 6 Illustrates an example diagram of a timing service for implementing blockchain - based deadlock resolution according to some embodiments.
[0030] Figure 7 Illustrates an example workflow for implementing blockchain - based deadlock resolution according to some embodiments.
[0031] Figure 8 Illustrates an example application of blockchain - based deadlock resolution according to some embodiments.
[0032] Figure 9 Illustrates an example method for implementing blockchain - based deadlock resolution according to some embodiments.
[0033] Figure 10 Illustrates an example block diagram of a computing system for implementing blockchain - based deadlock resolution according to some embodiments.
[0034] Figure 11 Illustrates an example block diagram of a computer system in which any of the embodiments described herein can be implemented. Detailed Description
[0035] The embodiments described herein provide methods, systems, and apparatuses related to a blockchain - based deadlock resolution framework. Deadlocks can occur when entities exchanging assets are unable to settle their outgoing transactions or liabilities individually due to insufficient liquidity. The platform integrates various components such as a blockchain network, off - chain communication channels, cloud applications, client applications, application programming interfaces, and other suitable components to implement various functions related to resolving cross - network deadlocks. Parties such as asset owners or service providers (such as banks), regulatory authorities, information service providers, and deadlock resolution coordinators can participate in this deadlock resolution framework. The parties can interact with one or more blockchain networks to record the transactions to be settled and participate in the deadlock resolution process. A party can interact with the blockchain network by controlling a node associated with the blockchain network, participating in the consensus protocol related to the blockchain network via that node, and using that node to perform operations related to deadlock resolution. Optionally, a party can interact with the blockchain network through one or more blockchain nodes associated with one or more other entities. A party can also interact with the blockchain network using one or more interfaces provided by a platform that offers various blockchain - related services.
[0036] To illustrate the application scenarios of the various embodiments disclosed in this application, a simple example of deadlock resolution in a single payment network is provided here. For example, a three-party asset transfer scenario involving Bank 1, Bank 2, and Bank 3 in the same network (e.g., a blockchain network): Bank 1 needs to transfer $120,000 to Bank 2, Bank 2 needs to transfer $150,000 to Bank 3, and Bank 3 needs to transfer $80,000 to Bank 1. Assume that the current balances of Bank 1, Bank 2, and Bank 3 are all $50,000. Due to insufficient current balances, none of them can directly settle their outgoing transactions. However, banks can settle payments on a net basis. Asset transfer transactions can be aggregated by a central computing system within the network to determine if there is an available deadlock resolution. For example, when Bank 1 settles its outgoing transaction of $120,000 to Bank 2, it can consider the incoming transaction of $80,000 from Bank 3; when Bank 2 settles its outgoing transaction of $150,000 to Bank 3, it can consider the incoming transaction of $120,000 from Bank 1; when Bank 3 settles its outgoing transaction of $80,000 to Bank 1, it can consider the incoming transaction of $150,000 from Bank 2. In this way, Bank 1 only needs to transfer $40,000 to Bank 3, and Bank 2 only needs to transfer $30,000 to Bank 3. After applying this deadlock resolution, the new balance of Bank 1 is $10,000, the new balance of Bank 2 is $20,000, and the new balance of Bank 3 is $120,000.
[0037] When transactions are distributed across multiple blockchain networks, deadlock resolution based on direct netting may be impractical. For example, transactions in one network may be invisible to another network and / or transactions in one network are encrypted in a different manner than transactions in other networks, and there may be no central computing system capable of aggregating all asset transfer transactions across the networks. According to some embodiments provided by the present application, a resolution coordinator (e.g., a computing system associated with a timing service provider) may manage the workflow of blockchain-based deadlock resolution, such as initiating the resolution process, pausing / terminating an iteration of the workflow, and terminating the entire resolution. The resolution may include one or more iterations of a transaction selection process on each of the multiple blockchain networks. During each iteration, each participant (e.g., a computing system associated with a bank or asset exchange institution) may propose a list of spending transactions to be settled during the current iteration by considering various factors, such as the priority of its spending transactions, proposals of other participants, the current balance of its blockchain accounts on the multiple blockchain networks, other suitable factors, or any combination thereof. The resolution coordinator may monitor the proposals submitted by each participant across the multiple blockchain networks. When the proposals converge globally (e.g., meaning that all participants have agreed to the proposal), the resolution coordinator may determine that a deadlock solution has been found (e.g., the list of spending transactions may be settled among the participants across the multiple blockchain networks). Subsequently, an information service provider (such as a global notary service or oracle) that provides cross-network interoperability may sign the deadlock solution and notify the asset exchange institution to settle the corresponding transactions.
[0038] Figure 1 illustrates a network environment related to a blockchain according to some embodiments. As Figure 1 shown, in environment 100, client 111 may be coupled to server side 118, and server side 118 and node B may be coupled to blockchain system 112 via various communication networks. Similarly, server side 118 may optionally be coupled to additional blockchain systems similar to blockchain system 112, such as blockchain system 113, blockchain system 114, etc. Each blockchain system may maintain one or more blockchains.
[0039] In some embodiments, client 111 may include one or more servers (e.g., node C) and one or more other computing devices (e.g., node A1, node A2, node A3). Node A1, node A2, and node A3 may be coupled to node C. In some embodiments, node C may be implemented by an entity (e.g., a website, a mobile application, an organization, a company, an enterprise) that has various local accounts (e.g., local accounts accessed from node A1, node A2, node A3). For example, a mobile application may have millions of end users accessing the application's server from their respective user accounts. The application's server may accordingly store millions of user accounts. There may be many other configurations of the components of client 111 and their arrangement.
[0040] In some embodiments, node B may include a lightweight node. A lightweight node may not be able to download the entire blockchain, but may only download the block headers to verify the authenticity of blockchain transactions. The lightweight node may be served by a full node (e.g., a blockchain node in blockchain system 112) and effectively rely on the full node to access more functions of the blockchain. By installing appropriate software, a lightweight node can be implemented in an electronic device such as a laptop computer, a mobile phone, etc.
[0041] In some embodiments, there may be more clients similar to client 111 coupled to server side 118. Server side 118 may provide Blockchain-as-a-Service (BaaS) and is referred to as the BaaS cloud. In one embodiment, BaaS is a cloud service model in which a client or developer outsources the behind-the-scenes aspects of a web or mobile application. BaaS may provide pre-written software for activities occurring on the blockchain, such as user authentication, database management, and remote updates. The BaaS cloud may be implemented in a server, a server cluster, or other devices. In one embodiment, the BaaS cloud provides enterprise-level platform services based on blockchain technology. This service can help customers build a secure and stable blockchain environment and easily manage the deployment, operation, maintenance, and development of the blockchain. Based on rich security policies and the multi-tenant isolation of the cloud, the BaaS cloud can provide advanced security protection using chip encryption technology. Based on highly reliable data storage, this service can provide end-to-end and highly available services that can scale quickly without interruption. The BaaS cloud can provide native support for standard blockchain applications and data.
[0042] In some embodiments, the blockchain system 112 may include multiple blockchain nodes (e.g., blockchain node 1, blockchain node 2, blockchain node 3, blockchain node 4, blockchain node i, etc.) that maintain one or more blockchains (e.g., public blockchain, private blockchain, consortium blockchain, etc.). Other blockchain systems (e.g., blockchain system 113, blockchain system 114) may include similar arrangements of blockchain nodes that maintain other blockchains. Each blockchain node may be found in one or more blockchain systems. The blockchain nodes of each blockchain system may maintain one or more blockchains. The blockchain nodes may include full nodes. The full nodes may download each block and blockchain transaction and check them against the consensus rules of the blockchain. The blockchain nodes may form a network (e.g., a peer-to-peer network) in which one blockchain node communicates with another blockchain node. The order and number of the illustrated blockchain nodes are merely illustrative examples. The blockchain nodes may be implemented in servers, computers, etc. For example, each blockchain node may be implemented in a server or a server cluster. The server cluster may use load balancing. Each blockchain node may correspond to one or more physical hardware devices or virtual devices coupled together via various types of communication methods such as TCP / IP. Depending on the classification, the blockchain nodes may also be referred to as full nodes, Geth nodes, consensus nodes, etc.
[0043] In environment 100, each node and device may be installed with appropriate software (e.g., application programming interface) and / or hardware (e.g., wired, wireless connections) to access other devices in environment 100. Generally, the nodes and devices may be able to communicate with each other via one or more wired or wireless networks (e.g., the Internet), through which data may be communicated. Each of the nodes and devices may include one or more processors and one or more memories coupled to the one or more processors. The memories may be non-transitory and computer-readable and configured with instructions executable by the one or more processors to facilitate the one or more processors performing the operations described herein. The instructions may be stored in the memories or downloaded via a communication network without having to be stored in the memories. Although the nodes and devices are shown as separate components in this figure, it should be understood that these systems and devices may be implemented as a single device or multiple devices coupled together. For example, node B may optionally be integrated into blockchain node 2.
[0044] Devices such as node A1, node A2, node A3, node B, and node C can install appropriate blockchain software to create blockchain accounts and initiate, forward, or access blockchain transactions. The term "blockchain transaction" can refer to a unit of task executed and recorded in a blockchain system. For example, node A1 can access the blockchain through communication with node C, server side 118, and blockchain node 1, and node B can access the blockchain through communication with blockchain node 2. In some embodiments, node A1 can submit a blockchain account creation request to node C, and node C can forward this request and other similar requests to server side 118. Server side 118 can create blockchain accounts accordingly.
[0045] In some embodiments, after receiving a blockchain transaction request for an unconfirmed blockchain transaction, the receiving blockchain node can perform a preliminary verification on the blockchain transaction. For example, blockchain node 1 can perform a preliminary verification after receiving the blockchain transaction from node C. Once verified, the blockchain transaction can be stored in the database of the receiving blockchain node (e.g., blockchain node 1), and this node can also forward the blockchain transaction to one or more other blockchain nodes (e.g., blockchain node 3, blockchain node 4). Since each blockchain node can include or be coupled to a memory, the database can be stored separately in the memory of the blockchain node. The database can store a blockchain transaction pool submitted by one or more client devices. After receiving the blockchain transaction, one or more other blockchain nodes can repeat the processing completed by the receiving blockchain node.
[0046] Each blockchain node can select some blockchain transactions from the pool according to its preference and form them into a new block to be proposed to the blockchain. The blockchain node can "mine" the proposed new block by investing computing power to solve complex mathematical problems. If a blockchain transaction involves a blockchain contract, the blockchain node can locally execute the blockchain contract in the corresponding virtual machine (VM). The blockchain contract can include instructions, code, or programs that are automatically executed by the blockchain system when one or more preset trigger conditions are met. To process the blockchain contract, each blockchain node in the blockchain network can run a corresponding virtual machine and execute the same instructions in the blockchain contract. The virtual machine is a software emulation of a computer system based on a computer architecture and providing the functions of a physical computer. The virtual machine in the blockchain environment can be understood as a system designed to be used as a runtime environment for blockchain contracts.
[0047] A particular blockchain node that successfully mines a new block of the proposed blockchain transaction according to the consensus rules can package the new block into its local copy of the blockchain and multicast the result to other blockchain nodes. The particular blockchain node can be a blockchain node that has first successfully completed verification, has obtained verification privileges, or has been selected based on another consensus rule, etc. Then, other blockchain nodes can execute the blockchain transactions in the new block locally following the same execution order as that of the particular node, verify the execution results with each other (e.g., by performing a hash calculation), and synchronize their copies of the blockchain with the copy of the particular blockchain node. By updating their local blockchain copies, other blockchain nodes can similarly write such information in the blockchain transaction into the corresponding local memories. Thus, blockchain contracts can be deployed on the blockchain. If the verification fails at a certain point, the blockchain transaction is rejected.
[0048] The deployed blockchain contract can have an address according to which the deployed contract can be accessed. A blockchain node can call the deployed blockchain contract by inputting certain parameters to the blockchain contract. In one embodiment, Node C or Node B can request to call the deployed blockchain contract to perform various operations. For example, data stored in the deployed blockchain contract can be retrieved. For another example, data can be added to the deployed blockchain contract. For yet another example, a financial transaction specified in the deployed blockchain contract can be executed. Although as described above, other types of blockchain systems and associated consensus rules can be applied to the disclosed blockchain system.
[0049] Figure 2 A framework for implementing blockchain transactions according to some embodiments is shown. In some embodiments, a client 111 can send information (e.g., a request with relevant information for creating a blockchain account) to a server side 118 for the server side 118 to create a blockchain account. For this purpose, the server side 118 can generate encryption keys, compile the request together with other account creation requests, and / or perform other operations. Then, the server side 118 can send a blockchain transaction (e.g., Blockchain Transaction A) including the compiled account creation request to one or more blockchain nodes for execution.
[0050] In some embodiments, Node B may construct a signed blockchain transaction and send it to one or more blockchain nodes for execution. In one embodiment, Node B may construct blockchain transaction B. Blockchain transaction B may include blockchain contract B for deploying or invoking a deployed blockchain contract. For example, blockchain transaction B may include creating a blockchain account or a blockchain contract for invoking the deployed blockchain contract A. The blockchain contract B may be programmed with source code at the client application 221. For example, a user or a machine may program the blockchain contract B. Node B may use a corresponding compiler to compile the source code, which converts the source code into bytecode. Blockchain transaction B may include information such as a nonce (i.e., "nonce", e.g., a blockchain transaction serial number), from (i.e., "from", e.g., the blockchain address of Node B or another blockchain address), to (i.e., "to", e.g., if empty when deploying a blockchain contract), transaction fee (i.e., "transaction fee"), value (i.e., "value", e.g., the transaction amount), signature (i.e., "signature", e.g., the signature of Node B), data (i.e., "data", e.g., a message to the blockchain contract), etc. Node B may send blockchain transaction B to one or more blockchain nodes for execution through a remote procedure call (RPC) interface 223. RPC is a protocol by which a first program (e.g., a client application) can request services from a second program in another computer (e.g., a blockchain node) located on a network without having to understand the network details. When the first program causes a process to execute in a different address space, it appears as if it were coded as a normal (local) process call without the programmer having to explicitly code the details of the remote interaction.
[0051] In some embodiments, when receiving a blockchain transaction (e.g., blockchain transaction A or B), the receiving blockchain can verify whether the blockchain transaction is valid. For example, signatures and other formats can be verified. If the verification is successful, the receiving blockchain node can broadcast the received blockchain transaction (e.g., blockchain transaction A or B) to the blockchain network, which includes various other blockchain nodes. Some blockchain nodes can participate in the mining process of the blockchain transaction. The blockchain transaction can be selected by a specific blockchain node for consensus verification and thus packaged into a new block. If the blockchain transaction involves a blockchain contract, the specific blockchain node can create a contract account of the blockchain contract associated with the blockchain account address. If the blockchain transaction involves invoking a deployed blockchain contract, the specific blockchain node can trigger its local virtual machine to execute the received blockchain transaction, thus invoking the deployed blockchain contract from the local copy of its blockchain and updating the account state in the blockchain. If the specific blockchain node successfully mines a new block, the specific blockchain node can broadcast the new block to other blockchain nodes. Other blockchain nodes can verify that the new block is mined by the specific blockchain node. If consensus is reached, blockchain transaction B is respectively packaged into the local copies of the blockchain maintained by the blockchain nodes. The blockchain nodes can similarly trigger their local virtual machines to execute blockchain transaction B, thus invoking blockchain contract A deployed on the local copy of the blockchain and making corresponding updates.
[0052] When receiving a new block, other blockchain nodes can perform verification. If consensus is reached that the new block is valid, the new block is respectively packaged into the local copies of the blockchain maintained by the blockchain nodes. The blockchain nodes can similarly trigger their local virtual machines (e.g., local virtual machine 1, local virtual machine i, local virtual machine 2) to execute the blockchain contracts in the new block, thus invoking the local copies of the blockchain (e.g., local blockchain copy 1, local blockchain copy i, local blockchain copy 2) and making corresponding updates. The hardware machines of each blockchain node can access one or more virtual machines, and the virtual machines can be part of the corresponding blockchain node or coupled to the corresponding blockchain node. The corresponding local virtual machine can be triggered each time to execute the blockchain transaction. Similarly, all other blockchain transactions in the new block will be executed. Light nodes can also be synchronized with the updated blockchain.
[0053] Figure 3 An example network environment for implementing blockchain-based deadlock resolution according to some embodiments is shown. Figure 3Each of the letters A, B, C, D, and E in [the figure] represents a participant in an asset or other transaction (e.g., an asset transfer institution such as a bank). In this example network environment, A participates in three blockchain networks 310, 320, and 330; B participates in two blockchain networks 310 and 320; C participates in two blockchain networks 310 and 330; D and E participate in blockchain networks 320 and 330, respectively. Each of the blockchain networks 310, 320, and 330 can be implemented as Figure 1 and Figure 2 one or more of the blockchain systems 112 - 114 in [the figure] or its components. In some embodiments, a participant can participate in a blockchain network by providing a blockchain node to the blockchain network (e.g., in the form of a computing device or a virtual machine). A participant can participate in multiple blockchain networks through multiple separate computing devices or multiple virtual machines provided by one or more physical computing devices. In other embodiments, a participant can participate in a blockchain network through one or more blockchain nodes associated with one or more other entities, or through one or more interfaces provided by a platform that provides various blockchain-based services. The platform can be implemented as Figure 1 and 2 the server side 118 in [the figure] or its components. The computing systems associated with the participants can be respectively implemented as Figure 1 and Figure 2Client 111 or its components therein. In each blockchain network in which a participant participates, a blockchain account can be created and associated with the participant. The blockchain account can include an account balance that indicates the current balance that the participant has in the corresponding blockchain network. In some embodiments, the blockchain network can support the creation and trading of blockchain-based assets (e.g., tokens, cryptocurrencies). One or more participants in a public blockchain network can execute one or more asset transactions with each other by adding one or more blockchain transactions to the blockchain associated with the blockchain network. Through the blockchain transaction, the blockchain-based asset can be transferred between the blockchain accounts of the participants. In other embodiments, the blockchain network can be used to record off-chain asset ownership and transactions. One or more participants can participate in asset transactions independently of the blockchain network and record the details of the asset transactions on the blockchain associated with the blockchain network. Alternatively, one or more participants can commit to an asset transaction by adding one or more blockchain transactions representing the asset transaction to the blockchain. The one or more participants can then settle the committed asset transaction through one or more off-chain channels. In addition, a participant can access all blockchain accounts on all blockchain networks in which the participant participates. That is, a participant can transfer a specific amount of balance from one blockchain account in one blockchain network to another blockchain account in another blockchain network (e.g., reallocate its cross-network assets). This can be achieved through internal record updates or through off-chain channel transactions. A participant can add one or more blockchain transactions to each blockchain to update their respective account balances.
[0054] In some embodiments, blockchain-based deadlock resolution may require a resolution coordinator to coordinate operations between multiple blockchain networks. The coordinator may be implemented as a timing service 360 that notifies participants (e.g., asset transfer institutions) of the start of the deadlock resolution process; notifies each blockchain network that a particular stage of the resolution process (e.g., one of multiple iterations in the deadlock resolution process) has been completed; monitors each blockchain network to detect convergence, perform other suitable tasks, or any combination thereof. In some embodiments, the timing service 360 may include blockchain nodes associated with each blockchain network (e.g., 310, 320, and 330) to interact with other blockchain nodes in each blockchain network, including nodes associated with participants. For example, the timing service 360 may submit blockchain transactions to blockchain networks 310, 320, and 330 to initiate the deadlock resolution process (e.g., once the blockchain transaction is observed, each participant can start proposing expenditure transactions to be settled), or notify participants that the resolution process will start at a specific time. As another example, the timing service 360 may monitor blockchain networks 310, 320, and 330 through blockchain nodes associated with the timing service 360 to detect blockchain transactions indicating that a deadlock solution has been found. Figure 6 Embodiments of the timing service 360 are described in detail.
[0055] Figure 4 An example diagram of a computing system for implementing blockchain-based deadlock resolution according to some embodiments is shown. Figure 4 The computing system 400 in may refer to a computing device, virtual machine, or other suitable terminal device associated with participants (e.g., asset transfer institutions) involved in the deadlock resolution process. The computing system 400 may be implemented as Figures 1 to 3 one or more components in. For example, client 111, server-side 118, user-side application 221, etc. The computing system 400 may enable participants to participate in the blockchain network 440. The blockchain network 440 may be implemented as Figure 1 and Figure 2 one or more blockchain systems 112 - 114 or their components in, or Figure 3 one or more blockchain systems 310 - 330 in. In some embodiments, a participant may be associated with multiple such computing systems 400 to participate in multiple blockchain networks respectively.
[0056] In some embodiments, the computing system 400 may include multiple modules that provide various functions. Figure 4 The modules shown are exemplary. Depending on the implementation, the computing system 400 may have more, fewer, alternative modules. Some modules may be combined or split. In Figure 4In the illustrated embodiment, computing system 400 includes a transaction collection module 421, a transaction selection module 422, an increment determination module 423, and a blockchain interaction module 425.
[0057] In some embodiments, the transaction collection module 421 of computing system 400 may collect all outgoing transactions (e.g., outgoing payments) and all incoming transactions (e.g., incoming payments) associated with a participant from a blockchain in blockchain network 440. These transactions may be blockchain transactions retrieved from a blockchain associated with blockchain network 440. An outgoing transaction may include or represent a transfer of value from a blockchain account associated with a participant (e.g., transferor) to a blockchain account associated with another participant (e.g., transferee). The transferor and transferee in the outgoing transaction may be represented by their respective unique identifiers, such as blockchain account addresses. The outgoing transaction may also include the amount to be transferred out. For privacy protection purposes, the amount may be represented as ciphertext or a commitment before being sent to blockchain network 440. In some embodiments, the amount may be homomorphically encrypted (e.g., by applying a homomorphic encryption or homomorphic commitment scheme).
[0058] In some embodiments, the transaction selection module 422 of computing system 400 may select a subset of the outgoing transactions collected by the transaction collection module 421 for settlement. The selected outgoing transactions may be determined based on various factors, such as the current balances of the participants in the current blockchain network 440, the total amount of incoming transactions that a participant assumes it may receive (e.g., based on outgoing transactions proposed by other participants in blockchain network 440), and / or the amount that a participant may transfer in (e.g., asset redistribution) from its other blockchain accounts in other blockchain networks.
[0059] In some embodiments, if the above factors indicate that the currently selected outgoing transactions may not be settled (e.g., insufficient assets), the transaction selection module 422 may remove one or more of the lowest-priority outgoing transactions from the subset. In some embodiments, each outgoing transaction may be associated with a specific priority ranking determined chronologically (e.g., an outgoing transaction with an earlier timestamp has a higher priority). In some embodiments, the priority ranking of the outgoing transactions may be determined by other factors, such as: the priority of the recipient (e.g., if the outgoing payment is made to a preferred customer / recipient, it may have a higher priority), the due date of the outgoing transaction (e.g., different recipients may set different payment due dates), other suitable factors, or any combination thereof.
[0060] In some embodiments, the incremental determination module 423 of the computing system 400 may determine an incremental value corresponding to the blockchain account of a participant in the blockchain network 440. Herein, the incremental value may be a variable indicating the amount to be transferred in or out of the blockchain account of a participant in the blockchain network 440. For example, the incremental value may be determined based on the current balance in the blockchain account of the participant in the blockchain network 440, all incoming transactions in the blockchain network 440 that the participant is to receive, and the outgoing transactions (e.g., outgoing transactions proposed for settlement) selected by the transaction selection module 422. If the total amount of the outgoing transactions is greater than the sum of the current balance and the total amount of the incoming transactions, the participant may need to transfer some assets from its other blockchain accounts, which may be represented by a positive incremental value. If the total amount of the outgoing transactions is less than the sum of the current balance and the total amount of the incoming transactions, the participant may be able to transfer a specific amount to help its other blockchain accounts settle the outgoing transactions, and this specific amount may be represented by a negative incremental value.
[0061] If a participant has multiple computing systems 400, each computing system 400 may (e.g., through its incremental determination module 423) determine an incremental value such that the sum of the multiple incremental values is 0. That is, during the internal redistribution of the assets (e.g., the redistribution of assets among multiple blockchain accounts of the participant), liquidity may not be created or reduced. In some embodiments, to ensure that the sum of the multiple incremental values is 0, the multiple computing systems 400 of the participant may communicate jointly and determine their incremental values, or one of the computing systems 400 may aggregate information from other systems and determine the multiple incremental values of the computing system 400.
[0062] In some embodiments, the blockchain interaction module 425 of the computing system 400 may submit blockchain transactions (including blockchain contracts) to the blockchain network 440 and monitor the blockchain associated with the blockchain network 440. For example, when the sum of all incremental values (e.g., corresponding to multiple computing systems 400 of the participant respectively) is 0, the blockchain interaction module 425 may submit a blockchain transaction to the blockchain network 440, and the blockchain transaction includes the outgoing transactions selected by the transaction selection module 422 and the incremental values determined by the incremental determination module 423 (e.g., in encrypted format). The blockchain transaction may represent a proposal from the computing system 400, and the outgoing transactions of the participant included in the proposal may be settled. In some embodiments, the blockchain transaction may further include a range proof to prove that after settling the proposed outgoing transactions and performing the balance redistribution (e.g., in the form of the amount to be transferred in or out represented by the incremental value), the post-settlement balance of the participant's current blockchain account is non-negative.
[0063] Figure 5illustrates an example blockchain contract for implementing blockchain-based deadlock resolution according to some embodiments. The blockchain contract 520 can be created in a blockchain associated with a blockchain network 440 including a plurality of blockchain nodes. The blockchain nodes can include computing systems associated with a plurality of participants such as 420A, 420B, 420C. As Figure 4 shown in the embodiments of, each computing system can submit a blockchain transaction that includes a selected spending transaction that is proposed for settlement by each participant. These blockchain transactions (e.g., proposals) can be aggregated by the blockchain contract 520 (e.g., a smart contract). For example, the blockchain transaction can specify the address of the blockchain contract 520 and trigger a specific method of the blockchain contract 520 when the corresponding proposal is submitted.
[0064] In some embodiments, the blockchain contract 520 can include a plurality of modules, such as an aggregation module 522, a verification module 523, and a reporting module 524. Each module can include computer-readable code representing a program, an algorithm, a software method, other suitable functional components, or any combination thereof. Depending on the implementation, the blockchain contract 520 can include fewer, more, or alternative modules.
[0065] The aggregation module 522 can be configured to receive and aggregate proposals submitted from computing systems such as 420A, 420B, and 420C. In some embodiments, the aggregation module 522 can be implemented as a method in the blockchain contract 520 that extracts the proposed spending transactions from the submitted blockchain transactions.
[0066] The verification module 523 can be configured to verify that the post-settlement balance of a participant is non-negative after settling the participant's proposed spending transaction and performing a balance redistribution according to an incremental value. In some embodiments, the transaction amount in the blockchain transaction and the incremental value in the proposal can be homomorphically encrypted (e.g., in the form of ciphertext or commitments), and the calculation of the post-settlement balance can be adjusted according to the homomorphic encryption or commitment scheme used. In some embodiments, the submitted blockchain transaction may already include a range proof provided by the corresponding participant. In this case, the verification module 523 may need to verify the provided proof. In some embodiments, if the verification of a proposal fails, the blockchain contract can notify the corresponding blockchain node / computing system (e.g., by submitting another blockchain transaction) to resubmit another proposal, or exclude the blockchain node (e.g., the corresponding participant) from participating in the current deadlock resolution process.
[0067] The reporting module 524 can be configured to submit a blockchain transaction to the blockchain network 440, the blockchain transaction including verified spending transactions proposed for settlement by multiple participants in the blockchain network 440. The blockchain transaction can be monitored by computing systems such as 420A, 420B, 420C as an indication that the next iteration can begin. Since a spending transaction of one participant can be an income transaction of another participant, for a particular participant, these verified spending transactions can reveal all the income transactions that it may receive from other participants in the blockchain network 440. Thus, the blockchain transaction submitted by the reporting module 524 can be a basis for each participant to identify all the income transactions that it may receive and adjust its proposals during the next iteration.
[0068] Figure 6 An example diagram of a timing service for implementing blockchain-based deadlock resolution according to some embodiments is shown. In some embodiments, the timing service 360 can be configured to coordinate the deadlock resolution process among multiple blockchain networks. For example, the timing service 360 can notify each blockchain network in the multiple blockchain networks of the start of the deadlock resolution process, notify each blockchain network that a certain iteration of the process (e.g., one of the multiple iterations in the resolution process) has been completed, monitor each blockchain network to detect convergence (e.g., local convergence on the blockchain network and global convergence across all blockchain networks), perform other suitable tasks, or any combination thereof. In some embodiments, the timing service 360 can include multiple blockchain nodes of the blockchain network. The timing service 360 can perform the foregoing operations by submitting one or more blockchain transactions to each blockchain network.
[0069] Figure 6 The illustrated exemplary timing service 360 includes multiple modules, including a trigger module 362, a timeout module 364, and a monitoring module 366. According to embodiments, the timing service 360 can have more, fewer, alternative modules. Some modules can be combined or split.
[0070] The trigger module 362 can be configured to periodically (e.g., every hour, every 6 hours, every day, every 10 minutes, etc.) submit a blockchain transaction to the blockchain network to initiate an iteration (e.g., the deadlock resolution process can include multiple iterations) by notifying participants in the blockchain network to propose proposals (e.g., notifying each participant to submit a blockchain transaction that includes a list of spending transactions proposed for settlement by the participant). Here, "notify" can be understood as the timing service 360 submitting a blockchain transaction to the blockchain network so that participants monitoring the blockchain associated with the blockchain network can obtain the blockchain transaction.
[0071] The timeout module 364 can be configured to periodically submit timeout blockchain transactions to the blockchain network to terminate the current iteration. During the current iteration, participants are allowed to submit their proposals. In some embodiments, if one or more participants fail to submit a proposal before the timeout, they may be excluded from participating in the current deadlock resolution process. In other embodiments, these participants may be allowed to participate in the next iteration of the same deadlock resolution process.
[0072] The monitoring module 366 can be configured to monitor the deadlock resolution process and determine whether an effective solution has been found or whether no effective solution has been found within a predetermined time window. For example, when global convergence occurs, an effective deadlock solution may be found. Global convergence may occur when each blockchain network in the blockchain network reaches local convergence. Local convergence occurs when all proposals in the corresponding blockchain network remain the same in two or more iterations. To observe convergence, in some embodiments, the monitoring module 366 can be monitored by Figure 5 the blockchain contract 520 shown (via the reporting module 524) for the blockchain transactions submitted during the current iteration and from the previous iteration, and compare the expenditure transactions included therein. Once global convergence is observed, the timing service 360 can submit a blockchain transaction to each blockchain network to announce the termination of the deadlock resolution process. In some embodiments, each blockchain contract can first determine whether local convergence has been reached, and if so, submit the corresponding blockchain transaction to notify the monitoring module 366 (e.g., when the monitoring module 366 observes the corresponding blockchain transaction). Global convergence can be achieved when the monitoring module 366 observes local convergence on all multiple blockchain networks simultaneously.
[0073] Figure 7 An example workflow for implementing blockchain-based deadlock resolution according to some embodiments is shown. Figure 7 The example workflow in involves a timing service 710, multiple blockchain networks (e.g., 720A, 720B), multiple computing systems associated with multiple participants (such as 730A, 730B) (e.g., the computing system can be a blockchain node that enables a participant to interact with the corresponding blockchain network), and an information service provider 770 (e.g., an oracle or notary service for importing external information, fact verification, or other suitable information into the blockchain network).
[0074] As Figure 7As shown, in steps 712A and 712B, the timing service 710 can first notify the participants of multiple blockchain networks to start the deadlock resolution process by submitting blockchain transactions to multiple blockchains (such as 720A and 720B). The participants can observe such blockchain transactions (e.g., through corresponding computing systems 730A and 730B) and start the process of proposing spendable payment transactions.
[0075] In some embodiments, the process can start with each participant first performing an initialization step. Each participant first performs an initialization step to obtain, through the computing system associated with the participant, one or more first blockchain transactions corresponding to one or more incoming value transfers associated with the participant and one or more second blockchain transactions corresponding to one or more outgoing value transfers associated with the participant from the blockchain.
[0076] Return reference Figure 7 , the initialization step can include steps 722AA and 722AB. For example, in step 722AA, the computing system 730A can look up the blockchain 720A hosted by the corresponding blockchain network and retrieve all incoming transactions of the corresponding participant (e.g., transactions listing the blockchain account address of the corresponding participant as the payment recipient) and all outgoing transactions (e.g., transactions listing the blockchain account address of the participant as the payment transferor) on the blockchain 720A. Similarly, in step 722AB, the computing system 730B can also look up the blockchain 720A to collect its corresponding incoming and outgoing transactions. Similarly, each participant such as 730A and 730B can perform a "lookup" operation on all blockchain networks (such as blockchain 720B) hosting its blockchain account to obtain all incoming and outgoing transactions of the participant on each blockchain network.
[0077] To simplify the subsequent description in the specification, the incoming transactions collected by participant i during iteration t (e.g., through the computing system of participant i) are denoted as The outgoing transactions collected by participant i during iteration t are denoted as It can be understood that iteration 0 (e.g., t = 0) represents the initialization step (e.g., including Figure 7 722AA and 722AB in). In some embodiments, the of participant i can be represented as a list of blockchain transactions. Each list of blockchain transactions includes an index corresponding to the blockchain transaction, a homomorphically encrypted version of the amount of the corresponding value transfer, and an identifier associated with the recipient of the corresponding value transfer. Among them, the homomorphically encrypted version of the transaction (e.g., payment) amount can be generated using a homomorphic commitment scheme or a homomorphic encryption scheme. For example, the transaction list can be represented as:
[0078]
[0079] where Ind i,k (1 ≤ k ≤ m i ) is the unique transaction index that uniquely identifies a transaction within the blockchain network, Amt i,k (1 ≤ k ≤ m i ) is the transaction amount, Rec i,k (1 ≤ k ≤ m i ) is the transferee (e.g., recipient) of the transaction, and m i is the total number of transactions (i.e., spending transactions) in . Each Amt i,k in i,k can be protected by a homomorphic encryption or homomorphic commitment scheme that supports ciphertext computation. For example, each Amt
[0080] After performing the initialization step, each participant can perform an iterative method including the following steps during each iteration.
[0081] Step 1: Each computing system associated with the corresponding blockchain network (e.g., 730A and 730B associated with blockchain 720A) submits a list of spending transactions to be settled during the current iteration t to the corresponding blockchain network. This proposal can be submitted as a blockchain transaction. For example, at steps 732A and 732B, computing systems 730A and 730B can each submit a blockchain transaction to blockchain 720A.
[0082] In other words, Step 1 involves a selection step to determine the list of spending transactions to be proposed to the blockchain, which can be a subset of the spending transactions of all participants. In some embodiments, the selection step may include the following sub-steps. Each sub-step can be performed by each participant on each blockchain network hosting the participant's blockchain account.
[0083] Sub-step 1: For participant i on blockchain network l during iteration t, by considering all the income transactions in and the current balance of participant i's blockchain account in blockchain network l, calculate the minimum transfer amount Δ (l) required for participant i to settle all the spending transactions in i .
[0084] In some embodiments, it can be obtained by obtaining a first total amount associated with a subset of one or more first blockchain transactions (e.g., The total amount of medium-income transactions) and a second total amount associated with a subset of one or more second blockchain transactions (e.g., The total amount of medium-expenditure transactions) to calculate Δ i (l); Determine the incremental value Δ i (l) by subtracting the sum of the first total amount and the blockchain account balance from the second total amount.
[0085] For example, if participant i needs to transfer in from its other blockchain accounts on other blockchain networks in order to settle The medium-expenditure transactions proposed in, Δ i (l) can have a positive value, indicating the amount to be transferred in; if participant i can transfer out a specific amount (such as a surplus) after settling All the proposed expenditure transactions in, Δ i (l) can have a negative value, indicating the amount provided for transfer out. This exemplary configuration can be reversed or changed according to the implementation.
[0086] Sub-step 2: For participant i on blockchain network l during iteration t, allocate Wherein, it can be updated through the following sub-steps
[0087] Sub-step 3: For participant i during iteration t, calculate the sum of the incremental values of all the networks in its holding account. If ∑ l Δ i (l) > 0 (e.g., the sum of all Δ i (l) of participant i from all the blockchain networks participated by participant i is positive), then remove the transaction with the lowest priority from (e.g., the union of all the expenditure transactions of participant i from all the blockchain networks participated by participant i); if ∑ l Δ i (l) <= 0, then jump to sub-step 5. In some embodiments, the transaction with the lowest priority can refer to the transaction with the latest submission time. In this sub-step, "removing the transaction with the lowest priority from " can be understood as not considering this transaction with the lowest priority anymore during the current deadlock resolution process (even if it may be considered in future processes). This removed transaction may be associated with one of the blockchain networks participated by the participant, so "removing the transaction with the lowest priority from " can update (e.g., by removing the transaction from it) One in the list.
[0088] Sub-step 4: For participant i on blockchain network l during iteration t, based on And Recalculate Δ for all blockchain networks i (l), and loop back to sub-step 3.
[0089] Sub-step 5: For participant i during iteration t, adjust Δ i (l) for each blockchain network l such that ∑ l Δ i (l) = 0. It may be noted that sub-step 5 can only be reached when ∑ l Δ i (l) <= 0, which means that the blockchain accounts of some participants i may provide too much amount to other blockchain accounts (e.g., more than the amount required for other blockchain accounts to settle the outgoing transactions they have proposed). In this case, the blockchain accounts of certain participants i may reduce the amount of outgoing transfers they have proposed to make ∑ l Δ i (l) = 0.
[0090] Sub-step 6: For participant i on blockchain network l during iteration t, add a third blockchain transaction to the blockchain. The third blockchain transaction includes one or more identifiers and encrypted versions of increment values corresponding to a proposed subset of one or more second blockchain transactions. The third blockchain transaction may refer to a proposal from participant i that includes a list of outgoing transactions for each blockchain network that includes , where is a proposed subset of one or more second blockchain transactions (e.g., after skipping low-priority transactions), COM(Δ i (l)) is Δ i (l) protected by a Pedersen commitment (e.g., for simplicity, the random number required for the Pedersen commitment is omitted), and π l is a zero-knowledge range proof that the post-settlement balance of participant i's blockchain account on the network is non-negative. The post-settlement balance can be determined based on the difference between a first sum and a second sum. The first sum includes the balance of the blockchain account on the blockchain and a first total associated with a subset of one or more first blockchain transactions, and the second sum includes a second total associated with a subset of one or more second blockchain transactions and the increment value. For example, the post-settlement balance can be determined by the following formula: the current balance of participant i's blockchain account on the network minus the total outgoing amount in , plus the total incoming amount in RecIn i (l) and Δ i (l). In some embodiments, π l may be optional. In some embodiments, the proposal may also include a second range proof demonstrating that the sum of the global set of increment values associated with entities is equal to zero (e.g., ∑ l Δi Proof of λ(l)=0).
[0091] As described in the above sub-step, the purpose of step 1 is to propose a list of spending transactions for participant i across all blockchain networks for settlement during the current iteration. To settle the proposed list of spending transactions, participant i may need to redistribute its blockchain account balance on the blockchain network without creating or losing any assets (e.g., guaranteed by ∑ l Δ i (l)=0). The proposal on blockchain network l can be based on the assumption that all incoming transactions in RecIn i (l) are available to participant i (e.g., participant i assumes that it will receive all incoming transactions in RecIn i (l)). It can be understood that RecIn i (l) may change after all participants submit their proposals. For example, participant i may realize that some of its incoming transactions are not available if the corresponding transferor (e.g., other participants) does not propose to settle the corresponding spending transaction (e.g., the transaction with participant i as the recipient).
[0092] In some embodiments, instead of periodically determining Δ i (l) for each blockchain network by removing (e.g., skipping) one lowest-priority spending transaction at a time, participant i in step 1 can directly determine the global set of spending transactions that participant i can settle by considering its global current balance and the global set of incoming transactions (e.g., U l RecIn i (l)). This determination can skip the minimum number of lower-priority spending transactions such that the sum of the global current balance and the global set of incoming transactions is not less than the sum of the remaining spending transactions. The remaining spending transactions can refer to the global set of spending transactions. After determining the global set of spending transactions, participant f can submit a blockchain transaction (e.g., propose a proposal) to each blockchain network, which includes a subset of the global set of spending transactions associated with each blockchain network. The selection of the global set of spending transactions can be performed by one of the computing systems of participant i by exchanging information (e.g., current balance, incoming transactions, and spending transactions) with other computing systems of participant i.
[0093] In this embodiment, step 1 can be expressed as: determining a first total amount by aggregating a plurality of values associated with a global set of first blockchain transactions available to a participant or entity (the available first blockchain transactions can be determined based on one or more blockchain transactions sent by the transferor of the first blockchain transaction (e.g., the third blockchain transaction as described in sub-step 6 above), and the first blockchain transaction shows the proposed expenditure transaction of the transferor). Among them, the global set of the first blockchain transactions includes one or more first blockchain transactions of each of a plurality of blockchains; determining a second total amount by aggregating a global set of balances, where the global set of balances includes the balances of the blockchain accounts of the entity on each of the plurality of blockchains, and the plurality of blockchains select one or more second blockchain transactions from the global set of second blockchain transactions such that the sum of one or more values associated with the selected one or more second blockchain transactions is not greater than the sum of the first total amount and the second total amount, and the global set of second blockchain transactions includes one or more second blockchain transactions obtained for each of the plurality of blockchains.
[0094] Step 2: On each blockchain network, aggregate the proposals submitted by all participants in the blockchain network through a blockchain contract. In some embodiments, the blockchain contract can submit a blockchain transaction to the blockchain network, and the blockchain network includes a list of aggregated expenditure transactions proposed by the participants in 724A for settlement. The list of aggregated expenditure transactions can be represented as a transaction index list of the aggregated expenditure transactions.
[0095] In some embodiments, the list of aggregated expenditure transactions received during the current iteration can be compared with the list of aggregated expenditure transactions received during the previous iteration to detect convergence (e.g., convergence occurs when the two lists are the same). When all blockchain networks converge, a solution / result of the deadlock resolution process is reached. In some embodiments, this comparison can be performed by the timing service 710.
[0096] Step 3: The computing system obtains one or more blockchain transactions generated by the blockchain contract from each blockchain network, and the one or more blockchain transactions include a plurality of identifiers; determining a subset of one or more first blockchain transactions (e.g., revenue transactions) based on the plurality of identifiers, and repeating steps 1-3 until global convergence is observed. One or more blockchain transactions can refer to the blockchain transactions submitted by the blockchain contract after aggregating the expenditure transactions proposed by the participants in the blockchain during the latest iteration. For example, these aggregated expenditure transactions can allow each participant to determine from the previous iteration t Whether the revenue transaction in (for participant i on blockchain network l during iteration t) is available, and adjust for the next iteration t + 1 by skipping unavailable revenue transactions (e.g., transactions where the transferor did not propose settlement). As the adjustment, participant i can adjust its proposal accordingly.
[0097] As Figure 7 shown, computing system 730A and computing system 730B can observe and retrieve blockchain transactions submitted by blockchain contracts at 726AA and 726AB respectively. Among them, the blockchain transactions include the expenditure transactions proposed by all participants in blockchain 720A during the previous iteration.
[0098] Step 4: Once global convergence is observed, terminate the deadlock resolution process. In some embodiments, the blockchain contract on each blockchain (e.g., 720A, 720B) can determine whether there is local convergence (e.g., whether the proposals received from participants in the corresponding blockchain remain the same in two or more consecutive iterations). It should be noted that a blockchain that reaches local convergence in one iteration may diverge in the next iteration. Therefore, global convergence can be observed when each blockchain reaches its local convergence during the same iteration.
[0099] In some embodiments, each local convergence can result in a blockchain event being recorded. This event is a scheduling signal that can be triggered by the blockchain contract and can be listened to or monitored by a party connected to the blockchain network (e.g., a decentralized application connected to the Ethereum JSON - RPC API). Timing service 710 can monitor each blockchain to observe blockchain events (e.g., in Figure 7 steps 714A and 714B in) indicating local convergence during the same iteration. In some embodiments, if global convergence is observed, timing service 710 can submit blockchain transactions to each blockchain (e.g., 720A and 720B) through its blockchain nodes to announce the result of the deadlock resolution. In some embodiments, the blockchain transactions submitted to the blockchain can include the proposals of local convergence received from blockchain participants. Each proposal can include a list of the participant's expenditure transactions to be settled, and an incremental value indicating the amount to be transferred into or out of the participant's blockchain account on the blockchain. In some embodiments, the incremental value in each proposal can be represented as a homomorphic commitment value, or a homomorphic encrypted value based on the public key shared by the participants (e.g., the public key of the regulatory authority).
[0100] Step 5: Each participant on each blockchain network settles the proposed spending transactions. This step can be triggered in various ways. In some embodiments, each participant may monitor (e.g., via its computing system) the blockchain for the purpose of monitoring the globally convergent blockchain transactions submitted by the timing service 710. Once such a blockchain transaction is observed, the participant may proceed to settle the spending transactions it proposed in the last iteration. Since each proposal includes an incremental value indicating the redistribution of assets between the participant's blockchain accounts, the participant may first perform the redistribution and then settle the proposed spending transactions. These operations (e.g., asset redistribution and settlement of spending transactions) may include multiple steps, such as updating account balances and actual asset transfers. These steps can be performed in a synchronous manner (e.g., updating account balances while transferring assets) or in an asynchronous manner (e.g., updating account balances in a timely manner to reflect asset transfers and cleared transactions, but the actual asset transfer may occur at a later time). For example, the blockchain network may support the creation and trading of blockchain-based assets such as tokens, cryptocurrencies. One or more participants in a public blockchain network may execute one or more asset transactions with each other by adding one or more blockchain transactions to the blockchain associated with the blockchain network. Through blockchain transactions, blockchain-based assets can be transferred between the participants' blockchain accounts, and the balances of the blockchain accounts are updated accordingly. In another example, the blockchain network can be used to record the ownership and transactions of off-chain assets. One or more participants may participate in asset transactions independently of the blockchain network and record the details of the asset transactions on the blockchain associated with the blockchain network. Alternatively, one or more participants may commit to an asset transaction by adding one or more blockchain transactions representing the asset transaction to the blockchain. One or more participants may then settle the committed asset transaction through one or more off-chain channels.
[0101] In some embodiments, information service providers such as notary service providers or oracles 770 may be employed to observe the global convergence, verify that no participant has created or destroyed any assets or liquidity, sign on the deadlock result, and submit a blockchain transaction with its signature to the blockchain (e.g., in steps 772A and 772B) so that each participant can perform asset redistribution and spending transaction settlement. For example, since the final proposals submitted by each participant on each blockchain network (e.g., the proposals shown in the section “(b) Cross-network deadlock resolution” in Figure 8 not only include transaction identifiers but also the amounts to be transferred into or out of the participant's blockchain accounts on the blockchain network (i.e., Δ i (l) of participant i's blockchain account on blockchain j), the information service provider (e.g., oracle 770) can verify that for each participant i, the aggregated transfer amount should be equal to 0, i.e., ∑ l Δi (l) = 0, where l∈{all the blockchain networks}. In some embodiments, Δ i (l) can be protected by a Pedersen commitment (or other suitable homomorphic encryption / commitment scheme) as COM(Δ(l)). In this case, we can l COM(Δ i (l))=1Verify∑ l Δ i (l) = 0, where П represents the product operation. Once the proposal is verified, the information service provider can sign the proposal with its private key and submit the signature back to the corresponding blockchain network in the form of a blockchain transaction. Subsequently, the smart contract on each blockchain network can verify the received signature based on the public key of the information service provider. Once the verification is successful, the smart contract can settle all payment messages in the aggregated set and update the account balance of each participant based on the corresponding incremental value and the aggregated result.
[0102] Figure 8 An example application of blockchain-based deadlock resolution in accordance with some embodiments is shown. Figure 8 The "(a) Before Net Settlement" section in Figure 1 shows an initial setup, which includes two blockchain networks X and Y, and four participants A, B, C, and D (e.g., banks). As shown in the figure, A, B, and C participate in network X, and A, B, and D participate in network Y. A's blockchain account in network X has a spending transaction obligation, expressed as:
[0103] (Ind(2),Amt(Com(12,*)),Rec(C))
[0104] Where Ind(2) is the unique identifier of the spending transaction in network X, Amt(Com(12, *)) is the transaction amount protected by the Pedersen commitment (in this case, 12), and Rec(C) specifies the recipient of the transaction (in this case, C). It should be noted that the transaction amount can be protected by other suitable homomorphic encryption schemes or homomorphic commitment schemes, which are not limited in this specification. For simplicity, the random number required for the Pedersen commitment representation is represented as *.
[0105] Similarly, C's blockchain account in network X has an outgoing transaction obligation (Ind(1), Amt(Com(5, *)), Rec(B)), representing that C pays B an amount of 5 in network X. B's blockchain account in network Y has an outgoing transaction (Ind(1), Amt(Com(20, *)), Rec(D)), representing that B pays D an amount of 20 in network Y. D's blockchain account in network Y has an outgoing transaction (Ind(2), Amt(Com(25, *)), Rec(A)), representing that D pays A an amount of 25 in network Y.
[0106] In addition, the current balance of A's blockchain account in network X is 5, as Figure 8 shown, and this balance is also protected by a Pedersen commitment in the form of Com(5, *). Similarly, the current balances of B and C in network X are Com(5, *), and the current balances of A, B, and D in network Y are Com(5, *).
[0107] As Figures 1 - 7 shown, when a participant receives a signal (e.g., by observing blockchain transactions submitted by the timing service 360 in Figure 6 or by following a pre - negotiated schedule), the deadlock resolution process can be started. The deadlock resolution process can include multiple iterations. During each iteration, each participant presents a list of outgoing transactions that it wants to settle.
[0108] Referring to Figure 8 the section of "(b) Cross - network deadlock resolution" in, during the first iteration (e.g., the 1st round of proposals), A first collects all its incoming transactions, all its outgoing transactions, and all its current balances. In this case, A has an incoming transaction from D in network Y: (Ind(2), Amt(Com(25, *)), Rec(A)), and an outgoing transaction on network X: (Ind(2), Amt(Com(12, *)), Rec(C)). A has two current balances corresponding to its two blockchain accounts: 5 each. Then A assumes that all its incoming transactions will be received (e.g., paid by the transferor) and determines the outgoing transactions that it can settle. In this case, the total incoming transaction from D to A provides 25, and A's total current balance is 10 (5 from network X and 5 from network Y), so A's available total assets are 35. Since A has only one outgoing transaction of 12 to C, it has enough assets to settle (Ind(2), Amt(Com(12, *)), Rec(C)). However, A's current balance in network X is only 5, and there is no incoming transaction to A in network X. Therefore, to settle the outgoing transaction, A can use an incremental value (e.g., Δ A(X)) is determined as the amount transferred from other blockchain accounts of A. In this case, A may need to reallocate 7 (e.g., 12 - 5 = 7) from its blockchain account in network Y to its blockchain account in network X. Therefore, A (e.g., through A's computing system associated with network X) can submit a blockchain transaction to network X that includes the following proposal:
[0109] {Payout = [Ind(2)], Delta = COM(7, *), π A}
[0110] where Payout represents the list of payout transactions settled by A in network X, Delta specifies the amount to be transferred into or out of A's blockchain account in network X (e.g., a positive 7 indicates that A needs to transfer in 7), and π A represents a range proof that proves that the settlement balance of A after settling the payout transactions in Payout is non - negative. In some embodiments, π A can be optional. In this case, Payout has the payout transaction index Ind(2) (representing the payout transaction from A to C in network X).
[0111] Similarly, A can also submit a blockchain transaction to network Y that includes the following proposal:
[0112] {Payout = [], Delta = COM(-7, *), π A}
[0113] where Payout is empty because A has no payout transactions to settle in network Y, Delta has a negative 7, indicating that A proposes to transfer out 7 from its blockchain account in network Y, and π A is an optional range proof.
[0114] Following a similar process, as Figure 8 shown, participants B, C, D can also propose their proposals in the first iteration. For C and D, since they only participate in one network, their Delta is 0 (indicating that they will not transfer in or out any amount).
[0115] These proposals (e.g., blockchain transactions) can be submitted to the blockchain contracts in each network. The blockchain contract can aggregate all the expenditure transactions proposed by all participants in the corresponding network. For example, after the first iteration, the blockchain contract in Network X can aggregate the list of proposed expenditure transactions, including {Ind(2), Ind(1)}, where Ind(2) is proposed by A and Ind(1) is proposed by C. Similarly, the blockchain contract in Network Y can aggregate the list including {Ind(1), Ind(2)}, where Ind(1) is proposed by B and Ind(2) is proposed by D.
[0116] Each participant in subsequent iterations can use the aggregated list of expenditure transactions to determine whether its assumed revenue transaction is actually available. For example, in Iteration 1, A assumes that its revenue transaction from D in Network Y (Ind(2), Amt(Com(25, *)), Rec(A)) is available. After Iteration 1, the aggregated list shows that Transaction Ind(1) in Network Y is proposed by D, which means that this revenue transaction is still available during subsequent iterations. Therefore, A can propose the same proposal in Network X and Network Y as in the last iteration (since the revenue transaction, current balance, and expenditure transaction have not changed).
[0117] Following a similar process, the revenue transactions of B in Networks X and Y will also not change in Iteration 2. Therefore, B can propose the same proposal as in Iteration 1. Similarly, C and D can also propose the same proposals as in Iteration 1 in Iteration 2.
[0118] In some embodiments, each blockchain contract on the network can determine whether the received proposals converge (e.g., whether the proposals received during this iteration are the same as those received during the previous iteration). If convergence is observed, each blockchain contract can record a blockchain event to announce local convergence corresponding to the network. A timing service or other suitable cross-network coordinator can observe such local convergence events and determine whether global convergence has been achieved. In this case, convergence has been observed in both networks, so global convergence has been achieved, and the deadlock resolution result has been found. For example, after the notary service confirms that the sum of the increments of each participant across Networks X and Y is zero, the signature from the notary may trigger a net settlement process to settle all participants' proposals and update their post-settlement balances simultaneously in each network. As Figure 8 shown in the section “(c) After net settlement”, A can transfer an amount of 7 from its blockchain account in Network Y to its blockchain account in Network X; B can transfer an amount of 15 from its blockchain account in Network X to its blockchain account in Network Y. Net settlement may be required to actually settle (e.g., pay) the proposed expenditure transactions.
[0119] Figure 9 illustrates an example method for implementing blockchain-based deadlock resolution according to some embodiments. Method 900 may be executed by a device, apparatus, or system for optimizing resource allocation. Method 900 may be executed by Figures 1 to 8 one or more modules / components of the illustrated environment or system. For example, Figure 4 the computing system 400 in. The operations of method 900 presented below are intended to be illustrative. Depending on the embodiment, method 900 may include additional, fewer, or alternative steps executed in various orders or in parallel.
[0120] Block 910 includes: for each of a plurality of blockchains: obtaining, via a computing system associated with an entity, one or more first blockchain transactions respectively corresponding to one or more revenue value transfers associated with the entity, and one or more second blockchain transactions respectively corresponding to one or more expenditure value transfers associated with the entity, from the blockchain.
[0121] Block 920 includes: one or more iterations of a transaction selection process performed by a computing system associated with the entity. In some embodiments, each of the one or more iterations of the transaction selection process includes: determining a subset of one or more first blockchain transactions; selecting a subset of one or more second blockchain transactions based on the determined subset of one or more first blockchain transactions and the balance of the entity's blockchain account on the blockchain; determining an incremental value associated with the blockchain based on the subset of one or more first blockchain transactions, the subset of one or more second blockchain transactions, and the balance of the blockchain account on the blockchain, wherein the incremental value corresponds to a value transfer between the blockchain account on the blockchain and one or more different blockchain accounts of the entity on one or more different blockchains among the plurality of blockchains; and adding a third blockchain transaction to the blockchain, the third blockchain transaction including an encrypted version of one or more identifiers corresponding to the selected subset of one or more second blockchain transactions and the incremental value.
[0122] In some embodiments, adding the third blockchain transaction to the blockchain includes: sending the third blockchain transaction to one or more blockchain nodes associated with the blockchain for addition to the blockchain. Wherein, the third blockchain transaction invokes a blockchain contract on the blockchain, and the blockchain contract is executable to aggregate one or more identifiers in the third blockchain transaction with a plurality of other identifiers in a plurality of other blockchain transactions.
[0123] In some embodiments, determining a subset of one or more first blockchain transactions includes: for a first iteration of one or more iterations of a transaction selection process: determining the subset of the one or more first blockchain transactions to include each of the one or more first blockchain transactions; for each of one or more iterations of the one or more iterations of the transaction selection process other than the first iteration, obtaining, by a computing system, from a blockchain one or more blockchain transactions generated by a blockchain contract, the one or more blockchain transactions including a plurality of identifiers; and determining a subset of the one or more first blockchain transactions based on the plurality of identifiers.
[0124] In some embodiments, selecting a subset of one or more second blockchain transactions includes: determining a first total by aggregating a plurality of values associated with a global set of first blockchain transactions, wherein the global set of first blockchain transactions includes one or more first blockchain transactions of each of a plurality of blockchains; determining a second total by aggregating a global set of balances, wherein the global set of balances includes the balances of blockchain accounts of an entity on each of the plurality of blockchains; and selecting one or more second blockchain transactions from a global set of second blockchain transactions such that the sum of one or more values associated with the selected one or more second blockchain transactions is not greater than the sum of the first total and the second total, wherein the global set of second blockchain transactions includes one or more second blockchain transactions obtained for each of the plurality of blockchains.
[0125] In some embodiments, the global set of second blockchain transactions is respectively associated with a priority ranking; selecting one or more second blockchain transactions from the global set of second blockchain transactions includes selecting one or more second blockchain transactions based on the priority ranking.
[0126] In some embodiments, the priority ranking of the global set of second blockchain transactions is determined chronologically.
[0127] In some embodiments, determining an incremental value associated with a blockchain includes: obtaining a first total associated with a subset of one or more first blockchain transactions and a second total associated with a subset of one or more second blockchain transactions; and determining the incremental value by subtracting the sum of the first total and the blockchain account balance from the second total.
[0128] In some embodiments, an encrypted version of the incremental value is generated based on a homomorphic commitment scheme or a homomorphic encryption scheme.
[0129] In some embodiments, each blockchain transaction among one or more first blockchain transactions and one or more second blockchain transactions includes: an index corresponding to the blockchain transaction, a homomorphic encryption version of the amount corresponding to the value transfer, and an identifier associated with the recipient of the corresponding value transfer, wherein the homomorphic encryption version of the value transfer amount is based on a homomorphic commitment scheme or a homomorphic encryption scheme.
[0130] In some embodiments, the third blockchain transaction further includes a zero - knowledge range proof demonstrating that a first sum is not less than a second sum, where the first sum includes the balance of a blockchain account on the blockchain and a first total associated with a subset of one or more first blockchain transactions, and the second sum includes a second total associated with a subset of one or more second blockchain transactions and an incremental value.
[0131] Block 930 includes: in response to obtaining a fourth blockchain transaction from the blockchain, terminating one or more iterations of the transaction selection process, where the fourth blockchain transaction indicates the convergence of transaction selection on each blockchain among a plurality of blockchains.
[0132] In some embodiments, method 900 may further include, prior to performing one or more iterations of the transaction selection process: obtaining, by the computing system, a blockchain transaction indicating the start of the transaction selection process in each blockchain.
[0133] In some embodiments, method 900 may further include, for each blockchain among a plurality of blockchains: obtaining a fifth blockchain transaction from the blockchain, where the fifth transaction includes a proof demonstrating that the sum of a global set of incremental values related to an entity is equal to zero, and the global set of incremental values includes incremental values associated with each of the plurality of blockchains.
[0134] Figure 10 An example block diagram of a computing system for implementing blockchain - based deadlock resolution according to some embodiments is shown. The components of computer system 1000 presented below are intended to be illustrative. Depending on the implementation, computer system 1000 may include more, fewer, or alternative components.
[0135] Computer system 1000 may be an example implementation of one or more components of computing system 400. Figures 1 to 9 The illustrated processes and methods may be implemented by computer system 1000. Computer system 1000 may include one or more processors and one or more non - transient computer - readable storage media (e.g., one or more memories), the non - transient computer - readable storage media being coupled to the one or more processors and configured with instructions executable by the one or more processors to cause the system or device (e.g., the processor) to perform the above - described methods, such as the instructions of method 900. Computer system 1000 may include various units / modules corresponding to the instructions (e.g., software instructions).
[0136] In some embodiments, the computer system 1000 may be referred to as a device for performing blockchain-based deadlock resolution. The device may include an acquisition module 1010, a transaction selection module 1020, and a termination module 1030. In some embodiments, the acquisition module 1010 may, for each of a plurality of blockchains, acquire one or more first blockchain transactions respectively corresponding to one or more revenue value transfers associated with an entity and one or more second blockchain transactions respectively corresponding to one or more expenditure value transfers associated with the entity.
[0137] In some embodiments, the transaction selection module 1020 may perform one or more iterations of a transaction selection process, wherein each of the one or more iterations of the transaction selection process includes: determining a subset of the one or more first blockchain transactions; selecting a subset of the one or more second blockchain transactions based on the determined subset of the one or more first blockchain transactions and the balance of the blockchain account of the entity on the blockchain; determining an incremental value associated with the blockchain based on the subset of the one or more first blockchain transactions, the subset of the one or more second blockchain transactions, and the balance of the blockchain account on the blockchain, wherein the incremental value corresponds to a value transfer between the blockchain account on the blockchain and one or more different blockchain accounts of the entity on one or more different blockchains among the plurality of blockchains; and adding a third blockchain transaction to the blockchain, the third blockchain transaction including an encrypted version of one or more identifiers corresponding to the selected subset of the one or more second blockchain transactions and the incremental value.
[0138] In some embodiments, the termination module 1030 may terminate one or more iterations of the transaction selection process in response to obtaining a fourth blockchain transaction from the blockchain, the fourth blockchain transaction indicating convergence of transaction selection on each of the plurality of blockchains.
[0139] The techniques described herein may be implemented by one or more special-purpose computing devices. The special-purpose computing device may be a desktop computer system, a server computer system, a portable computer system, a handheld device, a networking device, or any other device or combination of devices that includes hardwired and / or program logic to implement the techniques. The special-purpose computing device may be implemented as a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination thereof. The computing device is generally controlled and coordinated by operating system software. Conventional operating systems control and schedule computer processes for execution, perform memory management, provide file systems, networking, I / O services, and provide user interface functionality, such as a graphical user interface (“GUI”), and the like. The various systems, apparatuses, storage media, modules, and units described herein may be implemented in a special-purpose computing device or in one or more computing chips of one or more special-purpose computing devices. In some embodiments, the instructions described herein may be implemented in a virtual machine on a special-purpose computing device. When executed, the instructions may cause the special-purpose computing device to perform the various methods described herein. The virtual machine may include software, hardware, or a combination thereof.
[0140] Figure 11 FIG. shows an example block diagram of a computer system in which any of the embodiments described herein may be implemented. The computing device may be used to implement Figures 1 to 10 one or more components of the systems and methods shown. The computing device 1100 may include a bus 1102 or other communication mechanism for communicating information, and one or more hardware processors 1104 coupled to the bus 1102 for processing information. The hardware processor 1104 may be, for example, one or more general-purpose microprocessors.
[0141] The computing device 1100 may also include a main memory 1107 coupled to the bus 1102 for storing information and instructions executable by the processor 1104, such as random-access memory (RAM), cache, and / or other dynamic storage devices. The main memory 1107 may also be used to store temporary variables or other intermediate information during the execution of instructions to be executed by the processor 1104. When these instructions are stored in a storage medium accessible by the processor 1104, these instructions may cause the computing device 1100 to appear as a special-purpose machine customized to perform the operations specified in the instructions. The main memory 1107 may include non-volatile media and / or volatile media. Non-volatile media may include, for example, optical discs or magnetic disks. Volatile media may include dynamic memory. Common forms of media include, for example, floppy disks, flexible disks, hard disks, solid state drives, magnetic tape, or any other magnetic data storage media, CD-ROM, any other optical data storage media, any physical media with hole patterns, RAM, PROM, and EPROM, FLASH-EPROM, NVRAM, any other memory chip or cartridge, or their networked versions.
[0142] The computing device 1100 may implement the techniques described herein using custom hardwired logic, one or more ASICs or FPGAs, firmware, and / or program logic, where the firmware and / or program logic, in combination with the computing device, may cause the computing device 1100 to be a special-purpose machine or program the computing device 1100 as a special-purpose machine. According to one embodiment, the techniques herein are performed by the computing device 1100 in response to the processor 1104 executing one or more sequences of one or more instructions contained in the main memory 1107. These instructions may be read from another storage medium, such as the storage device 1109, into the main memory 1107. Execution of the sequence of instructions contained in the main memory 1107 may cause the processor 1104 to perform the process steps described herein. For example, the processes / methods disclosed herein may be implemented by computer program instructions stored in the main memory 1107. When these instructions are executed by one or more processors 1104, they may perform the steps shown in the corresponding figures and described above. In an alternative embodiment, hardwired circuitry may be used in place of or in combination with software instructions.
[0143] The computing device 1100 further includes a communication interface 1110 coupled to the bus 1102. The communication interface 1110 may provide two-way data communication coupled to one or more network links that connect to one or more networks. As another example, the communication interface 1110 may be a local area network (LAN) card for providing a data communication connection to a compatible LAN (or a WAN component communicating with a WAN). A wireless link may also be implemented.
[0144] The performance of certain operations can be distributed among processors, not only residing within a single machine but deployed across multiple machines. In some example embodiments, a processor or a processor implementation engine can be located in a single geographical location (e.g., within a home environment, an office environment, or a server farm). In other example embodiments, the processor or the processor-implemented engine can be distributed across multiple geographical locations.
[0145] Each process, method, and algorithm described in the foregoing section can be implemented in code modules executed by one or more computer systems or computer processors including computer hardware, and is fully or partially automatically implemented by the code modules. The processes and algorithms can be partially or fully implemented in dedicated circuits.
[0146] When the functions disclosed herein are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium executable by a processor. All or part of the specific technical solutions disclosed herein, or aspects contributing to the current technology, can be embodied in the form of a software product. The software product can be stored in a storage medium, which includes multiple instructions for causing a computing device (which can be a personal computer, a server, a network device, etc.) to execute all or some of the steps of the methods of the embodiments of this application. The storage medium can include a flash drive, a portable hard disk drive, a ROM, a RAM, a disk, an optical disc, other media operable to store program code, or any combination thereof.
[0147] Specific embodiments also provide a system that includes a processor and a non-transitory computer-readable storage medium storing instructions executable by the processor. Specific embodiments also provide a non-transitory computer-readable storage medium configured with instructions executable by one or more processors to cause the one or more processors to perform operations corresponding to the steps in any of the methods of the foregoing embodiments.
[0148] The embodiments disclosed herein can be implemented by a cloud platform, a server, or a server group (collectively referred to as a "service system") that interacts with a client. The client can be a terminal device or a client registered by a user on the platform, where the terminal device can be a mobile terminal, a personal computer (PC), and any device on which a platform application can be installed.
[0149] The various features and processes described above can be used independently of each other or can be combined in various ways. All possible combinations and sub - combinations will fall within the scope of the present disclosure. Additionally, in some embodiments, certain methods or process flowcharts may be omitted. The methods and processes described herein are also not limited to any particular sequence, and the associated flowcharts or states can be executed in other appropriate sequences. For example, the described flowcharts or states can be executed in an order different from that specifically disclosed, or multiple flowcharts or states can be combined in a single flowchart or state. Example flowcharts or states can be executed serially, in parallel, or in some other manner. Boxes or states can be added to or removed from the disclosed exemplary embodiments. The exemplary systems and components described herein can be constructed differently. For example, elements can be added, removed, or rearranged compared to the disclosed exemplary embodiments.
[0150] The various operations of the exemplary methods described herein can be performed at least in part by an algorithm. The algorithm can be included in program code or instructions stored in a memory (e.g., the non - transitory computer - readable storage medium described above). Such an algorithm can include a machine - learning algorithm. In some embodiments, a machine - learning algorithm may not explicitly program a computer to perform a function, but can learn from training data to establish a predictive model for performing the function.
[0151] The various operations of the exemplary methods described herein can be performed at least in part by one or more processors that are (e.g., by software) temporarily configured or permanently configured to perform the relevant operations. Whether temporarily configured or permanently configured, such processors can constitute a processor - implemented engine that runs to perform one or more of the operations or functions described herein.
[0152] Similarly, the methods described herein can be at least in part implemented by a processor, where a particular processor or multiple processors are examples of hardware. For example, at least some of the operations of the method can be performed by one or more processors or processor - implemented engines. Additionally, one or more processors can also be operable to support the performance of relevant operations in a “cloud computing” environment or as “software as a service” (SaaS). For example, at least some operations can be performed by a set of computers (e.g., machines including processors), and these operations can be accessed via a network (e.g., the Internet) and via one or more appropriate interfaces (e.g., application programming interfaces (APIs)).
[0153] The performance of certain operations can be distributed among processors, not only residing within a single machine but deployed across multiple machines. In some example embodiments, the processor or processor implementation engine can be located in a single geographical location (e.g., within a home environment, an office environment, or a server farm). In other example embodiments, the processor or processor-implemented engine can be distributed across multiple geographical locations.
[0154] In this document, multiple instances can implement components, operations, or structures described as a single instance. Although the individual operations of one or more methods are shown and described as separate operations, one or more of these separate operations can be performed simultaneously and do not require that the operations be performed in the order shown. Structures and functions presented as separate components in example configurations can be implemented as a combined structure or component. Similarly, structures and functions presented as a single component can be implemented as separate components. These and other variations, modifications, additions, and improvements fall within the scope of the subject matter of this document.
[0155] Although the overview of the subject matter has been described with reference to specific example embodiments, various modifications and changes can be made to these embodiments without departing from the broader scope of the embodiments of the present disclosure. If more than one disclosure or concept is actually disclosed, these embodiments of the subject matter can be referred to herein individually or collectively by the term "invention" merely for convenience and not intended to actively limit the scope of the present application to any single disclosure or concept.
[0156] The embodiments shown herein are described in sufficient detail to enable those skilled in the art to practice the disclosed teachings. Other embodiments can be used and other embodiments can be derived therefrom such that structural and logical substitutions and modifications can be made without departing from the scope of the present application. Accordingly, the detailed description should not be construed as limiting, and the scope of the embodiments is defined only by the appended claims and the full scope of equivalents to which those claims are entitled.
[0157] Any process descriptions, elements, or boxes in the flowcharts described and / or depicted in this document should be understood to potentially represent modules, segments, or portions of code that include one or more executable instructions for implementing specific logical functions or steps in the process. Alternative implementations are included within the scope of the embodiments described herein, where, as understood by those skilled in the art, depending on the functions involved, the elements or functions shown or discussed in the embodiments described herein can be deleted, executed out of order, including substantially simultaneously or in reverse order.
[0158] Unless otherwise expressly stated or the context otherwise indicates, the "or" used in this document is inclusive rather than exclusive. Thus, unless otherwise expressly stated or the context otherwise indicates, in this document, "A, B, or C" means "A, B, A and B, A and C, B and C, or A, B, and C". Additionally, unless otherwise expressly stated or the context otherwise indicates, "and" can be used both conjunctively and disjunctively. Thus, in this document, unless otherwise expressly stated or the context otherwise indicates, "A and B" means "A and B conjunctively, or A disjunctively and B disjunctively". Further, multiple separate instances can be provided for a resource, operation, or structure described herein as a single instance. Additionally, the boundaries between various resources, operations, engines, and data stores are to some extent arbitrary and specific operations are illustrated in the context of a particular illustrative configuration. Other allocations of functionality are envisioned and may fall within the scope of various embodiments of this application. Generally, structures and functions presented as separate resources in an example configuration can be implemented as a combined structure or resource. Similarly, structures and functions presented as a single resource can be implemented as separate resources. These and other variations, modifications, additions, and improvements are to fall within the scope of this application as represented by the appended claims. Accordingly, the specification and drawings are to be regarded as illustrative rather than restrictive.
[0159] The terms "comprising" or "including" are used to denote the presence of the subsequently recited feature, but do not preclude the addition of other features. Unless otherwise expressly stated or otherwise understood in the context in which it is used, conditional language such as "may", "can", "might", or "could" generally is intended to convey that certain embodiments include, while other embodiments do not include, certain features, elements, and / or steps. Thus, such conditional language generally does not imply that the features, elements, and / or steps are in any way required for one or more embodiments or that one or more embodiments necessarily include logic for deciding, with or without user input or prompting, whether or not these features, elements, and / or steps are included or are to be performed in any particular embodiment.
Claims
1. A computer-implemented method for blockchain-based deadlock resolution, including, for each of multiple blockchains: Obtaining, by a computing system associated with an entity, one or more first blockchain transactions and one or more second blockchain transactions from the blockchain, where the one or more first blockchain transactions respectively correspond to one or more revenue value transfers associated with the entity, and the one or more second blockchain transactions respectively correspond to one or more expenditure value transfers associated with the entity; Performing one or more iterations of a transaction selection process by the computing system associated with the entity, where Each of the one or more iterations of the transaction selection process includes: Determining a subset of the one or more first blockchain transactions; Selecting a subset of the one or more second blockchain transactions based on the determined subset of the one or more first blockchain transactions and the balance of the entity's blockchain account on the blockchain; Determining an incremental value associated with the blockchain based on the subset of the one or more first blockchain transactions, the subset of the one or more second blockchain transactions, and the balance of the blockchain account on the blockchain, where the incremental value corresponds to a value transfer between the blockchain account on the blockchain and one or more different blockchain accounts of the entity on one or more different blockchains among the multiple blockchains; and Adding a third blockchain transaction to the blockchain, the third blockchain transaction including an encrypted version of one or more identifiers corresponding to the selected subset of the one or more second blockchain transactions and the incremental value; and Terminating the one or more iterations of the transaction selection process in response to obtaining a fourth blockchain transaction from the blockchain, the fourth blockchain transaction indicating the convergence of transaction selection on each blockchain among the multiple blockchains.
2. The method according to claim 1 further comprises: Before performing the one or more iterations of the transaction selection process: Obtaining, by the computing system, a blockchain transaction indicating the start of the transaction selection process in each of the blockchains.
3. The method according to claim 1, wherein The adding the third blockchain transaction to the blockchain includes: Sending the third blockchain transaction to one or more blockchain nodes associated with the blockchain for addition to the blockchain, where the third blockchain transaction invokes a blockchain contract on the blockchain and executes the blockchain contract to aggregate the one or more identifiers in the third blockchain transaction with multiple other identifiers in multiple other blockchain transactions.
4. The method according to claim 3, wherein The determining the subset of the one or more first blockchain transactions includes: For the first iteration of the one or more iterations of the transaction selection process: Determining that the subset of the one or more first blockchain transactions includes each of the one or more first blockchain transactions; and For each of the one or more iterations other than the first iteration of the one or more iterations of the transaction selection process: Obtain, by means of the computing system, one or more blockchain transactions generated by the blockchain contract from the blockchain, the one or more blockchain transactions including a plurality of identifiers; and Determine the subset of the one or more first blockchain transactions based on the plurality of identifiers.
5. The method according to claim 4, wherein The selecting the subset of the one or more second blockchain transactions includes:[[]] Determine a first total by aggregating a plurality of values associated with a global set of first blockchain transactions, wherein the global set of first blockchain transactions includes the one or more first blockchain transactions of each of the plurality of blockchains; Determine a second total by aggregating a global set of balances, wherein the global set of balances includes the balances of the blockchain accounts of the entity on each of the plurality of blockchains; and Select one or more second blockchain transactions from a global set of second blockchain transactions such that the sum of one or more values associated with the selected one or more second blockchain transactions is not greater than the sum of the first total and the second total, wherein the global set of second blockchain transactions includes one or more second blockchain transactions obtained for each of the plurality of blockchains.
6. The method according to claim 5, wherein: The global set of second blockchain transactions is respectively associated with a priority ranking; and The selecting the one or more second blockchain transactions from the global set of second blockchain transactions includes selecting the one or more second blockchain transactions based on the priority ranking.
7. The method according to claim 6, wherein, The priority ranking of the global set of second blockchain transactions is determined in chronological order.
8. The method according to any one of claims 1-7, wherein, The determining the incremental value associated with the blockchain includes:[[]] Obtain a first total associated with the subset of the one or more first blockchain transactions and a second total associated with the subset of the one or more second blockchain transactions; Determine the incremental value by subtracting the sum of the first total and the balance of the blockchain account from the second total.
9. The method according to any one of claims 1-7, wherein, The encrypted version of the incremental value is generated based on a homomorphic commitment scheme or a homomorphic encryption scheme.
10. The method according to any one of claims 1-7, wherein each blockchain transaction of the one or more first blockchain transactions and the one or more second blockchain transactions includes:[[]] An index corresponding to the blockchain transaction, A homomorphic encrypted version of the amount corresponding to the value transfer, and An identifier associated with the recipient of the corresponding value transfer, wherein the homomorphic encrypted version of the value transfer amount is based on a homomorphic commitment scheme or a homomorphic encryption scheme.
11. The method according to claim 1, wherein, The third blockchain transaction further includes a zero-knowledge range proof that the first sum is not less than the second sum, the first sum including the balance of the blockchain account on the blockchain and the first total associated with the subset of the one or more first blockchain transactions, and the second sum including the second total associated with the subset of the one or more second blockchain transactions and the incremental value.
12. The method according to any one of claims 1-7 further includes, for each of the plurality of blockchains: Obtain from the blockchain a proof that the sum of the global set of incremental values associated with the entity is equal to zero, where The global set of the increment values includes the increment values associated with each of the plurality of blockchains.
13. A non-transitory computer-readable storage medium configured with instructions executable by one or more processors to cause the one or more processors to perform the method according to any one of claims 1-12.
14. An apparatus for blockchain-based deadlock resolution, including a plurality of modules for performing the method according to any one of claims 1-12.
15. A system for blockchain-based deadlock resolution, comprising one or more processors and one or more non-transitory computer-readable memories coupled to the one or more processors and configured with instructions that can be executed by the one or more processors to cause the system to perform operations, including: For each of the plurality of blockchains: Obtain, by a computing system associated with an entity, one or more first blockchain transactions and one or more second blockchain transactions from the blockchain, wherein the one or more first blockchain transactions respectively correspond to one or more revenue value transfers associated with the entity, and the one or more second blockchain transactions respectively correspond to one or more expenditure value transfers associated with the entity; Perform one or more iterations of a transaction selection process by the computing system associated with the entity, wherein each of the one or more iterations of the transaction selection process includes: Determine a subset of the one or more first blockchain transactions; Select a subset of the one or more second blockchain transactions based on the determined subset of the one or more first blockchain transactions and the balance of the blockchain account of the entity on the blockchain; Determine an increment value associated with the blockchain based on the subset of the one or more first blockchain transactions, the subset of the one or more second blockchain transactions, and the balance of the blockchain account on the blockchain, wherein the increment value corresponds to a value transfer between the blockchain account on the blockchain and one or more different blockchain accounts of the entity on one or more different blockchains among the plurality of blockchains; and Add a third blockchain transaction to the blockchain, the third blockchain transaction including one or more identifiers corresponding to the selected subset of the one or more second blockchain transactions and an encrypted version of the increment value; and Terminate the one or more iterations of the transaction selection process in response to obtaining a fourth blockchain transaction from the blockchain, the fourth blockchain transaction indicating the convergence of the transaction selection on each of the plurality of blockchains.
16. The system according to claim 15, wherein, The operation further includes, before performing the one or more iterations of the transaction selection process: Obtain, by the computing system, a blockchain transaction indicating the start of the transaction selection process in each of the blockchains.
17. The system according to claim 15, wherein The adding the third blockchain transaction to the blockchain includes: Send the third blockchain transaction to one or more blockchain nodes associated with the blockchain for addition to the blockchain, wherein the third blockchain transaction invokes a blockchain contract on the blockchain and executes the blockchain contract to aggregate the one or more identifiers in the third blockchain transaction with multiple other identifiers in multiple other blockchain transactions.
18. The system according to claim 17, wherein, The determining the subset of the one or more first blockchain transactions includes: For a first iteration of the one or more iterations of the transaction selection process: Determining that the subset of the one or more first blockchain transactions includes each of the one or more first blockchain transactions; and For each of the one or more iterations of the one or more iterations of the transaction selection process other than the first iteration: By the computing system, obtain from the blockchain one or more blockchain transactions generated by the blockchain contract, the one or more blockchain transactions including multiple identifiers; and Based on the multiple identifiers, determine the subset of the one or more first blockchain transactions.
19. The system according to claim 18, wherein The selecting the subset of the one or more second blockchain transactions includes: Determine a first total by aggregating multiple values associated with a global set of first blockchain transactions, wherein the global set of first blockchain transactions includes the one or more first blockchain transactions of each of the multiple blockchains; Determine a second total by aggregating a global set of balances, wherein the global set of balances includes the balances of the blockchain accounts of the entity on each of the multiple blockchains; and Select one or more second blockchain transactions from a global set of second blockchain transactions such that the sum of the one or more values associated with the selected one or more second blockchain transactions is not greater than the sum of the first total and the second total, wherein the global set of second blockchain transactions includes one or more second blockchain transactions obtained for each of the multiple blockchains.
20. The system according to any one of claims 15-19, wherein, The determining the incremental value associated with the blockchain includes: Obtain a first total associated with the subset of the one or more first blockchain transactions and a second total associated with the subset of the one or more second blockchain transactions; Subtract the sum of the first total and the balance of the blockchain account from the second total to determine the incremental value.
Citation Information
Patent Citations
System and method for parallel-processing blockchain transactions
CN110869967A
Contract management system and method
US20180232803A1