CN110706113A - Cross-block-chain data processing method, device, equipment and medium - Google Patents

Cross-block-chain data processing method, device, equipment and medium Download PDF

Info

Publication number
CN110706113A
CN110706113A CN201911283143.7A CN201911283143A CN110706113A CN 110706113 A CN110706113 A CN 110706113A CN 201911283143 A CN201911283143 A CN 201911283143A CN 110706113 A CN110706113 A CN 110706113A
Authority
CN
China
Prior art keywords
account
transfer
intelligent contract
resource
blockchain
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.)
Pending
Application number
CN201911283143.7A
Other languages
Chinese (zh)
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201911283143.7A priority Critical patent/CN110706113A/en
Publication of CN110706113A publication Critical patent/CN110706113A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/10Payment architectures specially adapted for electronic funds transfer [EFT] systems; specially adapted for home banking systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • 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
    • 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
    • H04L67/104Peer-to-peer [P2P] networks
    • 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

Landscapes

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

Abstract

The embodiment of the application provides a data processing method, a device, equipment and a medium for a cross-block chain, wherein the method comprises the following steps: in response to a resource transfer request on the first blockchain, acquiring a first intelligent contract on the first blockchain and a contract account of the first intelligent contract on the first blockchain; transferring the resource data of the transfer amount in the first account to a contract account by calling a first intelligent contract, and locking the resource data of the transfer amount in the contract account; and calling the first intelligent contract to send a resource transfer notice to a second intelligent contract on the second blockchain, wherein the resource transfer notice is used for informing the second intelligent contract to transfer the resource data of the transfer amount of the second intelligent contract in the reserve account on the second blockchain to the second account, and the first intelligent contract is associated with the second intelligent contract. The method and the device can effectively improve the safety of the data processing process of the trans-block chain.

Description

