CN114567643A - Cross-block-chain data transfer method, device and related equipment - Google Patents

Cross-block-chain data transfer method, device and related equipment Download PDF

Info

Publication number
CN114567643A
CN114567643A CN202011367758.0A CN202011367758A CN114567643A CN 114567643 A CN114567643 A CN 114567643A CN 202011367758 A CN202011367758 A CN 202011367758A CN 114567643 A CN114567643 A CN 114567643A
Authority
CN
China
Prior art keywords
block
chain
target
cross
core
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011367758.0A
Other languages
Chinese (zh)
Other versions
CN114567643B (en
Inventor
刘攀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN202011367758.0A priority Critical patent/CN114567643B/en
Publication of CN114567643A publication Critical patent/CN114567643A/en
Application granted granted Critical
Publication of CN114567643B publication Critical patent/CN114567643B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • 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/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
    • 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
    • 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/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Power Engineering (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The present disclosure provides a method, an apparatus, an electronic device and a computer-readable storage medium for data streaming across block chains, the method comprising: acquiring block header information of a first block in the first block chain, wherein the first block is used for recording target cross-chain transaction between the first block chain and the second block chain; checking block header information of the first block by a smart contract deployed on the core block chain; after the block header information of the first block passes the verification, acquiring target cross-chain transaction data of the target cross-chain transaction from the first block based on the block header information of the first block; recording the target cross-chain transaction data in a target tile of the core tile chain; and sending the block header information of the target block to the second block chain so that the second block chain can carry out the target cross-chain transaction according to the block header information of the target block.

Description

Cross-block-chain data transfer method, device and related equipment
Technical Field
The present disclosure relates to the field of computer and internet technologies, and in particular, to a method and an apparatus for data transfer across block chains, an electronic device, and a computer-readable storage medium.
Background
The blockchain technology is a brand new distributed infrastructure and computing mode that uses blockchain data structures to verify and store data, uses consensus algorithms of distributed nodes to generate and update data, uses cryptography to secure data transmission and access, and uses intelligent contracts composed of automated script codes to program and manipulate data.
With the development of computer technology, blockchain technology is favored by more and more technical fields.
However, with the evolution of data sharing requirements, although the existing block chains can implement synchronization of data information between different node devices of the same block chain, synchronization or circulation of data information between different block chains, i.e., across block chains, is still in the technical gap, and an effective solution is urgently needed to be provided.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure.
Disclosure of Invention
The embodiment of the disclosure provides a data transfer method and device for a cross-block chain, an electronic device and a computer readable storage medium, which realize transfer of the data cross-block chain and ensure security and traceability of the data in a transfer process.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
The embodiment of the disclosure provides a data flow method of a cross-block chain, which is applied to a core block chain; wherein the method comprises the following steps: acquiring block header information of a first block in the first block chain, wherein the first block is used for recording target cross-chain transaction between the first block chain and the second block chain; checking block header information of the first block by a smart contract deployed on the core block chain; after the block header information of the first block passes the verification, acquiring target cross-chain transaction data of the target cross-chain transaction from the first block based on the block header information of the first block; recording the target cross-chain transaction data in a target tile of the core tile chain; and sending the block header information of the target block to the second block chain so that the second block chain can carry out the target cross-chain transaction according to the block header information of the target block.
The embodiment of the disclosure provides a data flow method of a cross-block chain, which is applied to a first block chain; wherein the method comprises the following steps: in response to a target address uplink request for target data, the first blockchain acquiring the target data, wherein the target data relates to a target cross-chain transaction of the first blockchain and a second blockchain; processing the target data through an intelligent contract deployed on the first blockchain to generate target cross-chain transaction data according to the target data; storing the target cross-chain transaction data in a first block, the first block comprising block header information; sending the block header information of the first block to a core block chain so as to send the target cross-chain transaction data to the second block chain through the core block chain for the target cross-chain transaction, wherein the core block chain does not belong to the first block chain and the second block chain.
The embodiment of the disclosure provides a data flow method of a cross-block chain, which is applied to a second block chain; wherein the method comprises the following steps: the second blockchain receives blockhead information of a target blockchain sent by a core blockchain, wherein the target blockchain is used for recording target cross-chain transaction between a first blockchain and the second blockchain, and the target cross-chain transaction is initiated by the first blockchain; checking the block header information of the target block through an intelligent contract deployed on the second block chain; after the block header information of the target block passes the verification, acquiring target cross-link transaction data of the target cross-link transaction from the target block based on the block header information of the target block; executing second operation content corresponding to the second block chain in the target cross-chain transaction data to obtain a second operation result; storing the target cross-chain transaction data and the second operation result in a second block of the second block chain to complete the target cross-chain transaction.
The embodiment of the present disclosure provides a data flow device across a block chain, which is applied to a core block chain; wherein the apparatus comprises: the system comprises a first block information acquisition module, a first block information verification module, a target cross-chain transaction data acquisition first module, a target block generation module and a target block information sending module.
The first block information obtaining module may be configured to obtain block header information of a first block in the first blockchain, where the first block is used to record a target cross-chain transaction between the first blockchain and the second blockchain; the first block information checking module may be configured to check block header information of the first block by an intelligent contract deployed on the core block chain; the target cross-chain transaction data acquisition first module may be configured to acquire target cross-chain transaction data of the target cross-chain transaction from the first block based on the block header information of the first block after the block header information of the first block passes verification; the target tile generation module may be configured to record the target cross-chain transaction data in a target tile of the core tile chain; the target block information sending module may be configured to send block header information of the target block to the second blockchain, so that the second blockchain performs the target cross-chain transaction according to the block header information of the target block.
In some embodiments, the block header information of the first block comprises block address information of the first block, and the intelligent contracts disposed on the core block chain comprise core synchronization contracts and core cross-chain governance contracts. Wherein the first block information checking module may include: the system comprises a first block address checking unit, a first Mercker tree certification acquisition unit, a first Mercker tree certification checking unit and a cross-chain transaction parameter checking unit.
Wherein the first block address checking unit may be configured to check the block address information of the first block through the core synchronization contract to determine the validity of the block address information of the first block; the first merck tree attestation obtaining unit may be configured to obtain a cross-chain transaction parameter of the target cross-chain transaction and a first merck tree attestation for the target cross-chain transaction data based on the tile header information of the first tile; the first merkel tree attestation verification unit may be configured to verify the first merkel tree attestation through the core cross-chain governance contract to determine security of the target cross-chain transaction data; the cross-chain transaction parameter checking unit may be configured to check the cross-chain transaction parameter through the core cross-chain governance contract to determine the validity of the cross-chain transaction parameter.
In some embodiments, the core block chain is in data transfer with the first block chain through a first relay device, the first block chain and the core block chain have different data storage specifications, and the smart contracts deployed on the core block chain include core synchronization contracts. Wherein the target cross-chain transaction data acquisition first module may include: the system comprises a target cross-chain transaction first acquisition unit and a conversion unit.
The target cross-chain transaction first acquisition unit may be configured to acquire target cross-chain transaction data meeting a first block chain storage specification from the first block chain based on the block header information of the first block; the conversion unit may be configured to convert the target cross-chain transaction data complying with the first blockchain storage specification into target cross-chain transaction data complying with a core blockchain storage specification by the core blockchain via the core synchronization contract, so as to store the target cross-chain transaction data complying with the core blockchain storage specification in the target blockchain.
In some embodiments, the core blockchain is in data transfer with the first blockchain through a first relay device. Wherein the first block information obtaining module may include: the device comprises a first detection unit and a first block information acquisition unit.
Wherein the first detection unit may be configured to detect the first block chain by the first relay device through the core block chain; the first block information obtaining unit may be configured to, when the first relay device detects that a newly added first block exists in the first block chain and the target cross-chain transaction data is stored in the first block, obtain, by the first relay device, block header information of the first block from the first block chain.
In some embodiments, the target cross-chain transaction parameter includes a source chain address and a target chain address of the target cross-chain transaction, the source chain address corresponding to the first blockchain, and the target chain address corresponding to the second blockchain. Wherein the first merkel tree proof verification unit may include: a registration check subunit and a parameter validity check subunit.
Wherein the registration check subunit may be configured to detect, by the core cross-chain governance contract, whether the source chain address and the target chain address are registered in the core block chain; the parameter validity check subunit may be configured to determine the validity of the cross-chain transaction parameter if the source chain address and the target chain address are registered in the core block chain.
Wherein the target block information sending module may include: and the target block information sending unit is configured to send the block header information of the target block to the second block chain according to the target chain address so that the second block chain can perform the target cross-chain transaction according to the block header information of the target block.
The embodiment of the disclosure provides a data flow device across block chains, which is applied to a first block chain; wherein the apparatus comprises: the system comprises a target data acquisition module, a target cross-chain transaction data generation module, a first block generation module and a first block information sending module.
Wherein the target data acquisition module may be configured to respond to a target address uplink request for target data, the target data being acquired by the first blockchain, the target data relating to a target cross-chain transaction of the first blockchain and a second blockchain; the target cross-chain transaction data generation module is configured to process the target data through an intelligent contract deployed on the first blockchain to generate target cross-chain transaction data according to the target data; a first block generation module configured to store the target cross-chain transaction data in a first block, the first block including block header information; a first block information sending module configured to send block header information of the first block to a core block chain, so as to send the target cross-chain transaction data to the second block chain through the core block chain to perform the target cross-chain transaction, where the core block chain does not belong to the first block chain and the second block chain.
In some embodiments, a first transaction log of the target cross-chain transaction is also generated when generating the target cross-chain transaction data, the first transaction log including cross-chain transaction parameters of the target cross-chain transaction. Wherein the first block information sending module may include: the device comprises a first block information sending unit, a first transaction log sending unit, a first Mercker tree certification generating unit and a first Mercker tree certification sending unit.
The first block information sending unit may be configured to send the block header information of the first block to a core block chain, so that the core block chain checks the block header information of the first block; the first transaction log sending unit may be configured to send the first transaction log to the core block chain in response to a transaction parameter obtaining request of the core block chain, so that the core block chain obtains the cross-chain transaction parameter; the first merkel tree proof generating unit may be configured to generate, in response to a data proof obtaining request of the core block chain, a first merkel tree proof according to a first merkel tree of the target cross-chain transaction data in the first block; the first mercker tree attestation sending unit may be configured to send the first mercker tree attestation to the core block chain to send the target cross-chain transaction data to the second block chain through the core block chain to conduct the target cross-chain transaction.
In some embodiments, the intelligent contracts deployed on the first blockchain include a first business contract and a first cross-chain governance contract. Wherein the target cross-chain transaction data generation module may include: the system comprises a first operation unit and a target cross-chain transaction data generation unit.
Wherein the first operation unit may be configured to execute, by the first service contract, first operation content corresponding to the first blockchain within the target data to obtain a first operation result; the target cross-chain transaction data generation unit may be configured to process the first operation result and the target data through the first cross-chain governance contract, and construct a target cross-chain transaction in the first blockchain to generate the target cross-chain transaction data.
The embodiment of the disclosure provides a data transfer device across block chains, which is applied to a second block chain; wherein the apparatus comprises: the system comprises a target block information acquisition module, a target block information verification module, a second target cross-chain transaction data acquisition module, a second result acquisition module and a second block generation module.
The target block information obtaining module may be configured to receive, by a second block chain, block header information of a target block sent by a core block chain, where the target block is used to record a target cross-chain transaction between a first block chain and the second block chain, and the target cross-chain transaction is initiated by the first block chain; the target block information checking module may be configured to check block header information of the target block through an intelligent contract deployed on the second block chain; the target cross-chain transaction data acquisition second module may be configured to acquire target cross-chain transaction data of the target cross-chain transaction from the target block based on the block header information of the target block after the block header information of the target block passes verification; the second result obtaining module may be configured to execute second operation content corresponding to the second blockchain in the target cross-chain transaction data to obtain a second operation result; the second block generation module may be configured to store the target cross-chain transaction data and the second operation result in a second block of the second blockchain to complete the target cross-chain transaction.
In some embodiments, the block header information of the target block comprises block address information of the target block, and the intelligent contract disposed on the second block chain comprises a second synchronization contract and a second cross-chain governance contract; wherein the target block information checking module may include: the system comprises a target block information checking unit, a second Mercker tree certification obtaining unit, a second Mercker tree certification checking unit and a cross-chain transaction parameter validity checking unit.
Wherein the target block information checking unit may be configured to check block header information of the target block through the second synchronization contract to determine validity of block address information of the target block; the second merkel tree attestation obtaining unit may be configured to obtain a cross-chain transaction parameter of the target cross-chain transaction data and a second merkel tree attestation for the target cross-chain transaction data based on the tile header information of the target tile; the second merkel tree attestation verification unit may be configured to verify the second merkel tree attestation by the second cross-chain governance contract to determine security of the target cross-chain transaction data; the cross-chain transaction parameter validity checking unit may be configured to check the cross-chain transaction parameter through the second cross-chain governance contract to determine validity of the cross-chain transaction parameter.
In some embodiments, the second block chain communicates data with the core block chain via a second relay device; wherein the target block information obtaining module may include: a second detection unit and a target block information acquisition unit.
Wherein the second detection unit may be configured to detect the core block chain by the second relay device through the second block chain; the target block information obtaining unit may be configured to, when the second relay device detects that a newly added target block exists in the core block chain and target cross-chain transaction data is stored in the target block, obtain, by the second relay device, block header information of the target block from the core block chain.
An embodiment of the present disclosure provides an electronic device, including: one or more processors; a storage device, configured to store one or more programs, and when the one or more programs are executed by the one or more processors, enable the one or more processors to implement any one of the above target block information obtaining module methods.
The embodiment of the present disclosure provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the target block information obtaining module method according to any one of the above items.
Embodiments of the present disclosure provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and executes the computer instruction, so that the computer device executes the target block information obtaining module method.
The target block information obtaining module method, the target block information obtaining module device, the electronic device and the computer-readable storage medium provided by the embodiments of the present disclosure complete data transfer between a first block chain and a second block chain through a core block chain. On one hand, the data transfer process is recorded and witnessed through the core block chain, so that the whole data transfer process can be traced, and the specific transfer process of the whole cross-chain transaction data is convenient to know; on the other hand, the verification is carried out on the data which is transferred in the transfer process through the core block chain, the data which is transferred in the transfer process is ensured not to be tampered, and the safety of data transfer is ensured; in addition, the data cross-linking process is greatly simplified through the core block chain, and the possibility is provided for data cross-linking. According to the trans-block chain data flow transfer method, under the condition that the authenticity and the reliability of target trans-chain transaction data are guaranteed, the transfer process of the target trans-chain transaction data is recorded through the core block chain, the whole data transfer process can be traced, and the target trans-chain transaction can be examined and traced conveniently.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure. The drawings described below are merely some embodiments of the present disclosure, and other drawings may be derived from those drawings by those of ordinary skill in the art without inventive effort.
Fig. 1 is a schematic structural diagram illustrating a blockchain system according to the related art.
Fig. 2 is a schematic diagram illustrating a block structure according to the related art.
Fig. 3 is a schematic diagram illustrating a block memory content according to the related art.
FIG. 4 is a schematic diagram of a Mercker tree shown according to the related art.
FIG. 5 is a flow diagram illustrating a method of data streaming across a chain of blocks in accordance with an example embodiment.
Fig. 6 is a flowchart of step S11 in fig. 5 in an exemplary embodiment.
Fig. 7 is a flowchart of step S12 in fig. 5 in an exemplary embodiment.
FIG. 8 is a schematic diagram of a Mercker tree shown according to the related art.
FIG. 9 is a flow diagram illustrating a method of data streaming across a chain of blocks in accordance with an example embodiment.
Fig. 10 is a flowchart of step S24 in fig. 9 in an exemplary embodiment.
FIG. 11 is a flow diagram illustrating a method of data flow across a blockchain in accordance with an example embodiment.
FIG. 12 is a flowchart of step S32 of FIG. 11 in an exemplary embodiment.
FIG. 13 is a diagram illustrating a data flow structure across a chain of blocks, according to an example embodiment.
Fig. 14 is a block diagram illustrating a data flow arrangement across a blockchain in accordance with an example embodiment.
Fig. 15 is a block diagram illustrating a data flow apparatus across a chain of blocks in accordance with an example embodiment.
Fig. 16 is a block diagram illustrating a data flow apparatus across a chain of blocks in accordance with an example embodiment.
Fig. 17 is a schematic structural diagram illustrating a computer system applied to a cross-blockchain data stream device according to an exemplary embodiment.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The same reference numerals denote the same or similar parts in the drawings, and thus, a repetitive description thereof will be omitted.
The described features, structures, or characteristics of the disclosure may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the disclosure.
The drawings are merely schematic illustrations of the present disclosure, in which the same reference numerals denote the same or similar parts, and thus, a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and steps, nor do they necessarily have to be performed in the order described. For example, some steps may be decomposed, and some steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
In this specification, the terms "a", "an", "the", "said" and "at least one" are used to indicate the presence of one or more elements/components/etc.; the terms "comprising," "including," and "having" are intended to be inclusive and mean that there may be additional elements/components/etc. other than the listed elements/components/etc.; the terms "first," "second," and "third," etc. are used merely as labels, and are not limiting on the number of their objects.
First, a block chain network, a block chain, a block, and the like, which are involved in the embodiments of the present disclosure, will be described.
The embodiment of the disclosure relates to a data flow method across blockchains, each blockchain may correspond to a blockchain system, and the blockchain system may be a blockchain system formed by connecting a client and a plurality of nodes in a network communication manner. The client and the node can be any computing device, such as a server and a terminal.
The server may be an independent physical server, or may be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a network service, cloud communication, a middleware service, a domain name service, a security service, a CDN, and a big data and artificial intelligence platform, and the like, which is not limited in this disclosure.
The terminal may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablets, laptop portable computers, desktop computers, wearable devices, virtual reality devices, smart homes, and the like.
The user can perform data interaction with the blockchain through the client, and the blockchain system can perform consensus, recording and the like on data uploaded by the user through nodes.
Fig. 1 is an alternative structural diagram of a blockchain system 101 provided in this disclosure, and is formed by a plurality of nodes 102 (any form of computing device in an access network, such as a server and a terminal) and a client 103, where a Peer-To-Peer (P2P) network is formed between the nodes 102, and a P2P Protocol is an application layer Protocol running on top of a Transmission Control Protocol (TCP). In a blockchain system, any machine, such as a server, a terminal, can join to become a node 102, and the node 102 includes a hardware layer, an intermediate layer, an operating system layer, and an application layer.
Referring to the functions of each node 102 in the blockchain system 101 shown in fig. 1, the functions involved include:
1) routing, a basic function that node 102 has for supporting communication between nodes 102.
For example, when the core block chain receives the target cross-chain transaction data, the target cross-chain transaction data needs to be sent to the consensus node for consensus through the route, and after the consensus is completed, each consensus node sends the consensus result to the accounting node in the core block chain through the route, so that each accounting node accounts and records the target cross-chain transaction data in the first block.
Besides the routing function, the node may also have the following functions:
2) the application is used for being deployed in a block chain, realizing specific services according to actual service requirements, recording data related to the realization functions to form recording data, carrying a digital signature in the recording data to represent a source of task data, and sending the recording data to other nodes in the block chain system, so that the other nodes add the recording data to a temporary block when the source and integrity of the recording data are verified successfully.
For example, the services implemented by the applications include:
2.1) a wallet for providing functionality for conducting transactions in electronic money, including initiating transactions. For example, in the present disclosure, target cross-chain transaction data is sent to a consensus node in the blockchain system, and after the consensus node is successfully verified, as a response for acknowledging that the transaction is valid, record data of the transaction is stored in a temporary block of the blockchain; for another example, the current cross-chain transaction data is sent to other blockchains in a cross-chain mode, and after the other blockchains complete the transaction, the record data of the transaction is stored in the temporary block of the blockchain as a response for confirming that the transaction is valid.
Of course, the wallet also supports the querying of the electronic money remaining in the electronic money address.
And 2.2) the shared account book is used for providing functions of operations such as storage, inquiry and modification of account data, sending the recorded data of the operations on the account data to a consensus node in the block chain system, and after the consensus node verifies that the recorded data is valid, storing the recorded data into a temporary block as a response for acknowledging that the account data is valid, and also sending confirmation to the node initiating the operations.
In embodiments of the present disclosure, the core blockchain may store the target cross-chain transaction data in a shared ledger of the core blockchain, and the second blockchain may store the target cross-chain transaction data in a shared ledger of the second blockchain.
2.3) Intelligent contracts, computerized agreements, can implement the terms of a contract, implemented by code deployed on a shared ledger for execution when certain conditions are met, for completing automated transactions according to actual business requirement code. In this embodiment, the intelligent contract deployed on the core block chain may be represented as a core synchronization contract for synchronizing cross-chain data, or may be represented as a core cross-chain governance contract for a target cross-chain transaction, which is not limited in this disclosure. The core synchronization contract deployed in the core block chain may be used to check block header information of the first block to determine validity of block address information of the first block; the core cross-chain governance contract deployed in the core block chain may check the first mercker tree certificate of the target cross-chain transaction data to determine the security of the target cross-chain transaction data, and the like.
Of course, the smart contract may be not only a processing contract for processing the received information, but also a transaction contract for transaction, for example, a business contract for cross-chain transaction, that is, a business contract for triggering the cross-chain transaction based on cross-chain transaction data to execute a specific cross-chain transaction. For example, taking bank transfer as an example, when a transfer transaction from bank a to bank B is performed in bank a, if bank a and bank B belong to different block chains, the transaction may be processed based on a transaction processing manner agreed between the block chains, and a specific transaction processing manner may be stored in the block chains of bank a and bank B in a cross-chain service contract manner, so as to complete the cross-chain transaction.
3) And the Block chain comprises a series of blocks (blocks) which are mutually connected according to the generated chronological order, new blocks cannot be removed once being added into the Block chain, and recorded data submitted by nodes in the Block chain system are recorded in the blocks.
Referring to fig. 2, fig. 2 is an optional schematic diagram of a Block Structure (Block Structure) provided in the embodiment of the present disclosure, where each Block includes a hash value of a transaction record stored in the Block (i.e., a hash value of the Block) and a hash value of a previous Block, and the blocks are connected by the hash value to form a Block chain. The block may include information such as a time stamp at the time of block generation. A block chain (Blockchain), which is essentially a decentralized database, is a string of data blocks associated by using cryptography, and each data block contains related information for verifying the validity (anti-counterfeiting) of the information and generating a next block.
Fig. 3 is a block diagram illustrating a block structure according to the block chain technique.
As shown in fig. 3, the block may be divided into a block head and a block body. The block header can be used for storing a previous block hash (the block hash can be the address information of the block), a current block hash, a next block hash, a timestamp and the like, so that the data tracing is convenient to perform; the block may be used to store uplink data in general, for example, the block of the first block of the present disclosure may be used to store target cross-chain transaction data.
In some block chains, data is often stored in blocks in a Tree structure, for example, data is stored in a block in the form of a Merkle Tree (Merkle Tree) as shown in fig. 4, and the Merkle root is stored in a block header (as shown in fig. 3).
The merkel tree often appears as a binary tree (or may be a tree structure with multiple branches such as a ternary tree and a quadtree), and is composed of leaf nodes, intermediate nodes, and root nodes. As shown in the merkel tree of fig. 4, D0, D1, D2, and D3 are data included in leaf nodes, that is, values of the leaf nodes, and N0, N1, N2, and N3 are leaf nodes, which are Hash values obtained by hashing (Hash) the data (that is, D0, D1, D2, and D3); continuing upward, N4 and N5 are intermediate nodes that are hash values of N0 and N1, respectively, and hash values of N2 and N3, respectively, and note that they are hash values of two adjacent leaf nodes combined into a string and then the string; then, in the above, the Root node is a hash value obtained by hashing N4 and N5, which is the Root hash of this merkel tree.
As can be seen from the structure of the mercker tree, when the transaction of any one leaf node is modified, the hash value of the leaf node changes, and finally the hash value of the root node changes. The hash value of the determined root node can be accurately used as a unique digest of a set of transactions.
In the embodiment of the disclosure, the target cross-chain transaction data can be stored in the core block in the form of a mercker tree, which not only facilitates the storage and acquisition of the data, but also facilitates the verification of whether the target cross-chain transaction data is tampered.
According to the embodiment of the invention, the target cross-chain transaction data is transferred through the core block chain, so that any block chain can realize cross-chain transaction through the core block chain, the transaction process of the target cross-chain transaction data in each block chain is ensured to be publicly and transparently traceable, the target cross-chain transaction data can be prevented from being tampered in the storage and transfer processes, and the credibility of the data is ensured.
FIG. 5 is a flow diagram illustrating a method of data streaming across a chain of blocks in accordance with an example embodiment. The method provided by the embodiment of the present disclosure may be applied to a core block chain that does not belong to a first block chain and a second block chain, and the specific method may be executed by any electronic device with computing processing capability in a core block chain network corresponding to the core block chain, for example, a server or a terminal device.
The embodiment of the disclosure provides a cross-link data circulation method. It should be noted that, in the present embodiment, the cross-chain transaction data method is explained by taking the case that the data is transferred from the first blockchain to the second blockchain as an example, but a practical application scenario of the present disclosure is not limited to the transfer between two blockchains, and the data cross-chain transfer between any blockchains can be implemented by using the core blockchain. For example, the method provided by the present disclosure may be applied to sequential flow among a plurality of blockchains (i.e., cross-chain transaction data flows from blockchain 1 to blockchain 2 via a core blockchain, and then flows from blockchain 2 to blockchain 3 via the core blockchain); the method provided by the present disclosure may also be applied to data transfer between each two of the plurality of blockchains (for example, the blockchain 1 transfers data to the blockchain 3 through the core blockchain, the blockchain 2 transfers data to the blockchain 4 through the core blockchain, and the blockchain 5 transfers data to the blockchain 6 through the core blockchain), and any application scenario requiring cross-chain data transfer is within the protection scope of the present disclosure.
Referring to fig. 5, a cross-chain transaction data method provided by an embodiment of the present disclosure may include the following steps.
In step S11, chunk header information of a first chunk in the first chunk chain is obtained, where the first chunk is used to record a target cross-chain transaction between the first chunk chain and the second chunk chain.
In some embodiments, the first blockchain and the second blockchain may be the same type of blockchain, e.g., the first blockchain and the second blockchain are both etherhouse blockchains; the first blockchain and the second blockchain may also be different types of blockchains, for example, the first blockchain is an etherhouse blockchain, and the second blockchain is a bitcoin blockchain, which is not limited by this disclosure.
In some embodiments, before the data flow is performed, the core blockchain obtains, from the first blockchain, blockhead information of a first chunk storing the target cross-chain transaction data, where the blockhead information of the first chunk may include blockhead information of the first chunk (i.e., a hash address of the first chunk), an execution log of the target cross-chain transaction on the first blockchain, and the like, and the execution log may include cross-chain transaction parameters of the target cross-chain transaction, such as a source chain address of the cross-chain transaction (i.e., an address of a blockchain that initiates the target cross-chain transaction), a target chain address (i.e., a blockchain that receives the target cross-chain transaction initiated by the source chain), or a transaction value of the target cross-chain transaction, and the disclosure does not limit the cross-chain transaction parameters.
In step S12, the block header information of the first block is checked by the smart contract deployed on the core block chain.
In some embodiments, an intelligent contract may be deployed in the core block chain, and the intelligent contract may be used to complete checking, chaining, and forwarding of target cross-chain transaction data.
For example, a smart contract deployed on a core blockchain may check the blockheader information of a first chunk to verify from which blockchain the first chunk came, whether the blockchain has completed registration in the core blockchain, etc.; the cross-chain transaction parameters corresponding to the target cross-chain transaction data can be verified, for example, the validity, authenticity and the like of the parameters are verified. In practical operation, the technician may complete various checks on the header of the first block according to his own needs to determine the validity of the first block, the authenticity and the security of the data stored in the first block, and the like, which is not limited by the present disclosure.
For another example, an intelligent contract deployed on the core block chain may complete synchronization and recording of target cross-chain transaction data on the core block chain, such as converting the target cross-chain transaction data into data that meets the core block chain storage standard.
As another example, an intelligent contract deployed on a core block chain may send target cross-chain transaction data that was successfully linked up in the core block chain to a second block chain, and so on.
In step S13, after the block header information of the first block passes the check, target cross-chain transaction data of the target cross-chain transaction is obtained from the first block based on the block header information of the first block.
In some embodiments, when the block header information of the first block is verified, the target cross-chain transaction data of the target cross-chain transaction may be obtained from the first block based on the first block header information (e.g., hash address information of the first block).
In step S14, the target cross-chain transaction data is recorded in a target tile of the core tile chain.
In some embodiments, the core blockchain may directly obtain data from the first blockchain, or may perform data transmission with the first blockchain through the first relay device, which is not limited in this disclosure.
In some embodiments, the first blockchain and the core blockchain may be different types of blockchains, so the data storage specifications of the first blockchain and the second blockchain may be different. Thus, the target cross-chain transaction data obtained from the first blockchain may not match the format of the core blockchain.
In this embodiment, a core synchronization contract may be deployed on a core block chain to convert uplink data of the core block chain into data conforming to a core block chain storage format. The specific process is as follows:
acquiring target cross-chain transaction data which accords with a first block chain storage specification from a first block chain based on block header information of the first block; and the core block chain converts the target cross-chain transaction data which accords with the first block chain storage specification into the target cross-chain transaction data which accords with the core block chain storage specification through a core synchronization contract.
In some embodiments, target cross-chain transaction data that conforms to the core block chain storage specification may be stored in a target block of the core block chain, facilitating subsequent tracing for the target cross-chain transaction and the target cross-chain transaction data to improve the security and the public trust of the target cross-chain transaction.
In step S15, the block header information of the target block is sent to the second blockchain, so that the second blockchain performs the target cross-chain transaction according to the block header information of the target block.
In some embodiments, after the core block chain completes the checksum and uplink operation on the target cross-chain transaction data, the block header information of the target block needs to be sent to the second block chain, so that the second block chain obtains the target cross-chain transaction data according to the block header information of the target block to complete the target cross-chain transaction.
The target block information obtaining module method provided by the embodiment of the disclosure completes data transfer between the first block chain and the second block chain through the core block chain. According to the method, on one hand, the data circulation process is recorded and witnessed through the core block chain, so that the whole data circulation process can be traced, and the specific circulation process of the whole cross-chain transaction data can be traced conveniently; on the other hand, the verification is carried out on the target cross-link transaction data which is circulated in the circulation process through the core block chain, so that the target cross-link transaction data is not tampered in the circulation process, and the safety of data circulation is ensured; in addition, any block chain can realize data circulation through the core block chain provided by the disclosure, and the flow of data circulation is simplified.
According to the trans-block chain data flow transfer method provided by the disclosure, under the condition that the target trans-chain transaction data is guaranteed to be real and reliable and cannot be tampered, the transfer process of the target trans-chain transaction data is recorded through the core block chain, so that the whole data transfer process can be traced, and the target trans-chain transaction can be examined and traced conveniently.
FIG. 6 is a flowchart of step S11 of FIG. 5 in an exemplary embodiment.
In some embodiments, the core blockchain and the first blockchain may communicate directly or through the first relay device, which is not limited by this disclosure.
The first relay device may be any server or terminal device with computing function, and the first relay device may be a device provided by an organization trusted by each block chain, for example, a device provided by each block chain service provider, a bank, a financial institution, a credit investigation institution or a consumption institution, and the like.
In some embodiments, the first relay device may serve multiple blockchains, but the first relay device does not participate in the consensus of blockchains, i.e., the first relay device is an out-of-chain device.
It should be noted that the number of the first relay devices in this embodiment may be one or multiple, and the number of the first relay devices is not limited in this disclosure. If there are a plurality of first relay devices, the core block chain or the first block chain may accept the first arriving information from the information sent by the plurality of first devices.
The first relay equipment is used for communicating between the core block chain and the first block chain, so that a series of operations such as conversion, copying, adjustment, amplification and the like of signals can be completed, and the transmission flow of the signals between the first block chain and the core block chain is simplified.
In some embodiments, the block header information of the first block acquired by the core block chain in step S11 may be actively sent by the first block chain, or may be actively acquired by the core block chain, which is not limited by the present disclosure.
In a mode that a first block chain actively sends block header information of a first block, the first block chain monitors uplink data in real time, if the first block chain finds that cross-chain transactions (such as a piece of business data, which requires both a tax deduction operation of the first block chain and a money buying operation of a second block chain) exist in the uplink data, the first block chain constructs a target cross-chain transaction according to the uplink data and generates target cross-chain transaction data; then storing the target cross-chain transaction data in a first block; and finally, actively sending the block header information of the first block to the core block chain (or sending the block header information of the first block to the first relay device, and sending the block header information of the first block to the core block chain by the first relay device), so that the core block chain records and forwards data.
In a mode in which the core block chain actively obtains the block header information of the first block, the core block chain may complete monitoring of the first block chain by itself, or may complete monitoring of the first block chain by the first relay device.
In this embodiment, how the core block chain actively acquires the block header information of the first block will be explained by taking an example that the core block chain completes monitoring of the first block chain through the first relay device.
Referring to fig. 6, the above-mentioned acquiring, by the first relay device, the block header information of the first block from the first block chain may include the following steps.
In step S111, the core block chain detects the first block chain through the first relay device.
In step S112, when the first relay device detects that there is a newly added first block in the first block chain and the target cross-chain transaction data is stored in the first block, the core block chain acquires block header information of the first block from the first block chain through the first relay device.
In some embodiments, the core blockchain may detect the first blockchain by the first relay device, when the first relay device finds a new first block in the first blockchain; the first relay device further determines whether the newly added first block comprises target cross-link transaction data; and if the first relay equipment finds that target cross-link transaction data exists in the newly added first block, sending the block header information of the newly added first block to the core block chain.
For clarity, the newly added block is defined as a first block, and the cross-chain transaction data stored in the newly added block is defined as target cross-chain transaction data between the first block chain and the second block chain. It can be understood that, in practical applications, when the first relay device detects the first blockchain, it is not necessary to determine whether the newly added block is the first block in which the target cross-chain transaction data is stored, and it is only necessary to determine whether the cross-chain transaction data exists in the newly added block. And if the added block has cross-link transaction, sending the block header information of the added block to the core block chain, determining a target chain address of the cross-link transaction data by the core block chain according to the cross-link transaction data in the block header information of the added block, and forwarding the cross-link transaction data according to the target chain address.
It can be understood that, no matter the block header information of the first block is actively sent by the first block chain or acquired after being detected by the core block chain, the method can monitor the first block chain, so as to automatically complete the flow of the block header information of the first block between the first block chain and the core block chain when the cross-chain transaction is generated in the first block chain. The method not only realizes the automatic circulation of the block header information of the first block, but also simplifies the circulation flow.
Fig. 7 is a flowchart of step S12 in fig. 5 in an exemplary embodiment.
In some embodiments, the block header information of the first block may include block address information of the first block, and the intelligent contracts disposed on the core block chain may include core synchronization contracts and core cross-chain governance contracts.
Referring to fig. 7, the above-mentioned step S12 may include the following steps.
In step S121, the block address information of the first block is checked by the core synchronization contract to determine the validity of the block address information of the first block.
In some embodiments, the public keys of the first block, the second block, and the core block may be synchronized in advance in each block chain. When the core block chain obtains the block header information of the first block, the block address information in the block header information may be verified by using the public key of the first block chain through a core synchronization contract to determine the source block chain of the first block (i.e., the block chain sending the first block), the validity of the first block in the source block chain (i.e., whether the first block is subjected to consensus verification in the source block), and the like.
In step S122, cross-chain transaction parameters of the target cross-chain transaction and a first mercker tree certificate for the target cross-chain transaction data are obtained based on the block header information of the first block.
In some embodiments, if the block address information of the first block passes the verification, the cross-chain parameters of the target cross-chain transaction and the first mercker tree certificate for the target cross-chain transaction data may be further obtained.
The cross-link parameter of the target cross-link transaction may exist in a first log, and the first log may be generated when the first blockchain constructs the target cross-link transaction and stored in the blockhead information of the first block, or stored in the blockbody of the first block in the form of a transaction tree, which is not limited in this disclosure.
If the first log is directly stored in the block header of the first block, the first log can be directly obtained from the block header information of the first block, and the cross-link transaction parameter of the target cross-link transaction can be obtained from the first log; if the first log is stored in the block of the first block in the form of the transaction tree, the transaction root may be obtained from the block header of the first block, the first log may be obtained from the first block according to the transaction root, and the cross-link transaction parameter of the target cross-link transaction may be further obtained from the first log.
In some embodiments, the target cross-chain transaction data may be stored in a block of the first block in the form of a merkel tree (as shown in fig. 4 or fig. 8), and the root of the merkel tree is stored in a block header of the first block (as shown in fig. 3). It will be appreciated that when the target cross-chain transaction data changes, the root of the Mercker tree changes. The hash value of the leaf node corresponding to the target cross-chain transaction (e.g., 9Dog:64 in fig. 8), the sibling of the leaf neighbor (e.g., 1FXq:18 in fig. 8), the sibling of the parent of the leaf node (e.g., ec20 in fig. 8), and the sibling of the grandparent of the leaf node (e.g., 8f74 in fig. 8) may be obtained, and so on …, and then the root of the mercker tree in the block of the first block may be calculated from the above nodes. If the Mercker tree root calculated and processed by the node is consistent with the Mercker tree root stored in the block header of the first block, the target cross-chain transaction is confirmed to exist in the first block and no tampering occurs.
In some embodiments, 9Dog:64 (hash value corresponding to target cross-chain transaction data), 1FXq:18, ec20, and 8f74 in FIG. 8 may be demonstrated as a first Mercker tree in the first block for the target cross-chain transaction.
In step S123, the first merkel tree attestation is checked by the core cross-chain governance contract to determine the security of the target cross-chain transaction data.
In some embodiments, the first mercker tree certificate may be compared with the mercker tree root in the first block header by the core cross-chain governance contract, and if the tree root obtained through the first mercker tree certificate is consistent with the mercker tree root in the first block header, it is indicated that the target cross-chain transaction data is actually stored in the first block, and the target cross-chain transaction data is not changed.
In step S124, the cross-chain transaction parameter is checked by the core cross-chain governance contract to determine the validity of the cross-chain transaction parameter.
In some embodiments, the cross-chain transaction parameters may include a source chain address (i.e., the address of the blockchain from which the target cross-chain transaction originated) and a target chain address (i.e., the address of the blockchain from which the target cross-chain transaction was received) of the target cross-chain transaction. In this embodiment, the source link address corresponds to the first blockchain, and the destination link address corresponds to the second blockchain.
In some embodiments, a core cross-chain governance contract may detect whether a source chain address and a target chain address are registered in a core block chain; and if the source link address and the target link address are registered in the core block link, determining that the cross-link transaction parameter is legal and the target cross-link transaction is legal.
In some embodiments, when forwarding target cross-chain transaction data, the core blockchain may forward the data according to a target chain address in the cross-chain transaction parameter, for example, may send block header information of a target block to the second blockchain according to the target chain address, so that the second blockchain performs the target cross-chain transaction according to the block header information of the target block.
According to the technical scheme provided by the embodiment, the target cross-chain transaction data is verified from multiple dimensions through the core synchronization contract and the core cross-chain governance contract, so that the safety and the public credibility of the target cross-chain transaction data during cross-chain circulation are ensured. In addition, a core synchronization contract and a core block chain governing contract which are deployed on the core block chain enable any block chain to transfer data through the core block chain, and the flow of data transfer among a plurality of block chains is greatly simplified.
FIG. 9 is a flow diagram illustrating a method of data streaming across a chain of blocks in accordance with an example embodiment. The method provided in the embodiment of the present disclosure may be applied to the first blockchain, and a specific method may be executed by any electronic device with computing processing capability in the first blockchain network corresponding to the first blockchain, for example, a server or a terminal device.
Referring to fig. 9, a cross-chain transaction data method provided by an embodiment of the present disclosure may include the following steps.
In step S21, in response to a link up request for target data by a target address, the first blockchain acquires the target data, and the target data relates to a target cross-link transaction of the first blockchain and a second blockchain.
In some embodiments, the target address may refer to an address of a target ue registered in the first blockchain, and the user may request uplink of the target data in the first blockchain by the ue.
In some embodiments, when a user requests uplink of data from a first blockchain through a target ue, the first blockchain obtains the target data for requesting uplink according to the uplink request.
In step S22, the target data is processed by the smart contract deployed on the first blockchain to generate target cross-chain transaction data according to the target data.
In some embodiments, if the target data includes cross-chain transaction content, the target data is processed through an intelligent contract deployed on the first blockchain to generate target cross-chain transaction data according to the target data.
The intelligent contracts deployed on the first blockchain can comprise a first business contract and a first cross-chain governance contract.
Then processing the target data through the smart contract deployed on the first blockchain to generate target cross-chain transaction data from the target data may include:
executing a first operation content corresponding to the first block chain in the target data through a first service contract to obtain a first operation result (for example, deducting 100 elements from an account of a certain node of the first block chain); and processing the first operation result and the target data through a first cross-chain governance contract, and constructing a target cross-chain transaction in the first blockchain to generate the target cross-chain transaction data.
In step S23, the target cross-chain transaction data is stored in a first chunk, which includes chunk header information.
In step S24, the tile header information of the first tile is sent to a core tile chain, so as to send the target cross-chain transaction data to the second tile chain through the core tile chain for performing the target cross-chain transaction, where the core tile chain does not belong to the first tile chain and the second tile chain.
According to the technical scheme provided by the embodiment, when the first block chain includes data of the target cross-chain transaction, the target cross-chain transaction data is automatically constructed and stored according to the data, the block header information of the first block in which the target cross-chain transaction data is stored is automatically forwarded to the core block chain, so that the core block chain acquires and records the target cross-chain transaction data according to the block header information of the first block, and the target cross-chain transaction data is forwarded to the second block chain to complete the target cross-chain transaction.
Fig. 10 is a flowchart of step S24 in fig. 9 in an exemplary embodiment.
In some embodiments, the target data is processed by the smart contract to generate target cross-chain transaction data while also generating a first transaction log for the target cross-chain transaction, the first transaction log including cross-chain transaction parameters for the target cross-chain transaction.
Referring to fig. 10, the above-mentioned step S24 may include the following steps.
In step S241, the block header information of the first block is sent to a core block chain, so that the core block chain checks the block header information of the first block.
In step S242, in response to the transaction parameter obtaining request of the core block chain, the first transaction log is sent to the core block chain, so that the core block chain obtains the cross-chain transaction parameters.
In some embodiments, after the verification of the block header information of the first block in the core block chain passes, the core block chain may initiate a transaction parameter acquisition request to the first block chain to acquire the target cross-chain transaction parameter from the first block chain.
In response to a transaction parameter acquisition request of the core block chain, the first block chain sends the first transaction log to the core block chain, so that the core block chain acquires the target cross-chain transaction parameter.
In step S243, in response to the data certification obtaining request of the core block chain, a first mercker tree certification is generated according to a first mercker tree of the target cross-chain transaction data in the first block.
In some embodiments, after the block header information of the first block passes the verification in the core block chain, the core block chain may initiate a data proof obtaining request to the first block chain to obtain a first merkel tree proof of the target cross-chain transaction data from the first block chain.
In response to a data credential acquisition request for a core blockchain, the first blockchain dynamically generates a first merkel tree credential based on merkel trees for target cross-chain transaction parameters.
In step S244, the first mercker tree certificate is sent to the core block chain, so as to send the target cross-chain transaction data to the second block chain through the core block chain for the target cross-chain transaction.
According to the technical scheme provided by the embodiment, the block header information, the cross-chain transaction data, the first Mercker tree certification and the like of the first block are sent to the core block chain, so that the core block chain is convenient to verify the target cross-chain transaction, and the safety and the public trust of the target cross-chain transaction data in the circulation process are ensured.
FIG. 11 is a flow diagram illustrating a method of data flow across a blockchain in accordance with an example embodiment.
The method provided by the embodiment of the present disclosure may be applied to the second blockchain, and a specific method may be executed by any electronic device with computing processing capability in the second blockchain network corresponding to the second blockchain, for example, a server or a terminal device.
Referring to fig. 11, the above-mentioned inter-blockchain data streaming method may include the following steps.
In step S31, the second blockchain receives the blockheader information of the target blockchain sent by the core blockchain, where the target blockchain is used to record a target cross-chain transaction between the first blockchain and the second blockchain, and the target cross-chain transaction is initiated by the first blockchain.
In some embodiments, the target block may have stored therein target cross-chain transaction data for a target cross-chain transaction initiated by the first blockchain, and the block header information of the target block may include block address information of the target block, a mercker tree root of the target cross-chain transaction, an execution log of the target cross-chain transaction, and the like.
In some embodiments, the block header information of the target block received by the core block chain may be actively sent by the core block chain or may be actively obtained by the second block chain, which is not limited by the present disclosure.
The process of actively sending the block header information of the target block by the core block chain is similar to the way of actively sending the block header information of the first block by the first block chain, and details are not repeated in this disclosure.
In the mode that the second block chain actively obtains the block header information of the target block, the second block chain may complete monitoring of the target block chain by itself, or may complete monitoring of the target block by the second relay device.
The method for the second blockchain to complete monitoring of the target block through the second relay device to actively acquire the block header information of the target block may include: the second block chain detects the core block chain through second relay equipment; when the second relay device detects that a newly added target block exists in the core block chain and target cross-chain transaction data are stored in the target block, the second block chain acquires the block header information of the target block from the core block chain through the second relay device.
In step S32, the block header information of the target block is checked by the smart contract deployed on the second blockchain.
In some embodiments, an intelligent contract may be deployed in the second blockchain, through which verification, execution, etc. of the target cross-chain transaction data on the second blockchain may be completed.
For example, the verification of the cross-chain transaction data parameter may be completed through the intelligent contract deployed on the second blockchain, and the verification process is similar to the verification process of the core blockchain on the cross-chain transaction parameter, and is not described herein again.
In step S33, after the chunk header information of the target chunk passes the verification, target cross-chain transaction data of the target cross-chain transaction is obtained from the target chunk based on the chunk header information of the target chunk.
In some embodiments, the second blockchain may directly interact with the target blockchain to obtain target cross-chain transaction data from the target block according to the block header information of the target block; and the target block chain can also interact with the second relay equipment so as to acquire target cross-chain transaction data from the target block according to the block header information of the target block, and the target cross-chain transaction data can be returned in a log form.
It should be noted that the number of the second relay devices in this embodiment may be one or multiple, and the number of the second relay devices in this embodiment is not limited in this disclosure. If there are a plurality of second relay devices, the core block chain or the second block chain may accept the first arriving information from the information sent by the plurality of second devices.
In step S34, a second operation content corresponding to the second blockchain in the target cross-chain transaction data is executed to obtain a second operation result.
In some embodiments, the transaction content corresponding to the second blockchain in the target cross-chain transaction data may be completed by the smart contract deployed on the second blockchain (e.g., 100-element transfer into an account of a certain node in the second blockchain) to obtain the second operation result.
In step S35, the target cross-chain transaction data and the second operation result are stored in a second tile of the second tile chain to complete the target cross-chain transaction.
In some embodiments, after completing the uplink operation of the target cross-chain transaction data and the second operation result in the second blockchain, the processing result for the target cross-chain transaction may be fed back to the core blockchain, so that the core blockchain returns the transaction result to the first blockchain to complete the cross-chain transaction.
According to the technical scheme provided by the embodiment, the block header information of the target block sent by the core block chain is used for safely and effectively acquiring the target cross-chain transaction data sent by the first block chain, and the target cross-chain transaction is completed according to the target cross-chain transaction data, so that the whole process is simple and convenient.
FIG. 12 is a flowchart of step S32 of FIG. 11 in an exemplary embodiment.
In some embodiments, the block header information of the target block may include block address information of the target block, and the intelligent contract disposed on the second blockchain may include a second synchronization contract and a second cross-chain governance contract.
Referring to fig. 12, the above-described step S32 may include the following steps.
In step S321, the block header information of the target block is checked by the second synchronization contract to determine the validity of the block address information of the target block.
In some embodiments, the second block chain may store a public key of the core block chain, and after receiving the block header information of the target block, the second block chain may check the block address of the target block through the public key of the core block chain to determine that the target block is actually constructed by the core block chain.
In step S322, cross-chain transaction parameters of the target cross-chain transaction data and a second merck tree certification for the target cross-chain transaction data are obtained based on the tile header information of the target tile.
In some embodiments, if the block address information of the target block passes the verification, the second blockchain may further obtain, from the core blockchain, a cross-chain parameter of the target cross-chain transaction and a second merkel tree attestation for the target cross-chain transaction data.
The cross-link parameter of the target cross-link transaction may exist in a second log of the core block chain, where the second log may be generated when the core block chain performs an uplink operation on the target cross-link transaction data and stored in the block header information of the target block, or stored in the block body of the target block in the form of a transaction tree, which is not limited in this disclosure.
If the second log is directly stored in the block header of the target block, the second log can be directly obtained from the block header information of the target block, and the cross-chain transaction parameters of the target cross-chain transaction are obtained from the second log; if the second log is stored in the block of the target block in the form of the transaction tree, the transaction root may be obtained from the block header of the second block, the second log may be obtained from the target block according to the transaction root, and the cross-chain transaction parameter of the target cross-chain transaction may be further obtained from the second log.
In some embodiments, the target cross-chain transaction data may be stored in a block of the first block in the form of a merkel tree (as shown in fig. 4 or fig. 8), and the root of the merkel tree is stored in a block header of the first block (as shown in fig. 3). When the second blockchain requests to obtain the second merkel tree certificate, the core blockchain dynamically generates the second merkel tree certificate according to the merkel tree of the target cross-chain transaction data, and sends the second merkel tree certificate to the second blockchain.
In step S323, the second merkel tree attestation is checked by the second cross-chain governance contract to determine the security of the target cross-chain transaction data.
In some embodiments, the second merkel tree certification may be compared with the merkel tree root in the target block header by the second cross-chain governance contract, and if the tree root obtained through the second merkel tree certification is consistent with the merkel tree root in the target block header, it is indicated that the target cross-chain transaction data is actually stored in the target block, and the target cross-chain transaction data is not changed.
In step S324, the cross-chain transaction parameter is checked by the second cross-chain governance contract to determine the validity of the cross-chain transaction parameter.
In some embodiments, the cross-chain transaction parameters may include a source chain address (i.e., the address of the blockchain from which the target cross-chain transaction originated) and a target chain address (i.e., the address of the blockchain from which the target cross-chain transaction was received) of the target cross-chain transaction. In this embodiment, the source link address corresponds to the first blockchain, and the destination link address corresponds to the second blockchain.
In some embodiments, it may be detected, by the second cross-chain governance contract, whether the source chain address is legal for a chain transaction with the second blockchain, and if the source chain address is legal for a cross-chain transaction with the second blockchain, it is determined that the cross-chain transaction parameter is legal and the target cross-chain transaction is legal.
In the embodiment of the disclosure, when the second blockchain performs the target cross-chain transaction, multi-dimensional verification is performed on the cross-chain transaction data of the target cross-chain transaction through the intelligent contract, so as to ensure the security and the public trust of the target cross-chain transaction data in the circulation process.
Fig. 13 is a diagram illustrating a data flow structure across a chain of blocks, according to an example embodiment. Referring to the data flow diagram across a chain of blocks shown in fig. 13, the following process may be included.
Responding to a uplink request of a user for target data, acquiring the target data by the first blockchain, wherein the target data relates to target cross-chain transaction of the first blockchain and the second blockchain; executing first operation content corresponding to a first blockchain in target data through a first service contract deployed on the first blockchain to obtain a first operation result; calling a first cross-chain governance contract interface to process a first operation result and target data through a first cross-chain governance contract, and constructing a target cross-chain transaction in a first block chain to generate target cross-chain transaction data; storing target cross-chain transaction data in a first block in the form of a Mercker tree, wherein the first block comprises block header information; the core block chain detects the first block chain through the first relay equipment; when the first relay device detects that a newly added first block exists in the first block chain and target cross-chain transaction data are stored in the first block, the core block chain acquires block header information of the first block from the first block chain through the first relay device; the core block chain checks the block address information of the first block through a core synchronization contract to determine the validity of the block address information of the first block; the core block chain acquires cross-chain transaction parameters of target cross-chain transaction and a first Merckel tree proof aiming at target cross-chain transaction data through first relay equipment based on block header information of a first block; the core block chain verifies the first Mercker tree certificate through a core cross-chain governance contract to determine the security of the target cross-chain transaction data; the core block chain checks the cross-chain transaction parameters through a core cross-chain governance contract to determine the legality of the cross-chain transaction parameters; after the core block chain passes the check of the block header information of the first block, acquiring target cross-chain transaction data of target cross-chain transaction from the first block based on the block header information of the first block, and recording the target cross-chain transaction data in the target block of the core block chain; the second block chain detects the core block chain through second relay equipment; when the second relay device detects that a newly added target block exists in the core block chain and target cross-chain transaction data are stored in the target block, the second block chain acquires block header information of the target block from the core block chain through the second relay device; the second block chain checks the block header information of the target block through a second synchronization contract deployed on the second block chain so as to determine the validity of the block address information of the target block; the second block chain acquires cross-chain transaction parameters of target cross-chain transaction data and a second Merckel tree certificate aiming at the target cross-chain transaction data from the core block chain through second relay equipment based on the block header information of the target block; the second block chain verifies the second Mercker tree certificate through a second cross-chain governance contract to determine the safety of the target cross-chain transaction data; the second block chain checks the cross-chain transaction parameters through a second cross-chain governance contract to determine the legality of the cross-chain transaction parameters; after the second block chain passes the block header information verification of the target block, acquiring target cross-chain transaction data of the target cross-chain transaction from the target block based on the block header information of the target block; the second blockchain executes second operation content corresponding to the second blockchain in the target cross-chain transaction data through a second service contract so as to obtain a second operation result; and storing the target cross-chain transaction data and the second operation result in a second block of the second block chain, and returning cross-chain transaction completion prompt information to the core block chain, so that the core block chain records the cross-chain transaction completion prompt and returns the cross-chain transaction completion prompt to the first block chain, so that the first block chain determines that the current target cross-chain transaction is completed, and the closed loop of the target cross-chain transaction is realized.
It should be noted that, during the process of executing target cross-chain transaction data synchronously, the target cross-chain transaction initiator, that is, the first blockchain in the present disclosure, may give a certain incentive to the core blockchain, for example, transfer a certain electronic asset (for example, virtual currency) to the core blockchain.
The target block information obtaining module method provided by the embodiment of the disclosure completes data flow between the first block chain and the second block chain through the core block chain. According to the method, on one hand, the data circulation process is recorded and witnessed through the core block chain, so that the whole data circulation process can be traced, and the specific circulation process of the whole cross-chain transaction data can be traced conveniently; on the other hand, the verification is carried out on the target cross-link transaction data which is circulated in the circulation process through the core block chain, so that the target cross-link transaction data is not tampered in the circulation process, and the safety of data circulation is ensured; in addition, any block chain can realize data circulation through the core block chain provided by the disclosure, and the flow of data circulation is simplified.
Fig. 14 is a block diagram illustrating a data flow apparatus across a chain of blocks in accordance with an example embodiment. Referring to fig. 14, a data flow apparatus 1400 across block chains provided in the present disclosure may be applied to a core block chain that does not belong to a first block chain and a second block chain, where the data flow apparatus 1400 includes: a first block information obtaining module 1401, a first block information checking module 1402, a target cross-chain transaction data obtaining first module 1403, a target block generating module 1404 and a target block information sending module 1405.
The first block information obtaining module 1401 may be configured to obtain block header information of a first block in the first block chain, where the first block is used to record a target cross-chain transaction between the first block chain and the second block chain. The first block information checking module 1402 may be configured to check block header information of the first block through smart contracts disposed on the core block chain. The target cross-chain transaction data obtaining first module 1403 may be configured to obtain the target cross-chain transaction data of the target cross-chain transaction from the first block based on the block header information of the first block after the block header information of the first block passes the check. The target tile generation module 1404 may be configured to record the target cross-chain transaction data in a target tile of the core blockchain. The target block information sending module 1405 may be configured to send the block header information of the target block to the second blockchain, so that the second blockchain performs the target cross-chain transaction according to the block header information of the target block.
In some embodiments, the block header information of the first block comprises block address information of the first block, and the intelligent contracts disposed on the core block chain comprise core synchronization contracts and core cross-chain governance contracts. The first block information checking module 1402 may include: the system comprises a first block address checking unit, a first Mercker tree certification acquisition unit, a first Mercker tree certification checking unit and a cross-chain transaction parameter checking unit.
Wherein the first block address checking unit may be configured to check the block address information of the first block through the core synchronization contract to determine the validity of the block address information of the first block; the first merck tree attestation obtaining unit may be configured to obtain a cross-chain transaction parameter of the target cross-chain transaction and a first merck tree attestation for the target cross-chain transaction data based on the tile header information of the first tile; the first merkel tree attestation verification unit may be configured to verify the first merkel tree attestation through the core cross-chain governance contract to determine security of the target cross-chain transaction data; the cross-chain transaction parameter checking unit may be configured to check the cross-chain transaction parameter through the core cross-chain governance contract to determine the validity of the cross-chain transaction parameter.
In some embodiments, the core block chain is in data transfer with the first block chain through a first relay device, the first block chain and the core block chain have different data storage specifications, and the smart contracts deployed on the core block chain include core synchronization contracts. The target cross-chain transaction data acquisition first module 1403 may include: the system comprises a target cross-chain transaction first acquisition unit and a conversion unit.
The target cross-chain transaction first acquisition unit may be configured to acquire target cross-chain transaction data meeting a first block chain storage specification from the first block chain based on the block header information of the first block; the conversion unit may be configured to convert the target cross-chain transaction data complying with the first blockchain storage specification into target cross-chain transaction data complying with a core blockchain storage specification by the core blockchain via the core synchronization contract, so as to store the target cross-chain transaction data complying with the core blockchain storage specification in the target blockchain.
In some embodiments, the core blockchain is in data transfer with the first blockchain through a first relay device. The first block information obtaining module 1401 may include: the device comprises a first detection unit and a first block information acquisition unit.
Wherein the first detection unit may be configured to detect the first block chain by the first relay device through the core block chain; the first block information obtaining unit may be configured to, when the first relay device detects that a newly added first block exists in the first block chain and the target cross-chain transaction data is stored in the first block, obtain, by the first relay device, block header information of the first block from the first block chain.
In some embodiments, the cross-chain transaction parameters include a source chain address and a destination chain address of the target cross-chain transaction, the source chain address corresponding to the first blockchain and the destination chain address corresponding to the second blockchain. Wherein the first merkel tree proof verification unit may include: a registration check subunit and a parameter validity check subunit.
Wherein the registration check subunit may be configured to detect, by the core cross-chain governance contract, whether the source chain address and the target chain address are registered in the core block chain; the parameter validity check subunit may be configured to determine the validity of the cross-chain transaction parameter if the source chain address and the target chain address are registered in the core block chain.
The target block information sending module 1405 may include: and the target block information sending unit is configured to send the block header information of the target block to the second block chain according to the target chain address so that the second block chain can perform the target cross-chain transaction according to the block header information of the target block.
Since each functional module of the data flow device 1400 across the block chain according to the exemplary embodiment of the present disclosure corresponds to the step of the exemplary embodiment of the data flow method across the block chain, it is not described herein again.
Fig. 15 is a block diagram illustrating a data flow arrangement across a blockchain in accordance with an example embodiment.
In some embodiments, the cross blockchain data stream apparatus is applied to the first blockchain.
Referring to fig. 15, the above data streaming apparatus across a block chain may include: the system comprises a target data acquisition module 1501, a target cross-chain transaction data generation module 1502, a first block generation module 1503 and a first block information sending module.
Wherein the target data obtaining module 1501 may be configured to respond to a cochain request for target data by a target address, the target data being obtained by the first blockchain, and the target data relating to a target cross-chain transaction between the first blockchain and a second blockchain; the target cross-chain transaction data generation module 1502 may be configured to process the target data through a smart contract deployed on the first blockchain to generate target cross-chain transaction data from the target data; the first chunk generation module 1503 may be configured to store the target cross-chain transaction data in a first chunk, the first chunk including chunk header information; the first tile information sending module 1504 may be configured to send the tile header information of the first tile to a core block chain, so as to send the target cross-chain transaction data to the second block chain through the core block chain for performing the target cross-chain transaction, where the core block chain does not belong to the first block chain and the second block chain.
In some embodiments, a first transaction log of the target cross-chain transaction is also generated when generating the target cross-chain transaction data, the first transaction log including cross-chain transaction parameters of the target cross-chain transaction. The first block information sending module 1504 may include: the device comprises a first block information sending unit, a first transaction log sending unit, a first Mercker tree certification generating unit and a first Mercker tree certification sending unit.
The first block information sending unit may be configured to send block header information of the first block to a core block chain, so that the core block chain checks the block header information of the first block; the first transaction log sending unit may be configured to send the first transaction log to the core block chain in response to a transaction parameter obtaining request of the core block chain, so that the core block chain obtains the cross-chain transaction parameter; the first merkel tree proof generating unit may be configured to generate, in response to a data proof obtaining request of the core block chain, a first merkel tree proof according to a first merkel tree of the target cross-chain transaction data in the first block; the first mercker tree attestation sending unit may be configured to send the first mercker tree attestation to the core block chain to send the target cross-chain transaction data to the second block chain through the core block chain to conduct the target cross-chain transaction.
In some embodiments, the intelligent contracts deployed on the first blockchain include a first business contract and a first cross-chain governance contract. The target cross-chain transaction data generation module 1502 may include: the system comprises a first operation unit and a target cross-chain transaction data generation unit.
Wherein the first operation unit may be configured to execute, by the first service contract, first operation content corresponding to the first blockchain within the target data to obtain a first operation result; the target cross-chain transaction data generation unit may be configured to process the first operation result and the target data through the first cross-chain governance contract, and construct a target cross-chain transaction in the first blockchain to generate the target cross-chain transaction data.
Since each functional module of the data stream device 1500 of the cross-block chain in the exemplary embodiment of the present disclosure corresponds to the step of the exemplary embodiment of the data stream method of the cross-block chain, it is not described herein again.
Fig. 16 is a block diagram illustrating a data flow apparatus across a chain of blocks in accordance with an example embodiment.
In some embodiments, the cross blockchain data stream mechanism is applied to a second blockchain.
Referring to fig. 16, the above data streaming apparatus across a block chain may include: a target block information obtaining module 1601, a target block information checking module 1602, a target cross-chain transaction data obtaining second module 1603, a second result obtaining module 1604, and a second block generating module 1605.
The target block information obtaining module 1601 may be configured to receive, by a second blockchain, block header information of a target block sent by a core blockchain, where the target block is used to record a target cross-chain transaction between a first blockchain and the second blockchain, where the target cross-chain transaction is initiated by the first blockchain; the target block information checking module 1602 may be configured to check the block header information of the target block through the smart contract disposed on the second blockchain; the target cross-chain transaction data obtaining second module 1603 may be configured to obtain target cross-chain transaction data of the target cross-chain transaction from the target block based on the block header information of the target block after the block header information of the target block passes verification; the second result obtaining module 1604 may be configured to execute a second operation content corresponding to the second blockchain in the target cross-chain transaction data to obtain a second operation result; the second block generation module 1605 may be configured to store the target cross-chain transaction data and the second operation result in a second block of the second blockchain to complete the target cross-chain transaction.
In some embodiments, the block header information of the target block comprises block address information of the target block, and the intelligent contract disposed on the second block chain comprises a second synchronization contract and a second cross-chain governance contract; the target block information checking module 1602 may include: the system comprises a target block information checking unit, a second Mercker tree certification obtaining unit, a second Mercker tree certification checking unit and a cross-chain transaction parameter validity checking unit.
Wherein the target block information checking unit may be configured to check block header information of the target block through the second synchronization contract to determine validity of block address information of the target block; the second merkel tree attestation obtaining unit may be configured to obtain a cross-chain transaction parameter of the target cross-chain transaction data and a second merkel tree attestation for the target cross-chain transaction data based on the tile header information of the target tile; the second merkel tree attestation checking unit may be configured to check the second merkel tree attestation against the second cross-chain governance contract to determine security of the target cross-chain transaction data; the cross-chain transaction parameter validity checking unit may be configured to check the cross-chain transaction parameter through the second cross-chain governance contract to determine validity of the cross-chain transaction parameter.
In some embodiments, the second blockchain transmits data with the core blockchain through a second relay device; the target block information obtaining module 1601 may include: a second detection unit and a target block information acquisition unit.
Wherein the second detection unit may be configured to detect the core block chain by the second relay device through the second block chain; the target block information obtaining unit may be configured to, when the second relay device detects that a newly added target block exists in the core block chain and target cross-chain transaction data is stored in the target block, obtain, by the second relay device, block header information of the target block from the core block chain.
Since each functional module of the data flow device 1600 across the block chain according to the exemplary embodiment of the present disclosure corresponds to the step of the exemplary embodiment of the data flow method across the block chain, it is not described herein again.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules and/or units and/or sub-units described in the embodiments of the present application may be implemented by software, and may also be implemented by hardware. The described modules and/or units and/or sub-units may also be provided in a processor, and may be described as: a processor includes a transmitting unit, an obtaining unit, a determining unit, and a first processing unit. Wherein the names of such modules and/or units and/or sub-units do not in some way constitute a limitation on the modules and/or units and/or sub-units themselves.
Referring now to FIG. 17, a block diagram of a computer system 1700 of a computing device (e.g., a terminal device or server, etc.) suitable for use in implementing embodiments of the present application is shown. The computer system shown in fig. 17 is only an example, and should not bring any limitation to the function and the scope of use of the embodiments of the present application.
As shown in fig. 17, the computer system 1700 includes a Central Processing Unit (CPU)1701 which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)1702 or a program loaded from a storage portion 1708 into a Random Access Memory (RAM) 1703. In the RAM 1703, various programs and data required for the operation of the system 1700 are also stored. The CPU 1701, ROM 1702, and RAM 1703 are connected to each other through a bus 1704. An input/output (I/O) interface 1705 is also connected to bus 1704.
The following components are connected to the I/O interface 1705: an input section 1706 including a keyboard, a mouse, and the like; an output portion 1707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 1708 including a hard disk and the like; and a communication section 1709 including a network interface card such as a LAN card, a modem, or the like. The communication section 1709 performs communication processing via a network such as the internet. A driver 1710 is also connected to the I/O interface 1705 as necessary. A removable medium 1711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 1710 as necessary, so that a computer program read out therefrom is mounted into the storage portion 1708 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via the communication portion 1709, and/or installed from the removable media 1711. The computer program executes the above-described functions defined in the system of the present application when executed by the Central Processing Unit (CPU) 1701.
It should be noted that the computer readable storage medium shown in the present application can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable storage medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
As another aspect, the present application also provides a computer-readable storage medium, which may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable storage medium carries one or more programs which, when executed by a device, cause the device to perform functions including: acquiring block header information of a first block in the first block chain, wherein the first block is used for recording target cross-chain transaction between the first block chain and the second block chain; checking block header information of the first block by an intelligent contract deployed on the core block chain; after the block header information of the first block passes the verification, acquiring target cross-chain transaction data of the target cross-chain transaction from the first block based on the block header information of the first block; recording the target cross-chain transaction data in a target tile of the core tile chain; and sending the block header information of the target block to the second block chain so that the second block chain can carry out the target cross-chain transaction according to the block header information of the target block.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution of the embodiment of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for causing a computing device (which may be a personal computer, a server, a mobile terminal, or a smart device, etc.) to execute the method according to the embodiment of the present disclosure, such as one or more steps shown in fig. 5.
Furthermore, the above-described drawings are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the disclosure is not limited to the details of construction, arrangement of drawings, or method of implementation that have been set forth herein, but on the contrary, is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (15)

