WO2021098139A1 - 跨链交易的状态数据的存储方法、装置及存储介质 - Google Patents

跨链交易的状态数据的存储方法、装置及存储介质 Download PDF

Info

Publication number
WO2021098139A1
WO2021098139A1 PCT/CN2020/086273 CN2020086273W WO2021098139A1 WO 2021098139 A1 WO2021098139 A1 WO 2021098139A1 CN 2020086273 W CN2020086273 W CN 2020086273W WO 2021098139 A1 WO2021098139 A1 WO 2021098139A1
Authority
WO
WIPO (PCT)
Prior art keywords
transaction
data set
blockchain
result
request
Prior art date
Application number
PCT/CN2020/086273
Other languages
English (en)
French (fr)
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 WO2021098139A1 publication Critical patent/WO2021098139A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2379Updates performed during online database operations; commit processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Definitions

  • This application relates to the field of blockchain, and in particular to a method, device and computer-readable storage medium for storing state data of cross-chain transactions.
  • Blockchain in essence, is a continuously growing distributed database maintained by multiple parties. It is also called distributed shared ledger. Its core lies in the cryptographic ledger and distributed consensus mechanism that is networked and whose timing cannot be tampered with. Establish a trust relationship between each other, program and manipulate data through smart contracts composed of automated scripts, and finally realize the evolution from information interconnection to value interconnection.
  • the world state database is the latest value of all the key-value pairs that appear in the transaction stored in the blockchain.
  • the state data can be changed by calling the chain code to execute the transaction. In order to execute the chain code call efficiently, the latest value of all data is stored In the state database.
  • Hyperledger does not support cross-chain distributed transactions
  • the cross-chain operation will involve the addition, deletion, modification, and checking of data of different nodes/peers.
  • the data of different nodes/peers The transaction will not be able to meet the ACID characteristics of distributed transactions, which will cause the world state of different nodes/peers to be polluted in the process of executing transactions.
  • This application provides a storage method, device, and computer-readable storage medium for the state data of cross-chain transactions.
  • the main purpose of the method is to solve the problem that the data sets generated by transaction transactions in each blockchain will be written during the process of cross-chain transactions. Enter the state database to pollute the state database; the data set generated during the execution of the transaction in the blockchain can be stored, and when the execution of the transaction in each blockchain is successful, it will be based on each blockchain.
  • the stored data sets update the world state of each block chain, so that the data set generated by each block chain during the execution of the transaction will not pollute its world state.
  • the present application provides a storage method for the state data of a cross-chain transaction.
  • the storage method includes: initiating a first transaction request to a proxy server through a first blockchain, and the first transaction
  • the request is a cross-blockchain transaction operation initiated by the first transaction user from the first blockchain to the second blockchain, and the first transaction user is the initiator of the first transaction request;
  • the first transaction data set is used To characterize the first transaction transaction operation performed by the proxy server on the first blockchain based on the first transaction request;
  • the second transaction transaction result is the result of executing the first transaction request in the second blockchain;
  • this application also provides a storage method for the state data of a cross-chain transaction, and the storage method includes:
  • first transaction request is a cross-blockchain transaction operation initiated by a first transaction user from a first blockchain to a second blockchain, and the first transaction user is the first transaction The originator of the request;
  • Parse the first transaction request send a third transaction request to the second blockchain based on the analysis result of the first transaction request, and the third transaction request is used to characterize the cross-region initiated to the second blockchain Block chain transaction operations;
  • Second transaction request is a cross-blockchain transaction operation initiated by a first transaction user from the first blockchain, and the first transaction user is the initiator of the second transaction request;
  • the present application provides an electronic device, the electronic device includes a memory and a processor, the memory stores a storage program for the status data of a cross-chain transaction that can be run on the processor, and the cross-chain transaction When the storage program of the state data of the chain transaction is executed by the processor, the following steps are implemented:
  • a first transaction request is initiated to the proxy server through the first blockchain.
  • the first transaction request is a cross-blockchain transaction operation initiated by the first transaction user from the first blockchain to the second blockchain.
  • a transaction user is the initiator of the first transaction request;
  • the first transaction data set is used To characterize the first transaction operation performed by the proxy server on the first blockchain based on the first transaction request;
  • the second transaction transaction result is the result of the second transaction operation performed based on the first transaction request in the second blockchain ;
  • the present application further provides an electronic device, the electronic device includes a memory and a processor, the memory stores a storage program for the status data of a cross-chain transaction that can be run on the processor, and When the storage program of the state data of the cross-chain transaction is executed by the processor, the following steps are implemented:
  • first transaction request is a cross-blockchain transaction operation initiated by a first transaction user from a first blockchain to a second blockchain, and the first transaction user is the first transaction The originator of the request;
  • Parse the first transaction request send a third transaction request to the second blockchain based on the analysis result of the first transaction request, and the third transaction request is used to characterize the transaction operation initiated to the second blockchain ;
  • Second transaction request is a cross-blockchain transaction operation initiated by a first transaction user from the first blockchain, and the first transaction user is the initiator of the second transaction request;
  • the computer-readable storage medium stores a storage program for the status data of a cross-chain transaction
  • the storage program for the status data of the cross-chain transaction can be executed by one or more processors
  • the steps include: initiating a first transaction request to the proxy server through the first blockchain, and the first transaction request is the first transaction user from the first blockchain A cross-blockchain transaction operation initiated to a second blockchain, where the first transaction user is the initiator of the first transaction request;
  • the first transaction data set is used To characterize the first transaction operation performed by the proxy server on the first blockchain based on the first transaction request;
  • the second transaction transaction result is the result of the second transaction operation performed based on the first transaction request in the second blockchain ;
  • first transaction request is a cross-blockchain transaction operation initiated by a first transaction user from a first blockchain to a second blockchain, and the first transaction user is the The initiator of the first transaction request;
  • Parse the first transaction request send a third transaction request to the second blockchain based on the analysis result of the first transaction request, and the third transaction request is used to characterize the transaction operation initiated to the second blockchain ;
  • Second transaction request is a cross-blockchain transaction operation initiated by a first transaction user from the first blockchain, and the first transaction user is the initiator of the second transaction request;
  • the storage method, device, and computer-readable storage medium of the state data of the cross-chain transaction provided by the present application, the first block chain and the second block chain based on the first transaction request to perform related transaction operations will correspondingly generate the first transaction
  • the data set and the third transaction data set by storing the first transaction data set in the first storage module, and by storing the third transaction data set in the second storage module, so that the first blockchain and the second area
  • the first transaction data set generated in the first block chain will not be directly written into the world state database of the first block chain
  • the first block When performing related transaction operations based on the first transaction request in the second blockchain and the second blockchain, the third transaction data set generated in the second blockchain will not be directly written into the world state database of the second blockchain.
  • the alliance chain composed of the first blockchain and the second blockchain executes transaction operations based on the first transaction request, the world state of the first blockchain and the world state of the second blockchain will not be affected by The purpose of writing data and being contaminated.
  • FIG. 1 is a schematic flowchart of a method for storing state data of a cross-chain transaction provided by the first embodiment of this application;
  • FIG. 2 is a schematic flowchart of a method for storing state data of a cross-chain transaction provided by the second embodiment of this application;
  • FIG. 3 is a schematic flow chart of a method for storing state data of a cross-chain transaction provided by the third embodiment of the application;
  • FIG. 4 is a schematic flow chart of a method for storing state data of a cross-chain transaction provided by the fourth embodiment of this application;
  • FIG. 5 is a schematic diagram of the internal structure of an electronic device provided by a fifth embodiment of the application.
  • FIG. 6 is a schematic diagram of a module of a storage program based on state data of a cross-chain transaction in an electronic device according to a sixth embodiment of the application;
  • FIG. 7 is a schematic diagram of a module of a storage program based on state data of a cross-chain transaction in an electronic device provided by a seventh embodiment of the application.
  • blockchain described in the embodiments provided in this specification can specifically refer to a network system with a distributed data storage structure that is reached through a consensus mechanism through multiple peers (ie nodes/users involved in performing transaction operations) .
  • a transaction request is a cross-blockchain transaction operation initiated by the first transaction user to the second blockchain through the first blockchain.
  • the transaction request has two stages, including the first transaction of the first stage Request and the second transaction request of the second stage, the first transaction request is specifically a precommit request (precommit) in this application, and the second transaction request is specifically a commit request (commit).
  • the transaction request is generated based on the transaction request.
  • the first transaction request is generated based on the cross-blockchain transaction initiated by the first transaction user to the second blockchain through the first blockchain.
  • a transaction refers to a value transfer issued by a user to the blockchain, for example, a transfer initiated by the first transaction user from the first blockchain.
  • the transaction can also be a piece of business data with business intent released by the user to the blockchain.
  • the operator can build a consortium chain based on actual business needs, and rely on the consortium chain to deploy some unrelated value transfer
  • Other types of online services for example, renting a house, vehicle dispatching, insurance claims, credit services, medical services, etc.
  • the transaction can be a transaction issued by the first transaction user in the alliance chain Business messages or business requests with business intent.
  • the world state is used to characterize the state value of the latest transaction on the blockchain, and the state value is stored in the world state database.
  • different blockchains have their own world state and world state databases.
  • the world state represents the current value of all transaction states.
  • Different blockchains have the latest values of their respective state values, that is, different blockchains have their own world states, and the world states of each blockchain are stored in The corresponding world state database.
  • the world state database is just an indexed view in the blockchain transaction log, so it can be regenerated according to the blockchain at any time.
  • the first embodiment of the present application provides a method for storing state data of cross-chain transactions, wherein the method for storing state data of cross-chain transactions of the present application is mainly used in hyperledger cross-chain transactions.
  • the method of this embodiment is set and executed by computer-executable instructions.
  • the storage method includes the following steps:
  • Step S110 Initiate a first transaction request to the proxy server through the first blockchain
  • Step S120 receiving the first transaction data set sent by the proxy server to obtain the first transaction transaction result and receiving the second transaction transaction result, and storing the first transaction data set in the first storage module;
  • Step S130 judge the result of the first transaction and the result of the second transaction respectively;
  • Step S140 when the first transaction transaction result and the second transaction transaction result are respectively successful, initiate a second transaction request to the proxy server through the first blockchain;
  • Step S150 Generate a second transaction data set based on the first transaction data set and store it in the first storage module;
  • Step S160 based on the second transaction request, extract the second transaction data set from the first storage module to the world state database of the first blockchain to update the world state of the first blockchain.
  • the first transaction request is a cross-blockchain transaction operation initiated by the first transaction user from the first blockchain to the second blockchain ,
  • the first transaction user is the initiator of the first transaction request.
  • the second transaction transaction result is the result of executing the second transaction transaction operation based on the first transaction request in the second blockchain.
  • the proxy server mentioned in this application includes users participating in the execution of the first transaction request in the first blockchain (that is, the first endorsement node described below), and includes the users participating in the execution of the first transaction request in the second blockchain.
  • the user of a transaction request ie, the second endorsement node described below.
  • each first endorsing node executes the first transaction transaction operation based on the first transaction request and generates a first transaction data set.
  • the first transaction data set includes a first data subset and a second data subset
  • the first data subset is used to characterize the identity information of users participating in the execution of the first transaction operation
  • the second data subset It is used to characterize the first transaction operation performed by the user participating in the execution of the first transaction operation.
  • the first transaction transaction operation may specifically include, based on the setting of the executable instruction, the relevant first endorsing node executes the endorsement signature.
  • the first data subset and the second data subset are stored in the first storage module, and the first storage module is embedded in the process of the node of the first blockchain.
  • the step of receiving the first transaction data set sent by the proxy server to obtain the first transaction result and receiving the second transaction result further includes the following steps:
  • Step S121 receiving the first state data set and the first transaction user data set sent by the proxy server, and storing the first state data set and the first transaction user data set in the first storage module;
  • step S160 the following steps are further included:
  • Step S170 deleting the second transaction data set from the first storage module and deleting the user identity information of the first transaction user data set from the first storage module;
  • Step S180 Set each user identity information of the first data subset to a null value, and mark the transaction status of each user identity information as a commit state.
  • the first embodiment of the present application completes a complete update of the world state of the first blockchain.
  • the first transaction data set is stored in the first storage module, which is used to enable the first block chain and the second block chain to perform related transaction operations based on the first transaction request, the first The first transaction data set generated in the blockchain will not be directly written into the world state database of the first blockchain, so that when the transaction operation based on the first transaction request is executed, the world state of the first blockchain is not The purpose will be contaminated.
  • the first state data set is used to characterize the world state of the first blockchain before the step of initiating the first transaction request to the proxy server through the first blockchain (that is, the current state of the first blockchain)
  • the first transaction user data set is used to characterize the identity information of the user participating in the execution of the first transaction transaction operation.
  • the first transaction data set, the first state data set, and the first transaction user data set respectively form a data set and are stored in the first storage module.
  • the first transaction user data set can be used to query and confirm the user identity information of the first blockchain based on the first transaction request to successfully perform the relevant transaction operation when the first transaction transaction result or the second transaction transaction result is a failure. (I.e. endorsing the node/peer) to facilitate the subsequent re-initiation of the first transaction request.
  • the first transaction request (chaincode function and parameters) through the SDK.
  • the first transaction requests to send information with the contract identification, contract method, parameter information, the current world state of the first blockchain, and client signature to the endorsing node.
  • the first endorsement node (ie, the proxy server) of the first blockchain takes the transaction proposal voucher as input, executes and generates the first transaction data set based on the current world state.
  • the second endorsing node (ie, the proxy server) of the second blockchain takes the transaction proposal voucher as input to obtain the second transaction transaction result.
  • the first transaction data set is stored in the first storage module, the first transaction result is obtained based on the first transaction data set, and the second transaction request is initiated.
  • the first transaction transaction result (including the first transaction data set and the first state data set, or the first transaction data set, the first state data set and the first transaction user data set) is packaged into one
  • the transaction is signed and sent to the ordering node (ie, the proxy server), and the ordering node performs consensus ordering based on the second transaction request, packs it into blocks, and sends it to the submitting node.
  • the ordering node ie, the proxy server
  • the ordering node performs consensus ordering based on the second transaction request, packs it into blocks, and sends it to the submitting node.
  • the submitting node After the submitting node receives the block, it verifies the transaction result in the block, that is, verifies the first transaction data set.
  • the block is added to the blockchain, and the second transaction data set is extracted from the first storage module and stored in the world state database of the first
  • the transaction transaction result when the transaction transaction result is successful, it can be embodied as: the transaction result (endorsement strategy) executed by enough endorsing nodes based on the first transaction request is received, that is, it means The transaction execution (transaction) in the blockchain is successful.
  • the transaction transaction result when the transaction transaction result is a failure, it can be reflected as: the transaction result (endorsement strategy) requested by the endorsing node based on the first transaction has not been received by enough endorsing nodes, that is, the transaction execution in the first blockchain fails (transaction failure).
  • the transaction (ie, transaction) of the blockchain that failed as a result of the transaction transaction is abandoned and will be tried again later.
  • the data set i.e. the first transaction data set and the second transaction data set mentioned above
  • the rollback is executed in the transaction request of the second stage to delete related data (detailed later).
  • the second transaction data set includes the user information of the first endorsing node that is correctly endorsed (that is, a valid transaction) and the transaction operations performed by the first endorsing node. It is understandable that, in this application, the first endorsement node may be multiple nodes.
  • the proxy server includes nodes, endorsement nodes, submission nodes, and sorting nodes on the first blockchain network and the second blockchain network, respectively.
  • the proxy server in the first embodiment, in the execution of the first transaction request stage, in the first blockchain, the proxy server is the first endorsement node in the first blockchain; in the execution of the second transaction request stage, in the first blockchain In a blockchain, the proxy server is the first ordering node and the first submitting node in the first blockchain.
  • the method in the above embodiment is usually set and executed by computer executable instructions (ie, programs). It can be understood that the execution instructions of the method for storing state data of cross-chain transactions can be deployed on blockchain nodes. Inside the device (that is, the client of the first transaction user), the execution of each step of the above method is monitored and the relevant steps are executed according to executable instructions. It can also be deployed in the above-mentioned blockchains and called and executed in the form of a smart contract: the smart contract can declare part or all applicable to each blockchain (including the first blockchain and the second blockchain) The node's transaction execution method (or logic).
  • the above-mentioned first embodiment provides that in the storage method of the state data of the cross-chain transaction, the first transaction result and the second transaction result of the related transaction operation performed based on the first transaction request in the first block chain and the second block chain The result of the transaction is successful.
  • the first block chain and the second block chain execute related transactions based on the first transaction request The operation result of the first transaction transaction and the result of the second transaction transaction may fail.
  • the second embodiment of the present application provides a method for storing state data of cross-chain transactions, wherein the method of storing state data of cross-chain transactions in this second embodiment is mainly used in hyperledger cross-chain transactions.
  • the method of this embodiment is set and executed by computer-executable instructions.
  • the storage method includes the following steps:
  • Step S210 initiate a first transaction request to the proxy server through the first blockchain
  • Step S220 Receive the first transaction data set sent by the proxy server to obtain the first transaction transaction result and receive the second transaction transaction result, and store the first transaction data set in the first storage module; receive the first transaction data set sent by the proxy server A first state data set and a first transaction user data set, and storing the first state data set and the first transaction user data set in the first storage module;
  • Step S230 judge the result of the first transaction and the result of the second transaction respectively
  • Step S240 when the result of the first transaction or the result of the second transaction is a failure, initiate a rollback transaction request to the proxy server through the first blockchain;
  • Step S250 Generate a second transaction data set based on the first transaction data set and store it in the first storage module;
  • Step S260 based on the rollback transaction request, delete the second transaction data set and delete the user identity information of the first transaction user data set.
  • the first transaction request is a cross-blockchain transaction operation initiated by the first transaction user from the first blockchain to the second blockchain ,
  • the first transaction user is the initiator of the first transaction request.
  • the proxy server includes users in the first blockchain who participate in the execution of the first transaction request (that is, the first endorsing node described below), and users who participate in the execution of the first transaction request in the second blockchain (that is, the first endorsement node). , The second endorsement node below). Based on the first transaction request, each first endorsing node executes the first transaction transaction operation based on the first transaction request and generates a first transaction data set.
  • the first transaction data set includes a first data subset and a second data subset
  • the first data subset is used to characterize the identity information of users participating in the execution of the first transaction operation
  • the second data subset It is used to characterize the first transaction operation performed by the user participating in the execution of the first transaction operation.
  • the first transaction transaction operation may specifically include, based on the setting of the executable instruction, the relevant first endorsing node executes the endorsement signature.
  • the first data subset and the second data subset are stored in the first storage module, and the first storage module is embedded in the process of the node of the first blockchain.
  • the step of receiving the first transaction data set sent by the proxy server to obtain the first transaction result and receiving the second transaction result further includes the following steps:
  • Step S221 Receive the first state data set and the first transaction user data set sent by the proxy server, and store the first state data set and the first transaction user data set in the first storage module.
  • step S280 setting each user identity information of the first data subset to a null value (ie, null), and marking the transaction status of each user identity information as a rollback state (ie, rollback).
  • step S220 the first transaction data set is stored in the first storage module, so that when the first block chain and the second block chain perform related transaction operations based on the first transaction request, the first block
  • the first transaction data set generated in the chain will not be directly written into the world state database of the first blockchain, so that the world state of the first blockchain will not be affected when the transaction operation based on the first transaction request is executed. Purpose of pollution.
  • the first state data set is used to characterize the world state of the first blockchain before the step of initiating the first transaction request to the proxy server through the first blockchain (that is, the current transaction of the first blockchain)
  • the first transaction user data set is used to characterize the identity information of the user participating in the execution of the first transaction operation.
  • the first transaction data set, the first state data set, and the first transaction user data set respectively form a data set and are stored in the first storage module.
  • the first transaction user data set can be used to query and confirm the user identity information of the first blockchain based on the first transaction request to successfully perform the relevant transaction operation when the first transaction transaction result or the second transaction transaction result is a failure. (I.e. endorsing the node/peer) to facilitate the subsequent re-initiation of the first transaction request.
  • Step S240 when the first transaction result or the second transaction result is a failure, a rollback transaction request is initiated to the proxy server through the first blockchain, including the first transaction result being a failure and the second transaction result being a failure.
  • the transaction result is a failure.
  • scenario A the scenario where the result of the first transaction transaction is failure and the result of the second transaction transaction is success
  • scenario A the first transaction data set will not be received at this time, and the first transaction data set will be understood in this scenario It is an empty set, that is, the result of the first transaction will be judged as a failure.
  • the proxy server initiates a rollback request, and the rollback action is executed in the second blockchain.
  • the proxy server initiates a rollback request, executes the rollback operation in the first blockchain, and executes step S250 ⁇ Step S280, complete this transaction, so that the transaction request can be resubmitted.
  • steps S260 to S280 based on the result of the first transaction or the result of the second transaction as a failure, a rollback operation is executed in the first blockchain, and the second transaction data set in the first storage module is deleted correspondingly, In this way, the second transaction data set will not be written into the world state database of the first blockchain, so that the world state of the first blockchain will not be polluted.
  • the result of the second transaction in the second blockchain is failure
  • a rollback request is initiated and the rollback action is executed to make the first area
  • the block chain returns to the state when the first transaction request was not sent, and correspondingly, the user identity information of the second transaction data set and the first transaction user data set is deleted from the first storage module, and the first data subset Set the user identity information of each user identity information to a null value, and mark the transaction status of each user identity information as a rollback state, so that it can be used to query and confirm the successful execution of related transactions based on the first transaction request in the first blockchain
  • the user identity information of the operation is used to query and confirm the successful execution of related transactions based on the first transaction request in the first blockchain.
  • this transaction is cancelled in the first block chain and the second block chain (that is, the first transaction request and the second transaction request are cancelled), pending re-submission Transaction request.
  • the third embodiment of the present application provides a method for storing state data of cross-chain transactions, wherein the method of storing state data of cross-chain transactions in the third embodiment is mainly used in hyperledger cross-chain transactions.
  • the method of this embodiment is set and executed by computer executable instructions.
  • the storage method for the state data of the cross-chain transaction provided by the third embodiment is applied to the proxy server corresponding to the transaction of the cross-blockchain network, and the process of transactions between users of different blockchain networks
  • the process of storing the state data of the cross-chain transaction includes the following steps:
  • Step S310 Receive the first transaction request; parse the first transaction request, and send a third transaction request to the second blockchain based on the analysis result of the first transaction request
  • Step S320 receiving the third transaction data set in the second blockchain to obtain the second transaction transaction result and storing the third transaction data set in the second storage module;
  • Step S330 Send the result of the second transaction to the first blockchain network
  • Step S340 receiving a second transaction request
  • Step S350 Generate a fourth transaction data set based on the third transaction data set and store it in the second storage module;
  • Step S360 based on the second transaction request, extract the fourth transaction data set from the second storage module to the world state database of the second blockchain to update the world state of the second blockchain.
  • the step of receiving the third transaction data set in the second blockchain to obtain the second transaction transaction result and storing the third transaction data set in the second storage module further includes:
  • Step S321 Receive the second state data set and the second transaction user data set in the second blockchain, and store the second state data set and the second transaction user data set in the second storage module.
  • the third transaction data set includes a third data subset and a fourth data subset
  • the third data subset is used to characterize the identity information of the user participating in the execution of the second transaction operation
  • the fourth data subset It is used to characterize the second transaction operation performed by the user participating in the second transaction operation.
  • the second transaction transaction operation may specifically include, based on the setting of the executable instruction, the relevant second endorsing node executes the endorsement signature.
  • the third data subset and the fourth data subset are stored in the second storage module, and the second storage module is embedded in the process of the nodes of the second blockchain.
  • Step S370 deleting the second transaction data set from the first storage module and deleting the user identity information of the second transaction user data set;
  • Step S380 Set each user identity information of the first data subset to a null value, and mark the transaction status of each user identity information as a commit state.
  • the first transaction request in step S310 is a cross-blockchain transaction operation initiated by the first transaction user from the first blockchain to the second blockchain, and the first transaction user is the first transaction user.
  • the third transaction request in step S310 is used to characterize the transaction operation initiated to the second blockchain based on the first transaction request.
  • the third transaction data set in step S320 is used to characterize the second transaction operation performed on the second blockchain based on the third transaction request in the second blockchain.
  • the second transaction request in step S340 is that after the first block chain receives the second transaction result sent by the second block chain, the result of the second transaction transaction and the result of the first transaction transaction in the first block chain After judging that the first transaction result and the second transaction result are both successful, the second transaction request is initiated through the first blockchain.
  • the first transaction transaction result is the result of executing the first transaction transaction operation based on the first transaction request in the first blockchain.
  • the second state data set in step S321 is used to characterize the world state of the second block chain before the step of executing the second transaction operation in the second block chain
  • the second transaction user data set is used to characterize Identity information of the user participating in the execution of the second transaction operation.
  • the third transaction data set, the second status data set, and the second transaction user data set respectively form a data set and are stored in the first storage module.
  • the first transaction user data set can be used to query and confirm the user identity information of the first blockchain based on the first transaction request to successfully perform the relevant transaction operation when the first transaction transaction result or the second transaction transaction result is a failure. (I.e. endorsing the node/peer) to facilitate the subsequent re-initiation of the first transaction request.
  • step S310 the first transaction request is parsed, and a third transaction request is sent to the second blockchain based on the analysis result of the first transaction request. Since the second blockchain has already stored the platform type of the blockchain, the unique identifier of the second blockchain, and the associated information of the wallet in the second blockchain in the proxy server during the registration process, it is necessary to analyze the first A transaction request can learn the transaction receiver of the cross-blockchain network transaction (the second transaction user in the second blockchain), and determine the information storage address of the blockchain where the second transaction user is located, to Determine the receiving address of the third transaction request.
  • the parsing of the first transaction request, based on the parsing result of the first transaction request, and sending the third transaction request to the second blockchain includes the step of: according to the second Information of the block chain, query the registration information corresponding to the second block chain, and determine the information storage address of the second block chain network based on the registration information corresponding to the second block chain, and send it to the second block The information storage address of the chain network sends the third transaction request.
  • the proxy server includes nodes, endorsement nodes, submission nodes, and sorting nodes on the first blockchain network and the second blockchain network, respectively.
  • the proxy server in the third embodiment, in the execution of the first transaction request stage, in the second blockchain, the proxy server is the second endorsement node in the second blockchain; in the execution of the second transaction request stage, in the second blockchain In the second block chain, the proxy server is the second ordering node and the second submitting node in the second block chain.
  • the certificate service (CA) service through the SDK to register and register to obtain the identity certificate.
  • the third transaction request contains the contract identification, contract method, information and parameters of the current world state of the second blockchain to be called by this transaction.
  • the information, client signature and other information are sent to the second endorsement node.
  • the second endorsement node (ie, proxy server) of the second blockchain takes the transaction proposal certificate as input, executes and generates the third transaction data set based on the current world state, and will obtain the second transaction transaction based on the third transaction data set result.
  • the second endorsing node (ie, the proxy server) of the second blockchain takes the transaction proposal voucher as input to obtain the second transaction transaction result.
  • the second transaction transaction result (including the third transaction data set and the second state data set, or including the third transaction data set, the first state data set and the third transaction user data set)
  • a transaction is packaged and signed and sent to the second ordering node (ie, the proxy server).
  • the second ordering node performs consensus ordering based on the second transaction request, packs it into blocks, and sends it to the second submitting node.
  • the second submitting node verifies the transaction result in the block, that is, verifies the third transaction data set.
  • the block is added to the blockchain, and the second transaction data set is extracted from the second storage module and stored in the world state database of the second blockchain, that is, the world state of the second blockchain is completed Update.
  • the third transaction data set is stored in the second storage module, which is used to make the first block chain and the second block chain perform related transaction operations based on the first transaction request, the second The third transaction data set generated in the blockchain will not be directly written into the world state database of the second blockchain, so that when the transaction operation based on the first transaction request is executed, the world state of the second blockchain is not The purpose will be contaminated.
  • the above-mentioned third embodiment provides that in the storage method of the state data of the cross-chain transaction, the first transaction result and the second transaction result of the related transaction operation performed based on the first transaction request in the first block chain and the second block chain The result of the transaction is successful.
  • the first block chain and the second block chain execute related transactions based on the first transaction request The operation result of the first transaction transaction and the result of the second transaction transaction may fail.
  • the fourth embodiment of the present application provides a method for storing state data of cross-chain transactions, wherein the method for storing state data of cross-chain transactions in the fourth embodiment is mainly used in hyperledger cross-chain transactions.
  • the method of this embodiment is set and executed by computer executable instructions.
  • the storage method includes the following steps:
  • Step S410 receiving a first transaction request; parsing the first transaction request, and sending a third transaction request to the second blockchain based on the analysis result of the first transaction request;
  • Step S420 receiving the third transaction data set in the second blockchain to obtain the second transaction transaction result and storing the third transaction data set in the second storage module; receiving the second state data set in the second blockchain And a second transaction user data set, and store the second state data set and the second transaction user data set in the second storage module;
  • Step S430 Send the result of the second transaction to the first blockchain network
  • Step S440 receiving a rollback transaction request
  • Step S450 Generate a fourth transaction data set based on the third transaction data set and store it in the second storage module;
  • Step S460 based on the rollback transaction request, delete the fourth transaction data set and delete the user identity information of the second transaction user data set.
  • the third transaction data set includes a third data subset and a fourth data subset
  • the third data subset is used to characterize the identity information of users participating in the second transaction operation
  • the fourth data subset It is used to characterize the second transaction operation performed by the user participating in the second transaction operation.
  • the second transaction transaction operation may specifically include, based on the setting of the executable instruction, the relevant second endorsing node executes the endorsement signature.
  • the third data subset and the fourth data subset are stored in the second storage module, and the second storage module is embedded in the process of the nodes of the second blockchain.
  • the method further includes:
  • Step S470 Set each user identity information of the third data subset to a null value (ie, null), and mark the transaction status of each user identity information as a rollback state (ie, rollback).
  • step S420 the third transaction data set is stored in the second storage module, so that when the first block chain and the second block chain perform related transaction operations based on the first transaction request, the second block
  • the second transaction data set generated in the chain will not be directly written into the world state database of the second blockchain, so that the world state of the second blockchain will not be affected when the transaction operation based on the first transaction request is executed. Purpose of pollution.
  • steps S450-S470 based on the result of the first transaction or the result of the second transaction as a failure, a rollback operation is executed in the second blockchain, and the fourth transaction data set in the second storage module is deleted correspondingly, In this way, the fourth transaction data set will not be written into the world state database of the second blockchain, so that the world state of the second blockchain will not be polluted.
  • the block chain returns to the state when the first transaction request was received, and correspondingly, the user identity information of the fourth transaction data set and the second transaction user data set is deleted from the second storage module, and the third data subset
  • Each user identity information is set to a null value, and the transaction status of each user identity information is marked as a rollback state, so that it can be used to query and confirm the successful execution of related transaction operations based on the first transaction request in the second blockchain
  • the fourth transaction data set will not be directly written into the world state database of the second blockchain, so that the world state of the second blockchain will not be polluted.
  • this transaction is cancelled in the first block chain and in the second block chain (that is, the first transaction request and the second transaction request are cancelled), pending re-submission Transaction request.
  • the original amount of the account of the first transaction user and the account of the second transaction user It's 100 yuan.
  • the user who initiated the first transaction transfers RMB 10 to the second transaction user.
  • second transaction request a submission request
  • rollback ie rollback of transaction request
  • the fifth embodiment of the present application provides an electronic device 1.
  • the electronic device 1 may be a computer, a smart terminal, or a server.
  • the electronic device 1 at least includes a memory 11, a processor 13, a communication bus 15, and a network interface 17.
  • the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, and the like.
  • the memory 11 may be an internal storage unit of the electronic device, such as a hard disk of the electronic device.
  • the memory 11 may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart media card (SMC), and a secure digital (SD) card equipped on the electronic device. Flash Card, etc.
  • the memory 11 may also include both an internal storage unit of an electronic device and an external storage device.
  • the memory 11 can be used not only to store application software and various data installed in the electronic device 1, such as the code of the storage program 12 for the status data of a cross-chain transaction, etc., but also to temporarily store data that has been output or will be output.
  • the processor 13 may be a central processing unit (CPU), controller, microcontroller, microprocessor or other data processing chip in some embodiments, and is used to run the program code or processing stored in the memory 11 data.
  • CPU central processing unit
  • controller microcontroller
  • microprocessor or other data processing chip in some embodiments, and is used to run the program code or processing stored in the memory 11 data.
  • the communication bus 15 is used to realize the connection and communication between these components.
  • the network interface 17 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface), and is generally used to establish a communication connection between the electronic device 1 and other electronic devices.
  • a standard wired interface and a wireless interface such as a WI-FI interface
  • the electronic device 1 may further include a user interface.
  • the user interface may include a display (Display) and an input unit such as a keyboard (Keyboard).
  • the optional user interface may also include a standard wired interface and a wireless interface.
  • the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc.
  • the display can also be appropriately called a display screen or a display unit, which is used to display information processed in the electronic device and to display a visualized user interface.
  • FIG. 5 only shows the electronic device 1 with the components 11-17. Those skilled in the art can understand that the structure shown in FIG. 5 does not constitute a limitation on the electronic device, and may include fewer or more components than shown in the figure. Components, or a combination of certain components, or different component arrangements.
  • the storage program 12 for the status data of the cross-chain transaction is stored in the memory 11; when the processor 13 executes the storage program 12 for the status data of the cross-chain transaction stored in the memory 11 To achieve the following steps:
  • Step S110 Initiate a first transaction request to the proxy server through the first blockchain
  • Step S120 receiving the first transaction data set sent by the proxy server to obtain the first transaction transaction result and receiving the second transaction transaction result, and storing the first transaction data set in the first storage module;
  • Step S130 judge the result of the first transaction and the result of the second transaction respectively;
  • Step S140 when the first transaction transaction result and the second transaction transaction result are respectively successful, initiate a second transaction request to the proxy server through the first blockchain;
  • Step S150 Generate a second transaction data set based on the first transaction data set and store it in the first storage module;
  • Step S160 based on the second transaction request, extract the second transaction data set from the first storage module to the world state database of the first blockchain to update the world state of the first blockchain.
  • the first transaction request is a cross-blockchain transaction operation initiated by the first transaction user from the first blockchain to the second blockchain ,
  • the first transaction user is the initiator of the first transaction request.
  • the second transaction transaction result is the result of executing the second transaction transaction operation based on the first transaction request in the second blockchain.
  • the proxy server mentioned in this application includes users participating in the execution of the first transaction request in the first blockchain (that is, the first endorsement node described below), and includes the users participating in the execution of the first transaction request in the second blockchain.
  • the user of a transaction request ie, the second endorsement node described below.
  • each first endorsing node executes the first transaction transaction operation based on the first transaction request and generates a first transaction data set.
  • the first transaction data set includes a first data subset and a second data subset
  • the first data subset is used to characterize the identity information of users participating in the execution of the first transaction operation
  • the second data subset It is used to characterize the first transaction operation performed by the user participating in the execution of the first transaction operation.
  • the first transaction transaction operation may specifically include, based on the setting of the executable instruction, the relevant first endorsing node executes the endorsement signature.
  • the first data subset and the second data subset are stored in the first storage module, and the first storage module is embedded in the process of the node of the first blockchain.
  • the step of receiving the first transaction data set sent by the proxy server to obtain the first transaction result and receiving the second transaction result further includes the following steps:
  • Step S121 receiving the first state data set and the first transaction user data set sent by the proxy server, and storing the first state data set and the first transaction user data set in the first storage module;
  • step S160 the following steps are further included:
  • Step S170 deleting the second transaction data set from the first storage module and deleting the user identity information of the first transaction user data set from the first storage module;
  • Step S180 Set each user identity information of the first data subset to a null value, and mark the transaction status of each user identity information as a commit state.
  • the first embodiment of the present application completes a complete update of the world state of the first blockchain.
  • the first transaction data set is stored in the first storage module, which is used to enable the first block chain and the second block chain to perform related transaction operations based on the first transaction request, the first The first transaction data set generated in the blockchain will not be directly written into the world state database of the first blockchain, so that when the transaction operation based on the first transaction request is executed, the world state of the first blockchain is not The purpose will be contaminated.
  • the first state data set is used to characterize the world state of the first blockchain before the step of initiating the first transaction request to the proxy server through the first blockchain (that is, the current state of the first blockchain)
  • the first transaction user data set is used to characterize the identity information of the user participating in the execution of the first transaction transaction operation.
  • the first transaction data set, the first state data set, and the first transaction user data set respectively form a data set and are stored in the first storage module.
  • the first transaction user data set can be used to query and confirm the user identity information of the first blockchain based on the first transaction request to successfully perform the relevant transaction operation when the first transaction transaction result or the second transaction transaction result is a failure. (I.e. endorsing the node/peer) to facilitate the subsequent re-initiation of the first transaction request.
  • the memory 11 stores the storage program 12 for the status data of the cross-chain transaction; when the processor 13 executes the storage program 12 for the status data of the cross-chain transaction stored in the memory 11, the following steps can also be implemented:
  • Step S210 initiate a first transaction request to the proxy server through the first blockchain
  • Step S220 Receive the first transaction data set sent by the proxy server to obtain the first transaction transaction result and receive the second transaction transaction result, and store the first transaction data set in the first storage module; receive the first transaction data set sent by the proxy server A first state data set and a first transaction user data set, and storing the first state data set and the first transaction user data set in the first storage module;
  • Step S230 judge the result of the first transaction and the result of the second transaction respectively
  • Step S240 when the result of the first transaction or the result of the second transaction is a failure, initiate a rollback transaction request to the proxy server through the first blockchain;
  • Step S250 Generate a second transaction data set based on the first transaction data set and store it in the first storage module;
  • Step S260 based on the rollback transaction request, delete the second transaction data set and delete the user identity information of the first transaction user data set.
  • the step of receiving the first transaction data set sent by the proxy server to obtain the first transaction result and receiving the second transaction result further includes the following steps:
  • Step S221 Receive the first state data set and the first transaction user data set sent by the proxy server, and store the first state data set and the first transaction user data set in the first storage module.
  • step S280 setting each user identity information of the first data subset to a null value, and marking the transaction status of each user identity information as a rollback state.
  • the memory 11 stores the storage program 12 for the status data of the cross-chain transaction; when the processor 13 executes the storage program 12 for the status data of the cross-chain transaction stored in the memory 11, the following steps can also be implemented:
  • Step S310 Receive the first transaction request; parse the first transaction request, and send a third transaction request to the second blockchain based on the analysis result of the first transaction request
  • Step S320 receiving the third transaction data set in the second blockchain to obtain the second transaction transaction result and storing the third transaction data set in the second storage module;
  • Step S330 Send the result of the second transaction to the first blockchain network
  • Step S340 receiving a second transaction request
  • Step S350 Generate a fourth transaction data set based on the third transaction data set and store it in the second storage module;
  • Step S360 based on the second transaction request, extract the fourth transaction data set from the second storage module to the world state database of the second blockchain to update the world state of the second blockchain.
  • Step S370 deleting the second transaction data set from the first storage module and deleting the user identity information of the second transaction user data set;
  • Step S380 Set each user identity information of the first data subset to a null value, and mark the transaction status of each user identity information as a commit state.
  • the step of receiving the third transaction data set in the second blockchain to obtain the second transaction transaction result and storing the third transaction data set in the second storage module further includes:
  • Step S321 Receive the second state data set and the second transaction user data set in the second blockchain, and store the second state data set and the second transaction user data set in the second storage module.
  • the memory 11 stores the storage program 12 for the status data of the cross-chain transaction; when the processor 13 executes the storage program 12 for the status data of the cross-chain transaction stored in the memory 11, the following steps can also be implemented :
  • Step S410 Receive the first transaction request; parse the first transaction request, and send a third transaction request to the second blockchain based on the analysis result of the first transaction request;
  • Step S420 receiving the third transaction data set in the second blockchain to obtain the second transaction transaction result and storing the third transaction data set in the second storage module; receiving the second state data set in the second blockchain And a second transaction user data set, and store the second state data set and the second transaction user data set in the second storage module;
  • Step S430 Send the result of the second transaction to the first blockchain network
  • Step S440 receiving a rollback transaction request
  • Step S450 Generate a fourth transaction data set based on the third transaction data set and store it in the second storage module;
  • Step S460 based on the rollback transaction request, delete the fourth transaction data set and delete the user identity information of the second transaction user data set.
  • Step S470 Set each user identity information of the third data subset to a null value, and mark the transaction status of each user identity information as a rollback state.
  • this application also provides a computer-readable storage medium.
  • the computer-readable storage medium stores a storage program for the status data of a cross-chain transaction.
  • the storage program for the status data of a cross-chain transaction can be configured by one or more
  • the processor executes to implement the steps of the method for storing state data of the cross-chain transaction described above and the steps implemented by the electronic device 1 described above.
  • the above-mentioned storage program for the state data of the cross-chain transaction can be deployed inside the blockchain node device (that is, the client of the first transaction user) to monitor the execution of each step of the above method and based on the cross-chain transaction.
  • the storage program of the status data of the chain transaction executes the relevant steps. It can also be deployed in the above-mentioned blockchains and called and executed in the form of a smart contract: the smart contract can declare part or all applicable to each blockchain (including the first blockchain and the second blockchain) The node's transaction execution method (or logic).
  • the storage program 12 for the state data of the cross-chain transaction described in this application can be divided into one or more modules, and the one or more modules are stored in the memory and controlled by the The processor executes to complete the application.
  • the one or more modules may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the stored program of the status data of the cross-chain transaction in the electronic device.
  • FIG. 6 is a schematic diagram of the program module of the storage program 12 for the state data of the cross-chain transaction in an embodiment of the electronic device of the application.
  • the storage program 12 for the state data of the cross-chain transaction is It can be divided into a first information transmission module 20, a first storage module 30, and a first processing module 40, for example:
  • the first information transmission module 20 is configured to initiate a first transaction request to the proxy server through the first blockchain, and is configured to receive a first transaction data set to obtain a first transaction transaction result and receive a second transaction transaction result;
  • the first transaction request is a cross-blockchain transaction operation initiated by the first transaction user from the first blockchain to the second blockchain, and the first transaction user is the initiator of the first transaction request;
  • the first transaction data set Used to characterize the first transaction operation performed by the proxy server on the first blockchain based on the first transaction request;
  • the second transaction transaction result is the result of executing the first transaction request in the second blockchain;
  • the first storage module 30 is used to store a first transaction data set
  • the first processing module 40 is configured to store the first transaction data set in the first storage module
  • the first processing module 40 is used to judge the first transaction result and the second transaction result separately, and when the first transaction result and the second transaction result are respectively successful, pass the first block chain Initiating a second transaction request to the proxy server, generating a second transaction data set based on the first transaction data set, and storing the second transaction data set in the first storage module;
  • the first processing module 40 is configured to extract the second transaction data set from the first storage module to the world state database of the first blockchain based on the second transaction request to update the world state of the first blockchain.
  • the first information transmission module 20 is configured to receive the first state data set and the first transaction user data set sent by the proxy server.
  • the first processing module 40 is configured to store the first state data set and the first transaction user data set in the first storage module.
  • the first processing module 40 is configured to delete the user identity information of the first transaction user data set from the first storage module, set each user identity information of the first data subset to a null value, and set each user identity The transaction status of the information is marked as committed.
  • the first processing module 40 is configured to initiate a response to the proxy server through the first blockchain when the first transaction result or the second transaction result is a failure. Roll the transaction request.
  • the first processing module 40 is configured to delete the second transaction data set and the user identity information of the first transaction user data set based on the rollback transaction request.
  • the first processing module 40 is configured to set each user identity information of the first data subset to a null value, and mark the transaction status of each user identity information as a rollback state.
  • the first storage module of the present application is embedded in the process of the node in the first blockchain, where the first storage module can be a leveldb database.
  • the storage program 12 for the state data of the cross-chain transaction described in this application can be divided into one or more modules, and the one or more modules are stored in the memory and controlled by the The processor executes to complete the application.
  • the one or more modules may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the stored program of the status data of the cross-chain transaction in the electronic device.
  • FIG. 7 is a schematic diagram of the program module of the storage program 12 for the status data of the cross-chain transaction in an embodiment of the electronic device of the application.
  • the storage program 12 for the status data of the cross-chain transaction is It can be divided into a second information transmission module 50, a second storage module 60, and a second processing module 70, for example:
  • the second information transmission module 50 is configured to receive a first transaction request.
  • the first transaction request is a cross-blockchain transaction operation initiated by the first transaction user from the first blockchain to the second blockchain.
  • the first transaction The user is the initiator of the first transaction request;
  • the second processing module 70 is configured to parse the first transaction request, wherein the second information transmission module 50 sends a third transaction request to the second blockchain based on the analysis result of the first transaction request, and the second information transmission module 50
  • the third transaction data set in the second blockchain is received to obtain the second transaction result and the first transaction result.
  • the third transaction data set is used to characterize the second block chain based on the third transaction request.
  • the first transaction result is the result of the first transaction request executed in the first blockchain;
  • the second storage module 60 is used to store a third transaction data set
  • the second processing module 70 is configured to store the third transaction data set in the second storage module 60;
  • the second information transmission module 50 is configured to send a second transaction transaction result to the first blockchain network and receive a second transaction request.
  • the second transaction request is a cross-region initiated by the first transaction user from the first blockchain Blockchain transaction operation, the first transaction user is the initiator of the second transaction request;
  • the second processing module 70 is configured to generate a fourth transaction data set based on the third transaction data set, and store the fourth transaction data set in the second storage module 60;
  • the second processing module 70 is configured to extract the fourth transaction data set from the second storage module 60 to the world state database of the second blockchain based on the second transaction request to update the world state of the second blockchain.
  • the second information transmission module 50 is configured to receive the second state data set and the second transaction user data set in the second blockchain.
  • the second processing module 70 is used to delete the second transaction data set from the first storage module, and to delete the user identity information of the second transaction user data set, as well as the user identity information of the third data subset.
  • the information is set to a null value, and the transaction status of each user identity information is marked as a commit status.
  • the second storage module 60 is used to store a third data subset and a fourth data subset
  • the third data subset is used to characterize the identity of the user participating in the execution of the second transaction operation Information
  • the fourth data subset is used to characterize the second transaction operation performed by the user participating in the second transaction operation.
  • the second storage module 60 is configured to set each user identity information of the third data subset to a null value, and mark the transaction status of each user identity information as a rollback state.
  • the functions or operation steps implemented by the program modules such as the first information transmission module 20, the first storage module 30, and the first processing module 40 when executed are substantially the same as those of the third, fourth, and fifth embodiments described above. No longer.
  • the technical solution of this application essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a computer-readable storage medium as described above (such as ROM/RAM, magnetic disks, optical disks) include several instructions to make a terminal device (which can be a mobile phone, computer, server, or network device, etc.) execute the methods described in the various embodiments of this application, and the computer can
  • the read storage medium can be non-volatile or volatile.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请涉及区块数据结构技术,包括一种跨链交易的状态数据的存储方法,该方法包括:通过第一区块链向代理服务器发起第一事务请求;接收代理服务器发送的第一交易数据集以获取第一交易事务结果、以及接收第二交易事务结果,并将第一交易数据集存储在第一存储模块;对第一交易事务结果和第二交易事务结果分别进行判断;当第一交易事务结果和第二交易事务结果分别为成功时,通过第一区块链向代理服务器发起第二事务请求;基于第一交易数据集生成第二交易数据集并存储在第一存储模块;基于第二事务请求,从第一存储模块提取第二交易数据集至第一区块链的世界状态数据库以更新第一区块链的世界状态。

Description

跨链交易的状态数据的存储方法、装置及存储介质
本申请要求于2019年11月21日提交中国专利局、申请号为201911153173.6,发明名称为“跨链交易的状态数据的存储方法、装置及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及区块链领域,尤其涉及一种跨链交易的状态数据的存储方法、装置及计算机可读存储介质。
背景技术
区块链,实质上是由多方参与共同维护的一个持续增长的分布式数据库,也称为分布式共享账本,其核心在于通过分布式是网络、时序不可篡改的密码学账本及分布式共识机制建立彼此之间的信任关系,通过自动化脚本组成的智能合约来编程和操作数据,最终实现由信息互联向价值互联的进化。
世界状态数据库是存储在区块链内的所有在交易中出现的键值对的最新值,调用链码执行交易可以改变状态数据,为了高效的执行链码调用,所有数据的最新值都被存放在状态数据库中。
发明人意识到,由于超级账本不支持跨链的分布式事务,因此在进行跨链操作时,会涉及到不同的节点/peer的数据的增删改查,此时,不同的节点/peer的数据的事务将无法满足分布式事务的ACID特性,从而导致不同的节点/peer在执行事务的过程中世界状态会受到污染。
发明内容
本申请提供一种跨链交易的状态数据的存储方法、装置及计算机可读存储介质,其主要目的在于可以用来解决跨链交易过程中,各区块链内执行交易事务产生的数据集会被写入状态数据库,从而对状态数据库产生污染的技术问题;可以将区块链内执行事务过程中产生的数据集进行存储,并在各区块链内事务的执行为成功时,将基于各区块链内存储的数据集更新各区块链的世界状态,从而达到使各区块链在执行事务过程中产生的数据集不会污染其世界状态。
为实现上述目的,第一方面,本申请提供一种跨链交易的状态数据的存储方法,所述存储方法包括:通过第一区块链向代理服务器发起第一事务请求,所述第一事务请求为第一交易用户从第一区块链向第二区块链发起的跨区块链事务操作,所述第一交易用户为所述第一事务请求的发起方;
接收代理服务器发送的第一交易数据集以获取第一交易事务结果、以及接收第二交易事务结果,并将所述第一交易数据集存储在第一存储模块;所述第一交易数据集用于表征代理服务器基于第一事务请求在第一区块链执行的第一交易事务操作;所述第二交易事务结果为第二区块链内执行第一事务请求的结果;
对所述第一交易事务结果和所述第二交易事务结果分别进行判断;
当所述第一交易事务结果和所述第二交易事务结果分别为成功时,通过所述第一区块链向所述代理服务器发起第二事务请求;
基于所述第一交易数据集生成第二交易数据集并存储在第一存储模块;
基于所述第二事务请求,从所述第一存储模块提取所述第二交易数据集至第一区块链 的世界状态数据库以更新第一区块链的世界状态。
第二方面,本申请另提供一种跨链交易的状态数据的存储方法,所述存储方法包括:
接收第一事务请求,所述第一事务请求为第一交易用户从第一区块链向第二区块链发起的跨区块链事务操作,所述第一交易用户为所述第一事务请求的发起方;
解析所述第一事务请求,基于第一事务请求的解析结果并向所述第二区块链发送第三事务请求,所述第三事务请求用于表征向第二区块链发起的跨区块链事务操作;
接收第二区块链中的第三交易数据集以获取第二交易事务结果并将所述第三交易数据集存储在第二存储模块;所述第三交易数据集用于表征第二区块链内基于第三事务请求在第二区块链执行的第二交易事务操作;
向所述第一区块链网络发送第二交易事务结果;
接收第二事务请求,所述第二事务请求为第一交易用户从第一区块链发起的跨区块链事务操作,所述第一交易用户为所述第二事务请求的发起方;
基于所述第三交易数据集生成第四交易数据集并存储在第二存储模块;
基于所述第二事务请求,从所述第二存储模块提取所述第四交易数据集至第二区块链的世界状态数据库以更新第二区块链的世界状态。
第三方面,本申请提供一种电子装置,所述电子装置包括存储器和处理器,所述存储器上存储有可在所述处理器上运行的跨链交易的状态数据的存储程序,所述跨链交易的状态数据的存储程序被所述处理器执行时实现如下步骤:
通过第一区块链向代理服务器发起第一事务请求,所述第一事务请求为第一交易用户从第一区块链向第二区块链发起的跨区块链事务操作,所述第一交易用户为所述第一事务请求的发起方;
接收代理服务器发送的第一交易数据集以获取第一交易事务结果、以及接收第二交易事务结果,并将所述第一交易数据集存储在第一存储模块;所述第一交易数据集用于表征代理服务器基于第一事务请求在第一区块链执行的第一交易事务操作;所述第二交易事务结果为第二区块链内基于第一事务请求执行第二交易事务操作的结果;
对所述第一交易事务结果和所述第二交易事务结果分别进行判断;
当所述第一交易事务结果和所述第二交易事务结果分别为成功时,通过所述第一区块链向所述代理服务器发起第二事务请求;
基于所述第一交易数据集生成第二交易数据集并存储在第一存储模块;
基于所述第二事务请求,从所述第一存储模块提取所述第二交易数据集至第一区块链的世界状态数据库以更新第一区块链的世界状态。
第四方面,本申请另提供一种电子装置,所述电子装置包括存储器和处理器,所述存储器上存储有可在所述处理器上运行的跨链交易的状态数据的存储程序,所述跨链交易的状态数据的存储程序被所述处理器执行时实现如下步骤:
接收第一事务请求,所述第一事务请求为第一交易用户从第一区块链向第二区块链发起的跨区块链事务操作,所述第一交易用户为所述第一事务请求的发起方;
解析所述第一事务请求,基于第一事务请求的解析结果并向所述第二区块链发送第三事务请求,所述第三事务请求用于表征向第二区块链发起的事务操作;
接收第二区块链中的第三交易数据集以获取第二交易事务结果并将所述第三交易数据集存储在第二存储模块;所述第三交易数据集用于表征第二区块链内基于第三事务请求在第二区块链执行的第二交易事务操作;
向所述第一区块链网络发送第二交易事务结果;
接收第二事务请求,所述第二事务请求为第一交易用户从第一区块链发起的跨区块链事务操作,所述第一交易用户为所述第二事务请求的发起方;
基于所述第三交易数据集生成第四交易数据集并存储在第二存储模块;
基于所述第二事务请求,从所述第二存储模块提取所述第四交易数据集至第二区块链的世界状态数据库以更新第二区块链的世界状态。
第五方面,为实现上述目的,所述计算机可读存储介质上存储有跨链交易的状态数据的存储程序,所述跨链交易的状态数据的存储程序可被一个或者多个处理器执行,以实现上述的跨链交易的状态数据的存储方法的步骤,包括:通过第一区块链向代理服务器发起第一事务请求,所述第一事务请求为第一交易用户从第一区块链向第二区块链发起的跨区块链事务操作,所述第一交易用户为所述第一事务请求的发起方;
接收代理服务器发送的第一交易数据集以获取第一交易事务结果、以及接收第二交易事务结果,并将所述第一交易数据集存储在第一存储模块;所述第一交易数据集用于表征代理服务器基于第一事务请求在第一区块链执行的第一交易事务操作;所述第二交易事务结果为第二区块链内基于第一事务请求执行第二交易事务操作的结果;
对所述第一交易事务结果和所述第二交易事务结果分别进行判断;
当所述第一交易事务结果和所述第二交易事务结果分别为成功时,通过所述第一区块链向所述代理服务器发起第二事务请求;
基于所述第一交易数据集生成第二交易数据集并存储在第一存储模块;
基于所述第二事务请求,从所述第一存储模块提取所述第二交易数据集至第一区块链的世界状态数据库以更新第一区块链的世界状态;
或者包括:接收第一事务请求,所述第一事务请求为第一交易用户从第一区块链向第二区块链发起的跨区块链事务操作,所述第一交易用户为所述第一事务请求的发起方;
解析所述第一事务请求,基于第一事务请求的解析结果并向所述第二区块链发送第三事务请求,所述第三事务请求用于表征向第二区块链发起的事务操作;
接收第二区块链中的第三交易数据集以获取第二交易事务结果并将所述第三交易数据集存储在第二存储模块;所述第三交易数据集用于表征第二区块链内基于第三事务请求在第二区块链执行的第二交易事务操作;
向所述第一区块链网络发送第二交易事务结果;
接收第二事务请求,所述第二事务请求为第一交易用户从第一区块链发起的跨区块链事务操作,所述第一交易用户为所述第二事务请求的发起方;
基于所述第三交易数据集生成第四交易数据集并存储在第二存储模块;
基于所述第二事务请求,从所述第二存储模块提取所述第四交易数据集至第二区块链的世界状态数据库以更新第二区块链的世界状态。
本申请提供的跨链交易的状态数据的存储方法、装置及计算机可读存储介质,第一区块链和第二区块链内基于第一事务请求执行相关的事务操作会对应生成第一交易数据集和第三交易数据集,通过将第一交易数据集存储在第一存储模块中、且通过将第三交易数据集存储在第二存储模块中,使得第一区块链和第二区块链内基于第一事务请求执行相关的事务操作时,第一区块链内生成的第一交易数据集不会被直接写入第一区块链的世界状态数据库,且使得第一区块链和第二区块链内基于第一事务请求执行相关的事务操作时,第二区块链内生成的第三交易数据集不会被直接写入第二区块链的世界状态数据库,从而达到在第一区块链和第二区块链组成的联盟链在执行基于第一事务请求的事务操作时,第一区块链的世界状态和第二区块链的世界状态均不会因写入数据而受到污染的目的。
附图说明
图1为本申请第一实施例提供的跨链交易的状态数据的存储方法的流程示意图;
图2为本申请第二实施例提供的跨链交易的状态数据的存储方法流程示意图;
图3为本申请第三实施例提供的跨链交易的状态数据的存储方法流程流程示意图;
图4为本申请第四实施例提供的跨链交易的状态数据的存储方法流程流程示意图;
图5为本申请第五实施例提供的电子装置的内部结构示意图;
图6为本申请第六实施例提供的电子装置中基于跨链交易的状态数据的存储程序的模块示意图;
图7为本申请第七实施例提供的电子装置中基于跨链交易的状态数据的存储程序的模块示意图。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本说明书提供的实施例中描述的“区块链”,具体可指一个通过多个peer(即,节点/参与执行事务操作的用户)通过共识机制达成的、具有分布式数据存储结构的网络系统。
事务请求,是表征第一交易用户通过第一区块链向第二区块链发起的跨区块链事务操作,在本申请中,事务请求具有两阶段,其中包括第一阶段的第一事务请求和第二阶段的第二事务请求,第一事务请求在本申请中具体为预提交请求(precommit),第二事务请求具体为提交请求(commit)。其中,事务请求基于交易请求而生成,例如,第一事务请求基于第一交易用户通过第一区块链向第二区块链发起的跨区块链交易而生成。其中,交易是指用户向区块链发布的一笔价值转移,例如,第一交易用户从第一区块链发起的一笔转账。本申请中,交易还可以为用户向区块链发布的一笔具有业务意图的业务数据,例如,运营方可以基于实际的业务需求搭建一个联盟链,依托于联盟链部署一些与价值转移无关的其它类型的在线业务(比如,租房业务、车辆调度业务、保险理赔业务、信用服务、医疗服务等),而在这类联盟链中,交易可以是第一交易用户在联盟链中发布的一笔具有业务意图的业务消息或者业务请求。
世界状态,用于表征区块链上的最新交易的状态值,且该状态值存储在世界状态数据库。其中,不同的区块链上分别有各自的世界状态及世界状态数据库。世界状态代表了所有交易状态当前的值,不同的区块链上分别有各自的状态值的最新值,即,不同的区块链上分别有各自的世界状态,各区块链的世界状态存储在相应的世界状态数据库中。世界状态数据库只是区块链交易日志中的索引视图,因此可以随时根据区块链重新生成。
第一实施例:
本申请的第一实施例提供一种跨链交易的状态数据的存储方法,其中,本申请的跨链交易的状态数据的存储方法主要用于超级账本跨链交易中。结合图1,本实施例的方法通过计算机可执行指令设定并执行。所述存储方法包括下述步骤:
步骤S110,通过第一区块链向代理服务器发起第一事务请求;
步骤S120,接收代理服务器发送的第一交易数据集以获取第一交易事务结果、以及接收第二交易事务结果,并将所述第一交易数据集存储在第一存储模块;
步骤S130,对所述第一交易事务结果和所述第二交易事务结果分别进行判断;
步骤S140,当所述第一交易事务结果和所述第二交易事务结果分别为成功时,通过所述第一区块链向所述代理服务器发起第二事务请求;
步骤S150,基于所述第一交易数据集生成第二交易数据集并存储在第一存储模块;
步骤S160,基于所述第二事务请求,从所述第一存储模块提取所述第二交易数据集至第一区块链的世界状态数据库以更新第一区块链的世界状态。
在所述通过第一区块链向代理服务器发起第一事务请求的步骤中,第一事务请求为第一交易用户从第一区块链向第二区块链发起的跨区块链事务操作,第一交易用户为第一事务请求的发起方。第二交易事务结果为第二区块链内基于第一事务请求执行第二交易事务操作的结果。
其中,本申请中提及到的代理服务器包括第一区块链内的参与执行第一事务请求的用 户(即,下述第一背书节点),以及包括第二区块链内的参与执行第一事务请求的用户(即,下述第二背书节点)。基于第一事务请求,各第一背书节点基于第一事务请求执行第一交易事务操作并生成第一交易数据集。
在步骤S120中,第一交易数据集包括第一数据子集和第二数据子集,第一数据子集用于表征参与执行所述第一交易事务操作的用户身份信息,第二数据子集用于表征参与执行所述第一交易事务操作的用户所执行的第一交易事务操作。第一交易事务操作具体可包括,基于可执行指令的设定,相关第一背书节点执行背书签名。在本实施例中,第一数据子集和第二数据子集存储在第一存储模块中,第一存储模块内嵌于第一区块链的节点的进程中。
所述接收代理服务器发送的第一交易数据集以获取第一交易事务结果、以及接收第二交易事务结果的步骤还包括下述步骤:
步骤S121,接收代理服务器发送的第一状态数据集和第一交易用户数据集,并将所述第一状态数据集和第一交易用户数据集存储在第一存储模块;
在步骤S160之后,还包括下述步骤:
步骤S170,从所述第一存储模块删除所述第二交易数据集、以及从第一存储模块删除第一交易用户数据集的用户身份信息;
步骤S180,将所述第一数据子集的各用户身份信息置为空值,并将各所述用户身份信息的事务状态标记为提交状态。
通过上述的步骤,本申请的第一实施例完成了一个完整的第一区块链的世界状态的更新。其中,在步骤S121中,将第一交易数据集存储在第一存储模块中,用于使第一区块链和第二区块链内基于第一事务请求执行相关的事务操作时,第一区块链内生成的第一交易数据集不会被直接写入第一区块链的世界状态数据库,从而达到在执行基于第一事务请求的事务操作时,第一区块链的世界状态不会受到污染的目的。
在步骤S122中,第一状态数据集用于表征在通过第一区块链向代理服务器发起第一事务请求的步骤之前第一区块链的世界状态(即,第一区块链的本次事务提交之前的世界状态),第一交易用户数据集用于表征参与执行第一交易事务操作的用户身份信息。其中,在本申请中,第一交易数据集、第一状态数据集以及第一交易用户数据集分别形成一数据集并存储在第一存储模块中。其中,第一交易用户数据集能够在第一交易事务结果或第二交易事务结果为失败时,用来查询并确认第一区块链内基于第一事务请求成功执行相关事务操作的用户身份信息(即,背书节点/peer),以便于后续的重新发起第一事务请求。
下面通过一个具体地应用对本实施例进行补充以及说明:
首先,通过SDK调用证书服务(CA)服务,进行注册和登记,以获取身份证书。其次,通过SDK创建好第一事务请求(chaincode函数和参数)。第一事务请求把带有本次交易要调用的合约标识、合约方法、参数信息、第一区块链的当前世界状态的信息、以及客户端签名等信息发送给背书节点。第一区块链的第一背书节点(即,代理服务器)以交易提案凭证为输入,基于当前世界状态来执行并生成第一交易数据集。第二区块链的第二背书节点(即,代理服务器)以交易提案凭证为输入以获取第二交易事务结果。
在接收到第一交易事务结果和第二交易事务结果后,将第一交易数据集保存在第一存储模块,基于第一交易数据集获得第一交易事务结果,并发起第二事务请求。基于第二事务请求,将第一交易事务结果(包括第一交易数据集和第一状态数据集,或包括第一交易数据集、第一状态数据集和第一交易用户数据集)打包组成一个交易并签名发给排序节点(即,代理服务器),排序节点基于第二交易请求进行共识排序,并打包成块,发送给提交节点。提交节点收到区块后,对区块中的交易结果进行校验,即对第一交易数据集进行检验。在确认校验完成后,将区块追加到区块链,从第一存储模块提取第二交易数据集存储在第一区块链的世界状态数据库,即,完成第一区块链的世界状态的更新。
结合上述的说明,可以理解的是,在本申请中,交易事务结果为成功时,可体现为:接收到足够多的背书节点基于第一事务请求执行的事务结果(背书策略),即,表示该区块链内的事务执行(交易)成功。交易事务结果为失败时,可体现为:没有接受到足够多的背书节点基于第一事务请求执行的事务结果(背书策略),即,第一区块链内的事务执行失败(交易失败)。其中,可以理解的是,交易事务结果为失败的区块链的事务(即交易)被放弃,待稍后再试。为了使交易事务结果为成功的区块链内在执行事务过程中生成的数据不会污染该区块链的世界状态,因此将该数据集(即上述的第一交易数据集和第二交易数据集)存储在第一存储模块,并在第二阶段的事务请求中执行回滚进行相关数据的删除(后文详述)。
结合上述的说明,在本申请中,第二交易数据集包括正确背书(即有效交易)的第一背书节点的用户信息以及该第一背书节点执行的事务操作。可理解的是,在本申请中,第一背书节点可以为多个节点。
其中,在本申请中,代理服务器包括有分别在第一区块链网络和在第二区块链网络上的节点、背书节点、提交节点以及排序节点。例如,在第一实施例中,在执行第一事务请求阶段,在第一区块链内,代理服务器为第一区块链内的第一背书节点;在执行第二事务请求阶段,在第一区块链内,代理服务器为第一区块链内的第一排序节点和第一提交节点。
上述实施例中的方法由通常由计算机可执行指令(即,程序)设定并执行,可以理解的是,上述的跨链交易的状态数据的存储方法的执行指令既可以部署在区块链节点设备内部(即,第一交易用户的客户端),监测上述方法的各步骤的执行情况并根据可执行指令执行相关步骤。也可被部署在上述区块链内,以智能合约的形式被调用执行:该智能合约内可声明有适用于各区块链(包括第一区块链和第二区块链)的部分或全部节点的事务执行方法(或逻辑)。
第二实施例:
上述的第一实施例提供了在跨链交易的状态数据的存储方法中,第一区块链和第二区块链内基于第一事务请求执行相关事务操作的第一交易事务结果和第二交易事务结果为成功的情况。不同于第一实施例,在第二实施例中,本申请提供的在跨链交易的状态数据的存储方法中,第一区块链和第二区块链内基于第一事务请求执行相关事务操作的第一交易事务结果和第二交易事务的结果有失败的情况。
本申请的第二实施例提供一种跨链交易的状态数据的存储方法,其中,本第二实施例的跨链交易的状态数据的存储方法主要用于超级账本跨链交易中。结合图2,本实施例的方法通过计算机可执行指令设定并执行。所述存储方法包括下述步骤:
步骤S210,通过第一区块链向代理服务器发起第一事务请求;
步骤S220,接收代理服务器发送的第一交易数据集以获取第一交易事务结果、以及接收第二交易事务结果,并将所述第一交易数据集存储在第一存储模块;接收代理服务器发送的第一状态数据集和第一交易用户数据集,并将所述第一状态数据集和第一交易用户数据集存储在第一存储模块;
步骤S230,对第一交易事务结果和所述第二交易事务结果分别进行判断;
步骤S240,当第一交易事务结果或第二交易事务结果为失败时,通过所述第一区块链向所述代理服务器发起回滚事务请求;
步骤S250,基于第一交易数据集生成第二交易数据集并存储在第一存储模块;
步骤S260,基于回滚事务请求,删除第二交易数据集、以及删除第一交易用户数据集的用户身份信息。
在所述通过第一区块链向代理服务器发起第一事务请求的步骤中,第一事务请求为第一交易用户从第一区块链向第二区块链发起的跨区块链事务操作,第一交易用户为第一事 务请求的发起方。
其中,代理服务器包括第一区块链内的参与执行第一事务请求的用户(即,下述第一背书节点),以及包括第二区块链内的参与执行第一事务请求的用户(即,下述第二背书节点)。基于第一事务请求,各第一背书节点基于第一事务请求执行第一交易事务操作并生成第一交易数据集。
在步骤S220中,第一交易数据集包括第一数据子集和第二数据子集,第一数据子集用于表征参与执行所述第一交易事务操作的用户身份信息,第二数据子集用于表征参与执行所述第一交易事务操作的用户所执行的第一交易事务操作。第一交易事务操作具体可包括,基于可执行指令的设定,相关第一背书节点执行背书签名。在本实施例中,第一数据子集和第二数据子集存储在第一存储模块中,第一存储模块内嵌于第一区块链的节点的进程中。
所述接收代理服务器发送的第一交易数据集以获取第一交易事务结果、以及接收第二交易事务结果的步骤还包括下述步骤:
步骤S221,接收代理服务器发送的第一状态数据集和第一交易用户数据集,并将所述第一状态数据集和第一交易用户数据集存储在第一存储模块。
在步骤S270之后,还包括步骤S280:将第一数据子集的各用户身份信息置为空值(即,null),并将各所述用户身份信息的事务状态标记为回滚状态(即,rollback)。
在步骤S220中,将第一交易数据集存储在第一存储模块中,用于使第一区块链和第二区块链内基于第一事务请求执行相关的事务操作时,第一区块链内生成的第一交易数据集不会被直接写入第一区块链的世界状态数据库,从而达到在执行基于第一事务请求的事务操作时,第一区块链的世界状态不会受到污染的目的。
步骤S221中,第一状态数据集用于表征在通过第一区块链向代理服务器发起第一事务请求的步骤之前第一区块链的世界状态(即,第一区块链的本次事务提交之前的世界状态),第一交易用户数据集用于表征参与执行第一交易事务操作的用户身份信息。其中,在本申请中,第一交易数据集、第一状态数据集以及第一交易用户数据集分别形成一数据集并存储在第一存储模块中。其中,第一交易用户数据集能够在第一交易事务结果或第二交易事务结果为失败时,用来查询并确认第一区块链内基于第一事务请求成功执行相关事务操作的用户身份信息(即,背书节点/peer),以便于后续的重新发起第一事务请求。
步骤S240,当第一交易事务结果或第二交易事务结果为失败时,通过所述第一区块链向所述代理服务器发起回滚事务请求,包括有第一交易事务结果为失败和第二交易事务结果为失败的两种情况。在第一交易事务结果为失败、且第二交易事务结果为成功的场景中(下述场景A),此时会接收不到第一交易数据集,在此场景下将第一交易数据集理解为空集,即,第一交易事务结果会被判断为失败,此时,代理服务器发起回滚请求,第二区块链内执行回滚动作。在第一交易事务结果为成功、且第二交易事务结果为失败的场景中(下述场景B),代理服务器发起回滚请求,在第一区块链内执行回滚动作,并执行步骤S250~步骤S280,完成本次事务,以便于重新提出事务请求。
步骤S260~S280中,基于第一交易事务结果或所述第二交易事务结果为失败,在第一区块链内执行回滚动作,相应的删除第一存储模块中的第二交易数据集,这样,第二交易数据集不会被写入第一区块链的世界状态数据库,从而达到使第一区块链的世界状态不会受到污染的目的。例如,在第二区块链内的第二交易事务结果为失败,在第一区块链内的第一交易事务结果为成功时,发起回滚请求,并执行回滚动作,使第一区块链内回复到未发送第一事务请求时的状态,且,相应地,从第一存储模块内删除第二交易数据集和第一交易用户数据集的用户身份信息,将第一数据子集的各用户身份信息置为空值,并将各所述用户身份信息的事务状态标记为回滚状态,以便于后续用来查询并确认第一区块链内基于第一事务请求成功执行相关事务操作的用户身份信息。
可以理解的是,通过上述的步骤S210~280,在第一区块链内和第二区块链内取消本次事务(即,取消第一事务请求和第二事务请求),以待重新提出事务请求。
第二实施例中未提及的其它特性可参考、替换或结合使用第一实施例的相关描述和相关步骤,且可采用的变形实施方式及其有益效果亦可参考、替换或结合使用第一实施例的相关描述和相关步骤,故不再赘述。
第三实施例:
本申请的第三实施例提供一种跨链交易的状态数据的存储方法,其中,本第三实施例的跨链交易的状态数据的存储方法主要用于超级账本跨链交易中。本实施例的方法通过计算机可执行指令设定并执行。
结合图3,第三实施例提供的跨链交易的状态数据的存储方法应用于所述跨区块链网络的交易对应的代理服务器中,在不同区块链网络的用户之间进行交易的过程中,本申请实施例提供的跨链交易的状态数据的存储的过程包括以下步骤:
步骤S310,接收第一事务请求;解析第一事务请求,基于第一事务请求的解析结果并向第二区块链发送第三事务请求
步骤S320,接收第二区块链中的第三交易数据集以获取第二交易事务结果并将第三交易数据集存储在第二存储模块;
步骤S330,向第一区块链网络发送第二交易事务结果;
步骤S340,接收第二事务请求;
步骤S350,基于第三交易数据集生成第四交易数据集并存储在第二存储模块;
步骤S360,基于第二事务请求,从第二存储模块提取第四交易数据集至第二区块链的世界状态数据库以更新第二区块链的世界状态。
本申请的一实施例中,所述接收第二区块链中的第三交易数据集以获取第二交易事务结果并将第三交易数据集存储在第二存储模块的步骤还包括:
步骤S321,接收第二区块链内的第二状态数据集和第二交易用户数据集,并将第二状态数据集和第二交易用户数据集存储在第二存储模块。
在步骤S320中,第三交易数据集包括第三数据子集和第四数据子集,第三数据子集用于表征参与执行所述第二交易事务操作的用户身份信息,第四数据子集用于表征参与执行所述第二交易事务操作的用户所执行的第二交易事务操作。第二交易事务操作具体可包括,基于可执行指令的设定,相关第二背书节点执行背书签名。在本实施例中,第三数据子集和第四数据子集存储在第二存储模块中,第二存储模块内嵌于第二区块链的节点的进程中。
本申请的一实施例中,所述基于第二事务请求,从第二存储模块提取第四交易数据集至第二区块链的世界状态数据库以更新第二区块链的世界状态的步骤之后,包括:
步骤S370,从第一存储模块删除第二交易数据集、以及删除第二交易用户数据集的用户身份信息;
步骤S380,将所述第一数据子集的各用户身份信息置为空值,并将各所述用户身份信息的事务状态标记为提交状态。
在本实施例中,步骤S310中的第一事务请求为第一交易用户从第一区块链向第二区块链发起的跨区块链事务操作,所述第一交易用户为所述第一事务请求的发起方。步骤S310中的第三事务请求用于表征基于第一事务请求向第二区块链发起的事务操作。步骤S320中的第三交易数据集用于表征第二区块链内基于第三事务请求在第二区块链执行的第二交易事务操作。步骤S340中的第二事务请求为第一区块链在接收第二区块链发送的第二交易事务结果后,对第二交易事务结果和对第一区块链内的第一交易事务结果进行判断,在判断第一交易事务结果和第二交易事务结果都为成功后,通过第一区块链发起的第二事务请求。其中,第一交易事务结果为第一区块链内基于第一事务请求执行第一交易事 务操作的结果。
步骤S321中的第二状态数据集用于表征在所述第二区块链内执行第二交易事务操作的步骤之前所述第二区块链的世界状态,第二交易用户数据集用于表征参与执行所述第二交易事务操作的用户身份信息。本申请中,第三交易数据集、第二状态数据集以及第二交易用户数据集分别形成一数据集并存储在第一存储模块中。其中,第一交易用户数据集能够在第一交易事务结果或第二交易事务结果为失败时,用来查询并确认第一区块链内基于第一事务请求成功执行相关事务操作的用户身份信息(即,背书节点/peer),以便于后续的重新发起第一事务请求。
步骤S310中,所述解析第一事务请求,基于第一事务请求的解析结果并向第二区块链发送第三事务请求。由于第二区块链在注册过程已经在代理服务器中保存有区块链的平台类型、第二区块链的唯一标识和第二区块链中钱包的关联信息,因此,通过解析所述第一事务请求能够获知所述跨区块链网络交易的交易接收方(第二区块链中的第二交易用户),并确定所述第二交易用户所处区块链的信息存储地址,以确定第三事务请求的接收地址。
可以理解的是,本申请的一实施例中,所述解析第一事务请求,基于第一事务请求的解析结果并向第二区块链发送第三事务请求包括有步骤:根据所述第二区块链的信息,查询与所述第二区块链对应的注册信息,基于第二区块链对应的注册信息,确定所述第二区块链网络的信息存储地址,向第二区块链网络的信息存储地址发送第三事务请求。
其中,在本申请中,代理服务器包括有分别在第一区块链网络和在第二区块链网络上的节点、背书节点、提交节点以及排序节点。例如,在第三实施例中,在执行第一事务请求阶段,在第二区块链内,代理服务器为第二区块链内的第二背书节点;在执行第二事务请求阶段,在第二区块链内,代理服务器为第二区块链内的第二排序节点和第二提交节点。
下面通过一个具体地应用对本实施例进行补充以及说明:
首先,通过SDK调用证书服务(CA)服务,进行注册和登记,以获取身份证书。其次,通过SDK创建好第一事务请求(chaincode函数和参数)。在接收到第一事务请求并将它解析成第三事务请求后,第三事务请求把带有本次交易要调用的合约标识、合约方法、第二区块链的当前世界状态的信息、参数信息、以及客户端签名等信息发送给第二背书节点。第二区块链的第二背书节点(即,代理服务器)以交易提案凭证为输入,基于当前世界状态来执行并生成第三交易数据集,并将基于第三交易数据集获得第二交易事务结果。第二区块链的第二背书节点(即,代理服务器)以交易提案凭证为输入以获取第二交易事务结果。
在接收到第三交易数据集后,将第三交易数据集保存在第二存储模块,基于第三交易数据集获得第二交易事务结果,并将第二交易事务结果发给第一区块链。在接收第二事务请求后,基于将第二交易事务结果(包括第三交易数据集和第二状态数据集,或包括第三交易数据集、第一状态数据集和第三交易用户数据集)打包组成一个交易并签名发给第二排序节点(即,代理服务器),第二排序节点基于第二交易请求进行共识排序,并打包成块,发送给第二提交节点。第二提交节点收到区块后,对区块中的交易结果进行校验,即对第三交易数据集进行检验。在确认校验完成后,将区块追加到区块链,从第二存储模块提取第二交易数据集存储在第二区块链的世界状态数据库,即,完成第二区块链的世界状态的更新。
其中,本实施例中,将第三交易数据集存储在第二存储模块中,用于使第一区块链和第二区块链内基于第一事务请求执行相关的事务操作时,第二区块链内生成的第三交易数据集不会被直接写入第二区块链的世界状态数据库,从而达到在执行基于第一事务请求的事务操作时,第二区块链的世界状态不会受到污染的目的。
第三实施例中未提及的其它特性可参考、替换或结合使用第一实施例的相关描述和相关步骤,且可采用的变形实施方式及其有益效果亦可参考、替换或结合使用第一实施例的相关描述和相关步骤,故不再赘述。
第四实施例:
上述的第三实施例提供了在跨链交易的状态数据的存储方法中,第一区块链和第二区块链内基于第一事务请求执行相关事务操作的第一交易事务结果和第二交易事务结果为成功的情况。不同于第三实施例,在第四实施例中,本申请提供的在跨链交易的状态数据的存储方法中,第一区块链和第二区块链内基于第一事务请求执行相关事务操作的第一交易事务结果和第二交易事务的结果有失败的情况。
本申请的第四实施例提供一种跨链交易的状态数据的存储方法,其中,本第四实施例的跨链交易的状态数据的存储方法主要用于超级账本跨链交易中。本实施例的方法通过计算机可执行指令设定并执行。结合图4,所述存储方法包括下述步骤:
步骤S410,接收第一事务请求;解析第一事务请求,基于第一事务请求的解析结果并向第二区块链发送第三事务请求;
步骤S420,接收第二区块链中的第三交易数据集以获取第二交易事务结果并将第三交易数据集存储在第二存储模块;接收第二区块链内的第二状态数据集和第二交易用户数据集,并将第二状态数据集和第二交易用户数据集存储在第二存储模块;
步骤S430,向第一区块链网络发送第二交易事务结果;
步骤S440,接收回滚事务请求;
步骤S450,基于第三交易数据集生成第四交易数据集并存储在第二存储模块;
步骤S460,基于回滚事务请求,删除所述第四交易数据集、以及删除所述第二交易用户数据集的用户身份信息。
在步骤S420中,第三交易数据集包括第三数据子集和第四数据子集,第三数据子集用于表征参与执行所述第二交易事务操作的用户身份信息,第四数据子集用于表征参与执行所述第二交易事务操作的用户所执行的第二交易事务操作。第二交易事务操作具体可包括,基于可执行指令的设定,相关第二背书节点执行背书签名。在本实施例中,第三数据子集和第四数据子集存储在第二存储模块中,第二存储模块内嵌于第二区块链的节点的进程中。
在所述接收回滚事务请求的步骤之后还包括:
步骤S470,将第三数据子集的各用户身份信息置为空值(即,null),并将各所述用户身份信息的事务状态标记为回滚状态(即,rollback)。
在步骤S420中,将第三交易数据集存储在第二存储模块中,用于使第一区块链和第二区块链内基于第一事务请求执行相关的事务操作时,第二区块链内生成的第二交易数据集不会被直接写入第二区块链的世界状态数据库,从而达到在执行基于第一事务请求的事务操作时,第二区块链的世界状态不会受到污染的目的。
步骤S450~S470中,基于第一交易事务结果或所述第二交易事务结果为失败,在第二区块链内执行回滚动作,相应的删除第二存储模块中的第四交易数据集,这样,第四交易数据集不会被写入第二区块链的世界状态数据库,从而达到使第二区块链的世界状态不会受到污染的目的。例如,在第一区块链内的第一交易事务结果为失败,在第二区块链内的第二交易事务结果为成功时,发起回滚请求,并执行回滚动作,使第二区块链内回复到接收第一事务请求时的状态,且,相应地,从第二存储模块内删除第四交易数据集和第二交易用户数据集的用户身份信息,将第三数据子集的各用户身份信息置为空值,并将各所述用户身份信息的事务状态标记为回滚状态,以便于后续用来查询并确认第二区块链内基于第一事务请求成功执行相关事务操作的用户身份信息,同时使得第四交易数据集不会被直接写入第二区块链的世界状态数据库,从而达到使第二区块链的世界状态不会受到污染的 目的。
可以理解的是,通过上述的步骤S410~470,在第一区块链内和第二区块链内取消本次事务(即,取消第一事务请求和第二事务请求),以待重新提出事务请求。
第四实施例中未提及的其它特性可参考、替换或结合使用第一至第三实施例中任一实施例的相关描述和相关步骤,且可采用的变形实施方式及其有益效果亦可参考、替换或结合使用第一至第三实施例中任一实施例的相关描述和相关步骤,故不再赘述。
上述的第一实施例至第四实施例时提供了本申请的方法项,下面通过一具体应用场景对其概括描述:
从第一区块链的第一交易用户的账户向第二区块链的第二交易用户的账户进行转账(第一事务请求),第一交易用户的账户和第二交易用户的账户原始金额是100元。第一阶段,发起第一交易用户向第二交易用户转账10元,在执行第一交易事务操作过程中,把第一区块链的第一交易用户=90,和第二区块链的第二交易用户=110存储分别在第一存储模块和第二存储模块中。如果第一交易用户=90和第二交易用户=110都成功写入两个链对应的两阶段数据中,那么第二阶段发起提交请求(第二事务请求),把第一交易用户=90和第二交易用户=110分别写入对应的链世界状态数据库中。假设,第二交易用户=110没有成功存储在第二区块链的第二存储模块中,第一交易用户=90则成功存储在第一区块链的第一存储模块中,此时,则第二阶段需要回滚(即回滚事务请求),把第一交易用户=90从相应的第一区块链的第一存储模块中删除。这样第一区块链的世界状态数据库不会受到污染。
第五实施例:
本申请的第五实施例提供一种电子装置1,电子装置1可以是电脑、智能终端或服务器。所述电子装置1至少包括存储器11、处理器13,通信总线15,以及网络接口17。
其中,存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、磁性存储器、磁盘、光盘等。存储器11在一些实施例中可以是电子装置的内部存储单元,例如所述电子装置的硬盘。存储器11在另一些实施例中也可以是电子装置的外部存储设备,例如电子装置上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,存储器11还可以既包括电子装置的内部存储单元也包括外部存储设备。存储器11不仅可以用于存储安装于电子装置1的应用软件及各类数据,例如跨链交易的状态数据的存储程序12的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。
处理器13在一些实施例中可以是一中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器或其他数据处理芯片,用于运行存储器11中存储的程序代码或处理数据。
通信总线15用于实现这些组件之间的连接通信。
网络接口17可选的可以包括标准的有线接口、无线接口(如WI-FI接口),通常用于在电子装置1与其他电子设备之间建立通信连接。
可选地,电子装置1还可以包括用户接口,用户接口可以包括显示器(Display)、输入单元比如键盘(Keyboard),可选的用户接口还可以包括标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在电子装置中处理的信息以及用于显示可视化的用户界面。
图5仅示出了具有组件11~17的电子装置1,本领域技术人员可以理解的是,图5示出的结构并不构成对电子装置的限定,可以包括比图示更少或者更多的部件,或者组合某 些部件,或者不同的部件布置。
在图5所示的电子装置1的实施例中,存储器11中存储有跨链交易的状态数据的存储程序12;处理器13执行存储器11中存储的跨链交易的状态数据的存储程序12时实现如下步骤:
步骤S110,通过第一区块链向代理服务器发起第一事务请求;
步骤S120,接收代理服务器发送的第一交易数据集以获取第一交易事务结果、以及接收第二交易事务结果,并将所述第一交易数据集存储在第一存储模块;
步骤S130,对所述第一交易事务结果和所述第二交易事务结果分别进行判断;
步骤S140,当所述第一交易事务结果和所述第二交易事务结果分别为成功时,通过所述第一区块链向所述代理服务器发起第二事务请求;
步骤S150,基于所述第一交易数据集生成第二交易数据集并存储在第一存储模块;
步骤S160,基于所述第二事务请求,从所述第一存储模块提取所述第二交易数据集至第一区块链的世界状态数据库以更新第一区块链的世界状态。
在所述通过第一区块链向代理服务器发起第一事务请求的步骤中,第一事务请求为第一交易用户从第一区块链向第二区块链发起的跨区块链事务操作,第一交易用户为第一事务请求的发起方。第二交易事务结果为第二区块链内基于第一事务请求执行第二交易事务操作的结果。
其中,本申请中提及到的代理服务器包括第一区块链内的参与执行第一事务请求的用户(即,下述第一背书节点),以及包括第二区块链内的参与执行第一事务请求的用户(即,下述第二背书节点)。基于第一事务请求,各第一背书节点基于第一事务请求执行第一交易事务操作并生成第一交易数据集。
在步骤S120中,第一交易数据集包括第一数据子集和第二数据子集,第一数据子集用于表征参与执行所述第一交易事务操作的用户身份信息,第二数据子集用于表征参与执行所述第一交易事务操作的用户所执行的第一交易事务操作。第一交易事务操作具体可包括,基于可执行指令的设定,相关第一背书节点执行背书签名。在本实施例中,第一数据子集和第二数据子集存储在第一存储模块中,第一存储模块内嵌于第一区块链的节点的进程中。
所述接收代理服务器发送的第一交易数据集以获取第一交易事务结果、以及接收第二交易事务结果的步骤还包括下述步骤:
步骤S121,接收代理服务器发送的第一状态数据集和第一交易用户数据集,并将所述第一状态数据集和第一交易用户数据集存储在第一存储模块;
在步骤S160之后,还包括下述步骤:
步骤S170,从所述第一存储模块删除所述第二交易数据集、以及从第一存储模块删除第一交易用户数据集的用户身份信息;
步骤S180,将所述第一数据子集的各用户身份信息置为空值,并将各所述用户身份信息的事务状态标记为提交状态。
通过上述的步骤,本申请的第一实施例完成了一个完整的第一区块链的世界状态的更新。其中,在步骤S121中,将第一交易数据集存储在第一存储模块中,用于使第一区块链和第二区块链内基于第一事务请求执行相关的事务操作时,第一区块链内生成的第一交易数据集不会被直接写入第一区块链的世界状态数据库,从而达到在执行基于第一事务请求的事务操作时,第一区块链的世界状态不会受到污染的目的。
在步骤S122中,第一状态数据集用于表征在通过第一区块链向代理服务器发起第一事务请求的步骤之前第一区块链的世界状态(即,第一区块链的本次事务提交之前的世界状态),第一交易用户数据集用于表征参与执行第一交易事务操作的用户身份信息。其中,在本申请中,第一交易数据集、第一状态数据集以及第一交易用户数据集分别形成一数据 集并存储在第一存储模块中。其中,第一交易用户数据集能够在第一交易事务结果或第二交易事务结果为失败时,用来查询并确认第一区块链内基于第一事务请求成功执行相关事务操作的用户身份信息(即,背书节点/peer),以便于后续的重新发起第一事务请求。
在本申请中,存储器11中存储有跨链交易的状态数据的存储程序12;处理器13执行存储器11中存储的跨链交易的状态数据的存储程序12时还可以实现如下步骤:
步骤S210,通过第一区块链向代理服务器发起第一事务请求;
步骤S220,接收代理服务器发送的第一交易数据集以获取第一交易事务结果、以及接收第二交易事务结果,并将所述第一交易数据集存储在第一存储模块;接收代理服务器发送的第一状态数据集和第一交易用户数据集,并将所述第一状态数据集和第一交易用户数据集存储在第一存储模块;
步骤S230,对第一交易事务结果和所述第二交易事务结果分别进行判断;
步骤S240,当第一交易事务结果或第二交易事务结果为失败时,通过所述第一区块链向所述代理服务器发起回滚事务请求;
步骤S250,基于第一交易数据集生成第二交易数据集并存储在第一存储模块;
步骤S260,基于回滚事务请求,删除第二交易数据集、以及删除第一交易用户数据集的用户身份信息。
所述接收代理服务器发送的第一交易数据集以获取第一交易事务结果、以及接收第二交易事务结果的步骤还包括下述步骤:
步骤S221,接收代理服务器发送的第一状态数据集和第一交易用户数据集,并将所述第一状态数据集和第一交易用户数据集存储在第一存储模块。
在步骤S270之后,还包括步骤S280:将第一数据子集的各用户身份信息置为空值,并将各所述用户身份信息的事务状态标记为回滚状态。
在本申请中,存储器11中存储有跨链交易的状态数据的存储程序12;处理器13执行存储器11中存储的跨链交易的状态数据的存储程序12时还可以实现如下步骤:
步骤S310,接收第一事务请求;解析第一事务请求,基于第一事务请求的解析结果并向第二区块链发送第三事务请求
步骤S320,接收第二区块链中的第三交易数据集以获取第二交易事务结果并将第三交易数据集存储在第二存储模块;
步骤S330,向第一区块链网络发送第二交易事务结果;
步骤S340,接收第二事务请求;
步骤S350,基于第三交易数据集生成第四交易数据集并存储在第二存储模块;
步骤S360,基于第二事务请求,从第二存储模块提取第四交易数据集至第二区块链的世界状态数据库以更新第二区块链的世界状态。
步骤S370,从第一存储模块删除第二交易数据集、以及删除第二交易用户数据集的用户身份信息;
步骤S380,将所述第一数据子集的各用户身份信息置为空值,并将各所述用户身份信息的事务状态标记为提交状态。
本申请的一实施例中,所述接收第二区块链中的第三交易数据集以获取第二交易事务结果并将第三交易数据集存储在第二存储模块的步骤还包括:
步骤S321,接收第二区块链内的第二状态数据集和第二交易用户数据集,并将第二状态数据集和第二交易用户数据集存储在第二存储模块。
在本申请的一实施例中,存储器11中存储有跨链交易的状态数据的存储程序12;处理器13执行存储器11中存储的跨链交易的状态数据的存储程序12时还可以实现如下步骤:
步骤S410,接收第一事务请求;解析第一事务请求,基于第一事务请求的解析结果并 向第二区块链发送第三事务请求;
步骤S420,接收第二区块链中的第三交易数据集以获取第二交易事务结果并将第三交易数据集存储在第二存储模块;接收第二区块链内的第二状态数据集和第二交易用户数据集,并将第二状态数据集和第二交易用户数据集存储在第二存储模块;
步骤S430,向第一区块链网络发送第二交易事务结果;
步骤S440,接收回滚事务请求;
步骤S450,基于第三交易数据集生成第四交易数据集并存储在第二存储模块;
步骤S460,基于回滚事务请求,删除所述第四交易数据集、以及删除所述第二交易用户数据集的用户身份信息。
步骤S470,将第三数据子集的各用户身份信息置为空值,并将各所述用户身份信息的事务状态标记为回滚状态。
第五实施例中未提及的其它特性可参考、替换或结合使用第一至第四实施例中任一实施例的相关的述描述和相关步骤,且可采用的变形实施方式及其有益效果亦可参考、替换或结合使用第一至第四实施例中任一实施例的相关描述和相关步骤,故不再赘述。
为实现上述目的,本申请还提供一种计算机可读存储介质,计算机可读存储介质上存储有跨链交易的状态数据的存储程序,跨链交易的状态数据的存储程序可被一个或者多个处理器执行,以实现上述的跨链交易的状态数据的存储方法的步骤、以及上述的电子装置1实现的步骤。可以理解的是,上述的跨链交易的状态数据的存储程序既可以部署在区块链节点设备内部(即,第一交易用户的客户端),监测上述方法的各步骤的执行情况并根据跨链交易的状态数据的存储程序执行相关步骤。也可被部署在上述区块链内,以智能合约的形式被调用执行:该智能合约内可声明有适用于各区块链(包括第一区块链和第二区块链)的部分或全部节点的事务执行方法(或逻辑)。
本申请计算机可读存储介质具体实施方式与上述电子装置和方法各实施例基本相同,在此不作累述。
第六实施例:
在第六实施例中,本申请所述的跨链交易的状态数据的存储程序12可以被分割成一个或多个模块,所述一个或者多个模块被存储在所述存储器中,并由所述处理器执行,以完成本申请。所述一个或多个模块可以是能够完成特定功能的一系列计算机程序指令段,用于描述跨链交易的状态数据的存储程序在电子装置中的执行过程。
例如,参照图6所示,图6为本申请电子装置一实施例中的跨链交易的状态数据的存储程序12的程序模块示意图,该实施例中,跨链交易的状态数据的存储程序12可以被分割为第一信息传输模块20、第一存储模块30、第一处理模块40,示例性地:
所述第一信息传输模块20,用于通过第一区块链向代理服务器发起第一事务请求,且用于接收第一交易数据集以获取第一交易事务结果和接收第二交易事务结果;其中,第一事务请求为第一交易用户从第一区块链向第二区块链发起的跨区块链事务操作,第一交易用户为第一事务请求的发起方;第一交易数据集用于表征代理服务器基于第一事务请求在第一区块链执行的第一交易事务操作;第二交易事务结果为第二区块链内执行第一事务请求的结果;
所述第一存储模块30,用于存储第一交易数据集;
所述第一处理模块40,用于将第一交易数据集存储在第一存储模块;
所述第一处理模块40,用于对第一交易事务结果和第二交易事务结果分别进行判断,且当第一交易事务结果和第二交易事务结果分别为成功时,通过第一区块链向代理服务器发起第二事务请求、且基于第一交易数据集生成第二交易数据集,并将第二交易数据集存储在第一存储模块;
所述第一处理模块40,用于基于第二事务请求,从第一存储模块提取第二交易数据集 至第一区块链的世界状态数据库以更新第一区块链的世界状态。
在本申请的一实施例中,所述第一信息传输模块20,用于接收代理服务器发送的第一状态数据集和第一交易用户数据集。
所述第一处理模块40,用于将第一状态数据集和第一交易用户数据集存储在第一存储模块。
所述第一处理模块40,用于从第一存储模块删除第一交易用户数据集的用户身份信息,将第一数据子集的各用户身份信息置为空值,并将各所述用户身份信息的事务状态标记为提交状态。
在本申请的一实施例中,所述第一处理模块40,用于当第一交易事务结果或第二交易事务结果为失败时,通过所述第一区块链向所述代理服务器发起回滚事务请求。
所述第一处理模块40,用于基于回滚事务请求,删除第二交易数据集、以及删除第一交易用户数据集的用户身份信息。
所述第一处理模块40,用于将第一数据子集的各用户身份信息置为空值,并将各所述用户身份信息的事务状态标记为回滚状态。
本申请的第一存储模块,内嵌于第一区块链内的节点的进程中,其中,第一存储模块能够为leveldb数据库。
所述第一信息传输模块20、第一存储模块30、第一处理模块40等程序模块被执行时所实现的功能或操作步骤与上述第一、第二和第五实施例大体相同,在此不再赘述。
第七实施例:
在第七实施例中,本申请所述的跨链交易的状态数据的存储程序12可以被分割成一个或多个模块,所述一个或者多个模块被存储在所述存储器中,并由所述处理器执行,以完成本申请。所述一个或多个模块可以是能够完成特定功能的一系列计算机程序指令段,用于描述跨链交易的状态数据的存储程序在电子装置中的执行过程。
例如,参照图7所示,图7为本申请电子装置一实施例中的跨链交易的状态数据的存储程序12的程序模块示意图,该实施例中,跨链交易的状态数据的存储程序12可以被分割为第二信息传输模块50、第二存储模块60、第二处理模块70,示例性地:
所述第二信息传输模块50,用于接收第一事务请求,第一事务请求为第一交易用户从第一区块链向第二区块链发起的跨区块链事务操作,第一交易用户为第一事务请求的发起方;
所述第二处理模块70,用于解析第一事务请求,其中,第二信息传输模块50基于第一事务请求的解析结果并向第二区块链发送第三事务请求,第二信息传输模块50接收第二区块链中的第三交易数据集以获取第二交易事务结果和第一交易事务结果,第三交易数据集用于表征第二区块链内基于第三事务请求在第二区块链执行的第二交易事务操作,第一交易事务结果为第一区块链内执行第一事务请求的结果;
所述第二存储模块60,用于存储第三交易数据集;
所述第二处理模块70,用于将第三交易数据集存储在第二存储模块60;
所述第二信息传输模块50,用于向第一区块链网络发送第二交易事务结果和接收第二事务请求,第二事务请求为第一交易用户从第一区块链发起的跨区块链事务操作,第一交易用户为第二事务请求的发起方;
所述第二处理模块70,用于基于第三交易数据集生成第四交易数据集,并将第四交易数据集存储在第二存储模块60;
所述第二处理模块70,用于基于第二事务请求,从第二存储模块60提取第四交易数据集至第二区块链的世界状态数据库以更新第二区块链的世界状态。
所述第二信息传输模块50,用于接收第二区块链内的第二状态数据集和第二交易用户数据集。
所述第二处理模块70,用于从第一存储模块删除第二交易数据集、以及删除第二交易用户数据集的用户身份信息,以及用于将所述第三数据子集的各用户身份信息置为空值,并将各所述用户身份信息的事务状态标记为提交状态。
本申请的一实施中,所述第二存储模块60,用于存储第三数据子集和第四数据子集,第三数据子集用于表征参与执行所述第二交易事务操作的用户身份信息,第四数据子集用于表征参与执行所述第二交易事务操作的用户所执行的第二交易事务操作。
所述第二存储模块60,用于将第三数据子集的各用户身份信息置为空值,并将各所述用户身份信息的事务状态标记为回滚状态。
所述第一信息传输模块20、第一存储模块30、第一处理模块40等程序模块被执行时所实现的功能或操作步骤与上述第三、第四和第五实施例大体相同,在此不再赘述。
需要说明的是,上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。并且本文中的术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、装置、物品或者方法中还存在另外的相同要素。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个计算机可读存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法,所述计算机可读存储介质可以是非易失性,也可以是易失性。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种跨链交易的状态数据的存储方法,其中,包括:
    通过第一区块链向代理服务器发起第一事务请求,所述第一事务请求为第一交易用户从第一区块链向第二区块链发起的跨区块链事务操作,所述第一交易用户为所述第一事务请求的发起方;
    接收代理服务器发送的第一交易数据集以获取第一交易事务结果、以及接收第二交易事务结果,并将所述第一交易数据集存储在第一存储模块;所述第一交易数据集用于表征代理服务器基于第一事务请求在第一区块链执行的第一交易事务操作;所述第二交易事务结果为第二区块链内基于第一事务请求执行第二交易事务操作的结果;
    对所述第一交易事务结果和所述第二交易事务结果分别进行判断;
    当所述第一交易事务结果和所述第二交易事务结果分别为成功时,通过所述第一区块链向所述代理服务器发起第二事务请求;
    基于所述第一交易数据集生成第二交易数据集并存储在第一存储模块;
    基于所述第二事务请求,从所述第一存储模块提取所述第二交易数据集至第一区块链的世界状态数据库以更新第一区块链的世界状态。
  2. 如权利要求1所述的跨链交易的状态数据的存储方法,其中,所述接收代理服务器发送的第一交易数据集以获取第一交易事务结果、以及接收第二交易事务结果的步骤,包括:
    接收代理服务器发送的第一状态数据集和第一交易用户数据集,并将所述第一状态数据集和第一交易用户数据集存储在第一存储模块,所述第一状态数据集用于表征在所述通过第一区块链向代理服务器发起第一事务请求的步骤之前所述第一区块链的世界状态;所述第一交易用户数据集用于表征成功执行所述第一交易事务操作的用户身份信息;
    基于所述第二事务请求,从所述第一存储模块提取所述第二交易数据集至第一区块链的世界状态数据库以更新第一区块链的世界状态的步骤之后,包括:
    从所述第一存储模块删除所述第二交易数据集、以及删除所述第一交易用户数据集的用户身份信息。
  3. 如权利要求2所述的跨链交易的状态数据的存储方法,其中,所述第一交易数据集包括第一数据子集和第二数据子集,所述第一数据子集用于表征参与执行所述第一交易事务操作的用户身份信息,所述第二数据子集用于表征参与执行所述第一交易事务操作的用户所执行的事务操作;
    基于所述第二事务请求,从所述第一存储模块提取所述第二交易数据集至第一区块链的世界状态数据库以更新第一区块链的世界状态的步骤之后,包括:
    将所述第一数据子集的各用户身份信息置为空值,并将各所述用户身份信息的事务状态标记为提交状态。
  4. 如权利要求2所述的跨链交易的状态数据的存储方法,其中,所述对所述第一交易事务结果和所述第二交易事务结果分别进行判断的步骤之后,包括:
    当所述第一交易事务结果或所述第二交易事务结果为失败时,通过所述第一区块链向所述代理服务器发起回滚事务请求;
    基于所述第一交易数据集生成第二交易数据集并存储在第一存储模块;
    基于所述回滚事务请求,删除所述第二交易数据集、以及删除所述第一交易用户数据集的用户身份信息。
  5. 如权利要求4所述的跨链交易的状态数据的存储方法,其中,所述第一交易数据集包括第一数据子集和第二数据子集,所述第一数据子集用于表征参与执行所述第一交易事务操作的用户身份信息,所述第二数据子集用于表征参与执行所述第一交易事务操作的 用户所执行的事务操作;
    当所述第一交易事务结果和/或所述第二交易事务结果为成功失败时,通过所述第一区块链向所述代理服务器发起回滚事务请求的步骤之后,包括:
    将所述第一数据子集的各用户身份信息置为空值,并将各所述用户身份信息的事务状态标记为回滚状态。
  6. 一种跨链交易的状态数据的存储方法,其中,
    接收第一事务请求,所述第一事务请求为第一交易用户从第一区块链向第二区块链发起的跨区块链事务操作,所述第一交易用户为所述第一事务请求的发起方;
    解析所述第一事务请求,基于第一事务请求的解析结果并向所述第二区块链发送第三事务请求,所述第三事务请求用于表征向第二区块链发起的事务操作;
    接收第二区块链中的第三交易数据集以获取第二交易事务结果并将所述第三交易数据集存储在第二存储模块;所述第三交易数据集用于表征第二区块链内基于第三事务请求在第二区块链执行的第二交易事务操作;
    向所述第一区块链网络发送第二交易事务结果;
    接收第二事务请求,所述第二事务请求为第一交易用户从第一区块链发起的跨区块链事务操作,所述第一交易用户为所述第二事务请求的发起方;
    基于所述第三交易数据集生成第四交易数据集并存储在第二存储模块;
    基于所述第二事务请求,从所述第二存储模块提取所述第四交易数据集至第二区块链的世界状态数据库以更新第二区块链的世界状态。
  7. 如权利要求6所述的一种跨链交易的状态数据的存储方法,其中,所述接收第二区块链中的第三交易数据集以获取第二交易事务结果、以及接收第一交易事务结果,并将所述第三交易数据集存储在第二存储模块的步骤,包括:
    接收第二区块链内的第二状态数据集和第二交易用户数据集,并将所述第二状态数据集和第二交易用户数据集存储在第二存储模块,所述第二状态数据集用于表征在所述第二区块链内执行所述第二交易事务操作的步骤之前所述第二区块链的世界状态;所述第二交易用户数据集用于表征参与执行所述第二交易事务操作的用户身份信息;
    所述基于所述第二事务请求,从所述第二存储模块提取所述第四交易数据集至第二区块链的世界状态数据库以更新第二区块链的世界状态的步骤之后,包括:
    从所述第一存储模块删除所述第二交易数据集、以及删除所述第二交易用户数据集的用户身份信息。
  8. 一种电子装置,其中,所述电子装置包括存储器和处理器,所述存储器上存储有可在所述处理器上运行的跨链交易的状态数据的存储程序,所述跨链交易的状态数据的存储程序被所述处理器执行时实现如下步骤:
    通过第一区块链向代理服务器发起第一事务请求,所述第一事务请求为第一交易用户从第一区块链向第二区块链发起的跨区块链事务操作,所述第一交易用户为所述第一事务请求的发起方;
    接收代理服务器发送的第一交易数据集以获取第一交易事务结果、以及接收第二交易事务结果,并将所述第一交易数据集存储在第一存储模块;所述第一交易数据集用于表征代理服务器基于第一事务请求在第一区块链执行的第一交易事务操作;所述第二交易事务结果为第二区块链内基于第一事务请求执行第二交易事务操作的结果;
    对所述第一交易事务结果和所述第二交易事务结果分别进行判断;
    当所述第一交易事务结果和所述第二交易事务结果分别为成功时,通过所述第一区块链向所述代理服务器发起第二事务请求;
    基于所述第一交易数据集生成第二交易数据集并存储在第一存储模块;
    基于所述第二事务请求,从所述第一存储模块提取所述第二交易数据集至第一区块链 的世界状态数据库以更新第一区块链的世界状态。
  9. 如权利要求8所述的电子装置,其中,所述接收代理服务器发送的第一交易数据集以获取第一交易事务结果、以及接收第二交易事务结果的步骤,包括:
    接收代理服务器发送的第一状态数据集和第一交易用户数据集,并将所述第一状态数据集和第一交易用户数据集存储在第一存储模块,所述第一状态数据集用于表征在所述通过第一区块链向代理服务器发起第一事务请求的步骤之前所述第一区块链的世界状态;所述第一交易用户数据集用于表征成功执行所述第一交易事务操作的用户身份信息;
    基于所述第二事务请求,从所述第一存储模块提取所述第二交易数据集至第一区块链的世界状态数据库以更新第一区块链的世界状态的步骤之后,包括:
    从所述第一存储模块删除所述第二交易数据集、以及删除所述第一交易用户数据集的用户身份信息。
  10. 如权利要求9所述的电子装置,其中,所述第一交易数据集包括第一数据子集和第二数据子集,所述第一数据子集用于表征参与执行所述第一交易事务操作的用户身份信息,所述第二数据子集用于表征参与执行所述第一交易事务操作的用户所执行的事务操作;
    基于所述第二事务请求,从所述第一存储模块提取所述第二交易数据集至第一区块链的世界状态数据库以更新第一区块链的世界状态的步骤之后,包括:
    将所述第一数据子集的各用户身份信息置为空值,并将各所述用户身份信息的事务状态标记为提交状态。
  11. 如权利要求9所述的电子装置,其中,所述对所述第一交易事务结果和所述第二交易事务结果分别进行判断的步骤之后,包括:
    当所述第一交易事务结果或所述第二交易事务结果为失败时,通过所述第一区块链向所述代理服务器发起回滚事务请求;
    基于所述第一交易数据集生成第二交易数据集并存储在第一存储模块;
    基于所述回滚事务请求,删除所述第二交易数据集、以及删除所述第一交易用户数据集的用户身份信息。
  12. 如权利要求9所述的电子装置,其中,所述对所述第一交易事务结果和所述第二交易事务结果分别进行判断的步骤之后,包括:
    当所述第一交易事务结果或所述第二交易事务结果为失败时,通过所述第一区块链向所述代理服务器发起回滚事务请求;
    基于所述第一交易数据集生成第二交易数据集并存储在第一存储模块;
    基于所述回滚事务请求,删除所述第二交易数据集、以及删除所述第一交易用户数据集的用户身份信息。
  13. 如权利要求12所述的电子装置,其中,所述第一交易数据集包括第一数据子集和第二数据子集,所述第一数据子集用于表征参与执行所述第一交易事务操作的用户身份信息,所述第二数据子集用于表征参与执行所述第一交易事务操作的用户所执行的事务操作;
    当所述第一交易事务结果和/或所述第二交易事务结果为成功失败时,通过所述第一区块链向所述代理服务器发起回滚事务请求的步骤之后,包括:
    将所述第一数据子集的各用户身份信息置为空值,并将各所述用户身份信息的事务状态标记为回滚状态。
  14. 一种电子装置,其中,所述电子装置包括存储器和处理器,所述存储器上存储有可在所述处理器上运行的跨链交易的状态数据的存储程序,所述跨链交易的状态数据的存储程序被所述处理器执行时实现如下步骤:
    接收第一事务请求,所述第一事务请求为第一交易用户从第一区块链向第二区块链发 起的跨区块链事务操作,所述第一交易用户为所述第一事务请求的发起方;
    解析所述第一事务请求,基于第一事务请求的解析结果并向所述第二区块链发送第三事务请求,所述第三事务请求用于表征向第二区块链发起的事务操作;
    接收第二区块链中的第三交易数据集以获取第二交易事务结果并将所述第三交易数据集存储在第二存储模块;所述第三交易数据集用于表征第二区块链内基于第三事务请求在第二区块链执行的第二交易事务操作;
    向所述第一区块链网络发送第二交易事务结果;
    接收第二事务请求,所述第二事务请求为第一交易用户从第一区块链发起的跨区块链事务操作,所述第一交易用户为所述第二事务请求的发起方;
    基于所述第三交易数据集生成第四交易数据集并存储在第二存储模块;
    基于所述第二事务请求,从所述第二存储模块提取所述第四交易数据集至第二区块链的世界状态数据库以更新第二区块链的世界状态。
  15. 根据权利要求14所述的一种电子装置,其中,所述接收第二区块链中的第三交易数据集以获取第二交易事务结果、以及接收第一交易事务结果,并将所述第三交易数据集存储在第二存储模块的步骤,包括:
    接收第二区块链内的第二状态数据集和第二交易用户数据集,并将所述第二状态数据集和第二交易用户数据集存储在第二存储模块,所述第二状态数据集用于表征在所述第二区块链内执行所述第二交易事务操作的步骤之前所述第二区块链的世界状态;所述第二交易用户数据集用于表征参与执行所述第二交易事务操作的用户身份信息;
    所述基于所述第二事务请求,从所述第二存储模块提取所述第四交易数据集至第二区块链的世界状态数据库以更新第二区块链的世界状态的步骤之后,包括:
    从所述第一存储模块删除所述第二交易数据集、以及删除所述第二交易用户数据集的用户身份信息。
  16. 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储有跨链交易的状态数据的存储程序,所述跨链交易的状态数据的存储程序可被一个或者多个处理器执行,以实现一种跨链交易的状态数据的存储方法,其主要步骤包括:
    通过第一区块链向代理服务器发起第一事务请求,所述第一事务请求为第一交易用户从第一区块链向第二区块链发起的跨区块链事务操作,所述第一交易用户为所述第一事务请求的发起方;
    接收代理服务器发送的第一交易数据集以获取第一交易事务结果、以及接收第二交易事务结果,并将所述第一交易数据集存储在第一存储模块;所述第一交易数据集用于表征代理服务器基于第一事务请求在第一区块链执行的第一交易事务操作;所述第二交易事务结果为第二区块链内基于第一事务请求执行第二交易事务操作的结果;
    对所述第一交易事务结果和所述第二交易事务结果分别进行判断;
    当所述第一交易事务结果和所述第二交易事务结果分别为成功时,通过所述第一区块链向所述代理服务器发起第二事务请求;
    基于所述第一交易数据集生成第二交易数据集并存储在第一存储模块;
    基于所述第二事务请求,从所述第一存储模块提取所述第二交易数据集至第一区块链的世界状态数据库以更新第一区块链的世界状态。
  17. 如权利要求16所述的计算机可读存储介质,其中,所述接收代理服务器发送的第一交易数据集以获取第一交易事务结果、以及接收第二交易事务结果的步骤,包括:
    接收代理服务器发送的第一状态数据集和第一交易用户数据集,并将所述第一状态数据集和第一交易用户数据集存储在第一存储模块,所述第一状态数据集用于表征在所述通过第一区块链向代理服务器发起第一事务请求的步骤之前所述第一区块链的世界状态;所述第一交易用户数据集用于表征成功执行所述第一交易事务操作的用户身份信息;
    基于所述第二事务请求,从所述第一存储模块提取所述第二交易数据集至第一区块链的世界状态数据库以更新第一区块链的世界状态的步骤之后,包括:
    从所述第一存储模块删除所述第二交易数据集、以及删除所述第一交易用户数据集的用户身份信息。
  18. 如权利要求17所述的计算机可读存储介质,其中,所述第一交易数据集包括第一数据子集和第二数据子集,所述第一数据子集用于表征参与执行所述第一交易事务操作的用户身份信息,所述第二数据子集用于表征参与执行所述第一交易事务操作的用户所执行的事务操作;
    基于所述第二事务请求,从所述第一存储模块提取所述第二交易数据集至第一区块链的世界状态数据库以更新第一区块链的世界状态的步骤之后,包括:
    将所述第一数据子集的各用户身份信息置为空值,并将各所述用户身份信息的事务状态标记为提交状态。
  19. 如权利要求17所述的计算机可读存储介质,其中,所述对所述第一交易事务结果和所述第二交易事务结果分别进行判断的步骤之后,包括:
    当所述第一交易事务结果或所述第二交易事务结果为失败时,通过所述第一区块链向所述代理服务器发起回滚事务请求;
    基于所述第一交易数据集生成第二交易数据集并存储在第一存储模块;
    基于所述回滚事务请求,删除所述第二交易数据集、以及删除所述第一交易用户数据集的用户身份信息。
  20. 如权利要求19所述的计算机可读存储介质,其中,所述第一交易数据集包括第一数据子集和第二数据子集,所述第一数据子集用于表征参与执行所述第一交易事务操作的用户身份信息,所述第二数据子集用于表征参与执行所述第一交易事务操作的用户所执行的事务操作;
    当所述第一交易事务结果和/或所述第二交易事务结果为成功失败时,通过所述第一区块链向所述代理服务器发起回滚事务请求的步骤之后,包括:
    将所述第一数据子集的各用户身份信息置为空值,并将各所述用户身份信息的事务状态标记为回滚状态。
