CN111464536A - Block chain cross-chain method and device - Google Patents

Block chain cross-chain method and device Download PDF

Info

Publication number
CN111464536A
CN111464536A CN202010245077.0A CN202010245077A CN111464536A CN 111464536 A CN111464536 A CN 111464536A CN 202010245077 A CN202010245077 A CN 202010245077A CN 111464536 A CN111464536 A CN 111464536A
Authority
CN
China
Prior art keywords
user
asset
message
blockchain
locking
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
CN202010245077.0A
Other languages
Chinese (zh)
Other versions
CN111464536B (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.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group 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 China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202010245077.0A priority Critical patent/CN111464536B/en
Publication of CN111464536A publication Critical patent/CN111464536A/en
Application granted granted Critical
Publication of CN111464536B publication Critical patent/CN111464536B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Abstract

The invention discloses a block chain cross-link method and device, and belongs to the technical field of communication. The block chain cross-chain method comprises the following steps: a first user sends an asset locking message to a second user; the first user is a user of a first block chain, the second user is a user of a second block chain, and the first block chain and the second block chain have one or more common nodes; locking the assets of the first user according to the asset locking time point and the asset locking duration in the asset locking message; and sending the verification random number to the second user so that the second user verifies the accuracy of the asset locking message, and executing asset transfer operation according to the accuracy verification result of the asset locking message, without introducing a mechanism such as a third-party transaction platform which can generate a new centralized node, thereby realizing safe, reliable and efficient on-chain asset transfer and improving user experience.

Description

Block chain cross-chain method and device
Technical Field
The invention relates to the technical field of communication, in particular to a block chain cross-chain method and a block chain cross-chain device.
Background
The current wisdom first proposed the concept of blockchains, and in the following years blockchains became the core component of electronic currency bitcoins as a common ledger for all transactions. Essentially, the blockchain is a shared database, and data or information stored in the shared database cannot be tampered, and the blockchain has the characteristics of decentralization, non-tampering, whole-process marking, traceability, collective maintenance, public transparency and the like. Based on the characteristics, the block chain technology lays a solid 'trust' foundation and creates a reliable 'cooperation' mechanism, thereby having wide application prospect. With the rapid development of blockchain technology and applications, various independent blockchain networks have appeared, and implementing cross-blockchain transactions has become an urgent requirement for blockchain applications. The chain crossing technology is a bridge for realizing communication between independent block chains. In the existing cross-chain technology, the transfer and exchange of assets among different blockchain projects are mainly realized through a third-party trading platform. However, the introduction of a third party trading platform brings a new centralized node, and therefore, the problem of threatening the safety and credibility of the assets is inevitable.
In view of this, the invention provides a block chain cross-chain method, which can generate a new centralized node without introducing a third-party transaction platform or other mechanisms, thereby realizing safe, reliable and efficient on-chain asset transfer and improving user experience.
Disclosure of Invention
Therefore, the invention provides a block chain cross-chain method and a block chain cross-chain device, which are used for solving the problem that a third party transaction platform is introduced to generate a new centralized node during cross-chain transaction, so that the safety and the credibility of an asset are threatened.
In order to achieve the above object, a first aspect of the present invention provides a block chain inter-chain method, applied to a first user, including:
sending an asset locking message to a second user; the asset locking message comprises a hash value, a blockchain identifier of the second user, an asset locking time point and an asset locking duration, wherein the hash value is a hash value corresponding to a random number generated by the first user; the first user is a user of a first blockchain, the second user is a user of a second blockchain, and the first blockchain and the second blockchain have one or more common nodes;
locking the asset of the first user according to the asset locking time point and the asset locking duration in the asset locking message;
and sending a verification random number to the second user so that the second user verifies the accuracy of the asset locking message, and executing an asset transfer operation according to the accuracy verification result of the asset locking message.
Further, before sending the asset locking message to the second user, the method further includes:
the first user and the second user sign an intelligent contract; and the intelligent contract appoints rules for transferring and returning the assets between the first user and the second user.
Further, the sending the asset locking message to the second user includes:
broadcasting the asset lock message to the first blockchain to cause the common node to receive the asset lock message;
the common node broadcasts the asset lock message at the second blockchain so that the second user receives the asset broadcast message.
Further, after sending the verification random number to the second user, the method further includes:
if the accuracy verification of the asset locking message by the second user passes, receiving the asset of the second user transferred by the second user;
and if the verification random number returned by the second user is received within a preset time interval, transferring the asset of the second user back to the second user.
In order to achieve the above object, a second aspect of the present invention provides a block chain interlinking method applied to a second user, including:
receiving an asset locking message sent by a first user; the asset locking message comprises a hash value, a blockchain identifier of the second user, an asset locking time point and an asset locking duration, wherein the hash value is a hash value corresponding to a random number generated by the first user; the first user is a user of a first blockchain, the second user is a user of a second blockchain, and the first blockchain and the second blockchain have one or more common nodes;
locking the asset of the second user according to the asset locking time point and the asset locking duration in the asset locking message;
receiving a verification random number sent by the first user, and verifying the accuracy of the asset locking message based on the verification random number;
and when the accuracy verification of the asset locking message passes, transferring the asset of the second user to the first user.
Further, the receiving an asset locking message sent by a first user includes:
the second blockchain receives the asset locking message broadcast by the common node and broadcasts in the second blockchain; wherein the asset locking message is a message broadcast by the first user in the first blockchain and received by the common node in the second blockchain;
receiving the asset lock message broadcast by the common node at the second blockchain.
Further, after receiving the asset locking message sent by the first user and before locking the asset of the second user according to the asset locking time point and the asset locking duration in the asset locking message, the method further includes:
and performing signature verification on the asset locking message.
Further, said verifying the accuracy of the asset locking message based on the verification nonce comprises:
calculating a verification hash value corresponding to the verification random number;
comparing the verification hash value to a hash value in the asset lock message;
and if the verification hash value is consistent with the hash value in the asset locking message, the accuracy verification of the asset locking message is passed.
Further, if the second user returns the verification random number to the first user at a preset time interval, receiving the asset of the second user transferred back by the first user.
In order to achieve the above object, a third aspect of the present invention provides a block chain interlinking apparatus, applied to a first user, including:
a first sending module for sending an asset locking message to a second user; the asset locking message comprises a hash value, a blockchain identifier of the second user, an asset locking time point and an asset locking duration, wherein the hash value is a hash value corresponding to a random number generated by the first user; the first user is a user of a first blockchain, the second user is a user of a second blockchain, and the first blockchain and the second blockchain have one or more common nodes;
a locking module, configured to lock the asset of the first user according to the asset locking time point and the asset locking duration in the asset locking message;
and the second sending module is used for sending a verification random number to the second user so that the second user verifies the accuracy of the asset locking message and executes asset transfer operation according to the accuracy verification result of the asset locking message.
The invention has the following advantages:
the block chain cross-chain method provided by the invention is characterized in that a first user sends an asset locking message to a second user; the asset locking message comprises a hash value, a block chain identifier of a second user, an asset locking time point and an asset locking duration, wherein the hash value is a hash value corresponding to a random number generated by a first user; the first user is a user of a first block chain, the second user is a user of a second block chain, and the first block chain and the second block chain have one or more common nodes;
the first user locks the asset of the first user according to the asset locking time point and the asset locking duration in the asset locking message, and sends the verification random number to the second user, so that the second user verifies the accuracy of the asset locking message, and executes the asset transfer operation according to the accuracy verification result of the asset locking message, thereby not introducing a mechanism which can generate a new centralized node, such as a third party transaction platform, and the like, realizing safe, reliable and efficient on-chain asset transfer, and improving the user experience.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention.
Fig. 1 is a flowchart of a block chain chaining method according to a first embodiment of the present invention;
fig. 2 is a flowchart of a block chain crossing method according to a second embodiment of the present invention;
fig. 3 is a flowchart of a block chain crossing method according to a third embodiment of the present invention;
fig. 4 is a flowchart of a block chain crossing method according to a fourth embodiment of the present invention;
fig. 5 is a schematic block diagram of a blockchain inter-chain apparatus according to a fifth embodiment of the present invention.
Detailed Description
The following detailed description of embodiments of the invention refers to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present invention, are given by way of illustration and explanation only, not limitation.
In the blockchain cross-chain method provided by the embodiment of the invention, considering that a third-party transaction platform brings new centralized nodes in a blockchain cross-chain technology for realizing the transfer and exchange of assets among different blockchain projects through the third-party transaction platform, so that the problem of threatening the safety and credibility of the assets is inevitable, the new blockchain cross-chain method is provided, mechanisms which can generate the new centralized nodes such as the third-party transaction platform and the like can not be introduced, the safe, reliable and efficient chain asset transfer is realized, and the user experience is improved.
Fig. 1 is a flowchart of a block chain chaining method according to a first embodiment of the present invention, applied to a first user. As shown in fig. 1, the block chain crossing method may include the following steps:
step S101, sending an asset locking message to a second user.
The asset locking message comprises a hash value, a block chain identifier of a second user, an asset locking time point and an asset locking duration, wherein the hash value is a hash value corresponding to a random number generated by a first user; the first user is a user of a first blockchain, the second user is a user of a second blockchain, and the first blockchain and the second blockchain have one or more common nodes.
In the existing technology of partly block chain crossing, the transfer and exchange of assets among different block chain projects need to be realized by introducing a third-party transaction platform and establishing a corresponding centralized node for the third-party transaction platform, so that the cross-chain asset transfer and exchange are realized. However, the introduction of a centralized node of a third-party trading platform inevitably threatens the safety and credibility of the assets. Therefore, the asset locking message is sent to the second user by the first user, and the asset transfer and exchange among the cross-chain users are realized based on the asset locking message without introducing a third-party transaction platform, so that the on-chain asset transfer can be realized safely, reliably and efficiently, and the user experience is improved.
It should be noted that the first user has signed an intelligent contract with the second user before the first user sends the asset lock message to the second user. The content of the intelligent contract appoints the detailed rules of asset transfer and return between the first user and the second user, and the signing mode of the intelligent contract comprises on-chain signing and off-chain signing.
In one embodiment, it is assumed that there are two blockchains with different consensus mechanisms and creators, a first blockchain and a second blockchain, respectively, and that the first blockchain and the second blockchain have one or several common nodes. The common node is a node belonging to a first block chain and a second block chain at the same time, and the common node is provided with a corresponding block chain identifier and a block chain public and private key pair in the first block chain and the second block chain respectively. For example, the node a is a common node of the first blockchain and the second blockchain, the node a has a corresponding first blockchain identifier ID-a1, a first blockchain public key-ag1 and a first blockchain private key-as1 in the first blockchain, and similarly, the node a has a corresponding second blockchain identifier ID-a2, a second blockchain public key-ag2 and a second blockchain private key-as2 in the second blockchain. The first user is a user of the first block chain, the second user is a user of the second block chain, and the first user and the second user sign an intelligent contract in a chain-down mode. The intelligent contract appoints the detailed rules for transferring and returning assets between the first user and the second user, and the specific contents are as follows: the method comprises the steps that a first user sends an asset locking message to a second user, wherein the asset locking message comprises a hash value corresponding to a random number, a block chain identifier of the second user, an asset locking time point, an asset locking duration and the like; the first user and the second user lock the assets according to the content of the asset locking message; if the second user receives the correct random number sent by the first user within the specified time interval, the intelligent contract automatically carries out the operation of transferring the asset of the second user to the first user; and if the first user receives the asset of the second user and receives the correct random number returned by the second user within a specified time interval, the intelligent contract returns the asset of the second user received by the first user to the second user. According to the content of the intelligent contract, the first user generates a random number, locally calculates a hash value corresponding to the random number, and sends an asset locking message to the second user. Wherein the asset locking message comprises the hash value, the blockchain identification of the second user, an asset locking time point and an asset locking duration.
In one embodiment, a first user sends an asset lock message to a second user, comprising:
the first user signs the asset lock message with the first user's blockchain private key and broadcasts the asset lock message at the first blockchain. All nodes of the first block chain receive the asset locking message, after any common node receives the asset locking message, the account book of the first block chain is inquired through the block chain identification of the first user, the block chain public key of the first user is obtained, and signature verification is carried out on the asset locking message based on the block chain public key of the first user. And if the asset locking message signature passes the verification, the common node carries out secondary signature on the asset locking message by using a second block chain private key of the common node, and broadcasts the asset locking message after secondary signature in a second block chain. The second user receives an asset lock message broadcast by the common node on the second blockchain.
And step S102, locking the assets of the first user according to the asset locking time points and the asset locking duration in the asset locking messages.
Locking the asset of the first user may prevent a hacker from performing illegal transfers or the like of the asset of the first user.
In one embodiment, after the first user sends the asset locking message to the second user, the asset of the first user is locked after the asset locking time point is reached according to the asset locking time point and the asset locking duration in the asset locking message, and the locking duration is the asset locking duration in the asset locking message.
If the asset locking time point in the asset locking message is 2020, 1 month, 1 day, 00 point, 00 min and 00 sec, and the locking time duration is 20 min, the asset of the first user is locked after the system time of the first blockchain reaches 2020, 1 month, 1 day, 00 point, 00 min and 00 sec, and the locking time duration is 20 min.
And step S103, sending the verification random number to the second user so that the second user verifies the accuracy of the asset locking message, and executing asset transfer operation according to the accuracy verification result of the asset locking message.
Wherein the authentication random number is the same as the value of the random number in the asset lock message.
It should be noted that the manner in which the first user sends the verification random number to the second user includes an uplink sending manner and a downlink sending manner, where the downlink sending manner includes sending through a p2p (peer-to-peer) or a mobile switching network. Generally, in order to ensure the accuracy of receiving information by the second user, the verification random number is sent to the second user in a chain-down mode, so that whether the asset locking message received in a chain-up mode is illegally tampered can be verified, and the accuracy of receiving information can be ensured to a certain extent. It can be understood that, no matter what transmission method is adopted by the authentication random number, the transmission method is a transmission method that is agreed by the first user and the second user in advance.
In one embodiment, the first user sends the verification random number to the second user by a short message. And after receiving the short message sent by the first user, the second user acquires the verification random number, and calculates the hash value corresponding to the verification random number to acquire the verification hash value. The second user compares the verification hash value to the hash value in the asset lock message for consistency. And when the verification hash value is consistent with the hash value in the asset locking message, the accuracy verification of the asset locking message is passed, and the second user transfers the asset of the second user to the first user according to the content of the intelligent contract.
Fig. 2 is a flowchart of a block chain chaining method according to a second embodiment of the present invention, which is applied to a first user, and is substantially the same as the first embodiment of the present invention except that: after sending the authentication random number to the second user, a revoked asset transfer of the second user is also received. As shown in fig. 2, the block chain crossing method may include the following steps:
step S201, an asset locking message is sent to the second user.
Step S201 in this embodiment is the same as step S101 in the first embodiment of the present invention, and is not described herein again.
And step S202, locking the assets of the first user according to the asset locking time point and the asset locking duration in the asset locking message.
Step S202 in this embodiment is the same as step S102 in the first embodiment of the present invention, and is not described herein again.
Step S203, sending the verification random number to the second user so that the second user verifies the accuracy of the asset locking message, and executing the asset transfer operation according to the accuracy verification result of the asset locking message.
Step S203 in this embodiment is the same as step S103 in the first embodiment of the present invention, and is not described herein again.
And step S204, receiving the asset of the second user transferred by the second user after the accuracy verification of the asset locking message by the second user passes.
And the second user verifies the accuracy of the asset locking message based on the verification random number, and transfers the asset of the second user to the first user according to the intelligent contract after the accuracy verification of the asset locking message is passed. For the first user, it receives the second user's transferred asset from the second user after the accuracy verification of the asset lock message passes.
In step S205, if the verification random number returned by the second user is received within the preset time interval, the asset of the second user is returned to the second user.
In actual use, it is found that there is a need for the second user to withdraw his asset transfer after transferring his asset to the first user. Thus, to enhance the user experience, the second user is allowed to revoke his asset transfer operations.
In one embodiment, after the second user has transferred his asset to the first user, the second user wants to perform an asset transfer pull back operation. Therefore, the second user returns the authentication random number to the first user within a preset time interval. For the first user, after receiving the verification random number returned by the second user within the preset time interval, the first user knows that the second user wants to withdraw the asset transferred from the second user to the first user, so that the first user transfers the asset of the second user back to the second user.
Fig. 3 is a flowchart of a block chain chaining method according to a third embodiment of the present invention, applied to a second user. As shown in fig. 3, the block chain crossing method may include the following steps:
step S301, receiving an asset locking message sent by a first user.
The asset locking message comprises a hash value, a block chain identifier of a second user, an asset locking time point and an asset locking duration, wherein the hash value is a hash value corresponding to a random number generated by a first user; the first user is a user of a first blockchain, the second user is a user of a second blockchain, and the first blockchain and the second blockchain have one or more common nodes.
It should be noted that the first user and the second user have signed an intelligent contract before the second user receives the asset locking message sent by the first user. The content of the intelligent contract appoints the detailed rules of asset transfer and return between the first user and the second user, and the signing mode of the intelligent contract comprises on-chain signing and off-chain signing.
In one embodiment, it is assumed that there are two blockchains with different consensus mechanisms and creators, a first blockchain and a second blockchain, respectively, and that the first blockchain and the second blockchain have one or several common nodes. The common node is a node belonging to a first block chain and a second block chain at the same time, and the common node is provided with a corresponding block chain identifier and a block chain public and private key pair in the first block chain and the second block chain respectively. For example, the node a is a common node of the first blockchain and the second blockchain, the node a has a corresponding first blockchain identifier ID-a1, a first blockchain public key-ag1 and a first blockchain private key-as1 in the first blockchain, and similarly, the node a has a corresponding second blockchain identifier ID-a2, a second blockchain public key-ag2 and a second blockchain private key-as2 in the second blockchain. The first user is a user of the first block chain, the second user is a user of the second block chain, and the first user and the second user sign an intelligent contract in a chain-down mode. The intelligent contract appoints the detailed rules for transferring and returning assets between the first user and the second user, and the specific contents are as follows: the method comprises the steps that a first user sends an asset locking message to a second user, wherein the asset locking message comprises a hash value corresponding to a random number, a block chain identifier of the second user, an asset locking time point, an asset locking duration and the like; the first user and the second user lock the assets according to the content of the asset locking message; if the second user receives the correct random number sent by the first user within the specified time interval, the intelligent contract automatically carries out the operation of transferring the asset of the second user to the first user; and if the first user receives the asset of the second user and receives the correct random number returned by the second user within a specified time interval, the intelligent contract returns the asset of the second user received by the first user to the second user. According to the content of the intelligent contract, the first user generates a random number, locally calculates a hash value corresponding to the random number, and sends an asset locking message to the second user. Wherein the asset locking message comprises the hash value, the blockchain identification of the second user, an asset locking time point and an asset locking duration. The second user receives the asset locking message sent by the first user.
In one embodiment, the second user receiving the asset locking message sent by the first user includes:
the method comprises the steps that a first user generates a random number, a hash value corresponding to the random number is calculated locally, an asset locking message is generated based on the hash value, a second user block chain identification, an asset locking time point and an asset locking duration, then the asset locking message is signed by using a block chain private key of the first user, and the asset locking message is broadcasted in a first block chain after the private key is signed. All nodes of the first block chain receive the asset locking message, after any common node receives the asset locking message, the account book of the first block chain is inquired through the block chain identification of the first user, the block chain public key of the first user is obtained, and signature verification is carried out on the asset locking message based on the block chain public key of the first user. And if the asset locking message signature passes the verification, the common node carries out secondary signature on the asset locking message by using a second block chain private key of the common node, and broadcasts the asset locking message after secondary signature in a second block chain. The second user receives an asset lock message broadcast by the common node on the second blockchain.
It will be appreciated that after the second user receives the asset lock message broadcast by the common node at the second blockchain, the second user needs to perform signature verification on the asset lock message in order to ensure the validity of the received asset lock message. The signature verification process comprises the following steps: and the second user searches the account book of the second block chain by sending a second block chain identifier corresponding to the common node of the asset locking message, obtains a second block chain public key of the common node, and then utilizes the second block chain public key of the common node to carry out signature verification on the asset locking message.
And step S302, locking the asset of the second user according to the asset locking time point and the asset locking duration in the asset locking message.
Locking the asset of the first user may prevent a hacker from performing illegal transfers or the like of the asset of the first user.
In one embodiment, after the second user receives the asset locking message sent by the first user, the second user locks the asset of the second user according to the asset locking time point and the asset locking duration in the asset locking message after the asset locking time point is reached, and the locking duration is the asset locking duration in the asset locking message.
If the asset locking time point in the asset locking message is 2020, 1 month, 1 day, 00 point, 00 min and 00 sec, and the locking time duration is 20 min, the asset of the second user is locked after the system time of the second blockchain reaches 2020, 1 month, 1 day, 00 point, 00 min and 00 sec, and the locking time duration is 20 min.
Step S303, receiving the verification random number sent by the first user, and verifying the accuracy of the asset locking message based on the verification random number.
Wherein the authentication random number is the same as the value of the random number in the asset lock message.
It should be noted that the manner in which the first user sends the verification random number to the second user includes an uplink sending manner and a downlink sending manner, where the downlink sending manner includes sending through a p2p (peer-to-peer) or a mobile switching network. Generally, in order to ensure the accuracy of receiving information by the second user, the verification random number is sent to the second user in a chain-down mode, so that whether the asset locking message received in a chain-up mode is illegally tampered can be verified, and the accuracy of receiving information can be ensured to a certain extent. It can be understood that, no matter what transmission method is adopted by the authentication random number, the transmission method is a transmission method that is agreed by the first user and the second user in advance.
In one embodiment, the first user sends the verification random number to the second user by a short message. And after receiving the short message sent by the first user, the second user acquires a verification random number and verifies the accuracy of the asset locking message. The specific accuracy verification process comprises the following steps: and calculating a hash value corresponding to the verification random number to obtain a verification hash value, and then comparing whether the verification hash value is consistent with the hash value in the asset locking message. When the verification hash value is consistent with the hash value in the asset locking message, the accuracy verification of the asset locking message is passed; and when the verification hash value is inconsistent with the hash value in the asset locking message, indicating that the accuracy verification of the asset locking message is failed.
And step S304, after the accuracy verification of the asset locking message passes, transferring the asset of the second user to the first user.
When the second user verifies that the accuracy of the received asset locking message has passed, the second user determines that a transaction with the first user may be performed, whereupon the second user transfers his asset to the first user.
Fig. 4 is a flowchart of a block chain chaining method according to a fourth embodiment of the present invention, which is applied to a second user, and is substantially the same as the third embodiment of the present invention except that: after transferring the asset to the first user, further comprising performing an asset transfer revocation operation. As shown in fig. 4, the block chain crossing method may include the following steps:
step S401, receiving an asset locking message sent by a first user.
Step S401 in this embodiment is the same as step S301 in the first embodiment of the present invention, and is not described herein again.
And step S402, locking the asset of the second user according to the asset locking time point and the asset locking duration in the asset locking message.
Step S402 in this embodiment is the same as step S302 in the first embodiment of the present invention, and is not described herein again.
Step S403, receiving the verification random number sent by the first user, and verifying the accuracy of the asset locking message based on the verification random number.
Step S403 in this embodiment is the same as step S303 in the first embodiment of the present invention, and is not described herein again.
And step S404, when the accuracy verification of the asset locking message passes, transferring the asset of the second user to the first user.
Step S404 in this embodiment is the same as step S304 in the first embodiment of the present invention, and is not described herein again.
Step S405, if the verification random number is returned to the first user at the preset time interval, receiving the asset of the second user returned by the first user.
In actual use, it is found that after the second user transfers his assets to the first user, there is a need to withdraw his asset transfer. Thus, to enhance the user experience, the second user is allowed to revoke his asset transfer operations.
In one embodiment, after the second user transfers the asset to the first user, if the second user wants to perform an asset transfer revocation operation, the second user returns the authentication random number to the first user within a preset time interval. For the first user, after receiving the verification random number returned by the second user within the preset time interval, the first user knows that the second user wants to withdraw the asset transferred from the second user to the first user, so that the first user transfers the asset of the second user back to the second user. The second user receives the assets of the second user returned by the first user, and therefore asset transfer revocation is achieved.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
Fig. 5 is a schematic block diagram of a blockchain inter-chain apparatus according to a fifth embodiment of the present invention, which is applied to a first user. As shown in fig. 5, the block chain interlinking device includes: a first sending module 501, a locking module 502 and a second sending module 503.
A first sending module 501 is configured to send an asset lock message to a second user.
The asset locking message comprises a hash value, a block chain identifier of a second user, an asset locking time point and an asset locking duration, wherein the hash value is a hash value corresponding to a random number generated by a first user; the first user is a user of a first blockchain, the second user is a user of a second blockchain, and the first blockchain and the second blockchain have one or more common nodes.
In the existing technology of partly block chain crossing, the transfer and exchange of assets among different block chain projects need to be realized by introducing a third-party transaction platform and establishing a corresponding centralized node for the third-party transaction platform, so that the cross-chain asset transfer and exchange are realized. However, the introduction of a centralized node of a third-party trading platform inevitably threatens the safety and credibility of the assets. Therefore, the asset locking message is sent to the second user by the first user, and the asset transfer and exchange among the cross-chain users are realized based on the asset locking message without introducing a third-party transaction platform, so that the on-chain asset transfer can be realized safely, reliably and efficiently, and the user experience is improved.
It should be noted that the first user has signed an intelligent contract with the second user before the first user sends the asset lock message to the second user. The content of the intelligent contract appoints the detailed rules of asset transfer and return between the first user and the second user, and the signing mode of the intelligent contract comprises on-chain signing and off-chain signing.
In one embodiment, it is assumed that there are two blockchains with different consensus mechanisms and creators, a first blockchain and a second blockchain, respectively, and that the first blockchain and the second blockchain have one or several common nodes. The common node is a node belonging to a first block chain and a second block chain at the same time, and the common node is provided with a corresponding block chain identifier and a block chain public and private key pair in the first block chain and the second block chain respectively. The first user is a user of the first block chain, the second user is a user of the second block chain, and the first user and the second user sign an intelligent contract in a chain-down mode. The intelligent contract appoints the detailed rules for transferring and returning assets between the first user and the second user, and the specific contents are as follows: the method comprises the steps that a first user sends an asset locking message to a second user, wherein the asset locking message comprises a hash value corresponding to a random number, a block chain identifier of the second user, an asset locking time point, an asset locking duration and the like; the first user and the second user lock the assets according to the content of the asset locking message; if the second user receives the correct random number sent by the first user within the specified time interval, the intelligent contract automatically carries out the operation of transferring the asset of the second user to the first user; and if the first user receives the asset of the second user and receives the correct random number returned by the second user within a specified time interval, the intelligent contract returns the asset of the second user received by the first user to the second user. According to the content of the smart contract, the first user generates a random number, locally calculates a hash value corresponding to the random number, and sends an asset locking message to the second user through the first sending module 501. Wherein the asset locking message comprises the hash value, the blockchain identification of the second user, an asset locking time point and an asset locking duration.
In one embodiment, a first user sends an asset locking message to a second user via a first sending module 501, comprising:
the first user signs the asset lock message with the first user's blockchain private key and broadcasts the asset lock message at the first blockchain. All nodes of the first block chain receive the asset locking message, after any common node receives the asset locking message, the account book of the first block chain is inquired through the block chain identification of the first user, the block chain public key of the first user is obtained, and signature verification is carried out on the asset locking message based on the block chain public key of the first user. And if the asset locking message signature passes the verification, the common node carries out secondary signature on the asset locking message by using a second block chain private key of the common node, and broadcasts the asset locking message after secondary signature in a second block chain. The second user receives an asset lock message broadcast by the common node on the second blockchain.
A locking module 502 for locking the asset of the first user according to the asset locking time point and the asset locking duration in the asset locking message.
Locking the asset of the first user may prevent a hacker from performing illegal transfers or the like of the asset of the first user.
In one embodiment, after the first user sends the asset locking message to the second user, the locking module 502 locks the asset of the first user after the asset locking time point is reached according to the asset locking time point and the asset locking duration in the asset locking message, and the locking duration is the asset locking duration in the asset locking message.
If the asset locking time point in the asset locking message is 2020, 1 month, 1 day, 00 point, 00 min, and the locking duration is 20 minutes, the locking module 502 locks the asset of the first user after the system time of the first blockchain reaches 2020, 1 month, 1 day, 00 point, 00 min and 00 seconds, and the locking duration is 20 minutes.
A second sending module 503, configured to send the verification random number to the second user, so that the second user verifies the accuracy of the asset locking message, and performs an asset transfer operation according to the accuracy verification result of the asset locking message.
Wherein the authentication random number is the same as the value of the random number in the asset lock message.
It should be noted that the manner in which the first user sends the verification random number to the second user includes an uplink sending manner and a downlink sending manner, where the downlink sending manner includes sending through a p2p (peer-to-peer) or a mobile switching network. Generally, in order to ensure the accuracy of receiving information by the second user, the verification random number is sent to the second user in a chain-down mode, so that whether the asset locking message received in a chain-up mode is illegally tampered can be verified, and the accuracy of receiving information can be ensured to a certain extent. It can be understood that, no matter what transmission method is adopted by the authentication random number, the transmission method is a transmission method that is agreed by the first user and the second user in advance.
In one embodiment, the first user sends the verification random number to the second user by a short message. And after receiving the short message sent by the first user, the second user acquires the verification random number, and calculates the hash value corresponding to the verification random number to acquire the verification hash value. The second user compares the verification hash value to the hash value in the asset lock message for consistency. And when the verification hash value is consistent with the hash value in the asset locking message, the accuracy verification of the asset locking message is passed, and the second user transfers the asset of the second user to the first user according to the content of the intelligent contract.
It should be noted that each module referred to in this embodiment is a logical module, and in practical applications, one logical unit may be one physical unit, may be a part of one physical unit, and may be implemented by a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, elements that are not so closely related to solving the technical problems proposed by the present invention are not introduced in the present embodiment, but this does not indicate that other elements are not present in the present embodiment.
It will be understood that the above embodiments are merely exemplary embodiments taken to illustrate the principles of the present invention, which is not limited thereto. It will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the spirit and substance of the invention, and these modifications and improvements are also considered to be within the scope of the invention.

Claims (10)

1. A block chain cross-chain method is applied to a first user and comprises the following steps:
sending an asset locking message to a second user; the asset locking message comprises a hash value, a blockchain identifier of the second user, an asset locking time point and an asset locking duration, wherein the hash value is a hash value corresponding to a random number generated by the first user; the first user is a user of a first blockchain, the second user is a user of a second blockchain, and the first blockchain and the second blockchain have one or more common nodes;
locking the asset of the first user according to the asset locking time point and the asset locking duration in the asset locking message;
and sending a verification random number to the second user so that the second user verifies the accuracy of the asset locking message, and executing an asset transfer operation according to the accuracy verification result of the asset locking message.
2. The blockchain inter-chaining method of claim 1, further comprising, prior to sending the asset lock message to the second user:
the first user and the second user sign an intelligent contract; and the intelligent contract appoints rules for transferring and returning the assets between the first user and the second user.
3. The blockchain inter-chaining method of claim 1, wherein said sending an asset lock message to a second user comprises:
broadcasting the asset lock message to the first blockchain to cause the common node to receive the asset lock message;
the common node broadcasts the asset lock message at the second blockchain so that the second user receives the asset broadcast message.
4. The blockchain inter-chain method of claim 1, further comprising, after sending the authentication random number to the second user:
if the accuracy verification of the asset locking message by the second user passes, receiving the asset of the second user transferred by the second user;
and if the verification random number returned by the second user is received within a preset time interval, transferring the asset of the second user back to the second user.
5. A block chain cross-chain method is applied to a second user and comprises the following steps:
receiving an asset locking message sent by a first user; the asset locking message comprises a hash value, a blockchain identifier of the second user, an asset locking time point and an asset locking duration, wherein the hash value is a hash value corresponding to a random number generated by the first user; the first user is a user of a first blockchain, the second user is a user of a second blockchain, and the first blockchain and the second blockchain have one or more common nodes;
locking the asset of the second user according to the asset locking time point and the asset locking duration in the asset locking message;
receiving a verification random number sent by the first user, and verifying the accuracy of the asset locking message based on the verification random number;
and when the accuracy verification of the asset locking message passes, transferring the asset of the second user to the first user.
6. The blockchain inter-chaining method of claim 5, wherein said receiving an asset lock message sent by a first user comprises:
the second blockchain receives the asset locking message broadcast by the common node and broadcasts in the second blockchain; wherein the asset locking message is a message broadcast by the first user in the first blockchain and received by the common node in the second blockchain;
receiving the asset lock message broadcast by the common node at the second blockchain.
7. The blockchain inter-chaining method of claim 5, wherein after receiving an asset locking message sent by a first user and before locking the asset of the second user according to the asset locking time point and the asset locking duration in the asset locking message, further comprising:
and performing signature verification on the asset locking message.
8. The blockchain inter-chaining method of claim 5, wherein said verifying the accuracy of said asset locking message based on said verification nonce comprises:
calculating a verification hash value corresponding to the verification random number;
comparing the verification hash value to a hash value in the asset lock message;
and if the verification hash value is consistent with the hash value in the asset locking message, the accuracy verification of the asset locking message is passed.
9. The blockchain inter-chain method of claim 5, wherein the asset of the second user that the first user transferred back is received if the second user returns the verification random number to the first user at a preset time interval.
10. A block chain cross-chain device applied to a first user comprises:
a first sending module for sending an asset locking message to a second user; the asset locking message comprises a hash value, a blockchain identifier of the second user, an asset locking time point and an asset locking duration, wherein the hash value is a hash value corresponding to a random number generated by the first user; the first user is a user of a first blockchain, the second user is a user of a second blockchain, and the first blockchain and the second blockchain have one or more common nodes;
a locking module, configured to lock the asset of the first user according to the asset locking time point and the asset locking duration in the asset locking message;
and the second sending module is used for sending a verification random number to the second user so that the second user verifies the accuracy of the asset locking message and executes asset transfer operation according to the accuracy verification result of the asset locking message.
CN202010245077.0A 2020-03-31 2020-03-31 Block chain cross-chain method and device Active CN111464536B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010245077.0A CN111464536B (en) 2020-03-31 2020-03-31 Block chain cross-chain method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010245077.0A CN111464536B (en) 2020-03-31 2020-03-31 Block chain cross-chain method and device

Publications (2)

Publication Number Publication Date
CN111464536A true CN111464536A (en) 2020-07-28
CN111464536B CN111464536B (en) 2022-06-07

Family

ID=71680933

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010245077.0A Active CN111464536B (en) 2020-03-31 2020-03-31 Block chain cross-chain method and device

Country Status (1)

Country Link
CN (1) CN111464536B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112104701A (en) * 2020-08-13 2020-12-18 北京新盛云佳科技有限公司 Cross-link communication method, device, network node and storage medium
CN112104607A (en) * 2020-08-13 2020-12-18 北京新盛云佳科技有限公司 Method, device, network node and storage medium for cross-link communication
CN112118292A (en) * 2020-08-13 2020-12-22 北京新盛云佳科技有限公司 Method, apparatus, network node and storage medium for cross-link communication
US20210342940A1 (en) * 2020-08-31 2021-11-04 Polymath Inc. Method, system, and medium for blockchain-enabled atomic settlement

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170046664A1 (en) * 2015-08-13 2017-02-16 The Toronto-Dominion Bank Systems and methods for tracking and transferring ownership of connected devices using blockchain ledgers
CN106899698A (en) * 2017-04-11 2017-06-27 张铮文 A kind of across chain mutual operation method between block chain
US20170366357A1 (en) * 2016-06-16 2017-12-21 The Bank Of New York Mellon Distributed, centrally authored block chain network
CN108629583A (en) * 2018-04-16 2018-10-09 上海分赋信息科技有限公司 Mapped system and correlation method of the digital asset on mapping chain are realized based on distributed computing technology
CN108900585A (en) * 2018-06-15 2018-11-27 浙江华信区块链科技服务有限公司 Across chain transaction consistency implementation method
CN109685489A (en) * 2018-12-28 2019-04-26 杭州云象网络技术有限公司 A kind of assets across chain method of commerce between block chain
CN110096903A (en) * 2019-03-26 2019-08-06 罗克佳华科技集团股份有限公司 Assets verification method and block chain network system based on block chain
CN110288344A (en) * 2019-06-25 2019-09-27 中国工商银行股份有限公司 The assets transfer method and device of transregional piece of chain
CN110555765A (en) * 2018-06-01 2019-12-10 厦门本能管家科技有限公司 Method and system for carrying out asset circulation among various block chains

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170046664A1 (en) * 2015-08-13 2017-02-16 The Toronto-Dominion Bank Systems and methods for tracking and transferring ownership of connected devices using blockchain ledgers
US20170366357A1 (en) * 2016-06-16 2017-12-21 The Bank Of New York Mellon Distributed, centrally authored block chain network
CN106899698A (en) * 2017-04-11 2017-06-27 张铮文 A kind of across chain mutual operation method between block chain
CN108629583A (en) * 2018-04-16 2018-10-09 上海分赋信息科技有限公司 Mapped system and correlation method of the digital asset on mapping chain are realized based on distributed computing technology
CN110555765A (en) * 2018-06-01 2019-12-10 厦门本能管家科技有限公司 Method and system for carrying out asset circulation among various block chains
CN108900585A (en) * 2018-06-15 2018-11-27 浙江华信区块链科技服务有限公司 Across chain transaction consistency implementation method
CN109685489A (en) * 2018-12-28 2019-04-26 杭州云象网络技术有限公司 A kind of assets across chain method of commerce between block chain
CN110096903A (en) * 2019-03-26 2019-08-06 罗克佳华科技集团股份有限公司 Assets verification method and block chain network system based on block chain
CN110288344A (en) * 2019-06-25 2019-09-27 中国工商银行股份有限公司 The assets transfer method and device of transregional piece of chain

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112104701A (en) * 2020-08-13 2020-12-18 北京新盛云佳科技有限公司 Cross-link communication method, device, network node and storage medium
CN112104607A (en) * 2020-08-13 2020-12-18 北京新盛云佳科技有限公司 Method, device, network node and storage medium for cross-link communication
CN112118292A (en) * 2020-08-13 2020-12-22 北京新盛云佳科技有限公司 Method, apparatus, network node and storage medium for cross-link communication
CN112104701B (en) * 2020-08-13 2024-04-19 河南中新国创商业运营管理有限公司 Method, device, network node and storage medium for cross-link communication
US20210342940A1 (en) * 2020-08-31 2021-11-04 Polymath Inc. Method, system, and medium for blockchain-enabled atomic settlement

Also Published As

Publication number Publication date
CN111464536B (en) 2022-06-07

Similar Documents

Publication Publication Date Title
CN111464536B (en) Block chain cross-chain method and device
CN111970129B (en) Data processing method and device based on block chain and readable storage medium
CN112003889B (en) Distributed cross-link system and cross-link information interaction and system access control method
CN113194469B (en) 5G unmanned aerial vehicle cross-domain identity authentication method, system and terminal based on block chain
CN108876374B (en) Block chain network identity document authentication method and system
Yang et al. Delegating authentication to edge: A decentralized authentication architecture for vehicular networks
CN112039872A (en) Cross-domain anonymous authentication method and system based on block chain
CN101286840B (en) Key distributing method and system using public key cryptographic technique
CN111191283B (en) Beidou positioning information security encryption method and device based on alliance block chain
CN100550738C (en) A kind of authentication method of distributed network and system
CN101136748A (en) Identification authentication method and system
CN109728896A (en) A kind of incoming call certification and source tracing method and process based on block chain
CN113850599B (en) Cross-link transaction method and system applied to alliance link
CN114338242B (en) Cross-domain single sign-on access method and system based on block chain technology
CN111222174A (en) Joining method, verification method, device and storage medium of block chain node
CN105450623A (en) Access authentication method of electric automobile
CN113746858A (en) Cross-chain communication method based on verifiable random function
CN112311779B (en) Data access control method and device applied to block chain system
CN115378604A (en) Identity authentication method of edge computing terminal equipment based on credit value mechanism
CN111582888B (en) Verification system for verifying authenticity of electronic deposit
CN114239072B (en) Block chain node management method and block chain network
CN115580488A (en) Vehicle-mounted network message authentication method based on block chain and physical unclonable function
CN113328854B (en) Service processing method and system based on block chain
CN101345995B (en) Terminal inter-network switch method, equipment and system
CN112235290B (en) Block chain-based Internet of things equipment management method and first Internet of things equipment

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