1. A data flow method of a cross-block chain is characterized in that the method is applied to a core block chain; wherein the method comprises the following steps:
acquiring block header information of a first block in the first block chain, wherein the first block is used for recording target cross-chain transaction between the first block chain and the second block chain;
checking block header information of the first block by a smart contract deployed on the core block chain;
after the block header information of the first block passes the verification, acquiring target cross-chain transaction data of the target cross-chain transaction from the first block based on the block header information of the first block;
recording the target cross-chain transaction data in a target tile of the core tile chain;
and sending the block header information of the target block to the second block chain so that the second block chain can carry out the target cross-chain transaction according to the block header information of the target block.
2. The method of claim 1, wherein the block header information of the first block comprises block address information of the first block, and the intelligent contracts deployed on the core block chain comprise core synchronization contracts and core cross-chain governance contracts; wherein checking block header information of the first block by an intelligent contract deployed on the core block chain comprises:
checking the block address information of the first block through the core synchronization contract to determine the validity of the block address information of the first block;
acquiring a cross-chain transaction parameter of the target cross-chain transaction and a first Mercker tree certificate aiming at the target cross-chain transaction data based on the block header information of the first block;
verifying the first Mercker tree attestation by the core cross-chain governance contract to determine the security of the target cross-chain transaction data;
and checking the cross-chain transaction parameters through the core cross-chain governance contract to determine the legality of the cross-chain transaction parameters.
3. The method of claim 1, wherein the first chain of blocks and the chain of core blocks have different data storage specifications, and wherein the smart contracts deployed on the chain of core blocks comprise core synchronization contracts; acquiring target cross-chain transaction data of the target cross-chain transaction from the first block based on the block header information of the first block, wherein the acquiring comprises the following steps:
acquiring target cross-chain transaction data which accords with a first block chain storage specification from the first block chain based on the block header information of the first block;
the core blockchain converts the target cross-chain transaction data conforming to the first blockchain storage specification into target cross-chain transaction data conforming to the core blockchain storage specification through the core synchronization contract, so that the target cross-chain transaction data conforming to the core blockchain storage specification is stored in the target blockchain.
4. The method of claim 1, wherein the core block chain performs data transmission with the first block chain via a first relay device; wherein, obtaining the block header information of the first block in the first block chain comprises:
the core blockchain detects the first blockchain through the first relay device;
when the first relay device detects that a newly added first block exists in the first block chain and the target cross-chain transaction data is stored in the first block, the core block chain acquires block header information of the first block from the first block chain through the first relay device.
5. The method of claim 2, wherein the target cross-chain transaction data comprises a source chain address and a target chain address of the cross-chain transaction parameter, the source chain address corresponding to the first blockchain, and the target chain address corresponding to the second blockchain; the verifying the cross-chain transaction parameters through the core cross-chain governance contract to determine the legality of the cross-chain transaction parameters comprises the following steps:
detecting, by the core cross-chain governance contract, whether the source link address and the target link address are registered in the core block chain;
if the source link address and the target link address are registered in the core block chain, determining the validity of the cross-link transaction parameter;
sending the block header information of the target block to the second block chain, so that the second block chain performs the target cross-chain transaction according to the block header information of the target block, including:
and sending the block header information of the target block to the second block chain according to the target chain address so that the second block chain can carry out the target cross-chain transaction according to the block header information of the target block.
6. A data flow method of a cross block chain is characterized in that the method is applied to a first block chain; wherein the method comprises the following steps:
in response to a target address uplink request for target data, the first blockchain acquiring the target data, wherein the target data relates to a target cross-chain transaction of the first blockchain and a second blockchain;
processing the target data through an intelligent contract deployed on the first blockchain to generate target cross-chain transaction data according to the target data;
storing the target cross-chain transaction data in a first block, the first block comprising block header information;
sending the block header information of the first block to a core block chain so as to send the target cross-chain transaction data to the second block chain through the core block chain for the target cross-chain transaction, wherein the core block chain does not belong to the first block chain and the second block chain.
7. The method of claim 6, wherein a first transaction log of the target cross-chain transaction is also generated when generating the target cross-chain transaction data, the first transaction log comprising cross-chain transaction parameters of the target cross-chain transaction; wherein sending the block header information of the first block to a core block chain so as to send the target cross-chain transaction data to the second block chain through the core block chain for the target cross-chain transaction comprises:
sending the block header information of the first block to a core block chain so that the core block chain can verify the block header information of the first block;
sending the first transaction log to the core block chain in response to a transaction parameter acquisition request of the core block chain, so that the core block chain acquires the cross-chain transaction parameters;
generating a first Mercker tree certificate according to a first Mercker tree of the target cross-chain transaction data in the first block in response to a data certificate acquisition request of the core block chain;
sending the first Mercker tree proof to the core block chain for sending the target cross-chain transaction data to the second block chain through the core block chain for the target cross-chain transaction.
8. The method of claim 6, wherein the intelligent contracts deployed on the first blockchain comprise first business contracts and first cross-chain governance contracts; wherein processing the target data through an intelligent contract deployed on the first blockchain to generate target cross-chain transaction data according to the target data comprises:
executing first operation content corresponding to the first block chain in the target data through the first service contract to obtain a first operation result;
and processing the first operation result and the target data through the first cross-chain governance contract, and constructing a target cross-chain transaction in the first blockchain to generate the target cross-chain transaction data.
9. A data flow method of a cross block chain is characterized in that the method is applied to a second block chain; wherein the method comprises the following steps:
the second blockchain receives blockhead information of a target blockchain sent by a core blockchain, wherein the target blockchain is used for recording target cross-chain transaction between a first blockchain and the second blockchain, and the target cross-chain transaction is initiated by the first blockchain;
checking the block header information of the target block through an intelligent contract deployed on the second block chain;
after the block header information of the target block passes the verification, acquiring target cross-chain transaction data of the target cross-chain transaction from the target block based on the block header information of the target block;
executing second operation content corresponding to the second block chain in the target cross-chain transaction data to obtain a second operation result;
storing the target cross-chain transaction data and the second operation result in a second block of the second block chain to complete the target cross-chain transaction.
10. The method of claim 9, wherein the block header information of the target block comprises block address information of the target block, and the intelligent contract deployed on the second blockchain comprises a second synchronization contract and a second cross-chain governance contract; wherein checking the block header information of the target block by the intelligent contract deployed on the second blockchain comprises:
checking the block header information of the target block through the second synchronization contract to determine the validity of the block address information of the target block;
acquiring a cross-chain transaction parameter of the target cross-chain transaction data and a second Merckel tree certification aiming at the target cross-chain transaction data based on the block header information of the target block;
verifying the second Mercker tree attestation by the second cross-chain governance contract to determine the security of the target cross-chain transaction data;
and checking the cross-chain transaction parameters through the second cross-chain governance contract to determine the legality of the cross-chain transaction parameters.
11. The method of claim 9, wherein the second blockchain is configured to transmit data with the core blockchain via a second relay device; the second block chain receives the block header information of the target block sent by the core block chain, and the second block chain comprises:
the second block chain detects the core block chain through the second relay device;
when the second relay device detects that a newly added target block exists in the core block chain and target cross-chain transaction data is stored in the target block, the second block chain acquires block header information of the target block from the core block chain through the second relay device.
12. A data flow device of a cross-block chain is characterized in that the device is applied to a core block chain; wherein the apparatus comprises:
a first block information obtaining module configured to obtain block header information of a first block in the first block chain, where the first block is used to record a target cross-chain transaction between the first block chain and the second block chain;
a first block information checking module configured to check block header information of the first block through an intelligent contract deployed on the core block chain;
a first target cross-chain transaction data acquisition module configured to acquire target cross-chain transaction data of the target cross-chain transaction from the first block based on the block header information of the first block after the block header information of the first block passes verification;
a target block generation module configured to record the target cross-chain transaction data in a target block of the core block chain;
and the target block information sending module is configured to send the block header information of the target block to the second block chain, so that the second block chain can perform the target cross-chain transaction according to the block header information of the target block.
13. A data flow device of a cross block chain is characterized in that the device is applied to a first block chain; wherein the apparatus comprises:
a target data acquisition module configured to respond to a target address uplink request for target data, the target data being acquired by the first blockchain, and the target data relating to a target cross-chain transaction of the first blockchain and a second blockchain;
a target cross-chain transaction data generation module configured to process the target data through an intelligent contract deployed on the first blockchain to generate target cross-chain transaction data according to the target data;
a first block generation module configured to store the target cross-chain transaction data in a first block, the first block including block header information;
a first block information sending module, configured to send block header information of the first block to a core block chain, so as to send the target cross-chain transaction data to the second block chain through the core block chain to perform the target cross-chain transaction, where the core block chain does not belong to the first block chain and the second block chain.
14. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-11.
15. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-11.
CN202011367758.0A 2020-11-27 2020-11-27 Cross-blockchain data transfer method, device and related equipment Active CN114567643B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011367758.0A CN114567643B (en) 2020-11-27 2020-11-27 Cross-blockchain data transfer method, device and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011367758.0A CN114567643B (en) 2020-11-27 2020-11-27 Cross-blockchain data transfer method, device and related equipment

