CN113420090A - Cross-chain processing method and device, electronic equipment and readable storage medium - Google Patents

Cross-chain processing method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN113420090A
CN113420090A CN202110732879.9A CN202110732879A CN113420090A CN 113420090 A CN113420090 A CN 113420090A CN 202110732879 A CN202110732879 A CN 202110732879A CN 113420090 A CN113420090 A CN 113420090A
Authority
CN
China
Prior art keywords
data
cross
verified
link
chain
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110732879.9A
Other languages
Chinese (zh)
Inventor
刘晓赫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202110732879.9A priority Critical patent/CN113420090A/en
Publication of CN113420090A publication Critical patent/CN113420090A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Business, Economics & Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Software Systems (AREA)
  • Strategic Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Health & Medical Sciences (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Storage Device Security (AREA)

Abstract

The disclosure provides a cross-chain processing method and device, electronic equipment and a readable storage medium, and relates to the technical field of block chains, in particular to the technical field of cross-chain of block chains. The specific implementation scheme is as follows: responding to the cross-link processing request by the first application link node, locking source data corresponding to the target data in the first application link, locking the source data by the first cross-link relay, generating first to-be-verified data, and sending the first to-be-verified data to the relay link node; and the relay link node performs first verification on the first data to be verified, the second cross-link relay generates second data to be verified when the first verification is passed, the second data to be verified is sent to the second application link node, and the second application link node performs second verification on the second data to be verified, processes the target data when the second verification is passed, and generates receipt information of a processing result. Based on the scheme, the method and the device can verify the credibility of the cross-chain transaction, and are beneficial to ensuring the safety and credibility of the cross-chain transaction.

Description

Cross-chain processing method and device, electronic equipment and readable storage medium
Technical Field
The present disclosure relates to the field of blockchain technologies, and in particular, to a method and an apparatus for processing a blockchain, an electronic device, and a readable storage medium.
Background
The block chain technology is developed to date, a plurality of different block chains are produced, and data on the chains of the block chains are isolated, so that the block chains become a data isolated island, and the different block chains cannot be interconnected and intercommunicated.
The cross-chain technology is a technology for solving data interaction between two or more blockchains, so that data can cross the barriers of the chains and the price value can be circulated among different blockchains.
In the cross-chain transaction, how to verify the credibility of the cross-chain transaction on the blockchain is an important problem to be solved in the cross-chain technology.
Disclosure of Invention
In order to solve at least one of the above drawbacks, the present disclosure provides a cross-chain processing method, an apparatus, an electronic device, and a readable storage medium.
According to a first aspect of the present disclosure, there is provided a cross-chain processing method, including:
the method comprises the steps that a first application chain node responds to a chain crossing processing request initiated on a first application chain and used for target data on a second application chain, and source data corresponding to the target data in the first application chain are locked;
the first cross-link relay is locked based on the source data, generates first data to be verified, and sends the first data to be verified to the relay link node;
and the relay link node performs first verification on the first data to be verified so that the second cross-link relay generates second data to be verified when the first verification passes, sends the second data to be verified to the second application link node so that the second application link node performs second verification on the second data to be verified, and processes the target data when the second verification passes so as to generate receipt information of a processing result.
According to a second aspect of the present disclosure, there is provided another cross-chain processing method, the method including:
the method comprises the steps that a relay link node receives first to-be-verified data sent by a first cross-link relay and conducts first verification on the first to-be-verified data, the first to-be-verified data are generated by the first cross-link relay in a locked mode based on source data, and the source data are generated by the first application link node in a locked mode in response to a cross-link processing request initiated on a first application link and used for processing target data on a second application link;
when the first verification passes, the second cross-link relay generates second data to be verified, and the second data to be verified is sent to the second application link node;
and the second application chain link point performs second verification on the second data to be verified, and processes the target data when the second verification passes to generate receipt information of a processing result.
According to a third aspect of the present disclosure, there is provided a cross-chain processing apparatus, the apparatus comprising:
the source data locking module is used for the first application chain node to respond to a cross-chain processing request initiated on the first application chain and aiming at target data on the second application chain, and locking the source data corresponding to the target data in the first application chain;
the first to-be-verified data module is used for locking the first cross-link relay based on the source data, generating first to-be-verified data and sending the first to-be-verified data to the relay link node;
the first data verification module is used for performing first verification on the first to-be-verified data by the relay link node so that the second to-be-verified data is generated by the second cross-link relay when the first verification passes, sending the second to-be-verified data to the second application link node so that the second to-be-verified data is subjected to second verification by the second application link node, and processing the target data when the second verification passes so as to generate receipt information of a processing result.
According to a fourth aspect of the present disclosure, there is provided another cross-chain processing apparatus, the apparatus comprising:
the first data verification module is used for receiving first to-be-verified data sent by a first cross-link relay by a relay link node and performing first verification on the first to-be-verified data, wherein the first to-be-verified data is generated by the first cross-link relay in a locked mode based on source data, and the source data is generated by the first application link node in response to a cross-link processing request initiated on a first application link and used for locking target data on a second application link;
the second data to be verified module is used for generating second data to be verified by the second cross-link relay when the first verification passes and sending the second data to be verified to the second application link node;
and the second data verification module is used for performing second verification on the second to-be-verified data by the second application link node, and processing the target data to generate receipt information of a processing result when the second verification passes.
According to a fifth aspect of the present disclosure, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the cross-chain processing method.
According to a sixth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to execute the above-described cross-chain processing method.
According to a seventh aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the above-described cross-chain processing method.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
The technical scheme provided by the disclosure has the following beneficial effects:
in the scheme provided by the embodiment of the disclosure, a first application chain node responds to a cross-chain processing request initiated on a first application chain and used for target data on a second application chain, locks source data corresponding to the target data in the first application chain, is locked by a first cross-chain relay based on the source data, generates first data to be verified, and sends the first data to be verified to a relay chain node; and the relay link node performs first verification on the first data to be verified, the second cross-link relay generates second data to be verified when the first verification is passed, the second data to be verified is sent to the second application link node, and the second application link node performs second verification on the second data to be verified, processes the target data when the second verification is passed, and generates receipt information of a processing result. Based on the scheme, the method and the device can verify the credibility of the cross-chain transaction, and are beneficial to ensuring the safety and credibility of the cross-chain transaction.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic structural diagram of a cross-chain system provided by an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a cross-chain processing method provided by an embodiment of the present disclosure;
FIG. 3 is a schematic flow chart diagram of another cross-chain processing method provided by the embodiments of the present disclosure;
FIG. 4 is a flowchart illustrating a specific implementation of a cross-chain processing method according to an embodiment of the disclosure;
FIG. 5 is a schematic flowchart illustrating another specific implementation of a cross-chain processing method according to an embodiment of the present disclosure;
FIG. 6 is a schematic structural diagram of a cross-chain data processing apparatus according to an embodiment of the present disclosure;
FIG. 7 is a schematic structural diagram of another cross-chain data processing apparatus provided in the embodiments of the present disclosure;
fig. 8 is a block diagram of an electronic device for implementing the cross-chain processing method provided by the embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 shows a schematic structural diagram of a cross-chain system provided by an embodiment of the present disclosure, and the method provided by the embodiment of the present disclosure is applied to the cross-chain system shown in fig. 1, where the cross-chain system includes a relay chain, a first application chain, a first cross-chain relay, a second application chain, and a second cross-chain relay.
The relay chain, namely the relay block chain, is deployed with a cross-chain management contract, and is used for application chain management, verification of application chain certification information, triggering of cross-chain events, storage query of cross-chain transactions, and the like. By abstracting the behavior of the heterogeneous chain, the relay chain standardizes the realization interface of the parallel chain, and the cross-chain management contract can be updated by realizing the block chain abstract class so as to adapt to the new heterogeneous chain type. The interfaces defined in the relay chain may be as shown in table 1.
TABLE 1
Figure BDA0003139657040000041
The function realized by the interface named as register Block is used for registering application chain information, the function realized by the interface named as unregisterBlock is used for canceling application chain information, and the function realized by the interface named as DataVertification is used for verifying the validity of a message sent by an application chain.
The first application chain and the second application chain are parallel chains participating in cross-chain transactions, a cross-chain contract and a service contract are deployed, the cross-chain contract and the service contract can be communicated through cross-chain contract calling, and unified validity checking, data serialization and safety authentication can be conducted on cross-chain messages of the service contract based on the cross-chain contract.
The first cross-link relay and the second cross-link relay, namely the relay, are interaction components for connecting different blockchain systems, and are used for connecting the application blockchain and the relay chain. Relays can listen to inter-link events occurring in block and relay chains. By abstracting the behavior of the heterogeneous chain, the cross-chain relay can define the interface shown in table 2, and different heterogeneous chains only need to realize the interface according to the characteristics of the heterogeneous chains.
TABLE 2
Figure BDA0003139657040000051
The function realized by the interface named as 'Init' is initialization application chain configuration, the function realized by the interface named as 'Stop' is Stop operation, the function realized by the interface named as 'ListeningEvents' is monitoring cross-chain events and transmitting the events to a core module for processing, and the function realized by the interface named as 'InvokeProxyContract' calls a cross-chain contract and is used for transmitting the information of a relay chain to a parallel chain.
The cross-chain system provided by the embodiment of the disclosure may further include a cross-chain client, that is, a user may initiate a request to different types of application blockchains and relay chains using an entry of the cross-chain system.
The chain-crossing system provided by the embodiment of the disclosure does not limit the number of application block chains, can be expanded according to actual needs, and supports access of heterogeneous block chains.
The initialization process of the cross-chain system provided by the embodiment of the disclosure is specifically as follows:
the application chains respectively start the network and deploy cross-link contracts (designating relay chains during initialization) and service contracts;
a relay chain deploys a cross-link management contract;
information of each application chain is registered with a cross-link management contract of the relay chain. The registered information depends on the trust model of the application chain, and can be a starting block or a certifier certificate;
the configuration and initiation of the relay is used to connect the application block chain with the relay chain.
When the inter-chain system provided by the embodiment of the present disclosure wants to support a new blockchain a of a blockchain type, the following modifications need to be made:
(1) upgrading a cross-link management contract of the relay link, and supporting registration, management and verification of the block chain A;
(2) compiling a cross-link contract of an intelligent contract language facing to a block chain A;
(3) and compiling a plug-in of the cross-link relay based on the SDK of the block chain A to realize a corresponding interface, so that the relay has the capability of communicating with the block chain A.
It becomes very simple for a running application chain to want to access a cross-chain system, and the steps are as follows:
(1) the application chain deploys a cross-chain contract oriented to the intelligent contract language of the application chain;
(2) upgrading the existing service contract, and communicating with the cross-chain contract through cross-contract calling;
(3) authorizing a cross-link right of the business contract through a cross-link contract;
(4) registering information of the application chain to the relay chain, such as registering a root of trust of the application chain, and verifying the validity of the message based on the root of trust when subsequently performing cross-chain message verification;
(5) cross-link relays are configured and initiated to connect the relay chain with the application chain.
At this time, the application chain can access the cross-chain system, and cross-chain connection is established with other application chains.
In the prior art, the interoperation of two heterogeneous or homogeneous block chains is generally realized through a relay mode, and the two chains need to establish a light client for maintaining the state of the block chain of the other side. In this way, since the two blockchains need to directly verify the messages of the other side, the codes of the blockchains need to be modified, the implementation difficulty is high, and hot plugging of the blockchains cannot be realized, i.e., the functions of accessing, exiting and updating the application chains cannot be performed under the condition that the operation of the cross-chain system is not affected. In addition, in this way, when one blockchain wants to cross chains with heterogeneous blockchains of different types, an adaptation is needed to be performed on one blockchain, which results in high adaptation complexity.
The cross-chain system provided by the embodiment of the disclosure can realize the access of the application chain in a mode of registering the application chain to the cross-chain management contract of the relay chain by deploying the cross-chain contract and the service intelligent contract, does not need complicated code modification work, reduces the realization difficulty of the cross-chain system, and supports the hot plug of the application block chain, namely, can perform the functions of access, exit and update on the application block chain under the condition of not influencing the operation of the cross-chain system. In addition, in the chain crossing system provided by the embodiment of the disclosure, when the application block chain needs to cross the chain with heterogeneous block chains of different types, two-by-two adaptation of the block chain is not needed, and only the relay chain needs to be adapted, so that the adaptation complexity is reduced.
Fig. 2 shows a schematic flowchart of a cross-chain processing method provided by an embodiment of the present disclosure, and as shown in fig. 2, the method mainly includes:
step S210, a first application chain node responds to a cross-chain processing request initiated on a first application chain and aiming at target data on a second application chain, and locks source data corresponding to the target data in the first application chain;
step S220, the first cross-link relay is locked based on the source data to generate first data to be verified and send the first data to be verified to the relay link node;
and step S230, the relay link node performs first verification on the first data to be verified so that the second cross-link relay generates second data to be verified when the first verification is passed, the second data to be verified is sent to the second application link node so that the second application link node performs second verification on the second data to be verified, and when the second verification is passed, the target data is processed to generate receipt information of a processing result.
The first application chain and the second application chain may be two block chains participating in a cross-chain transaction, the first cross-chain relay is in communication with the first application chain and the relay chain, and the second cross-chain relay is in communication with the second application chain and the relay chain. The first application chain node is a block chain node in the first application chain, the second application chain node is a block chain link node in the second application chain, and the relay chain node is a block chain node in the relay chain.
The first application chain may be an initiator of the cross-chain processing request, and the user may initiate the cross-chain processing request by invoking a business contract of the first application chain through a client of the first application chain. The first application chain may lock the source data in response to the cross-chain processing request. The state of the locked source data cannot be modified by any transaction.
The target data and the source data are resources involved in the cross-chain processing, and as a typical example, the usage scenario of the cross-chain processing may be to initiate a redemption transaction of an asset on a first blockchain to an asset on a second application chain for a user on the first application chain.
The first to-be-verified data can be generated by the first cross-link relay and sent to the relay link node, so as to verify the credibility of the cross-link processing request on the first application link and the locking of the source data to the relay link.
When the first to-be-verified data is not verified, the cross-link processing request on the first application chain can be considered to be not trusted, and then the cross-link processing flow can be terminated.
When the first to-be-verified data is verified to pass, the cross-link processing request on the first application chain can be considered to be credible and the source data is locked, and then the relay chain node can generate second to-be-verified data which is used for verifying the credibility of the cross-link processing request on the first application chain and the source data is locked to the second application chain.
When the second verification passes, the second blockchain node can consider the credibility of the cross-chain processing request and the source data is locked, and at this time, the target data can be processed, and the receipt information is generated according to the processing result of the target data.
The receipt information is used to feed back a processing result, such as processing success or processing failure, as the target data to the first application chain.
In the cross-link system provided by the embodiment of the disclosure, because the first application chain and the second application chain are both adapted to the relay chain, after the relay chain verifies that the first to-be-verified data is trusted, the second to-be-verified data can be generated, and the second application chain can complete verification of validity of the cross-link processing request by verifying the second to-be-verified data, thereby overcoming limitations of the existing cross-link system.
In the method provided by the embodiment of the present disclosure, a first application chain node responds to a cross-link processing request initiated on a first application chain and directed to target data on a second application chain, locks source data corresponding to the target data in the first application chain, is locked by a first cross-link relay based on the source data, generates first data to be verified, and sends the first data to be verified to a relay chain node; and the relay link node performs first verification on the first data to be verified, the second cross-link relay generates second data to be verified when the first verification is passed, the second data to be verified is sent to the second application link node, and the second application link node performs second verification on the second data to be verified, processes the target data when the second verification is passed, and generates receipt information of a processing result. Based on the scheme, the method and the device can verify the credibility of the cross-chain transaction, and are beneficial to ensuring the safety and credibility of the cross-chain transaction.
In an optional implementation manner of the present disclosure, the method further includes:
when receiving third to-be-verified data sent by the second cross-link relay, the relay link node performs third verification on the third to-be-verified data, wherein the third to-be-verified data is generated by the second cross-link relay based on the receipt information;
when the third verification passes, the first cross-link relay generates fourth data to be verified, and the fourth data to be verified is sent to the first application link node;
and the first application chain node carries out fourth verification on the fourth data to be verified, acquires receipt information when the fourth verification passes, and carries out corresponding operation on the source data based on the receipt information.
The third data to be verified can be generated by the second cross-link relay and sent to the relay link node, so as to verify the credibility of the receipt information on the second application link to the relay link.
When the third to-be-verified data is not verified, the receipt information on the second application chain can be considered to be not trusted, and then the cross-chain processing flow can be terminated.
When the third to-be-verified data is verified to pass, the cross-link processing request on the second application chain can be considered to be credible, and then the relay chain node can generate fourth to-be-verified data which is used for verifying the credibility of the receipt information on the second application chain to the first application chain.
In the chain crossing system provided by the embodiment of the disclosure, because the first application chain and the second application chain are both adapted to the relay chain, after the relay chain verifies that the third data to be verified is trusted, fourth data to be verified can be generated, and the first application chain can complete verification of validity of the receipt information by verifying the fourth data to be verified, thereby overcoming limitations of the existing chain crossing system.
When the fourth verification passes, the receipt information can be considered to be credible, and the first application chain can perform corresponding operation according to the receipt information source data.
In an optional implementation manner of the present disclosure, performing corresponding operations on source data based on receipt information includes:
if the receipt information is that the target data is successfully processed, updating the source data;
and if the receipt information is that the target data fails to be processed, rolling back the source data.
The receipt information is used for reflecting the processing result of the target data, so that the source data is correspondingly processed based on the processing result of the target data.
Taking the exchange transaction scenario of the assets as an example, when the target data is successfully processed, the locked source data can be updated; when the target data processing is unsuccessful, the locked source data may be rolled back, i.e., the locked state of the source data is released.
In an optional implementation manner of the present disclosure, the generating, by the first cross-link relay, first to-be-verified data based on the source data being locked includes:
the first application link node generates a first cross-link event in response to the source data being locked;
the first cross-link relay generates first data to be verified when monitoring a first cross-link event.
The first cross-link relay can monitor the first cross-link event through event monitoring. The event information of the first cross-chain event may include basic information of the cross-chain processing request and information that the source data is locked.
The first cross-link relay can package the basic information of the cross-link processing request and the information that the source data is locked into a first transaction and submit the first transaction to the relay link.
In an optional implementation manner of the present disclosure, the generating, by the first cross-link relay, first to-be-verified data when the first cross-link event is monitored includes:
when the first cross-link relay monitors a first cross-link event, generating a first existence certificate of the first cross-link event, and taking the first existence certificate as first data to be verified;
the relay link node performs first verification on the first to-be-verified data, and the method comprises the following steps:
the relay link node performs a first verification of the first presence credential.
In actual use, a first presence credential for a first cross-chain event may be generated from trust information for a first application chain.
The relay link node may obtain the trust information of the first application chain in advance, so that the validity of the first presence certificate is verified based on the trust information of the first application chain.
The first application chain can initiate a registration request when joining the cross-chain system, and registers the trust information of the first application chain to the relay chain, so that a foundation is provided for the subsequent relay chain to verify the first to-be-verified data based on the trust information of the first application chain.
In particular, the trust information may comprise at least one of a root of trust, starting block information, and a certificate of the verifier node.
In an optional implementation manner of the present disclosure, when the third verification passes, the generating, by the first cross-link relay, fourth data to be verified includes:
when the third verification passes, the relay application chain node generates a fourth cross-chain event;
and the first cross-link relay generates fourth data to be verified when monitoring a fourth cross-link event. And the relay chain can trigger a fourth cross-chain event after the third verification is passed, and the first cross-chain relay can monitor the fourth cross-chain event through event monitoring. The event information of the fourth cross-chain event may include receipt information.
The first cross-link relay may package the fourth to-be-verified data and the receipt information into a fourth transaction, and submit the fourth transaction to the first application chain.
In an optional implementation manner of the present disclosure, when the first cross-link relay monitors the fourth cross-link event, generating fourth data to be verified includes:
when the first cross-link relay monitors a fourth cross-link event, generating a fourth existence certificate of the fourth cross-link event, and taking the fourth existence certificate as fourth data to be verified;
the fourth verification of the fourth data to be verified is carried out by the first application chain node, and the fourth verification comprises the following steps:
the first application chain node performs a fourth verification of the fourth presence credential.
In actual use, a fourth proof of presence for a fourth cross-chain event may be generated from trust information of the first application chain. The first application chain may verify the validity of the fourth presence attestation based on trust information of the first application chain.
Fig. 3 shows a schematic flowchart of a cross-chain processing method provided by an embodiment of the present disclosure, and as shown in fig. 3, the method mainly includes:
step S310, a relay link node receives first to-be-verified data sent by a first cross-link relay and performs first verification on the first to-be-verified data, wherein the first to-be-verified data is generated by the first cross-link relay in a locked mode based on source data, and the source data is generated by a first application link node responding to a cross-link processing request initiated on a first application link and used for locking target data on a second application link;
step S320, when the first verification passes, the second cross-link relay generates second data to be verified and sends the second data to be verified to the second application link node;
and S330, performing second verification on the second data to be verified by the second application link node, and processing the target data to generate receipt information of a processing result when the second verification passes.
The first application chain and the second application chain may be two block chains participating in a cross-chain transaction, the first cross-chain relay is in communication with the first application chain and the relay chain, and the second cross-chain relay is in communication with the second application chain and the relay chain. The first application chain node is a block chain node in the first application chain, the second application chain node is a block chain link node in the second application chain, and the relay chain node is a block chain node in the relay chain.
The first application chain may be an initiator of the cross-chain processing request, and the user may initiate the cross-chain processing request by invoking a business contract of the first application chain through a client of the first application chain. The first application chain may lock the source data in response to the cross-chain processing request. The state of the locked source data cannot be modified by any transaction.
The target data and the source data are resources involved in the cross-chain processing, and as a typical example, the usage scenario of the cross-chain processing may be to initiate a redemption transaction of an asset on a first blockchain to an asset on a second application chain for a user on the first application chain.
The first to-be-verified data can be generated by the first cross-link relay and sent to the relay link node, so as to verify the credibility of the cross-link processing request on the first application link and the locking of the source data to the relay link.
When the first to-be-verified data is not verified, the cross-link processing request on the first application chain can be considered to be not trusted, and then the cross-link processing flow can be terminated.
When the first to-be-verified data is verified to pass, the cross-link processing request on the first application chain can be considered to be credible and the source data is locked, and then the relay chain node can generate second to-be-verified data which is used for verifying the credibility of the cross-link processing request on the first application chain and the source data is locked to the second application chain.
When the second verification passes, the second blockchain node can consider the credibility of the cross-chain processing request and the source data is locked, and at this time, the target data can be processed, and the receipt information is generated according to the processing result of the target data.
The receipt information is used to feed back a processing result, such as processing success or processing failure, as the target data to the first application chain.
In the cross-link system provided by the embodiment of the disclosure, because the first application chain and the second application chain are both adapted to the relay chain, after the relay chain verifies that the first to-be-verified data is trusted, the second to-be-verified data can be generated, and the second application chain can complete verification of validity of the cross-link processing request by verifying the second to-be-verified data, thereby overcoming limitations of the existing cross-link system.
In the method provided by the embodiment of the present disclosure, a first application chain node responds to a cross-link processing request initiated on a first application chain and directed to target data on a second application chain, locks source data corresponding to the target data in the first application chain, is locked by a first cross-link relay based on the source data, generates first data to be verified, and sends the first data to be verified to a relay chain node; and the relay link node performs first verification on the first data to be verified, the second cross-link relay generates second data to be verified when the first verification is passed, the second data to be verified is sent to the second application link node, and the second application link node performs second verification on the second data to be verified, processes the target data when the second verification is passed, and generates receipt information of a processing result. Based on the scheme, the method and the device can verify the credibility of the cross-chain transaction, and are beneficial to ensuring the safety and credibility of the cross-chain transaction.
In an optional implementation manner of the present disclosure, the method further includes:
the second cross-link relay generates third data to be verified based on the receipt information and sends the third data to be verified to the relay link node;
and the relay link node performs third verification on the third data to be verified so that the first cross-link relay generates fourth data to be verified when the third verification is passed, sends the fourth data to be verified to the first application link node so that the first application link node performs fourth verification on the fourth data to be verified, acquires receipt information when the fourth verification is passed, and performs corresponding operation on the source data based on the receipt information.
The third data to be verified can be generated by the second cross-link relay and sent to the relay link node, so as to verify the credibility of the receipt information on the second application link to the relay link.
When the third to-be-verified data is not verified, the receipt information on the second application chain can be considered to be not trusted, and then the cross-chain processing flow can be terminated.
When the third to-be-verified data is verified to pass, the cross-link processing request on the second application chain can be considered to be credible, and then the relay chain node can generate fourth to-be-verified data which is used for verifying the credibility of the receipt information on the second application chain to the first application chain.
In the chain crossing system provided by the embodiment of the disclosure, because the first application chain and the second application chain are both adapted to the relay chain, after the relay chain verifies that the third data to be verified is trusted, fourth data to be verified can be generated, and the first application chain can complete verification of validity of the receipt information by verifying the fourth data to be verified, thereby overcoming limitations of the existing chain crossing system.
When the fourth verification passes, the receipt information can be considered to be credible, and the first application chain can perform corresponding operation according to the receipt information source data.
In an optional implementation manner of the present disclosure, when the first authentication passes, the second cross-link relay generates second data to be authenticated, including:
when the first verification passes, the relay chain node generates a second cross-chain event;
and the second cross-link relay generates second data to be verified when monitoring a second cross-link event.
The relay chain can trigger a second cross-chain event after the first verification is passed, and the second cross-chain relay can monitor the second cross-chain event through event monitoring. The event information of the second cross-chain event may include basic information of the cross-chain processing request and information that the source data is locked.
The second cross-chain relay may package the second to-be-verified data, the basic information of the cross-chain processing request, and the information that the source data is locked into a second transaction, and submit the second transaction to the second application chain.
In an optional implementation manner of the present disclosure, when the second cross-link relay monitors the second cross-link event, generating second data to be verified includes:
when the second cross-link relay monitors a second cross-link event, generating a second existence certificate of the second cross-link event, and taking the second existence certificate as second data to be verified;
and the second application chain node performs second verification on the second data to be verified, and the second verification comprises the following steps:
the second application link point performs a second verification of the second presence credential.
Wherein the second presence attestation is a presence attestation of a second cross-chain event.
In actual use, a second presence attestation of a second cross-chain event may be generated from trust information of a second application chain. The second chain of applications may verify the validity of the second presence attestation based on trust information of the second chain of applications.
In an optional implementation manner of the present disclosure, the generating, by the second cross-link relay, third data to be verified based on the receipt information includes:
the second application chain node generates a third chain-crossing event based on the receipt information;
and the second cross-link relay generates third data to be verified when monitoring a third cross-link event.
After the generated receipt information, the second application chain may trigger a third cross-chain event, and the second cross-chain relay may monitor the third cross-chain event through event monitoring. The event information of the third cross-chain event may include receipt information.
The second cross-link relay may package the third to-be-verified data and the receipt information into a third transaction, and submit the third transaction to the relay link.
In an optional implementation manner of the present disclosure, when the second inter-link relay monitors a third inter-link event, generating third data to be verified includes:
when the second cross-link relay monitors a third cross-link event, generating a third existence certification of the third cross-link event, and taking the third existence certification as third data to be verified;
and the relay link node performs third verification on the third data to be verified, and the third verification comprises the following steps:
the relay link node performs a third verification of the third presence credential.
Wherein the third presence attestation is a presence attestation of a third cross-chain event.
In actual use, a third presence attestation of a third cross-chain event may be generated from trust information of the second application chain. The relay chain may verify the validity of the third presence attestation based on the trust information of the second application chain.
The second application chain can initiate a registration request when joining the cross-chain system, and registers the trust information of the second application chain to the relay chain, so that a basis is provided for the subsequent relay chain to verify the third data to be verified based on the trust information of the second application chain.
In particular, the trust information may comprise at least one of a root of trust, starting block information, and a certificate of the verifier node.
Fig. 4 is a schematic flowchart of a specific implementation manner of the cross-chain processing method provided by the embodiment of the present disclosure, where the specific flowchart is as follows:
1. calling a service contract 2 of an application chain A by a user Alice of the application chain A (namely a first application chain) through a cross-chain Client (namely a cross-chain Client), inquiring whether source data of the application chain A is available or not by the service contract 2, if the source data of the application chain A is unavailable, executing failure, and if the source data of the application chain A is available, locking the source data, so that any transaction before unlocking cannot modify the state of the source data;
2. triggering a cross-link calling condition by the service contract 2 of the application chain A, processing target data on the service contract 2 of the application chain B (namely a second application chain), and calling the cross-link contract of the application chain A through the cross-link contract;
3. the cross-link contract of the application chain A triggers a first cross-link event E1, E1 identifies the basic information of the cross-link processing request and the information that the source data is locked;
4. a relay (namely a first cross-link relay) connected with the application chain A obtains a first cross-link event E1 through event monitoring;
5. the first cross-chain relay resolves the first cross-chain event E1 and then generates a first existence proof P1 of the first cross-chain event E1, wherein the first existence proof P1 can be used for proving the validity of the first cross-chain event E1;
6. the first cross-link relay generates a first transaction T1 of a cross-link management contract for sending to the relay link, and basic information of a cross-link processing request and a first existence certification P1 are contained in the first transaction T1;
7. the method comprises the steps that a cross-link management contract of a relay link executes a first transaction T1, the validity of a first existence certificate P1 is verified, then basic information of a cross-link processing request at this time is recorded in an account book, if the verification of the first existence certificate P1 is passed, a second cross-link event E2 is sent out, and event information of the second cross-link event E2 contains the basic information of the cross-link processing request;
8. a second cross-link relay connected with the application chain B monitors a second cross-link event E2, and the resource location of the calling target data is obtained through analysis;
9. the relay link node analyzes the second cross-link event E2 and generates a second existence proof P2 for proving the validity of the second cross-link event E2;
10. the relay node generates a second transaction T2 of the cross-chain contract for sending to the application chain B, and the second T2 contains basic information of the cross-chain processing request and a second existence certification P2;
11. performing a second transaction T2 by the cross-link contract of the application chain B, verifying the validity of a second existence proof P2, and obtaining the resource location of the calling target data;
12. and the cross-chain contract of the application chain B calls a service contract through the cross-contract to process the target data. And at the moment, the application chain B business contract modifies the target data according to the business requirements and generates receipt information according to the processing result of the target processing.
Fig. 5 is a schematic flow chart of another specific implementation of the cross-chain processing method provided in the embodiment of the present disclosure, and the specific flow chart is as follows:
13. the application chain B executes the cross-chain call transaction T2, throws out an event E3 (namely, a third cross-chain event), the E3 contains receipt information which needs to be returned to the application chain A, namely, the application chain B processes the target data, and generates the receipt information according to the processing result of the target data, the third cross-chain event can be triggered after the receipt information is generated, and the event information of the third cross-chain event comprises the receipt information;
14. the relay monitors the trigger of E3 to obtain E3 information, namely the second cross-link relay monitors a third cross-link event and obtains receipt information according to the event information of the third cross-link event;
15. the second cross-link relay generates certification information P3 (i.e., a third presence certification) for certifying the validity of E3;
16. the second cross-link relay generates a transaction T3 (i.e., a third transaction) for a cross-link management contract to the relay link, P3 being contained within T3;
17. executing T3 by a cross-link management contract of the relay link, verifying the validity of P3, triggering a cross-link E4, wherein the E4 identifies that an application chain B triggers E3, namely the relay link node verifies the validity of a third existence certification, and triggers a fourth cross-link event after the third existence certification is verified to be valid;
18. the first cross-link relay monitors triggering of E4 to acquire E4 information, namely the first cross-link relay monitors a fourth cross-link event to acquire event information of the fourth cross-link event;
19. the first cross-link relay generates existence proving information P4 for proving the effectiveness of E4;
20. the first cross-chain relay generates a fourth transaction T4, which is sent to the application chain a, and P4 is contained in T4;
21. the application chain A executes T4, verifies the validity of P4, receives the response piece information, namely the first blockchain node verifies the validity of the fourth existence certification, and can acquire the response piece information when the fourth existence certification is verified to be valid;
22. the cross-link contract of the first application chain returns receipt information to the business contract through cross-link contract calling, the business contract records the receipt information in an account book, and if the execution failure of the target data is determined according to the receipt information, the locked source data is unlocked; if the target data is successfully executed according to the receipt information, updating the locked source data;
23. a cross-chain client (i.e., a cross-chain client) obtains receipt information.
Based on the same principle as the method shown in fig. 2, fig. 6 shows a schematic structural diagram of a cross-chain processing apparatus provided by the embodiment of the present disclosure, as shown in fig. 6, the cross-chain processing apparatus 60 may include:
a source data locking module 610, configured to lock, by a first application chain node, source data in a first application chain corresponding to target data in a second application chain in response to a cross-chain processing request for the target data in the second application chain initiated on the first application chain;
a first to-be-verified data module 620, configured to lock the first cross-link relay based on the source data, generate first to-be-verified data, and send the first to-be-verified data to the relay link node;
the first data verification module 630 is configured to perform first verification on the first to-be-verified data by the relay link node, so that the second cross-link relay generates second to-be-verified data when the first verification passes, send the second to-be-verified data to the second application link node, so that the second application link node performs second verification on the second to-be-verified data, and process the target data when the second verification passes, so as to generate receipt information of a processing result.
In the apparatus provided by the embodiment of the present disclosure, a first application chain node responds to a cross-link processing request initiated on a first application chain and directed to target data on a second application chain, locks source data corresponding to the target data in the first application chain, is locked by a first cross-link relay based on the source data, generates first data to be verified, and sends the first data to be verified to a relay chain node; and the relay link node performs first verification on the first data to be verified, the second cross-link relay generates second data to be verified when the first verification is passed, the second data to be verified is sent to the second application link node, and the second application link node performs second verification on the second data to be verified, processes the target data when the second verification is passed, and generates receipt information of a processing result. Based on the scheme, the method and the device can verify the credibility of the cross-chain transaction, and are beneficial to ensuring the safety and credibility of the cross-chain transaction.
Optionally, the apparatus further comprises:
the third data verification module is used for performing third verification on third data to be verified when the relay link node receives the third data to be verified sent by the second cross-link relay, wherein the third data to be verified is generated by the second cross-link relay based on the receipt information;
the fourth data to be verified module is used for generating fourth data to be verified by the first cross-link relay and sending the fourth data to be verified to the first application link node when the third verification is passed;
and the fourth data verification module is used for performing fourth verification on the fourth data to be verified by the first application link node, acquiring receipt information when the fourth verification passes, and performing corresponding operation on the source data based on the receipt information.
Optionally, when the fourth data verification module performs corresponding operation on the source data based on the receipt information, the fourth data verification module is specifically configured to:
if the receipt information is that the target data is successfully processed, updating the source data;
and if the receipt information is that the target data fails to be processed, rolling back the source data.
Optionally, when the first cross-link relay is locked based on the source data and generates the first to-be-verified data, the first to-be-verified data module is specifically configured to:
the first application link node generates a first cross-link event in response to the source data being locked;
the first cross-link relay generates first data to be verified when monitoring a first cross-link event.
Optionally, when the first cross-link relay of the first to-be-verified data module monitors the first cross-link event and generates the first to-be-verified data, the first to-be-verified data module is specifically configured to:
when the first cross-link relay monitors a first cross-link event, generating a first existence certificate of the first cross-link event, and taking the first existence certificate as first data to be verified;
the first data verification module is specifically configured to, when the relay link node performs first verification on the first to-be-verified data:
the relay link node performs a first verification of the first presence credential.
Optionally, when the third verification passes and the first cross-link relay generates the fourth data to be verified, the fourth data to be verified module is specifically configured to:
when the third verification passes, the relay application chain node generates a fourth cross-chain event;
and the first cross-link relay generates fourth data to be verified when monitoring a fourth cross-link event.
Optionally, when the first cross-link relay monitors a first cross-link event, the first to-be-verified data module is specifically configured to:
when the first cross-link relay monitors a fourth cross-link event, generating a fourth existence certificate of the fourth cross-link event, and taking the fourth existence certificate as fourth data to be verified;
the fourth data verification module is specifically configured to, when the first application link node performs fourth verification on the fourth to-be-verified data:
the first application chain node performs a fourth verification of the fourth presence credential.
It is understood that the above modules of the cross-chain processing device in the embodiment of the present disclosure have functions of implementing the corresponding steps of the cross-chain processing device method in the embodiment shown in fig. 2. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The modules can be software and/or hardware, and each module can be implemented independently or by integrating a plurality of modules. For the functional description of each module of the test apparatus, reference may be specifically made to the corresponding description of the cross-chain processing method in the embodiment shown in fig. 2, and details are not repeated here.
Based on the same principle as the method shown in fig. 3, fig. 7 shows a schematic structural diagram of a cross-chain processing apparatus provided by the embodiment of the present disclosure, as shown in fig. 7, the cross-chain processing apparatus 70 may include:
a first data verification module 710, configured to receive, by a relay link node, first to-be-verified data sent by a first cross-link relay, and perform first verification on the first to-be-verified data, where the first to-be-verified data is generated by the first cross-link relay in a locked manner based on source data, and the source data is locked by the first application link node in response to a cross-link processing request initiated on a first application link and directed to target data on a second application link;
a second to-be-verified data module 720, configured to, when the first verification passes, generate, by the second inter-link relay, second to-be-verified data, and send the second to-be-verified data to the second application link node;
and the second data verification module 730 is configured to perform second verification on the second to-be-verified data by the second application link node, and process the target data when the second verification passes, so as to generate receipt information of a processing result.
In the apparatus provided by the embodiment of the present disclosure, a first application chain node responds to a cross-link processing request initiated on a first application chain and directed to target data on a second application chain, locks source data corresponding to the target data in the first application chain, is locked by a first cross-link relay based on the source data, generates first data to be verified, and sends the first data to be verified to a relay chain node; and the relay link node performs first verification on the first data to be verified, the second cross-link relay generates second data to be verified when the first verification is passed, the second data to be verified is sent to the second application link node, and the second application link node performs second verification on the second data to be verified, processes the target data when the second verification is passed, and generates receipt information of a processing result. Based on the scheme, the method and the device can verify the credibility of the cross-chain transaction, and are beneficial to ensuring the safety and credibility of the cross-chain transaction.
Optionally, the apparatus further comprises:
the third data to be verified module is used for the second cross-link relay to generate third data to be verified based on the receipt information and send the third data to be verified to the relay link node;
and the third data verification module is used for performing third verification on the third data to be verified by the relay link node so that the first cross-link relay generates fourth data to be verified when the third verification passes, sending the fourth data to be verified to the first application link node so that the first application link node performs fourth verification on the fourth data to be verified, acquiring receipt information when the fourth verification passes, and performing corresponding operation on the source data based on the receipt information.
Optionally, when the first verification passes and the second cross-link relay generates the second data to be verified, the second data module to be verified is specifically configured to:
when the first verification passes, the relay chain node generates a second cross-chain event;
and the second cross-link relay generates second data to be verified when monitoring a second cross-link event.
Optionally, when the second cross-link relay monitors a second cross-link event and generates second data to be verified, the second data to be verified module is specifically configured to:
when the second cross-link relay monitors a second cross-link event, generating a second existence certificate of the second cross-link event, and taking the second existence certificate as second data to be verified;
the second data verification module is specifically configured to, when performing second verification on the second to-be-verified data at the second application link node:
the second application link point performs a second verification of the second presence credential.
Optionally, when the second cross-link relay generates the second data to be verified based on the receipt information, the second data to be verified module is specifically configured to:
the second application chain node generates a third chain-crossing event based on the receipt information;
and the second cross-link relay generates third data to be verified when monitoring a third cross-link event.
Optionally, when the third to-be-verified data module monitors a third cross-link event in the second cross-link relay and generates third to-be-verified data, the third to-be-verified data module is specifically configured to:
when the second cross-link relay monitors a third cross-link event, generating a third existence certification of the third cross-link event, and taking the third existence certification as third data to be verified;
the third data verification module is specifically configured to, when performing third verification on the third to-be-verified data at the relay link node:
the relay link node performs a third verification of the third presence credential.
It is understood that the above modules of the cross-chain processing device in the embodiment of the present disclosure have functions of implementing the corresponding steps of the cross-chain processing device method in the embodiment shown in fig. 3. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The modules can be software and/or hardware, and each module can be implemented independently or by integrating a plurality of modules. For the functional description of each module of the test apparatus, reference may be specifically made to the corresponding description of the cross-chain processing method in the embodiment shown in fig. 3, and details are not described here again.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
The electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a cross-chain processing method as provided by an embodiment of the disclosure.
Compared with the prior art, the electronic equipment responds to a cross-link processing request initiated on a first application link and used for target data on a second application link by a first application link node, locks source data corresponding to the target data in the first application link, is locked by a first cross-link relay based on the source data, generates first data to be verified, and sends the first data to be verified to a relay link node; and the relay link node performs first verification on the first data to be verified, the second cross-link relay generates second data to be verified when the first verification is passed, the second data to be verified is sent to the second application link node, and the second application link node performs second verification on the second data to be verified, processes the target data when the second verification is passed, and generates receipt information of a processing result. Based on the scheme, the method and the device can verify the credibility of the cross-chain transaction, and are beneficial to ensuring the safety and credibility of the cross-chain transaction.
The readable storage medium is a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform a cross-chain processing method as provided by an embodiment of the present disclosure.
Compared with the prior art, the readable storage medium has the advantages that a first application chain node responds to a cross-link processing request initiated on a first application chain and used for target data on a second application chain, source data corresponding to the target data in the first application chain is locked, a first cross-link relay is used for locking based on the source data to generate first to-be-verified data, and the first to-be-verified data is sent to a relay chain node; and the relay link node performs first verification on the first data to be verified, the second cross-link relay generates second data to be verified when the first verification is passed, the second data to be verified is sent to the second application link node, and the second application link node performs second verification on the second data to be verified, processes the target data when the second verification is passed, and generates receipt information of a processing result. Based on the scheme, the method and the device can verify the credibility of the cross-chain transaction, and are beneficial to ensuring the safety and credibility of the cross-chain transaction.
The computer program product comprises a computer program which, when executed by a processor, implements a cross-chain processing method as provided by embodiments of the present disclosure.
Compared with the prior art, the computer program product has the advantages that a first application chain node responds to a cross-chain processing request initiated on a first application chain and used for target data on a second application chain, source data corresponding to the target data in the first application chain is locked, a first cross-chain relay is used for locking the source data, first data to be verified are generated, and the first data to be verified are sent to a relay chain node; and the relay link node performs first verification on the first data to be verified, the second cross-link relay generates second data to be verified when the first verification is passed, the second data to be verified is sent to the second application link node, and the second application link node performs second verification on the second data to be verified, processes the target data when the second verification is passed, and generates receipt information of a processing result. Based on the scheme, the method and the device can verify the credibility of the cross-chain transaction, and are beneficial to ensuring the safety and credibility of the cross-chain transaction.
Fig. 8 illustrates a schematic block diagram of an example electronic device 2000 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 8, the device 2000 includes a computing unit 2010, which may perform various appropriate actions and processes in accordance with a computer program stored in a Read Only Memory (ROM)2020, or a computer program loaded from a storage unit 2080 into a Random Access Memory (RAM) 2030. In the RAM 2030, various programs and data required for the operation of the device 2000 can also be stored. The computing unit 2010, ROM 2020, and RAM 2030 are coupled to each other via bus 2040. An input/output (I/O) interface 2050 is also connected to bus 2040.
Various components in device 2000 are connected to I/O interface 2050, including: an input unit 2060 such as a keyboard, a mouse, or the like; an output unit 2070 such as various types of displays, speakers, and the like; a storage unit 2080 such as a magnetic disk, an optical disk, and the like; and a communication unit 2090, such as a network card, modem, wireless communication transceiver, etc. The communication unit 2090 allows the device 2000 to exchange information/data with other devices over a computer network, such as the internet, and/or various telecommunication networks.
Computing unit 2010 may be a variety of general purpose and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 2010 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. The computing unit 2010 executes the cross-chain processing method provided in the embodiments of the present disclosure. For example, in some embodiments, the cross-chain processing methods provided in embodiments of the present disclosure may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 2080. In some embodiments, some or all of the computer program may be loaded onto and/or installed onto the device 2000 via the ROM 2020 and/or the communication unit 2090. When loaded into RAM 2030 and executed by computing unit 2010, may perform one or more steps of the cross-chain processing method provided in embodiments of the disclosure. Alternatively, in other embodiments, the computing unit 2010 may be configured in any other suitable manner (e.g., by way of firmware) to perform the cross-chain processing methods provided in embodiments of the present disclosure.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on 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.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel or sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (20)

1. A method of cross-chain processing, comprising:
a first application chain node responds to a cross-chain processing request initiated on a first application chain and used for target data on a second application chain, and locks source data corresponding to the target data in the first application chain;
the first cross-link relay generates first to-be-verified data based on the source data being locked, and sends the first to-be-verified data to a relay link node;
the relay link node performs first verification on the first data to be verified so that a second cross-link relay generates second data to be verified when the first verification passes, the second data to be verified is sent to a second application link node so that the second application link node performs second verification on the second data to be verified, and when the second verification passes, the target data is processed to generate receipt information of a processing result.
2. The method of claim 1, further comprising:
when receiving third to-be-verified data sent by the second cross-link relay, the relay link node performs third verification on the third to-be-verified data, wherein the third to-be-verified data is generated by the second cross-link relay based on the receipt information;
when the third verification passes, the first cross-link relay generates fourth data to be verified, and sends the fourth data to be verified to the first application link node;
and the first application chain node carries out fourth verification on the fourth data to be verified, acquires the receipt information when the fourth verification is passed, and carries out corresponding operation on the source data based on the receipt information.
3. The method of claim 2, the performing respective operations on the source data based on the response piece information comprising:
if the receipt information is that the target data is successfully processed, updating the source data;
and if the receipt information is that the target data processing fails, rolling back the source data.
4. The method of any of claims 1-3, wherein the first cross-link relay generating first to-be-verified data based on the source data being locked comprises:
the first application link node generates a first cross-link event in response to the source data being locked;
and the first cross-link relay generates first data to be verified when monitoring the first cross-link event.
5. The method of claim 4, wherein the first cross-link relay generating first to-be-verified data upon listening for the first cross-link event comprises:
when the first cross-link relay monitors the first cross-link event, generating a first existence certification of the first cross-link event, and taking the first existence certification as first to-be-verified data;
the relay link node performs first verification on the first to-be-verified data, and the method includes:
the relay link node performs a first verification of the first presence credential.
6. The method of claim 2, wherein the first cross-link relay generating fourth data to be verified when the third verification passes comprises:
when the third verification passes, the relay application chain node generates a fourth cross-chain event;
and generating fourth data to be verified by the first cross-link relay when the fourth cross-link event is monitored.
7. The method of claim 6, wherein the first cross-link relay generating fourth data to be verified upon listening for the fourth cross-link event comprises:
when the first cross-chain relay monitors the fourth cross-chain event, generating a fourth existence certification of the fourth cross-chain event, and taking the fourth existence certification as fourth data to be verified;
the fourth verification of the fourth to-be-verified data by the first application chain node comprises the following steps:
the first application chain node performs a fourth verification of the fourth presence attestation.
8. A method of cross-chain processing, comprising:
the method comprises the steps that a relay link node receives first to-be-verified data sent by a first cross-link relay, and performs first verification on the first to-be-verified data, wherein the first to-be-verified data is generated by the first cross-link relay in a locked mode based on source data, and the source data is generated by a first application link node in a locked mode in response to a cross-link processing request initiated on a first application link and used for target data on a second application link;
when the first verification passes, a second cross-link relay generates second data to be verified, and the second data to be verified is sent to a second application link node;
and the second application chain link point carries out second verification on the second data to be verified, and processes the target data when the second verification passes to generate receipt information of a processing result.
9. The method of claim 8, further comprising:
the second cross-link relay generates third data to be verified based on the receipt information and sends the third data to be verified to the relay link node;
and the relay link node performs third verification on the third data to be verified so that the first cross-link relay generates fourth data to be verified when the third verification passes, sends the fourth data to be verified to the first application link node so that the first application link node performs fourth verification on the fourth data to be verified, acquires the receipt information when the fourth verification passes, and performs corresponding operation on the source data based on the receipt information.
10. The method of claim 8 or 9, wherein generating second data to be verified by a second cross-link relay when the first verification passes comprises:
when the first verification passes, the relay link node generates a second cross-link event;
and the second cross-chain relay generates second data to be verified when monitoring the second cross-chain event.
11. The method of claim 10, wherein the second cross-chain relay generates second data to be verified upon listening for the second cross-chain event, comprising:
when the second cross-chain relay monitors the second cross-chain event, generating a second existence certification of the second cross-chain event, and taking the second existence certification as second data to be verified;
the second application link node performs second verification on the second data to be verified, including:
the second application link point performs a second verification of the second presence credential.
12. The method of claim 9, wherein the second cross-link relay generating third data to be verified based on the receipt information comprises:
the second application chain link point generates a third chain crossing event based on the receipt information;
and the second cross-link relay generates third data to be verified when monitoring the third cross-link event.
13. The method of claim 12, wherein the second cross-chain relay generates third data to be verified upon listening for the third cross-chain event, comprising:
when the second cross-chain relay monitors the third cross-chain event, generating a third existence certification of the third cross-chain event, and taking the third existence certification as third data to be verified;
the third verification of the third to-be-verified data is performed by the relay link node, and the third verification comprises the following steps:
the relay link node performs a third verification of the third presence credential.
14. A cross-chain processing apparatus comprising:
a source data locking module, configured to lock, by a first application chain node, source data in a first application chain corresponding to target data in a second application chain in response to a cross-chain processing request for the target data in the first application chain, where the request is initiated on the first application chain;
the first to-be-verified data module is used for locking the first cross-link relay based on the source data, generating first to-be-verified data and sending the first to-be-verified data to the relay link node;
the first data verification module is used for performing first verification on the first to-be-verified data by the relay link node point so that a second to-be-verified data is generated by a second cross-link relay when the first verification passes, sending the second to-be-verified data to a second application link point so that the second application link node performs second verification on the second to-be-verified data, and processing the target data when the second verification passes so as to generate receipt information of a processing result.
15. The apparatus of claim 14, further comprising:
a third data verification module, configured to perform third verification on third data to be verified when the relay link node receives the third data to be verified that is sent by the second cross-link relay, where the third data to be verified is generated by the second cross-link relay based on the receipt information;
a fourth data to be verified module, configured to, when the third verification passes, generate fourth data to be verified by the first cross-link relay, and send the fourth data to be verified to the first application link node;
and the fourth data verification module is used for performing fourth verification on the fourth data to be verified by the first application link node, acquiring the receipt information when the fourth verification is passed, and performing corresponding operation on the source data based on the receipt information.
16. A cross-chain processing apparatus comprising:
the system comprises a first data verification module, a second data verification module and a third data verification module, wherein the first data to be verified is sent by a first cross-link relay and is subjected to first verification, the first data to be verified is generated by the first cross-link relay based on source data in a locked mode, and the source data is generated by a first application link node in response to a cross-link processing request initiated on a first application link and used for responding to target data on a second application link and is locked;
the second data module to be verified is used for generating second data to be verified by a second cross-link relay when the first verification passes and sending the second data to be verified to a second application link node;
and the second data verification module is used for performing second verification on the second to-be-verified data by the second application link node, and processing the target data to generate receipt information of a processing result when the second verification passes.
17. The apparatus of claim 16, further comprising:
a third data module to be verified, configured to generate, by the second inter-link relay, third data to be verified based on the receipt information, and send the third data to be verified to the relay link node;
a third data verification module, configured to perform third verification on the third to-be-verified data by the relay link node, so that the first cross-link relay generates fourth to-be-verified data when the third verification passes, send the fourth to-be-verified data to the first application link node, so that the first application link node performs fourth verification on the fourth to-be-verified data, acquire the receipt information when the fourth verification passes, and perform corresponding operation on the source data based on the receipt information.
18. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-13.
19. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-13.
20. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-13.
CN202110732879.9A 2021-06-29 2021-06-29 Cross-chain processing method and device, electronic equipment and readable storage medium Pending CN113420090A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110732879.9A CN113420090A (en) 2021-06-29 2021-06-29 Cross-chain processing method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110732879.9A CN113420090A (en) 2021-06-29 2021-06-29 Cross-chain processing method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN113420090A true CN113420090A (en) 2021-09-21

Family

ID=77717367

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110732879.9A Pending CN113420090A (en) 2021-06-29 2021-06-29 Cross-chain processing method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN113420090A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114448646A (en) * 2022-03-22 2022-05-06 深圳壹账通智能科技有限公司 Method, system, equipment and medium for managing authority of cross-chain transaction
CN114499898A (en) * 2022-04-15 2022-05-13 北京邮电大学 Block chain cross-chain secure access method and device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190172026A1 (en) * 2017-12-02 2019-06-06 Alchemy Limited LLC Cross blockchain secure transactions
CN110245517A (en) * 2019-05-29 2019-09-17 杭州秘猿科技有限公司 A kind of across chain method, apparatus, system and the electronic equipment of block chain
CN111107136A (en) * 2019-12-05 2020-05-05 上海中信信息发展股份有限公司 Block chain cross-chain relay method based on IPFS
CN111797171A (en) * 2020-07-22 2020-10-20 南京纯白矩阵科技有限公司 Data synchronization system based on block chain cross-chain technology
CN112650764A (en) * 2020-12-30 2021-04-13 北京百度网讯科技有限公司 Cross-chain data processing method, device, equipment and storage medium
CN112783877A (en) * 2020-12-30 2021-05-11 北京百度网讯科技有限公司 Cross-link data verification method, device, equipment and storage medium
CN112804358A (en) * 2021-03-30 2021-05-14 支付宝(杭州)信息技术有限公司 Method and device for transferring data in cross-link mode based on relay equipment network
CN112822181A (en) * 2020-12-30 2021-05-18 杭州趣链科技有限公司 Verification method of cross-chain transaction, terminal device and readable storage medium
US20210150065A1 (en) * 2018-11-16 2021-05-20 Advanced New Technologies Co., Ltd. Cross-chain authentication

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190172026A1 (en) * 2017-12-02 2019-06-06 Alchemy Limited LLC Cross blockchain secure transactions
US20210150065A1 (en) * 2018-11-16 2021-05-20 Advanced New Technologies Co., Ltd. Cross-chain authentication
CN110245517A (en) * 2019-05-29 2019-09-17 杭州秘猿科技有限公司 A kind of across chain method, apparatus, system and the electronic equipment of block chain
CN111107136A (en) * 2019-12-05 2020-05-05 上海中信信息发展股份有限公司 Block chain cross-chain relay method based on IPFS
CN111797171A (en) * 2020-07-22 2020-10-20 南京纯白矩阵科技有限公司 Data synchronization system based on block chain cross-chain technology
CN112650764A (en) * 2020-12-30 2021-04-13 北京百度网讯科技有限公司 Cross-chain data processing method, device, equipment and storage medium
CN112783877A (en) * 2020-12-30 2021-05-11 北京百度网讯科技有限公司 Cross-link data verification method, device, equipment and storage medium
CN112822181A (en) * 2020-12-30 2021-05-18 杭州趣链科技有限公司 Verification method of cross-chain transaction, terminal device and readable storage medium
CN112804358A (en) * 2021-03-30 2021-05-14 支付宝(杭州)信息技术有限公司 Method and device for transferring data in cross-link mode based on relay equipment network

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114448646A (en) * 2022-03-22 2022-05-06 深圳壹账通智能科技有限公司 Method, system, equipment and medium for managing authority of cross-chain transaction
CN114499898A (en) * 2022-04-15 2022-05-13 北京邮电大学 Block chain cross-chain secure access method and device
CN114499898B (en) * 2022-04-15 2022-09-09 北京邮电大学 Block chain cross-chain secure access method and device

Similar Documents

Publication Publication Date Title
CN111769958B (en) Block chain cross-chain processing method, device, equipment and storage medium
CN112650764B (en) Cross-chain data processing method, device, equipment and storage medium
CN113434881B (en) Credibility verification method and device for cross-chain transaction and electronic equipment
CN111382168B (en) Node group creating method and node group-based transaction method in alliance chain network
CN112783877B (en) Cross-chain data verification method, device, equipment and storage medium
CN111510333B (en) Alliance block chain system based on K3S platform, realization method and device
CN112817995B (en) Data processing method and device, electronic equipment and storage medium
CN112764887A (en) Construction method, processing method, device, equipment and storage medium of transaction request
CN112651741B (en) Block chain-based data processing method and device
CN110673933A (en) ZooKeeper-based distributed asynchronous queue implementation method, device, equipment and medium
CN112714158A (en) Transaction processing method, relay network, cross-link gateway, system, medium, and device
CN113377875B (en) Cross-chain data processing method and device, electronic equipment and readable storage medium
TWI839875B (en) Payment method, user terminal, device, equipment, system and medium
CN107038025B (en) SOA architecture-based system calling method and device
CN111221904A (en) Intelligent contract deployment and execution method and device, electronic equipment and storage medium
CN113420090A (en) Cross-chain processing method and device, electronic equipment and readable storage medium
CN113010561B (en) Data acquisition method and device based on super account book and computer system
CN114266680A (en) Block chain-based electronic contract signing method, device and system
CN113360547A (en) Cross-chain query method and device, electronic equipment and readable storage medium
EP4365808A1 (en) Data verification method and apparatus
CN113434883A (en) Cross-chain processing method and device, electronic equipment and readable storage medium
CN113468268A (en) Cross-chain processing method and device, electronic equipment and readable storage medium
CN111866171B (en) Message processing method, device, electronic equipment and medium
CN114968822A (en) Interface testing method and device, computer equipment and storage medium
CN114675876A (en) Business processing method and device, electronic equipment and storage medium

Legal Events

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