PCT/CN2020/086273 2019-11-21 2020-04-23 跨链交易的状态数据的存储方法、装置及存储介质 WO2021098139A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911153173.6 2019-11-21
CN201911153173.6A CN111008206A (zh) 2019-11-21 2019-11-21 跨链交易的状态数据的存储方法、装置及存储介质

Publications (1)

Publication Number Publication Date
WO2021098139A1 true WO2021098139A1 (zh) 2021-05-27

Family

ID=70112585

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/086273 WO2021098139A1 (zh) 2019-11-21 2020-04-23 跨链交易的状态数据的存储方法、装置及存储介质

Country Status (2)

Country Link
CN (1) CN111008206A (zh)
WO (1) WO2021098139A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111008206A (zh) * 2019-11-21 2020-04-14 深圳壹账通智能科技有限公司 跨链交易的状态数据的存储方法、装置及存储介质
CN114255031A (zh) * 2020-09-23 2022-03-29 华为技术有限公司 用于执行交易的跨区块链的系统、跨链交易方法及设备
CN112529589B (zh) * 2021-02-10 2021-07-27 北京全息智信科技有限公司 一种长耗时区块链交易的处理方法、装置和电子设备
CN112767168B (zh) * 2021-02-10 2024-02-02 中国工商银行股份有限公司 基于区块链的超级账本并行处理方法及并行处理装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108288159A (zh) * 2018-03-07 2018-07-17 物数(上海)信息科技有限公司 基于多区块链的跨链交易方法、系统、设备及存储介质
CN109214818A (zh) * 2017-06-30 2019-01-15 华为技术有限公司 一种跨链交易方法及装置
CN109559227A (zh) * 2018-11-29 2019-04-02 咪咕文化科技有限公司 一种跨区块链网络的交易方法、装置及存储介质
US20190340267A1 (en) * 2018-05-01 2019-11-07 International Business Machines Corporation Blockchain implementing cross-chain transactions
CN111008206A (zh) * 2019-11-21 2020-04-14 深圳壹账通智能科技有限公司 跨链交易的状态数据的存储方法、装置及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109214818A (zh) * 2017-06-30 2019-01-15 华为技术有限公司 一种跨链交易方法及装置
CN108288159A (zh) * 2018-03-07 2018-07-17 物数(上海)信息科技有限公司 基于多区块链的跨链交易方法、系统、设备及存储介质
US20190340267A1 (en) * 2018-05-01 2019-11-07 International Business Machines Corporation Blockchain implementing cross-chain transactions
CN109559227A (zh) * 2018-11-29 2019-04-02 咪咕文化科技有限公司 一种跨区块链网络的交易方法、装置及存储介质
CN111008206A (zh) * 2019-11-21 2020-04-14 深圳壹账通智能科技有限公司 跨链交易的状态数据的存储方法、装置及存储介质