Publications (2)

Publication Number Publication Date
CN114567643A true CN114567643A (en) 2022-05-31
CN114567643B CN114567643B (en) 2023-05-23

Family

ID=81711619

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011367758.0A Active CN114567643B (en) 2020-11-27 2020-11-27 Cross-blockchain data transfer method, device and related equipment

Country Status (1)

Country Link
CN (1) CN114567643B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115118528A (en) * 2022-08-26 2022-09-27 人民法院信息技术服务中心 Block chain security evaluation method, device, equipment and storage medium
CN116308368A (en) * 2023-05-24 2023-06-23 国网区块链科技(北京)有限公司 Relay block chain cross-chain data secure storage method and device and related equipment
CN116827957A (en) * 2023-08-30 2023-09-29 腾讯科技(深圳)有限公司 Information processing method, device, equipment and medium based on multi-block chain

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109919615A (en) * 2019-03-01 2019-06-21 上海分布信息科技有限公司 Across chain data interactive method and across chain data interaction system based on block chain
WO2019141984A1 (en) * 2018-01-17 2019-07-25 SETL Development Limited Interaction between blockchains
CN110442652A (en) * 2019-08-15 2019-11-12 腾讯科技(深圳)有限公司 A kind of across chain data processing method and device based on block chain
CN110597907A (en) * 2019-09-10 2019-12-20 腾讯科技(深圳)有限公司 Cross-block-chain data information synchronization method, device, equipment and medium
CN110650189A (en) * 2019-09-20 2020-01-03 深圳供电局有限公司 Relay-based block chain interaction system and method
CN111107136A (en) * 2019-12-05 2020-05-05 上海中信信息发展股份有限公司 Block chain cross-chain relay method based on IPFS
CN111914021A (en) * 2020-07-02 2020-11-10 连连智能科技有限公司 Cross-block-chain interaction method and system, computer equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019141984A1 (en) * 2018-01-17 2019-07-25 SETL Development Limited Interaction between blockchains
CN109919615A (en) * 2019-03-01 2019-06-21 上海分布信息科技有限公司 Across chain data interactive method and across chain data interaction system based on block chain
CN110442652A (en) * 2019-08-15 2019-11-12 腾讯科技(深圳)有限公司 A kind of across chain data processing method and device based on block chain
CN110597925A (en) * 2019-08-15 2019-12-20 腾讯科技(深圳)有限公司 Cross-chain data processing method and device based on block chain
CN110597907A (en) * 2019-09-10 2019-12-20 腾讯科技(深圳)有限公司 Cross-block-chain data information synchronization method, device, equipment and medium
CN110650189A (en) * 2019-09-20 2020-01-03 深圳供电局有限公司 Relay-based block chain interaction system and method
CN111107136A (en) * 2019-12-05 2020-05-05 上海中信信息发展股份有限公司 Block chain cross-chain relay method based on IPFS
CN111914021A (en) * 2020-07-02 2020-11-10 连连智能科技有限公司 Cross-block-chain interaction method and system, computer equipment and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115118528A (en) * 2022-08-26 2022-09-27 人民法院信息技术服务中心 Block chain security evaluation method, device, equipment and storage medium
CN116308368A (en) * 2023-05-24 2023-06-23 国网区块链科技(北京)有限公司 Relay block chain cross-chain data secure storage method and device and related equipment
CN116308368B (en) * 2023-05-24 2023-07-18 国网区块链科技(北京)有限公司 Relay block chain cross-chain data secure storage method and device and related equipment
CN116827957A (en) * 2023-08-30 2023-09-29 腾讯科技(深圳)有限公司 Information processing method, device, equipment and medium based on multi-block chain
CN116827957B (en) * 2023-08-30 2023-11-07 腾讯科技(深圳)有限公司 Information processing method, device, equipment and medium based on multi-block chain

