WO2021143364A1 - Method and apparatus for acquiring transaction processing state in decentralized application cluster - Google Patents

Method and apparatus for acquiring transaction processing state in decentralized application cluster Download PDF

Info

Publication number
WO2021143364A1
WO2021143364A1 PCT/CN2020/132432 CN2020132432W WO2021143364A1 WO 2021143364 A1 WO2021143364 A1 WO 2021143364A1 CN 2020132432 W CN2020132432 W CN 2020132432W WO 2021143364 A1 WO2021143364 A1 WO 2021143364A1
Authority
WO
WIPO (PCT)
Prior art keywords
transaction
decentralized application
processing status
transaction processing
tracking identifier
Prior art date
Application number
PCT/CN2020/132432
Other languages
French (fr)
Chinese (zh)
Inventor
杨达一
Original Assignee
支付宝(杭州)信息技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 支付宝(杭州)信息技术有限公司 filed Critical 支付宝(杭州)信息技术有限公司
Publication of WO2021143364A1 publication Critical patent/WO2021143364A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/389Keeping log of transactions for guaranteeing non-repudiation of a transaction

Definitions

  • the present disclosure relates to the field of blockchain technology, and in particular, to a method and device for obtaining transaction processing status in a decentralized application cluster.
  • a decentralized application is an application running on a decentralized network (ie, a blockchain network).
  • a decentralized network there is usually no centralized node that can fully control the decentralized application.
  • a completely decentralized application needs to be completely open source and autonomous applications.
  • the upgrade of decentralized applications can only be upgraded after most users reach a consensus.
  • the data involved in decentralized applications must be encrypted and stored on the decentralized application platform.
  • Decentralized applications usually include the on-chain smart contract module of the blockchain and the off-chain service module.
  • the on-chain smart contract module can write smart contracts based on the virtual machine provided by the blockchain system, and the off-chain service module provides user service functions, which can be developed based on the software development kit of the corresponding blockchain system.
  • the present disclosure provides a method and device for acquiring transaction processing status in a decentralized application cluster and a method and device for processing transaction processing status acquisition request processing.
  • a method for acquiring transaction processing status in a decentralized application cluster including: generating a transaction processing status acquisition request based on a transaction tracking identifier of a transaction in the decentralized application cluster , The transaction tracking identifier is used to uniquely identify the transaction in the decentralized application cluster; sending the transaction processing status acquisition request to the decentralized application in the decentralized application cluster; and The decentralized application obtains the transaction processing status of the transaction.
  • the transaction tracking identifier may be generated based on an identifier generation rule agreed upon by each decentralized application in the decentralized application cluster.
  • the transaction tracking identifier may be generated by the transaction initiator of the transaction.
  • the transaction tracking identifier may be generated by the decentralized application when the transaction data of the transaction does not include the transaction tracking identifier.
  • the transaction tracking identifier may be regenerated by the decentralized application when the transaction processing for the transaction fails.
  • the transaction tracking identifiers corresponding to each decentralized application in the decentralized application cluster may be the same.
  • a method for processing a transaction processing status acquisition request is executed by a decentralized application in a decentralized application cluster, and the method includes: receiving transaction processing status acquisition Request, the transaction processing status acquisition request is generated based on the transaction tracking identifier of the transaction in the decentralized application cluster, and the transaction tracking identifier is used to uniquely identify the transaction in the decentralized application cluster Based on the transaction tracking identifier in the transaction processing status acquisition request, the transaction processing status of the transaction is acquired from local transaction processing data; and the transaction processing status is sent to the sender of the transaction processing status acquisition request.
  • a device for acquiring transaction processing status in a decentralized application cluster including: a processing status acquisition request generating unit based on the transaction tracking identifier of the transaction in the decentralized application cluster , Generate a transaction processing status acquisition request, where the transaction tracking identifier is used to uniquely identify the transaction in the decentralized application cluster; a processing status acquisition request sending unit sends the transaction processing status acquisition request to the A decentralized application in a decentralized application cluster; and a transaction processing status acquisition unit, which acquires the transaction processing status of the transaction from the decentralized application.
  • the transaction tracking identifier may be generated based on an identifier generation rule agreed upon by each decentralized application in the decentralized application cluster.
  • the transaction tracking identifier may be generated by the transaction initiator of the transaction.
  • the transaction tracking identifier may be generated by the decentralized application when the transaction data of the transaction does not include the transaction tracking identifier.
  • the transaction tracking identifier may be regenerated by the decentralized application when the transaction processing for the transaction fails.
  • the transaction tracking identifiers corresponding to each decentralized application in the decentralized application cluster may be the same.
  • a device for processing a transaction processing status acquisition request is also provided, the device is used for a decentralized application in a decentralized application cluster, and the device includes: a processing status acquisition request receiving unit, Receive a transaction processing status acquisition request, the transaction processing status acquisition request is generated based on the transaction tracking identifier of the transaction in the decentralized application cluster, and the transaction tracking identifier is used to be unique in the decentralized application cluster
  • the transaction processing status acquisition unit based on the transaction tracking identifier in the transaction processing status acquisition request, acquires the transaction processing status of the transaction from the local transaction processing data; and the transaction processing status sending unit The transaction processing status is sent to the sender of the transaction processing status acquisition request.
  • a computing device including: at least one processor; and a memory, the memory stores instructions, and when the instructions are executed by the at least one processor, the at least one The processor executes the method for acquiring the transaction processing status as described above.
  • a machine-readable storage medium that stores executable instructions that, when executed, cause the machine to execute the method for obtaining transaction processing status as described above.
  • a computing device including: at least one processor; and a memory, the memory stores instructions, and when the instructions are executed by the at least one processor, the at least one The processor executes the transaction status acquisition request processing method as described above.
  • a non-transitory machine-readable storage medium that stores executable instructions, which when executed, cause the machine to execute the transaction status acquisition request processing method described above .
  • the transaction tracking identifier that uniquely identifies the transaction in the decentralized application cluster can be used to quickly and accurately locate the transaction processing status of each decentralized application, so that the transaction processing status can be quickly obtained.
  • FIG. 1 shows a schematic diagram of an example of an environment that can be used to execute the method for obtaining transaction processing status in a decentralized application cluster and the method for processing transaction processing status acquisition requests according to the present disclosure
  • FIG. 2 shows a schematic diagram of an example of a system architecture that executes the method for obtaining transaction processing status in a decentralized application cluster and the method for processing transaction processing status acquisition requests according to the present disclosure
  • Fig. 3 is a schematic diagram for explaining an example of a decentralized cluster in the present disclosure
  • Fig. 4 is a flowchart of a method for obtaining transaction processing status in a decentralized application cluster according to an embodiment of the present specification
  • FIG. 5 is a flowchart of an example of the transaction processing process of the decentralized application in the present disclosure
  • Fig. 6 is a structural block diagram of an apparatus for obtaining transaction processing status in a decentralized application cluster according to an embodiment of the present specification
  • Fig. 7 is a structural block diagram of an apparatus for processing a transaction processing status acquisition request according to an embodiment of the present specification
  • Fig. 8 is a structural block diagram of a computing device for executing a method for acquiring a transaction processing status in a decentralized application cluster or a method for processing a transaction processing status acquisition request according to an embodiment of the present specification.
  • the term “including” and its variations mean open terms, meaning “including but not limited to”.
  • the term “based on” means “based at least in part on.”
  • the terms “one embodiment” and “an embodiment” mean “at least one embodiment.”
  • the term “another embodiment” means “at least one other embodiment.”
  • Other definitions can be included below, whether explicit or implicit. Unless clearly indicated in the context, the definition of a term is consistent throughout the specification.
  • Blockchain is a chain data structure that connects and combines data blocks sequentially in chronological order, and cryptographically ensures that the data blocks cannot be tampered with or forged.
  • the blockchain includes one or more blocks. Each block in the blockchain is linked to the previous block by including the encrypted hash of the immediately preceding block in the blockchain. Each block also includes a timestamp, a cryptographic hash of the block, and one or more transactions.
  • the transaction that has been verified by the nodes of the blockchain network is hashed and a Merkle tree is formed. In the Merkle tree, the data at the leaf nodes is hashed, and for each branch of the Merkle tree, all the hash values of the branch are concatenated at the root of the branch.
  • the above processing is performed on the Merkle tree until the root node of the entire Merkle tree.
  • the root node of the Merkle tree stores hash values representing all data in the Merkle tree.
  • Blockchain is a data structure used to store transactions.
  • the blockchain network is a network of computing nodes used to manage, update and maintain one or more blockchain structures.
  • the blockchain network can include a public blockchain network, a private blockchain network, or a consortium blockchain network.
  • the consensus process is controlled by the nodes of the consensus network.
  • the public blockchain network can be considered as a public network of participating entities.
  • most entities nodes must sign each block in sequence, and add the signed block to the blockchain of the blockchain network.
  • Examples of public blockchain networks may include specific peer-to-peer payment networks.
  • blockchain does not specifically refer to any particular blockchain.
  • the public blockchain network supports public transactions. Public transactions are shared among all nodes in the public blockchain network and stored in the global blockchain.
  • a global blockchain refers to a blockchain that is replicated across all nodes.
  • consensus protocols include but are not limited to: proof-of-work (POW), proof-of-stake (POS), and proof-of-authority (POA).
  • POW is taken as a non-limiting example.
  • Private blockchain networks are provided for specific entities.
  • the read and write permissions of each node in the private blockchain network are strictly controlled. Therefore, a private blockchain network is usually also called a permissioned network, which restricts who is allowed to participate in the network and the level of network participation (for example, only in certain transaction situations).
  • a private blockchain network various types of access control mechanisms can be used (for example, existing participants vote to add new entities, regulatory agencies control permissions, etc.).
  • the alliance blockchain network is private among participating entities.
  • the consensus process is controlled by authorized nodes.
  • a consortium composed of several (for example, 10) entities (for example, financial institutions, insurance companies) can operate a consortium blockchain network, and each entity operates at least one node in the consortium blockchain network. Therefore, the consortium blockchain network can be considered as a private network of participating entities.
  • each participating entity node
  • each block may be signed by a subset of participating entities (nodes) (for example, at least 7 entities), and the block may be added to the blockchain.
  • Blockchain is a tamper-proof shared digital ledger that records transactions in a public or private peer-to-peer network.
  • the ledger is distributed to all member nodes in the network, and the history of asset transactions that occurred in the network is permanently recorded in the block.
  • the consensus mechanism ensures that all network nodes in the distributed blockchain network execute transactions in the same order and then write to the same ledger.
  • the consensus model aims to solve the Byzantine problem.
  • components such as servers or network nodes in the distributed blockchain network may malfunction or deliberately spread wrong information to other nodes. Since other network nodes need to reach a consensus on which network node fails first, it is difficult for other network nodes to declare the component failure and exclude it from the blockchain network.
  • FIG. 1 shows a schematic diagram of an example of an environment 100 that can be used to execute the method for obtaining transaction processing status in a decentralized application cluster and the method for processing transaction processing status acquisition requests according to the present disclosure.
  • the environment 100 enables entities to participate in the blockchain network 102.
  • the environment 100 includes a network 104, and computing devices/systems 106, 108.
  • the network 104 may include a local area network (LAN), a wide area network (WAN), the Internet, or a combination thereof, and connect a website, a user device (eg, a computing device), and a back-end system.
  • the network 104 may be accessed through a wired and/or wireless communication link.
  • the computing devices/systems 106 and 108 communicate with each other through the network 104, and communicate with the blockchain network 102 through the network 104, and the nodes (or node devices) in the blockchain network 102 pass through The network 104 communicates.
  • the network 104 represents one or more communication networks.
  • the computing devices/systems 106, 108 may be nodes of a cloud computing system (not shown), or each computing device/system 106, 108 may be a separate cloud computing system, including interconnection through the network 104 Multiple computers and used as a distributed processing system.
  • each of the computing devices/systems 106, 108 may include any suitable computing system capable of participating as a node in the blockchain network 102.
  • Examples of computing devices/systems include, but are not limited to, servers, desktop computers, laptops, tablet devices, smart phones, etc.
  • one or more computer-implemented services for interacting with the blockchain network 102 may be installed on the computing device/system 106, 108.
  • the computing device/system 106 may be installed with services of the first entity (for example, user A).
  • the first entity is used to manage transactions with one or more other entities (for example, other users). system.
  • the computing device/system 108 may be installed with services of a second entity (for example, user B), for example, a transaction management system used by the second entity to manage transactions with one or more other entities (for example, other users).
  • a second entity for example, user B
  • a transaction management system used by the second entity to manage transactions with one or more other entities (for example, other users).
  • the blockchain network 102 is represented as a peer-to-peer network of nodes, and the computing devices/systems 106, 108 serve as the nodes of the first entity and the second entity participating in the blockchain network 102, respectively.
  • FIG. 2 shows a schematic diagram of an example of a system architecture 200 that executes the method for obtaining transaction processing status in a decentralized application cluster and the method for processing transaction processing status acquisition requests according to the present disclosure.
  • An example of the system architecture 200 includes the participant systems 202, 204, and 206 corresponding to the participant A, the participant B, and the participant C, respectively.
  • Each participant eg, user, enterprise
  • the blockchain network 212 includes a plurality of nodes 214, wherein at least some of the nodes 214 record information in the blockchain 216, and the recorded information cannot be changed.
  • a single blockchain 216 is schematically shown within the blockchain network 212, multiple copies of the blockchain 216 may be provided, and multiple copies are maintained in the blockchain network 212, as described in detail later of.
  • each participant system 202, 204, 206 is provided by participant A, participant B, and participant C, or provided as participant A, participant B, and participant C, respectively, And it serves as the corresponding node 214 in the blockchain network 212.
  • a node generally refers to a single system (eg, computer, server) connected to the blockchain network 212 and enables corresponding participants to participate in the blockchain network.
  • the participant corresponds to each node 214.
  • one participant can operate multiple nodes 214 within the blockchain network 212, and/or multiple participants can share a single node 214.
  • the participant systems 202, 204, 206 use protocols (e.g., Hypertext Transfer Protocol Security (HTTPS)) and/or use remote procedure calls (RPC) to communicate with the blockchain network 212, or through the blockchain
  • HTTPS Hypertext Transfer Protocol Security
  • RPC remote procedure calls
  • the degree of participation of the node 214 in the blockchain network 212 may vary. For example, some nodes 214 may participate in the consensus process (eg, as miner nodes that add blocks to the blockchain 216), 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 only store a partial copy of the blockchain 216. In the example of Figure 2, the participant systems 202, 204, 206 each store a complete copy of the block chain 216 216', 216", 216"'.
  • a blockchain (for example, the blockchain 216 in FIG. 2) is composed of a series of blocks, and each block stores data.
  • Examples of data may include transaction data representing transactions between two or more participants.
  • transactions are used as a non-limiting example, and it is expected that any appropriate data can be stored in the blockchain (for example, documents, images, videos, audios).
  • Examples of transactions may include, but are not limited to, the exchange of valuable things (for example, assets, products, services, currency, etc.).
  • Transaction data is stored immutably in the blockchain.
  • hash Before storing in the block, hash the transaction data. Hashing is the process of converting transaction data (provided as string data) into a fixed-length hash value (also provided as string data). After the transaction data is hashed, even a slight change in the transaction data will result in a completely different hash value.
  • the hash value is usually generated by hashing transaction data using a hash function. Examples of hash functions include, but are not limited to, Secure Hash Algorithm (SHA)-256, which outputs a 256-bit hash value.
  • SHA Secure Hash Algorithm
  • the transaction data of multiple transactions can be stored in the block after being hashed. For example, two transaction data are hashed to obtain two hash values, and then the two obtained hash values are hashed again to obtain another hash value. This process is repeated until a single hash value is obtained for all transactions to be stored in the block.
  • This hash value is called the Merkle root hash and is stored at the head of the block. Any change in the transaction will cause its hash value to change, and eventually the Merkle root hash value will change.
  • the block is added to the blockchain through a consensus protocol.
  • Multiple nodes in the blockchain network participate in the consensus protocol and add blocks to the blockchain after competition.
  • Such nodes are called miner nodes (or accounting nodes).
  • the POW introduced above serves as a non-limiting example.
  • Miner nodes perform a consensus process to add transactions (corresponding blocks) to the blockchain. Although multiple miner nodes participate in the consensus process, only one miner node can write a block to the blockchain. In other words, miner nodes compete in the consensus process to add their blocks to the blockchain. In more detail, the miner node periodically collects pending transactions from the transaction pool (for example, until a predetermined limit on the number of transactions that can be included in the block is reached, if any). The transaction pool includes transaction messages from participants in the blockchain network. Miner nodes create blocks and add transactions to the blocks. Before adding the transaction to the block, the miner node checks whether there is a transaction in the block of the blockchain among the transactions to be added. If the transaction has been added to another block, the transaction will be discarded.
  • the miner node generates a block header, hashes all transactions in the block, and combines the hash values in pairs to generate further hash values until a single hash value (Merkle root) is obtained for all transactions in the block. Hash). Then, add the Merkle root hash to the block header.
  • the miner also determines the hash value of the latest block in the blockchain (ie, the last block added to the blockchain). Miner nodes can also add random values (nonce values) and timestamps to the block header.
  • the miner node tries to find a hash value that meets the required parameters. The miner node keeps changing the nonce value until it finds a hash value that meets the required parameters.
  • Every miner in the blockchain network tries to find a hash value that meets the required parameters and competes with each other in this way.
  • a miner node finds a hash value that meets the required parameters and advertises the hash value to all other miner nodes in the blockchain network.
  • Other miner nodes verify the hash value, and if it is determined to be correct, verify each transaction in the block, accept the block, and attach the block to their copy of the blockchain. In this way, the global state of the blockchain is agreed upon on all miner nodes within the blockchain network.
  • the above process is a POW consensus protocol.
  • participant A wants to send a certain amount of funds to participant B.
  • Participant A generates a transaction message and sends the transaction message to the blockchain network, and the transaction message is added to the transaction pool.
  • Each miner node in the blockchain network creates a block, obtains transactions from the transaction pool, and adds the transaction to the block. In this way, the transaction issued by participant A is added to the block of the miner node.
  • cryptography is implemented to maintain the privacy of transactions. For example, if two nodes want to maintain the privacy of the transaction so that other nodes in the blockchain network cannot learn the details of the transaction, the node can encrypt the transaction data.
  • encryption methods include, but are not limited to, symmetric encryption and asymmetric encryption.
  • Symmetric encryption refers to the encryption process that uses a single key to encrypt (generate ciphertext based on plaintext) and decrypt (generate plaintext based on ciphertext).
  • symmetric encryption multiple nodes can use the same key, so each node can encrypt/decrypt transaction data.
  • Asymmetric encryption refers to the use of key pairs for encryption.
  • Each key pair includes a private key and a public key.
  • the private key is only known to the corresponding node, and the public key is known to any or all other nodes in the blockchain network.
  • a node can use another node's public key to encrypt data, and can use another node's private key to decrypt the encrypted data.
  • Participant A can use the public key of participant B 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 (plain text). Messages encrypted with the public key of the node can only be decrypted with the private key of the node.
  • Asymmetric encryption is used to provide digital signatures, which enables participants in a transaction to confirm 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 messages are not tampered with during transmission. For example, refer to Figure 2 again. Participant A will send a message to participant B. Participant A generates a hash value of the message, and then uses its private key to encrypt the hash value to generate a digital signature. Participant A attaches the digital signature to the message, and sends the message with the digital signature to participant B.
  • Participant B uses the public key of participant A to decrypt the digital signature, thereby decrypting the corresponding hash value. Participant B hashes the received message to obtain another hash value, and then compares the two hash values. If the hash value is the same, participant B can confirm that the message is indeed from participant A and has not been tampered with.
  • the present disclosure can also be applied to other block chain scenarios.
  • the present disclosure can also be applied to blockchain-like systems.
  • data can be stored in the same block-chain structure.
  • the block-chain data stored in the block-chain structure does not need After consensus processing.
  • FIG. 3 is a schematic diagram for explaining an example of the decentralized cluster in the present disclosure.
  • the decentralized cluster may include three DAPPs (DAPP1 to DAPP3), and each decentralized application is responsible for the transaction processing of the corresponding process.
  • Figure 3 is just an example of a decentralized cluster. Any number of multiple decentralized applications can exist in a decentralized cluster.
  • the transaction initiator sends the transaction data of the transaction to DAPP1. After DAPP1 completes the corresponding processing, it sends the transaction data processed by DAPP1 to DAPP2. After DAPP3 completes the transaction processing of the last process, the transaction processing result is sent to the blockchain system. China-Israel realizes blockchain accounting processing.
  • DAPP3 may send the transaction processing result to all nodes in the blockchain network to perform accounting processing.
  • a decentralized application can be a decentralized application running on a decentralized application server (or an application running on a decentralized application server side), or a decentralized application running on a user terminal device.
  • Centralized application client As an example of an application scenario, DAPP1 may be a shopping server of a shopping platform, DAPP2 may be a settlement server of a third-party settlement platform, and DAPP3 may be a bank server.
  • Fig. 4 is a flowchart of a method for obtaining transaction processing status in a decentralized application cluster and a method for processing transaction processing status acquisition requests according to an embodiment of the present specification.
  • the method for acquiring the transaction processing status in the decentralized application cluster is executed by the transaction processing status acquirer, and the method for processing the transaction processing status acquiring request is executed by the decentralized application.
  • the transaction processing status acquisition party generates a transaction processing status acquisition request based on the transaction tracking identifier of the transaction in the decentralized application cluster.
  • the acquirer of the transaction processing status may be, for example, the transaction initiator.
  • the transaction initiator wants to pay attention to the transaction processing process or transaction processing results and other information, it can be used as the transaction processing status acquisition direction to request the decentralized application to obtain the transaction processing status.
  • the acquirer of the transaction processing status may also be an affiliate of the transaction initiator, and the affiliate may acquire the transaction tracking identifier of the transaction from the transaction initiator to obtain the transaction processing status.
  • each decentralized application in the decentralized application cluster can also be used as a transaction processing status acquirer to obtain transaction processing status in other decentralized applications.
  • a decentralized application can obtain transaction processing status from other decentralized applications for analysis of the cause of transaction failure or for other business analysis.
  • the transaction processing status can be the transaction processing status being processed, or the transaction processing result after the transaction has been processed by various decentralized applications.
  • the transaction tracking identifier is used to uniquely identify the transaction in the decentralized application cluster.
  • the transaction tracking identifier can be generated by the transaction initiator.
  • the transaction data can include a transaction tracking identifier field, and write the transaction tracking identifier generated for the transaction.
  • Each transaction initiator can generate a transaction tracking identifier for its initiated transaction in accordance with its business processing rules, so as to identify the transaction initiated by it in the decentralized application cluster.
  • the transaction data always carries the transaction tracking identifier during the entire process of transaction processing, so that the decentralized applications that the transaction passes through can be located according to the transaction tracking identifier, and the transaction status in each decentralized application can be located.
  • each decentralized application in the decentralized application cluster can agree on identifier generation rules, and each transaction initiator can generate transaction tracking identifiers based on the identifier generation rules. , To ensure that the generated transaction tracking identifier can uniquely identify each transaction.
  • the same transaction can have multiple transaction tracking identifiers.
  • the transaction tracking identifier generated by the transaction initiator if the transaction initiator sends the transaction data to the decentralized application cluster, the transaction processing failure occurs (the decentralized application that fails the transaction processing can report to the transaction initiator Sending a notification message of transaction processing failure), the transaction initiator can send transaction data to the decentralized application cluster again for the transaction to initiate the transaction again.
  • a new transaction tracking identifier can be regenerated and included in the transaction data sent this time, and the previous transaction tracking identifier in the transaction data sent last time can be included in the transaction data sent this time In the transaction data.
  • the previous transaction tracking identifier can be written into the historical transaction tracking identifier field. Including the previous transaction tracking identifier in the transaction data helps each decentralized application analyze the historical transaction processing that failed to process, analyze the cause of the processing failure, and take optimization measures.
  • the transaction processing status acquisition party may assemble the transaction tracking identifier into the transaction tracking identifier field of the transaction processing status acquisition request to generate the transaction processing status acquisition request.
  • the transaction processing status acquisition request may be generated based on the encryption processing result.
  • the transaction processing status acquisition party sends the transaction processing status acquisition request to the decentralized application in the decentralized application cluster.
  • the transaction processing status acquisition request can be sent to one or more decentralized applications in the decentralized application cluster.
  • the transaction initiator can send transaction processing status acquisition requests to DAPP1 to DAPP3 one by one to determine the processing flow in which the processing failed, and analyze the reason for the failure. After analyzing the reason for the failure, corrective measures can be taken and the transaction can be initiated again.
  • any decentralized application in the decentralized application cluster can send transaction processing status acquisition requests to other decentralized applications to obtain transactions in each decentralized application. The transaction processing results in the application for business analysis.
  • the decentralized application After the decentralized application receives the transaction status acquisition request, in 406, based on the transaction tracking identifier in the transaction status acquisition request, acquire the transaction processing status of the corresponding transaction from the local transaction processing data.
  • the decentralized application can also use the corresponding decryption algorithm to decrypt the transaction tracking identifier.
  • the decentralized application After the decentralized application obtains the transaction processing status locally, in 408, the acquired transaction tracking identifier is sent to the transaction processing status acquirer. As a result, the transaction processing status acquirer can acquire the transaction processing status of the transaction from the decentralized application.
  • the transaction tracking identifier of the transaction can be used to obtain the transaction processing status of each decentralized application in the decentralized application cluster. And in the process of obtaining the transaction processing status, there is no need to perform additional calculations based on the business logic of each decentralized application, so that the efficiency of obtaining the transaction processing status can be improved.
  • each decentralized application can generate a transaction processing identifier for the transaction (for example, the transaction serial number in each decentralized application) when processing the corresponding transaction process, so as to The decentralization should identify the corresponding transaction. After the current decentralized application completes processing, its transaction processing identifier is included in the transaction processing result data and sent to the subsequent decentralized application.
  • the transaction processing identifier is stored as the parent identifier of the transaction.
  • the transaction processing identifiers of each decentralized application are related to each other.
  • the transaction tracking identifier may also be generated by a decentralized application in a decentralized application cluster. This example will be described below with reference to FIG. 5.
  • FIG. 5 is a flowchart of an example of the transaction processing process of the decentralized application in the present disclosure.
  • the decentralized application receives transaction data for the transaction.
  • the transaction data can be received from the transaction initiator, and when the decentralized application is DAPP2 or DAPP3, the transaction data can be received from the previous decentralized application.
  • the transaction tracking identifier is included in the transaction data.
  • the transaction data does not include the transaction tracking identifier field or the transaction tracking identifier field is empty, it can be determined that the received transaction data does not include the transaction tracking identifier.
  • a transaction tracking identifier is generated for the corresponding transaction.
  • the generated transaction tracking identifier can be written into the transaction tracking identifier field of the transaction data, or the transaction tracking identifier can be written after the transaction tracking identifier field is created.
  • the transaction tracking identifier can be generated by the first decentralized application that the transaction passes through in the decentralized application cluster, so as to avoid overlapping of each transaction tracking identifier, so that the transaction tracking identifier of each transaction can be Uniquely identify the transaction.
  • the transaction initiator may not pay attention to the processing status of the transaction, and thus may not generate the transaction tracking identifier when initiating the transaction.
  • decentralized applications may require transaction processing status in other decentralized applications due to business analysis and other reasons. Therefore, the decentralized application that receives the transaction data can generate a transaction tracking identifier for the transaction, so that when there is a need to obtain the transaction processing status, the transaction processing status of the subsequent transaction processing flow can be obtained based on the transaction tracking identifier.
  • other decentralized applications in the transaction processing flow can also generate a transaction tracking identifier when there is no transaction tracking identifier in the transaction data.
  • the transaction tracking identifiers corresponding to each decentralized application may be the same.
  • the transaction tracking identifier follows the transaction data of the transaction until the final processing is completed.
  • the transaction processing status acquirer can acquire the transaction processing status from each decentralized application based on the same transaction tracking identifier.
  • the transaction tracking identifiers corresponding to various decentralized applications may also be different.
  • the transaction may include a transaction tracking identification field corresponding to each decentralized application.
  • each decentralized application After each decentralized application receives the transaction data, if the transaction tracking identifier field corresponding to the decentralized application is empty, it can generate its own transaction tracking identifier and write it into the corresponding transaction tracking identifier field. A decentralized application that does not pay attention to the transaction processing status may not generate a transaction tracking identifier corresponding to the decentralized application. In this way, it is possible to analyze the transaction processing issues concerned by each decentralized application according to whether the transaction tracking identifier corresponding to each decentralized application is empty.
  • the transaction tracking identifier generated by the decentralized application can be sent to the transaction initiator.
  • the decentralized application that generates the transaction tracking identifier is not the first decentralized application in the transaction processing flow, the generated transaction tracking identifier can also be sent to the previous decentralized application.
  • transaction processing is performed based on the transaction data, and after the transaction processing is completed, the transaction data including the transaction tracking identifier is sent to the next Decentralized application.
  • the transaction processing data can be sent to the blockchain node that performs accounting processing.
  • a decentralized application executes corresponding transaction processing based on transaction data
  • the corresponding transaction processing can be executed again based on the received transaction data.
  • the decentralized application can include the original transaction tracking identifier in the transaction processing data of the previous processing and store it in the transaction processing record, and regenerate transaction tracking for the transaction And then include the regenerated transaction tracking identifier in the transaction processing data of the transaction processing to be executed again.
  • the decentralized application or other decentralized applications can obtain transaction processing data of each transaction processing based on the transaction tracking identifier to perform business analysis, for example, the reason for transaction failure can be analyzed.
  • the regenerated transaction tracking identifier can also be generated based on the original transaction tracking identifier, so as to establish a connection between the two, so that one can obtain the other.
  • the original transaction tracking identifier can be obtained based on the regenerated transaction tracking identifier.
  • the original transaction tracking identifier may be included in the transaction processing data when the transaction processing is executed again.
  • Fig. 6 is a structural block diagram of an apparatus for obtaining transaction processing status in a decentralized application cluster according to an embodiment of the present specification.
  • the transaction processing state obtaining device 600 includes a processing state obtaining request generating unit 610, a processing state obtaining request sending unit 620 and a transaction processing state obtaining unit 630.
  • the processing state acquisition request generating unit 610 generates a transaction processing state acquisition request based on the transaction tracking identifier of the transaction in the decentralized application cluster.
  • the transaction tracking identifier is used to uniquely identify the transaction in the decentralized application cluster.
  • the processing state acquisition request sending unit 620 sends the transaction processing state acquisition request to the decentralized application in the decentralized application cluster.
  • the transaction processing status acquiring unit 630 acquires the transaction processing status of the transaction from the decentralized application.
  • the transaction tracking identifier may be generated by the transaction initiator of the transaction, or it may be generated by the decentralized application when the transaction tracking identifier field of the transaction is empty. In an example, the transaction tracking identification may be generated based on identification generation rules agreed by each decentralized application in the decentralized application cluster. The transaction tracking identifier may also be regenerated by the decentralized application when the transaction processing for the transaction fails. In addition, the transaction tracking identifier corresponding to each decentralized application in the decentralized application cluster may be the same.
  • Fig. 7 is a structural block diagram of an apparatus for processing a transaction processing status acquisition request according to an embodiment of the present specification.
  • the transaction processing status acquisition request processing device 700 includes a processing status acquisition request receiving unit 710, a transaction processing status acquisition unit 720, and a transaction processing status sending unit 730.
  • the processing status acquisition request receiving unit 710 receives the transaction processing status acquisition request.
  • the transaction processing status acquisition request is generated based on the transaction tracking identifier of the transaction in the decentralized application cluster, and the transaction tracking identifier is used in the decentralized application cluster.
  • the transaction processing status acquisition unit 720 acquires the transaction processing status of the transaction from the local transaction processing data based on the transaction tracking identifier in the transaction processing status acquisition request. After the transaction processing status is acquired locally, the transaction processing status sending unit 730 sends the transaction processing status to the sender of the transaction processing status acquisition request.
  • the device for acquiring transaction processing status in a decentralized application cluster and the device for processing transaction processing status acquisition requests of the present disclosure can be implemented by hardware, or can be implemented by software or a combination of hardware and software.
  • the various embodiments in this specification are described in a progressive manner, and the same or similar parts among the various embodiments are referred to each other.
  • the device for acquiring transaction processing status in a decentralized application cluster and the device for processing transaction processing status acquisition requests of the present disclosure can be implemented by hardware, or can be implemented by software or a combination of hardware and software. Taking software implementation as an example, as a logical device, it is formed by reading the corresponding computer program instructions in the memory into the memory by the processor of the device where it is located.
  • the device for generating a multi-layer block chain structure and the device for updating the trust point can be implemented using a computing device, for example.
  • Fig. 8 is a structural block diagram of a computing device for executing a method for acquiring a transaction processing status in a decentralized application cluster or a method for processing a transaction processing status acquisition request according to an embodiment of the present specification.
  • the computing device 800 includes a processor 810, a memory 820, a memory 830, a communication interface 840, and an internal bus 850, and the processor 810, a memory (for example, a non-volatile memory) 820, a memory 830, and a communication interface 840 are connected together via a bus 850.
  • the computing device 800 may include at least one processor 810 that executes at least one computer-readable instruction (ie, the aforementioned Elements implemented in software).
  • computer-executable instructions are stored in the memory 820, which when executed, cause at least one processor 810 to: generate a transaction processing status acquisition request based on the transaction tracking identifier of the transaction in the decentralized application cluster, The transaction tracking identifier is used to uniquely identify the transaction in the decentralized application cluster; send the transaction processing status acquisition request to the decentralized application in the decentralized application cluster; The decentralized application office obtains the transaction processing status of the transaction.
  • computer-executable instructions are stored in the memory 820, which, when executed, cause at least one processor 810 to: receive a transaction processing status acquisition request, the transaction processing status acquisition request being based on the transaction in the decentralized
  • the transaction tracking identifier in the application cluster is generated, and the transaction tracking identifier is used to uniquely identify the transaction in the decentralized application cluster; the transaction tracking identifier in the request is acquired based on the transaction processing status, and the transaction tracking identifier is obtained locally Acquiring the transaction processing status of the transaction from the transaction processing data; and sending the transaction processing status to the sender of the transaction processing status acquisition request.
  • a program product such as a non-transitory machine-readable medium.
  • the non-transitory machine-readable medium may have instructions (ie, the above-mentioned elements implemented in the form of software), which when executed by a machine, cause the machine to execute the various embodiments described above in conjunction with FIGS. 1 to 7 in the various embodiments of the present disclosure. Operation and function.
  • a system or device equipped with a readable storage medium may be provided, and the software program code for realizing the function of any one of the above-mentioned embodiments is stored on the readable storage medium, and the computer or device of the system or device The processor reads and executes the instructions stored in the readable storage medium.
  • the program code itself read from the readable medium can implement the function of any one of the above embodiments, so the machine readable code and the readable storage medium storing the machine readable code constitute the present disclosure a part of.
  • Examples of readable storage media include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD-RW), magnetic tape, Volatile memory card and ROM.
  • the program code can be downloaded from the server computer or the cloud via the communication network.
  • the device structure described in the foregoing embodiments may be a physical structure or a logical structure, that is, some units may be implemented by the same physical entity, or some units may be implemented by multiple physical entities, or may be implemented by multiple physical entities. Some components in independent devices are implemented together.

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Theoretical Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

