[go: up one dir, main page]

CN111260474A - Cross-block-chain asset transaction method, device, equipment, system and storage medium - Google Patents

Cross-block-chain asset transaction method, device, equipment, system and storage medium Download PDF

Info

Publication number
CN111260474A
CN111260474A CN202010094191.8A CN202010094191A CN111260474A CN 111260474 A CN111260474 A CN 111260474A CN 202010094191 A CN202010094191 A CN 202010094191A CN 111260474 A CN111260474 A CN 111260474A
Authority
CN
China
Prior art keywords
asset
transaction request
asset transaction
transaction
monitoring module
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN202010094191.8A
Other languages
Chinese (zh)
Other versions
CN111260474B (en
Inventor
张磊
程司雷
曹京奇
刘晓赫
陈浩栋
王辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202010094191.8A priority Critical patent/CN111260474B/en
Publication of CN111260474A publication Critical patent/CN111260474A/en
Application granted granted Critical
Publication of CN111260474B publication Critical patent/CN111260474B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Computer Security & Cryptography (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Technology Law (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application discloses a method, a device, equipment, a system and a storage medium for cross-blockchain asset transaction, and relates to the technical field of blockchain. The specific implementation scheme is as follows: introducing a monitoring module into a block chain network system, and monitoring the operation behavior of asset transaction requests in at least two block chain networks through the monitoring module, wherein the transaction accounts of the asset transaction requests are associated with each other; then, the monitoring module automatically triggers the initiation of the associated asset transaction request in the blockchain network according to the execution progress of any asset transaction request. In the embodiment, the cross-chain asset transaction does not need the participation of a centralized mechanism, and the asset transaction is only completed in the chain; and the monitoring module can automatically initiate a transaction to assist the user in completing the asset transaction, so that the times of manual participation of the user in the transaction and the times of signature are reduced, and the automation degree and the user experience are improved.

Description

Cross-block-chain asset transaction method, device, equipment, system and storage medium
Technical Field
The application relates to the technical field of computers, in particular to the technical field of block chains.
Background
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. At present, the types of block chains are up to thousands, each block chain has an application field which is good for oneself, has own technical community and ecological environment, and are difficult to replace each other. But the circulation of assets on the chain can not be carried out among all block chains, and the value island phenomenon is increasingly obvious.
Currently, the most dominant ways to perform on-chain asset redemption between different chains include the following two. One is the exchange of assets through an exchange iso-centralized transaction mode; another is to distribute assets in heterogeneous chains to the same chain for transactions by the asset issuer.
However, whether by exchange or asset issuer, is an absolutely centralized organization. The phenomena of the transaction department running back and closing and the excessive issuance of the assets of the issuer are difficult to avoid, and the public and transparent characteristics of the block chain are not met.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment, a system and a storage medium for cross-block chain asset transaction, so that non-centralized cross-chain asset transaction is realized through intra-chain asset transaction.
In a first aspect, an embodiment of the present application provides an asset transaction method across a block chain, including:
monitoring the operation behavior of asset transaction requests in at least two block chain networks by a monitoring module, wherein the transaction accounts of the asset transaction requests are associated with each other;
the monitoring module automatically triggers the initiation of the associated asset transaction requests in the blockchain network according to the execution progress of any asset transaction request.
According to the embodiment of the application, the monitoring module is introduced into the blockchain network system, the monitoring module can monitor the operation behavior of the asset transaction request in the blockchain network, and automatically triggers the initiation of the associated asset transaction request in the blockchain network according to the execution progress of any asset transaction request, so that the decentralized cross-chain asset transaction is realized only through the asset transaction in the chain. Moreover, the monitoring module is introduced, the user does not need to manually trigger the associated asset transaction request, so that the asset transaction is completed instead of the user, the times of manual participation of the user in the transaction and the times of signature are reduced, and the automation degree, the transaction efficiency and the user experience are improved.
Optionally, the asset transaction request includes the following categories:
the asset transaction locking transaction request is used for locking the assets with the set quantity transferred from the transfer-out account to the transfer-in account;
an asset transaction redemption transaction request to effect redemption of the locked set number of assets from the roll-out account to the roll-in account;
an asset transaction return transaction request to effect return of the locked set number of assets to the roll-out account.
In an alternative embodiment of the above application, the monitoring module may monitor and initiate asset trade lock transaction requests, asset trade redemption transaction requests, and asset trade return transaction requests to implement cross-block chain asset locking, asset redemption, and return.
Optionally, the asset transaction locking transaction request, the asset transaction redemption transaction request and the asset transaction return transaction request are initiated based on a hash time-lock intelligent contract deployed in the blockchain network.
In an optional implementation manner of the application, the intelligent contract is locked through the hash time to initiate locking, redemption and return of the asset, so that the contract transaction can be guaranteed to meet specific time requirements, and meanwhile, the contract is locked through the hash time, so that a user can better control the flow direction of the asset; moreover, the asset can be kept in the user's account until the asset is redeemed, improving the security of the asset transaction.
Optionally, the automatically triggering, by the monitoring module, the asset transaction request for initiating the association in the blockchain network according to the execution progress of any asset transaction request includes: the monitoring module verifies the asset transaction locking request when monitoring that the asset transaction locking transaction request is initiated and executed in a first block chain network; and when the verification is passed, acquiring a transfer-in account address in the asset transaction locking transaction request, and sending a notice to a user corresponding to the transfer-in account address so that the user is used as a transfer-out account and initiates a related asset transaction locking transaction request in a second block chain network.
In an optional implementation manner in the above application, the monitoring module may monitor and verify the asset transaction locking request, and when the verification passes, notify the user corresponding to the account transfer address to send a notification, so that the user does not need to manually check and verify the asset transaction locking request, and the automation degree and user experience are improved.
Optionally, the automatically triggering, by the monitoring module, the asset transaction request for initiating the association in the blockchain network according to the execution progress of any asset transaction request includes: the monitoring module acquires keys required for redemption from the second blockchain network when monitoring that the asset transaction redemption transaction request is initiated and executed in the second blockchain network; the monitoring module initiates an asset transaction redemption transaction request in a first blockchain network using the key; the transfer-out account in the asset transaction redemption transaction request initiated in the first block chain network and the transfer-in account in the asset transaction redemption transaction request initiated in the second block chain network belong to a first user, and the transfer-in account in the asset transaction redemption transaction request initiated in the first block chain network and the transfer-out account in the asset transaction redemption transaction request initiated in the second block chain network belong to a second user.
In an alternative embodiment of the above application, after the second blockchain network has executed the asset redemption, the monitoring module can acquire the key required for the redemption and automatically initiate an asset transaction redemption transaction request in the first blockchain network to cause the first blockchain network to execute the asset redemption; and transferring the assets of the first user to the account of the second user in the first block chain network, and transferring the assets of the second user to the account of the first user in the second block chain network, so that the cross-chain asset exchange is realized.
Optionally, the automatically triggering, by the monitoring module, the asset transaction request for initiating the association in the blockchain network according to the execution progress of any asset transaction request includes: if an asset trade redemption transaction request is not executed as of expiration of the trade for the asset locked by the second blockchain network, the monitoring module initiates an asset trade return transaction request in the second blockchain network.
In an alternative embodiment of the above application, if asset redemption is not performed by the second blockchain network, the monitoring module automatically initiates an asset transaction return transaction request in the second blockchain network, ensuring that the locked asset on the second blockchain network is returned and the transaction is completed without manual return by the user. The embodiment realizes the atomic interchange of the cross-chain assets through the monitoring module, and if the execution on one blockchain network fails, the execution on other blockchain networks also fails.
Optionally, the automatically triggering, by the monitoring module, the asset transaction request for initiating the association in the blockchain network according to the execution progress of any asset transaction request includes: if an asset trade redemption transaction request is not executed as of expiration of the trade for the asset locked by the second blockchain network, the monitoring module initiates an asset trade return transaction request in the first blockchain network.
In an alternative embodiment of the above application, if asset redemption is not performed by the second blockchain network, the monitoring module automatically initiates an asset transaction return transaction request in the first blockchain network, ensuring that the locked asset on the first blockchain network is returned and the transaction is completed without manual return by the user.
Optionally, before the monitoring module monitors the operation behavior of the asset transaction request in at least two blockchain networks, the method further includes: the monitoring module registers a callback function corresponding to the asset transaction request in the at least two blockchain networks, and the callback function is used for returning a setting message to the monitoring module when the corresponding asset transaction request is initiated and executed.
In an optional implementation manner of the foregoing application, the monitoring module monitors the operation behavior of the asset transaction request by registering the callback function, so that the operation behavior in the blockchain network is acquired by the callback function outside the blockchain network, and the operation behavior does not depend on the protocol data of the blockchain network and has no influence on the operation of the blockchain network.
Optionally, the monitoring module automatically triggers, according to an execution progress of any asset transaction request, an asset transaction request for initiating a correlation in the blockchain network, including: and the monitoring module automatically calls an interface corresponding to the associated asset transaction request in the block chain network according to the execution progress of any asset transaction request so as to initiate the associated asset transaction request.
In an optional implementation manner of the foregoing application, the monitoring module initiates an asset transaction request through an interface exposed by the blockchain, and provides a communication manner between the monitoring module and the blockchain network; through the interface, the monitoring module can simulate a user to initiate an asset transaction request without changing the response logic of the blockchain network.
In a second aspect, an embodiment of the present application further provides an asset transaction apparatus across a block chain, including:
the monitoring module is used for monitoring the operation behavior of asset transaction requests in at least two block chain networks, wherein the transaction accounts of the asset transaction requests are associated with each other;
and the initiating module is used for automatically triggering the asset transaction request which is initiated to be associated in the blockchain network according to the execution progress of any asset transaction request.
In a third aspect, an embodiment of the present application further provides an electronic device configured with a monitoring module, including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method of asset transaction across a blockchain as provided in an embodiment of the first aspect.
In a fourth aspect, an embodiment of the present application further provides a blockchain system, including: the monitoring module is configured in the electronic equipment;
the monitoring module is used for monitoring the operation behavior of asset transaction requests in at least two block chain networks, wherein transaction accounts of the asset transaction requests are associated with each other; automatically triggering to initiate the related asset transaction request in the blockchain network according to the execution progress of any asset transaction request;
the at least two blockchain networks are used for responding to the asset transaction request and executing the corresponding asset transaction operation.
In a fifth aspect, embodiments of the present application further provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform a method for trading assets across a blockchain as provided in an embodiment of the first aspect.
Other effects of the above-described alternative will be described below with reference to specific embodiments.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
FIG. 1 is a block chain system according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of a cross-blockchain asset transaction method according to a first embodiment of the present disclosure;
FIG. 3 is a flow chart of an asset transaction method across block chains in the second embodiment of the present application;
FIG. 4a is a flowchart of an asset transaction method across block chains in the third embodiment of the present application;
FIG. 4b is a schematic cross-blockchain asset transaction diagram in a third embodiment of the present application;
fig. 5 is a block diagram of an asset transaction device across a block chain according to a fourth embodiment of the present application;
FIG. 6 is a block diagram of an electronic device for implementing a cross blockchain asset transaction method of an embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The embodiments of the present application are applicable to be executed in a blockchain system, and are particularly applicable to a heterogeneous blockchain system. In conjunction with fig. 1, the blockchain system 100 includes at least two blockchain networks 110, such as heterogeneous bitcoins, etherhouses, EOSs, Cosmos, etc. Each blockchain network 110 is operated by a plurality of node devices 111, and protocol data of a certain blockchain network 110, such as data and programs required by the operation of any blockchain network 110, such as a communication mechanism, a consensus mechanism, an incentive mechanism, an intelligent contract, and the like, are deployed in the node devices 111 participating in the certain blockchain network 110. The node devices 111 of the blockchain networks 110 may overlap or not overlap at all, and the overlapping node devices deploy protocol data of a plurality of blockchain networks at the same time.
For the user, the terminal 200 may respectively register accounts in the plurality of blockchain networks 110 to manage its own assets, and the addresses registered by the users in different blockchain networks 110 are different but all belong to the same user. As shown in fig. 1, a first user registers a first user account in a first blockchain network and registers the first user account in a second blockchain network. The second user registers a second user account in the first blockchain network and registers the second user account in the second blockchain network. Either user account may be transferred into or out of the account as an asset.
The block chain system 100 according to the embodiment of the present application is provided with a monitoring module 120. The functions of the monitoring module 120 may be implemented by software and may be configured in any one of the blockchain node devices 111 or in an electronic device 121 (as shown in fig. 1) that is independent of the blockchain node device 111. When the monitoring module 120 is configured in the electronic device 121, it may be communicatively connected to any node device in each blockchain network, where the node device may be a full node device or a lightweight node. The monitoring module 120 is independent of the blockchain protocol data, and communicates with the blockchain protocol data through an interface of the blockchain network, so as to implement monitoring of the operation behavior and initiation of the transaction request.
The asset transaction method across blockchains is described in detail below based on the blockchain system described above.
Example one
Fig. 2 is a flowchart of a cross-blockchain asset transaction method in an embodiment of the present application, where the embodiment of the present application is applicable to an asset transaction between heterogeneous blockchains, and the method is executed by an asset transaction device across blockchains, where the device is implemented by software and/or hardware and is specifically configured in an electronic device with a certain data operation capability. In this embodiment, the monitoring module is configured in the asset transaction device across the block chain, and the monitoring module specifically executes the method provided in this embodiment.
A method of asset transaction across a blockchain as shown in figure 2, comprising:
s201, the monitoring module monitors the operation behaviors of the asset transaction requests in at least two block chain networks, wherein transaction accounts of the asset transaction requests are related to each other.
In this embodiment, the asset transaction request includes the following categories: the asset transaction locking transaction request is used for locking the assets with the set quantity transferred from the transfer-out account to the transfer-in account; an asset transaction redemption transaction request for effecting redemption of the locked set number of assets back to the transfer-in account; an asset transaction return transaction request to effect return of the locked set number of assets to the roll-out account.
The transaction accounts of each asset transaction request include a transfer-in account and a transfer-out account in each blockchain network. Optionally, the transfer-in account and the transfer-out account in the blockchain network have a transaction relationship. Preferably, the transfer-in account in one blockchain network and the transfer-out account in the other blockchain network belong to the same user, and the transfer-out account in the blockchain network and the transfer-in account in the other blockchain network belong to the same user. For example, with reference to fig. 1, if a first user account in a first blockchain network is taken as a transfer-out account, a second user account is taken as a transfer-in account; correspondingly, the first user account in the second block chain network is used as a transfer-in account, and the second user account is used as a transfer-out account.
In this embodiment, when an asset transaction locking transaction request is initiated and executed, the blockchain network locks a set number of assets transferred from the roll-out account to the roll-in account in the blockchain network. Wherein the amount of assets transferred can be determined by matching off-line or on-line. When a set number of assets to transfer out of an account are locked, the assets are frozen but still present in the transfer out account address. When an asset transaction redemption transaction request is initiated and executed, the blockchain network redeems the locked asset back to the transfer-in account. When an asset transaction return transaction request is initiated and executed, the blockchain network returns the locked set number of assets to the roll-out account. It will be appreciated that the asset transaction in this embodiment is performed within a blockchain network, and thus the locked, redeemed and returned assets are the assets in the blockchain network to which they belong.
In this embodiment, the operational behavior of the asset transaction request includes the initiation and execution of the asset transaction request. The monitoring module monitors the initiation and execution of the asset transaction request to determine the execution progress of the asset transaction request, for example, an asset transaction locking transaction request is initiated and executed, and the asset is locked at the moment; as another example, an asset transaction redemption transaction request has been initiated and executed, at which time the asset is redeemed to the transfer-to-account.
Optionally, before S201, the monitoring module registers a callback function corresponding to the asset transaction request in at least two blockchain networks, where the callback function is used for returning a setting message to the monitoring module when the corresponding asset transaction request is initiated and executed. And when the monitoring module receives the setting message, monitoring the execution progress of the asset transaction request.
S202, the monitoring module automatically triggers to initiate related asset transaction requests in the blockchain network according to the execution progress of any asset transaction request.
Alternatively, the monitoring module may initiate an associated asset transaction request in the local blockchain network and/or other blockchain networks.
The association between transaction requests may be determined based on the asset transaction logic of the match. For example, upon initiation and execution of an asset transaction redemption transaction request in the second blockchain network, the monitoring module initiates and executes an asset transaction redemption transaction request in the first blockchain network. For another example, after initiating and executing an asset transaction return transaction request in the second blockchain network, the monitoring module initiates and executes an asset transaction return transaction request in the first blockchain network. For another example, the monitoring module initiates and executes an asset transaction redemption transaction request in the first blockchain network and the second blockchain network when the asset transaction redemption transaction request is not executed in the second blockchain network.
Optionally, the monitoring module automatically invokes an interface corresponding to the associated asset transaction request in the blockchain network according to the execution progress of any asset transaction request to initiate the associated asset transaction request. Taking EtherFang as an example, the monitoring module may call the following interfaces, personal _ sendTranssalction, eth _ getLockByNumber, eth _ getTransactionRecept, eth _ call, to initiate the asset transaction request.
In an application scenario, besides the automatic triggering of the monitoring module, the system can also initiate a related asset transaction request to the blockchain network through the user terminal, and specifically can also initiate the transaction request by calling an interface corresponding to the related asset transaction request. To specify interface calls and avoid repeated initiation of requests, the monitoring module may provide the user terminal with call interfaces, such as fund, refund, redem, getTransactionByOrderID, getHashSecretByOrderID, getSecretByOrderID, and the like. The user terminal calls the interface to initiate an asset transaction request, and the monitoring module responds to the call request of the user and automatically calls the interface corresponding to the corresponding asset transaction request in the block chain network to initiate the corresponding asset transaction request. The specific interface call specification may query the relevant records in the prior art, and is not described herein again.
According to the embodiment of the application, the monitoring module is introduced into the blockchain network system, the monitoring module can monitor the operation behavior of the asset transaction request in the blockchain network, and automatically triggers the initiation of the associated asset transaction request in the blockchain network according to the execution progress of any asset transaction request, so that the decentralized cross-chain asset transaction is realized only through the asset transaction in the chain. Moreover, the monitoring module is introduced, the user does not need to manually trigger the associated asset transaction request, so that the asset transaction is completed instead of the user, the times of manual participation of the user in the transaction and the times of signature are reduced, and the automation degree, the transaction efficiency and the user experience are improved.
Further, the monitoring module can monitor and initiate the asset transaction locking transaction request, the asset transaction redemption transaction request and the asset transaction redemption transaction request, thereby realizing the cross-block chain asset locking, asset redemption and withdrawal.
Example two
Fig. 3 is a flowchart of an asset transaction method across block chains in the second embodiment of the present application, and the second embodiment of the present application performs optimization and improvement on the technical solutions of the above embodiments.
Optionally, the operation that the monitoring module automatically triggers the asset transaction request initiating the association in the blockchain network according to the execution progress of any asset transaction request is refined into that the monitoring module verifies the asset transaction locking transaction request when monitoring that the asset transaction locking transaction request is initiated and executed in the first blockchain network; and when the verification is passed, acquiring the transferred account address in the asset transaction locking transaction request, and sending a notification to a user corresponding to the transferred account address so that the user can be used as a transferred account, and initiating a related asset transaction locking transaction request' in the second block chain network, thereby automatically verifying the asset transaction locking transaction request and notifying the user.
Further, the ' the monitoring module automatically triggers the asset transaction request initiating the association in the blockchain network according to the execution progress of any asset transaction request ' is refined into ' the monitoring module acquires the key required for redemption from the second blockchain network when monitoring that the asset transaction redemption transaction request is initiated and executed in the second blockchain network; the monitoring module initiates an asset transaction redemption transaction request in the first blockchain network using the key; the transfer-out account in the asset transaction redemption transaction request initiated in the first block chain network and the transfer-in account in the asset transaction redemption transaction request initiated in the second block chain network belong to a first user, and the transfer-in account in the asset transaction redemption transaction request initiated in the first block chain network and the transfer-out account in the asset transaction redemption transaction request initiated in the second block chain network belong to a second user, so that the cross-chain asset exchange is realized.
In this embodiment, the asset transaction logic may be implemented by a HashTime LockContracts (HTLC). In particular, the asset transaction locking transaction request, the asset transaction redemption transaction request, and the asset transaction return transaction request are initiated based on an HTLC deployed in a blockchain network. The HTLC mainly contains hash locks and time locks. Specifically, for a string secret, after a hash method such as SHA256, a fixed-length random string hash (secret) is obtained. Since the hash function has a unidirectional nature, secret cannot be obtained from hash (secret) cracking with limited computation. The unlocking condition of the hash lock is that the user is required to provide a string of character strings secret', and if the hash (secret) can be satisfied, the user is considered to have the right to redeem the asset from the contract. Time locks are used to ensure that contract transactions must meet certain time requirements, i.e., before or after a timeout, before the contract can be invoked for asset related operations.
As shown in fig. 3, an asset transaction method across blockchains, where each blockchain network deploys an HTLC, specifically includes:
s301, the monitoring module monitors the operation behavior of the asset transaction requests in at least two block chain networks, wherein the transaction accounts of the asset transaction requests are associated with each other.
Optionally, the monitoring module registers a callback function corresponding to the asset transaction request in the HTLC of each blockchain network. When an asset transaction request is initiated and executed, the HTLC will describe operational behavior from the business layer, such as the asset having been redeemed or returned, etc. Based on this, the callback function returns a description message of the operational behavior to the monitoring module when the asset transaction request is initiated and executed. And when the monitoring module receives the description message, monitoring the execution progress of the asset transaction request.
S302, when monitoring that the asset transaction locking transaction request is initiated in the first block chain network and executed, the monitoring module verifies the asset transaction locking transaction request.
First, a first user initiates an asset transaction locking transaction request based on an HTLC deployed in a first blockchain network. The first user selects the key secret and invokes the HTLC in the first blockchain network via the wallet address fromAddr to initiate an asset transaction locking transaction request fund to lock the asset. The format of fund is as follows:
fund(fromAddr,toAddr,hashResult,timtout1,timeout2,amount);
wherein, hashResult is hash (secret), fromdr is the address of transferring account, toAddr is the address of transferring account, timeout1 is the asset locking period, timeout2 is the asset transaction period, and amount is the asset quantity. After timeout of timeout1, either the user or the supervisor module, without providing the secret, may invoke the HTLC to initiate an asset transaction return transaction request, resume (), which when executed, returns the locked asset to the fromAddr address. Before timeout of timeout2, either the user or the monitoring module can provide a secret and invoke the HTLC to initiate an asset transaction redemption transaction request redeem (secret) that, when executed, redeems the locked asset into the toAddr address. It is understood that timeout1 is greater than timeout 2. Therefore, through the Hash time locking contract, a user can better control the flow direction of the assets; moreover, the asset can be kept in the user's account until the asset is redeemed, improving the security of the asset transaction.
Optionally, before S301, the first user and the second user determine, by offline or online matching, various elements of the asset transaction, including but not limited to an address of an out-transfer account, an address of an in-transfer account, an asset lock period, an asset transaction period, and an asset quantity (or referred to as an exchange rate), and record the various elements into the HTLC in the first blockchain network and the HTLC in the second blockchain network. When the monitoring module monitors that an asset transaction locking transaction request is initiated in the first block chain network and executed, the monitoring module calls the HTLC in the first block chain network to acquire matched elements and verifies whether the elements of the asset transaction locking transaction request are consistent with the matched elements.
If the element verification is consistent and the asset locked transaction is verified to be linked, the monitoring module passes the verification. It is to be appreciated that in the blockchain domain, an asset lock transaction linked may be considered to have performed an asset lock transaction request.
And S303, when the verification is passed, acquiring the transferred account address in the asset transaction locking transaction request, and sending a notice to a user corresponding to the transferred account address so that the user is used as a transferred account, and initiating a related asset transaction locking transaction request in the second block chain network.
The monitoring module inquires a user address corresponding to the transferred account address from the first blockchain network, namely the address of the second user, wherein the user address can be a terminal address, an account address and the like of the user. The monitoring module can send the verification result and the hashResult to a terminal of the user or an account of the user, and the sending mode includes but is not limited to short messages, mails, messages and the like.
Optionally, the user corresponding to the account transferred to the account may also manually call the HTLC through the terminal to view the verification result and the hashResult.
After the verification is passed, the second user invokes the HTLC to initiate an associated asset transaction locking transaction request in the second blockchain network. The transfer-out account in the asset transaction locking transaction request initiated in the second blockchain network and the transfer-in account in the asset transaction locking transaction request initiated in the first blockchain network belong to a second user, and the transfer-in account in the asset transaction locking transaction request initiated in the second blockchain network and the transfer-out account in the asset transaction locking transaction request initiated in the first blockchain network belong to a first user. That is, a first user has locked a set number of assets on a first blockchain network, and a second user can provide a key to redeem the assets; instead, the second user locks a set number of assets on the second blockchain network, and the first user can provide a key to redeem the assets.
When the monitoring module monitors that the asset transaction locking transaction request is initiated in the second blockchain network and executed, the asset transaction locking transaction request still needs to be verified. Specifically, the monitoring module calls the HTLC in the second block chain network to acquire matched elements, and verifies whether the elements of the asset transaction locking transaction request are consistent with the matched elements or not.
If the element verification is consistent and the asset locked transaction is verified to be linked, the monitoring module passes the verification. Then, the monitoring module queries a user address corresponding to the transferred account address, namely the address of the first user from the second blockchain network, wherein the user address can be a terminal address, an account address and the like of the user. The monitoring module can send the verification result to a terminal of the user or an account of the user, and the sending mode includes but is not limited to short messages, mails, messages and the like.
Optionally, the user corresponding to the account transferred to may also manually invoke the HTLC through the terminal to view the verification result.
The first user knows that the second blockchain has performed the asset lock after obtaining the verification result. The first user provides a key to invoke the HTLC in the second blockchain network to initiate an asset transaction redemption transaction request before the asset transaction in the second blockchain network expires. In conjunction with fig. 1, the second blockchain network invokes the HTLC to transfer the locked asset from the second user account to the first user account in response to the asset transaction redemption transaction request.
S304, the monitoring module acquires the key required for redemption from the second blockchain network when monitoring that the asset transaction redemption transaction request is initiated in the second blockchain network and executed.
When the HTLC in the second blockchain network is invoked to initiate an asset transaction redemption transaction request, the key needs to be published in the HTLC and broadcast to all nodes of the second blockchain network. Based on the above, when monitoring that the asset transaction redemption transaction request is initiated in the second block chain network and executed, the monitoring module calls the HTLC to inquire out the key published by the asset transaction request from any node of the second block chain network.
S305, the monitoring module initiates an asset transaction redemption transaction request in the first block chain network by adopting the key.
Specifically, the monitoring module invokes an HTLC in the first blockchain network with a key to initiate an asset transaction redemption transaction request prior to expiration of the asset transaction for the first blockchain network. Of course, the second user may also initiate the asset transaction redemption transaction request by the terminal manually invoking the HTLC in the first blockchain network.
In conjunction with fig. 1, a first blockchain network invokes an HTLC to transfer a locked asset from a first user account to a second user account in response to an asset transaction redemption transaction request.
In the embodiment, the monitoring module can monitor and verify the asset transaction locking request, and when the verification is passed, the monitoring module informs the user corresponding to the account address to send the notice, so that the user does not need to manually check and verify the asset transaction locking request, and the automation degree and the user experience are improved.
After the first blockchain network executes the asset redemption, the monitoring module can acquire keys required by the redemption and automatically initiate an asset transaction redemption transaction request in the first blockchain network so as to enable the first blockchain network to execute the asset redemption; and transferring the assets of the first user in the first block chain network into the second user account, and transferring the assets of the second user in the second block chain network into the first user account, so that the cross-chain asset exchange is realized.
EXAMPLE III
Fig. 4a is a flowchart of an asset transaction method across block chains in the third embodiment of the present application, and the third embodiment of the present application performs optimization and improvement on the technical solutions of the above embodiments.
Optionally, the operation "the monitoring module automatically triggers the initiation of an associated asset transaction request in the blockchain network according to the execution progress of any asset transaction request" is refined to "if the asset transaction redemption transaction request is not executed until the transaction of the asset locked by the second blockchain network is expired, the monitoring module initiates an asset transaction return transaction request in the second blockchain network"; further, the 'automatic triggering of the monitoring module to initiate an associated asset transaction request in the blockchain network according to the execution progress of any asset transaction request' is refined into 'if the transaction of the asset transaction redemption transaction request is not executed as long as the transaction of the asset locked by the second blockchain network expires, the monitoring module initiates an asset transaction return transaction request in the first blockchain network', thereby realizing the atomic interchange of the cross-chain assets.
In this embodiment, atomic interchange refers to: a transaction, or a trade, contains several operations, which are either all performed or none performed. For asset interchange operations between different blockchain networks, either the asset transactions on the respective chains are performed successfully or unsuccessfully. The situation that one blockchain network transaction is successfully executed and the other blockchain network transaction is failed cannot exist.
As shown in fig. 4a, the method for trading an asset across block chains realizes atomic interchange of assets across chains, and specifically includes:
s401, the monitoring module monitors the operation behavior of the asset transaction requests in at least two block chain networks, wherein the transaction accounts of the asset transaction requests are related to each other.
S402, when the transaction of the asset locked by the second blockchain network expires, the monitoring module judges whether the transaction redemption transaction request of the asset is executed. If executed, it jumps to S403, and if not executed, it jumps to S404.
Optionally, the monitoring module monitors whether the asset transaction redemption transaction request is executed through a callback function, and if a set value returned by the callback function corresponding to the execution of the asset transaction redemption transaction request is received, the asset transaction redemption transaction request is determined to be executed; if not, it is determined that the asset transaction redemption transaction request was not executed.
S403, the monitoring module acquires the key required for redemption from the second block chain network, and initiates an asset transaction redemption transaction request in the first block chain network by adopting the key. And finishing the operation.
The detailed description of the step is not repeated herein.
S404, the monitoring module initiates an asset transaction return transaction request in the second block chain network. Execution continues with S405.
In particular, after the asset lock expires on the second blockchain network, the monitoring module invokes the HTLC to initiate an asset transaction return transaction request in the second blockchain network. Of course, the second user may also initiate the asset transaction return transaction request by the terminal manually invoking the HTLC in the second blockchain network.
The second blockchain network returns the locked asset to the second user's account in the second blockchain network in response to the asset transaction return transaction request.
S405, the monitoring module initiates an asset transaction return transaction request in the first block chain network.
In particular, after the asset lock expires on the first blockchain network, the monitoring module invokes the HTLC to initiate an asset transaction return transaction request in the first blockchain network. Of course, the first user may also initiate the asset transaction return transaction request by manually invoking the HTLC in the first blockchain network via the terminal.
The first blockchain network returns the locked asset to the first user's account in the first blockchain network in response to the asset transaction return transaction request.
In this embodiment, if the second blockchain network does not execute asset redemption, the monitoring module automatically initiates an asset transaction return transaction request in the second blockchain network and the first blockchain network, ensuring that the assets locked on the second blockchain network and the first blockchain network are returned and ending the transaction without manual return by the user. In the embodiment, the monitoring module realizes the atomic exchange of cross-chain assets, and if the execution on one blockchain network fails, the execution on other blockchain networks also fails; moreover, the user does not need to manually return, and the automation degree of asset return is improved.
It should be noted that the execution sequence of S404 and S405 is not sequential, and S404 and S405 may be executed first, or S405 and S404 may be executed first, or S404 and S405 may be executed in parallel.
Fig. 4b is a schematic view of an asset transaction across a blockchain in the third embodiment of the present application. Two heterogeneous blockchain networks, a first blockchain network and a second blockchain network, are shown. The first user and the second user both register accounts on the first and second blockchain networks. The first blockchain network deploys HTLCX and the second blockchain network deploys HTLCY. The monitoring module monitors the operation behavior of the asset transaction requests in the HTLCX and the HTLCY and initiates the associated asset transaction requests by calling the HTLCX or the HTLCY. The process of conducting an asset transaction between a first blockchain and a second blockchain is described in detail below in conjunction with fig. 4 b.
Step 1: the first user and the second user use m XToken on the first block chain network to exchange n YToken on the second block chain network by a certain exchange rate agreement, and the step is a matching process.
Step 2, the first user selects a secret key and calls the HTLCX to issue an asset transaction locking transaction request ① fundX on the first block chain network.
fundX(AddrOfAInX,AddrOfBInX,hash(secret),t1,t4,m);
Wherein AddrOfAInX is the first user's address on the first blockchain network, AddrOfBInX is the second user's address on the first blockchain network, t1> t4. request ① indicates that the first user has locked m XToken tokens on the first blockchain network, the second user can provide secret before t4 times out, call HTLCX to redeem XToken, otherwise, the first user can return XToken after t1 times out.
Step 3, the monitoring module monitors the request ①, verifies AddrOfAInX, AddrOfBInX, exchange rate, etc., and after verifying that the transaction has been linked, notifies the second user of the verification result and hash (secret), and the second user can also call HTLCX to confirm the content of the request ① again.
Step 4, the second user invokes the HTLCY to issue an asset transaction lock transaction request ② funDY on the second blockchain network.
fundY(AddrOfBInY,AddrOfAInY,hash(secret),t2,t3,n);
Wherein AddrOfAInY is the first user's address on the second blockchain network, AddrOfBInY is the second user's address on the second blockchain network, t1> t2> t4> t3. request ② indicates that the second user has locked n YToken tokens on the second blockchain network, the first user can provide a secret call HTLCY to redeem YToken before t3 times out, otherwise, after t2 times out, the second user can withdraw YToken.
Step 5, the monitoring module monitors the request ②, verifies AddrOfBInY, AddrOfAInY, exchange rate and the like, and notifies the first user of the verification result after verifying that the transaction is linked.
Step 6.1 before the timeout at t3, the first user provides a key secret to invoke HTLCY to initiate an asset transaction redemption transaction request ③ redeemY over the second blockchain network.
redeemY(secret);
Request ③ represents that the first user redeemed the n YToken s that the second user previously locked in request ② by invoking HTLCY on the second blockchain network and published secret in HTLCY.
Step 6.2 if t3 times out due to the first user actively giving up redemption, etc., the transaction between the first user and the second user fails the monitoring module invokes the HTLCY on the second blockchain network to issue the asset transaction return transaction request ⑤ refundY after waiting t2 times out.
refundY();
Request ⑤ represents a second user taking away an asset previously locked on the second blockchain network request ⑤ may also be manually triggered by the second user.
Step 6.3, if the transaction between the first user and the second user fails, the monitoring module invokes the HTLCX on the first blockchain network to issue an asset transaction return transaction request ⑥ refondX after waiting for time out at t 1.
refundX();
The request ⑥ represents the first user taking away an asset that was previously locked on the first blockchain network request ⑥ may also be manually triggered by the first user.
And 7, after monitoring that the request ③ is successfully executed, the monitoring module inquires secret from the HTLCY, and calls the HTLCX to initiate an asset transaction redemption transaction request ④ redeemX before the timeout of t 4.
redeemX(secret);
Request ④ represents the redemption of the monitoring module from the first blockchain network in place of the second user of the m XToken's previously locked by the first user in request ① request ④ may also be initiated by the second user itself.
Example four
Fig. 5 is a structural diagram of an asset transaction apparatus across block chains in a fourth embodiment of the present application, where the embodiment of the present application is applicable to a case of performing asset transaction between heterogeneous block chains, and the apparatus is implemented by software and/or hardware and is specifically configured in an electronic device with a certain data operation capability.
An asset transaction device 500 across a blockchain as shown in fig. 5 includes: a monitoring module 501 and an initiating module 502; wherein,
a monitoring module 501, configured to monitor operation behaviors of asset transaction requests in at least two block chain networks, where transaction accounts of the asset transaction requests are associated with each other.
An initiating module 502 is configured to automatically trigger initiation of an associated asset transaction request in the blockchain network according to an execution progress of any asset transaction request.
According to the embodiment of the application, the monitoring module is introduced into the blockchain network system, the monitoring module can monitor the operation behavior of the asset transaction request in the blockchain network, and automatically triggers the initiation of the associated asset transaction request in the blockchain network according to the execution progress of any asset transaction request, so that the decentralized cross-chain asset transaction is realized only through the asset transaction in the chain. Moreover, the monitoring module is introduced, the user does not need to manually trigger the associated asset transaction request, so that the asset transaction is completed instead of the user, the times of manual participation of the user in the transaction and the times of signature are reduced, and the automation degree, the transaction efficiency and the user experience are improved.
Further, the asset transaction request includes the following categories: the asset transaction locking transaction request is used for locking the assets with the set quantity transferred from the transfer-out account to the transfer-in account; an asset transaction redemption transaction request for effecting redemption of the locked set number of assets from the transfer-out account to the transfer-in account; an asset transaction return transaction request to effect return of the locked set number of assets to the roll-out account.
Further, the asset transaction locking transaction request, the asset transaction redemption transaction request, and the asset transaction return transaction request are initiated based on a hash time-lock intelligent contract deployed in the blockchain network.
Further, the initiating module 502 is specifically configured to verify the asset transaction locking transaction request when it is monitored that the asset transaction locking transaction request is initiated and executed in the first blockchain network; and when the verification is passed, acquiring the transfer-in account address in the asset transaction locking transaction request, and sending a notification to a user corresponding to the transfer-in account address so that the user can be used as a transfer-out account, and initiating a related asset transaction locking transaction request in the second block chain network.
Further, the initiating module 502 is specifically configured to, when it is monitored that an asset transaction redemption transaction request is initiated in the second blockchain network and executed, obtain a key required for redemption from the second blockchain network; the monitoring module initiates an asset transaction redemption transaction request in the first blockchain network using the key; the transfer-out account in the asset transaction redemption transaction request initiated in the first block chain network and the transfer-in account in the asset transaction redemption transaction request initiated in the second block chain network belong to a first user, and the transfer-in account in the asset transaction redemption transaction request initiated in the first block chain network and the transfer-out account in the asset transaction redemption transaction request initiated in the second block chain network belong to a second user.
Further, the initiation module 502 is specifically configured to initiate an asset trade back transaction request in the second blockchain network if the asset trade redemption transaction request is not executed until the trade for the asset locked in the second blockchain network expires
Further, the initiation module 502 is specifically configured to initiate an asset trade back transaction request in the first blockchain network if the asset trade redemption transaction request was not executed until the trade for the asset locked by the second blockchain network expires.
The device further comprises a registration module, which is used for registering a callback function corresponding to the asset transaction request in the at least two blockchain networks before monitoring the operation behavior of the asset transaction request in the at least two blockchain networks, wherein the callback function is used for returning a setting message to the monitoring module when the corresponding asset transaction request is initiated and executed.
Further, the initiating module 502 is specifically configured to automatically invoke an interface corresponding to the associated asset transaction request in the blockchain network according to the execution progress of any asset transaction request, so as to initiate the associated asset transaction request.
The cross-block-chain asset transaction device can execute the cross-block-chain asset transaction method provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of executing the cross-block-chain asset transaction method.
EXAMPLE five
According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.
As shown in fig. 6, a block diagram of an electronic device implementing the cross-blockchain asset transaction method according to an embodiment of the present application is shown. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 6, the electronic apparatus includes: one or more processors 601, memory 602, and interfaces for connecting the various components, including a high-speed interface and a low-speed interface. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). In fig. 6, one processor 601 is taken as an example.
The memory 602 is a non-transitory computer readable storage medium as provided herein. Wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform a cross-blockchain asset transaction method as provided herein. A non-transitory computer readable storage medium of the present application stores computer instructions for causing a computer to perform a cross blockchain asset transaction method as provided herein.
The memory 602, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the method for asset transaction across blockchains in embodiments of the present application (e.g., shown in fig. 5 as including a listening module 501 and an initiating module 502). The processor 601 executes various functional applications of the server and data processing, i.e., a method of performing asset transactions across a blockchain in the above-described method embodiments, by running non-transitory software programs, instructions, and modules stored in the memory 602.
The memory 602 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by use of an electronic device implementing the cross-blockchain asset transaction method, and the like. Further, the memory 602 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 602 optionally includes memory remotely located from the processor 601, and these remote memories may be connected over a network to an electronic device that performs the cross-blockchain asset transaction method. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device performing the cross-blockchain asset transaction method may further include: an input device 603 and an output device 604. The processor 601, the memory 602, the input device 603 and the output device 604 may be connected by a bus or other means, and fig. 6 illustrates the connection by a bus as an example.
The input device 603 may receive input numeric or character information and generate key signal inputs related to user settings and function controls of an electronic device performing the cross-blockchain asset transaction method, such as a touch screen, keypad, mouse, trackpad, touchpad, pointer stick, one or more mouse buttons, trackball, joystick, or like input device. The output devices 604 may include a display device, auxiliary lighting devices (e.g., LEDs), and tactile feedback devices (e.g., vibrating motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.
EXAMPLE six
With reference to fig. 1, an embodiment of the present application provides a blockchain system. As shown in fig. 1, the blockchain system 100 includes at least two blockchain networks 110 and a monitoring module 120, and the monitoring module 120 is configured in the electronic device 121 provided in the above embodiment.
The monitoring module 120 is configured to monitor operation behaviors of the asset transaction requests in the at least two blockchain networks 110, where transaction accounts of the asset transaction requests are associated with each other; automatically triggering to initiate the related asset transaction request in the blockchain network according to the execution progress of any asset transaction request; at least two blockchain networks 110 are used to perform corresponding asset transaction operations in response to asset transaction requests.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), the internet, and blockchain networks.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
According to the technical scheme of the embodiment of the application, the monitoring module is introduced into the blockchain network system, the monitoring module can monitor the operation behavior of the asset transaction request in the blockchain network, and automatically triggers the initiation of the related asset transaction request in the blockchain network according to the execution progress of any asset transaction request, so that the decentralized cross-chain asset transaction is realized only through the asset transaction in the chain. Moreover, the monitoring module is introduced, the user does not need to manually trigger the associated asset transaction request, so that the asset transaction is completed instead of the user, the times of manual participation of the user in the transaction and the times of signature are reduced, and the automation degree, the transaction efficiency and the user experience are improved.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and the present invention is not limited thereto as long as the desired results of the technical solutions disclosed in the present application can be achieved.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (13)

1. A method of trading assets across a blockchain, comprising:
monitoring the operation behavior of asset transaction requests in at least two block chain networks by a monitoring module, wherein the transaction accounts of the asset transaction requests are associated with each other;
the monitoring module automatically triggers the initiation of the associated asset transaction requests in the blockchain network according to the execution progress of any asset transaction request.
2. The method of claim 1, wherein the asset transaction request comprises the following categories:
the asset transaction locking transaction request is used for locking the assets with the set quantity transferred from the transfer-out account to the transfer-in account;
an asset transaction redemption transaction request to effect redemption of the locked set number of assets from the roll-out account to the roll-in account;
an asset transaction return transaction request to effect return of the locked set number of assets to the roll-out account.
3. The method according to claim 2, wherein the asset transaction locking transaction request, asset transaction redemption transaction request and asset transaction return transaction request are initiated based on a hashed time-locked smart contract deployed in a blockchain network.
4. The method of claim 2 or 3, wherein the monitoring module automatically triggers initiation of an associated asset transaction request in the blockchain network according to execution progress of any asset transaction request, comprising:
the monitoring module verifies the asset transaction locking request when monitoring that the asset transaction locking transaction request is initiated and executed in a first block chain network;
and when the verification is passed, acquiring a transfer-in account address in the asset transaction locking transaction request, and sending a notice to a user corresponding to the transfer-in account address so that the user is used as a transfer-out account and initiates a related asset transaction locking transaction request in a second block chain network.
5. The method of claim 2 or 3, wherein the monitoring module automatically triggers initiation of an associated asset transaction request in the blockchain network according to execution progress of any asset transaction request, comprising:
the monitoring module acquires keys required for redemption from a second blockchain network when monitoring that the asset transaction redemption transaction request is initiated and executed in the second blockchain network;
the monitoring module initiates an asset transaction redemption transaction request in a first blockchain network using the key;
wherein a roll-out account in the asset transaction redemption transaction request initiated in the first block-chain network and a roll-in account in the asset transaction redemption transaction request initiated in the second block-chain network belong to a first user, and a roll-in account in the asset transaction redemption transaction request initiated in the first block-chain network and a roll-out account in the asset transaction redemption transaction request initiated in the second block-chain network belong to a second user.
6. The method of claim 2 or 3, wherein the monitoring module automatically triggers initiation of an associated asset transaction request in the blockchain network according to execution progress of any asset transaction request, comprising:
if an asset trade redemption transaction request is not executed as of expiration of the trade for the asset locked by the second blockchain network, the monitoring module initiates an asset trade return transaction request in the second blockchain network.
7. The method of claim 6, wherein the monitoring module automatically triggers initiation of an associated asset transaction request in a blockchain network based on progress of execution of any asset transaction request, comprising:
if an asset trade redemption transaction request is not executed as of expiration of the trade for the asset locked by the second blockchain network, the monitoring module initiates an asset trade return transaction request in the first blockchain network.
8. The method of claim 1, prior to the monitoring module listening for operational behavior of asset transaction requests in at least two blockchain networks, further comprising:
the monitoring module registers a callback function corresponding to the asset transaction request in the at least two blockchain networks, and the callback function is used for returning a setting message to the monitoring module when the corresponding asset transaction request is initiated and executed.
9. The method of claim 1, wherein the monitoring module automatically triggers initiation of an associated asset transaction request in a blockchain network based on progress of execution of any asset transaction request, comprising:
and the monitoring module automatically calls an interface corresponding to the associated asset transaction request in the block chain network according to the execution progress of any asset transaction request so as to initiate the associated asset transaction request.
10. An asset transaction device across a blockchain, comprising:
the monitoring module is used for monitoring the operation behavior of asset transaction requests in at least two block chain networks, wherein the transaction accounts of the asset transaction requests are associated with each other;
and the initiating module is used for automatically triggering the asset transaction request which is initiated to be associated in the blockchain network according to the execution progress of any asset transaction request.
11. An electronic device configured with a monitoring module, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method of transacting an asset across a blockchain as claimed in any one of claims 1 to 9.
12. A blockchain system, comprising:
at least two blockchain networks and a monitoring module, the monitoring module being configured in the electronic device of claim 11;
the monitoring module is used for monitoring the operation behavior of asset transaction requests in at least two block chain networks, wherein transaction accounts of the asset transaction requests are associated with each other; automatically triggering to initiate the related asset transaction request in the blockchain network according to the execution progress of any asset transaction request;
the at least two blockchain networks are used for responding to the asset transaction request and executing the corresponding asset transaction operation.
13. A non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform a method of transacting an asset across a blockchain as recited in any one of claims 1-9.
CN202010094191.8A 2020-02-12 2020-02-12 Asset transaction method, device, equipment, system and storage medium of cross-blockchain Active CN111260474B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010094191.8A CN111260474B (en) 2020-02-12 2020-02-12 Asset transaction method, device, equipment, system and storage medium of cross-blockchain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010094191.8A CN111260474B (en) 2020-02-12 2020-02-12 Asset transaction method, device, equipment, system and storage medium of cross-blockchain

Publications (2)

Publication Number Publication Date
CN111260474A true CN111260474A (en) 2020-06-09
CN111260474B CN111260474B (en) 2023-10-24

Family

ID=70947235

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010094191.8A Active CN111260474B (en) 2020-02-12 2020-02-12 Asset transaction method, device, equipment, system and storage medium of cross-blockchain

Country Status (1)

Country Link
CN (1) CN111260474B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112767166A (en) * 2021-02-05 2021-05-07 深圳华锐金融技术股份有限公司 Method and device for controlling risk of transaction behavior, computer equipment and storage medium
CN113052576A (en) * 2020-11-05 2021-06-29 北京跨联元焕网络科技有限公司 Method and system for hosting cross-chain exchange
CN113312427A (en) * 2021-05-24 2021-08-27 网易(杭州)网络有限公司 Block chain calling method and device, management service platform and storage medium
CN113595734A (en) * 2020-07-03 2021-11-02 支付宝实验室(新加坡)有限公司 Method, system and apparatus for managing transactions in multiple blockchain networks
CN113947406A (en) * 2021-10-14 2022-01-18 星矿科技(北京)有限公司 Asset transfer method based on block chain
WO2023082883A1 (en) * 2021-11-15 2023-05-19 腾讯科技(深圳)有限公司 Cross-blockchain transaction processing method and apparatus, and computer device, computer storage medium and computer program product

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109409885A (en) * 2018-10-29 2019-03-01 深圳声笑科技有限公司 Across chain method of commerce, device and storage medium on block chain
CN109685489A (en) * 2018-12-28 2019-04-26 杭州云象网络技术有限公司 A kind of assets across chain method of commerce between block chain
CN110060056A (en) * 2019-03-18 2019-07-26 阿里巴巴集团控股有限公司 A kind of business confirmation method and system based on block chain intelligence contract
US10373129B1 (en) * 2018-03-05 2019-08-06 Winklevoss Ip, Llc System, method and program product for generating and utilizing stable value digital assets
US20190251199A1 (en) * 2018-02-14 2019-08-15 Ivan Klianev Transactions Across Blockchain Networks
CN110266655A (en) * 2019-05-30 2019-09-20 中国工商银行股份有限公司 A kind of across chain interconnected method, equipment and system based on block chain
US20190311337A1 (en) * 2018-04-04 2019-10-10 Vijay K. Madisetti Method and System for Exchange of Value or Tokens Between Blockchain Networks

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190251199A1 (en) * 2018-02-14 2019-08-15 Ivan Klianev Transactions Across Blockchain Networks
US10373129B1 (en) * 2018-03-05 2019-08-06 Winklevoss Ip, Llc System, method and program product for generating and utilizing stable value digital assets
US20190311337A1 (en) * 2018-04-04 2019-10-10 Vijay K. Madisetti Method and System for Exchange of Value or Tokens Between Blockchain Networks
CN109409885A (en) * 2018-10-29 2019-03-01 深圳声笑科技有限公司 Across chain method of commerce, device and storage medium on block chain
CN109685489A (en) * 2018-12-28 2019-04-26 杭州云象网络技术有限公司 A kind of assets across chain method of commerce between block chain
CN110060056A (en) * 2019-03-18 2019-07-26 阿里巴巴集团控股有限公司 A kind of business confirmation method and system based on block chain intelligence contract
CN110266655A (en) * 2019-05-30 2019-09-20 中国工商银行股份有限公司 A kind of across chain interconnected method, equipment and system based on block chain

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李欣;: "计算机安全监控系统的关键技术探究", 计算机产品与流通, no. 01, pages 8 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113595734A (en) * 2020-07-03 2021-11-02 支付宝实验室(新加坡)有限公司 Method, system and apparatus for managing transactions in multiple blockchain networks
CN113595734B (en) * 2020-07-03 2023-10-31 支付宝实验室(新加坡)有限公司 Methods, systems, and apparatus for managing transactions in a plurality of blockchain networks
CN113052576A (en) * 2020-11-05 2021-06-29 北京跨联元焕网络科技有限公司 Method and system for hosting cross-chain exchange
CN113052576B (en) * 2020-11-05 2024-02-27 北京跨联元焕网络科技有限公司 Hosting method and system for cross-chain exchange
CN112767166A (en) * 2021-02-05 2021-05-07 深圳华锐金融技术股份有限公司 Method and device for controlling risk of transaction behavior, computer equipment and storage medium
CN113312427A (en) * 2021-05-24 2021-08-27 网易(杭州)网络有限公司 Block chain calling method and device, management service platform and storage medium
CN113947406A (en) * 2021-10-14 2022-01-18 星矿科技(北京)有限公司 Asset transfer method based on block chain
WO2023082883A1 (en) * 2021-11-15 2023-05-19 腾讯科技(深圳)有限公司 Cross-blockchain transaction processing method and apparatus, and computer device, computer storage medium and computer program product

Also Published As

Publication number Publication date
CN111260474B (en) 2023-10-24

Similar Documents

Publication Publication Date Title
CN111260474A (en) Cross-block-chain asset transaction method, device, equipment, system and storage medium
JP7238006B2 (en) Blockchain-based data processing method, apparatus, device, storage medium, and program
CN111741026A (en) Cross-chain transaction request processing method, device, equipment and storage medium
JP2020515939A (en) Event-driven blockchain workflow processing
US20210209595A1 (en) Blockchain transfer processing method and apparatus, device, and medium
CN111782365B (en) Timed task processing method, device, equipment and storage medium
US10817327B2 (en) Network-accessible volume creation and leasing
EP3869377A1 (en) Method and apparatus for data processing based on smart contract, device and storage medium
CN110866740B (en) Method, device, electronic equipment and medium for processing block chain transaction request
CN111565204B (en) Block chain operation method, device, equipment and storage medium
JP7184970B2 (en) Method, apparatus, electronic device and storage medium for providing applet service capabilities
US20150248308A1 (en) Systems and methods for semi-durable transaction log storage in two-phase commit protocol transaction processing
CN111324425B (en) Data access method, device, equipment and storage medium
CN110995480A (en) Block chain network deployment method, device, electronic equipment and medium
CN111831461A (en) A method and apparatus for processing business processes
CN111343239B (en) Communication request processing method, communication request processing device and transaction system
CN111400743A (en) Transaction processing method and device based on block chain network, electronic equipment and medium
CN107465725A (en) Isomery remote business disposal system and method based on CICS
KR102501542B1 (en) Method and apparatus for blockchain system startup, device, and storage medium
CN111835857A (en) Method and apparatus for accessing data
US20210211302A1 (en) Blockchain operation method and apparatus, device and storage medium
CN113312362B (en) Block chain data modification method, device, equipment and storage medium
CN111416860B (en) Transaction processing method and device based on block chain, electronic equipment and medium
CN110570310A (en) Block chain transfer method and consensus realization method, device, equipment and medium
KR102496774B1 (en) Method and apparatus for operating blockchain system, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant