Methods, systems and apparatus for managing transactions in multiple blockchain networks
Through the computing system, the problem of managing multiple blockchain network transactions is solved, and the association identification and hidden information of cross-chain transactions are realized, and the efficiency of transaction management and supervision is improved.
Patent Information
- Application Number
- CN202110757940.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-07-03
- Filing Date
- 2021-07-05
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2041-07-05
AI Technical Summary
It is difficult for the prior art to effectively manage transactions in multiple blockchain networks, especially identify related transactions and export hidden information.
The computing system identifies HTLC transactions in different blockchain networks, and identifies cross-chain transactions based on the time order of transactions and hash values, and derives hidden information of cross-chain transactions based on these associations.
It realizes the association identification and export of hidden information of multiple blockchain network transactions, helping financial institutions and other entities better manage and supervise cross-chain transactions.
Smart Images

Figure CN113595733B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to methods, systems and apparatus for managing transactions in multiple blockchain networks. Background Art
[0002] Ledgers are often used to record the history of transactions such as economic and financial activities in an organization. In order to maintain an accurate history of application data, applications with ledger-like functionality are built (for example, custom audit tables or audit trails created in relational databases). However, building such applications is time-consuming and prone to human error. In addition, since relational databases are not always immutable, any changes to the data are difficult to track and verify.
[0003] A distributed ledger system (DLS), which may also be referred to as a consensus network and / or a blockchain network, enables participating entities to store data securely and immutably. Without reference to any specific use case, a DLS is often referred to as a blockchain network. Examples of types of blockchain networks may include public blockchain networks, private blockchain networks, and consortium blockchain networks. A consortium blockchain network is provided for a selected group of entities that controls the consensus process and includes an access control layer.
[0004] In some cases, users conduct transactions across multiple different blockchain networks. For example, atomic swaps allow assets to be traded across different blockchain networks without using an intermediary (or exchange service) in the process. These transactions may be implicitly related to each other, but difficult to determine, which may cause problems for entities such as financial institutions in determining the activities of their customers.
[0005] Therefore, it is necessary to effectively manage transactions in multiple blockchain networks, especially to identify related transactions in multiple blockchain networks and derive the corresponding hidden information. Summary of the invention
[0006] Embodiments of the described subject matter may include one or more features alone or in combination.
[0007] For example, in one embodiment, a computer-implemented method for managing transactions in multiple blockchain networks includes: identifying, by a computing system, a first HTLC transaction in a first blockchain network that is associated with a second hash value time-locked contract HTLC transaction in a second blockchain network, including: determining that a transaction submission time of the second HTLC transaction is later than a transaction submission time of the first HTLC transaction, and determining that a secret hash value of the second HTLC transaction has the same value as a secret hash value of the first HTLC transaction; the second blockchain network is different from the first blockchain network;
[0008] Identifying, by the computing system, a third HTLC transaction in the second blockchain network that is associated with the second HTLC transaction, comprising: determining that a transaction submission time of the third HTLC transaction is later than a transaction submission time of the second HTLC transaction, determining that a recipient address of the third HTLC transaction is the same as a recipient address of the second HTLC transaction, and determining that a hash value of a proof in the third HTLC transaction has the same value as a secret hash value of the second HTLC transaction;
[0009] identifying, by the computing system, a fourth HTLC transaction in the first blockchain network that is associated with the first, second, and third HTLC transactions, comprising: determining that a transaction submission time of the fourth HTLC transaction is later than a transaction submission time of the third HTLC transaction, determining that a proof of the fourth HTLC transaction is the same as a proof of the third HTLC transaction, and determining that a recipient address of the fourth HTLC transaction is the same as a recipient address of the first HTLC transaction; wherein the first, second, third, and fourth HTLC transactions are associated with cross-chain transactions across the first blockchain network and the second blockchain network; and
[0010] The computing system derives the hidden information of the cross-chain transaction from the information of the first, second, third and fourth HTLC transactions based on the association of the first, second, third and fourth HTLC transactions;
[0011] The hidden information of the cross-chain transaction includes at least one of the following:
[0012] The first party of the cross-chain transaction, wherein deriving the hidden information of the cross-chain transaction from the information of the first, second, third, and fourth HTLC transactions comprises: determining that the first party of the cross-chain transaction has at least one of the sender address of the first HTLC transaction or the sender address of the third HTLC transaction;
[0013] The second party of the cross-chain transaction, wherein deriving the hidden information of the cross-chain transaction from the information of the first, second, third and fourth HTLC transactions comprises: determining that the second party of the cross-chain transaction has at least one of the sender address of the second HTLC transaction or the sender address of the fourth HTLC transaction.
[0014] In some embodiments,
[0015] The information of each of the first and second HTLC transactions includes at least one of a sender address, a receiver address, a transfer value, a transaction submission time, a secret hash value, or an expiration time, and
[0016] The information of each of the third and fourth HTLC transactions includes at least one of a sender address, a receiver address, a transfer value, a transaction submission time, or a proof.
[0017] In some embodiments, identifying a first HTLC transaction in the first blockchain network that is associated with a second HTLC transaction in the second blockchain network further comprises at least one of:
[0018] Determine that the expiration time of the first HTLC transaction is longer than the sum of the expiration time of the second HTLC transaction and a time threshold.
[0019] In some embodiments, the expiration time of the first HTLC transaction, the expiration time of the second HTLC transaction, and the time threshold are configured such that the third HTLC transaction associated with the second HTLC transaction is executed in the second blockchain network before the fourth HTLC transaction associated with the first HTLC transaction is executed in the first blockchain network.
[0020] In some embodiments, it also includes:
[0021] The transaction is determined to be an HTLC transaction by determining that the transaction is performed according to the HTLC protocol.
[0022] In some embodiments, determining that a transaction is performed according to the HTLC protocol includes:
[0023] The information determining the transaction includes a secret hash value as a hash lock and an expiration time as a time lock.
[0024] In some embodiments, including:
[0025] The computing system visually presents information of the first, second, third and fourth HTLC transactions on a user interface; and
[0026] The association of the first, second, third, and fourth HTLC transactions is visually annotated by the computing system.
[0027] Also provided herein is one or more non-transitory computer-readable storage media, which are coupled to one or more processors and have instructions stored thereon, which when executed by the one or more processors, cause the one or more processors to perform operations according to embodiments of the methods provided herein.
[0028] The present invention further provides a system for implementing the method provided herein. The system includes one or more processors and a computer-readable storage medium, wherein the computer-readable storage medium is coupled to the one or more processors and has instructions stored thereon, and when the instructions are executed by the one or more processors, the one or more processors are caused to perform operations according to an embodiment of the method provided herein.
[0029] It should be understood that the method according to this article may include any combination of aspects and features described herein. That is, the method according to this article is not limited to the combination of aspects and features specifically described herein, but also includes any combination of aspects and features provided.
[0030] The details of one or more embodiments of the present invention are set forth in the accompanying drawings and the following description. Other features and advantages of the present invention will be apparent from the description and drawings, and from the claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 is a diagram illustrating an example of an environment that can be used to implement embodiments herein.
[0032] Figure 2 is a diagram showing an architectural example according to embodiments of the present invention.
[0033] Figure 3A is a flow chart illustrating an example of a process that may be performed by a computing system according to embodiments herein.
[0034] Figure 3B is a flow chart illustrating an example of another process that may be performed by a computing system according to embodiments herein.
[0035] Figure 3C is a flow chart illustrating an example of yet another process that may be performed by a computing system according to embodiments herein.
[0036] Figure 4A An example of modules of an apparatus according to embodiments herein is depicted.
[0037] Figure 4B An example of modules of another apparatus according to embodiments herein is depicted.
[0038] Figure 4C An example of modules of yet another apparatus according to embodiments herein is depicted.
[0039] Like reference numbers and numerals in the various drawings represent like elements. DETAILED DESCRIPTION
[0040] This article describes techniques for managing transactions in multiple blockchain networks. These techniques generally involve identifying associated transactions in blockchain networks and deriving corresponding hidden information. An associated transaction may be associated with one or more cross-chain transactions across at least two blockchain networks. For example, a cross-chain transaction may be a transaction or transfer value between at least two parties on at least two blockchain networks. A cross-chain transaction may be associated with multiple blockchain transactions performed in two or more blockchain networks. The hidden information of a cross-chain transaction may include the transaction parties and their associated accounts in the blockchain network, the exchange (e.g., swap) between the transfer values, and the exchange rate. These techniques can help entities such as financial institutions or auditing agencies better manage cross-chain transactions of customers, users, or interested parties to better track or monitor their activities.
[0041] The technology described herein produces several technical effects. In some embodiments, the technology described herein includes algorithms and systems that perform data mining to automatically discover hidden information of published blockchain transactions stored in one or more blockchain networks. Blockchain transactions (also referred to as transactions) may include data, instructions, or operations to be performed by blockchain nodes in a blockchain network. For example, blockchain transactions may be generated by a client device or a participating system of a blockchain network. Blockchain nodes may receive blockchain transactions, perform consensus processing on blockchain transactions, and, after reaching consensus, publish blockchain transactions by saving blockchain transactions to blocks of the blockchain for persistent storage. In some embodiments, the algorithm and system may perform data mining on published blockchain transactions in a blockchain network to identify underlying associated blockchain transactions in each blockchain network in the blockchain network, transactions related to one or more cross-chain transactions between multiple blockchain networks, and derive hidden information related to the cross-chain transactions. For example, the technology described herein may perform data mining on published transaction data stored in multiple blockchain networks to identify cross-chain transactions or atomic swaps to determine the relationship between published transactions and / or multiple cross-chain transactions, determine the parties involved in these transactions and their relationships, and / or determine the value and exchange rate of the exchange or swap in these transactions.
[0042] In some embodiments, these technologies are applied to track and supervise the flow of funds in multi-chain and / or multi-user transaction scenarios. For example, transactions on assets in a blockchain network may have a high degree of anonymity and privacy requirements, which makes it difficult for financial institutions to perform Know Your Customer (KYC) operations, such as identifying duplicate financing and related internal transactions, or for audit or regulatory authorities to audit fund flows and track supervision. This problem becomes more serious with the existence of multiple blockchain networks or sidechain (or subchain) networks. The technology described in this article can help these entities or institutions better track multi-chain and / or multi-user transactions.
[0043] In some embodiments, the techniques described herein may perform data mining on published blockchain transactions to determine, for example, which transactions are involved in multiple blockchain networks (e.g., atomic swaps or cross-chain transactions), what the values of those transactions are, and who the other parties are who transacted with the interested party.
[0044] In some embodiments, the techniques described herein may be applied to decentralized transactions, such as atomic swaps or decentralized exchanges. Traditional centralized exchanges are vulnerable to hacker attacks and are subject to poor management and government regulation, and may not be able to handle large volumes of demand. In contrast, atomic swaps or decentralized exchanges are peer-to-peer exchanges from one party to another, without going through a third-party service, such as an exchange agent or institution (e.g., a currency exchange agent). In some embodiments, the techniques described herein may retrieve decentralized transactions published or otherwise stored in a blockchain network or distributed network, perform data mining or other analysis on decentralized transactions based on the underlying relationships or associations between decentralized transactions, and derive hidden information from decentralized transactions to help the corresponding entities or institutions automate and streamline transaction monitoring and management in a more efficient manner.
[0045] In some embodiments, the techniques described herein may be applied to hash time-locked contract (HTLC) transactions and help extend the use of HTLC transactions to applications or systems that HTLC transactions cannot support. HTLC protocols can be developed to ensure that the parties to decentralized peer-to-peer transactions do not commit fraud, so that decentralized transactions can be successfully completed in atomic swaps. Since the parties to decentralized transactions do not need to establish trust, HTLC provides a certain degree of confidentiality for the parties to the transaction. Therefore, it may be difficult for outsiders to the transaction to know that the transactions occurring in the blockchain network are related, which will limit the use of atomic swaps implemented by HTLC, for example, when it is necessary to understand the transaction to monitor and regulate the corresponding entity or institution. The technology described herein can obtain hidden information in atomic swaps that support HTLC or cross-chain transactions that support HTLC. In some embodiments, entities associated with blockchains or distributed networks (e.g., financial institutions such as banks) may allow their customers or users to use atomic swaps that support HTLC without worrying about the difficulty of tracking customer financial activities.
[0046] In some embodiments, the techniques described herein may be applied to two or more blockchain networks that provide access to transaction data. For example, a blockchain network may include a blockchain-based ledger system, such as a consortium blockchain network, a sidechain (or subchain) network, a private blockchain network, a public blockchain network, or any suitable combination thereof. Two or more blockchain networks may be different from each other, for example, based on different blockchain platforms or technical implementations, and / or may support different assets. Two or more blockchain networks may support cross-chain transactions, for example, by using appropriate interfaces or relays to perform operations or interactions between two or more blockchain networks. In some embodiments, the techniques described herein may be applied to scenarios where multiple parties (e.g., 2, 3, 4 or more parties) perform cross-chain transactions across multiple blockchain networks (e.g., 2, 3, 4 or more blockchain networks). The techniques described herein may derive information related to cross-chain transactions but hidden in transactions published in the respective blockchain networks. For example, if Alice and Bob perform a first atomic swap on two blockchain networks, and Bob and Cathy perform a second atomic swap on the same blockchain network, these techniques can automatically discover or otherwise identify that Bob is the middleman between Alice and Cathy by comparing information from the first and second atomic swaps.
[0047] In some embodiments, the technology described herein may identify relationships or associations between multiple transactions and store the relationships or identified transaction information in a graph, table, or other data structure to more efficiently access or manage information. In some embodiments, the technology described herein may present the relationships or identified transaction information on a graph or in other visual ways (e.g., on a user interface) by connecting the associated information on the graph, which facilitates viewing, reviewing, and further analyzing transactions and further improves the efficiency of accessing or managing these transactions and identified information.
[0048] To provide further context for the embodiments herein, as described above, a distributed ledger system (DLS) may also be referred to as a consensus network (e.g., composed of peer nodes) and a blockchain network, enabling participating entities to conduct transactions and store data securely and immutably. Although the term blockchain is often associated with specific networks and / or use cases, blockchain is generally used herein to refer to a DLS without reference to any specific use case.
[0049] Blockchain is a data structure that stores transactions in an immutable way. Therefore, the transactions recorded on the blockchain are reliable and trustworthy. The blockchain includes one or more blocks. Each block in the chain is linked to the previous block by the encrypted hash value of the previous block immediately before it in the chain. Each block also includes a local timestamp (for example, provided by the computing device that generates the block or the computing system that manages the blockchain), its own hash value, and one or more transactions. For example, a block may include a block header and a block body. The block header may include a local timestamp, its own hash value, and the hash value of the previous block. The block body may include payment information, such as one or more transactions (or transaction data). Transactions that have been verified by nodes in the blockchain network are hashed and compiled into a Merkle tree. The Merkle tree is a data structure in which the data at the leaf nodes of the tree are hashed, and all hash values in each branch of the tree are concatenated at the root of the branch. This process continues along the tree until the root of the entire tree, where hash values representing all data in the tree are stored. The hash of a transaction purporting to be stored in the trie can be quickly verified by determining whether it is consistent with the structure of the trie.
[0050] A blockchain is a decentralized or at least partially decentralized data structure for storing transactions, and a blockchain network is a network of computing nodes that manage, update, and maintain one or more blockchains by broadcasting, verifying, and confirming transactions, etc. As described above, a blockchain network can be provided as a public blockchain network, a private blockchain network, or a consortium blockchain network.
[0051] Typically, a consortium blockchain network is private among participating entities. In a consortium blockchain network, the consensus process is controlled by an authorized set of nodes, which may be referred to as consensus nodes, and one or more consensus nodes are operated by the corresponding entity (e.g., a financial institution, an insurance company). For example, a consortium of ten (10) entities (e.g., a financial institution, an insurance company) may operate a consortium blockchain network, with each entity operating at least one node in the consortium blockchain network. In some examples, in a consortium blockchain network, a global blockchain is provided as a blockchain replicated across all nodes. That is, all consensus nodes are in a state of complete consensus with respect to the global blockchain. In order to reach a consensus (e.g., agree to add a block to the blockchain), a consensus protocol is implemented within the consortium blockchain network. For example, a consortium blockchain network may implement a Practical Byzantine Fault Tolerance (PBFT) consensus, which will be described in further detail below.
[0052] In some embodiments, the centralized ledger system can also adopt the data structure of blockchain to take advantage of the immutability, reliability and credibility of the data stored on the blockchain. In some embodiments, this centralized ledger system can be referred to as a centralized ledger system or a general auditable ledger service system based on blockchain. In some embodiments, a centralized ledger system based on blockchain may include a central trusted institution that provides transparent, immutable and cryptographically verifiable data stored in a block of blockchain data structure. The stored data may be in log format, for example, including not only transaction logs, but also other transaction data and block data. Due to the presence of a central trusted institution, a centralized ledger system based on blockchain does not need to perform a consensus process to establish trust. In some embodiments, a centralized ledger system based on blockchain can be more effective than a typical distributed or decentralized ledger system based on blockchain. In some embodiments, a centralized ledger system based on blockchain can provide cloud-based storage services with enhanced trust, efficiency and storage performance.
[0053] In some embodiments, the centralized ledger system may be a node of a blockchain network. For example, the centralized ledger system may be a non-consensus node in a blockchain network and may provide highly reliable and high-performance auditable streaming ledger services to consensus nodes or other non-consensus nodes in the blockchain network or entities outside the blockchain network.
[0054] Figure 1 1 is a diagram showing an example of an environment 100 that can be used to perform embodiments of the present invention. In some examples, the environment 100 enables entities to participate in a consortium blockchain network 102. The environment 100 includes computing systems 106, 108 and a network 110. In some examples, the network 110 includes a local area network (LAN), a wide area network (WAN), the Internet, or a combination thereof, and connects websites, user devices (e.g., computing devices), and back-end systems. In some examples, the network 110 can be accessed via a wired and / or wireless communication link. In some examples, the network 110 enables communication with the consortium blockchain network 102 and communication within the consortium blockchain network 102. Typically, the network 110 represents one or more communication networks. In some cases, the computing systems 106, 108 can be nodes of a cloud computing system (not shown), or each of the computing systems 106, 108 can be a separate cloud computing system that includes multiple computers interconnected by a network and used as a distributed processing system.
[0055] In the depicted example, computing systems 106, 108 may each include any suitable computing system capable of participating as a node in consortium blockchain network 102. Exemplary computing systems include, but are not limited to, servers, desktop computers, laptop computers, tablet computing devices, and smart phones. In some examples, computing systems 106, 108 host one or more computer-implemented services for interacting with consortium blockchain network 102. For example, computing system 106 may host a computer-implemented service for a first entity (e.g., user A), such as a transaction management system used by the first entity to manage its transactions with one or more other entities (e.g., other users). Computing system 108 may host a computer-implemented service for a second entity (e.g., user B), such as a transaction management system used by the second entity to manage its transactions with one or more other entities (e.g., other users). Figure 1 In the example of , the consortium blockchain network 102 is represented as a peer-to-peer network of nodes, and the computing systems 106 , 108 provide nodes of a first entity and a second entity participating in the consortium blockchain network 102 , respectively.
[0056] Figure 2 2 is a diagram showing an example of an architecture 200 according to an embodiment of the present invention. The exemplary conceptual architecture 200 includes participant systems 202, 204, 206 corresponding to participant A, participant B, and participant C, respectively. Each participant (e.g., user, enterprise) participates in a blockchain network 212 provided as a peer-to-peer network, which includes multiple nodes 214, at least some of which record information immutably in a blockchain 216. As further detailed herein, although a single blockchain 216 is schematically depicted in the blockchain network 212, multiple copies of the blockchain 216 are provided and maintained on the blockchain network 212.
[0057] In the depicted example, each participant system 202, 204, 206 is provided by or on behalf of participant A, participant B, and participant C, respectively, and functions as a respective node 214 in the blockchain network. As used herein, a node generally refers to an individual system (e.g., computer, server) that is connected to the blockchain network 212 and enables the corresponding participant to participate in the blockchain network. Figure 2 In the example of , a participant corresponds to each node 214. However, it is contemplated that a participant may operate multiple nodes 214 within the blockchain network 212, and / or multiple participants may share a node 214. In some examples, the participant systems 202, 204, 206 communicate with or through the blockchain network 212 using a protocol (e.g., Hypertext Transfer Protocol Secure (HTTPS)) and / or using remote procedure calls (RPCs).
[0058] The nodes 214 may have different levels of participation within the blockchain network 212. For example, some nodes 214 may participate in the consensus process while other nodes 214 do not participate in the consensus process. As another example, some nodes 214 store a complete copy of the blockchain 216 while other nodes 214 store only a copy of a portion of the blockchain 216. For example, data access privileges may limit the blockchain data that a respective participant may store within their respective system. Figure 2 In the example of FIG. 2 , participant systems 202 , 204 , and 206 store complete copies 216 ′, 216 ″, and 216 ′″ of blockchain 216 , respectively.
[0059] Blockchain (e.g. Figure 2 The blockchain 216) consists of a chain of blocks, each of which stores data. Examples of data include transaction data representing a transaction between two or more participants. Transaction data is used as an example of a data record stored in the blockchain. Examples of transactions include, but are not limited to, exchanging something of value (e.g., an asset, a product, a service, a currency). In some embodiments, one or more operations performed in the ledger system may be stored in the blockchain as transaction data. For example, transaction data may include one or more operations or manipulations of data stored in the block chain, information obtained from an external resource (e.g., timestamp information), or any suitable data that may be stored in the blockchain (e.g., documents, images, videos, audio). Transaction data is stored immutably in the blockchain. That is, the transaction data cannot be altered.
[0060] Before storing the transaction data in the block, the transaction data is hashed. Hashing is the process of converting the transaction data (provided as string data) into a fixed-length hash value (also provided as string data). It is impossible to de-hash the hash value to obtain the transaction data. Hashing ensures that even a slight change in the transaction data will result in a completely different hash value. In addition, as mentioned above, the hash value has a fixed length. That is, regardless of the size of the transaction data, the length of the hash value is fixed. Hashing includes processing the transaction data through a hash function to generate a hash value. Examples of hash functions include, but are not limited to, the Secure Hash Algorithm (SHA)-256, which outputs a 256-bit hash value.
[0061] The transaction data of multiple transactions are hashed and stored in a block. For example, the hashes of two transactions are provided and they themselves are hashed to provide another hash. This process is repeated until a single hash is provided for all transactions to be stored in a block. This hash is known as the Merkle root hash and is stored in the block header. Changes in any transaction will cause its hash to change and ultimately the Merkle root hash to change.
[0062] Blocks are added to the blockchain through a consensus protocol. Multiple nodes in the blockchain network participate in the consensus protocol and perform work to add blocks to the blockchain. Such nodes are called consensus nodes. The PBFT introduced above is used as a non-limiting example of a consensus protocol. Consensus nodes execute the consensus protocol to add transactions to the blockchain and update the overall state of the blockchain network.
[0063] In more detail, the consensus node generates a block header, hashes all transactions in the block, and combines the hashes in pairs to generate further hashes until a single hash (Merkle root hash) is provided for all transactions in the block. This hash is added to the block header. The consensus node also determines the hash of the latest block in the blockchain (i.e., the last block added to the blockchain). The consensus node also adds a nonce value and a timestamp to the block header.
[0064] In general, PBFT provides practical Byzantine state machine replication that tolerates Byzantine faults (e.g., faulty nodes, malicious nodes). This is achieved by assuming in PBFT that failures will occur (e.g., assuming that there are independent node failures and / or manipulated messages sent by consensus nodes). In PBFT, consensus nodes are provided in a sequence that includes a primary consensus node and a backup consensus node. The primary consensus node is changed periodically. The primary consensus node is changed periodically, and transactions are added to the blockchain by all consensus nodes within the blockchain network reaching a consensus on the global state of the blockchain network. In this process, messages are transmitted between consensus nodes, and each consensus node proves that the message is received from a designated peer node and verifies that the message has not been tampered with during the transaction.
[0065] In PBFT, the consensus protocol is provided in multiple stages with all consensus nodes starting from the same state. First, the client sends a request to the primary consensus node to invoke a service operation (e.g., execute a transaction within the blockchain network). In response to receiving the request, the primary consensus node multicasts the request to the backup consensus nodes. The backup consensus nodes execute the request, and each node sends a reply to the client. The client waits until a threshold number of replies are received. In some examples, the client waits until f+1 replies are received, where f is the maximum number of faulty consensus nodes that can be tolerated within the blockchain network. The end result is that a sufficient number of consensus nodes agree on the order in which records will be added to the blockchain, and the record is either accepted or rejected.
[0066] In some blockchain networks, cryptography is used to maintain the privacy of transactions. For example, if two nodes want to keep a transaction private so that other nodes in the blockchain network cannot see the details of the transaction, the two nodes can encrypt the transaction data. Examples of encryption include, but are not limited to, symmetric encryption and asymmetric encryption. Symmetric encryption refers to the use of a single key to both encrypt (generate ciphertext from plaintext) and decrypt (generate plaintext from ciphertext). In symmetric encryption, the same key can be used for multiple nodes, so each node can encrypt / decrypt the transaction data.
[0067] Asymmetric encryption uses key pairs, each of which consists of a private key and a public key, where the private key is known only to the corresponding node and the public key is known to any or all other nodes in the blockchain network. A node can encrypt data using the public key of another node, and the encrypted data can be decrypted using the private key of the other node. For example, referring again to Figure 2 , participant A can use participant B's public key to encrypt data and send the encrypted data to participant B. Participant B can use its private key to decrypt the encrypted data (ciphertext) and extract the original data (plaintext). Messages encrypted using a node's public key can only be decrypted using the node's private key.
[0068] Asymmetric encryption is used to provide digital signatures, which enables participants in a transaction to confirm the other participants in the transaction and the validity of the transaction. For example, a node can digitally sign a message, and another node can confirm that the message was sent by the node based on the digital signature of participant A. Digital signatures can also be used to ensure that the message has not been tampered with during transmission. For example, again referring to Figure 2, participant A sends a message to participant B. Participant A generates a hash value of the message and then encrypts the hash value using its private key to provide a digital signature that is an encrypted hash value. Participant A appends the digital signature to the message and sends the message with the digital signature to participant B. Participant B decrypts the digital signature using participant A's public key and extracts the hash value. Participant B hashes the message and compares the hash values. If the hash values are the same, participant B can confirm that the message is indeed from participant A and has not been tampered with.
[0069] In some cases, parties may conduct different and independent transactions in multiple blockchain networks. Each party may be a user or client of participant system 202, 204, or 206. Each party may use a client device (e.g., a computing system such as a computer) to conduct transactions in a blockchain network through a participant system. These transactions may include transfers, payments, management, or other types of operations on digital assets.
[0070] In some examples, atomic swaps allow assets (such as currencies) on two independent blockchain networks to be traded atomically across chains without relying on a third-party trust endorsement. The term "atomic" means that the transaction will succeed or fail without a third state. However, transactions on blockchain networks are irreversible. In the absence of centralized endorsement, transactions on different blockchain networks involve ordering issues.
[0071] In order to ensure that decentralized peer-to-peer transactions can be successfully completed, such as in atomic swaps, a mechanism or protocol, such as a hash time lock contract (HTLC) protocol, can be developed to ensure that no fraud occurs on either party. The HTLC protocol can be configured to lock a given transaction using a hash and a time lock, and execute the transaction only when the specified conditions are met. For example, the HTLC protocol can use one or more hash locks and time locks to require the parties to the transaction to perform specific operations; otherwise, the transaction will not be fully executed, or the partially executed operations of the transaction may be rolled back or confiscated. In some embodiments, the HTLC protocol can define the hash value of the redeemable secret as a hash lock and the expiration time as a time lock. In some embodiments, transactions according to the HTLC protocol or otherwise based on the HTLC protocol (also referred to as HTLC transactions) can be implemented through pre-deployed smart contracts in the blockchain network to allow the parties to perform their respective operations on the redeemable secret within the expiration time. As an example of an HTLC transaction, a payment channel can be established between a payer (e.g., a sender of a payment) and a payee (e.g., a recipient of a payment). The payee may need to perform certain actions before the deadline defined by the timelock (for example, unlocking the hash lock to confirm receipt of the payment by generating a cryptographic proof of payment). Otherwise, the payee loses the ability to claim the payment and the payment will be returned to the payer. The payer can get a refund after the expiration time defined by the timelock. The HTLC protocol can be used for bidirectional and routed payment channels.
[0072] Transactions without third-party trust endorsement and / or across multiple blockchain networks can be implicitly linked to each other without being clearly identified or easily identifiable from each transaction, which may cause problems for entities such as financial institutions to perform KYC operations, for example, duplicate financing and related internal transactions. These issues may also exist when algorithms or protocols (such as HTLCs) are used to perform operations on cross-chain transactions (such as swap transactions). In some examples, a swap transaction is a mutual transfer of value between two entities, as a result of which one entity obtains an asset or service or settles a debt by handing over other assets or services or assuming other obligations. In some examples, a swap transaction is a contract to exchange two financial liabilities, which can include interest rate swaps, basis swaps, currency swaps, inflation swaps, credit default swaps, commodity swaps, equity swaps, and / or any other type of swap.
[0073] In some embodiments, identifying overlapping or matching addresses in blockchain networks can be used to identify related transactions. However, it is difficult to identify cross-chain transactions, such as HTLC transactions for exchange transactions. In addition to providing atomicity of transactions, HTLC also provides a degree of confidentiality for both parties to the transaction because the parties do not need to establish trust. Therefore, an outsider (or external party) to the transaction may not know that the transactions occurring on the two blockchain networks are related.
[0074] Implementations herein provide techniques for managing transactions in multiple blockchain networks, in particular, for identifying associated transactions in a blockchain network and related cross-chain transactions across blockchain networks, and deriving hidden information of cross-chain transactions based on associated transactions. These techniques can be used for multiple parties (e.g., 2, 3, 4, or more parties) to perform one or more cross-chain transactions across multiple blockchain networks (e.g., 2, 3, 4, or more blockchain networks). The blockchain network may include any other type of blockchain network.
[0075] In some embodiments, a network node (e.g., a participant system) of a blockchain network may send a transaction containing information about creating a smart contract to the blockchain network. Each network node of the blockchain network may execute a transaction. The EVM is a Turing-complete virtual machine through which various types of complex logic can be implemented. In some embodiments, the EVM directly runs virtual machine code (virtual machine bytecode, also referred to as bytecode), and smart contracts deployed on the blockchain network may include bytecode or any other type of code.
[0076] After reaching an agreement between nodes through a consensus mechanism, a smart contract can be successfully created. A contract account corresponding to a smart contract may appear on the blockchain with a specific address. For example, each network node of a blockchain network may have the address of a created contract account. The behavior of a smart contract may be controlled by the code written in the smart contract, and the state of the smart contract may also be stored, for example, in the memory of the contract account. In other words, a smart contract allows a virtual account to be generated on the blockchain, which includes code and storage for an account to record the state of a smart contract. After creating a smart contract, a user may call or otherwise invoke the smart contract to execute the functions defined in the smart contract, for example, by initiating a transaction pointing to the smart contract account address. The EVM of each network node may execute transactions separately, so that the smart contract code may be distributed and run on the virtual machines of each network node in the blockchain network.
[0077] In some embodiments, the HTLC smart contract may include computer executable code that provides functions such as creating an HTLC (e.g., by specifying a hash lock, a time lock, or other parameters or conditions of the HTLC), creating an HTLC transaction based on the HTLC, verifying whether the transaction is an HTLC transaction, determining whether to execute the HTLC transaction based on the conditions specified in the corresponding HTLC, and executing the HTLC transaction.
[0078] In some embodiments, in order to allow only authorized or designated entities (e.g., Bob) to use the secret to obtain the transfer value, Alice can create an encrypted digital lockbox that can only be opened by the secret and the unique key (e.g., signature or other unique identifier) of the designated entity. That is, Alice can set the first HTLC so that only Bob can open Alice's lockbox. In some embodiments, if there is a problem during the transaction or the designated entity suddenly withdraws and the lockbox is not opened within the agreed time (e.g., expiration time), the transfer value stored in the lockbox will be returned to Alice.
[0079] In some examples, HTLCs may be implemented as follows:
[0080] IF
[0081] #Payment if you have the secret R
[0082] HASH160 <h>EQUALVERIFY
[0083] <Payee Public Key> CHECKSIG
[0084] ELSE
[0085] #Refund after timeout
[0086] <lock time> CHECKLOCKTIMEVERIFY DROP
[0087] Among them, EQUALVERIFY implements hash lock, CHECKLOCKTIMEVERIFY implements time lock, and CHECKSIG implements the signature requirement of the specified entity.
[0088] Anyone who knows the corresponding secret that can make the hash value equal to H can redeem the output by calling the first clause of the IF statement. If the secret is not revealed, the HTLC stipulates that after a certain number of blocks defined by the time lock, the recipient can request a refund using the second clause of the IF statement. This is an example of implementing HTLC using scripts. HTLCs can be implemented using other functions, languages, or logic. Anyone who holds the secret can redeem this type of HTLC. By modifying the script, HTLCs can be implemented in different forms. For example, adding a CHECKSIG operator and a public key in the first clause to restrict the conversion of the hash value to a specified recipient. This recipient must know the secret.
[0089] In some embodiments, the expiration time t2 may be, for example, a default or configurable time period.
[0090] Embodiments of the present invention provide techniques for identifying the relationship between published transactions in two different blockchain networks, for example, based on accessible information of these transactions and features of the HTLC protocol, and further identifying cross-chain transactions between Alice and Bob and deriving hidden information of cross-chain transactions. For example, according to the HTLC protocol, both parties conducting cross-chain transactions according to the HTLC protocol can access HTLC data, for example, proof of secret or locked assets. The described technology can identify related published transactions and their underlying related cross-chain transactions, for example, based on features of the HTLC data and the HTLC protocol, such as the time difference between the expiration time (or expiration time) of a hash lock and the time when one party can recover its assets, so that the party can recover its assets in time when the other party unilaterally cheats. In addition, for HTLC, regardless of whether the atomic swap is successful or not, 2 to 4 transactions can be published in the blockchain network associated with the HTLC or atomic swap.
[0091] After a transaction is executed in a blockchain network, the information of the transaction is published and available in the blockchain network, which can be accessed and understood by users of the blockchain network. The information of TX1 may include a sender address, a receiver address, a transfer value, a transaction submission time (e.g., when TX1 is executed), a secret hash value (e.g., H), and / or an expiration time, such as t1. The information of TX2 may include a sender address, a receiver address, a transfer value, a transaction submission time (e.g., when TX2 is executed), a secret hash value (e.g., H), and / or an expiration time (e.g., tx2). The information of TX3 may include a sender address, a receiver address, a transaction submission time (e.g., when TX3 is executed), a proof (e.g., secret), and / or a transfer value. The information of TX4 may include a sender address, a receiver address, a transaction submission time (e.g., when TX4 is executed), a proof (e.g., secret), and / or a transfer value.
[0092] Accessible information of published transactions can be used to identify relationships of transactions, for example, by mining or otherwise retrieving, searching, and analyzing blockchain data in a blockchain network according to several criteria. Related transactions can be determined if the related transactions meet one or more criteria.
[0093] For example, for TX1 and TX2, the transaction submission time of TX2 is later than the transaction submission time of TX1, and according to the HTLC protocol, the secret hash value in TX2 is the same as the secret hash value of TX1. In addition, since atomic swaps are used for equivalent exchanges, the ratio between the transfer value in TX1 and the transfer value in TX2 is related to the exchange rate. In some embodiments, Alice and Bob can negotiate the exchange before executing TX1, and the ratio can be, for example, an official or public exchange rate before executing TX1, which can be looked up or determined when identifying related transactions. In some embodiments, a ratio range can be used to filter or otherwise identify transactions whose ratio between transfer values falls within a ratio range. In some embodiments, the ratio range can vary depending on the exchange rate between the currencies of the transferred values.
[0094] For TX2 and TX3, the transaction submission time of TX3 is later than the transaction submission time of TX2. Since TX2 and TX3 are associated with the same second HTLC, the recipient address of TX2 is the same as the recipient address of TX3, that is, the second HTLC address in the blockchain network. In addition, Alice uses the secret as proof of executing the second HTLC, so the proof hash value in TX3 is the same as the secret hash value in TX2. In addition, when Alice receives the transfer value of TX2 from the second HTLC address, the transfer value in TX3 is the same as the transfer value of TX2.
[0095] For TX3 and TX4, the transaction submission time of TX4 is later than the transaction submission time of TX3.
[0096] For TX4 and TX1, the transaction submission time of TX4 is later than the transaction submission time of TX1. Since TX1 and TX4 are associated with the same second HTLC, the recipient address of TX4 is the same as the recipient address of TX1, that is, the first HTLC address in the blockchain network. In addition, Bob uses the secret as proof of executing the first HTLC, so the proof hash value in TX4 is the same as the secret hash value in TX1. In addition, when Bob receives the transfer value of TX1 from the first HTLC address, the transfer value in TX4 is the same as the transfer value of TX1.
[0097] An example implementation of an algorithm for identifying related transactions in blockchain 1 and blockchain 2 can be represented as:
[0098]
[0099] The algorithm can determine whether a transaction in a blockchain network is an HTLC transaction. In some embodiments, it can be determined whether a transaction is an HTLC transaction based on whether the call address of the transaction is the same as the smart contract address of the HTLC smart contract deployed in the blockchain network. For example, the above algorithm can traverse each published transaction (TX1) in blockchain 1 to search for TX1 related to a cross-chain transaction, and if the call address of TX1 is not equal to (!=) the HTLC smart contract address, it is determined that transaction TX1 is not an HTLC transaction. In some embodiments, determining whether a transaction is an HTLC transaction may include determining whether the transaction is executed according to the HTLC protocol. For example, the algorithm can determine whether TX1 or TX2 is an HTLC transaction by determining whether the transaction information includes a secret hash value as a hash lock and an expiration time of a time lock as a hash lock. The algorithm can determine whether TX3 or TX4 includes a proof of the hash value of the HTLC address and / or a proof for calculating a proof of comparison with the secret hash value in the HTLC.
[0100] In some embodiments, additional or different operations may be included in the algorithm for identifying relevant transactions in multiple blockchain networks. For example, some operations shown in find_relevant_transactions() may be performed in a different order, in parallel, or based on different inputs. In some embodiments, for example, some operations may be omitted, optimized, or otherwise modified to improve the execution efficiency for identifying relevant transactions in multiple blockchain networks. For example, time lock determination (e.g., tx1.time_lock<=tx2.time_lock) and transfer value comparison (e.g., tx1.value!=tx2.value*ratio) may be optional. In some embodiments, a ratio range (e.g., [ratio_min, ratio_max) may be specified. Then, it may be determined based on Tx1.value*ratio_min<=Tx2.value<=Tx1.value*ratio_max.
[0101] As another example, the algorithm may identify a cross-chain transaction by: 1) identifying that TX1 and TX4 are associated and related to a first HTLC in a first blockchain network, and TX2 and TX3 are associated and related to a second HTLC in a second blockchain network; 2) then, identifying that TX1 and TX2 are associated and TX3 and TX4 are associated.
[0102] In some embodiments, the algorithm may use functions such as analyze_sequence(TX1, TX2, TX3, TX4) shown below to derive hidden information of cross-chain transactions:
[0103] analyze_sequence(TX1,TX2,TX3,TX4):
[0104] userA=[TX1.sender, TX3.sender]
[0105] userB=[TX4.sender, TX2.sender]
[0106] swap=(TX1.value, TX2.value)
[0107] ratio = TX2.value / TX1.value
[0108] return(userA, userB, swap, ratio).
[0109] The above example function can derive the hidden information of the parties to the cross-chain transaction (e.g., user A and user A), the exchange value, and the exchange rate of the cross-chain transaction. In some embodiments, the hidden information may include other parameters. In some embodiments, other functions may be used to derive the hidden information of the cross-chain transaction based on the identified published transactions TX1, TX2, TX3, and TX4 in the blockchain network.
[0110] In some embodiments, the above techniques and algorithms can be applied or extended to identify multiple cross-chain transactions between more than two and / or more than two blockchain networks. In some embodiments, the multiple blockchain networks are different blockchain network instances based on the same or different blockchain platforms. Each blockchain network can support its own type of assets or values.
[0111] In some embodiments, there may be two HTLC exchanges or cross-chain transactions. In some embodiments, multiple cross-chain transactions may use the same or different hash functions. In some embodiments, one or more intermediaries may be used to bridge two or more cross-chain transactions.
[0112] In addition, in some embodiments, the computing system may compare the known information of the first cross-chain transaction (e.g., information of AB1, AB2, AB3, and AB4) with the known information of the second cross-chain transaction (e.g., information of BC1, BC2, BC3, and BC4). The computing system may determine based on the comparison result that the transfer values of AB1, AB4, BC1, and BC4 are the same, and the transfer values of AB2, AB3, BC2, and BC3 are the same. In this way, the computing system can determine that Bob is the middleman between Alice and Cathy in the two cross-chain transactions.
[0113] In some embodiments, if Bob obtains an intermediate value difference from the exchange, such as a portion of the exchange, such as 10%, the computing system can determine whether the ratio difference between the ratio of the transferred values of BC1 and AB1 and 1 is less than a predetermined ratio, such as 20%. If the ratio difference is less than the predetermined ratio, the computing system can still determine that Bob is the middleman who helps Alice and Cathy exchange and earn the exchange difference.
[0114] Figure 3A , Figure 3B , Figure 3C is a flow chart illustrating an example of a process for managing transactions in multiple blockchain networks, which may be performed by a computing system according to embodiments of the present invention. For convenience, the computing system includes one or more computers located in one or more locations and appropriately programmed according to the present specification. The computing system may be associated with an entity (e.g., a financial institution such as a bank) or a user of multiple blockchain networks.
[0115] Each blockchain network may be a blockchain-based ledger system, such as a private blockchain network, a public blockchain network, a sidechain (or subchain) network, or any other blockchain network that supports smart contracts (e.g., HTLC smart contracts) and transaction data access, wherein the blockchain network may be any appropriate combination thereof. Each blockchain network may be different from one another. Each of the blockchain networks may be associated with a respective asset unit or measure (e.g., a respective currency).
[0116] Reference Figure 3A , a computing system performs a process 700 for managing transactions in multiple blockchain networks. In some embodiments, the process 700 includes reading, retrieving, receiving, or otherwise accessing transaction data stored in multiple blockchain networks. The transaction data includes transactions issued in multiple blockchain networks.
[0117] The computing system may execute an algorithm to perform data mining or other analysis on the transaction data to identify related transactions in multiple blockchain networks, further identify cross-chain transactions related to the related transactions, and derive hidden information of the cross-chain transactions. In some embodiments, the algorithm may include the algorithms find_relevant_transactions() and analyze_sequence() described above.
[0118] At 702, a first transaction in a first blockchain network is identified as a first hashed time-locked contract (HTLC) transaction in the first blockchain network. The first HTLC transaction may be identified by searching among published transactions stored in the first blockchain network.
[0119] In some embodiments, the computing system may find a transaction published in the blockchain network by determining whether the transaction is executed according to the HTLC protocol and determine whether the transaction is an HTLC transaction. In some embodiments, the computing system determines whether the transaction is executed according to the HTLC protocol by determining whether the information of the transaction (or transaction data published in the blockchain network) includes a secret hash value as a hash lock and an expiration time of a time lock as a hash lock, and / or whether the transaction is configured to be abandoned after expiration to return the transferred value in the transaction. In some embodiments, the computing system determines whether the transaction is executed according to the HTLC protocol by determining whether the recipient address of the transaction is an HTLC address in the blockchain network (e.g., an account address of an HTLC smart contract), and / or whether the hash value of the transaction proof is calculated and compared with the secret hash value in the HTLC.
[0120] If the computing system determines that the transaction is not an HTLC transaction, the computing system may continue to check the next transaction in the blockchain network. In some embodiments, if the computing system determines that the transaction is an HTLC transaction and identifies it as a first HTLC transaction, the computing system may continue to identify a second transaction in another blockchain network associated with the first transaction. In some embodiments, the computing system may traverse all published transactions in the blockchain network to identify all HTLC transactions in the blockchain network. Other or different operations may be performed.
[0121] As an example, the computing system may determine that a first transaction in the first blockchain network is a first HTLC transaction in the first blockchain network by determining that the first transaction includes a first secret hash value (e.g., H) and a first expiration time (e.g., t1).
[0122] At 704, a second transaction in the second blockchain network is identified as a second HTLC transaction in the second blockchain network, e.g., in a manner similar to or different than that described with respect to 702. The computing system may determine that the second transaction in the second blockchain network is a second HTLC transaction in the second blockchain network by determining that the second transaction includes a second secret hash value (e.g., H) and a second expiration time (e.g., t2).
[0123] At 706, a first transaction commit time of the first HTLC transaction is determined to be earlier than a second transaction commit time of the second HTLC transaction, and a first secret hash value of the first HTLC transaction is determined to have the same value as a second secret hash value of the second HTLC transaction. Once the first HTLC transaction and the second HTLC transaction are identified, information related to the HTLC protocol (e.g., transaction commit time and secret hash value) can be read, retrieved, or otherwise identified based on corresponding transaction data of the first HTLC transaction and the second HTLC transaction. If the first HTLC transaction and the second HTLC transaction are associated with the same HTLC protocol and are based on the same HTLC protocol, the second HTLC transaction is executed after the first HTLC transaction, and the second HTLC transaction uses the same hash value as the first HTLC transaction as a hash lock.
[0124] At 708, in response to determining that the first transaction submission time is earlier than the second transaction submission time and the first secret hash value has the same value as the second secret hash value, it is determined that the first HTLC transaction is associated with the second HTLC transaction. The first HTLC transaction and the second HTLC transaction can also be determined to be related to a cross-chain transaction or an HTLC exchange.
[0125] In some embodiments, the computing system further determines whether a first expiration time in the first HTLC transaction is longer than a sum of a second expiration time and a time threshold in the second HTLC transaction. Determining that the first HTLC transaction is associated with the second HTLC transaction may also be based on determining that the first expiration time is longer than a sum of the second expiration time and the time threshold. In some embodiments, the time threshold may be determined based at least in part on a difference between a network time of the first blockchain network and a network time of the second blockchain network.
[0126] In some embodiments, the first expiration time, the second expiration time, and the time threshold may be configured such that before the fourth HTLC transaction corresponding to the first HTLC transaction is executed in the first blockchain network, the third HTLC transaction corresponding to the second HTLC transaction is executed in the second blockchain network. The first HTLC transaction and the fourth HTLC transaction may be associated with the first HTLC in the first blockchain network, and the second HTLC transaction and the third HTLC transaction may be associated with the second HTLC in the second blockchain network. The first HTLC may be configured such that the first HTLC transaction is abandoned after the first expiration time, so that the transfer value in the first HTLC transaction is refunded, and the second HTLC may be configured such that the second HTLC transaction is abandoned after the second expiration time, so that the transfer value in the second HTLC transaction is refunded.
[0127] In some embodiments, the computing system further determines whether the ratio between the first transfer value in the first HTLC transaction and the second transfer value in the second HTLC transaction is within a ratio range. Determining that the first HTLC transaction in the first blockchain network is associated with the second HTLC transaction in the second blockchain network can also be based on determining that the ratio between the first transfer value and the second transfer value is within a ratio range. The first blockchain network is associated with a first currency, the second blockchain network is associated with a second currency, and the ratio range can be predetermined by a change or change in the ratio between the first currency and the second currency. The change in the ratio between the first currency and the second currency can be before the first transaction submission time of the first transaction in the first blockchain network. In some embodiments, the change in the ratio can be determined based on public data or queried from a known authority or otherwise.
[0128] In some embodiments, if the corresponding parameters of the first HTLC transaction identified in 702 and the second HTLC transaction identified in 704 do not satisfy one or more of the above conditions, the computer system may return to 702 and / or 704 to find another first HTLC transaction and / or another second HTLC transaction that satisfies the conditions described in 706. If, after traversing all transactions stored in the two blockchain networks, no pair of HTLC transactions satisfies the conditions described in 706, the computer system may determine that there is no first HTLC transaction and a second HTLC transaction associated with the same cross-chain transaction or HTLC exchange. In this case, process 700 may terminate.
[0129] In some embodiments, process 700 further includes: identifying that the third transaction in the second blockchain network is a third HTLC transaction in the second blockchain network, and determining whether a third transaction submission time of the third HTLC transaction is later than a second transaction submission time of the second HTLC transaction, whether a third recipient address of the third HTLC transaction is the same as a second recipient address of the second HTLC transaction, and whether a hash value of a proof in the third HTLC transaction has the same value as a second secret hash value of the second HTLC transaction. In response to determining that the third transaction submission time is later than the second transaction submission time, the third recipient address is the same as the second recipient address, and the hash value of the proof in the third HTLC transaction is the same as the second secret hash value of the second HTLC transaction, the computing system may determine that the third HTLC transaction is associated with the second HTLC transaction, and may also determine that the first, second, and third HTLC transactions are associated with a cross-chain transaction.
[0130] In some embodiments, process 700 further includes: identifying a fourth transaction in the first blockchain network as a fourth HTLC transaction in the first blockchain network, and determining whether a fourth transaction submission time of the fourth HTLC transaction is later than a third transaction submission time of the third HTLC transaction, whether a fourth recipient address of the fourth HTLC transaction is the same as a first recipient address of the first HTLC transaction, and whether a proof in the fourth HTLC transaction is the same as a proof in the third HTLC transaction. In response to determining that the fourth transaction submission time is later than the third transaction submission time, the fourth recipient address is the same as the first recipient address, and the proof in the fourth HTLC transaction is the same as the proof in the third HTLC transaction, the computing system may determine that the fourth transaction is associated with the first transaction, the second transaction, and the third transaction, and may also determine that the first transaction, the second transaction, the third transaction, and the fourth transaction are associated with a cross-chain transaction.
[0131] In some embodiments, process 700 further includes deriving hidden information of the cross-chain transaction from information of the first, second, third, and fourth transactions based on the association of the first, second, third, and fourth transactions. The information of each of the first and second transactions includes at least one of a sender address, a receiver address, a transfer value, a transaction submission time, a secret hash value, or an expiration time, and the information of each of the third and fourth transactions includes at least one of a sender address, a receiver address, a transfer value, a transaction submission time, or a proof.
[0132] The hidden information of the cross-chain transaction may include at least one of the following: a first party, which has at least one of the first sender address of the first transaction or the third sender address of the third transaction; a second party, which has at least one of the second sender address of the second transaction or the fourth sender address of the fourth transaction; an exchange, which is an exchange between a first transfer value of the first transaction and a second transfer value of the second transaction; or an exchange rate, which is a ratio between a first transfer value in the first transaction and a second transfer value in the second transaction.
[0133] In some embodiments, the computing system may store transaction information in multiple blockchain networks in a data structure (e.g., a graph or table) to present the identified transactions in a visual manner. In some embodiments, the computing system may further annotate the associations or relationships between the identified transactions by connecting or highlighting the associations or relationships between the identified transactions. In some embodiments, the computing system may further determine at least one cross-chain transaction related to the transaction and hidden information of at least one cross-chain transaction based on the data structure and / or visualization.
[0134] Reference Figure 3B , the computing system performs a process 730 for managing transactions in multiple blockchain networks. In some embodiments, the process 730 includes reading, retrieving, receiving, or otherwise accessing transaction data stored in multiple blockchain networks. The transaction data includes transactions issued in multiple blockchain networks. The computing system can execute an algorithm to identify related transactions in multiple blockchain networks, further identify cross-chain transactions related to the related transactions, and derive hidden information of the cross-chain transactions. In some embodiments, the algorithm can include the algorithms find_relevant_transactions() and analyze_sequence() described above.
[0135] At 732, it is identified that a first hash time locking contract (HTLC) transaction in the first blockchain network is associated with a second HTLC transaction in the second blockchain network.
[0136] In some embodiments, identifying that a first HTLC transaction in a first blockchain network is associated with a second HTLC transaction in a second blockchain network may include: determining that a transaction submission time of the second HTLC transaction is later than a transaction submission time of the first HTLC transaction, and determining that a secret hash value of the second HTLC transaction has the same value as a secret hash value of the first HTLC transaction.
[0137] In some embodiments, identifying that a first HTLC transaction in a first blockchain network is associated with a second HTLC transaction in a second blockchain network may also include determining that an expiration time of the first HTLC transaction is longer than a sum of an expiration time of the second HTLC transaction and a time threshold. The expiration time of the first HTLC transaction, the expiration time of the second HTLC transaction, and the time threshold may be configured such that a third HTLC transaction associated with the second HTLC transaction is executed in the second blockchain network before a fourth HTLC transaction associated with the first HTLC transaction is executed in the first blockchain network. The time threshold may be determined based at least in part on a difference between a network time of the first blockchain network and a network time of the second blockchain network.
[0138] In some embodiments, identifying that a first HTLC transaction in a first blockchain network is associated with a second HTLC transaction in a second blockchain network may also include determining that a ratio between a transfer value of the first transaction and a transfer value of the second transaction is within a ratio range. The first blockchain network is associated with a first currency, the second blockchain network is associated with a second currency, and the ratio range may be determined by a change in a ratio between the first currency and the second currency. The change in the ratio between the first currency and the second currency may be prior to a transaction commit time of the first HTLC transaction in the first blockchain network.
[0139] At 734, a first hash time locking contract (HTLC) transaction in the first blockchain network is identified to be associated with a second HTLC transaction in the second blockchain network. The computing system may identify the third HTLC transaction associated with the second HTLC transaction by determining that a transaction submission time of the third HTLC transaction is later than a transaction submission time of the second HTLC transaction, determining that a recipient address of the third HTLC transaction is the same as a recipient address of the second HTLC transaction, and determining that a hash value of a proof in the third HTLC transaction has the same value as a secret hash value of the second HTLC transaction.
[0140] At 736, a fourth HTLC transaction in the first blockchain network is identified as being associated with the first, second, and third HTLC transactions. The computing system may determine that the first, second, third, and fourth HTLC transactions are associated with the same cross-chain transaction across the first blockchain network and the second blockchain network.
[0141] In some embodiments, the computing system identifies a fourth HTLC transaction associated with the first, second, and third HTLC transactions by determining that a transaction submission time of the fourth HTLC transaction is later than a transaction submission time of the third HTLC transaction, determining that a proof in the fourth HTLC transaction is the same as a proof of the third HTLC transaction, and determining that a recipient address of the fourth HTLC transaction is the same as a recipient address of the first HTLC transaction. The first, second, third, and fourth HTLC transactions may be executed sequentially in time.
[0142] At 738, based on the association of the first, second, third, and fourth HTLC transactions, hidden information of the cross-chain transaction is derived from information of the first, second, third, and fourth HTLC transactions.
[0143] In some embodiments, the information of each of the first and second HTLC transactions includes at least one of a sender address, a receiver address, a transfer value, a transaction submission time, a secret hash value, or an expiration time. In some embodiments, the information of each of the third and fourth HTLC transactions includes at least one of a sender address, a receiver address, a transfer value, a transaction submission time, or a proof.
[0144] In some embodiments, the hidden information of the cross-chain transaction includes at least one of the following: the first party of the cross-chain transaction, having at least one of the sender address of the first HTLC transaction or the sender address of the third HTLC transaction; or the second party of the cross-chain transaction, having at least one of the sender address of the second HTLC transaction or the sender address of the fourth HTLC transaction. The hidden information may also include: the exchange (or swap) of the cross-chain transaction, which is the exchange between the transfer value in the first HTLC transaction and the transfer value in the second HTLC transaction, and / or the exchange rate between the transfer value in the first HTLC transaction and the transfer value in the second HTLC transaction.
[0145] In some embodiments, the computing system may determine whether a transaction issued in the blockchain network is an HTLC transaction by determining whether the transaction is executed according to the HTLC protocol. In some embodiments, the computing system determines the first HTLC transaction or the second HTLC transaction by determining that the information (or transaction data) of the corresponding transaction includes a secret hash value as a hash lock and an expiration time of a time lock as the hash lock. In some embodiments, the computing system determines the third HTLC transaction or the fourth HTLC transaction by determining that the recipient address of the corresponding transaction is an HTLC address in the blockchain network, and calculates the hash value of the proof of the transaction and compares it with the secret hash value in the HTLC.
[0146] In some embodiments, the computing system may store transaction information in multiple blockchain networks in a data structure, such as a graph or table, to present the identified transactions in a visual manner. In some embodiments, the computing system may further annotate the identified associations or relationships between the identified transactions, for example, by connecting or highlighting the associations or relationships between the identified transactions. In some embodiments, the computing system may further determine at least one cross-chain transaction related to the transaction and hidden information of at least one cross-chain transaction based on the data structure and / or visualization.
[0147] refer to Figure 3C , the computing system performs a process 750 for managing transactions in multiple blockchain networks. The computing system can execute an algorithm to identify related transactions in multiple blockchain networks, further identify multiple cross-chain transactions related to the related transactions, and derive hidden information between the cross-chain transactions.
[0148] At 752, access transaction data stored in a plurality of blockchain networks. In some embodiments, accessing the transaction data includes reading, retrieving, receiving, or otherwise obtaining transaction data stored in a plurality of blockchain networks. The transaction data includes transactions issued in a plurality of blockchain networks. The transaction data may be mined or otherwise analyzed to determine HTLC transactions.
[0149] In some embodiments, the computing system determines whether to execute the published transaction according to the HTLC protocol by determining whether the transaction data of the transaction includes a secret hash value as a hash lock and an expiration time of a time lock as the hash lock, and whether the transaction is configured to be abandoned after the expiration time so that the transfer in the transaction is refunded. In some embodiments, the computing system determines whether to execute the transaction according to the HTLC protocol by determining whether the recipient address of the transaction is an HTLC address in the blockchain network and whether to calculate the hash value of the transaction proof and compare it with the secret hash value in the HTLC.
[0150] At 754, a plurality of cross-chain transactions across the plurality of blockchain networks are identified based on transactions issued in the plurality of blockchain networks. Each of the plurality of cross-chain transactions is identified as being associated with a set of corresponding transactions issued on at least two blockchain networks. The sets of corresponding transaction groups are associated with each other. The computing system may perform Figure 3A Processing 700 or Figure 3B Processing 730 is used to identify cross-chain transactions across multiple blockchain networks.
[0151] In some embodiments, a first cross-chain transaction across a first blockchain network and a second blockchain network in a blockchain network is identified by identifying first, second, third, and fourth hashed time-locked contract (HTLC) transactions associated with the first cross-chain transaction. The first and fourth HTLC transactions are in the first blockchain network of the blockchain network, and the second and third HTLC transactions are in the second blockchain network of the blockchain network. In some embodiments, a second cross-chain transaction across the first blockchain network and the second blockchain network is identified by identifying fifth, sixth, seventh, and eighth HTLC transactions associated with the second cross-chain transaction. The fifth and eighth HTLC transactions are in the first blockchain network, and the sixth and seventh HTLC transactions are in the second blockchain network.
[0152] In some embodiments, the computing system identifies the first cross-chain transaction by identifying a first HTLC transaction in the first blockchain network associated with a second HTLC transaction in the second blockchain network, a third HTLC transaction in the second blockchain network associated with the second HTLC transaction in the second blockchain network, and a fourth HTLC transaction in the first blockchain network associated with the first, second, and third HTLC transactions. The computing system may also identify the second cross-chain transaction by identifying a fifth HTLC transaction in the first blockchain network associated with a sixth HTLC transaction in the second blockchain network, a seventh HTLC transaction in the second blockchain network associated with the sixth HTLC transaction in the second blockchain network, and an eighth HTLC transaction in the first blockchain network associated with the fifth, sixth, and seventh HTLC transactions.
[0153] In some embodiments, the first, second, third, and fourth HTLC transactions are executed sequentially in time, and the fifth, sixth, seventh, and eighth HTLC transactions are executed sequentially in time. In some embodiments, the first, fifth, sixth, seventh, eighth, second, third, and fourth HTLC transactions are executed sequentially in time.
[0154] At 756, hidden information for each of the plurality of cross-chain transactions is derived based on the association of the set of corresponding transactions. In some embodiments, the computing system may derive first hidden information for the first cross-chain transaction from information of the first, second, third, and fourth HTLC transactions based on the association of the first, second, third, and fourth HTLC transactions, and derive second hidden information from information of the fifth, sixth, seventh, and eighth HTLC transactions based on the association of the fifth, sixth, seventh, and eighth HTLC transactions.
[0155] In some embodiments, the information of each of the first, second, fifth, and sixth HTLC transactions includes at least one of a sender address, a receiver address, a transfer value, a transaction submission time, a secret hash value, or an expiration time. The information of each of the third, fourth, seventh, and eighth HTLC transactions includes at least one of a sender address, a receiver address, a transfer value, a transaction submission time, or a proof.
[0156] In some embodiments, the first hidden information of the first cross-chain transaction includes at least one of the following: the first party of the first cross-chain transaction, which has at least one of the sender address of the first HTLC transaction or the sender address of the third HTLC transaction; or the second party of the first cross-chain transaction, which has at least one of the sender address of the second HTLC transaction or the sender address of the fourth HTLC transaction. The first hidden information of the first cross-chain transaction may also include at least one of the following: the exchange (or swap) of the first cross-chain transaction, which is the exchange between the transfer value in the first HTLC transaction and the transfer value in the second HTLC transaction; or the exchange rate of the first cross-chain transaction, which is the ratio between the transfer value in the first HTLC transaction and the transfer value in the second HTLC transaction.
[0157] In some embodiments, the second hidden information of the second cross-chain transaction includes at least one of the following: a third party of the second cross-chain transaction, which has at least one of the sender address of the fifth HTLC transaction or the sender address of the seventh HTLC transaction; or a fourth party of the second cross-chain transaction, which has at least one of the sender address of the sixth HTLC transaction or the sender address of the eighth HTLC transaction. The second hidden information of the second cross-chain transaction may also include at least one of the following: an exchange (or swap) of the second cross-chain transaction, which is an exchange between the transfer value in the fifth HTLC transaction and the transfer value in the sixth HTLC transaction; or an exchange rate of the second cross-chain transaction, which is a ratio between the transfer value in the fifth HTLC transaction and the transfer value in the sixth HTLC transaction.
[0158] At 758, hidden information between the multiple cross-chain transactions is derived based on the hidden information of each of the multiple cross-chain transactions.
[0159] In some embodiments, the computing system derives the hidden information between the first cross-chain transaction and the second cross-chain transaction by comparing the first hidden information of the first cross-chain transaction associated with the first, second, third, and fourth HTLC transactions and the second hidden information of the second cross-chain transaction associated with the fifth, sixth, seventh, and eighth HTLC transactions. In response to determining that the sender address of the fourth HTLC transaction is the same as the sender address of the fifth HTLC transaction in the first blockchain network and the sender address of the second HTLC transaction is the same as the sender address of the seventh HTLC transaction in the second blockchain network, the computing system may determine that the third party is the second party.
[0160] In some embodiments, the computing system further derives the hidden information between the first and second cross-chain transactions by comparing the information of the first, second, third, and fourth HTLC transactions with the information of the fifth, sixth, seventh, and eighth HTLC transactions. In response to determining that the transfer values of the first, fourth, fifth, and eighth HTLC transactions are the same as each other, and the transfer values of the second, third, sixth, and seventh HTLC transactions are the same as each other, the computing system may determine that the second party is an intermediary in the transaction between the first party and the fourth party, and determine the transfer value of the first HTLC transaction associated with the first party and the transfer value of the sixth HTLC transaction associated with the fourth party to conduct the transaction.
[0161] In some embodiments, the computing system may store transaction information in multiple blockchain networks in a data structure, such as a graph or table, to present the identified transactions in a visual manner. In some embodiments, the computing system may further annotate the identified associations or relationships between the identified transactions, for example, by connecting or highlighting the associations or relationships between the identified transactions. In some embodiments, the computing system may further determine one or more cross-chain transactions related to the transaction and hidden information of one or more cross-chain transactions and / or hidden information between two or more cross-chain transactions based on the data structure and / or visualization.
[0162] Figure 4A An example of a module of a device 800 according to an embodiment of the present invention is depicted. The device 800 may be an example of an embodiment of a computing system configured to manage transactions in multiple blockchain networks. The device 800 may correspond to the above-mentioned embodiment, and the device 800 includes: a first identification module 802 that identifies that a first transaction in a first blockchain network is a first hash time lock contract (HTLC) transaction in the first blockchain network; a second identification module 804 that identifies that a second transaction in a second blockchain network is a second HTLC transaction in a second blockchain network that is different from the first blockchain network; a first determination module 806 that determines that a first transaction submission time of the first HTLC transaction is earlier than a second transaction submission time of the second HTLC transaction, and a first secret hash value of the first HTLC transaction has the same value as a second secret hash value of the second HTLC transaction; and a second determination module 808 that, in response to determining that the first transaction submission time is earlier than the second transaction submission time, and the first secret hash value has the same value as the second secret hash value, associates the first HTLC transaction in the first blockchain network with the second HTLC transaction in the second blockchain network, and associates the first HTLC transaction and the second HTLC transaction with a cross-chain transaction.
[0163] In some embodiments, the first determination module 806 is configured to further determine that a first expiration time in the first transaction is longer than a sum of a second expiration time and a time threshold in the second transaction, and the second determination module 808 determines that the first transaction in the first blockchain network is associated with the second transaction in the second blockchain network in response to determining that the first expiration time is longer than the sum of the second expiration time and the time threshold.
[0164] In some embodiments, the time threshold is determined based at least in part on a difference between a network time of the first blockchain network and a network time of the second blockchain network.
[0165] In some embodiments, the first expiration time, the second expiration time, and the time threshold are configured such that a third HTLC transaction corresponding to the second HTLC transaction is executed in the second blockchain network before a fourth HTLC transaction corresponding to the first HTLC transaction is executed in the first blockchain network. The first HTLC transaction and the fourth HTLC transaction are associated with the first HTLC in the first blockchain network, and the second HTLC transaction and the third HTLC transaction are associated with the second HTLC in the second blockchain network.
[0166] In some embodiments, the first HTLC is configured to abandon the first HTLC transaction after a first expiration time, so that the transferred value in the first HTLC transaction is refunded, and the second HTLC is configured to abandon the second HTLC transaction after a second expiration time, so that the transferred value in the second HTLC transaction is refunded.
[0167] In some embodiments, the first determination module 806 is configured to further determine that a ratio between a first transfer value in the first transaction and a second transfer value in the second transaction is within a ratio range, and the second determination module 808 determines that the first transaction in the first blockchain network is associated with the second transaction in the second blockchain network in response to determining that the ratio between the first transfer value and the second transfer value is within the ratio range.
[0168] In some embodiments, the first blockchain network is associated with a first currency, the second blockchain network is associated with a second currency, and the ratio range is predetermined by a change in the ratio between the first currency and the second currency.
[0169] In some embodiments, the change in the ratio between the first currency and the second currency precedes a first transaction submission time of a first transaction in the first blockchain network.
[0170] In some embodiments, the device 800 also includes: a third identification module that identifies that the third transaction in the second blockchain network is a third HTLC transaction in the second blockchain network; a third determination module that determines that a third transaction submission time of the third HTLC transaction is later than the second transaction submission time of the second HTLC transaction and a third recipient address of the third HTLC transaction is the same as the second recipient address of the second HTLC transaction, and determines that the proof in the third HTLC transaction has the same value as the second secret hash value of the second HTLC transaction; and a fourth determination module that, in response to determining that the third transaction submission time is later than the second transaction submission time, the third recipient address is the same as the second recipient address, and the hash value of the proof in the third HTLC transaction has the same value as the second secret hash value of the second HTLC transaction, determines that the third HTLC transaction is associated with the second HTLC transaction, and the first, second, and third HTLC transactions are related to the cross-chain transaction.
[0171] In some embodiments, the device 800 also includes a fourth identification module that identifies a fourth transaction in the first blockchain network as a fourth HTLC transaction in the first blockchain network; a fifth determination module that determines that a fourth transaction submission time of the fourth HTLC transaction is later than a third transaction submission time of the third HTLC transaction, a fourth recipient address of the fourth HTLC transaction is the same as a first recipient address of the first HTLC transaction, and a proof of the fourth HTLC transaction is the same as the proof of the third HTLC transaction; and a sixth determination module that, in response to determining that the fourth transaction submission time is later than the third transaction submission time, determining that the fourth recipient address is the same as the first recipient address, and the proof in the fourth HTLC transaction is the same as the proof in the third HTLC transaction, determines that the fourth transaction is associated with the first transaction, the second transaction, and the third transaction, and the first transaction, the second transaction, the third transaction, and the fourth transaction are related to the cross-chain transaction.
[0172] In some embodiments, the device 800 also includes an export module that exports hidden information of the cross-chain transaction from information of the first, second, third, and fourth transactions based on the association of the first, second, third, and fourth transactions.
[0173] In some embodiments, each information of the first and second transactions includes at least one of a sender address, a receiver address, a transfer value, a transaction submission time, a secret hash, or an expiration time, and each information of the third and fourth transactions includes at least one of a sender address, a receiver address, a transfer value, a transaction submission time, or a proof.
[0174] In some embodiments, the hidden information of the cross-chain transaction includes at least one of: a first party having at least one of a first sender address of the first transaction or a third sender address of the third transaction; a second party having at least one of a second sender address of the second transaction or a fourth sender address of the fourth transaction; an exchange; an exchange between a first transfer value of the first transaction and a second transfer value of the second transaction; or an exchange rate, which is a ratio between a first transfer value in the first transaction and a second transfer value in the second transaction.
[0175] In some embodiments, the device 800 further includes a determination module that determines that the transaction is an HTLC transaction by determining that the transaction is performed according to the HTLC protocol.
[0176] In some embodiments, the determination module determines that the transaction is performed according to the HTLC protocol by determining that the information of the transaction includes a secret hash as a hash lock and an expiration time as a time lock, and the transaction is configured to be abandoned after the expiration time, so that the transferred value in the transaction is refunded.
[0177] In some embodiments, the device 800 includes a presentation module that visually presents information of HTLC transactions in multiple blockchain networks on a user interface and visually annotates associations of HTLC transactions.
[0178] In some embodiments, each of the plurality of blockchain networks is associated with a different corresponding currency.
[0179] Figure 4B An example of a module of another device 830 according to an embodiment of the present invention is depicted. The device 830 may be an example of an embodiment of a computing system configured to manage transactions in multiple blockchain networks. The device 830 may correspond to the above-mentioned embodiment, and the device 830 includes: a first identification module 832, which identifies a first hash time lock contract (HTLC) transaction in a first blockchain network associated with a second HTLC transaction in a second blockchain network, the second blockchain network being different from the first blockchain network; a second identification module 834, which identifies a third HTLC transaction in the second blockchain network associated with the second HTLC transaction in the second blockchain network; a third identification module 836, which identifies a fourth HTLC transaction in the first blockchain network associated with the first, second, and third HTLC transactions, the first, second, third, and fourth HTLC transactions being associated with cross-chain transactions across the first blockchain network and the second blockchain network; and an export module 838, which derives hidden information of cross-chain transactions from information of the first, second, third, and fourth HTLC transactions based on the association of the first, second, third, and fourth HTLC transactions.
[0180] In some embodiments, the information of each of the first and second HTLC transactions includes at least one of a sender address, a receiver address, a transfer value, a transaction submission time, a secret hash value, or an expiration time, and the information of each of the third and fourth HTLC transactions includes at least one of a sender address, a receiver address, a transfer value, a transaction submission time, or a proof.
[0181] In some embodiments, the hidden information of the cross-chain transaction includes at least one of the following: a first party of the cross-chain transaction, wherein the hidden information of the cross-chain transaction is derived from the information of the first, second, third and fourth HTLC transactions, including determining that the first party of the cross-chain transaction has at least one of the sender address of the first HTLC transaction or the sender address of the third HTLC transaction; a second party of the cross-chain transaction, wherein the hidden information of the cross-chain transaction is derived from the information of the first, second, third and fourth HTLC transactions, including determining that the second party of the cross-chain transaction has at least one of the sender address of the second HTLC transaction or the sender address of the fourth HTLC transaction; an exchange of the cross-chain transaction, wherein the hidden information of the cross-chain transaction is derived from the information of the first, second, third and fourth HTLC transactions, including determining the exchange of the cross-chain transaction as an exchange between a transfer value in the first HTLC transaction and a transfer value in the second HTLC transaction; or an exchange rate between a transfer value in the first HTLC transaction and a transfer value in the second HTLC transaction.
[0182] In some embodiments, identifying a first HTLC transaction in the first blockchain network that is associated with a second HTLC transaction in the second blockchain network includes determining that a transaction submission time of the second HTLC transaction is later than a transaction submission time of the first HTLC transaction, and determining that a secret hash value of the second HTLC transaction has the same value as a secret hash value of the first HTLC transaction.
[0183] In some embodiments, identifying that a first HTLC transaction in a first blockchain network is associated with a second HTLC transaction in a second blockchain network further comprises at least one of: determining that an expiration time of the first HTLC transaction is longer than a sum of an expiration time of the second HTLC transaction and a time threshold, or determining that a ratio between a transfer value of the first transaction and a transfer value of the second transaction is within a ratio range.
[0184] In some embodiments, the first blockchain network is associated with a first currency, the second blockchain network is associated with a second currency, and the ratio range is predetermined by a change in the ratio between the first currency and the second currency.
[0185] In some embodiments, the change in the ratio between the first currency and the second currency precedes a transaction commit time of a first HTLC transaction in the first blockchain network.
[0186] In some embodiments, the expiration time of the first HTLC transaction, the expiration time of the second HTLC transaction, and the time threshold are configured such that a third HTLC transaction associated with the second HTLC transaction is executed in the second blockchain network before a fourth HTLC transaction associated with the first HTLC transaction is executed in the first blockchain network.
[0187] In some embodiments, the time threshold is determined based at least in part on a difference between a network time of the first blockchain network and a network time of the second blockchain network.
[0188] In some embodiments, identifying a third HTLC transaction in the second blockchain network that is associated with the second HTLC transaction in the second blockchain network includes: determining that a transaction submission time of the third HTLC transaction is later than a transaction submission time of the second HTLC transaction, determining that a recipient address of the third HTLC transaction is the same as a recipient address of the second HTLC transaction, and determining that a hash value of a proof in the third HTLC transaction has the same value as a secret hash value of the second HTLC transaction.
[0189] In some embodiments, identifying a fourth HTLC transaction in the first blockchain network that is associated with the first, second, and third HTLC transactions includes determining that a transaction submission time of the fourth HTLC transaction is later than a transaction submission time of the third HTLC transaction, determining that a proof in the fourth HTLC transaction is the same as a proof of the third HTLC transaction, and determining that a recipient address of the fourth HTLC transaction is the same as a recipient address of the first HTLC transaction.
[0190] In some embodiments, the device 832 includes a determination module that determines that the transaction is a HTLC transaction by determining that the transaction is performed according to the HTLC protocol.
[0191] In some embodiments, determining that the transaction is executed according to the HTLC protocol includes: determining that the information of the transaction includes a secret hash as a hash lock and an expiration time as a time lock, and the transaction is configured to be abandoned after the expiration time, so that the transferred value in the transaction is refunded.
[0192] In some embodiments, the device 830 includes a presentation module that visually presents information of HTLC transactions in multiple blockchain networks on a user interface and visually annotates associations of HTLC transactions.
[0193] In some embodiments, the first, second, third, and fourth HTLC transactions are executed sequentially.
[0194] In some embodiments, each of the multiple blockchain networks is associated with a different corresponding currency.
[0195] Figure 4C An example of a module of another device 850 according to an embodiment of the text is depicted. The device 850 can be an example of an embodiment of a computing system configured to manage transactions in multiple blockchain networks. The device 850 can correspond to the above-mentioned embodiment, and the device 850 includes the following: an access module 852, accessing transaction data stored in multiple blockchain networks, including transaction data published in multiple blockchain networks, each of the multiple blockchain networks is different from each other; an identification module 854, based on the transactions published in the multiple blockchain networks, identifying multiple cross-chain transactions across multiple blockchain networks on the multiple blockchain networks, wherein the multiple cross-chain transactions are each associated with a set of corresponding transactions published on at least two blockchain networks, and the set of corresponding transactions are associated with each other; a first export module 856, based on the association of the set of corresponding transactions, deriving hidden information of each of the multiple cross-chain transactions; and a second export module, based on the hidden information of each of the multiple cross-chain transactions, deriving hidden information between the multiple cross-chain transactions.
[0196] In some embodiments, identifying multiple cross-chain transactions includes: identifying a first cross-chain transaction of a blockchain network and a second blockchain network of the blockchain network by identifying a first, a second, a third, and a fourth hash time lock contract (HTLC) transaction related to the first cross-chain transaction, the first and fourth HTLC transactions are located in the first blockchain network of the blockchain network, and the second and third HTLC transactions are located in the second blockchain network of the blockchain network, and determining a second cross-chain transaction across the first blockchain network and the second blockchain network by identifying a fifth, sixth, seventh, and eighth HTLC transactions related to the second cross-chain transaction, the fifth and eighth HTLC transactions are located in the first blockchain network, and the sixth and seventh HTLC transactions are located in the second blockchain network.
[0197] In some embodiments, identifying a first cross-chain transaction across a first blockchain network and a second blockchain network includes: identifying a first HTLC transaction in the first blockchain network that is associated with a second HTLC transaction in the second blockchain network; identifying a third HTLC transaction in the second blockchain network that is associated with the second HTLC transaction in the second blockchain network; and identifying a fourth HTLC transaction in the first blockchain network that is associated with the first, second, and third HTLC transactions.
[0198] In some embodiments, identifying a second cross-chain transaction across a first blockchain network and a second blockchain network includes: identifying a fifth HTLC transaction in the first blockchain network that is associated with a sixth HTLC transaction in the second blockchain network; identifying a seventh HTLC transaction in the second blockchain network that is associated with the sixth HTLC transaction in the second blockchain network; and identifying an eighth HTLC transaction in the first blockchain network that is associated with the fifth, sixth, and seventh HTLC transactions.
[0199] In some embodiments, the first, second, third, and fourth HTLC transactions are executed sequentially in time, the fifth, sixth, seventh, and eighth HTLC transactions are executed sequentially in time, and the first, fifth, sixth, seventh, eighth, second, third, and fourth HTLC transactions are executed sequentially in time.
[0200] In some embodiments, deriving hidden information of each of a plurality of cross-chain transactions based on an association of corresponding transaction groups includes: deriving first hidden information of the first cross-chain transaction from information of the first, second, third, and fourth HTLC transactions based on an association of the first, second, third, and fourth HTLC transactions; and deriving second hidden information from information of the fifth, sixth, seventh, and eighth HTLC transactions based on an association of the fifth, sixth, seventh, and eighth HTLC transactions.
[0201] In some embodiments, the information of each of the first, second, fifth, and sixth HTLC transactions includes at least one of a sender address, a receiver address, a transfer value, a transaction submission time, a secret hash, or an expiration time; and the information of each of the third, fourth, seventh, and eighth HTLC transactions includes at least one of a sender address, a receiver address, a transfer value, a transaction submission time, or a proof.
[0202] In some embodiments, the first hidden information of the first cross-chain transaction includes at least one of the following: a first party of the first cross-chain transaction, wherein deriving the first hidden information of the first cross-chain transaction from information of the first, second, third, and fourth HTLC transactions includes: determining that the first party of the first cross-chain transaction has at least one of a sender address of the first HTLC transaction or a sender address of the third HTLC transaction; or a second party of the first cross-chain transaction, wherein deriving the first hidden information of the cross-chain transaction from information of the first, second, third, and fourth HTLC transactions includes: determining that the second party of the cross-chain transaction has at least one of a sender address of the second HTLC transaction or a sender address of the fourth HTLC transaction.
[0203] In some embodiments, the second hidden information of the second cross-chain transaction includes at least one of: a third party of the second cross-chain transaction, wherein deriving the second hidden information from the information of the fifth, sixth, seventh, and eighth HTLC transactions includes: determining that the third party of the third cross-chain transaction has at least one of the sender address of the fifth HTLC transaction or the sender address of the seventh HTLC transaction; or a fourth party of the second cross-chain transaction, wherein deriving the second hidden information from the information of the fifth, sixth, seventh, and eighth HTLC transactions includes determining that the fourth party of the cross-chain transaction has at least one of the sender address of the sixth HTLC transaction or the sender address of the eighth HTLC transaction.
[0204] In some embodiments, the first hidden information of the first cross-chain transaction also includes at least one of the following: an exchange of the first cross-chain transaction, wherein deriving the first hidden information of the first cross-chain transaction from the information of the first, second, third and fourth HTLC transactions includes: determining the exchange of the first cross-chain transaction as an exchange between the transfer value in the first HTLC transaction and the transfer value in the second HTLC transaction; or an exchange rate of the first cross-chain transaction, wherein deriving the first hidden information of the first cross-chain transaction from the information of the first, second, third and fourth HTLC transactions includes: determining the exchange rate of the first cross-chain transaction as a ratio between the transfer value in the first HTLC transaction and the transfer value in the second HTLC transaction.
[0205] In some embodiments, the second hidden information of the second cross-chain transaction also includes at least one of the following: an exchange of the second cross-chain transaction, wherein deriving the second hidden information of the second cross-chain transaction from the information of the fifth, sixth, seventh and eighth HTLC transactions includes: determining the exchange of the second cross-chain transaction as an exchange between the transfer value in the fifth HTLC transaction and the transfer value in the sixth HTLC transaction; or an exchange rate of the second cross-chain transaction, wherein deriving the second hidden information of the second cross-chain transaction from the information of the fifth, sixth, seventh and eighth HTLC transactions includes: determining the exchange rate of the second cross-chain transaction as a ratio between the transfer value in the fifth HTLC transaction and the transfer value in the sixth HTLC transaction.
[0206] In some embodiments, deriving hidden information between multiple cross-chain transactions based on hidden information of each cross-chain transaction in the multiple cross-chain transactions includes: comparing first hidden information of the first cross-chain transaction associated with the first, second, third and fourth HTLC transactions and second hidden information of the second cross-chain transaction associated with the fifth, sixth, seventh and eighth HTLC transactions; determining that the sender address of the fourth HTLC transaction is the same as the sender address of the fifth HTLC transaction in the first blockchain network, and the sender address of the second HTLC transaction is the same as the sender address of the seventh HTLC transaction in the second blockchain network; and determining that the third party is the second party.
[0207] In some embodiments, deriving hidden information between multiple cross-chain transactions based on the hidden information of each cross-chain transaction in the multiple cross-chain transactions also includes: comparing information of the first, second, third and fourth HTLC transactions with information of the fifth, sixth and seventh and eighth HTLC transactions; determining that the transfer values of the first, fourth, fifth and eighth HTLC transactions are the same as each other, and the transfer values of the second, third, sixth and seventh HTLC transactions are the same as each other; and determining that the second party is an intermediary for the transaction between the first party and the fourth party, and the transfer value of the first HTLC transaction associated with the first party and the transfer value of the sixth HTLC transaction associated with the fourth party are traded.
[0208] In some embodiments, each transaction corresponding to the plurality of cross-chain transactions is a hashed time lock contract (HTLC) transaction. The device 850 includes a determination module that determines that the transaction is a HTLC transaction by determining that the transaction is executed according to the HTLC protocol.
[0209] In some embodiments, determining that the transaction is executed according to the HTLC protocol includes: determining that the information of the transaction includes a secret hash as a hash lock and an expiration time as a time lock, and the transaction is configured to be abandoned after the expiration time, so that the transferred value in the transaction is refunded.
[0210] In some embodiments, the device 850 includes a presentation module that visually presents information of transactions issued in multiple blockchain networks on a user interface and visually annotates associations of HTLC transactions.
[0211] The systems, devices, modules or units shown in the foregoing embodiments may be implemented by using a computer chip or entity, or may be implemented by using a product with a specific function. Typical embodiment devices are computers (the computer may be a personal computer), laptop computers, cellular phones, camera phones, smart phones, personal digital assistants, media players, navigation devices, email receiving and sending devices, game consoles, tablet computers, wearable devices or any combination of these devices.
[0212] For the implementation process of the functions and effects of each module in the device, reference may be made to the implementation process of the corresponding steps in the aforementioned method. For simplicity, the details are omitted here.
[0213] Since the device embodiment corresponds to the method embodiment basically, for the relevant parts, reference can be made to the relevant description in the method embodiment. The device implementation described above is only an example. The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, may be located in one location, or may be distributed on multiple network modules. Some or all modules may be selected based on actual needs to achieve the goal of the scheme herein. Those of ordinary skill in the art can understand and implement the embodiments of the present application without having to make creative efforts.
[0214] Reference again Figure 4A , Figure 4B or Figure 4C , which can be interpreted as showing the internal functional modules and structure of the computing implementation device. The computing implementation device can be an example of a computing system configured to manage transactions in multiple blockchain networks. In essence, the execution subject can be an electronic device, which includes: one or more processors; one or more computer-readable memories configured to store executable instructions of one or more processors. In some embodiments, the one or more computer-readable memories are coupled to the one or more processors and have programming instructions stored thereon, which can be executed by the one or more processors to execute the algorithms, methods, functions, processes, processes and programs described herein. This article also provides one or more non-transitory computer-readable storage media coupled to one or more processors and having instructions stored thereon, and when the instructions are executed by the one or more processors, the instructions will cause the one or more processors to perform operations in accordance with the embodiments of the method provided herein.
[0215] The present invention also provides a system for implementing the method provided herein. The system includes one or more processors, and a computer-readable storage medium coupled to the one or more processors and storing instructions thereon, which, when executed by the one or more processors, causes the one or more processors to perform the operations described in the method embodiment provided herein.
[0216] The embodiments of the subject matter, actions, and operations described herein may be implemented in digital electronic circuits, tangibly embodied computer software or firmware, computer hardware, or a combination of one or more thereof, including the structures disclosed herein and their structural equivalents. The embodiments of the subject matter described herein may be implemented as one or more computer programs, for example, one or more computer program instruction modules, encoded on a computer program carrier for execution by a data processing device, or to control the operation of a data processing device. For example, a computer program carrier may include one or more computer-readable storage media, on which instructions are encoded or stored. The carrier may be a tangible, non-transitory computer-readable medium, for example, a magnetic disk, a magneto-optical disk or an optical disk, a solid-state drive, a random access memory (RAM), a read-only memory (ROM), or other media types. Alternatively or additionally, the carrier may be an artificially generated propagation signal, for example, a machine-generated electrical signal, an optical signal, or an electromagnetic signal, which is generated to encode information for transmission to a suitable receiver device for execution by a data processing device. A computer storage medium may be or partly be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more thereof. A computer storage medium is not a propagation signal.
[0217] A computer program may also be referred to or described as a program, software, software application, app, module, software module, engine, script or code, and may be written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages; which may be deployed in any form, including as a stand-alone program or as a module, component, engine, subroutine or other unit suitable for execution in a computing environment, which may include one or more computers in one or more locations interconnected by a data communications network.
[0218] A computer program may, but need not, correspond to a file in a file system. A computer program may be stored in: a portion of a file that holds other programs or data, e.g., one or more scripts stored in a markup language document; a single file dedicated to the program in question; or multiple coordinated files, e.g., multiple files storing one or more modules, subroutines, or code portions.
[0219] Processors for executing computer programs include, for example, general and special purpose microprocessors, and any one or more processors of any kind of digital computer. Typically, the processor will receive data and instructions for the computer program to be executed from a non-transitory computer readable medium coupled to the processor.
[0220] The term "data processing apparatus" covers all types of apparatus, devices and machines for processing data, including, for example, a programmable processor, a computer, or multiple processors or computers. The data processing apparatus may include special-purpose logic circuits such as an FPGA (field programmable gate array), an ASIC (application-specific integrated circuit) or a GPU (graphics processing unit). In addition to hardware, the apparatus may also include code that creates an execution environment for a computer program, for example, code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them.
[0221] The processes and logic flows described herein can be performed by one or more computers or processors executing one or more computer programs to perform operations by operating on input data and generating output. The processes and logic flows can also be performed by special purpose logic circuits, such as FPGAs, ASICs, or GPUs, or by a combination of special purpose logic circuits and one or more programmed computers.
[0222] Computers suitable for executing computer programs may be based on general and / or special purpose microprocessors, or any other kind of central processing unit. Typically, the central processing unit will receive instructions and data from a read-only memory and / or a random access memory. Elements of a computer may include a central processing unit for executing instructions and one or more memory devices for storing instructions and data. The central processing unit and the memory may be supplemented with or integrated in a special purpose logic circuit.
[0223] Typically, a computer will also include or be operably coupled to receive data from or transfer data to one or more storage devices. A storage device may be, for example, a magnetic disk, a magneto-optical disk or optical disk, a solid-state drive, or any other type of non-temporary computer-readable medium. However, a computer need not have such a device. Thus, a computer may be coupled to one or more storage devices, such as one or more memories located locally and / or remotely. For example, a computer may include one or more local memories as computer-integrated components, or a computer may be coupled to one or more remote memories located in a cloud network. In addition, a computer may also be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device such as a universal serial bus (USB) flash drive, just to name a few.
[0224] Components may be "coupled" to one another by being connected to one another for communication, either directly or via one or more intermediate components, such as electrical or optical connections. Components may also be "coupled" to one another if one of the components is integrated into another component. For example, a storage component integrated into a processor, such as an L2 cache component, is "coupled" to the processor.
[0225] To interact with a user, embodiments of the subject matter described herein may be implemented on or configured to communicate with a computer having a display device, such as an LCD (liquid crystal display) monitor, for displaying information to a user, an input device, such as a keyboard and a pointing device, through which a user can provide input to the computer, and a pointing device, such as a mouse, trackball, or touchpad. Other types of devices may also be used to provide interaction with a user; for example, the feedback provided to the user may be any form of sensory feedback, such as visual feedback, auditory feedback, or tactile feedback; and any form of input from the user may be received, including sound, voice, or tactile input. In addition, a computer may interact with a user by sending documents to and receiving documents from a device used by a user; for example, by sending a web page to a web browser on a user's device in response to a request received from the web browser, or by interacting with an application (app) running on a user's device, such as a smart phone or electronic tablet. A computer may also interact with a user by sending text messages or other forms of messages to a personal device, such as a smart phone running a messaging program, and receiving a response message from the user.
[0226] The term "configured to" is used herein in connection with systems, devices, and computer program components. For a system of one or more computers configured to perform a specific operation or action, it means that the system has installed thereon software, firmware, hardware, or a combination thereof that causes the system to perform the operation or action when in operation. For one or more computer programs configured to perform a specific operation or action, it means that one or more programs include instructions that, when executed by a data processing device, cause the device to perform the operation or action. For a dedicated logic circuit configured to perform a specific operation or action, it means that the circuit has electronic logic to perform the operation or action.
[0227] Although many specific implementation details are included herein, these should not be understood as limitations on the scope of the protection claimed, but rather as descriptions of features specific to a particular embodiment, the scope of the protection claimed is defined by the claims themselves. Certain features described herein in the context of separate embodiments may also be implemented in combination in a single embodiment. On the contrary, the various features described in the context of a single embodiment may also be implemented in multiple embodiments individually or in any suitable sub-combination. Moreover, although the features described above may work in certain combinations and were even initially claimed, in some cases, one or more features in the combination may be deleted from the combination claimed, and the claims may also be directed to sub-combinations or variations of sub-combinations.
[0228] Similarly, although operations are depicted in the drawings and recited in the claims in a particular order, this should not be understood as requiring that the operations be performed in the particular order shown or in sequence, or that all of the operations shown be performed, in order to achieve the desired results. In some cases, multitasking and parallel processing may be advantageous. In addition, the separation of various system modules and components in the above-described embodiments should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems may generally be integrated together in a single software product or packaged into multiple software products.
[0229] Specific embodiments of the subject matter have been described. Other embodiments are also within the scope of the appended claims. For example, the actions recited in the claims can be performed in a different order and still achieve the desired results. As an example, the processing depicted in the accompanying drawings does not require the specific order or sequence shown to achieve the desired results. In some cases, multi-tasking parallel processing may be advantageous.< / h>
Claims
1. A computer-implemented method for managing transactions in multiple blockchain networks, the computer-implemented method comprising: Identifying, by a computing system, a first HTLC transaction in a first blockchain network that is associated with a second hash time-locked contract HTLC transaction in a second blockchain network, including: determining that a transaction submission time of the second HTLC transaction is later than a transaction submission time of the first HTLC transaction, and determining that a secret hash value of the second HTLC transaction has the same value as a secret hash value of the first HTLC transaction; the second blockchain network is different from the first blockchain network; Identifying, by the computing system, a third HTLC transaction in the second blockchain network that is associated with the second HTLC transaction, comprising: determining that a transaction submission time of the third HTLC transaction is later than a transaction submission time of the second HTLC transaction, determining that a recipient address of the third HTLC transaction is the same as a recipient address of the second HTLC transaction, and determining that a hash value of a proof in the third HTLC transaction has the same value as a secret hash value of the second HTLC transaction; identifying, by the computing system, a fourth HTLC transaction in the first blockchain network that is associated with the first, second, and third HTLC transactions, comprising: determining that a transaction submission time of the fourth HTLC transaction is later than a transaction submission time of the third HTLC transaction, determining that a proof of the fourth HTLC transaction is the same as a proof of the third HTLC transaction, and determining that a recipient address of the fourth HTLC transaction is the same as a recipient address of the first HTLC transaction; wherein the first, second, third, and fourth HTLC transactions are associated with cross-chain transactions across the first blockchain network and the second blockchain network; and The computing system derives the hidden information of the cross-chain transaction from the information of the first, second, third and fourth HTLC transactions based on the association of the first, second, third and fourth HTLC transactions; The hidden information of the cross-chain transaction includes at least one of the following: The first party of the cross-chain transaction, wherein deriving the hidden information of the cross-chain transaction from the information of the first, second, third, and fourth HTLC transactions comprises: determining that the first party of the cross-chain transaction has at least one of the sender address of the first HTLC transaction or the sender address of the third HTLC transaction; The second party of the cross-chain transaction, wherein deriving the hidden information of the cross-chain transaction from the information of the first, second, third and fourth HTLC transactions comprises: determining that the second party of the cross-chain transaction has at least one of the sender address of the second HTLC transaction or the sender address of the fourth HTLC transaction.
2. The computer-implemented method of claim 1 , wherein: The information of each of the first and second HTLC transactions includes at least one of a sender address, a receiver address, a transfer value, a transaction submission time, a secret hash value, or an expiration time, and The information of each of the third and fourth HTLC transactions includes at least one of a sender address, a receiver address, a transfer value, a transaction submission time, or a proof.
3. The computer-implemented method of claim 1 , wherein: Identifying a first HTLC transaction in the first blockchain network that is associated with a second HTLC transaction in the second blockchain network further includes at least one of: Determine that the expiration time of the first HTLC transaction is longer than the sum of the expiration time of the second HTLC transaction and a time threshold.
4. The computer-implemented method of claim 3, wherein: The expiration time of the first HTLC transaction, the expiration time of the second HTLC transaction, and the time threshold are configured such that the third HTLC transaction associated with the second HTLC transaction is executed in the second blockchain network before the fourth HTLC transaction associated with the first HTLC transaction is executed in the first blockchain network.
5. The computer-implemented method of claim 1 , further comprising: The transaction is determined to be an HTLC transaction by determining that the transaction is performed according to the HTLC protocol.
6. The computer-implemented method of claim 5, wherein: Determining that a transaction is executed according to the HTLC protocol includes: The information determining the transaction includes a secret hash value as a hash lock and an expiration time as a time lock.
7. The computer-implemented method of claim 1 , comprising: The computing system visually presents information of the first, second, third and fourth HTLC transactions on a user interface; as well as The association of the first, second, third, and fourth HTLC transactions is visually annotated by the computing system.
8. A system for managing transactions in multiple blockchain networks, the system comprising: one or more processors; as well as One or more computer-readable memories, coupled to the one or more processors and having instructions stored thereon, wherein the instructions are executable by the one or more processors to perform the method of any one of claims 1 to 7.
9. A device for managing transactions in multiple blockchain networks, the device comprising a module for executing the method described in any one of claims 1 to 7.
Citation Information
Patent Citations
MethodS, system and apparatus for managing transactions in multiple blockchain networks
CN113568946A
Method, system and apparatus for managing transactions in multiple blockchain networks
CN113595734A