Cross-block-chain data processing method, device, equipment and medium
Technical Field
The present invention relates to the field of blockchain technology, and in particular, to the field of data processing based on blockchains, and more particularly, to a method and an apparatus for processing data across blockchains, a device and a medium for processing data across blockchains, and a computer storage medium.
Background
Different block chains have respective specifications, and due to the difference of the specifications among the block chains, the prior art cannot better support the data processing process of the cross-block chain. Currently, a data processing process for a cross-block chain is generally implemented through an intermediary, for example, a resource data (e.g., electronic money, bills, etc.) transfer processing process of the cross-block chain is taken as an example, if a user a on a block chain a requests to transfer resource data to a user B on a block chain B, the user a needs to resort to a third-party intermediary organization commonly approved by the block chain a and the block chain B, the user a first sends the resource data to the third-party intermediary organization, the third-party intermediary organization notifies the user B, and the user B obtains the resource data from the third-party intermediary organization. In the prior art, the data processing process of the cross-block chain needs to depend on a third-party intermediary organization, the data processing efficiency is low, and the data processing is limited by the credit problem of the third-party intermediary organization, and the data security is low.
Disclosure of Invention
The embodiment of the application provides a data processing method, a device, equipment and a medium for a cross-block chain, which can effectively improve the safety of the data processing process of the cross-block chain.
In one aspect, an embodiment of the present application provides a method for processing data across a block chain, including:
in response to a resource transfer request on a first blockchain, acquiring a first intelligent contract on the first blockchain and a contract account of the first intelligent contract on the first blockchain; the resource transfer request comprises a transfer amount, a first account on the first blockchain and a second account on a second blockchain, the resource transfer request is used for indicating that resource data is transferred from the first account to the second account;
invoking the first intelligent contract to transfer the transfer amount of resource data in the first account to the contract account and lock the transfer amount of resource data in the contract account; and the number of the first and second groups,
invoking the first intelligent contract to send a resource transfer notification to a second intelligent contract on the second blockchain, the resource transfer notification to notify the second intelligent contract to transfer the transfer amount of resource data of the second intelligent contract in the reserve account on the second blockchain to the second account, the first intelligent contract being associated with the second intelligent contract.
On the other hand, an embodiment of the present application provides a data processing method across a block chain, including:
obtaining a second intelligent contract on a second blockchain and a reserve account of the second intelligent contract on the second blockchain;
invoking the second intelligent contract to receive a resource transfer notification sent by a first intelligent contract on a first blockchain, wherein the resource transfer notification is sent by the first intelligent contract after transferring a transfer amount of resource data in a first account on the first blockchain to a contract account of the first intelligent contract on the first blockchain in response to a resource transfer request on the first blockchain and locking the transfer amount of resource data in the contract account; the resource transfer request comprises the transfer amount, the first account, and a second account on the second blockchain, the resource transfer request indicating a transfer of resource data from the first account to the second account; the first intelligent contract is associated with the second intelligent contract;
and calling the second intelligent contract according to the resource transfer notification to transfer the resource data of the transfer amount in the reserve account to the second account.
In another aspect, an embodiment of the present application provides a data processing apparatus across a block chain, including:
an obtaining unit, configured to obtain, in response to a resource transfer request on a first blockchain, a first intelligent contract on the first blockchain and a contract account of the first intelligent contract on the first blockchain; the resource transfer request comprises a transfer amount, a first account on the first blockchain and a second account on a second blockchain, the resource transfer request is used for indicating that resource data is transferred from the first account to the second account;
a processing unit, configured to invoke the first intelligent contract to transfer the resource data of the transfer amount in the first account to the contract account; locking the resource data of the transfer amount in the contract account; and the number of the first and second groups,
a sending unit, configured to invoke the first intelligent contract to send a resource transfer notification to a second intelligent contract on the second blockchain, where the resource transfer notification is used to notify the second intelligent contract to transfer the resource data of the transfer amount in the reserve account of the second intelligent contract on the second blockchain to the second account, and the first intelligent contract is associated with the second intelligent contract.
In another aspect, an embodiment of the present application provides a data processing apparatus across a block chain, including:
an obtaining unit, configured to obtain a second intelligent contract on a second blockchain and a reserve account of the second intelligent contract on the second blockchain;
a receiving unit, configured to invoke the second intelligent contract to receive a resource transfer notification sent by a first intelligent contract on a first blockchain, where the resource transfer notification is sent by the first intelligent contract after transferring a transfer amount of resource data in a first account on the first blockchain to a contract account of the first intelligent contract on the first blockchain in response to a resource transfer request on the first blockchain and locking the transfer amount of resource data in the contract account; the resource transfer request comprises the transfer amount, the first account, and a second account on the second blockchain, the resource transfer request indicating a transfer of resource data from the first account to the second account; the first intelligent contract is associated with the second intelligent contract;
and the processing unit is used for transferring the resource data of the transfer amount in the reserve account to the second account by calling the second intelligent contract according to the resource transfer notification.
On the other hand, an embodiment of the present application provides a data processing device across a block chain, including an input device and an output device, further including:
a processor adapted to implement one or more instructions; and the number of the first and second groups,
a computer storage medium having stored thereon one or more instructions adapted to be loaded by the processor and to execute the above-described method of data processing across a blockchain.
In another aspect, an embodiment of the present application provides a computer storage medium, where one or more instructions are stored, and the one or more instructions are adapted to be loaded by a processor and execute the above data processing method across block chains.
In the embodiment of the application, responding to a resource transfer request on a first blockchain by a first intelligent contract on the first blockchain, transferring resource data to be transferred in a first account into a contract account on the first blockchain, and locking the resource data of the transfer amount in the contract account; and then through the intercommunication between the first intelligent contract and the associated second intelligent contract across the block chain, the first intelligent contract sends a resource transfer notice to the second intelligent contract, so that the second intelligent contract transfers the resource data to be transferred in the reserve account of the second intelligent contract on the second block chain to the second account on the second block chain according to the resource transfer notice. Therefore, the resource data transfer processing between the user on the first block chain and the user on the second block chain is realized, the participation of a third party agent is not needed in the process, the data processing efficiency is high, and the data security can be effectively improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 illustrates an architecture diagram of a blockchain system provided by an exemplary embodiment of the present application;
FIG. 2 illustrates a block chain structure provided by an exemplary embodiment of the present application;
fig. 3 is a block chain network architecture diagram provided in an exemplary embodiment of the present application;
FIG. 4 depicts an architecture diagram of a data processing system across a blockchain as provided by an exemplary embodiment of the present application;
FIG. 5 is a flowchart illustrating a method for processing data across blockchains according to an exemplary embodiment of the present application;
FIG. 6 is a flowchart illustrating a method for data processing across blockchains according to another exemplary embodiment of the present application;
FIG. 7 is a block diagram of a data processing apparatus across a blockchain according to an exemplary embodiment of the present application;
FIG. 8 is a block diagram of a data processing apparatus across a blockchain according to another exemplary embodiment of the present application;
fig. 9 shows a schematic structural diagram of a data processing device across a blockchain according to an exemplary embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiments of the present application relate to blockchains. The block chain is a set of decentralized infrastructure with distributed storage characteristics, and particularly is a data structure formed by data blocks in a linked list-like manner according to a time sequence, so that data which are in a sequential relationship and can be verified in a system can be safely stored, and the data cannot be tampered and counterfeited in a cryptographic manner.
FIG. 1 illustrates an architecture diagram of a blockchain system provided by an exemplary embodiment of the present application; as shown in fig. 1, the architecture of the block chain system mainly includes 5 hierarchies of 101-105 in bottom-to-top order. Wherein:
(1) the informational data and Merkle (Merkle) tree are located at the bottom level 101. The message data here refers to the original data, such as transaction data, that is requested to be issued to the blockchain network, but has not yet formed blocks. The raw data needs further processing (e.g., verification by each node in the blockchain network, hashing, etc.) to be written into the block. The Merkle tree is an important component of the blockchain technology, the blockchain does not directly store the plaintext original data, and the original data needs to be hashed and stored in the form of a hash value. The merkel tree is used for organizing hash values formed by hashing a plurality of original data according to a binary tree structure and storing the hash values in a block of blocks.
(2) The blocks are located at level 102. Blocks, i.e. data blocks, into which the information data of the bottom layer 101 is written after further processing. The blocks are sequentially connected into a chain structure, namely a block chain is formed. FIG. 2 illustrates a block chain structure provided by an exemplary embodiment of the present application; as shown in fig. 2, block 201, block 202, and block 203 are connected in sequence in a chain structure. The block 202 is divided into a block header and a block body, where the block header includes the digest value of the previous block 201, the digest value of the current block 202, and the merkel (Merkle) root of the current block. The block body contains the complete data of this block 202 and is organized together in the form of a Merkle tree.
(3) The protocols and mechanisms followed by the blockchain are located at level 103. These protocols may include: P2P (Peer-to-Peer) protocol; mechanisms may include, but are not limited to: broadcast mechanism, consensus mechanism (including core mechanisms such as PoW (Proof Of office) mechanism, POS (Proof Of authority) mechanism).
(4) The blockchain network is located at level 104. The block chain network consists of a plurality of nodes; devices that may act as nodes may include, but are not limited to: a PC (Personal Computer), a server, an ore machine for bitcoin excavation design, a smart phone, a tablet Computer, a mobile Computer, and the like. Fig. 3 is a block chain network architecture diagram provided in an exemplary embodiment of the present application; in the figure, 7 nodes are taken as an example for explanation, each node in the block chain network is networked in a P2P mode, and the nodes communicate with each other according to a P2P protocol; all the nodes commonly follow a broadcasting mechanism and a consensus mechanism (including core mechanisms such as a PoW mechanism and a POS mechanism), so that the data on the block chain can be ensured to be not tampered and counterfeited, and meanwhile, the characteristics of decentralized and trust-removed block chains are realized.
(5) The smart contracts are located at upper layer 105. An intelligent contract is a set of scenarios-a countermeasure-type of programmed rules and logic, which is decentralized, information-shareable program code deployed on a blockchain. Each party signing the contract agrees on the contract content, and the contract is deployed in the block chain in the form of an intelligent contract, so that the contract can be automatically executed on behalf of each signing party without any central authority.
Due to the characteristics of decentralized, distributed storage, data non-falsification and non-falsification, more and more business activities (such as loan activities and financial transaction activities) are spread based on the blockchain technology, so as to ensure the fairness and the openness of the business activities by using the characteristics of the blockchain.
Currently, the types of blockchains may include: public chain (Public Blockchain), private chain (PrivateBlockchain), and federation chain (Consortium Blockchain). The public chain is disclosed externally, and anyone can join and access the block chain; the block on the public chain can be viewed by anyone, and the person can also initiate transaction on the public chain and participate in the consensus process of the public chain at any time. The private chain is only used in the private organization, and the read-write authority and the accounting participation authority on the block chain are formulated according to the private organization rule; typically for data management, auditing, etc. within an enterprise. The alliance chain is limited to the participation of alliance members, and the read-write authority and the participation accounting authority on the block chain are formulated according to the alliance rule; generally used in the scenes of trading, settlement or clearing among institutions. Two different types of blockchains have respective specifications, such as: the common mechanism in the public chain is usually the proof of work (PoW) or the proof of rights (PoS), while the common mechanism in the alliance chain is usually the proof of rights or the consensus algorithms such as pbft (practical Byzantine Fault tolerant), RAFT (a consensus algorithm). Two blockchains of the same type may also have differences in their respective management specifications, such as: for the federation chains, the consensus mechanism for one federation chain is a proof of rights and interests, while the sharing mechanism for the other federation chain is a PBFT consensus mechanism.
The embodiment of the application provides a data processing scheme of a cross-block chain, which is characterized in that a first intelligent contract is constructed on a first block chain, and the first intelligent contract comprises a resource transfer processing rule which needs to be followed when a user on the first block chain and a user on a second block chain carry out resource interconversion; constructing a second intelligent contract on the second block chain, wherein the second intelligent contract also comprises a resource transfer processing rule which needs to be followed when the user on the first block chain and the user on the second block chain carry out resource conversion; the first intelligent contract and the second intelligent contract have an association relationship. Locking, by the first intelligent contract, resource data to be transferred in response to a resource transfer request of a user on the first blockchain; and then through the mutual communication of the cross-block chains between the two related intelligent contracts, the first intelligent contract sends a resource transfer notice to the second intelligent contract, and the second intelligent contract transfers the resource data to be transferred to the user on the second block chain according to the resource transfer notice. Therefore, the resource data transfer processing between the user on the first block chain and the user on the second block chain is realized, the participation of a third party agent is not needed in the process, the data processing efficiency is high, and the data security can be effectively improved. Wherein the first blockchain and the second blockchain are two different blockchains, which may be the same type of blockchain, for example: the first blockchain may be a federation chain and the second blockchain may also be a federation chain. Both may also be different types of blockchains, e.g., a first blockchain may be a private chain and a second blockchain may be a federation chain. Resource data may include, but is not limited to: digital assets, tickets, electronic currency, and the like. The first intelligent contract and the second intelligent contract have an association relationship, which means that a resource transfer processing rule contained in the first intelligent contract is the same as a resource transfer processing rule contained in the second intelligent contract, and the resource transfer processing rule is a rule which is commonly recognized and followed by a user of the first block chain and a user of the second block chain. The first intelligent contract differs from the second intelligent contract in that: the first intelligent contract is formed by compiling the resource transfer processing rule according to the specification of the first block chain, and the first intelligent contract is executed on the first block chain; the second intelligent contract is formed by compiling the resource transfer processing rule according to the specification of the second block chain, and the second intelligent contract is executed on the second block chain.
FIG. 4 illustrates an architecture diagram of a data processing system across a blockchain as provided by an exemplary embodiment of the present application. As shown in fig. 4, the system includes a first blockchain system 401 and a second blockchain system 402, where the first blockchain system 401 includes a first blockchain 4011 and a plurality of first node devices 4012, and the second blockchain system 402 includes a second blockchain 4021 and a plurality of second node devices 4022. Wherein:
the first blockchain system 401 includes a plurality of registered first users, each first user generates a key pair (including a public key and a private key) of the first user when registering in the first blockchain system 401, the private key of the first user is safely kept by the first user, for example, the private key of the first user can be kept in the first node device 4012 used when registering the first user; the public key of the first user is disclosed in the first blockchain 4011, and each first node device 4012 in the first blockchain system 401 can obtain the public key of the first user from the first blockchain 4011. A first user who successfully registers will correspond to a first account on the first blockchain 4011, and the address of the first account is generated by the public key of the first user. In addition, a first intelligent contract is also deployed on the first blockchain 4011, and in particular, the first intelligent contract can be written into a certain block on the first blockchain 4011. And, the first smart contract deployed on the first blockchain 4011 also contains a key pair, the private key of which is kept in the first smart contract and does not allow anyone to invoke viewing; the public key of the first intelligent contract is disclosed in the first blockchain 4011, and the first intelligent contract also corresponds to an account, called a contract account, on the first blockchain 4011, and the address of the contract account is generated by the public key of the first intelligent contract. Typically, each first node device 4012 stores all blocks in the first blockchain 4011, i.e., each first node device 4012 stores a first intelligent contract that is executed in the first node device 4012.
Similarly, the second blockchain system 402 may also include a plurality of registered second users, and each second user generates a key pair (including a public key and a private key) of the second user when registering in the second blockchain system 402, where the private key of the second user is safely kept by the second user, for example, the private key of the second user may be kept in the second node device 4022 used when registering the second user; the public key of the second user is disclosed in second blockchain 4021, and each second node device 4022 in second blockchain system 402 can obtain the public key of the second user from second blockchain 4021. A second user who successfully registers will correspond to a second account on second blockchain 4021, the address of which is generated from the public key of the second user. In addition, a second intelligent contract is also deployed on second blockchain 4021, and specifically, the second intelligent contract can be written into a certain block on first blockchain 4021; also, a second smart contract deployed on second blockchain 4021 also contains a key pair, the private key of which is kept in the second smart contract and does not allow anyone to invoke viewing; the public key of the second intelligent contract is published on second blockchain 4021, and the second intelligent contract also corresponds to an account on second blockchain 4021, which is called a reserve account (the reserve account is the same in nature as the contract account described above, and a different name is used here only for distinguishing), and the address of the reserve account is generated from the public key of the second intelligent contract. Typically, each second node device 4022 stores all blocks in the second blockchain 4021, i.e., each second node device 4022 stores a second intelligent contract that is executed in the second node device 4022.
In the system shown in FIG. 4, a first intelligent contract is associated with a second intelligent contract, the first intelligent contract and the second intelligent contract are cooperated to execute a data processing flow across block chains, a first block chain 4011 opens a communication interface of the first block chain 4011 to a second intelligent contract, the first intelligent contract can mutually communicate with the second intelligent contract through a communication interface of the second block chain 4021, the second intelligent contract can mutually communicate with the first intelligent contract through the communication interface of the first block chain 4011, the second block chain 4021 can realize a communication basis for data processing of a cross block between the first block chain and the second block chain, as shown in FIG. 4, the data processing flow of the cross block chain related to the system can comprise ① that a first user (such as a user a) in the first block chain system 401 can issue a resource transfer request on the first block chain 4011 through a certain first node device 4012, the request can be transferred to the second intelligent contract on the second block chain, the second intelligent contract, the transfer of the second intelligent contract to the second intelligent contract is realized without the transfer of the resource processing account processing flow, the resource processing flow, the second intelligent contract is realized by the transfer of the second intelligent contract, the resource processing chain, the transfer of the second intelligent contract, the resource processing flow, the user account transfer of the second intelligent contract is realized by the transfer of the second intelligent contract, the resource processing block chain, the transfer of the resource processing chain, the transfer of the user account transfer process is realized by the user account transfer of the user account transfer process chain 4011, the transfer of the user, the user account transfer of the user account, the user account transfer of the user, the user is realized by the user, the transfer of the transfer process of the transfer of the user account transfer of the user, the transfer of the user account transfer of the user, the user account transfer of the user account of the user, the transfer process, the user, the transfer of the user account of the user, the user transfer of the user account of the transfer of the user transfer of the user account of the user, the user transfer of the user account transfer of the user transfer process of the user transfer of the user transfer process of the user account of the user transfer process is realized by the user, the user transfer of the user transfer process of the user transfer of the transfer process of the transfer of the user, the user of the user, the user transfer of the user of the transfer of the user transfer of the user, the user transfer process of the user transfer process of the user transfer process of the user transfer process of the user transfer of the user transfer process of the user transfer.
FIG. 5 is a flowchart illustrating a method for processing data across blockchains according to an exemplary embodiment of the present application; the method may be performed interactively by any first node device 4012 in the first blockchain system 401 shown in fig. 4 with any second node device 4022 in the second blockchain system 402. The method comprises the following steps S501-S507:
s501, responding to a resource transfer request on a first block chain, a first node device obtains a first intelligent contract on the first block chain and a contract account of the first intelligent contract on the first block chain; the resource transfer request includes a transfer amount, a first account on the first blockchain, and a second account on the second blockchain, the resource transfer request indicating a transfer of resource data from the first account to the second account.
S502, the first node device calls the first intelligent contract to transfer the resource data of the transfer amount in the first account to the contract account.
In steps S501-S502, the resource transfer request is initiated by a first user in the first block chain system, and the first user may send the resource transfer request to the first node device by using a terminal device (e.g., a PC (Personal Computer), a mobile phone, a PDA (tablet Computer), etc.). It can be understood that, when the terminal device of the first user is itself the first node device in the first blockchain network where the first blockchain is located, the first user may directly perform the resource transfer operation on the first node device to initiate the resource transfer request. The first node device issues a resource transfer request to the first block chain (i.e. uplink), the resource transfer request triggers execution of a first intelligent contract, the first intelligent contract is invoked for execution in the first node device, and the first intelligent contract deducts the resource data of the transfer amount from the first account and simultaneously stores the resource data of the transfer amount into the contract account.
S503, the first node device locks the resource data of the transfer amount in the contract account.
Since the transfer amount of resource data is data to be transferred to the second blockchain for use, the transfer amount of resource data needs to be locked when successfully transferred to the contract account. The locking means that the resource data of the transfer amount cannot circulate on the first block chain, and neither of the first node devices can access, transfer, or perform any other processing on the resource data of the transfer amount. In a specific implementation, the resource data of the transfer amount in the contract account is stored in an encrypted manner by using the public key of the first intelligent contract, and if the resource data of the transfer amount is to be acquired, the resource data needs to be decrypted and acquired by using the private key of the first intelligent contract. However, since the private key of the first intelligent contract is stored in the first intelligent contract and the private key is not allowed to be called and viewed by anyone, that is, any one of the first node devices cannot obtain the private key of the first intelligent contract, and cannot decrypt the resource data of the transfer amount in the contract account, and further cannot obtain the resource data of the transfer amount, it is ensured that the resource data of the transfer amount cannot be circulated on the first block chain.
S504, the first node device calls the first intelligent contract to send a resource transfer notice to a second intelligent contract on the second block chain. The first intelligent contract is associated with a second intelligent contract. The resource transfer notification is to notify the second intelligent contract to transfer resource data of a transfer amount of the second intelligent contract into the reserve account on the second blockchain to the second account.
And S505, the second node device acquires a second intelligent contract on the second blockchain and a reserve account of the second intelligent contract on the second blockchain.
And S506, the second node device calls the second intelligent contract to receive the resource transfer notification sent by the first intelligent contract on the first blockchain.
In steps S505-S506, when the resource transfer notification sent by the first intelligent contract is successfully sent to the second block chain, the resource transfer notification triggers execution of the second intelligent contract, and the second intelligent contract is invoked to be executed in the second node device, and receives the resource transfer notification sent by the first intelligent contract. At least the transfer amount and the address of the second account should be included in the resource transfer notification.
And S507, calling a second intelligent contract according to the resource transfer notification to transfer the resource data of the transfer amount in the reserve account to the second account.
The resource data in the reserve account may be stored in the reserve account by way of issuance. In addition, as described above, the properties of the reserve account and the contract account are the same, that is, when the second user in the second blockchain system performs resource transfer to the first user in the first blockchain system, the second intelligent contract date transfers the resource data in the second account to the reserve account first, so that the resource data in the reserve account can also be stored in the reserve account by a resource transfer manner. Of course, the resource data in the reserve account may also be manually stored into the reserve account by the user (the administrative user of the second smart contract). The second intelligent contract deducts the resource data of the transfer amount from the reserve account according to the resource transfer notification, and stores the resource data of the transfer amount into the second account.
In the embodiment of the application, responding to a resource transfer request on a first blockchain by a first intelligent contract on the first blockchain, transferring resource data to be transferred in a first account into a contract account on the first blockchain, and locking the resource data of the transfer amount in the contract account; and then through the intercommunication between the first intelligent contract and the associated second intelligent contract across the block chain, the first intelligent contract sends a resource transfer notice to the second intelligent contract, so that the second intelligent contract transfers the resource data to be transferred in the reserve account of the second intelligent contract on the second block chain to the second account on the second block chain according to the resource transfer notice. Therefore, the resource data transfer processing between the user on the first block chain and the user on the second block chain is realized, the participation of a third party agent is not needed in the process, the data processing efficiency is high, and the data security can be effectively improved.
FIG. 6 is a flowchart illustrating a method for data processing across blockchains according to another exemplary embodiment of the present application; the method may be performed interactively by any first node device 4012 in the first blockchain system 401 shown in fig. 4 with any second node device 4022 in the second blockchain system 402. The method comprises the following steps S601-S616:
s601, responding to the resource transfer request on the first block chain, the first node equipment acquires a first intelligent contract on the first block chain and a contract account of the first intelligent contract on the first block chain; the resource transfer request includes a transfer amount, a first account on the first blockchain, and a second account on the second blockchain, the resource transfer request indicating a transfer of the resource data from the first account to the second account.
S602, the first node device calls a first intelligent contract to detect whether the quantity of the residual resource data in the first account is larger than or equal to the transfer quantity; if the detection result is yes, that is, the amount of the remaining resource data in the first account is greater than or equal to the transfer amount, the step S603 is executed; otherwise, outputting a prompt of resource transfer failure and ending the process.
S603, the first node device calls the first intelligent contract to transfer the resource data of the transfer amount in the first account to the contract account.
S604, the first node device locks the resource data of the transfer amount in the contract account.
S605, the first node device invokes the first intelligent contract to send a resource transfer notification to a second intelligent contract on the second blockchain. The first intelligent contract is associated with a second intelligent contract.
In an embodiment, a storage space of the first node device stores a communication interface of the second blockchain, and the first node device may first obtain the communication interface of the second blockchain from the local storage space; and then the intelligent contract is called and operated, and a resource transfer notice is sent to the second intelligent contract through the communication interface of the second block chain. In another embodiment, the address of the communication interface of the second blockchain may be written into the first intelligent contract in advance, and in the process of invoking and executing the first intelligent contract, the first intelligent contract may send a resource transfer notification to the second intelligent contract according to the address of the communication interface of the second blockchain written in advance. The resource transfer notification is to notify the second intelligent contract to transfer resource data of the second intelligent contract to the second account for a transfer amount in the reserve account on the second blockchain. The resource transfer notification includes at least the transfer amount and the address of the second account.
S606, the second node device obtains the second intelligent contract on the second blockchain and the reserve account of the second intelligent contract on the second blockchain.
S607, the second node device invokes the second intelligent contract to receive the resource transfer notification sent by the first intelligent contract on the first blockchain.
And S608, the second node device detects whether the second intelligent contract has the resource issuing authority of the second block chain. If the second intelligent contract has the resource issuing authority of the second block chain, the step S609 is carried out; if the second intelligent contract does not have the resource issuing authority of the second block chain, step S611 is performed.
If the second intelligent contract has the resource issuing authority, the resource data can be stored in the reserve account in a resource issuing mode. If the second intelligent contract does not have the resource issuing authority, the resource data cannot be stored in the reserve account in a resource issuing mode. All node devices in the second blockchain system commonly maintain the resource issuing authority of the second blockchain, when the second intelligent contract applies for obtaining the resource issuing authority of the second blockchain, the application is broadcasted to all the second node devices in the second blockchain system, and if all the second node devices (or more than a preset number, such as more than 51% or more than 2/3 of the second node devices) are identical to the second intelligent contract and open the resource issuing authority, the second intelligent contract obtains and has the resource issuing authority of the second blockchain; otherwise the second intelligent contract does not have the resource issuing authority of the second block chain.
And S609, the second node device calls the second intelligent contract to issue the resource data of the transfer amount to the reserve account.
S610, after the issuing is successful, the second node equipment calls a second intelligent contract to transfer the resource data of the transfer amount in the reserve account to the second account; proceed to step S615.
In steps S609-S610, if the second smart contract has the resource issuance authority of the second block chain, the resource data of the transfer amount may be stored in the address of the reserve account in a resource issuance manner, and the resource data of the transfer amount may be transferred to the second account. In this case, the second node apparatus may not detect the amount of remaining resource data in the reserve account in advance.
S611, the second node device calls a second intelligent contract to detect whether the quantity of the residual resource data in the reserve account is larger than or equal to the transfer quantity; if the detection result is yes, that is, the amount of the remaining resource data in the reserve account is greater than or equal to the transfer amount, the step S612 is executed; otherwise, the process proceeds to step S613.
S612, the second node equipment calls a second intelligent contract to transfer the resource data of the transfer amount in the reserve account to the second account; proceed to step S615.
S613, the second node device obtains a difference between the amount of remaining resource data in the reserve account and the transfer amount.
And S614, the second node equipment stores the resource data which is not less than the difference value into the reserve account, and calls a second intelligent contract to transfer the resource data of the transfer amount in the reserve account to the second account after the storage is successful.
In steps S611 to S614, if the second intelligent contract does not have the resource issuing authority of the second block chain, the resource data of the transfer amount may not be stored into the address of the reserve account in the resource issuing manner. At this time, in order to ensure that the resource transfer processing can be successfully completed, the second node device needs to first detect whether the amount of the remaining resource data in the reserved account is sufficient (i.e., whether the amount of the remaining resource data is greater than or equal to the transfer amount), and if so, the second intelligent contract can be directly called to transfer the resource data of the transfer amount in the reserved account to the second account; if the difference is not enough, recharging and transferring are needed, namely the second device needs to store the resource data which are not less than the difference value into the address of the reserve account, and then the second intelligent contract is called to transfer the resource data of the transfer amount in the reserve account to the second account.
And S615, if the resource data of the transfer amount in the reserve account is successfully transferred to the second account, the second node equipment calls the second intelligent contract to send a feedback notice of successful resource transfer to the first intelligent contract. And the second intelligent contract calls the communication interface of the first block chain to send a feedback notice of successful resource transfer to the first intelligent contract.
And S616, if the feedback notice of successful resource transfer sent by the second intelligent contract is received, the first node device destroys the resource data of the transfer amount in the contract account.
Step S616 is an optional step, and if receiving the feedback notification of successful resource transfer sent by the second intelligent contract, it indicates that this resource transfer is completed, and the first node device may destroy the resource data of the transfer amount in the contract account, so as to completely stop the circulation of the resource data of the transfer amount in the first block. Of course, the first node device may also not destroy the resource data of the transfer amount in the contract account, for example, may agree in the first intelligent contract, the resource data of the transfer amount in the contract account may serve as a reserve, and when the second user in the second blockchain system performs the resource transfer process to the first user in the first blockchain system, the resource data of the transfer amount is transferred to the first account after being unlocked from the contract account; the function of the contract account is consistent with the function of the reserve account.
The following describes in detail a flow of the data processing method across block chains according to an embodiment of the present application, where the specific flow includes the following steps (1) to (7):
(1) a first user (user a) in a first blockchain system initiates a resource transfer request to a first node device (such as a mobile phone A) to request to transfer 100-element electronic money to a second user (user b) in a second blockchain system; the resource transfer request comprises a transfer amount of 100 yuan, a first account of a user a on a first blockchain and a second account of a user b on a second blockchain. In response to the resource transfer request, the mobile phone a obtains a first intelligent contract and a contract account M on the first blockchain.
(2) The mobile phone A calls a first intelligent contract to transfer 100-yuan electronic money from a first account to a contract account, and then the 100-yuan electronic money in the contract account is locked.
(3) The first intelligent contract invokes a communication interface of the second blockchain to send a resource transfer notification to a second intelligent contract on the second blockchain.
(4) The second node device (e.g., computer B) invokes the second intelligent contract to receive the resource transfer notification.
(5) And the computer B detects whether the second intelligent contract has the resource issuing authority of the second block chain according to the resource transfer notification, if so, the second intelligent contract is called to directly issue 100-yuan electronic money to the reserve account, and after the 100-yuan electronic money in the reserve account is successfully issued, the 100-yuan electronic money is transferred to the second account.
(6) If the second intelligent contract does not have the resource issuing authority of the second block chain, the computer B detects whether the quantity of the electronic money left in the reserve account is greater than or equal to 100 yuan, and if so, the computer B directly calls the second intelligent contract to transfer the 100 yuan electronic money in the reserve account to the second account; if the electronic money is smaller than the preset value, the electronic money is firstly deposited into the reserve account, so that the quantity of the electronic money left in the reserve account is larger than or equal to 100 yuan, and then 100 yuan of electronic money is transferred from the reserve account to a second account; and completing the whole resource transfer process.
(7) The second intelligent contract may send a feedback notification of successful resource transfer to the first intelligent contract, and the mobile phone a may destroy the 100-dollar electronic money in the contract account, or set that the 100-dollar electronic money can only be used as a reserve money when the second user in the second blockchain system performs resource transfer processing to the first user in the first blockchain system.
In the embodiment of the application, responding to a resource transfer request on a first blockchain by a first intelligent contract on the first blockchain, transferring resource data to be transferred in a first account into a contract account on the first blockchain, and locking the resource data of the transfer amount in the contract account; and then through the intercommunication between the first intelligent contract and the associated second intelligent contract across the block chain, the first intelligent contract sends a resource transfer notice to the second intelligent contract, so that the second intelligent contract transfers the resource data to be transferred in the reserve account of the second intelligent contract on the second block chain to the second account on the second block chain according to the resource transfer notice. Therefore, the resource data transfer processing between the user on the first block chain and the user on the second block chain is realized, the participation of a third party agent is not needed in the process, the data processing efficiency is high, and the data security can be effectively improved.
FIG. 7 is a block diagram of a data processing apparatus across a blockchain according to an exemplary embodiment of the present application; the data processing apparatus of the cross blockchain may be a computer program (including program code) running in any one of the first node devices 4012 in the first blockchain system 401 shown in fig. 4, for example, the data processing apparatus of the cross blockchain may be an application software in the first node device 4012; the data processing apparatus across block chains may be used to perform the corresponding steps in the methods shown in fig. 5-6. Referring to fig. 7, the data processing apparatus across block chains includes the following units:
an obtaining unit 701, configured to obtain, in response to a resource transfer request on a first blockchain, a first intelligent contract on the first blockchain and a contract account on the first blockchain for the first intelligent contract; the resource transfer request includes a transfer amount, a first account on the first blockchain, and a second account on the second blockchain, the resource transfer request indicating a transfer of the resource data from the first account to the second account.
A processing unit 702, configured to invoke a first intelligent contract to transfer resource data of a transfer amount in a first account to a contract account; locking the resource data of the transfer amount in the contract account; and the number of the first and second groups,
a sending unit 703 is configured to invoke the first intelligent contract to send a resource transfer notification to a second intelligent contract on the second blockchain, where the resource transfer notification is used to notify the second intelligent contract to transfer the resource data of the transfer amount in the reserved account on the second blockchain to the second account, and the first intelligent contract is associated with the second intelligent contract.
In one embodiment, the processing unit 702 is further configured to:
calling a first intelligent contract to detect whether the quantity of the residual resource data in the first account is larger than or equal to the transfer quantity;
if the quantity of the remaining resource data in the first account is larger than or equal to the transfer amount, executing a step of transferring the resource data of the transfer amount in the first account to a contract account by calling a first intelligent contract;
and if the quantity of the remaining resource data in the first account is less than the transfer quantity, outputting a prompt of failure of resource transfer.
In another embodiment, the sending unit 703 is specifically configured to:
acquiring a communication interface of a second block chain;
and running the first intelligent contract and calling the communication interface of the second block chain to send a resource transfer notice to the second intelligent contract.
In another embodiment, the processing unit 702 is further configured to:
and if a feedback notice of successful resource transfer sent by the second intelligent contract is received, destroying the resource data of the transfer amount in the contract account.
According to an embodiment of the present invention, the units in the data processing apparatus across the block chain shown in fig. 7 may be respectively or entirely combined into one or several other units to form the unit, or some unit(s) therein may be further split into multiple units with smaller functions to form the unit(s), which may achieve the same operation without affecting the achievement of the technical effect of the embodiment of the present invention. The units are divided based on logic functions, and in practical application, the functions of one unit can be realized by a plurality of units, or the functions of a plurality of units can be realized by one unit. In other embodiments of the present application, the data processing apparatus across block chains may also include other units, and in practical applications, these functions may also be implemented by assistance of other units, and may be implemented by cooperation of a plurality of units. According to another embodiment of the present application, a data processing apparatus across a block chain as shown in fig. 7 may be constructed by running a computer program (including program codes) capable of executing steps involved in the respective methods shown in fig. 5 to 6 on a general-purpose computing device such as a computer including a processing element such as a Central Processing Unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM), and a storage element, and a data processing method across a block chain of an embodiment of the present application may be implemented. The computer program may be recorded on a computer-readable recording medium, for example, and loaded and executed in the above-described computing apparatus via the computer-readable recording medium.
In the embodiment of the application, responding to a resource transfer request on a first blockchain by a first intelligent contract on the first blockchain, transferring resource data to be transferred in a first account into a contract account on the first blockchain, and locking the resource data of the transfer amount in the contract account; and then through the intercommunication between the first intelligent contract and the associated second intelligent contract across the block chain, the first intelligent contract sends a resource transfer notice to the second intelligent contract, so that the second intelligent contract transfers the resource data to be transferred in the reserve account of the second intelligent contract on the second block chain to the second account on the second block chain according to the resource transfer notice. Therefore, the resource data transfer processing between the user on the first block chain and the user on the second block chain is realized, the participation of a third party agent is not needed in the process, the data processing efficiency is high, and the data security can be effectively improved.
FIG. 8 is a block diagram of a data processing apparatus across a blockchain according to another exemplary embodiment of the present application; the data processing apparatus of the cross blockchain may be a computer program (including program code) running in any one of the second node devices 4022 in the second blockchain system 402 shown in fig. 4, for example, the data processing apparatus of the cross blockchain may be an application software in the second node device 4022; the data processing apparatus across block chains may be used to perform the corresponding steps in the methods shown in fig. 5-6. Referring to fig. 8, the data processing apparatus across block chains includes the following units:
an obtaining unit 801, configured to obtain a second intelligent contract on the second blockchain and a reserve account of the second intelligent contract on the second blockchain;
a receiving unit 802, configured to invoke a second intelligent contract to receive a resource transfer notification sent by a first intelligent contract on a first blockchain, where the resource transfer notification is sent by the first intelligent contract after transferring a transfer amount of resource data in a first account on the first blockchain to a contract account on the first blockchain in response to a resource transfer request on the first blockchain and locking the transfer amount of resource data in the contract account; the resource transfer request comprises a transfer amount, a first account and a second account on the second blockchain, and the resource transfer request is used for indicating that the resource data is transferred from the first account to the second account; the first intelligent contract is associated with a second intelligent contract;
and the processing unit 803 is configured to invoke a second intelligent contract according to the resource transfer notification to transfer the resource data of the transfer amount in the reserve account to the second account.
In one embodiment, the processing unit 803 is further configured to:
and detecting whether the second intelligent contract has the resource issuing authority of the second block chain.
In another embodiment, the processing unit 803 is specifically configured to:
if the second intelligent contract has the resource issuing authority of the second block chain, calling the second intelligent contract to issue the resource data of the transfer amount to the reserve account;
and after the successful issuance, calling a second intelligent contract to transfer the resource data of the transfer amount in the reserve account to the second account.
In another embodiment, the processing unit 803 is specifically configured to:
if the second intelligent contract does not have the resource issuing authority of the second block chain, calling the second intelligent contract to detect whether the quantity of the residual resource data in the reserve account is larger than or equal to the transfer quantity;
and if the quantity of the residual resource data in the reserve account is larger than or equal to the transfer amount, calling a second intelligent contract to transfer the resource data of the transfer amount in the reserve account to the second account.
In another embodiment, the processing unit 803 is specifically configured to:
if the quantity of the residual resource data in the reserve account is smaller than the transfer amount, acquiring a difference value between the quantity of the residual resource data in the reserve account and the transfer amount;
and storing the resource data not less than the difference value into the reserve account, and calling a second intelligent contract to transfer the resource data of the transfer amount in the reserve account to the second account after the resource data is successfully stored.
In another embodiment, the processing unit 803 is further configured to:
and if the resource data of the transfer amount in the reserve account is successfully transferred to the second account, calling the second intelligent contract to send a feedback notice of successful resource transfer to the first intelligent contract.
According to an embodiment of the present invention, the units in the data processing apparatus across the block chain shown in fig. 8 may be respectively or entirely combined into one or several other units to form the unit, or some unit(s) therein may be further split into multiple units with smaller functions to form the unit(s), which may achieve the same operation without affecting the achievement of the technical effect of the embodiment of the present invention. The units are divided based on logic functions, and in practical application, the functions of one unit can be realized by a plurality of units, or the functions of a plurality of units can be realized by one unit. In other embodiments of the present application, the data processing apparatus across block chains may also include other units, and in practical applications, these functions may also be implemented by assistance of other units, and may be implemented by cooperation of a plurality of units. According to another embodiment of the present application, the data processing apparatus across a block chain as shown in fig. 8 may be constructed by running a computer program (including program codes) capable of executing the steps involved in the respective methods as shown in fig. 5 to 6 on a general-purpose computing device such as a computer including a Central Processing Unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM), and the like, and a storage element, and the data processing method across a block chain of the embodiment of the present application may be implemented. The computer program may be recorded on a computer-readable recording medium, for example, and loaded and executed in the above-described computing apparatus via the computer-readable recording medium.
In the embodiment of the application, responding to a resource transfer request on a first blockchain by a first intelligent contract on the first blockchain, transferring resource data to be transferred in a first account into a contract account on the first blockchain, and locking the resource data of the transfer amount in the contract account; and then through the intercommunication between the first intelligent contract and the associated second intelligent contract across the block chain, the first intelligent contract sends a resource transfer notice to the second intelligent contract, so that the second intelligent contract transfers the resource data to be transferred in the reserve account of the second intelligent contract on the second block chain to the second account on the second block chain according to the resource transfer notice. Therefore, the resource data transfer processing between the user on the first block chain and the user on the second block chain is realized, the participation of a third party agent is not needed in the process, the data processing efficiency is high, and the data security can be effectively improved.
Fig. 9 shows a schematic structural diagram of a data processing device across a blockchain according to an exemplary embodiment of the present application. Referring to fig. 9, the data processing device across a blockchain includes at least a processor 901, an input device 902, an output device 903, and a computer storage medium 904. The processor 901, the input device 902, the output device 903, and the computer storage medium 904 may be connected by a bus or other means. A computer storage medium 904 may be stored in the memory of the terminal, the computer storage medium 904 being used for storing a computer program comprising program instructions, the processor 901 being used for executing the program instructions stored by the computer storage medium 904. The processor 901 (or CPU) is a computing core and a control core of a data Processing device across block chains, and is adapted to implement one or more instructions, and in particular, is adapted to load and execute one or more instructions to implement a corresponding method flow or a corresponding function.
An embodiment of the present application further provides a computer storage medium (Memory), which is a Memory device in a data processing device across a block chain and is used to store programs and data. It will be appreciated that the computer storage medium herein may comprise both a built-in storage medium in a data processing device across a blockchain, and of course may also comprise an extended storage medium supported by a data processing device across a blockchain. The computer storage medium provides a storage space that stores operating systems of the data processing devices across the blockchain. Also stored in this memory space are one or more instructions, which may be one or more computer programs (including program code), suitable for loading and execution by processor 901. The computer storage medium may be a high-speed RAM memory, or may be a non-volatile memory (non-volatile memory), such as at least one disk memory; and optionally at least one computer storage medium located remotely from the processor.
In one embodiment, the data processing device across the blockchain may be any one of the first node devices 4012 in the first blockchain system 401 shown in fig. 4; the computer storage medium has one or more first instructions stored therein; one or more first instructions stored in a computer storage medium are loaded and executed by the processor 901 to implement corresponding steps in the above data processing method embodiment of crossing block chains; in particular implementations, one or more first instructions in the computer storage medium are loaded by the processor 901 and perform the following steps:
in response to a resource transfer request on the first blockchain, acquiring a first intelligent contract on the first blockchain and a contract account of the first intelligent contract on the first blockchain; the resource transfer request comprises a transfer amount, a first account on the first blockchain and a second account on the second blockchain, and the resource transfer request is used for indicating that the resource data is transferred from the first account to the second account;
transferring the resource data of the transfer amount in the first account to a contract account by calling a first intelligent contract, and locking the resource data of the transfer amount in the contract account; and the number of the first and second groups,
and calling the first intelligent contract to send a resource transfer notice to a second intelligent contract on the second blockchain, wherein the resource transfer notice is used for informing the second intelligent contract to transfer the resource data of the transfer amount of the second intelligent contract in the reserve account on the second blockchain to the second account, and the first intelligent contract is associated with the second intelligent contract.
In one embodiment, before one or more first instructions in the computer storage medium are loaded by processor 901 and the step of invoking the first intelligent contract to transfer the transfer amount of resource data in the first account to the contract account is performed, the following steps are also performed:
calling a first intelligent contract to detect whether the quantity of the residual resource data in the first account is larger than or equal to the transfer quantity;
if the quantity of the remaining resource data in the first account is larger than or equal to the transfer amount, executing a step of transferring the resource data of the transfer amount in the first account to a contract account by calling a first intelligent contract;
and if the number of the resources is less than the preset threshold, outputting a prompt of resource transfer failure.
In another embodiment, when one or more first instructions in the computer storage medium are loaded by processor 901 and the step of invoking a first intelligent contract to send a resource transfer notification to a second intelligent contract associated with the first intelligent contract is performed, the following steps are specifically performed:
acquiring a communication interface of a second block chain;
and running the first intelligent contract and calling the communication interface of the second block chain to send a resource transfer notice to the second intelligent contract.
In another embodiment, one or more first instructions in a computer storage medium are loaded by processor 901 and further perform the steps of: and if a feedback notice of successful resource transfer sent by the second intelligent contract is received, destroying the resource data of the transfer amount in the contract account.
In another embodiment, the data processing device across blockchains may be any one of the second node devices 4022 in the second blockchain system 402 shown in fig. 4; the computer storage medium has one or more first instructions stored therein; one or more first instructions stored in a computer storage medium are loaded and executed by the processor 901 to implement corresponding steps in the above data processing method embodiment of crossing block chains; in particular implementations, one or more first instructions in the computer storage medium are loaded by the processor 901 and perform the following steps:
acquiring a second intelligent contract on the second block chain and a reserve account of the second intelligent contract on the second block chain;
invoking a second intelligent contract to receive a resource transfer notification sent by a first intelligent contract on a first blockchain, wherein the resource transfer notification is sent by the first intelligent contract after the first intelligent contract transfers the transfer amount of resource data in a first account on the first blockchain to a contract account on the first blockchain in response to a resource transfer request on the first blockchain and locks the transfer amount of resource data in the contract account; the resource transfer request comprises a transfer amount, a first account and a second account on the second blockchain, and the resource transfer request is used for indicating that the resource data is transferred from the first account to the second account; the first intelligent contract is associated with a second intelligent contract;
and calling a second intelligent contract according to the resource transfer notice to transfer the resource data of the transfer amount in the reserve account to the second account.
In one embodiment, before the step of invoking the second smart contract to transfer the resource data of the transfer amount in the reserve account to the second account according to the resource transfer notification is carried out, one or more first instructions in the computer storage medium are loaded by processor 901 and the following steps are further carried out:
and detecting whether the second intelligent contract has the resource issuing authority of the second block chain.
In another embodiment, when one or more first instructions in the computer storage medium are loaded by the processor 901 and the step of transferring the resource data of the transfer amount in the reserve account to the second account by invoking the second intelligent contract according to the resource transfer notification is executed, the following steps are specifically executed:
if the second intelligent contract has the resource issuing authority of the second block chain, calling the second intelligent contract to issue the resource data of the transfer amount to the reserve account;
and after the successful issuance, calling a second intelligent contract to transfer the resource data of the transfer amount in the reserve account to the second account.
In another embodiment, when one or more first instructions in the computer storage medium are loaded by the processor 901 and the step of transferring the resource data of the transfer amount in the reserve account to the second account by invoking the second intelligent contract according to the resource transfer notification is executed, the following steps are specifically executed:
if the second intelligent contract does not have the resource issuing authority of the second block chain, calling the second intelligent contract to detect whether the quantity of the residual resource data in the reserve account is larger than or equal to the transfer quantity;
and if the quantity of the residual resource data in the reserve account is larger than or equal to the transfer amount, calling a second intelligent contract to transfer the resource data of the transfer amount in the reserve account to the second account.
In another embodiment, when one or more first instructions in the computer storage medium are loaded by processor 901 and the step of transferring the resource data of the transfer amount in the reserve account to the second account according to the resource transfer notification is executed, the following steps are further executed:
if the quantity of the residual resource data in the reserve account is smaller than the transfer amount, acquiring a difference value between the quantity of the residual resource data in the reserve account and the transfer amount;
and storing the resource data not less than the difference value into the reserve account, and calling a second intelligent contract to transfer the resource data of the transfer amount in the reserve account to the second account after the resource data is successfully stored.
In another embodiment, one or more first instructions in a computer storage medium are loaded by processor 901 and further perform the steps of: and if the resource data of the transfer amount in the reserve account is successfully transferred to the second account, calling the second intelligent contract to send a feedback notice of successful resource transfer to the first intelligent contract.
In the embodiment of the application, responding to a resource transfer request on a first blockchain by a first intelligent contract on the first blockchain, transferring resource data to be transferred in a first account into a contract account on the first blockchain, and locking the resource data of the transfer amount in the contract account; and then through the intercommunication between the first intelligent contract and the associated second intelligent contract across the block chain, the first intelligent contract sends a resource transfer notice to the second intelligent contract, so that the second intelligent contract transfers the resource data to be transferred in the reserve account of the second intelligent contract on the second block chain to the second account on the second block chain according to the resource transfer notice. Therefore, the resource data transfer processing between the user on the first block chain and the user on the second block chain is realized, the participation of a third party agent is not needed in the process, the data processing efficiency is high, and the data security can be effectively improved.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.