A method for acquiring a transaction processing state in a decentralized application cluster. The method comprises: on the basis of a transaction tracking identifier, in a decentralized application cluster, of a transaction, generating a transaction processing state acquisition request (402), wherein the transaction tracking identifier is used for uniquely identifying the transaction in the decentralized application cluster; sending the transaction processing state acquisition request to a decentralized application in the decentralized application cluster (404); and the decentralized application acquiring a transaction processing state of the transaction (406), and sending the transaction processing state of the transaction to a transaction processing state acquirer (408).

Description

获取去中心化应用集群中的交易处理状态的方法及装置Method and device for obtaining transaction processing status in decentralized application cluster 技术领域Technical field
本公开涉及区块链技术领域,具体地,涉及获取去中心化应用集群中的交易处理状态的方法及装置。The present disclosure relates to the field of blockchain technology, and in particular, to a method and device for obtaining transaction processing status in a decentralized application cluster.
背景技术Background technique
去中心化应用(DAPP)是运行在去中心化网络(即区块链网络)中的应用程序,在去中心化网络中通常不存在能够完整控制去中心化应用的中心化节点。一个完全的去中心化应用需要是完全开源的,并且是自治的应用程序。去中心化应用的升级必须由大部分用户达成共识之后才可以进行升级。去中心化应用所涉及的数据必须进行加密存储在去中心化的应用平台上。去中心化应用通常包括区块链的链上智能合约模块以及链下服务模块。链上智能合约模块可以根据区块链系统提供的虚拟机来编写智能合约,链下服务模块提供用户服务功能,可以根据对应区块链系统的软件开发工具包来进行开发。A decentralized application (DAPP) is an application running on a decentralized network (ie, a blockchain network). In a decentralized network, there is usually no centralized node that can fully control the decentralized application. A completely decentralized application needs to be completely open source and autonomous applications. The upgrade of decentralized applications can only be upgraded after most users reach a consensus. The data involved in decentralized applications must be encrypted and stored on the decentralized application platform. Decentralized applications usually include the on-chain smart contract module of the blockchain and the off-chain service module. The on-chain smart contract module can write smart contracts based on the virtual machine provided by the blockchain system, and the off-chain service module provides user service functions, which can be developed based on the software development kit of the corresponding blockchain system.
在实践中,为了满足不同机构之间的协作需求,通常需要布置去中心化应用集群来与区块链系统进行对接。在各个协作机构之间的交易可以在该去中心化应用集群中进行处理之后被保存到区块链上。在这种场景下,交易涉及多个去中心化应用,当需要获知某笔交易的处理状态时,将难以定位到各个去中心化应用,因而也为获取交易处理状态带来了难题。In practice, in order to meet the needs of collaboration between different institutions, it is usually necessary to deploy decentralized application clusters to interface with the blockchain system. The transactions between various cooperative institutions can be stored on the blockchain after being processed in the decentralized application cluster. In this scenario, a transaction involves multiple decentralized applications. When it is necessary to know the processing status of a certain transaction, it will be difficult to locate each decentralized application, which also brings difficulties to obtaining the transaction processing status.
发明内容Summary of the invention
鉴于上述,本公开提供了一种获取去中心化应用集群中的交易处理状态的方法及装置和交易处理状态获取请求处理方法及装置。In view of the above, the present disclosure provides a method and device for acquiring transaction processing status in a decentralized application cluster and a method and device for processing transaction processing status acquisition request processing.
根据本公开的一个方面,提供一种用于获取去中心化应用集群中的交易处理状态的方法,包括:基于交易在所述去中心化应用集群中的交易跟踪标识,生成交易处理状态获取请求,所述交易跟踪标识用于在所述去中心化应用集群中唯一地标识所述交易;将所述交易处理状态获取请求发送给所述去中心化应用集群中的去中心化应用;以及从所述去中心化应用处获取所述交易的交易处理状态。According to one aspect of the present disclosure, there is provided a method for acquiring transaction processing status in a decentralized application cluster, including: generating a transaction processing status acquisition request based on a transaction tracking identifier of a transaction in the decentralized application cluster , The transaction tracking identifier is used to uniquely identify the transaction in the decentralized application cluster; sending the transaction processing status acquisition request to the decentralized application in the decentralized application cluster; and The decentralized application obtains the transaction processing status of the transaction.
可选的,在一个示例中,所述交易跟踪标识可以是基于所述去中心化应用集群中 的各个去中心化应用所约定的标识生成规则生成的。Optionally, in an example, the transaction tracking identifier may be generated based on an identifier generation rule agreed upon by each decentralized application in the decentralized application cluster.
可选的,在一个示例中,所述交易跟踪标识可以是由所述交易的交易发起方生成的。Optionally, in an example, the transaction tracking identifier may be generated by the transaction initiator of the transaction.
可选的,在一个示例中,所述交易跟踪标识可以是由所述去中心化应用在所述交易的交易数据不包括交易跟踪标识生成的。Optionally, in an example, the transaction tracking identifier may be generated by the decentralized application when the transaction data of the transaction does not include the transaction tracking identifier.
可选的,在一个示例中,所述交易跟踪标识可以是由所述去中心化应用在针对所述交易的交易处理失败时重新生成的。Optionally, in an example, the transaction tracking identifier may be regenerated by the decentralized application when the transaction processing for the transaction fails.
可选的,在一个示例中,对应于所述去中心化应用集群中的各个去中心化应用的所述交易跟踪标识可以是相同的。Optionally, in an example, the transaction tracking identifiers corresponding to each decentralized application in the decentralized application cluster may be the same.
根据本公开的另一方面,还提供一种用于处理交易处理状态获取请求的方法,所述方法由去中心化应用集群中的去中心化应用执行,所述方法包括:接收交易处理状态获取请求,所述交易处理状态获取请求是基于交易在所述去中心化应用集群中的交易跟踪标识生成的,所述交易跟踪标识用于在所述去中心化应用集群中唯一地标识所述交易;基于所述交易处理状态获取请求中的交易跟踪标识,从本地交易处理数据中获取所述交易的交易处理状态;以及将所述交易处理状态发送给所述交易处理状态获取请求的发送方。According to another aspect of the present disclosure, there is also provided a method for processing a transaction processing status acquisition request, the method is executed by a decentralized application in a decentralized application cluster, and the method includes: receiving transaction processing status acquisition Request, the transaction processing status acquisition request is generated based on the transaction tracking identifier of the transaction in the decentralized application cluster, and the transaction tracking identifier is used to uniquely identify the transaction in the decentralized application cluster Based on the transaction tracking identifier in the transaction processing status acquisition request, the transaction processing status of the transaction is acquired from local transaction processing data; and the transaction processing status is sent to the sender of the transaction processing status acquisition request.
根据本公开的另一方面,还提供用于获取去中心化应用集群中的交易处理状态的装置,包括:处理状态获取请求生成单元,基于交易在所述去中心化应用集群中的交易跟踪标识,生成交易处理状态获取请求,所述交易跟踪标识用于在所述去中心化应用集群中唯一地标识所述交易;处理状态获取请求发送单元,将所述交易处理状态获取请求发送给所述去中心化应用集群中的去中心化应用;以及交易处理状态获取单元,从所述去中心化应用处获取所述交易的交易处理状态。According to another aspect of the present disclosure, a device for acquiring transaction processing status in a decentralized application cluster is also provided, including: a processing status acquisition request generating unit based on the transaction tracking identifier of the transaction in the decentralized application cluster , Generate a transaction processing status acquisition request, where the transaction tracking identifier is used to uniquely identify the transaction in the decentralized application cluster; a processing status acquisition request sending unit sends the transaction processing status acquisition request to the A decentralized application in a decentralized application cluster; and a transaction processing status acquisition unit, which acquires the transaction processing status of the transaction from the decentralized application.
可选的,在一个示例中,所述交易跟踪标识可以是基于所述去中心化应用集群中的各个去中心化应用所约定的标识生成规则生成的。Optionally, in an example, the transaction tracking identifier may be generated based on an identifier generation rule agreed upon by each decentralized application in the decentralized application cluster.
可选的,在一个示例中,所述交易跟踪标识可以是由所述交易的交易发起方生成的。Optionally, in an example, the transaction tracking identifier may be generated by the transaction initiator of the transaction.
可选的,在一个示例中,所述交易跟踪标识可以是由所述去中心化应用在所述交易的交易数据不包括交易跟踪标识时生成的。Optionally, in an example, the transaction tracking identifier may be generated by the decentralized application when the transaction data of the transaction does not include the transaction tracking identifier.
可选的,在一个示例中,所述交易跟踪标识可以是由所述去中心化应用在针对所述交易的交易处理失败时重新生成的。Optionally, in an example, the transaction tracking identifier may be regenerated by the decentralized application when the transaction processing for the transaction fails.
可选的,在一个示例中,对应于所述去中心化应用集群中的各个去中心化应用的所述交易跟踪标识可以是相同的。Optionally, in an example, the transaction tracking identifiers corresponding to each decentralized application in the decentralized application cluster may be the same.
根据本公开的另一方面,还提供用于处理交易处理状态获取请求的装置,所述装置用于去中心化应用集群中的去中心化应用,所述装置包括:处理状态获取请求接收单元,接收交易处理状态获取请求,所述交易处理状态获取请求是基于交易在所述去中心化应用集群中的交易跟踪标识生成的,所述交易跟踪标识用于在所述去中心化应用集群中唯一地标识所述交易;交易处理状态获取单元,基于所述交易处理状态获取请求中的交易跟踪标识,从本地交易处理数据中获取所述交易的交易处理状态;以及交易处理状态发送单元,将所述交易处理状态发送给所述交易处理状态获取请求的发送方。According to another aspect of the present disclosure, a device for processing a transaction processing status acquisition request is also provided, the device is used for a decentralized application in a decentralized application cluster, and the device includes: a processing status acquisition request receiving unit, Receive a transaction processing status acquisition request, the transaction processing status acquisition request is generated based on the transaction tracking identifier of the transaction in the decentralized application cluster, and the transaction tracking identifier is used to be unique in the decentralized application cluster The transaction processing status acquisition unit, based on the transaction tracking identifier in the transaction processing status acquisition request, acquires the transaction processing status of the transaction from the local transaction processing data; and the transaction processing status sending unit The transaction processing status is sent to the sender of the transaction processing status acquisition request.
根据本公开的另一方面,还提供一种计算设备,包括:至少一个处理器;以及存储器,所述存储器存储指令,当所述指令被所述至少一个处理器执行时,使得所述至少一个处理器执行如上所述的交易处理状态获取方法。根据本公开的另一方面,还提供一种机器可读存储介质,其存储有可执行指令,所述指令当被执行时使得所述机器执行如上所述的交易处理状态获取方法。According to another aspect of the present disclosure, there is also provided a computing device, including: at least one processor; and a memory, the memory stores instructions, and when the instructions are executed by the at least one processor, the at least one The processor executes the method for acquiring the transaction processing status as described above. According to another aspect of the present disclosure, there is also provided a machine-readable storage medium that stores executable instructions that, when executed, cause the machine to execute the method for obtaining transaction processing status as described above.
根据本公开的另一方面,还提供一种计算设备,包括:至少一个处理器;以及存储器,所述存储器存储指令,当所述指令被所述至少一个处理器执行时,使得所述至少一个处理器执行如上所述的交易状态获取请求处理方法。According to another aspect of the present disclosure, there is also provided a computing device, including: at least one processor; and a memory, the memory stores instructions, and when the instructions are executed by the at least one processor, the at least one The processor executes the transaction status acquisition request processing method as described above.
根据本公开的另一方面,还提供一种非暂时性机器可读存储介质,其存储有可执行指令,所述指令当被执行时使得所述机器执行如上所述的交易状态获取请求处理方法。According to another aspect of the present disclosure, there is also provided a non-transitory machine-readable storage medium that stores executable instructions, which when executed, cause the machine to execute the transaction status acquisition request processing method described above .
利用本公开的方法和装置,利用在去中心化应用集群中唯一地标识交易的交易跟踪标识,能够快速准确地定位各个去中心化应用对交易的处理状态,从而能够快速地获取交易处理状态。Using the method and device of the present disclosure, the transaction tracking identifier that uniquely identifies the transaction in the decentralized application cluster can be used to quickly and accurately locate the transaction processing status of each decentralized application, so that the transaction processing status can be quickly obtained.
附图说明Description of the drawings
通过参照下面的附图,可以实现对于本公开内容的本质和优点的进一步理解。在附图中,类似组件或特征可以具有相同的附图标记。附图是用来提供对本公开实施例的进一步理解,并且构成说明书的一部分,与下面的具体实施方式一起用于解释本说明书 的实施例,但并不构成对本说明书的实施例的限制。在附图中:By referring to the following drawings, a further understanding of the nature and advantages of the present disclosure can be achieved. In the drawings, similar components or features may have the same reference signs. The drawings are used to provide a further understanding of the embodiments of the present disclosure, and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the specification, but do not constitute a limitation to the embodiments of the specification. In the attached picture:
图1示出了可用于执行根据本公开的用于获取去中心化应用集群中的交易处理状态的方法和用于处理交易处理状态获取请求的方法的环境的示例的示意图;FIG. 1 shows a schematic diagram of an example of an environment that can be used to execute the method for obtaining transaction processing status in a decentralized application cluster and the method for processing transaction processing status acquisition requests according to the present disclosure;
图2示出了执行根据本公开的用于获取去中心化应用集群中的交易处理状态的方法和用于处理交易处理状态获取请求的方法的系统架构的示例的示意图;2 shows a schematic diagram of an example of a system architecture that executes the method for obtaining transaction processing status in a decentralized application cluster and the method for processing transaction processing status acquisition requests according to the present disclosure;
图3是用于说明本公开中的去中心化集群一个示例的示意图;Fig. 3 is a schematic diagram for explaining an example of a decentralized cluster in the present disclosure;
图4是根据本说明书的一个实施例的用于获取去中心化应用集群中的交易处理状态的方法的流程图;Fig. 4 is a flowchart of a method for obtaining transaction processing status in a decentralized application cluster according to an embodiment of the present specification;
图5是本公开中的去中心化应用的交易处理过程的一个示例的流程图;FIG. 5 is a flowchart of an example of the transaction processing process of the decentralized application in the present disclosure;
图6是根据本说明书的一个实施例的用于获取去中心化应用集群中的交易处理状态的装置的结构框图;Fig. 6 is a structural block diagram of an apparatus for obtaining transaction processing status in a decentralized application cluster according to an embodiment of the present specification;
图7是根据本说明书的一个实施例的用于处理交易处理状态获取请求的装置的结构框图;Fig. 7 is a structural block diagram of an apparatus for processing a transaction processing status acquisition request according to an embodiment of the present specification;
图8是根据本说明书的一个实施例的用于执行用于获取去中心化应用集群中的交易处理状态的方法或用于处理交易处理状态获取请求的方法的计算设备的结构框图。Fig. 8 is a structural block diagram of a computing device for executing a method for acquiring a transaction processing status in a decentralized application cluster or a method for processing a transaction processing status acquisition request according to an embodiment of the present specification.
具体实施方式Detailed ways
以下将参考示例实施方式讨论本文描述的主题。应该理解,讨论这些实施方式只是为了使得本领域技术人员能够更好地理解从而实现本文描述的主题,并非是对权利要求书中所阐述的保护范围、适用性或者示例的限制。可以在不脱离本公开内容的保护范围的情况下,对所讨论的元素的功能和排列进行改变。各个示例可以根据需要,省略、替代或者添加各种过程或组件。另外,相对一些示例所描述的特征在其它例子中也可以进行组合。The subject described herein will be discussed below with reference to example embodiments. It should be understood that the discussion of these embodiments is only to enable those skilled in the art to better understand and realize the subject described herein, and is not to limit the scope of protection, applicability, or examples set forth in the claims. The function and arrangement of the discussed elements can be changed without departing from the scope of protection of the present disclosure. Various examples can omit, substitute, or add various procedures or components as needed. In addition, features described with respect to some examples can also be combined in other examples.
如本文中使用的,术语“包括”及其变型表示开放的术语,含义是“包括但不限于”。术语“基于”表示“至少部分地基于”。术语“一个实施例”和“一实施例”表示“至少一个实施例”。术语“另一个实施例”表示“至少一个其他实施例”。下面可以包括其他的定义,无论是明确的还是隐含的。除非上下文中明确地指明,否则一个术语的定义在整个说明书中是一致的。As used herein, the term "including" and its variations mean open terms, meaning "including but not limited to". The term "based on" means "based at least in part on." The terms "one embodiment" and "an embodiment" mean "at least one embodiment." The term "another embodiment" means "at least one other embodiment." Other definitions can be included below, whether explicit or implicit. Unless clearly indicated in the context, the definition of a term is consistent throughout the specification.
现在结合附图来描述本公开的用于获取去中心化应用集群中的交易处理状态的方法及装置和用于处理交易处理状态获取请求的方法及装置。The method and device for obtaining transaction processing status in a decentralized application cluster and the method and device for processing transaction processing status acquisition requests of the present disclosure will now be described with reference to the accompanying drawings.
区块链是一种按照时间顺序来将数据区块顺序相连组合而成的链式数据结构,并且以密码学方式保证数据区块不可篡改和不可伪造。区块链包括一个或多个区块。区块链中的每个区块通过包括该区块链中紧接其之前的前一个区块的加密散列而链接到该前一个区块。每个区块还包括时间戳、该区块的加密哈希以及一个或多个交易(transaction)。对已经被区块链网络的节点验证的交易进行哈希处理并形成Merkle树。在Merkle树中,对叶节点处的数据进行哈希处理,并且针对Merkle树的每个分支,在该分支的根处级联该分支的所有哈希值。针对Merkle树执行上述处理,直到整个Merkle树的根节点。Merkle树的根节点存储代表该Merkle树中的所有数据的哈希值。当一个哈希值声称是Merkle树中存储的交易时,可以通过判断该哈希值是否与Merkle树的结构一致来进行快速验证。Blockchain is a chain data structure that connects and combines data blocks sequentially in chronological order, and cryptographically ensures that the data blocks cannot be tampered with or forged. The blockchain includes one or more blocks. Each block in the blockchain is linked to the previous block by including the encrypted hash of the immediately preceding block in the blockchain. Each block also includes a timestamp, a cryptographic hash of the block, and one or more transactions. The transaction that has been verified by the nodes of the blockchain network is hashed and a Merkle tree is formed. In the Merkle tree, the data at the leaf nodes is hashed, and for each branch of the Merkle tree, all the hash values of the branch are concatenated at the root of the branch. The above processing is performed on the Merkle tree until the root node of the entire Merkle tree. The root node of the Merkle tree stores hash values representing all data in the Merkle tree. When a hash value claims to be a transaction stored in the Merkle tree, it can be quickly verified by judging whether the hash value is consistent with the structure of the Merkle tree.
区块链是用于存储交易的数据结构。区块链网络是用于管理、更新和维护一个或多个区块链结构的计算节点网络。如上所述,区块链网络可以包括公有区块链网络、私有区块链网络或联盟区块链网络。Blockchain is a data structure used to store transactions. The blockchain network is a network of computing nodes used to manage, update and maintain one or more blockchain structures. As mentioned above, the blockchain network can include a public blockchain network, a private blockchain network, or a consortium blockchain network.
在公有区块链网络中,共识过程由共识网络的节点控制。例如,在公有区块链网络中可以存在成千上万个实体协作处理,每个实体操作该公有区块链网络中的至少一个节点。因此,公有区块链网络可以被认为是参与实体的公有网络。在一些示例中,大多数实体(节点)必须按序对每个区块进行签名,并且将签名后的区块添加到区块链网络的区块链中。公有区块链网络的示例可以包括特定对等支付网络。此外,术语“区块链”不特别指代任何特定的区块链。In the public blockchain network, the consensus process is controlled by the nodes of the consensus network. For example, there may be thousands of entities in a public blockchain network for collaborative processing, and each entity operates at least one node in the public blockchain network. Therefore, the public blockchain network can be considered as a public network of participating entities. In some examples, most entities (nodes) must sign each block in sequence, and add the signed block to the blockchain of the blockchain network. Examples of public blockchain networks may include specific peer-to-peer payment networks. In addition, the term "blockchain" does not specifically refer to any particular blockchain.
公有区块链网络支持公有交易。公有交易在公有区块链网络内的所有节点之间共享,并且存储在全局区块链中。全局区块链是指跨所有节点复制的区块链。为了达成共识(例如,同意向区块链添加区块),在公有区块链网络内实现共识协议。共识协议的示例包括但不限于:工作量证明(POW,proof-of-work),权益证明(POS,proof-of-stake)和权威证明(POA,proof-of-authority)。在本公开中,采用POW作为非限制性示例。The public blockchain network supports public transactions. Public transactions are shared among all nodes in the public blockchain network and stored in the global blockchain. A global blockchain refers to a blockchain that is replicated across all nodes. In order to reach a consensus (for example, agree to add a block to the blockchain), a consensus agreement is implemented in the public blockchain network. Examples of consensus protocols include but are not limited to: proof-of-work (POW), proof-of-stake (POS), and proof-of-authority (POA). In this disclosure, POW is taken as a non-limiting example.
私有区块链网络被提供来用于特定实体。私有区块链网络中的各个节点的读写权限被严格控制。因此,私有区块链网络通常也称为许可网络,其对允许谁参与网络以及的网络参与水平(例如,仅在某些交易情形下)进行限制。在私有区块链网络中,可以使用各种类型的访问控制机制(例如,现有参与方对添加新实体进行投票,监管机构控 制许可等)。Private blockchain networks are provided for specific entities. The read and write permissions of each node in the private blockchain network are strictly controlled. Therefore, a private blockchain network is usually also called a permissioned network, which restricts who is allowed to participate in the network and the level of network participation (for example, only in certain transaction situations). In a private blockchain network, various types of access control mechanisms can be used (for example, existing participants vote to add new entities, regulatory agencies control permissions, etc.).
联盟区块链网络在参与实体之间是私有的。在联盟区块链网络中,共识过程由授权节点控制。例如,由若干个(例如,10个)实体(例如,金融机构,保险公司)组成的联盟可以操作联盟区块链网络,每个实体操作该联盟区块链网络中的至少一个节点。因此,联盟区块链网络可以被认为是参与实体的私有网络。在一些示例中,每个参与实体(节点)必须按序对每个区块进行签名,并将该区块添加到区块链。在一些示例中,可以由参与实体(节点)的子集(例如,至少7个实体)来对每个区块进行签名,并将该区块添加到区块链。The alliance blockchain network is private among participating entities. In the alliance blockchain network, the consensus process is controlled by authorized nodes. For example, a consortium composed of several (for example, 10) entities (for example, financial institutions, insurance companies) can operate a consortium blockchain network, and each entity operates at least one node in the consortium blockchain network. Therefore, the consortium blockchain network can be considered as a private network of participating entities. In some examples, each participating entity (node) must sign each block in sequence and add the block to the blockchain. In some examples, each block may be signed by a subset of participating entities (nodes) (for example, at least 7 entities), and the block may be added to the blockchain.
在本公开中参考联盟区块链网络来详细描述本公开的实施例。然而,可以预期,本公开的实施例可以在任何适合的区块链网络中实现。In the present disclosure, the embodiments of the present disclosure are described in detail with reference to the alliance blockchain network. However, it is expected that the embodiments of the present disclosure can be implemented in any suitable blockchain network.
区块链是防篡改的共享数字分类账,其在公有或私有对等网络中记录交易。分类账被分发到网络中的所有成员节点,并且网络中发生的资产交易历史记录被永久记录在区块中。Blockchain is a tamper-proof shared digital ledger that records transactions in a public or private peer-to-peer network. The ledger is distributed to all member nodes in the network, and the history of asset transactions that occurred in the network is permanently recorded in the block.
共识机制确保分布式区块链网络中的所有网络节点按照相同的顺序执行交易,并且随后写入相同的分类账。共识模型旨在解决拜占庭问题。在拜占庭问题中,分布式区块链网络中的比如服务器或网络节点的组件可能会出现故障,或者故意向其他节点传播错误的信息。由于其他网络节点需要首先就哪个网络节点首先失败达成共识,从而其他网络节点很难将该组件声明失败并将其排除出区块链网络。The consensus mechanism ensures that all network nodes in the distributed blockchain network execute transactions in the same order and then write to the same ledger. The consensus model aims to solve the Byzantine problem. In the Byzantine problem, components such as servers or network nodes in the distributed blockchain network may malfunction or deliberately spread wrong information to other nodes. Since other network nodes need to reach a consensus on which network node fails first, it is difficult for other network nodes to declare the component failure and exclude it from the blockchain network.
图1示出了可用于执行根据本公开的用于获取去中心化应用集群中的交易处理状态的方法和用于处理交易处理状态获取请求的方法的环境100的示例的示意图。在一些示例中,环境100使得实体能够参与区块链网络102。如图1所示,环境100包括网络104、和计算设备/系统106、108。在一些示例中,网络104可以包括局域网(LAN),广域网(WAN),因特网或其组合,并且连接网站、用户设备(例如,计算设备)和后端系统。在一些示例中,可以通过有线和/或无线通信链路来访问网络104。在一些示例中,计算设备/系统106、108通过网络104相互通信,以及通过网络104实现与区块链网络102之间的通信,以及区块链网络102中的节点(或,节点设备)通过网络104来进行通信。通常,网络104表示一个或多个通信网络。在一些情况下,计算设备/系统106、108可以是云计算系统(未示出)的节点,或者每个计算设备/系统106、108可以是单独的云计算系统,其包括通过网络104互连的多个计算机并且用作分布式处理系统。FIG. 1 shows a schematic diagram of an example of an environment 100 that can be used to execute the method for obtaining transaction processing status in a decentralized application cluster and the method for processing transaction processing status acquisition requests according to the present disclosure. In some examples, the environment 100 enables entities to participate in the blockchain network 102. As shown in FIG. 1, the environment 100 includes a network 104, and computing devices/ systems 106, 108. In some examples, the network 104 may include a local area network (LAN), a wide area network (WAN), the Internet, or a combination thereof, and connect a website, a user device (eg, a computing device), and a back-end system. In some examples, the network 104 may be accessed through a wired and/or wireless communication link. In some examples, the computing devices/ systems 106 and 108 communicate with each other through the network 104, and communicate with the blockchain network 102 through the network 104, and the nodes (or node devices) in the blockchain network 102 pass through The network 104 communicates. Generally, the network 104 represents one or more communication networks. In some cases, the computing devices/ systems 106, 108 may be nodes of a cloud computing system (not shown), or each computing device/ system 106, 108 may be a separate cloud computing system, including interconnection through the network 104 Multiple computers and used as a distributed processing system.
在所说明的示例中,计算设备/系统106、108中的每个可以包括能够参与作为区块链网络102中的节点的任何合适的计算系统。计算设备/系统的示例包括但不限于,服务器,台式计算机,笔记本电脑,平板电脑设备和智能手机等。在一些示例中,计算设备/系统106、108上可以安装有用于与区块链网络102交互的一个或多个计算机实现的服务。例如,计算设备/系统106上可以安装有第一实体(例如,用户A)的服务,比如,第一实体用于管理其与一个或多个其他实体(例如,其他用户)的交易的交易管理系统。计算设备/系统108上可以安装有第二实体(例如,用户B)的服务,比如,第二实体用于管理其与一个或多个其他实体(例如,其他用户)的交易的交易管理系统。在图1的示例中,区块链网络102被表示为节点的对等网络,并且计算设备/系统106、108分别作为参与区块链网络102的第一实体和第二实体的节点。In the illustrated example, each of the computing devices/ systems 106, 108 may include any suitable computing system capable of participating as a node in the blockchain network 102. Examples of computing devices/systems include, but are not limited to, servers, desktop computers, laptops, tablet devices, smart phones, etc. In some examples, one or more computer-implemented services for interacting with the blockchain network 102 may be installed on the computing device/ system 106, 108. For example, the computing device/system 106 may be installed with services of the first entity (for example, user A). For example, the first entity is used to manage transactions with one or more other entities (for example, other users). system. The computing device/system 108 may be installed with services of a second entity (for example, user B), for example, a transaction management system used by the second entity to manage transactions with one or more other entities (for example, other users). In the example of FIG. 1, the blockchain network 102 is represented as a peer-to-peer network of nodes, and the computing devices/ systems 106, 108 serve as the nodes of the first entity and the second entity participating in the blockchain network 102, respectively.
图2示出了执行根据本公开的用于获取去中心化应用集群中的交易处理状态的方法和用于处理交易处理状态获取请求的方法的系统架构200的示例的示意图。系统架构200的示例包括分别与参与方A,参与方B和参与方C对应的参与方系统202、204、206。每个参与方(例如,用户,企业)参与被提供来作为对等网络的区块链网络212。区块链网络212包括多个节点214,其中,节点214中的至少一些节点在区块链216中记录信息,并且所记录的信息不可更改。尽管在区块链网络212内示意性地示出了单个区块链216,但是可以提供区块链216的多个副本,并且在区块链网络212中维护多个副本,如稍后详细描述的。FIG. 2 shows a schematic diagram of an example of a system architecture 200 that executes the method for obtaining transaction processing status in a decentralized application cluster and the method for processing transaction processing status acquisition requests according to the present disclosure. An example of the system architecture 200 includes the participant systems 202, 204, and 206 corresponding to the participant A, the participant B, and the participant C, respectively. Each participant (eg, user, enterprise) participates in the blockchain network 212 provided as a peer-to-peer network. The blockchain network 212 includes a plurality of nodes 214, wherein at least some of the nodes 214 record information in the blockchain 216, and the recorded information cannot be changed. Although a single blockchain 216 is schematically shown within the blockchain network 212, multiple copies of the blockchain 216 may be provided, and multiple copies are maintained in the blockchain network 212, as described in detail later of.
在所示出的示例中,每个参与方系统202、204、206分别由参与方A,参与方B和参与方C提供,或者被提供来作为参与方A,参与方B和参与方C,并且充当区块链网络212内的对应节点214。如这里所使用的,节点通常是指连接到区块链网络212的单个系统(例如,计算机,服务器),并且使得相应的参与方能够参与区块链网络。在图2示出的示例中,参与方对应于每个节点214。然而,一个参与方可以操作区块链网络212内的多个节点214,和/或多个参与方可以共享单个节点214。在一些示例中,参与方系统202、204、206使用协议(例如,超文本传输协议安全(HTTPS))和/或使用远程过程调用(RPC)来与区块链网络212通信,或者通过区块链网络212进行通信。In the example shown, each participant system 202, 204, 206 is provided by participant A, participant B, and participant C, or provided as participant A, participant B, and participant C, respectively, And it serves as the corresponding node 214 in the blockchain network 212. As used herein, a node generally refers to a single system (eg, computer, server) connected to the blockchain network 212 and enables corresponding participants to participate in the blockchain network. In the example shown in FIG. 2, the participant corresponds to each node 214. However, one participant can operate multiple nodes 214 within the blockchain network 212, and/or multiple participants can share a single node 214. In some examples, the participant systems 202, 204, 206 use protocols (e.g., Hypertext Transfer Protocol Security (HTTPS)) and/or use remote procedure calls (RPC) to communicate with the blockchain network 212, or through the blockchain The chain network 212 communicates.
节点214在区块链网络212的参与度可以不同。例如,一些节点214可以参与共识过程(例如,作为将区块添加到区块链216的矿工节点),而其他节点214不参与共识过程。作为另一示例,一些节点214存储区块链216的完整副本,而其他节点214仅存储区块链216的部分副本。在图2的示例中,参与方系统202、204、206各自存储区 块链216的完整副本216'、216”、216”'。The degree of participation of the node 214 in the blockchain network 212 may vary. For example, some nodes 214 may participate in the consensus process (eg, as miner nodes that add blocks to the blockchain 216), 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 only store a partial copy of the blockchain 216. In the example of Figure 2, the participant systems 202, 204, 206 each store a complete copy of the block chain 216 216', 216", 216"'.
区块链(例如,图2中的区块链216)由一连串的区块组成,每个区块存储数据。数据的示例可以包括表示两个或更多参与方之间的交易的交易数据。在本公开中,交易被使用来作为非限制性示例,可以预期的是,任何适当的数据都可以存储在区块链中(例如,文档,图像,视频,音频)。交易的示例可以包括但不限于交换有价值的东西(例如,资产,产品,服务和货币等)。交易数据被不可更改地存储在区块链中。A blockchain (for example, the blockchain 216 in FIG. 2) is composed of a series of blocks, and each block stores data. Examples of data may include transaction data representing transactions between two or more participants. In this disclosure, transactions are used as a non-limiting example, and it is expected that any appropriate data can be stored in the blockchain (for example, documents, images, videos, audios). Examples of transactions may include, but are not limited to, the exchange of valuable things (for example, assets, products, services, currency, etc.). Transaction data is stored immutably in the blockchain.
在存储在区块中之前,对交易数据进行哈希处理。哈希处理是将(作为字符串数据提供的)交易数据转换为固定长度的哈希值(也被作为字符串数据提供)的过程。通过对交易数据进行哈希处理后,即使交易数据出现轻微更改,也会导致得到完全不同的哈希值。哈希值通常是通过使用哈希函数来对交易数据进行哈希处理而生成的。哈希函数的示例包括但不限于安全散列算法(SHA)-256,其输出256比特的哈希值。Before storing in the block, hash the transaction data. Hashing is the process of converting transaction data (provided as string data) into a fixed-length hash value (also provided as string data). After the transaction data is hashed, even a slight change in the transaction data will result in a completely different hash value. The hash value is usually generated by hashing transaction data using a hash function. Examples of hash functions include, but are not limited to, Secure Hash Algorithm (SHA)-256, which outputs a 256-bit hash value.
多个交易的交易数据可以在被哈希化之后存储在区块中。例如,对两个交易数据进行哈希处理得到两个哈希值,然后,对所得到的两个哈希值再次进行哈希处理以得到另一哈希值。重复该过程,直到对于要存储在区块中的所有交易,得到单个哈希值。该哈希值被称为Merkle根哈希,并且被存储在区块的头部。任何交易的更改都会导致其哈希值发生变化,最终导致Merkle根哈希值发生变化。The transaction data of multiple transactions can be stored in the block after being hashed. For example, two transaction data are hashed to obtain two hash values, and then the two obtained hash values are hashed again to obtain another hash value. This process is repeated until a single hash value is obtained for all transactions to be stored in the block. This hash value is called the Merkle root hash and is stored at the head of the block. Any change in the transaction will cause its hash value to change, and eventually the Merkle root hash value will change.
通过共识协议来将区块添加到区块链中。区块链网络中的多个节点参与共识协议,并且经过竞争之后将区块添加到区块链中。这样的节点被称为矿工节点(或记账节点)。以上介绍的POW用作非限制性示例。The block is added to the blockchain through a consensus protocol. Multiple nodes in the blockchain network participate in the consensus protocol and add blocks to the blockchain after competition. Such nodes are called miner nodes (or accounting nodes). The POW introduced above serves as a non-limiting example.
矿工节点执行共识过程来将交易(所对应的区块)添加到区块链。虽然多个矿工节点参与共识过程,但只有一个矿工节点可以将区块写入区块链。也就是说,矿工节点在共识过程中竞争以将其区块添加到区块链中。更详细地,矿工节点周期性地从交易池中收集待处理的交易(例如,直到达到在区块中可以包括的交易数量的预定限制,如果有的话)。交易池包括来自区块链网络中的参与方的交易消息。矿工节点创建区块,并将交易添加到区块中。在将交易添加到区块之前,矿工节点检查待添加的交易中是否存在区块链的区块中具有的交易。如果该交易已被添加到另一个区块中,则该交易将被丢弃。Miner nodes perform a consensus process to add transactions (corresponding blocks) to the blockchain. Although multiple miner nodes participate in the consensus process, only one miner node can write a block to the blockchain. In other words, miner nodes compete in the consensus process to add their blocks to the blockchain. In more detail, the miner node periodically collects pending transactions from the transaction pool (for example, until a predetermined limit on the number of transactions that can be included in the block is reached, if any). The transaction pool includes transaction messages from participants in the blockchain network. Miner nodes create blocks and add transactions to the blocks. Before adding the transaction to the block, the miner node checks whether there is a transaction in the block of the blockchain among the transactions to be added. If the transaction has been added to another block, the transaction will be discarded.
矿工节点生成区块头,对区块中的所有交易进行哈希处理,并且成对地组合哈希值以生成进一步的哈希值,直到针对区块中的所有交易得到单个哈希值(Merkle根哈希)。 然后,将Merkle根哈希添加到区块头中。矿工还确定区块链中的最新区块(即,添加到区块链的最后一个区块)的哈希值。矿工节点还可以在区块头中添加随机数值(nonce值)和时间戳。在挖掘过程中,矿工节点尝试找到满足所需参数的哈希值。矿工节点不断更改nonce值,直到找到满足所需参数的哈希值。The miner node generates a block header, hashes all transactions in the block, and combines the hash values in pairs to generate further hash values until a single hash value (Merkle root) is obtained for all transactions in the block. Hash). Then, add the Merkle root hash to the block header. The miner also determines the hash value of the latest block in the blockchain (ie, the last block added to the blockchain). Miner nodes can also add random values (nonce values) and timestamps to the block header. During the mining process, the miner node tries to find a hash value that meets the required parameters. The miner node keeps changing the nonce value until it finds a hash value that meets the required parameters.
区块链网络中的每个矿工都试图找到满足所需参数的哈希值,并且以这种方式彼此竞争。最终,一个矿工节点找到满足所需参数的哈希值,并将该哈希值通告给区块链网络中的所有其他矿工节点。其他矿工节点验证哈希值,如果确定为正确,则验证区块中的每个交易,接受该区块,并将该区块附加到它们的区块链副本中。以这种方式,区块链的全局状态在区块链网络内的所有矿工节点上达成一致。上述过程是POW共识协议。Every miner in the blockchain network tries to find a hash value that meets the required parameters and competes with each other in this way. Finally, a miner node finds a hash value that meets the required parameters and advertises the hash value to all other miner nodes in the blockchain network. Other miner nodes verify the hash value, and if it is determined to be correct, verify each transaction in the block, accept the block, and attach the block to their copy of the blockchain. In this way, the global state of the blockchain is agreed upon on all miner nodes within the blockchain network. The above process is a POW consensus protocol.
在图2所提供的示例中,参与方A想要向参与方B发送一定数量的资金。参与方A生成交易消息,并将交易消息发送到区块链网络,该交易消息被增加到交易池中。区块链网络中的每个矿工节点创建区块,并从交易池中获取交易,并将交易添加到区块。按照这种方式,参与方A所发布的交易被添加到矿工节点的区块中。In the example provided in Figure 2, participant A wants to send a certain amount of funds to participant B. Participant A generates a transaction message and sends the transaction message to the blockchain network, and the transaction message is added to the transaction pool. Each miner node in the blockchain network creates a block, obtains transactions from the transaction pool, and adds the transaction to the block. In this way, the transaction issued by participant A is added to the block of the miner node.
在一些区块链网络中,实施密码技术来维护交易的隐私性。例如,如果两个节点想要保持交易私密性,使得区块链网络中的其他节点不能获悉交易细节,则节点可以对交易数据进行加密处理。加密方法的示例包括但不限于对称加密和非对称加密。对称加密是指使用单个密钥进行加密(根据明文生成密文)和解密(根据密文生成明文)的加密过程。在对称加密中,多个节点可以使用相同的密钥,因此每个节点都可以对交易数据进行加密/解密。In some blockchain networks, cryptography is implemented to maintain the privacy of transactions. For example, if two nodes want to maintain the privacy of the transaction so that other nodes in the blockchain network cannot learn the details of the transaction, the node can encrypt the transaction data. Examples of encryption methods include, but are not limited to, symmetric encryption and asymmetric encryption. Symmetric encryption refers to the encryption process that uses a single key to encrypt (generate ciphertext based on plaintext) and decrypt (generate plaintext based on ciphertext). In symmetric encryption, multiple nodes can use the same key, so each node can encrypt/decrypt transaction data.
非对称加密是指使用密钥对来进行加密。每个密钥对包括私钥和公钥,私钥仅对于相应节点是已知的,并且公钥对于区块链网络中的任何或所有其他节点是已知的。节点可以使用另一个节点的公钥来加密数据,并且可以使用其他节点的私钥来解密经过加密的数据。例如,再次参考图2。参与方A可以使用参与方B的公钥来加密数据,并将加密数据发送给参与方B.参与方B可以使用其私钥来解密加密数据(密文)并提取原始数据(明文)。使用节点的公钥加密的消息,只能使用该节点的私钥解密。Asymmetric encryption refers to the use of key pairs for encryption. Each key pair includes a private key and a public key. The private key is only known to the corresponding node, and the public key is known to any or all other nodes in the blockchain network. A node can use another node's public key to encrypt data, and can use another node's private key to decrypt the encrypted data. For example, refer to Figure 2 again. Participant A can use the public key of participant B 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 (plain text). Messages encrypted with the public key of the node can only be decrypted with the private key of the node.
非对称加密用于提供数字签名,这使得交易中的参与方能够确认交易中的其他参与方以及交易的有效性。例如,节点可以对消息进行数字签名,而另一个节点可以根据参与方A的数字签名确认消息是由该节点发送的。数字签名还可以用于确保消息在传输过程中不被篡改。例如,再次参考图2。参与方A将向参与方B发送消息。参与方A 生成消息的哈希值,然后使用其私钥对哈希值进行加密来生成数字签名。参与方A将该数字签名附加到消息,并将具有数字签名的消息发送给参与方B。参与方B使用参与方A的公钥解密数字签名,从而解密出对应的哈希值。参与方B对所接收的消息进行哈希处理以得到另一哈希值,然后比较两个哈希值。如果哈希值相同,则参与方B可以确认该消息确实来自参与方A,并且未被篡改。Asymmetric encryption is used to provide digital signatures, which enables participants in a transaction to confirm 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 messages are not tampered with during transmission. For example, refer to Figure 2 again. Participant A will send a message to participant B. Participant A generates a hash value of the message, and then uses its private key to encrypt the hash value to generate a digital signature. Participant A attaches the digital signature to the message, and sends the message with the digital signature to participant B. Participant B uses the public key of participant A to decrypt the digital signature, thereby decrypting the corresponding hash value. Participant B hashes the received message to obtain another hash value, and then compares the two hash values. If the hash value is the same, participant B can confirm that the message is indeed from participant A and has not been tampered with.
虽然以上对可以适用本公开的区块链场景进行了说明,但是本公开还可以适用于其它块链式场景。例如,本公开还可以适用于类区块链系统。在类区块链系统中,数据可以同样地采用块链式结构来存储,与区块链系统不同的是,在类区块链系统中,存储于块链式结构中的块链数据不需要经过共识处理。Although the block chain scenarios to which the present disclosure can be applied are described above, the present disclosure can also be applied to other block chain scenarios. For example, the present disclosure can also be applied to blockchain-like systems. In the quasi-blockchain system, data can be stored in the same block-chain structure. Unlike the blockchain system, in the quasi-blockchain system, the block-chain data stored in the block-chain structure does not need After consensus processing.
图3是用于说明本公开中的去中心化集群的一个示例的示意图。如图3所示,去中心化集群(DAPP集群)可以包括3个DAPP(DAPP1至DAPP3),各个去中心化应用分别负责相应流程的交易处理。图3仅仅是去中心化集群的一种示例,在去中心化集群中可以存在任意数量的多个去中心化应用。交易发起方将交易的交易数据发送给DAPP1,DAPP1完成相应的处理之后将经过DAPP1处理的交易数据发送给DAPP2,在DAPP3完成最一个流程的交易处理后,将交易处理结果发送到区块链系统中以实现区块链记账处理。在一个示例中,DAPP3可以将交易处理结果发送给区块链网络中的全量节点,以执行记账处理。在本说明书中,去中心化应用可以是运行在去中心化应用可以包括去中心化应用服务器(或运行在去中心化应用服务器侧的应用程序),还可以包括运行在用户终端设备上的去中心化应用客户端。作为一种应用场景的示例,DAPP1可以是购物平台的购物服务器,DAPP2可以是第三方结算平台的结算服务器,DAPP3可以是银行服务器。FIG. 3 is a schematic diagram for explaining an example of the decentralized cluster in the present disclosure. As shown in Figure 3, the decentralized cluster (DAPP cluster) may include three DAPPs (DAPP1 to DAPP3), and each decentralized application is responsible for the transaction processing of the corresponding process. Figure 3 is just an example of a decentralized cluster. Any number of multiple decentralized applications can exist in a decentralized cluster. The transaction initiator sends the transaction data of the transaction to DAPP1. After DAPP1 completes the corresponding processing, it sends the transaction data processed by DAPP1 to DAPP2. After DAPP3 completes the transaction processing of the last process, the transaction processing result is sent to the blockchain system. China-Israel realizes blockchain accounting processing. In one example, DAPP3 may send the transaction processing result to all nodes in the blockchain network to perform accounting processing. In this specification, a decentralized application can be a decentralized application running on a decentralized application server (or an application running on a decentralized application server side), or a decentralized application running on a user terminal device. Centralized application client. As an example of an application scenario, DAPP1 may be a shopping server of a shopping platform, DAPP2 may be a settlement server of a third-party settlement platform, and DAPP3 may be a bank server.
图4是根据本说明书的一个实施例的用于获取去中心化应用集群中的交易处理状态的方法和用于处理交易处理状态获取请求的方法的流程图。在图4中,用于获取去中心化应用集群中的交易处理状态的方法由交易处理状态获取方执行,用于处理交易处理状态获取请求的方法由去中心化应用执行。Fig. 4 is a flowchart of a method for obtaining transaction processing status in a decentralized application cluster and a method for processing transaction processing status acquisition requests according to an embodiment of the present specification. In FIG. 4, the method for acquiring the transaction processing status in the decentralized application cluster is executed by the transaction processing status acquirer, and the method for processing the transaction processing status acquiring request is executed by the decentralized application.
如图4所示,在块402,交易处理状态获取方基于交易在去中心化应用集群中的交易跟踪标识,生成交易处理状态获取请求。As shown in FIG. 4, in block 402, the transaction processing status acquisition party generates a transaction processing status acquisition request based on the transaction tracking identifier of the transaction in the decentralized application cluster.
交易处理状态获取方例如可以是交易发起方。当交易发起方想要关注交易的处理进程或交易处理结果等信息时,可以作为交易处理状态获取方向去中心化应用请求获取交易处理状态。交易处理状态获取方还可以是交易发起方的关联方,关联方可以从交易 发起方获取交易的交易跟踪标识,以用于获取交易处理状态。此外,去中心化应用集群中的各个去中心化应用也可以作为交易处理状态获取方来获取其它去中心化应用中的交易处理状态。例如,去中心化应用可以从其它去中心化应用获取交易处理状态以用于交易失败原因分析或用于其它业务分析。交易处理状态可以是正在处理中的交易处理状态,还可以是在交易经过各个去中心化应用的处理之后的交易处理结果。The acquirer of the transaction processing status may be, for example, the transaction initiator. When the transaction initiator wants to pay attention to the transaction processing process or transaction processing results and other information, it can be used as the transaction processing status acquisition direction to request the decentralized application to obtain the transaction processing status. The acquirer of the transaction processing status may also be an affiliate of the transaction initiator, and the affiliate may acquire the transaction tracking identifier of the transaction from the transaction initiator to obtain the transaction processing status. In addition, each decentralized application in the decentralized application cluster can also be used as a transaction processing status acquirer to obtain transaction processing status in other decentralized applications. For example, a decentralized application can obtain transaction processing status from other decentralized applications for analysis of the cause of transaction failure or for other business analysis. The transaction processing status can be the transaction processing status being processed, or the transaction processing result after the transaction has been processed by various decentralized applications.
交易跟踪标识用于在去中心化应用集群中唯一地标识交易。交易跟踪标识可以由交易发起方来生成。当交易发起方发起交易时,可以使交易数据包括交易跟踪标识字段,并写入为该交易生成的交易跟踪标识。各个交易发起方可以按照其业务处理规则来为其发起的交易生成交易跟踪标识,以用于在去中心应用集群中标识其发起的交易。各个去中心化应用在接收到交易数据之后,对交易数据进行相应处理流程的交易处理之后,将包括交易跟踪标识的经过该去中心化应用处理的交易数据发送给下一流程的去中心化应用。由此,在交易处理的整个过程中交易数据始终携带交易跟踪标识,从而能够根据交易跟踪标识来定位交易所经过的去中心化应用,并且能够定位在各个去心化应用中的交易状态。The transaction tracking identifier is used to uniquely identify the transaction in the decentralized application cluster. The transaction tracking identifier can be generated by the transaction initiator. When the transaction initiator initiates a transaction, the transaction data can include a transaction tracking identifier field, and write the transaction tracking identifier generated for the transaction. Each transaction initiator can generate a transaction tracking identifier for its initiated transaction in accordance with its business processing rules, so as to identify the transaction initiated by it in the decentralized application cluster. After each decentralized application receives the transaction data, it performs the transaction processing of the corresponding processing flow on the transaction data, and then sends the transaction data processed by the decentralized application including the transaction tracking identifier to the decentralized application in the next process . As a result, the transaction data always carries the transaction tracking identifier during the entire process of transaction processing, so that the decentralized applications that the transaction passes through can be located according to the transaction tracking identifier, and the transaction status in each decentralized application can be located.
为了避免不同交易发起方所生成的交易跟踪标识出现重叠,可以由去中心化应用集群中的各个去中心化应用来约定标识生成规则,各个交易发起方可以基于该标识生成规则来生成交易跟踪标识,以确保所生成的交易跟踪标识能够唯一地标识各个交易。In order to avoid overlap of transaction tracking identifiers generated by different transaction initiators, each decentralized application in the decentralized application cluster can agree on identifier generation rules, and each transaction initiator can generate transaction tracking identifiers based on the identifier generation rules. , To ensure that the generated transaction tracking identifier can uniquely identify each transaction.
同一笔交易可以具有多个交易跟踪标识。例如,在由交易发起方生成交易跟踪标识的示例中,如果交易发起方将交易数据发送给去中心化应用集群之后发生交易处理失败的情况(交易处理失败的去中心化应用可以向交易发起方发送交易处理失败的通知消息),交易发起方可以针对该交易再次向去中心化应用集群发送交易数据,以再次发起交易。在再次发送交易数据时,可以重新生成新的交易跟踪标识并将其包括在本次发送的交易数据中,并且可以将前一次发送的交易数据中的前一交易跟踪标识包括在本次所发送的交易数据中。前一交易跟踪标识可以写入历史交易跟踪标识字段中。将前一交易跟踪标识包括在本次交易数据中有助于各个去中心化应用对处理失败的历史交易处理进行分析,以分析处理失败原因,并采取优化措施。The same transaction can have multiple transaction tracking identifiers. For example, in the example of the transaction tracking identifier generated by the transaction initiator, if the transaction initiator sends the transaction data to the decentralized application cluster, the transaction processing failure occurs (the decentralized application that fails the transaction processing can report to the transaction initiator Sending a notification message of transaction processing failure), the transaction initiator can send transaction data to the decentralized application cluster again for the transaction to initiate the transaction again. When sending transaction data again, a new transaction tracking identifier can be regenerated and included in the transaction data sent this time, and the previous transaction tracking identifier in the transaction data sent last time can be included in the transaction data sent this time In the transaction data. The previous transaction tracking identifier can be written into the historical transaction tracking identifier field. Including the previous transaction tracking identifier in the transaction data helps each decentralized application analyze the historical transaction processing that failed to process, analyze the cause of the processing failure, and take optimization measures.
交易处理状态获取方可以将交易跟踪标识组装入交易处理状态获取请求的交易跟踪标识字段,以生成交易处理状态获取请求。在另一示例中,还可以对交易跟踪标识进行加密后,基于加密处理结果来生成交易处理状态获取请求。The transaction processing status acquisition party may assemble the transaction tracking identifier into the transaction tracking identifier field of the transaction processing status acquisition request to generate the transaction processing status acquisition request. In another example, after the transaction tracking identifier is encrypted, the transaction processing status acquisition request may be generated based on the encryption processing result.
在生成交易处理状态获取请求之后,在404,交易处理状态获取方将交易处理状态 获取请求发送给去中心化应用集群中的去中心化应用。交易处理状态获取请求可以发送给去中心化应用集群中的一个或多个去中心化应用。以图3所示为例,当交易处理失败时,交易发起方可以逐次向DAPP1至DAPP3发送交易处理状态获取请求,以确定在哪个处理流程处理失败,并分析失败原因。在分析出失败原因后可以采取修正措施并再次发起交易。在另一示例中,在交易处理完成并成功上链之后,去中心化应用集群中的任意去中心化应用可以向其它去中心化应用发送交易处理状态获取请求,从而获取交易在各个去中心化应用中的交易处理结果,以用于业务分析。After the transaction processing status acquisition request is generated, at 404, the transaction processing status acquisition party sends the transaction processing status acquisition request to the decentralized application in the decentralized application cluster. The transaction processing status acquisition request can be sent to one or more decentralized applications in the decentralized application cluster. Taking Figure 3 as an example, when the transaction processing fails, the transaction initiator can send transaction processing status acquisition requests to DAPP1 to DAPP3 one by one to determine the processing flow in which the processing failed, and analyze the reason for the failure. After analyzing the reason for the failure, corrective measures can be taken and the transaction can be initiated again. In another example, after the transaction processing is completed and successfully connected to the chain, any decentralized application in the decentralized application cluster can send transaction processing status acquisition requests to other decentralized applications to obtain transactions in each decentralized application. The transaction processing results in the application for business analysis.
去中心化应用在接收到交易状态获取请求之后,在406,基于交易状态获取请求中的交易跟踪标识,从本地的交易处理数据中获取相应交易的交易处理状态。当交易状态获取请求或交易跟踪标识被经过加密处理时,去中心化应用还可以采用相应的解密算法进行解密后获取交易跟踪标识。After the decentralized application receives the transaction status acquisition request, in 406, based on the transaction tracking identifier in the transaction status acquisition request, acquire the transaction processing status of the corresponding transaction from the local transaction processing data. When the transaction status acquisition request or the transaction tracking identifier is encrypted, the decentralized application can also use the corresponding decryption algorithm to decrypt the transaction tracking identifier.
去中心化应用在本地获取到交易处理状态之后,在408,将所获取的交易跟踪标识发送给交易处理状态获取方。由此,交易处理状态获取方能够从去中心化应用处获取交易的交易处理状态。After the decentralized application obtains the transaction processing status locally, in 408, the acquired transaction tracking identifier is sent to the transaction processing status acquirer. As a result, the transaction processing status acquirer can acquire the transaction processing status of the transaction from the decentralized application.
通过该实施例,可以利用交易的交易跟踪标识来获取去中心化应用集群的各个去中心化应用处的交易处理状态。并且在交易处理状态的获取过程中,不需要基于各个去中心应用的业务逻辑来进行额外的运算,从而能够提高获取交易处理状态的效率。在不包括交易跟踪标识的一种场景中,各个去中心化应用在进行相应交易流程的处理时,可以为该交易生成交易处理标识(例如各个去中心化应用中的交易流水号),以在该去中心化应中标识相应交易。当前一去中心化应用完成处理后,将其交易处理标识包括在交易处理结果数据中发送给后一去中心化应用。后一去中心化应用接收到前一去中心化应用的交易处理标识之后,将该交易处理标识存储为该交易的父标识。在该场景中,各个去中心化应用的交易处理标识相互关联,当需要获取交易在去中心化应用中的处理状态时,需要首先分析在各个去中心化应用之间的交易数据处理链路,因而增加了获取过程的复杂性。而利用本实施例,能够避免这种复杂性产生。Through this embodiment, the transaction tracking identifier of the transaction can be used to obtain the transaction processing status of each decentralized application in the decentralized application cluster. And in the process of obtaining the transaction processing status, there is no need to perform additional calculations based on the business logic of each decentralized application, so that the efficiency of obtaining the transaction processing status can be improved. In a scenario that does not include the transaction tracking identifier, each decentralized application can generate a transaction processing identifier for the transaction (for example, the transaction serial number in each decentralized application) when processing the corresponding transaction process, so as to The decentralization should identify the corresponding transaction. After the current decentralized application completes processing, its transaction processing identifier is included in the transaction processing result data and sent to the subsequent decentralized application. After the latter decentralized application receives the transaction processing identifier of the previous decentralized application, the transaction processing identifier is stored as the parent identifier of the transaction. In this scenario, the transaction processing identifiers of each decentralized application are related to each other. When it is necessary to obtain the processing status of the transaction in the decentralized application, it is necessary to first analyze the transaction data processing link between each decentralized application. This increases the complexity of the acquisition process. With this embodiment, this complexity can be avoided.
交易跟踪标识还可以是去中心化应用集群中的去中心化应用生成的。以下将参考图5对该示例进行说明。图5是本公开中的去中心化应用的交易处理过程的一个示例的流程图。The transaction tracking identifier may also be generated by a decentralized application in a decentralized application cluster. This example will be described below with reference to FIG. 5. FIG. 5 is a flowchart of an example of the transaction processing process of the decentralized application in the present disclosure.
如图5所示,在块502,去中心化应用接收交易的交易数据。以图3为例,当去中心化应用是DAPP1时,交易数据可以从交易发起方接收,当去中心化应用是DAPP2或 DAPP3时,交易数据可以从前一去中心化应用接收。As shown in Figure 5, at block 502, the decentralized application receives transaction data for the transaction. Taking Figure 3 as an example, when the decentralized application is DAPP1, the transaction data can be received from the transaction initiator, and when the decentralized application is DAPP2 or DAPP3, the transaction data can be received from the previous decentralized application.
在接收到交易数据之后,在块504,确定交易数据中是否包括交易跟踪标识。当交易数据中不包括交易跟踪标识字段或交易跟踪标识字段为空时,可以确定所接收到的交易数据不包括交易跟踪标识。After the transaction data is received, at block 504, it is determined whether the transaction tracking identifier is included in the transaction data. When the transaction data does not include the transaction tracking identifier field or the transaction tracking identifier field is empty, it can be determined that the received transaction data does not include the transaction tracking identifier.
在确定所接收到的交易数据不包括交易跟踪标识时,在块506,为相应交易生成交易跟踪标识。所生成的交易跟踪标识可以写入交易数据的交易跟踪标识字段,或者在创建交易跟踪标识字段后写入交易跟踪标识。在一个示例中,交易跟踪标识可以由交易在去中心化应用集群中所经过的第一个去中心化应用来生成,从而能够避免各个交易跟踪标识出现重叠,以使得各个交易的交易跟踪标识能够唯一地标识该交易。When it is determined that the received transaction data does not include a transaction tracking identifier, in block 506, a transaction tracking identifier is generated for the corresponding transaction. The generated transaction tracking identifier can be written into the transaction tracking identifier field of the transaction data, or the transaction tracking identifier can be written after the transaction tracking identifier field is created. In one example, the transaction tracking identifier can be generated by the first decentralized application that the transaction passes through in the decentralized application cluster, so as to avoid overlapping of each transaction tracking identifier, so that the transaction tracking identifier of each transaction can be Uniquely identify the transaction.
在一个示例中,交易发起方可能不关注交易的处理状态,因而在发起交易时可以不生成交易跟踪标识。然而,即使交易发起方不关注交易处理状态,去中心化应用也可能会因为业务分析等原因需要在其它去中心化应用中的交易处理状态。因此,接收到交易数据的去中心化应用可以为该交易生成交易跟踪标识,从而在存在获取交易处理状态的需要时,能够基于交易跟踪标识来获取后续交易处理流程的交易处理状态。除交易处理流程中的第一个去中心化应用之外,交易处理流程中的其它去中心化应用也可以在交易数据中没有交易跟踪标识时生成交易跟踪标识。In one example, the transaction initiator may not pay attention to the processing status of the transaction, and thus may not generate the transaction tracking identifier when initiating the transaction. However, even if the transaction initiator does not pay attention to the transaction processing status, decentralized applications may require transaction processing status in other decentralized applications due to business analysis and other reasons. Therefore, the decentralized application that receives the transaction data can generate a transaction tracking identifier for the transaction, so that when there is a need to obtain the transaction processing status, the transaction processing status of the subsequent transaction processing flow can be obtained based on the transaction tracking identifier. In addition to the first decentralized application in the transaction processing flow, other decentralized applications in the transaction processing flow can also generate a transaction tracking identifier when there is no transaction tracking identifier in the transaction data.
在一个示例中,对应于各个去中心化应用的交易跟踪标识可以是相同的。例如,在由交易发起方或由第一个去中心化应用生成交易跟踪标识的示例中,该交易跟踪标识跟随该交易的交易数据直至完成最终处理。在这种情形下,交易处理状态获取方可以基于相同的交易跟踪标识从各个去中心化应用获取交易处理状态。在另一示例中,对应于各个去中心化应用的交易跟踪标识也可以不相同。例如,交易可以包括对应于各个去中心化应用的交易跟踪标识字段。各个去中心化应用在接收到交易数据之后,如果对应于该去中心化应用的交易跟踪标识字段为空,可以生成自己交易跟踪标识并写入相应交易跟踪标识字段。不关注交易处理状态的去中心化应用也可以不生成对应于该去中心化应用的交易跟踪标识。由此,能够根据对应于各个去中心应用的交易跟踪标识是否为空来分析各个去中心化应用所关注的交易处理问题。In an example, the transaction tracking identifiers corresponding to each decentralized application may be the same. For example, in an example where the transaction tracking identifier is generated by the transaction initiator or the first decentralized application, the transaction tracking identifier follows the transaction data of the transaction until the final processing is completed. In this case, the transaction processing status acquirer can acquire the transaction processing status from each decentralized application based on the same transaction tracking identifier. In another example, the transaction tracking identifiers corresponding to various decentralized applications may also be different. For example, the transaction may include a transaction tracking identification field corresponding to each decentralized application. After each decentralized application receives the transaction data, if the transaction tracking identifier field corresponding to the decentralized application is empty, it can generate its own transaction tracking identifier and write it into the corresponding transaction tracking identifier field. A decentralized application that does not pay attention to the transaction processing status may not generate a transaction tracking identifier corresponding to the decentralized application. In this way, it is possible to analyze the transaction processing issues concerned by each decentralized application according to whether the transaction tracking identifier corresponding to each decentralized application is empty.
去中心化应用所生成的交易跟踪标识可以发送给交易发起方。当生成交易跟踪标识的去中心化应用不是交易处理流程中的第一个去中心化应用时,还可以将所生成的交易跟踪标识发送给在前去中心化应用。The transaction tracking identifier generated by the decentralized application can be sent to the transaction initiator. When the decentralized application that generates the transaction tracking identifier is not the first decentralized application in the transaction processing flow, the generated transaction tracking identifier can also be sent to the previous decentralized application.
在生成交易跟踪标识之后或在所接收到的交易数据包括交易跟踪标识时,在块508,基于交易数据进行交易处理,并在完成交易处理之后,将包括交易跟踪标识的交易数据发送给下一去中心化应用。去中心化应用是交易处理路径中的最后一个去中心化应用时,可以将交易处理数据发送给执行记账处理的区块链节点。After the transaction tracking identifier is generated or when the received transaction data includes the transaction tracking identifier, at block 508, transaction processing is performed based on the transaction data, and after the transaction processing is completed, the transaction data including the transaction tracking identifier is sent to the next Decentralized application. When the decentralized application is the last decentralized application in the transaction processing path, the transaction processing data can be sent to the blockchain node that performs accounting processing.
在一个示例中,在去中心化应用基于交易数据来执行相应交易处理的过程中,如果交易处理失败,可以重新基于所接收到的交易数据来再次执行相应交易处理。在该示例中,如果出现交易处理失败的情形,去中心化应用可以将原有的交易跟踪标识包括在前一次处理时的交易处理数据中存入交易处理记录,并重新为该交易生成交易跟踪标识,然后将重新生成的交易跟踪标识包括在再次执行的交易处理的交易处理数据中。由此,该去中心化应用或其它去中心化应用能够基于交易跟踪标识获取到各次交易处理的交易处理数据,以进行业务分析,例如可以分析交易失败原因等。重新生成的交易跟踪标识还可以基于原有交易跟踪标识来生成,从而建立二者之间的联系,以由其中一者来获取另一者。例如,可以基于重新生成的交易跟踪标识来获取原有交易跟踪标识。在另一示例中,在再次执行交易处理时,可以将原有交易跟踪标识包括在再次执行交易处理时的交易处理数据中。In one example, in a process in which a decentralized application executes corresponding transaction processing based on transaction data, if the transaction processing fails, the corresponding transaction processing can be executed again based on the received transaction data. In this example, if the transaction processing fails, the decentralized application can include the original transaction tracking identifier in the transaction processing data of the previous processing and store it in the transaction processing record, and regenerate transaction tracking for the transaction And then include the regenerated transaction tracking identifier in the transaction processing data of the transaction processing to be executed again. As a result, the decentralized application or other decentralized applications can obtain transaction processing data of each transaction processing based on the transaction tracking identifier to perform business analysis, for example, the reason for transaction failure can be analyzed. The regenerated transaction tracking identifier can also be generated based on the original transaction tracking identifier, so as to establish a connection between the two, so that one can obtain the other. For example, the original transaction tracking identifier can be obtained based on the regenerated transaction tracking identifier. In another example, when the transaction processing is executed again, the original transaction tracking identifier may be included in the transaction processing data when the transaction processing is executed again.
图6是根据本说明书的一个实施例的用于获取去中心化应用集群中的交易处理状态的装置的结构框图。如图6所示,交易处理状态获取装置600包括处理状态获取请求生成单元610、处理状态获取请求发送单元620和交易处理状态获取单元630。Fig. 6 is a structural block diagram of an apparatus for obtaining transaction processing status in a decentralized application cluster according to an embodiment of the present specification. As shown in FIG. 6, the transaction processing state obtaining device 600 includes a processing state obtaining request generating unit 610, a processing state obtaining request sending unit 620 and a transaction processing state obtaining unit 630.
处理状态获取请求生成单元610基于交易在去中心化应用集群中的交易跟踪标识,生成交易处理状态获取请求,交易跟踪标识用于在去中心化应用集群中唯一地标识交易。在生成处理状态获取请求之后,处理状态获取请求发送单元620将交易处理状态获取请求发送给去中心化应用集群中的去中心化应用。交易处理状态获取单元630从去中心化应用处获取交易的交易处理状态。The processing state acquisition request generating unit 610 generates a transaction processing state acquisition request based on the transaction tracking identifier of the transaction in the decentralized application cluster. The transaction tracking identifier is used to uniquely identify the transaction in the decentralized application cluster. After the processing state acquisition request is generated, the processing state acquisition request sending unit 620 sends the transaction processing state acquisition request to the decentralized application in the decentralized application cluster. The transaction processing status acquiring unit 630 acquires the transaction processing status of the transaction from the decentralized application.
交易跟踪标识可以是由交易的交易发起方生成的,还可以是由去中心化应用在交易的交易跟踪标识字段为空时生成的。在一个示例中,交易跟踪标识可以是基于去中心化应用集群中的各个去中心化应用所约定的标识生成规则生成的。交易跟踪标识还可以是由去中心化应用在针对交易的交易处理失败时重新生成的。此外,对应于去中心化应用集群中的各个去中心化应用的交易跟踪标识可以是相同的。The transaction tracking identifier may be generated by the transaction initiator of the transaction, or it may be generated by the decentralized application when the transaction tracking identifier field of the transaction is empty. In an example, the transaction tracking identification may be generated based on identification generation rules agreed by each decentralized application in the decentralized application cluster. The transaction tracking identifier may also be regenerated by the decentralized application when the transaction processing for the transaction fails. In addition, the transaction tracking identifier corresponding to each decentralized application in the decentralized application cluster may be the same.
图7是根据本说明书的一个实施例的用于处理交易处理状态获取请求的装置的结构框图。如图7所示,交易处理状态获取请求处理装置700包括处理状态获取请求接收 单元710、交易处理状态获取单元720和交易处理状态发送单元730。Fig. 7 is a structural block diagram of an apparatus for processing a transaction processing status acquisition request according to an embodiment of the present specification. As shown in FIG. 7, the transaction processing status acquisition request processing device 700 includes a processing status acquisition request receiving unit 710, a transaction processing status acquisition unit 720, and a transaction processing status sending unit 730.
处理状态获取请求接收单元710接收交易处理状态获取请求,交易处理状态获取请求是基于交易在去中心化应用集群中的交易跟踪标识生成的,交易跟踪标识用于在所述去中心化应用集群中唯一地标识所述交易。交易处理状态获取单元720基于交易处理状态获取请求中的交易跟踪标识,从本地交易处理数据中获取交易的交易处理状态。在本地获取到交易处理状态之后,交易处理状态发送单元730将交易处理状态发送给交易处理状态获取请求的发送方。The processing status acquisition request receiving unit 710 receives the transaction processing status acquisition request. The transaction processing status acquisition request is generated based on the transaction tracking identifier of the transaction in the decentralized application cluster, and the transaction tracking identifier is used in the decentralized application cluster. Uniquely identify the transaction. The transaction processing status acquisition unit 720 acquires the transaction processing status of the transaction from the local transaction processing data based on the transaction tracking identifier in the transaction processing status acquisition request. After the transaction processing status is acquired locally, the transaction processing status sending unit 730 sends the transaction processing status to the sender of the transaction processing status acquisition request.
以上参照图1到7,对根据本公开的用于获取去中心化应用集群中的交易处理状态的方法及装置和用于处理交易处理状态获取请求的方法及装置的实施例进行了描述。在以上对方法实施例的描述中所提及的细节,同样适用于本公开的装置的实施例。1 to 7, the embodiments of the method and device for obtaining transaction processing status in a decentralized application cluster and the method and device for processing transaction processing status acquisition requests according to the present disclosure have been described above. The details mentioned in the above description of the method embodiment are also applicable to the embodiment of the device of the present disclosure.
本公开的用于获取去中心化应用集群中的交易处理状态的装置和用于处理交易处理状态获取请求的装置可以采用硬件实现,也可以采用软件或者硬件和软件的组合来实现。本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见。The device for acquiring transaction processing status in a decentralized application cluster and the device for processing transaction processing status acquisition requests of the present disclosure can be implemented by hardware, or can be implemented by software or a combination of hardware and software. The various embodiments in this specification are described in a progressive manner, and the same or similar parts among the various embodiments are referred to each other.
本公开的用于获取去中心化应用集群中的交易处理状态的装置和用于处理交易处理状态获取请求的装置可以采用硬件实现,也可以采用软件或者硬件和软件的组合来实现。以软件实现为例,作为逻辑意义上的装置,是通过其所在设备的处理器将存储器中对应的计算机程序指令读取到内存中运行形成的。在本公开中,多层块链式结构生成装置和信任点更新装置例如可以利用计算设备实现。The device for acquiring transaction processing status in a decentralized application cluster and the device for processing transaction processing status acquisition requests of the present disclosure can be implemented by hardware, or can be implemented by software or a combination of hardware and software. Taking software implementation as an example, as a logical device, it is formed by reading the corresponding computer program instructions in the memory into the memory by the processor of the device where it is located. In the present disclosure, the device for generating a multi-layer block chain structure and the device for updating the trust point can be implemented using a computing device, for example.
图8是根据本说明书的一个实施例的用于执行用于获取去中心化应用集群中的交易处理状态的方法或用于处理交易处理状态获取请求的方法的计算设备的结构框图。如图8所示,计算设备800包括处理器810、存储器820、内存830、通信接口840和内部总线850,并且处理器810、存储器(例如,非易失性存储器)820、内存830、通信接口840经由总线850连接在一起。根据一个实施例,计算设备800可以包括至少一个处理器810,该至少一个处理器810执行在计算机可读存储介质(即,存储器820)中存储或编码的至少一个计算机可读指令(即,上述以软件形式实现的元素)。Fig. 8 is a structural block diagram of a computing device for executing a method for acquiring a transaction processing status in a decentralized application cluster or a method for processing a transaction processing status acquisition request according to an embodiment of the present specification. As shown in FIG. 8, the computing device 800 includes a processor 810, a memory 820, a memory 830, a communication interface 840, and an internal bus 850, and the processor 810, a memory (for example, a non-volatile memory) 820, a memory 830, and a communication interface 840 are connected together via a bus 850. According to an embodiment, the computing device 800 may include at least one processor 810 that executes at least one computer-readable instruction (ie, the aforementioned Elements implemented in software).
在一个实施例中,在存储器820中存储计算机可执行指令,其当执行时使得至少一个处理器810:基于交易在所述去中心化应用集群中的交易跟踪标识,生成交易处理状态获取请求,所述交易跟踪标识用于在所述去中心化应用集群中唯一地标识所述交易; 将所述交易处理状态获取请求发送给所述去中心化应用集群中的去中心化应用;以及从所述去中心化应用处获取所述交易的交易处理状态。In one embodiment, computer-executable instructions are stored in the memory 820, which when executed, cause at least one processor 810 to: generate a transaction processing status acquisition request based on the transaction tracking identifier of the transaction in the decentralized application cluster, The transaction tracking identifier is used to uniquely identify the transaction in the decentralized application cluster; send the transaction processing status acquisition request to the decentralized application in the decentralized application cluster; The decentralized application office obtains the transaction processing status of the transaction.
在另一实施例中,在存储器820中存储计算机可执行指令,其当执行时使得至少一个处理器810:接收交易处理状态获取请求,所述交易处理状态获取请求是基于交易在所述去中心化应用集群中的交易跟踪标识生成的,所述交易跟踪标识用于在所述去中心化应用集群中唯一地标识所述交易;基于所述交易处理状态获取请求中的交易跟踪标识,从本地交易处理数据中获取所述交易的交易处理状态;以及将所述交易处理状态发送给所述交易处理状态获取请求的发送方。In another embodiment, computer-executable instructions are stored in the memory 820, which, when executed, cause at least one processor 810 to: receive a transaction processing status acquisition request, the transaction processing status acquisition request being based on the transaction in the decentralized The transaction tracking identifier in the application cluster is generated, and the transaction tracking identifier is used to uniquely identify the transaction in the decentralized application cluster; the transaction tracking identifier in the request is acquired based on the transaction processing status, and the transaction tracking identifier is obtained locally Acquiring the transaction processing status of the transaction from the transaction processing data; and sending the transaction processing status to the sender of the transaction processing status acquisition request.
应该理解,在存储器820中存储的计算机可执行指令当执行时使得至少一个处理器810进行本公开的各个实施例中以上结合图1到7描述的各种操作和功能。It should be understood that the computer-executable instructions stored in the memory 820, when executed, cause at least one processor 810 to perform various operations and functions described above in conjunction with FIGS. 1 to 7 in the various embodiments of the present disclosure.
根据一个实施例,提供了一种例如非暂时性机器可读介质的程序产品。非暂时性机器可读介质可以具有指令(即,上述以软件形式实现的元素),该指令当被机器执行时,使得机器执行本公开的各个实施例中以上结合图1到7描述的各种操作和功能。According to one embodiment, a program product such as a non-transitory machine-readable medium is provided. The non-transitory machine-readable medium may have instructions (ie, the above-mentioned elements implemented in the form of software), which when executed by a machine, cause the machine to execute the various embodiments described above in conjunction with FIGS. 1 to 7 in the various embodiments of the present disclosure. Operation and function.
具体地,可以提供配有可读存储介质的系统或者装置,在该可读存储介质上存储着实现上述实施例中任一实施例的功能的软件程序代码,且使该系统或者装置的计算机或处理器读出并执行存储在该可读存储介质中的指令。Specifically, a system or device equipped with a readable storage medium may be provided, and the software program code for realizing the function of any one of the above-mentioned embodiments is stored on the readable storage medium, and the computer or device of the system or device The processor reads and executes the instructions stored in the readable storage medium.
在这种情况下,从可读介质读取的程序代码本身可实现上述实施例中任何一项实施例的功能,因此机器可读代码和存储机器可读代码的可读存储介质构成了本公开的一部分。In this case, the program code itself read from the readable medium can implement the function of any one of the above embodiments, so the machine readable code and the readable storage medium storing the machine readable code constitute the present disclosure a part of.
可读存储介质的实施例包括软盘、硬盘、磁光盘、光盘(如CD-ROM、CD-R、CD-RW、DVD-ROM、DVD-RAM、DVD-RW、DVD-RW)、磁带、非易失性存储卡和ROM。可选择地,可以由通信网络从服务器计算机上或云上下载程序代码。Examples of readable storage media include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD-RW), magnetic tape, Volatile memory card and ROM. Alternatively, the program code can be downloaded from the server computer or the cloud via the communication network.
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。The foregoing describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than in the embodiments and still achieve desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or sequential order shown in order to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
上述各流程和各系统结构图中不是所有的步骤和单元都是必须的,可以根据实际的需要忽略某些步骤或单元。各步骤的执行顺序不是固定的,可以根据需要进行确定。 上述各实施例中描述的装置结构可以是物理结构,也可以是逻辑结构,即,有些单元可能由同一物理实体实现,或者,有些单元可能分由多个物理实体实现,或者,可以由多个独立设备中的某些部件共同实现。Not all steps and units in the above processes and system structure diagrams are necessary, and some steps or units can be omitted according to actual needs. The order of execution of each step is not fixed and can be determined as needed. The device structure described in the foregoing embodiments may be a physical structure or a logical structure, that is, some units may be implemented by the same physical entity, or some units may be implemented by multiple physical entities, or may be implemented by multiple physical entities. Some components in independent devices are implemented together.
在整个本说明书中使用的术语“示例性”意味着“用作示例、实例或例示”,并不意味着比其它实施例“优选”或“具有优势”。出于提供对所描述技术的理解的目的,具体实施方式包括具体细节。然而,可以在没有这些具体细节的情况下实施这些技术。在一些实例中,为了避免对所描述的实施例的概念造成难以理解,公知的结构和装置以框图形式示出。The term "exemplary" used throughout this specification means "serving as an example, instance, or illustration", and does not mean "preferred" or "advantageous" over other embodiments. The detailed description includes specific details for the purpose of providing an understanding of the described technology. However, these techniques can be implemented without these specific details. In some instances, in order to avoid incomprehensibility to the concepts of the described embodiments, well-known structures and devices are shown in the form of block diagrams.
以上结合附图详细描述了本公开的实施例的可选实施方式,但是,本公开的实施例并不限于上述实施方式中的具体细节,在本公开的实施例的技术构思范围内,可以对本公开的实施例的技术方案进行多种简单变型,这些简单变型均属于本公开的实施例的保护范围。The above describes the optional implementation manners of the embodiments of the present disclosure in detail with reference to the accompanying drawings. However, the embodiments of the present disclosure are not limited to the specific details in the above-mentioned implementation manners. Within the scope of the technical concept of the embodiments of the present disclosure, the present disclosure can be modified. The technical solutions of the disclosed embodiments are subjected to a variety of simple modifications, and these simple modifications all fall within the protection scope of the embodiments of the present disclosure.
本公开内容的上述描述被提供来使得本领域任何普通技术人员能够实现或者使用本公开内容。对于本领域普通技术人员来说,对本公开内容进行的各种修改是显而易见的,并且,也可以在不脱离本公开内容的保护范围的情况下,将本文所定义的一般性原理应用于其它变型。因此,本公开内容并不限于本文所描述的示例和设计,而是与符合本文公开的原理和新颖性特征的最广范围相一致。The foregoing description of the present disclosure is provided to enable any person of ordinary skill in the art to implement or use the present disclosure. For those of ordinary skill in the art, various modifications to the present disclosure are obvious, and the general principles defined herein can also be applied to other modifications without departing from the scope of protection of the present disclosure. . Therefore, the present disclosure is not limited to the examples and designs described herein, but is consistent with the widest scope that conforms to the principles and novel features disclosed herein.

Claims (18)

  1. 一种用于获取去中心化应用集群中的交易处理状态的方法,包括:A method for obtaining transaction processing status in a decentralized application cluster, including:
    基于交易在所述去中心化应用集群中的交易跟踪标识,生成交易处理状态获取请求,所述交易跟踪标识用于在所述去中心化应用集群中唯一地标识所述交易;Generating a transaction processing status acquisition request based on the transaction tracking identifier of the transaction in the decentralized application cluster, where the transaction tracking identifier is used to uniquely identify the transaction in the decentralized application cluster;
    将所述交易处理状态获取请求发送给所述去中心化应用集群中的去中心化应用;以及Sending the transaction processing status acquisition request to the decentralized application in the decentralized application cluster; and
    从所述去中心化应用处获取所述交易的交易处理状态。Obtain the transaction processing status of the transaction from the decentralized application.
  2. 如权利要求1所述的方法,其中,所述交易跟踪标识是基于所述去中心化应用集群中的各个去中心化应用所约定的标识生成规则生成的。The method according to claim 1, wherein the transaction tracking identifier is generated based on an identifier generation rule agreed upon by each decentralized application in the decentralized application cluster.
  3. 如权利要求1所述的方法,其中,所述交易跟踪标识是由所述交易的交易发起方生成的。The method of claim 1, wherein the transaction tracking identifier is generated by a transaction initiator of the transaction.
  4. 如权利要求1所述的方法,其中,所述交易跟踪标识是由所述去中心化应用在所述交易的交易数据不包括交易跟踪标识生成的。The method of claim 1, wherein the transaction tracking identifier is generated by the decentralized application when the transaction data of the transaction does not include the transaction tracking identifier.
  5. 如权利要求1所述的方法,其中,所述交易跟踪标识是由所述去中心化应用在针对所述交易的交易处理失败时重新生成的。The method of claim 1, wherein the transaction tracking identifier is regenerated by the decentralized application when the transaction processing for the transaction fails.
  6. 如权利要求1所述的方法,其中,对应于所述去中心化应用集群中的各个去中心化应用的所述交易跟踪标识是相同的。The method according to claim 1, wherein the transaction tracking identifiers corresponding to each decentralized application in the decentralized application cluster are the same.
  7. 一种用于处理交易处理状态获取请求的方法,所述方法由去中心化应用集群中的去中心化应用执行,所述方法包括:A method for processing a transaction processing status acquisition request, the method being executed by a decentralized application in a decentralized application cluster, the method comprising:
    接收交易处理状态获取请求,所述交易处理状态获取请求是基于交易在所述去中心化应用集群中的交易跟踪标识生成的,所述交易跟踪标识用于在所述去中心化应用集群中唯一地标识所述交易;Receive a transaction processing status acquisition request, the transaction processing status acquisition request is generated based on the transaction tracking identifier of the transaction in the decentralized application cluster, and the transaction tracking identifier is used to be unique in the decentralized application cluster To identify the transaction;
    基于所述交易处理状态获取请求中的交易跟踪标识,从本地交易处理数据中获取所述交易的交易处理状态;以及Obtain the transaction processing status of the transaction from the local transaction processing data based on the transaction tracking identifier in the transaction processing status acquisition request; and
    将所述交易处理状态发送给所述交易处理状态获取请求的发送方。The transaction processing status is sent to the sender of the transaction processing status acquisition request.
  8. 一种用于获取去中心化应用集群中的交易处理状态的装置,包括:A device for obtaining transaction processing status in a decentralized application cluster includes:
    处理状态获取请求生成单元,基于交易在所述去中心化应用集群中的交易跟踪标识,生成交易处理状态获取请求,所述交易跟踪标识用于在所述去中心化应用集群中唯一地标识所述交易;The processing state acquisition request generating unit generates a transaction processing state acquisition request based on the transaction tracking identifier of the transaction in the decentralized application cluster, where the transaction tracking identifier is used to uniquely identify the transaction in the decentralized application cluster. Said transaction;
    处理状态获取请求发送单元,将所述交易处理状态获取请求发送给所述去中心化应用集群中的去中心化应用;以及A processing state acquisition request sending unit, which sends the transaction processing state acquisition request to the decentralized application in the decentralized application cluster; and
    交易处理状态获取单元,从所述去中心化应用处获取所述交易的交易处理状态。The transaction processing status acquiring unit acquires the transaction processing status of the transaction from the decentralized application.
  9. 如权利要求8所述的装置,其中,所述交易跟踪标识是基于所述去中心化应用 集群中的各个去中心化应用所约定的标识生成规则生成的。The apparatus of claim 8, wherein the transaction tracking identifier is generated based on the identifier generation rules agreed by each decentralized application in the decentralized application cluster.
  10. 如权利要求8所述的装置,其中,所述交易跟踪标识是由所述交易的交易发起方生成的。8. The apparatus of claim 8, wherein the transaction tracking identifier is generated by a transaction initiator of the transaction.
  11. 如权利要求8所述的装置,其中,所述交易跟踪标识是由所述去中心化应用在所述交易的交易数据不包括交易跟踪标识生成的。The device of claim 8, wherein the transaction tracking identifier is generated by the decentralized application when the transaction data of the transaction does not include the transaction tracking identifier.
  12. 如权利要求8所述的装置,其中,所述交易跟踪标识是由所述去中心化应用在针对所述交易的交易处理失败时重新生成的。8. The device of claim 8, wherein the transaction tracking identifier is regenerated by the decentralized application when the transaction processing for the transaction fails.
  13. 如权利要求8所述的装置,其中,对应于所述去中心化应用集群中的各个去中心化应用的所述交易跟踪标识是相同的。8. The apparatus according to claim 8, wherein the transaction tracking identifiers corresponding to each decentralized application in the decentralized application cluster are the same.
  14. 一种用于处理交易处理状态获取请求的装置,所述装置用于去中心化应用集群中的去中心化应用,所述装置包括:A device for processing a transaction processing status acquisition request, the device being used for a decentralized application in a decentralized application cluster, the device comprising:
    处理状态获取请求接收单元,接收交易处理状态获取请求,所述交易处理状态获取请求是基于交易在所述去中心化应用集群中的交易跟踪标识生成的,所述交易跟踪标识用于在所述去中心化应用集群中唯一地标识所述交易;The processing status acquisition request receiving unit receives a transaction processing status acquisition request, where the transaction processing status acquisition request is generated based on the transaction tracking identifier of the transaction in the decentralized application cluster, and the transaction tracking identifier is Uniquely identify the transaction in the decentralized application cluster;
    交易处理状态获取单元,基于所述交易处理状态获取请求中的交易跟踪标识,从本地交易处理数据中获取所述交易的交易处理状态;以及A transaction processing status acquiring unit, which acquires the transaction processing status of the transaction from the local transaction processing data based on the transaction tracking identifier in the transaction processing status acquisition request; and
    交易处理状态发送单元,将所述交易处理状态发送给所述交易处理状态获取请求的发送方。The transaction processing status sending unit sends the transaction processing status to the sender of the transaction processing status acquisition request.
  15. 一种计算设备,包括:A computing device including:
    至少一个处理器;以及At least one processor; and
    存储器,所述存储器存储指令,当所述指令被所述至少一个处理器执行时,使得所述至少一个处理器执行如权利要求1到6中任一所述的方法。A memory, where the memory stores instructions, and when the instructions are executed by the at least one processor, the at least one processor executes the method according to any one of claims 1 to 6.
  16. 一种机器可读存储介质,其存储有可执行指令,所述指令当被执行时使得所述机器执行如权利要求1到6中任一所述的方法。A machine-readable storage medium storing executable instructions, which when executed, cause the machine to execute the method according to any one of claims 1 to 6.
  17. 一种计算设备,包括:A computing device including:
    至少一个处理器;以及At least one processor; and
    存储器,所述存储器存储指令,当所述指令被所述至少一个处理器执行时,使得所述至少一个处理器执行如权利要求7所述的方法。A memory, where the memory stores instructions, and when the instructions are executed by the at least one processor, the at least one processor executes the method according to claim 7.
  18. 一种机器可读存储介质,其存储有可执行指令,所述指令当被执行时使得所述机器执行如权利要求7所述的方法。A machine-readable storage medium storing executable instructions, which when executed, cause the machine to execute the method according to claim 7.