Also Published As

Publication number Publication date
CN114567643B (en) 2023-05-23

Similar Documents

Publication Publication Date Title
CN112214780B (en) Data processing method and device, intelligent equipment and storage medium
CN108881187B (en) Cross-link data transmission method and device suitable for permission link scene
US11050690B2 (en) Method for providing recording and verification service for data received and transmitted by messenger service, and server using method
US20210304201A1 (en) Transaction verification method and apparatus, storage medium, and electronic device
CN114567643B (en) Cross-blockchain data transfer method, device and related equipment
CN111801910A (en) System and method for authenticating off-chain data based on proof verification
CN112000976B (en) Authentication management method, device, medium and electronic equipment for block chain system
Ferrer-Gomila et al. A fair contract signing protocol with blockchain support
WO2022166637A1 (en) Blockchain network-based method and apparatus for data processing, and computer device
CN111066047A (en) Implementing a blockchain based workflow
CN112613877B (en) Intelligent contract triggering method and device applied to block chain network and related equipment
JP2022534023A (en) Computer-implemented system and method
CN113706313A (en) Financing method, system and computer readable storage medium based on block chain
CN111833190A (en) Annuity data processing method, device, medium and electronic equipment
CN113129008B (en) Data processing method, device, computer readable medium and electronic equipment
US20240039727A1 (en) Blockchain-based data processing method and apparatus, device, and readable storage medium
CN110827034B (en) Method and apparatus for initiating a blockchain transaction
WO2023244993A1 (en) Systems and methods for mitigating network congestion on blockchain networks by supporting blockchain operations through off-chain interactions
CN116975901A (en) Identity verification method, device, equipment, medium and product based on block chain
CN113014556B (en) Bank-enterprise communication system, communication method and electronic terminal
CN114641967A (en) Callback mechanism for blockchain transactions
CN116186786A (en) Block chain-based service processing method and device, electronic equipment and readable medium
CN115967508A (en) Data access control method and device, equipment, storage medium and program product
WO2021064565A1 (en) Call-back mechanisms for blockchain transactions
US11755746B1 (en) Systems and methods for conducting blockchain actions based on network mappings of self-executing program characteristics

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40071423

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant