CN114612103B - Method, device, system, medium and electronic equipment for cross-block chain transaction - Google Patents

Method, device, system, medium and electronic equipment for cross-block chain transaction Download PDF

Info

Publication number
CN114612103B
CN114612103B CN202210500124.0A CN202210500124A CN114612103B CN 114612103 B CN114612103 B CN 114612103B CN 202210500124 A CN202210500124 A CN 202210500124A CN 114612103 B CN114612103 B CN 114612103B
Authority
CN
China
Prior art keywords
blockchain
cross
transaction
block chain
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.)
Active
Application number
CN202210500124.0A
Other languages
Chinese (zh)
Other versions
CN114612103A (en
Inventor
池程
朱斯语
刘阳
张钰雯
马宝罗
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Academy of Information and Communications Technology CAICT
Original Assignee
China Academy of Information and Communications Technology CAICT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Academy of Information and Communications Technology CAICT filed Critical China Academy of Information and Communications Technology CAICT
Priority to CN202210500124.0A priority Critical patent/CN114612103B/en
Publication of CN114612103A publication Critical patent/CN114612103A/en
Application granted granted Critical
Publication of CN114612103B publication Critical patent/CN114612103B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • G06Q20/4014Identity check for transactions

Abstract

Disclosed are a method, apparatus, system, medium and electronic device for cross-blockchain transactions, the method comprising: responding to a cross-block chain transaction request submitted by a user registered on a first block chain received by the first block chain, and analyzing a target address and endorsement information of a second block chain from the cross-block chain transaction request, wherein the endorsement information comprises a target contract required to be called by the cross-block chain transaction request; calling a pre-execution contract to access the endorsement service of the second block chain according to the target address and the endorsement information to obtain a pre-execution result of the second block chain; determining whether cross-block-chain transaction is feasible or not based on a pre-execution result, and acquiring transaction data corresponding to a cross-block-chain transaction request when the cross-block-chain transaction is determined to be feasible; based on the transaction data, the cross-blockchain transaction is executed, thereby improving the reliability of the cross-blockchain transaction.

Description

Method, device, system, medium and electronic equipment for cross-block chain transaction
Technical Field
The present disclosure relates to blockchain technologies, and in particular, to a method, an apparatus, a system, a computer storage medium, and an electronic device for cross-blockchain transactions.
Background
At present, as the application of blockchain technology is more and more widespread, the demand for performing cross-blockchain transactions between different blockchains is increasing, and how to ensure the reliability of the cross-blockchain transactions is a concern.
Disclosure of Invention
The embodiment of the disclosure provides a method, a device and a system for cross-blockchain transaction, a computer storage medium and an electronic device.
According to a first aspect of embodiments of the present disclosure, there is provided a method of cross-blockchain transactions, comprising: responding to a cross-block chain transaction request submitted by a user registered on a first block chain received by the first block chain, and analyzing a target address and endorsement information of a second block chain to which the cross-block chain transaction request points from the cross-block chain transaction request, wherein the endorsement information comprises a target contract which needs to be called by the cross-block chain transaction request; calling a pre-execution contract to access the endorsement service of the second block chain according to the target address and the endorsement information to obtain a pre-execution result of the second block chain, wherein the pre-execution result comprises a contract result obtained by pre-executing the target contract of the second block chain and signature information of the endorsement node of the second block chain aiming at the contract result; determining whether cross-block-chain transaction is feasible or not based on a pre-execution result, and acquiring transaction data corresponding to a cross-block-chain transaction request when the cross-block-chain transaction is determined to be feasible; based on the transaction data, a cross blockchain transaction is performed.
According to a second aspect of the embodiments of the present disclosure, there is provided an apparatus for performing a transaction across a blockchain, including: the analysis unit is configured to respond to the first blockchain receiving a cross-blockchain transaction request submitted by a user registered on the first blockchain, and analyze a target address and endorsement information of a second blockchain pointed by the cross-blockchain transaction request from the cross-blockchain transaction request, wherein the endorsement information comprises a target contract required to be called by the cross-blockchain transaction request; the pre-execution unit is configured to call a pre-execution contract to access the endorsement service of the second block chain according to the target address and the endorsement information to obtain a pre-execution result of the second block chain, wherein the pre-execution result comprises a contract result obtained by pre-executing the target contract by the second block chain and signature information of the endorsement node of the second block chain for the contract result; the verification unit is configured to determine whether cross-block chain transaction is feasible or not based on the pre-execution result, and when the cross-block chain transaction is determined to be feasible, obtain transaction data corresponding to the cross-block chain transaction request; an execution unit configured to execute a cross blockchain transaction based on the transaction data.
According to a third aspect of embodiments of the present disclosure, there is provided a blockchain system, including: the method for block chain crossing transaction in the embodiment comprises a main chain and at least two slave chains subordinate to the main chain, wherein any two slave chains in the at least two slave chains are used as a first block chain and a second block chain, and the block chain crossing transaction is carried out by adopting the block chain crossing transaction method in the embodiment.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a computer storage medium having stored thereon a computer program product, which when executed by a processor, implements the method of cross blockchain transactions in the above embodiments.
According to a fifth aspect of embodiments of the present disclosure, there is provided an electronic device comprising one or more processors, and memory for storing one or more computer program products; one or more computer program products, when executed by the one or more processors, implement the method of cross blockchain transactions in the above embodiments.
According to the method for cross-block-chain transaction provided by the embodiment of the disclosure, when a first block chain receives a cross-block-chain transaction request, a target address and endorsement information of a second block chain pointed by the cross-block-chain transaction request are analyzed from the cross-block-chain transaction request; then, calling a pre-execution contract to access the endorsement service of the second block chain to obtain a pre-execution result of the second block chain; then determining whether cross-block chain transaction is feasible according to the pre-execution result, and acquiring transaction data corresponding to the cross-block chain transaction request when the cross-block chain transaction is determined to be feasible; based on the transaction data, a cross blockchain transaction is performed. And pre-executing a target contract which needs to be called for the cross-block chain transaction by the second block chain before executing the cross-block chain transaction, and signing a contract result to generate a pre-execution result, wherein only when the pre-execution result shows that the cross-block chain transaction is feasible, transaction data is acquired to complete the cross-block chain transaction. Compared with the direct trans-blockchain transaction, the phenomenon that the trans-blockchain transaction is interrupted due to the fact that verification of a certain link fails in the trans-blockchain transaction after a user submits a trans-blockchain transaction request and transaction data at the same time can be avoided, therefore, redundant operation in the trans-blockchain transaction can be reduced, and the reliability of the trans-blockchain transaction is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this disclosure, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure and not to limit the disclosure. In the drawings:
fig. 1 is a schematic block chain system according to an embodiment of the present disclosure;
FIG. 2 is a schematic flow chart diagram illustrating one embodiment of a method of cross blockchain transactions of the present disclosure;
fig. 3 is a signaling diagram of yet another embodiment of a method of cross blockchain transactions of the present disclosure;
FIG. 4 is a schematic block diagram illustrating an embodiment of an apparatus for performing transactions across blockchains according to the present disclosure;
fig. 5 shows a schematic structural diagram of an electronic device of the present disclosure.
Detailed Description
In order to make the technical solutions and advantages of the embodiments of the present disclosure more clearly understood, the following detailed description of the exemplary embodiments of the present disclosure with reference to the accompanying drawings makes it obvious that the described embodiments are only a part of the embodiments of the present disclosure, rather than an exhaustive list of all the embodiments. It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict.
In implementing the present disclosure, the inventor finds that, when a registered user of a blockchain needs to perform a cross-blockchain transaction, a cross-blockchain transaction request and transaction data need to be submitted to a source blockchain to which the user belongs at the same time. And then the source blockchain sends a cross-chain transaction request to a target blockchain (a blockchain where a requested party of the cross-blockchain transaction is located), the target blockchain verifies the cross-blockchain transaction, and for example, the feasibility of the cross-blockchain transaction, the legality of a transaction process calling contract, the idempotency, the stability and the security of the transaction and the like can be included, and the verification result is fed back to the source blockchain. When the verification is passed, the two parties can normally execute the process of the cross-blockchain transaction. However, when the verification fails, the inter-blockchain transaction is terminated, which results in that the user performs redundant operations (e.g., submits complete transaction data) on the premise that it cannot be determined whether the inter-blockchain transaction is feasible, thereby adversely affecting the reliability and efficiency of the inter-blockchain transaction.
The blockchain system of the present disclosure is exemplarily described below with reference to fig. 1, where fig. 1 shows an architecture diagram of an embodiment of the blockchain system as an application scenario of the embodiment of the present disclosure, and as shown in fig. 1, the blockchain system includes: the system comprises a main chain 110 and a slave chain 120 and a slave chain 130 which are subordinate to the main chain 110, wherein the slave chain 120 and the slave chain 130 can be a first blockchain and a second blockchain, and the method for cross-blockchain transaction of the present disclosure is adopted between the two to perform cross-blockchain transaction.
It should be noted that fig. 1 only shows two slave chains by way of example, and does not represent a limitation on the number of slave chains. The blockchain system in this embodiment may include two or more slave chains, any two slave chains may be used as the first blockchain and the second blockchain, and the method of cross-blockchain transaction in the following embodiments is used to perform cross-blockchain transaction.
In one particular example, the master chain 110 provides common services for the entire chain group, e.g., a cross-chain interaction platform and specification may be provided for each slave chain. The main chain 110 may include a supervisory node and a plurality of super nodes, the supervisory node being configured to supervise data and behaviors of the entire chain group and to handle behaviors that do not comply with the consensus mechanism, such as may include shutting down services, restricting permissions, untrusted user tags, and the like. In addition, the supervising node may perform qualification audit and trusted authentication on the nodes having management authority in the chain group (e.g., the supernodes of the main chain 110, the backbone nodes of the slave chain 120 and the slave chain 130). The super node of the main chain 110 may perform functions of main chain consensus, cross-link gateway, qualification audit, chain group management, and the like, and may also obtain external data and provide a trusted data service to the outside after verification. For example, a super node may include a verification engine, within which verification rules for blockchains of different architectures are pre-deployed, an execution engine, and transaction routing.
The slave chains 120 and/or 130 may be, for example, base slave chains, regional slave chains, industrial slave chains, etc., each of which may include a backbone node and a plurality of service nodes, wherein the backbone nodes may include transaction management modules, application chain management modules, cross-chain gateways, application chain adapters, and the service nodes may include cross-chain management contract modules, transaction management modules, cross-chain gateways, slave chain adapters. When a new node needs to be added to the slave chain 120 and/or the slave chain 130, a registration request may be first initiated to a service node of the slave chain 120 and/or the slave chain 130, and then the service node registers with a supervision node of the main chain 110 through a backbone node.
It should be noted that the slave chain 120 and the slave chain 130 may be homogeneous blockchains or heterogeneous blockchains, which is not limited in this embodiment.
The method of cross blockchain transactions of the present disclosure is illustrated below in conjunction with fig. 2. Fig. 2 shows a flowchart of an embodiment of a method of cross blockchain transaction according to the present disclosure, and as shown in fig. 2, the flowchart includes steps 210 to 240, and each step is described in detail below.
Step 210, in response to the first blockchain receiving the cross-blockchain transaction request submitted by the user registered on the first blockchain, parsing a target address and endorsement information of a second blockchain to which the cross-blockchain transaction request points from the cross-blockchain transaction request.
The endorsement information comprises a target contract which needs to be called by the cross-blockchain transaction request.
In this embodiment, the first blockchain represents a requester of the cross-blockchain transaction, and the second blockchain represents a requested party of the cross-blockchain transaction, wherein the target address represents an address of the second blockchain.
As an example, the first zone cross chain and the second blockchain may be two slave chains belonging to the same main chain, such as the slave chain 120 and the slave chain 130 shown in fig. 1. For another example, the first blockchain and the second blockchain may also be two independent blockchains.
In some optional implementations of this embodiment, the endorsement information may further include endorsement node information and an endorsement policy of the second blockchain. The endorsement refers to a process of verifying and declaring whether a transaction is legal by a blockchain, the process is usually completed by an endorsement node, and the endorsement node refers to a node (usually, a part or all of service nodes) in the blockchain which undertakes an endorsement task. The endorsement policy indicates the conditions that must be met to endorse the transaction, and a successful endorsement result can only be obtained if the transaction meets the conditions given in the endorsement policy.
As an example, a user (e.g., an individual or an enterprise) registered on the first blockchain may submit a cross-blockchain transaction request to the first blockchain through a node device of the first blockchain, where the cross-blockchain transaction request may include information of the blockchain (i.e., the second blockchain) where a requested party of the transaction is located, a type of the transaction, and the like. The service node of the first blockchain may verify the cross-blockchain transaction request, e.g., may verify the identity of the user and the authenticity of the node device. After the verification is passed, an addressing contract in the service node can be called, and the target address and the endorsement information can be analyzed from the trans-blockchain transaction request.
And step 220, calling a pre-execution contract to access the endorsement service of the second block chain according to the target address and the endorsement information to obtain a pre-execution result of the second block chain.
The pre-execution result comprises a contract result obtained by pre-executing the target contract by the second block chain and signature information of the endorsement node of the second block chain for the contract result.
In this embodiment, the pre-execution contracts characterize a set of intelligent contracts involved in pre-execution cross blockchain transactions, which may include, for example, contracts that access endorsement services of the second blockchain.
The pre-execution result represents a verification result of the second blockchain on the cross-blockchain transaction, and specifically, when a target contract required to be called in the cross-blockchain transaction can be completely executed, the cross-blockchain transaction is feasible; conversely, when a target contract cannot be fully executed, it represents that a cross blockchain transaction is not feasible.
As an example, a service node of a first blockchain may generate a transaction access request based on endorsement information by invoking a pre-execution contract, and then send the transaction access request to a second blockchain according to a target address. After the second block link receives the transaction access request, the pre-execution operation can be performed on a target contract to be called for the cross-block-chain transaction according to the endorsement information to obtain a contract result of the pre-execution target contract, and then the endorsement node of the second block link signs the contract result according to the endorsement policy to obtain a pre-execution result.
And step 230, determining whether the cross-block chain transaction is feasible based on the pre-execution result, and acquiring transaction data corresponding to the cross-block chain transaction request when the cross-block chain transaction is feasible.
In this embodiment, the service node in the first blockchain may verify the pre-execution result to determine whether the cross-blockchain transaction is feasible, and when the pre-execution result indicates that the cross-blockchain transaction is feasible, the result may be fed back to the user and the user may be requested to submit the transaction data.
As an example, the transaction data may include, for example, user information of both parties to the transaction, price information, transaction amount, identification of the node device, and the like.
Step 240, based on the transaction data, performing a cross blockchain transaction.
In this embodiment, after receiving transaction data submitted by a user, a service node of a first blockchain may assemble a complete cross-blockchain transaction based on a cross-blockchain transaction request and the transaction data, then access a second blockchain according to a target address and endorsement information, invoke a target contract according to a consensus mechanism of the second blockchain, perform data interaction with the second blockchain, and complete the cross-blockchain transaction.
In some optional implementations of this embodiment, when the first blockchain link receives transaction data submitted by a user, the transaction data and the cross-blockchain transaction request may be assembled into a complete cross-blockchain transaction, then the existence of the cross-blockchain transaction is verified through a pre-execution result, and after the verification is passed, operations such as asset transfer of the user are completed, for example, the amount of one party account of the transaction may be deducted, the amount of the award is added to another party account, and the transaction result is fed back to the user after the transaction is completed.
In a specific example of this embodiment, the user a is a registered user of the first blockchain, and the user B is a registered user of the second blockchain. When a user A needs to perform cross-block chain transaction with a user B, the user A can submit a cross-block chain transaction request to a first block chain through node equipment of the first block chain, and after the first block chain receives the cross-block chain transaction request, an addressing contract can be called through a service node in the first block chain, and a target address and endorsement information of a second block chain are analyzed from the cross-block chain transaction request. Then, the first block chain can access the endorsement service of the second block chain according to the target address and the endorsement information by calling the pre-execution contract, pre-execute the target contract by the endorsement service of the second block chain and sign the contract result, and further obtain the pre-execution result of the second block chain. The first blockchain may then validate the pre-execution to determine the feasibility of the cross-blockchain transaction. When the pre-execution result indicates that the cross-blockchain transaction is feasible, the first blockchain presents an instruction for requesting to submit the transaction data to the user A so as to instruct the user A to submit the transaction data to the first blockchain. Then, the first blockchain can assemble complete cross-blockchain transaction according to the cross-blockchain transaction request and the transaction data, and perform cross-blockchain transaction with the second blockchain to complete the transaction between the user A and the user B.
In the method for cross-blockchain transaction provided by this embodiment, when a first blockchain receives a cross-blockchain transaction request, a target address and endorsement information of a second blockchain to which the cross-blockchain transaction request points are analyzed from the cross-blockchain transaction request; then, calling a pre-execution contract to access the endorsement service of the second block chain to obtain a pre-execution result of the second block chain; then, determining feasibility of cross-block chain transaction based on a pre-execution result, and acquiring transaction data corresponding to the cross-block chain transaction request when the cross-block chain transaction is determined to be feasible; based on the transaction data, a cross blockchain transaction is performed. And pre-executing a target contract which needs to be called for the cross-block chain transaction by the second block chain before executing the cross-block chain transaction, and signing a contract result to generate a pre-execution result, wherein only when the pre-execution result shows that the cross-block chain transaction is feasible, transaction data is acquired to complete the cross-block chain transaction. Compared with the direct trans-blockchain transaction, the phenomenon of transaction interruption caused by the failure of verification in a transaction link after a user submits complete transaction data can be avoided, so that the redundant operation in the trans-blockchain transaction can be reduced, and the reliability of the trans-blockchain transaction is improved.
In some optional implementations of this embodiment, after obtaining the pre-execution result in step 220, the first blockchain may store the pre-execution result in a predetermined security area. The secure area may be, for example, a Trusted Execution Environment (TEE) provided in the first blockchain.
In a specific example of this embodiment, user C is a registered user on blockchain 1, and when user C wants to purchase a certain item on blockchain 2, a cross-blockchain transaction request may be submitted to blockchain 1. The block chain 1 determines a block chain 2 where a supplier of the commodity is located through an addressing contract, determines a target contract which needs to be called in cross-block chain transaction according to a cross-chain transaction request, generates endorsement information according to the endorsement information, and then sends the endorsement information to the block chain 2, so that the block chain 2 pre-executes the target contract according to the endorsement information, signs an endorsement on a contract result, and generates a pre-execution result. And the block chain 2 sends the pre-execution result to the block chain 1, and the block chain 1 stores the pre-execution result in the safety area. Then, the blockchain 1 verifies the pre-execution result to determine whether the cross-blockchain is feasible, and when the pre-execution result indicates that the cross-blockchain transaction is feasible, the blockchain 1 notifies the user C that the transaction is feasible to request the user to upload transaction data, such as an order. When the user receives the notification, an order may be submitted to blockchain 1 to purchase the item.
In this embodiment, the first blockchain may store the pre-execution result in the secure area to improve the security of the cross-blockchain transaction.
Referring next to fig. 3, fig. 3 shows a signaling diagram of yet another embodiment of the method of cross blockchain transaction of the present disclosure, and the steps in fig. 3 are described in detail below.
Step 310, in response to the first blockchain receiving the cross-blockchain transaction request submitted by the user registered on the first blockchain, parsing the target address and endorsement information of the second blockchain to which the cross-blockchain transaction request points from the cross-blockchain transaction request.
In this embodiment, the first blockchain and the second blockchain belong to the same main chain. For example, the master chain may be the master chain 110 shown in fig. 1, the first blockchain may be the slave chain 120 or the slave chain 130, and the second blockchain may be the slave chain 130 or the slave chain 120, respectively.
And step 320, calling a pre-execution contract by the first block chain, and sending the target address and the endorsement information to the main chain.
And step 330, after the backbone node of the second block chain monitors the target address, generating a pre-execution result according to the endorsement information, and sending the pre-execution result to the backbone.
And 340, after monitoring the pre-execution result, the backbone node of the first block chain calls the pre-execution contract again, and the pre-execution result is obtained from the main chain.
Step 350, the first block chain stores the pre-execution result in a preset safety area.
And step 360, determining whether the cross-block chain transaction is feasible or not based on the pre-execution result, and acquiring transaction data corresponding to the cross-block chain transaction request when the cross-block chain transaction is determined to be feasible.
Based on the transaction data, a cross blockchain transaction is performed, step 370.
In this embodiment, the first blockchain and the second blockchain belong to the same main chain, and data interaction between the first blockchain and the second blockchain can be realized through the main chain, so that the reliability of data interaction between different blockchains can be improved, and the method is particularly suitable for data interaction between heterogeneous blockchains, and further improves the application range and reliability of the method for cross-blockchain transaction.
In some optional implementations of this embodiment, after step 320, the method may further include: and step 321, verifying the target address and the endorsement information by the super node of the main chain, and submitting the target address and the endorsement information to the main chain when the verification is passed.
In this embodiment, the super node of the main chain may verify the target address and the endorsement information, for example, may verify the authenticity and validity of the second blockchain and the validity of the cross-blockchain transaction, and link the target address and the endorsement information only after the verification is passed, so that the second blockchain performs subsequent operations, and the reliability of the cross-blockchain transaction may be further improved.
In some optional implementations of this embodiment, after step 330, the method may further include: and step 331, verifying the pre-execution result by the super node of the main chain, and submitting the pre-execution result to the main chain when the verification is passed.
In this embodiment, the super node of the main chain may verify the pre-execution result submitted by the second blockchain, for example, the security and the validity of the pre-execution result may be verified to ensure the security of the pre-execution result, so as to improve the security of the cross-blockchain transaction.
In some optional implementations of this embodiment, after step 370, the method may further include:
step 380, the first blockchain sends the transaction result of the cross-blockchain transaction to the main chain.
As an example, the transaction results may include, for example, transaction time, transaction amount, price information, user information of both parties to the transaction, and the like.
Step 390, the main chain updates the transaction status of the cross blockchain transaction based on the transaction result.
As an example, the main chain may update data (for example, an account book in a main chain node) stored in the main chain according to a transaction result, update a transaction state of the cross-blockchain transaction to a transaction success, and may also update log information of the cross-blockchain transaction, which may include, for example, an identity of both parties of the transaction, a transaction amount, time information of each node in the transaction flow, and the like.
In this embodiment, the main chain may update the transaction state of the inter-block chain transaction stored in the main chain according to the transaction result of the inter-block chain transaction, so as to ensure consistency of data in the chain group on the one hand and traceability of the inter-block chain transaction on the other hand.
The apparatus for performing a transaction across a blockchain according to the present disclosure is exemplarily described below with reference to fig. 4, where fig. 4 shows a schematic structural diagram of an embodiment of the apparatus for performing a transaction across a blockchain according to the present disclosure, and as shown in fig. 4, the apparatus for performing a transaction across a blockchain may include: the parsing unit 410 is configured to, in response to the first blockchain receiving a cross-blockchain transaction request submitted by a user registered on the first blockchain, parse, from the cross-blockchain transaction request, a target address and endorsement information of a second blockchain to which the cross-blockchain transaction request points, where the endorsement information includes a target contract that the cross-blockchain transaction request needs to invoke; a pre-execution unit 420 configured to invoke a pre-execution contract to access the endorsement service of the second blockchain according to the target address and the endorsement information to obtain a pre-execution result of the second blockchain, where the pre-execution result includes a contract result obtained by pre-executing the target contract by the second blockchain and signature information of the endorsement node of the second blockchain for the contract result; the verification unit 430 is configured to determine whether cross-domain chain transaction is feasible based on the pre-execution result, and when it is determined that cross-domain chain transaction is feasible, obtain transaction data corresponding to the cross-domain chain transaction request; an execution unit 440 configured to execute a cross blockchain transaction based on the transaction data.
In one embodiment, the apparatus further includes a secure storage unit configured to store the pre-execution result in a preset secure area by the first block chain.
In one embodiment, the first blockchain and the second blockchain belong to the same main chain; the pre-execution unit 420 further includes: a sending module configured to invoke a pre-execution contract to cause the first blockchain to send the target address and the endorsement information to the main chain; the first monitoring module is configured to generate a pre-execution result according to the endorsement information after the backbone node of the second block chain monitors the target address, and send the pre-execution result to the main chain; and the second monitoring module is configured to call the pre-execution contract again after the backbone node of the first block chain monitors the pre-execution result, and obtain the pre-execution result from the main chain.
In one embodiment, the apparatus further comprises an information verification unit configured to: and the super node of the main chain verifies the target address and the endorsement information, and submits the target address and the endorsement information to the main chain when the verification is passed.
In one embodiment, the apparatus further comprises a result verification unit configured to: and the super node of the main chain verifies the pre-execution result, and the pre-execution result is submitted to the main chain when the verification is passed.
In one embodiment, the apparatus further comprises: a sending unit configured to send a transaction result of a cross-blockchain transaction to a main chain by a first blockchain; an update unit configured to update a transaction state of the cross blockchain transaction based on a transaction result.
Next, an electronic apparatus according to an embodiment of the present disclosure is described with reference to fig. 5. FIG. 5 illustrates a block diagram of an electronic device in accordance with an embodiment of the disclosure. As shown in fig. 5, the electronic device 500 includes one or more processors 510 and memory 520.
The processor 510 may be a Central Processing Unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may control other components in the electronic device 500 to perform desired functions. Memory 520 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, Random Access Memory (RAM), cache memory (cache), and/or the like. The non-volatile memory may include, for example, Read Only Memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium and executed by processor 510 to implement the method of cross blockchain transactions in the various embodiments of the present disclosure described above and/or other desired functionality. Various contents such as an input signal, a signal component, a noise component, etc. may also be stored in the computer-readable storage medium.
In one example, the electronic device 500 may further include: an input device 530 and an output device 540, which are interconnected by a bus system and/or other form of connection mechanism (not shown).
For example, when the electronic device 500 is a stand-alone device, the input device 530 may be a communication network connector for receiving the collected input signal. The input device 530 may also include, for example, a keyboard, a mouse, and the like.
The output device 540 may output various information including the determined distance information, direction information, and the like to the outside. The output devices 540 may include, for example, a display, speakers, printer, and the like, as well as a communication network and its connected remote output devices.
Of course, for simplicity, only some of the components of the electronic device 500 relevant to the present application are shown in fig. 5, and components such as buses, input/output interfaces, and the like are omitted. In addition, the electronic device 500 may include any other suitable components depending on the particular application.
In addition to the methods and apparatus described above, embodiments of the present application may also be a computer program product comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in a method of cross blockchain transactions according to various embodiments of the present application described in the "exemplary methods" section of this specification above.
The computer program product may be written with program code for performing the operations of embodiments of the present application in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present application may also be a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, cause the processor to perform the steps in a method of cross blockchain transactions according to various embodiments of the present application described in the "exemplary methods" section above of this specification.
The computer-readable storage medium may take any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may include, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, 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.
The foregoing describes the general principles of the present application in conjunction with specific embodiments, however, it is noted that the advantages, effects, etc. mentioned in the present application are merely examples and are not limiting, and they should not be considered essential to the various embodiments of the present application. Furthermore, the foregoing disclosure of specific details is for the purpose of illustration and description and is not intended to be limiting, since the foregoing disclosure is not intended to be exhaustive or to limit the disclosure to the precise details disclosed.
The block diagrams of devices, apparatuses, systems referred to in this application are only given as illustrative examples and are not intended to require or imply that the connections, arrangements, configurations, etc. must be made in the manner shown in the block diagrams. These devices, apparatuses, devices, systems may be connected, arranged, configured in any manner, as will be appreciated by those skilled in the art. Words such as "including," "comprising," "having," and the like are open-ended words that mean "including, but not limited to," and are used interchangeably therewith. As used herein, the words "or" and "refer to, and are used interchangeably with, the word" and/or, "unless the context clearly dictates otherwise. The word "such as" is used herein to mean, and is used interchangeably with, the phrase "such as but not limited to".
It should also be noted that in the devices, apparatuses, and methods of the present application, the components or steps may be decomposed and/or recombined. These decompositions and/or recombinations are to be considered as equivalents of the present application.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the application. Thus, the present application is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, the description is not intended to limit embodiments of the application to the form disclosed herein. While a number of example aspects and embodiments have been discussed above, those of skill in the art will recognize certain variations, modifications, alterations, additions and sub-combinations thereof.

Claims (10)

1. A method of transacting across blockchains, comprising:
in response to a first blockchain transaction request submitted by a user registered on the first blockchain being received by a first blockchain, analyzing a target address and endorsement information of a second blockchain pointed by the cross-blockchain transaction request from the cross-blockchain transaction request, wherein the endorsement information comprises a target contract required to be called by the cross-blockchain transaction request;
calling a pre-execution contract to access the endorsement service of the second block chain according to the target address and the endorsement information to obtain a pre-execution result of the second block chain, wherein the pre-execution result comprises a contract result obtained by pre-executing the target contract by the second block chain and signature information of an endorsement node of the second block chain for the contract result;
determining whether cross-blockchain transaction is feasible or not based on the pre-execution result, and when the cross-blockchain transaction is determined to be feasible, presenting an instruction for submitting transaction data corresponding to the cross-blockchain transaction request to the user to acquire the transaction data;
performing the cross blockchain transaction based on the transaction data.
2. The method of claim 1, wherein after obtaining the pre-execution result of the second blockchain, the method further comprises:
and the first block chain stores the pre-execution result into a preset safety area.
3. The method of claim 2, wherein the first blockchain and the second blockchain are subordinate to a same backbone;
the invoking of the pre-execution contract to access the endorsement service of the second blockchain according to the target address and the endorsement information to obtain a pre-execution result of the second blockchain comprises:
the first block chain calls the pre-execution contract and sends the target address and the endorsement information to the main chain; after monitoring the target address, the backbone node of the second block chain generates the pre-execution result according to the endorsement information and sends the pre-execution result to the main chain; after the backbone node of the first block chain monitors the pre-execution result, the first block chain calls the pre-execution contract again, and the pre-execution result is obtained from the main chain.
4. The method of claim 3, wherein after the first blockchain invokes the pre-execution contract to send the target address and the endorsement information to the main chain, the method further comprises:
and the super node of the main chain verifies the target address and the endorsement information, and submits the target address and the endorsement information to the main chain when the verification is passed.
5. The method of claim 4, wherein after the backbone node of the second blockchain monitors the target address, the backbone node generates the pre-execution result according to the endorsement information and sends the pre-execution result to the backbone node, the method further comprising:
and the super node of the main chain verifies the pre-execution result, and submits the pre-execution result to the main chain when the verification is passed.
6. The method of any one of claims 3 to 5, wherein after said performing said inter-blockchain transaction, said method further comprises:
the first blockchain sends a transaction result of the cross-blockchain transaction to the main chain;
the main chain updates the transaction state of the cross blockchain transaction based on the transaction result.
7. An apparatus for cross blockchain transactions, comprising:
the analysis unit is configured to respond to a first blockchain transaction request submitted by a user registered on the first blockchain, and analyze a target address and endorsement information of a second blockchain pointed by the cross-blockchain transaction request from the cross-blockchain transaction request, wherein the endorsement information comprises a target contract required to be called by the cross-blockchain transaction request;
a pre-execution unit configured to invoke a pre-execution contract to access an endorsement service of the second block chain according to the target address and the endorsement information to obtain a pre-execution result of the second block chain, where the pre-execution result includes a contract result obtained by pre-executing the target contract by the second block chain and signature information of an endorsement node of the second block chain for the contract result;
the verification unit is configured to determine whether cross-block-chain transaction is feasible or not based on the pre-execution result, and when the cross-block-chain transaction is determined to be feasible, present an instruction for submitting transaction data corresponding to the cross-block-chain transaction request to the user to acquire the transaction data;
an execution unit configured to execute the cross blockchain transaction based on the transaction data.
8. A blockchain system, comprising: the system comprises a main chain and at least two slave chains subordinate to the main chain, wherein any two slave chains in the at least two slave chains are used as a first block chain and a second block chain, and the trans-block chain transaction is carried out by adopting the trans-block chain transaction method according to any one of claims 1 to 6.
9. A computer storage medium having stored thereon a computer program product which, when executed by a processor, implements a method of cross blockchain transactions according to any one of claims 1 to 6.
10. An electronic device comprising one or more processors and memory for storing one or more computer program products; the one or more computer program products, when executed by the one or more processors, implement a method of cross blockchain transactions according to any one of claims 1 to 6.
CN202210500124.0A 2022-05-10 2022-05-10 Method, device, system, medium and electronic equipment for cross-block chain transaction Active CN114612103B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210500124.0A CN114612103B (en) 2022-05-10 2022-05-10 Method, device, system, medium and electronic equipment for cross-block chain transaction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210500124.0A CN114612103B (en) 2022-05-10 2022-05-10 Method, device, system, medium and electronic equipment for cross-block chain transaction

Publications (2)

Publication Number Publication Date
CN114612103A CN114612103A (en) 2022-06-10
CN114612103B true CN114612103B (en) 2022-08-02

Family

ID=81869120

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210500124.0A Active CN114612103B (en) 2022-05-10 2022-05-10 Method, device, system, medium and electronic equipment for cross-block chain transaction

Country Status (1)

Country Link
CN (1) CN114612103B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117807157A (en) * 2022-09-26 2024-04-02 腾讯科技(深圳)有限公司 Transaction execution method, apparatus, program product, device and medium for blockchain
CN115545686B (en) * 2022-11-21 2024-01-02 深圳易同汇电子商务有限公司 Block chain-based decentralization quick feedback cross-chain transaction method
CN115987683B (en) * 2023-03-15 2023-07-28 中国信息通信研究院 Node access control method, device, equipment and medium in block chain network
CN117670330A (en) * 2024-02-01 2024-03-08 中国信息通信研究院 Block chain-based transaction processing method and device, electronic equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109685489A (en) * 2018-12-28 2019-04-26 杭州云象网络技术有限公司 A kind of assets across chain method of commerce between block chain
CN110889761A (en) * 2019-11-08 2020-03-17 深圳付贝科技有限公司 Cross-chain transaction method and storage medium
CN111107136A (en) * 2019-12-05 2020-05-05 上海中信信息发展股份有限公司 Block chain cross-chain relay method based on IPFS
CN111181731A (en) * 2019-12-31 2020-05-19 南京可信区块链与算法经济研究院有限公司 Execution optimization method, system and storage medium of intelligent contract in alliance chain
CN112508563A (en) * 2020-12-01 2021-03-16 浙商银行股份有限公司 Cross-chain transaction credibility verification method and device and computer equipment
CN112529706A (en) * 2020-12-10 2021-03-19 浙商银行股份有限公司 Decentralized heterogeneous public chain asset exchange method
CN113489671A (en) * 2021-05-11 2021-10-08 深圳前海移联科技有限公司 Cross-alliance-link communication method and device, computer equipment and storage medium
CN113807960A (en) * 2021-03-04 2021-12-17 京东科技控股股份有限公司 Cross-link processing method, device and system between heterogeneous chains and electronic equipment
CN114338666A (en) * 2021-12-03 2022-04-12 杭州趣链科技有限公司 Method, device, equipment and medium for verifying Fabric block chain cross-chain transaction

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11257079B2 (en) * 2019-04-30 2022-02-22 Banco Bilbao Vizcaya Argentaria, S.A. Systems, methods, and interfaces for smart contract based exchanges via a blockchain
CN111461723B (en) * 2020-04-17 2020-12-15 支付宝(杭州)信息技术有限公司 Data processing system, method and device based on block chain
CN111585767B (en) * 2020-04-30 2023-04-07 卓尔智联(武汉)研究院有限公司 Data exchange method and device for main chain and side chain
CN112232795B (en) * 2020-05-29 2022-07-08 支付宝(杭州)信息技术有限公司 Transaction processing method, device, equipment and system
US20220094555A1 (en) * 2020-09-18 2022-03-24 Fujitsu Limited Validator control for transaction between blockchains
EP4237957A1 (en) * 2020-10-29 2023-09-06 Au10Tix Ltd. System, method and computer program product for authentication of digital service end-users
CN113537991B (en) * 2021-09-16 2022-03-01 中国信息通信研究院 Cross-chain transaction ordered execution method and cross-chain system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109685489A (en) * 2018-12-28 2019-04-26 杭州云象网络技术有限公司 A kind of assets across chain method of commerce between block chain
CN110889761A (en) * 2019-11-08 2020-03-17 深圳付贝科技有限公司 Cross-chain transaction method and storage medium
CN111107136A (en) * 2019-12-05 2020-05-05 上海中信信息发展股份有限公司 Block chain cross-chain relay method based on IPFS
CN111181731A (en) * 2019-12-31 2020-05-19 南京可信区块链与算法经济研究院有限公司 Execution optimization method, system and storage medium of intelligent contract in alliance chain
CN112508563A (en) * 2020-12-01 2021-03-16 浙商银行股份有限公司 Cross-chain transaction credibility verification method and device and computer equipment
CN112529706A (en) * 2020-12-10 2021-03-19 浙商银行股份有限公司 Decentralized heterogeneous public chain asset exchange method
CN113807960A (en) * 2021-03-04 2021-12-17 京东科技控股股份有限公司 Cross-link processing method, device and system between heterogeneous chains and electronic equipment
CN113489671A (en) * 2021-05-11 2021-10-08 深圳前海移联科技有限公司 Cross-alliance-link communication method and device, computer equipment and storage medium
CN114338666A (en) * 2021-12-03 2022-04-12 杭州趣链科技有限公司 Method, device, equipment and medium for verifying Fabric block chain cross-chain transaction

Also Published As

Publication number Publication date
CN114612103A (en) 2022-06-10

Similar Documents

Publication Publication Date Title
CN114612103B (en) Method, device, system, medium and electronic equipment for cross-block chain transaction
TWI739432B (en) Intelligent risk control decision-making method and system, business processing method and system
CN109981679B (en) Method and apparatus for performing transactions in a blockchain network
CN110838065A (en) Transaction data processing method and device
CN108305170A (en) External service access method, system, equipment and storage medium based on block chain
CN107633016B (en) Data processing method and device and electronic equipment
CN111414413A (en) Block chain endorsement verification
WO2020055413A1 (en) Blockchain for audit
WO2021057005A1 (en) Method and device for publishing smart contract
CN112087502A (en) Method, device and equipment for processing request and storage medium
CN111782456B (en) Anomaly detection method, device, computer equipment and storage medium
CN112446786A (en) Abnormal transaction processing method and device, electronic equipment and readable storage medium
US9075996B2 (en) Evaluating a security stack in response to a request to access a service
CN110572457A (en) Resource application method and device based on block chain, electronic equipment and storage medium
CN112132576B (en) Payment information processing method based on block chain communication and block chain information platform
CN114782045B (en) Cross-chain non-transactional writing method and device, storage medium and electronic equipment
CN111899018A (en) Order data processing method, device, server and storage medium
US20210165907A1 (en) Systems and methods for intelligent and quick masking
CN111274612B (en) Practitioner trust verification method and system, witness service system and storage medium
CN107277108B (en) Method, device and system for processing messages at nodes of block chain
WO2022241945A1 (en) Data processing method and device, and computer-readable storage medium
CN113360547A (en) Cross-chain query method and device, electronic equipment and readable storage medium
CN113592645A (en) Data verification method and device
CN115037653A (en) Service flow monitoring method and device, electronic equipment and storage medium
CN111273970B (en) Calling method, device, system, medium and electronic equipment of intelligent contract

Legal Events

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