Claims (14)

1. A method for processing data across block chains, comprising:
in response to a resource transfer request on a first blockchain, acquiring a first intelligent contract on the first blockchain and a contract account of the first intelligent contract on the first blockchain; the resource transfer request comprises a transfer amount, a first account on the first blockchain and a second account on a second blockchain, the resource transfer request is used for indicating that resource data is transferred from the first account to the second account;
invoking the first intelligent contract to transfer the transfer amount of resource data in the first account to the contract account and lock the transfer amount of resource data in the contract account; and the number of the first and second groups,
invoking the first intelligent contract to send a resource transfer notification to a second intelligent contract on the second blockchain, the resource transfer notification to notify the second intelligent contract to transfer the transfer amount of resource data of the second intelligent contract in the reserve account on the second blockchain to the second account, the first intelligent contract being associated with the second intelligent contract.
2. The method of claim 1, wherein prior to the invoking the first intelligent contract to transfer the transfer amount of resource data in the first account to the contract account, further comprising:
calling the first intelligent contract to detect whether the quantity of the residual resource data in the first account is larger than or equal to the transfer quantity;
if the amount of the remaining resource data in the first account is larger than or equal to the transfer amount, executing the step of transferring the transfer amount of the resource data in the first account to the contract account by calling the first intelligent contract;
and if the quantity of the residual resource data in the first account is less than the transfer quantity, outputting a prompt of resource transfer failure.
3. The method of claim 1, wherein invoking the first intelligent contract to send a resource transfer notification to a second intelligent contract associated with the first intelligent contract comprises:
acquiring a communication interface of the second block chain;
and running the first intelligent contract and calling a communication interface of the second block chain to send a resource transfer notice to the second intelligent contract.
4. The method of claim 1, wherein the method further comprises:
and if a feedback notice of successful resource transfer sent by the second intelligent contract is received, destroying the resource data of the transfer amount in the contract account.
5. A method for processing data across block chains, comprising:
obtaining a second intelligent contract on a second blockchain and a reserve account of the second intelligent contract on the second blockchain;
invoking the second intelligent contract to receive a resource transfer notification sent by a first intelligent contract on a first blockchain, wherein the resource transfer notification is sent by the first intelligent contract after transferring a transfer amount of resource data in a first account on the first blockchain to a contract account of the first intelligent contract on the first blockchain in response to a resource transfer request on the first blockchain and locking the transfer amount of resource data in the contract account; the resource transfer request comprises the transfer amount, the first account, and a second account on the second blockchain, the resource transfer request indicating a transfer of resource data from the first account to the second account; the first intelligent contract is associated with the second intelligent contract;
and calling the second intelligent contract according to the resource transfer notification to transfer the resource data of the transfer amount in the reserve account to the second account.
6. The method of claim 5, wherein prior to invoking the second intelligent contract to transfer the transfer amount of resource data in the reserve account to the second account in accordance with the resource transfer notification, further comprising:
and detecting whether the second intelligent contract has the resource issuing authority of the second block chain.
7. The method of claim 6, wherein invoking the second smart contract to transfer the transfer amount of resource data in the reserve account to the second account in accordance with the resource transfer notification comprises:
if the second intelligent contract has the resource issuing authority of the second block chain, calling the second intelligent contract to issue the resource data of the transfer amount to the reserve account;
after successful issuance, invoking the second smart contract to transfer the transfer amount of resource data in the reserve account to the second account.
8. The method of claim 6, wherein invoking the second smart contract to transfer the transfer amount of resource data in the reserve account to the second account in accordance with the resource transfer notification comprises:
if the second intelligent contract does not have the resource issuing authority of the second block chain, calling the second intelligent contract to detect whether the quantity of the residual resource data in the reserve account is larger than or equal to the transfer quantity;
and if the quantity of the remaining resource data in the reserve account is larger than or equal to the transfer amount, calling the second intelligent contract to transfer the resource data of the transfer amount in the reserve account to the second account.
9. The method of claim 8, wherein invoking the second smart contract to transfer the transfer amount of resource data in the reserve account to the second account in accordance with the resource transfer notification further comprises:
if the quantity of the residual resource data in the reserve account is smaller than the transfer amount, acquiring a difference value between the quantity of the residual resource data in the reserve account and the transfer amount;
and storing the resource data which is not less than the difference value into the reserve account, and calling the second intelligent contract to transfer the resource data of the transfer amount in the reserve account to the second account after the storage is successful.
10. The method of claim 5, wherein the method further comprises:
and if the resource data of the transfer amount in the reserve account is successfully transferred to the second account, calling the second intelligent contract to send a feedback notice of successful resource transfer to the first intelligent contract.
11. A data processing apparatus across a blockchain, comprising:
an obtaining unit, configured to obtain, in response to a resource transfer request on a first blockchain, a first intelligent contract on the first blockchain and a contract account of the first intelligent contract on the first blockchain; the resource transfer request comprises a transfer amount, a first account on the first blockchain and a second account on a second blockchain, the resource transfer request is used for indicating that resource data is transferred from the first account to the second account;
a processing unit, configured to invoke the first intelligent contract to transfer the resource data of the transfer amount in the first account to the contract account; locking the resource data of the transfer amount in the contract account; and the number of the first and second groups,
a sending unit, configured to invoke the first intelligent contract to send a resource transfer notification to a second intelligent contract on the second blockchain, where the resource transfer notification is used to notify the second intelligent contract to transfer the resource data of the transfer amount in the reserve account of the second intelligent contract on the second blockchain to the second account, and the first intelligent contract is associated with the second intelligent contract.
12. A data processing apparatus across a blockchain, comprising:
an obtaining unit, configured to obtain a second intelligent contract on a second blockchain and a reserve account of the second intelligent contract on the second blockchain;
a receiving unit, configured to invoke the second intelligent contract to receive a resource transfer notification sent by a first intelligent contract on a first blockchain, where the resource transfer notification is sent by the first intelligent contract after transferring a transfer amount of resource data in a first account on the first blockchain to a contract account of the first intelligent contract on the first blockchain in response to a resource transfer request on the first blockchain and locking the transfer amount of resource data in the contract account; the resource transfer request comprises the transfer amount, the first account, and a second account on the second blockchain, the resource transfer request indicating a transfer of resource data from the first account to the second account; the first intelligent contract is associated with the second intelligent contract;
and the processing unit is used for transferring the resource data of the transfer amount in the reserve account to the second account by calling the second intelligent contract according to the resource transfer notification.
13. A data processing apparatus across a blockchain, comprising an input device and an output device, further comprising:
a processor adapted to implement one or more instructions; and the number of the first and second groups,
a computer storage medium storing one or more first instructions adapted to be loaded by the processor and to perform a method of data processing across a block chain according to any one of claims 1 to 4; alternatively, the computer storage medium stores one or more second instructions adapted to be loaded by the processor and to perform the method of data processing across a block chain according to any of claims 5-10.
14. A computer storage medium having stored thereon one or more first instructions adapted to be loaded by a processor and to perform a method of data processing across a blockchain according to any one of claims 1 to 4; alternatively, the computer storage medium stores one or more second instructions adapted to be loaded by a processor and to perform the method of data processing across a block chain according to any of claims 5-10.
CN201911283143.7A 2019-12-13 2019-12-13 Cross-block-chain data processing method, device, equipment and medium Pending CN110706113A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911283143.7A CN110706113A (en) 2019-12-13 2019-12-13 Cross-block-chain data processing method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911283143.7A CN110706113A (en) 2019-12-13 2019-12-13 Cross-block-chain data processing method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN110706113A true CN110706113A (en) 2020-01-17