PCT/CN2020/132432 2020-01-14 2020-11-27 Method and apparatus for acquiring transaction processing state in decentralized application cluster WO2021143364A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010036646.0 2020-01-14
CN202010036646.0A CN110852887B (en) 2020-01-14 2020-01-14 Method and device for acquiring transaction processing state in decentralized application cluster

Publications (1)

Publication Number Publication Date
WO2021143364A1 true WO2021143364A1 (en) 2021-07-22

Family

ID=69610691

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/132432 WO2021143364A1 (en) 2020-01-14 2020-11-27 Method and apparatus for acquiring transaction processing state in decentralized application cluster

Country Status (2)

Country Link
CN (1) CN110852887B (en)
WO (1) WO2021143364A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110852887B (en) * 2020-01-14 2020-06-12 支付宝(杭州)信息技术有限公司 Method and device for acquiring transaction processing state in decentralized application cluster
CN113722196A (en) * 2021-08-27 2021-11-30 北京八分量信息科技有限公司 Decentralized-based user behavior information analysis system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150278808A1 (en) * 1999-09-10 2015-10-01 Identrust, Inc. Transaction coordinator for digital certificate validation and other services
CN108765141A (en) * 2018-06-20 2018-11-06 中国银行股份有限公司 A kind of data tracking management method and device
CN109710627A (en) * 2018-12-29 2019-05-03 中国银联股份有限公司 A kind of Transaction Inquiries method and device based on block chain network
CN110226168A (en) * 2017-09-29 2019-09-10 甲骨文国际公司 For providing the system and method for the interface of block chain cloud service
CN110648138A (en) * 2019-09-30 2020-01-03 支付宝(杭州)信息技术有限公司 Transaction query and transaction data processing method, device and equipment based on block chain
CN110852887A (en) * 2020-01-14 2020-02-28 支付宝(杭州)信息技术有限公司 Method and device for acquiring transaction processing state in decentralized application cluster

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107273192B (en) * 2016-04-06 2020-05-08 阿里巴巴集团控股有限公司 Product transaction propelling method, server and system
CN107705125A (en) * 2017-08-28 2018-02-16 杭州云象网络技术有限公司 A kind of payment marking method based on block chain
CN108763257A (en) * 2018-04-03 2018-11-06 北京欧链科技有限公司 DAPP containers, DAPP and block chain data processing method
CN109034814B (en) * 2018-09-14 2020-10-16 百度在线网络技术(北京)有限公司 Intelligent contract processing method and device based on Etheng virtual machine
CN109785132A (en) * 2018-12-21 2019-05-21 众安信息技术服务有限公司 A kind of anti-fake source tracing method, device and storage medium based on block chain

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150278808A1 (en) * 1999-09-10 2015-10-01 Identrust, Inc. Transaction coordinator for digital certificate validation and other services
CN110226168A (en) * 2017-09-29 2019-09-10 甲骨文国际公司 For providing the system and method for the interface of block chain cloud service
CN108765141A (en) * 2018-06-20 2018-11-06 中国银行股份有限公司 A kind of data tracking management method and device
CN109710627A (en) * 2018-12-29 2019-05-03 中国银联股份有限公司 A kind of Transaction Inquiries method and device based on block chain network
CN110648138A (en) * 2019-09-30 2020-01-03 支付宝(杭州)信息技术有限公司 Transaction query and transaction data processing method, device and equipment based on block chain
CN110852887A (en) * 2020-01-14 2020-02-28 支付宝(杭州)信息技术有限公司 Method and device for acquiring transaction processing state in decentralized application cluster

Also Published As

Publication number Publication date
CN110852887B (en) 2020-06-12
CN110852887A (en) 2020-02-28

Similar Documents

Publication Publication Date Title
US11032077B2 (en) Blockchain-based transaction method and apparatus, and remitter device
US11050549B2 (en) Blockchain-based transaction method and apparatus, and remitter device
US11128522B2 (en) Changing a master node in a blockchain system
TWI740378B (en) Method and device for transaction verification
CN111062716B (en) Method and device for generating block chain signature data and block chain transaction initiating system
US11126739B2 (en) Invoice access method and apparatus based on blockchain, and electronic device
WO2021135857A1 (en) Method and device for updating trusted node information
WO2021135757A1 (en) Method and apparatus for executing transaction correctness verification
WO2021184885A1 (en) Method and device for use in updating public key set at blockchain node
US11126458B2 (en) Method, apparatus, and electronic device for resource allocation based on blockchain
WO2021135744A1 (en) Data synchronization method and device for blockchain nodes
US10951417B2 (en) Blockchain-based transaction verification
CN111080292B (en) Method and device for acquiring block chain transaction signature data
US11386426B2 (en) Invoice invalidation method and apparatus based on blockchain, and electronic device
CN111108521A (en) Implementing a blockchain based workflow
WO2021143364A1 (en) Method and apparatus for acquiring transaction processing state in decentralized application cluster
WO2021135755A1 (en) Method and apparatus for sending response message for data request, and blockchain system
WO2021114796A1 (en) Method and apparatus for updating trusted point in multi-layer blockchain structure
CN110827034B (en) Method and apparatus for initiating a blockchain transaction
WO2021114926A1 (en) Method and device for use in generating multilayer blockchain structure
CN111162970B (en) Method and device for testing decentralized application server in block chain system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20914670

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20914670

Country of ref document: EP

Kind code of ref document: A1