Also Published As

Publication number Publication date
CN111008206A (zh) 2020-04-14

Similar Documents

Publication Publication Date Title
WO2021098139A1 (zh) 跨链交易的状态数据的存储方法、装置及存储介质
CN109426949B (zh) 一种跨链交易方法及装置
CN106453415B (zh) 基于区块链的设备认证方法、认证服务器及用户设备
CN108540536B (zh) 基于区块链的网络海量业务处理方法、设备及存储介质
WO2018076760A1 (zh) 基于区块链的交易事务处理方法、系统、电子装置及存储介质
US8396932B2 (en) Apparatus and method for efficiently managing data in a social networking service
US20160191662A1 (en) Automatic data request recovery after session failure
CN112136291A (zh) 区块链的高效验证
TW202025045A (zh) 基於區塊鏈的發票報銷方法及裝置、電子設備
CN107766080B (zh) 事务消息处理方法、装置、设备及系统
US11720545B2 (en) Optimization of chaincode statements
EP4216077A1 (en) Blockchain network-based method and apparatus for data processing, and computer device
WO2021082340A1 (zh) 数据处理方法、装置、系统和存储介质
CN111694873B (zh) 虚拟资源包的处理方法、装置及数据库服务器
WO2020155811A1 (zh) 区块链的智能合约执行方法及装置和电子设备
CN112235423B (zh) 跨链事务处理方法及装置、电子设备、存储介质
CN112087502B (zh) 处理请求的方法、装置、设备及存储介质
WO2022206454A1 (zh) 提供跨链消息的方法和装置
US20230052935A1 (en) Asynchronous accounting method and apparatus for blockchain, medium and electronic device
WO2023045617A1 (zh) 一种交易数据处理方法、装置、设备以及介质
CN112256776B (zh) 表单重复提交检测方法、装置、计算机设备和存储介质
CN111241590A (zh) 一种数据库系统、节点和方法
CN112714158A (zh) 事务处理方法、中继网络、跨链网关、系统、介质和设备
Vizier et al. ComChain: A blockchain with Byzantine fault‐tolerant reconfiguration
CN115131022A (zh) 基于区块链的数字资产交易方法、装置、设备及介质

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: 20889356

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: 20889356

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 280922)

122 Ep: pct application non-entry in european phase

Ref document number: 20889356

Country of ref document: EP

Kind code of ref document: A1