Family

ID=69208093

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911283143.7A Pending CN110706113A (en) 2019-12-13 2019-12-13 Cross-block-chain data processing method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN110706113A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111768303A (en) * 2020-06-01 2020-10-13 支付宝实验室(新加坡)有限公司 Transaction processing method, device, equipment and system
CN112581284A (en) * 2020-12-28 2021-03-30 深圳海付移通科技有限公司 Method, system, computer device and storage medium for processing resource transfer data
WO2021179655A1 (en) * 2020-03-13 2021-09-16 腾讯科技(深圳)有限公司 Cross-blockchain data migration method and apparatus, device, and storage medium
CN114095497A (en) * 2021-09-30 2022-02-25 网络通信与安全紫金山实验室 Resource usage amount proving method and system based on block chain and oriented to cloud network scene
CN114257383A (en) * 2020-09-10 2022-03-29 中国电信股份有限公司 Data processing method, block chain node and computer readable storage medium
CN116975158A (en) * 2023-09-25 2023-10-31 腾讯科技(深圳)有限公司 Request processing method, apparatus, computer device and storage medium
CN112581284B (en) * 2020-12-28 2024-05-03 深圳海付移通科技有限公司 Method, system, computer equipment and storage medium for processing resource transfer data

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107301536A (en) * 2017-06-12 2017-10-27 腾讯科技(深圳)有限公司 Resource transfers method and device
US20180165476A1 (en) * 2016-12-09 2018-06-14 International Business Machines Corporation Interlocked blockchains to increase blockchain security
CN109035012A (en) * 2018-06-11 2018-12-18 西安纸贵互联网科技有限公司 A kind of across the chain processing method and computer readable storage medium of block catenary system
CN109544171A (en) * 2018-11-30 2019-03-29 众安信息技术服务有限公司 For realizing the method and apparatus of the consistency of transregional piece of chain transaction
CN109886661A (en) * 2019-01-16 2019-06-14 深圳壹账通智能科技有限公司 Across chain digital cash exchanging method, device, computer system and storage medium
CN110288344A (en) * 2019-06-25 2019-09-27 中国工商银行股份有限公司 The assets transfer method and device of transregional piece of chain
CN110442652A (en) * 2019-08-15 2019-11-12 腾讯科技(深圳)有限公司 A kind of across chain data processing method and device based on block chain

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180165476A1 (en) * 2016-12-09 2018-06-14 International Business Machines Corporation Interlocked blockchains to increase blockchain security
CN107301536A (en) * 2017-06-12 2017-10-27 腾讯科技(深圳)有限公司 Resource transfers method and device
CN109035012A (en) * 2018-06-11 2018-12-18 西安纸贵互联网科技有限公司 A kind of across the chain processing method and computer readable storage medium of block catenary system
CN109544171A (en) * 2018-11-30 2019-03-29 众安信息技术服务有限公司 For realizing the method and apparatus of the consistency of transregional piece of chain transaction
CN109886661A (en) * 2019-01-16 2019-06-14 深圳壹账通智能科技有限公司 Across chain digital cash exchanging method, device, computer system and storage medium
CN110288344A (en) * 2019-06-25 2019-09-27 中国工商银行股份有限公司 The assets transfer method and device of transregional piece of chain
CN110442652A (en) * 2019-08-15 2019-11-12 腾讯科技(深圳)有限公司 A kind of across chain data processing method and device based on block chain

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021179655A1 (en) * 2020-03-13 2021-09-16 腾讯科技(深圳)有限公司 Cross-blockchain data migration method and apparatus, device, and storage medium
CN111768303A (en) * 2020-06-01 2020-10-13 支付宝实验室(新加坡)有限公司 Transaction processing method, device, equipment and system
CN114257383A (en) * 2020-09-10 2022-03-29 中国电信股份有限公司 Data processing method, block chain node and computer readable storage medium
CN114257383B (en) * 2020-09-10 2024-04-12 中国电信股份有限公司 Data processing method, blockchain node and computer readable storage medium
CN112581284A (en) * 2020-12-28 2021-03-30 深圳海付移通科技有限公司 Method, system, computer device and storage medium for processing resource transfer data
CN112581284B (en) * 2020-12-28 2024-05-03 深圳海付移通科技有限公司 Method, system, computer equipment and storage medium for processing resource transfer data
CN114095497A (en) * 2021-09-30 2022-02-25 网络通信与安全紫金山实验室 Resource usage amount proving method and system based on block chain and oriented to cloud network scene
CN114095497B (en) * 2021-09-30 2024-04-19 网络通信与安全紫金山实验室 Cloud network scene-oriented resource usage amount proving method and system based on blockchain
CN116975158A (en) * 2023-09-25 2023-10-31 腾讯科技(深圳)有限公司 Request processing method, apparatus, computer device and storage medium
CN116975158B (en) * 2023-09-25 2024-01-26 腾讯科技(深圳)有限公司 Request processing method, apparatus, computer device and storage medium

Similar Documents

Publication Publication Date Title
JP7364724B2 (en) Operating system for blockchain IoT devices
WO2021179661A1 (en) Cross-blockchain data mutual storage method, apparatus and device, and storage medium
EP3812992B1 (en) Block chain transaction method and apparatus
US10958628B2 (en) Protecting sensitive data in a distributed ledger system using a blockchain channel hierarchy
CN110706113A (en) Cross-block-chain data processing method, device, equipment and medium
CN110881063B (en) Storage method, device, equipment and medium of private data
US20230153769A1 (en) Method and system of mining blockchain transactions provided by a validator node
US10958417B2 (en) Protecting sensitive data in a distributed ledger system using blockchain hierarchies
JP2020523839A (en) System and method for avoiding or reducing crypto stranded resources in blockchain networks
KR20180115766A (en) METHOD AND SYSTEM FOR EFFICIENTLY TRANSMITTING CURRENCY COUNTS CONTAINED TO PAYROL ON BLOCK CHAIN, WHICH CAUSES AUTOMATIC PAYROL METHOD AND SYSTEM BASED ON SMART CONTRACT
CN106780032A (en) A kind of block chain interchain assets transfer method under multichain scene
Alqassem et al. Towards reference architecture for cryptocurrencies: Bitcoin architectural analysis
CN110298755B (en) Block chain transaction method and device
CN112003858B (en) Block chain-based platform docking method, electronic device and storage medium
CN111108521A (en) Implementing a blockchain based workflow
CN111061769A (en) Consensus method of block chain system and related equipment
CN111861477A (en) Block chain-based post-transaction data processing method and device and computer equipment
Yadav et al. Comparative analysis of consensus algorithms and issues in integration of blockchain with IoT
CN112149077B (en) Supply chain billing method, system and computer equipment based on block chain technology
US20210297242A1 (en) Method, device, and apparatus for processing distributed data, and medium
US20200202349A1 (en) Multiple asset transactions
Subathra et al. Decentralized consensus blockchain and IPFS-based data aggregation for efficient data storage scheme
Garcia Bringas et al. BlockChain platforms in financial services: current perspective
CN113689216A (en) Cross-chain transaction processing method and device, equipment, storage medium and program product
CN110458541B (en) Object replacement method and device based on block chain

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