Cross-chain transaction processing method and device, equipment and storage medium
By recording abnormal states of cross-chain transactions in the relay chain and reconfirming them within a preset time period, the problem of inaccurate cross-chain transaction states is solved, achieving accuracy and consistency of transaction states.
Patent Information
- Application Number
- CN202310517592.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-08
- Publication Date
- 2024-11-08
AI Technical Summary
When a cross-chain transaction experiences a brief anomaly in the target business chain, the relay chain cannot update the transaction status in a timely manner, resulting in inaccurate transaction results.
The abnormal status of cross-chain transactions is recorded in the relay chain and reconfirmed within a preset time period. When the transaction is successful, the status information is updated and the transaction is removed from the transaction pool.
Ensure the accuracy of transaction status stored in the relay chain to avoid transaction status chaos caused by temporary anomalies in the target business chain.
Smart Images

Figure CN118917939A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and in particular to a cross-chain transaction processing method, device, equipment and storage medium. Background Art
[0002] Blockchain technology is an underlying core technology that integrates multiple technologies such as cryptography and database. It is essentially a decentralized distributed ledger. The characteristics of blockchain such as openness, transparency, tamper-proofness, and collective maintainability make it highly credible and secure. However, there are different public chains, business chains, and private chains in blockchain. The isolated existence of chains hinders the collaborative interaction between different blockchains. Therefore, in order to achieve information sharing and value exchange between chains, the existing technology proposes cross-chain technology based on relay chains, which allows the two parties to trade on different chains, thereby enhancing the function and use value of the blockchain network.
[0003] However, due to the decentralized deployment of the cross-chain system itself, the results of cross-chain transactions are closely related to the consensus status of the business chain and the network topology of the cross-chain system. When the target business chain fails to process the cross-chain transaction in time, such as a short-term abnormality in the target business chain that fails to reach a consensus and package the cross-chain transaction in time, the cross-chain transaction will be directly marked as a failure by the relay chain. However, when the target business chain returns to normal, the cross-chain transaction will still be processed normally, and the relay chain will not mark the cross-chain transaction as a success due to the recovery of the target business chain, which will result in the processing result viewed through the relay chain being a failure. Summary of the invention
[0004] The embodiments of the present application provide a cross-chain transaction processing method, apparatus, device, and storage medium, which can improve the accuracy of the transaction status of the cross-chain transaction saved by the relay chain and have high applicability.
[0005] On the one hand, an embodiment of the present application provides a cross-chain transaction processing method, the method comprising:
[0006] In response to the first business chain executing an exception for the first submitted cross-chain transaction at the first moment, storing a transaction record of the cross-chain transaction in the relay chain, and adding the cross-chain transaction to the transaction pool of the relay chain;
[0007] The transaction pool is used to record abnormal transactions, and the transaction record includes first status information, and the first status information is used to indicate that the cross-chain transaction is executed abnormally;
[0008] In response to the first cross-chain gateway of the first business chain confirming that the cross-chain transaction is successfully executed after the first moment, changing the first state information to the second state information, and removing the cross-chain transaction from the transaction pool;
[0009] Among them, the above-mentioned second status information is used to indicate that the above-mentioned cross-chain transaction is successfully executed, and the above-mentioned first cross-chain gateway confirms whether the above-mentioned cross-chain transaction is successfully executed based on the transaction confirmation request received within a preset time period after the above-mentioned first moment.
[0010] On the other hand, an embodiment of the present application provides a cross-chain transaction processing device, the device comprising:
[0011] A transaction processing module, configured to, in response to an exception in the first business chain executing the first submitted cross-chain transaction at the first moment, store the transaction record of the cross-chain transaction to the relay chain, and add the cross-chain transaction to the transaction pool of the relay chain;
[0012] The transaction pool is used to record abnormal transactions, and the transaction record includes first status information, and the first status information is used to indicate that the cross-chain transaction is executed abnormally;
[0013] An information processing module, configured to, in response to the first cross-chain gateway of the first business chain confirming that the cross-chain transaction is successfully executed after the first moment, change the first state information to the second state information, and remove the cross-chain transaction from the transaction pool;
[0014] Among them, the above-mentioned second status information is used to indicate that the above-mentioned cross-chain transaction is successfully executed, and the above-mentioned first cross-chain gateway confirms whether the above-mentioned cross-chain transaction is successfully executed based on the transaction confirmation request received within a preset time period after the above-mentioned first moment.
[0015] Optionally, the transaction confirmation request is submitted by the transaction pool to the first cross-chain gateway, or the transaction confirmation request is submitted by the transaction submitter of the cross-chain transaction to the first cross-chain gateway through the transaction confirmation interface of the first cross-chain gateway.
[0016] Optionally, the transaction processing module is further used to:
[0017] In response to the first cross-chain gateway not confirming that the cross-chain transaction is successfully executed within the preset time period, determining that the cross-chain transaction fails to execute and removing the cross-chain transaction from the transaction pool;
[0018] Optionally, the transaction processing module is further used to:
[0019] In response to the first cross-chain gateway confirming whether the cross-chain transaction is successfully executed more than a preset number of times within the preset time period, it is determined that the cross-chain transaction fails to execute and the cross-chain transaction is removed from the transaction pool.
[0020] Optionally, the transaction processing module is further used to:
[0021] A first number is added to the transaction record, where the first number is used to indicate the total number of times the first cross-chain gateway confirms whether the cross-chain transaction is successfully executed within the preset time period when the cross-chain transaction is removed from the transaction pool.
[0022] Optionally, the transaction processing module is further used to:
[0023] Receiving the cross-chain transaction submitted by the second business chain through the second cross-chain gateway of the second business chain, where the cross-chain transaction is submitted by the transaction submitter to the second business chain;
[0024] Submit the cross-chain transaction to the first business chain through the first cross-chain gateway, so that the first business chain processes the cross-chain transaction.
[0025] Optionally, the transaction processing module is further used to:
[0026] Determine the unit resource amount of the first cross-chain gateway to confirm whether the cross-chain transaction is successfully executed each time within the preset time period;
[0027] Before the first cross-chain gateway confirms whether the cross-chain transaction is successfully executed each time, the resource of the unit resource amount is obtained from the transaction submitter of the cross-chain transaction.
[0028] On the other hand, an embodiment of the present application provides an electronic device, including a processor and a memory, wherein the processor and the memory are connected to each other;
[0029] The memory is used to store computer programs;
[0030] The above-mentioned processor is configured to execute the cross-chain transaction processing method provided in an embodiment of the present application when calling the above-mentioned computer program.
[0031] On the other hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the cross-chain transaction processing method provided by an embodiment of the present application.
[0032] On the other hand, an embodiment of the present application provides a computer program product, which includes a computer program. When the above computer program is executed by a processor, it implements the cross-chain transaction processing method provided by the embodiment of the present application.
[0033] In an embodiment of the present application, when the first business chain executes an abnormality for the first submitted cross-chain transaction, the first status information may be added to the transaction record of the relay chain to indicate that the cross-chain transaction execution is abnormal, and the cross-chain transaction is added to the transaction pool of the relay chain at the same time, so that the cross-chain transaction can be determined as an abnormal transaction based on the transaction pool. When the cross-chain transaction is successfully executed, the second status information may be added to the transaction record stored in the relay chain to indicate that the cross-chain transaction is successfully executed, and the cross-chain transaction is removed from the transaction pool to indicate that the cross-chain transaction has been released from the abnormal state. Based on the above implementation method, when the first business chain executes an abnormality for the first submitted cross-chain transaction, the execution status of the cross-chain transaction may be reconfirmed thereafter, thereby ensuring that the status information stored in the relay chain can always accurately indicate the processing status of the cross-chain transaction and maintain the accuracy of the transaction record. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0035] Figure 1 It is a schematic diagram of cross-chain interaction provided in an embodiment of the present application;
[0036] Figure 2 It is a schematic diagram of the structure of the distributed system provided in the embodiment of the present application;
[0037] Figure 3 is a schematic diagram of a block structure provided in an embodiment of the present application;
[0038] Figure 4 It is a flowchart of the cross-chain transaction processing method provided in the embodiment of the present application;
[0039] Figure 5 This is an interactive schematic diagram of a cross-chain transaction provided by an embodiment of the present application;
[0040] Figure 6 This is another interactive schematic diagram of a cross-chain transaction provided by an embodiment of the present application;
[0041] Figure 7 This is an interactive schematic diagram of transaction confirmation provided by an embodiment of the present application;
[0042] Figure 8 is another interactive schematic diagram of transaction confirmation provided by an embodiment of the present application;
[0043] Fig. 9 It is a structural diagram of a cross-chain transaction processing device provided in an embodiment of the present application;
[0044] Fig.10 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0046] The cross-chain transaction processing method provided in the embodiment of the present application can be applied to the relay gateway of the relay chain, and is used to store and modify the transaction records of cross-chain transactions.
[0047] See also Figure 1 , Figure 1 is a schematic diagram of cross-chain interaction provided by the embodiment of this application. Figure 1 As shown, the relay gateway of the relay chain can exchange information between blockchains through the cross-chain gateway of the first business chain. For the convenience of description, the cross-chain gateway of the first business chain is referred to as the first cross-chain gateway below.
[0048] Among them, the relay gateway of the relay chain can submit the cross-chain transaction to the first cross-chain gateway, and the first cross-chain gateway submits the cross-chain transaction to the first business chain, so that the first cross-chain gateway processes the cross-chain transaction.
[0049] When the first business chain performs an abnormality on the first submitted cross-chain transaction at the first moment, the relay gateway may store the transaction record of the cross-chain transaction in the relay chain and add the cross-chain transaction to the transaction pool of the relay chain to record the abnormal transaction. The transaction record of the cross-chain transaction includes the first status information, and the first status information is used to indicate that the cross-chain transaction is abnormally executed.
[0050] After that, the first cross-chain gateway will receive a transaction confirmation request for the cross-chain transaction within a preset time period at the first moment, requesting confirmation whether the cross-chain transaction is successfully re-executed by the first business chain after the first moment. After the first cross-chain gateway confirms that the cross-chain transaction is successfully executed according to any transaction confirmation request, the relay gateway may change the first status information stored in the relay chain to the second status information, and the second status information is used to indicate that the cross-chain transaction is successfully executed. At the same time, the relay gateway may remove the cross-chain transaction from the transaction pool to indicate that the cross-chain transaction is no longer in an abnormal state.
[0051] Based on this, when the relay gateway queries the transaction execution status of the cross-chain transaction from the relay chain, it can be queried that the cross-chain transaction has been executed successfully.
[0052] Among them, the business chain and relay chain in the embodiment of the present application are blockchains of new application modes that use computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods, each of which contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, the platform product service layer, and the application service layer.
[0053] For blockchains such as business chains and relay chains, the underlying blockchain platform can include processing modules such as information management, basic services, smart contracts, and operation management. Among them, the information management module is responsible for the identity information management of all blockchain participants, including maintaining public and private key generation (account management), key management, and the maintenance of the correspondence between real identities and blockchain addresses (authority management), etc., and verifies the transaction status of certain real identities under authorization, and provides risk control rule configuration (risk control audit); the basic service module is deployed on all blockchain node devices to verify the validity of business requests, and records valid requests to storage after consensus is reached. For a new business request, the basic service first performs interface adaptation analysis and authentication processing (interface adaptation), and then encrypts the business information through the consensus algorithm (consensus management). The smart contract module is responsible for the registration and issuance of contracts, as well as contract triggering and contract execution. Developers can define the contract logic in a programming language and publish it to the blockchain (contract registration). According to the logic of the contract terms, the key or other events are called to trigger the execution and complete the contract logic. It also provides the function of contract upgrade and cancellation. The operation management module is mainly responsible for the deployment, configuration modification, contract setting, cloud adaptation and real-time status visualization output of the product during the product release process, such as alarms, checking the health status of node equipment, etc.
[0054] like Figure 2 As shown, Figure 2 It is a schematic diagram of the structure of the distributed system provided by the embodiment of the present application. The service chain and the relay chain are distributed systems formed by connecting multiple nodes through network communication. The node can be any form of terminal device or server in the access network. The nodes form a peer-to-peer (P2P) network, and the P2P protocol is an application layer protocol running on the Transmission Control Protocol (TCP) protocol. In a distributed system, any machine such as a server or a terminal can join and become a node, and the node includes a hardware layer, an intermediate layer, an operating system layer, and an application layer.
[0055] Among them, the server can be an Internet of Vehicles server or other independent physical server, or it can be a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), as well as big data and artificial intelligence platforms, such as Internet of Vehicles edge cloud platforms, cloud computing platforms, etc.
[0056] Among them, the terminal device can be a smart phone, a tablet computer, a laptop computer, a desktop computer, an intelligent voice interaction device (such as a smart speaker), a wearable electronic device (such as a smart watch), a vehicle terminal, a smart home appliance (such as a smart TV), an AR / VR device, etc., but is not limited to these.
[0057] See also Figure 2 The functions of each node in the blockchain system shown include:
[0058] 1) Routing: a basic function of a node, used to support communication between nodes.
[0059] 2) Applications are used to be deployed in the blockchain to implement specific businesses according to actual business needs, record data related to the implementation of functions to form record data, carry digital signatures in the record data to indicate the source of the task data, and send the record data to other nodes in the distributed system for other nodes to add the record data to the temporary block when they successfully verify the source and integrity of the record data.
[0060] The services implemented by the application include: wallet, shared ledger, smart contract, blockchain and other functions.
[0061] See also Figure 3 , Figure 3 This is a schematic diagram of the block structure provided by the embodiment of the present application. Each block includes the hash value of the transaction record stored in this block (the hash value of this block) and the hash value of the previous block. Each block is connected by the hash value to form a blockchain. In addition, the block can also include information such as the timestamp when the block was generated. Figure 3 The blocks shown can be used to store transaction records in embodiments of the present application.
[0062] See also Figure 4 , Figure 4 Schematic diagram of the process of cross-chain transaction processing provided by the embodiment of the present application. Figure 4 As shown, the cross-chain transaction processing method provided in the embodiment of the present application can be applied to the relay gateway of the relay chain, and may specifically include the following steps:
[0063] Step S41: In response to the first business chain executing an exception for the first submitted cross-chain transaction at the first moment, storing the transaction record of the cross-chain transaction to the relay chain, and adding the cross-chain transaction to the transaction pool of the relay chain.
[0064] In some feasible implementations, for the relay gateway, the relay gateway may receive a cross-chain transaction submitted by the second business chain through the cross-chain gateway of the second business chain. For the convenience of description, the cross-chain gateway of the second business chain is referred to as the second cross-chain gateway below.
[0065] Among them, the cross-chain transaction is specifically submitted by the transaction submitter of the cross-chain transaction to the second cross-chain transaction.
[0066] Furthermore, the relay gateway can submit the cross-chain transaction to the first business chain through the first cross-chain gateway, so that the first business chain processes the cross-chain transaction.
[0067] Among them, the relay chain, also known as the repeater, is a third-party chain other than the first business chain and the second business chain. It connects other chains in the blockchain network through a cross-chain messaging protocol.
[0068] The relay gateway establishes a link with the relay chain, interacts with the cross-chain management contract of the relay chain, schedules each stage of the cross-chain transaction, and provides transaction verification function.
[0069] Business chain: refers to the chain used by each transaction party. This chain needs to receive cross-chain requests from other business chains or initiate cross-chain requests to other business chains.
[0070] Cross-chain gateway: A gateway that interacts with the business chain. It detects the contract events of the business chain to determine whether the event is a cross-chain transaction. If the trigger conditions are met, a cross-chain transaction is initiated.
[0071] Combine the following Figure 5 Further explain the process of cross-chain transactions. Figure 5 Schematic diagram of an interaction of cross-chain transactions provided by the embodiment of the present application. Figure 5 As shown, the transaction submitter submits the cross-chain transaction to the second business chain through a transaction request, the second business chain submits the cross-chain transaction to the relay gateway through the second cross-chain gateway, and finally the relay gateway submits it to the first cross-chain gateway of the first business chain, so that the first business chain can obtain the cross-chain transaction from the first cross-chain gateway and process the cross-chain transaction.
[0072] The second cross-chain gateway can feedback the processing results to the relay gateway based on the processing status of the cross-chain transaction by the first business chain, such as successful processing or failed processing, so that the relay gateway can store the transaction records including the processing results feedback by the second cross-chain gateway to the relay chain to facilitate processing queries for cross-chain transactions.
[0073] In some feasible implementations, the first business chain executes an exception for the first submitted cross-chain transaction at the first moment. This may be due to network interruption, abnormal device operation, etc., which leads to delayed processing of the cross-chain transaction by the first business chain. It may also be due to long-term verification of the cross-chain transaction by the first business chain, which leads to delayed processing of the cross-chain transaction, etc. The specific details can be determined based on the actual application scenario requirements and are not limited here.
[0074] For the first cross-chain gateway, after the first cross-chain gateway submits the cross-chain transaction to the first business chain, if the processing status of the first business chain for the cross-chain transaction (such as successful execution or failed execution) is not obtained within a period of time, or the first business chain processing times out, a feedback result indicating an abnormal cross-chain transaction execution is returned to the relay gateway.
[0075] Based on this, for the relay gateway, the relay gateway can determine that the first business chain executed an exception for the first submitted cross-chain transaction at the first moment according to the feedback result returned by the first cross-chain gateway.
[0076] When the first business chain executes an exception for the first submitted cross-chain transaction at the first moment, the relay gateway can generate a transaction record of the cross-chain transaction and store the transaction record in the relay chain.
[0077] Among them, the transaction records of cross-chain transactions include the transaction submitter, transaction content, transaction conditions, transaction amount, transaction time, etc., which can be determined based on the actual application scenario requirements and are not restricted here.
[0078] In which, when the first business chain executes an exception for the first submitted cross-chain transaction at the first moment, the transaction record of the cross-chain transaction also includes first status information, and the first status information is used to indicate that the first business chain executes an exception for the cross-chain transaction.
[0079] At this time, if the relay chain or the transaction submitter queries the processing status of the cross-chain transaction through the relay chain, it can be determined that the cross-chain transaction is executed abnormally.
[0080] As an example, see Figure 6 , Figure 6 This is another interactive schematic diagram of the cross-chain transaction provided by the embodiment of the present application. Figure 6 As shown, the transaction submitter submits the cross-chain transaction to the second business chain through a transaction request, the second business chain submits the cross-chain transaction to the relay gateway through the second cross-chain gateway, and finally the relay gateway submits it to the first cross-chain gateway of the first business chain, so that the first business chain can obtain the cross-chain transaction from the first cross-chain gateway and process the cross-chain transaction.
[0081] When the first business chain times out on cross-chain transaction processing, the first cross-chain gateway may feedback to the relay gateway a processing result indicating that the transaction execution is abnormal, so that the relay gateway can determine that the first business chain executed the cross-chain transaction abnormally for the first time at the first moment, and store the transaction record of the cross-chain transaction to the relay chain, and the transaction record includes the first status information indicating that the cross-chain transaction execution is abnormal.
[0082] Optionally, when the first business chain performs an abnormality on the first submitted cross-chain transaction at the first moment, the relay gateway may also add the cross-chain transaction to the transaction pool of the relay chain to record the abnormal transaction through the transaction pool. That is, if there is a cross-chain transaction in the transaction pool of the relay chain, the cross-chain transaction is a transaction in which the first business chain performs an abnormality.
[0083] Among them, when there are multiple abnormal transactions in the transaction pool, the abnormal transactions can be classified and stored according to the failure type, the business chain that processes the transaction, the transaction type, the transaction submitter and other conditions, so as to facilitate the management of abnormal transactions and the query of abnormal transactions, etc. The specific requirements can be determined based on the actual application scenario and are not restricted here.
[0084] When the first business chain executes an abnormality for the first submitted cross-chain transaction at the first moment, the cross-chain transaction is stored through the transaction pool of the relay chain, so that the relay gateway or the transaction submitter can determine the cross-chain transaction with the abnormal execution through the transaction pool.
[0085] Step S42: In response to the first cross-chain gateway of the first business chain confirming that the cross-chain transaction is successfully executed after the first moment, the first state information is changed to the second state information, and the cross-chain transaction is removed from the transaction pool.
[0086] In some feasible implementations, when a cross-chain transaction is executed abnormally, the first cross-chain gateway of the first business chain may confirm after the first moment whether the cross-chain transaction is successfully executed again by the first business chain after the first moment. Specifically, the first cross-chain gateway confirms whether the cross-chain transaction is successfully executed based on a transaction confirmation request received within a preset time period after the first moment.
[0087] That is to say, for the first cross-chain gateway, if the first business chain executes an exception for the first submitted cross-chain transaction at the first moment, the first cross-chain gateway may receive a transaction confirmation request for the cross-chain transaction thereafter, and then confirm whether the first business chain has successfully executed the cross-chain transaction after the first moment based on the transaction confirmation request.
[0088] Among them, the first business chain may delay the processing of cross-chain transactions at the first moment due to network interruption, abnormal equipment operation, etc., or the first business chain may delay the processing of cross-chain transactions due to long-term verification of cross-chain transactions, which ultimately leads to abnormal execution of cross-chain transactions. Therefore, after the first moment, the first business chain may further successfully execute the first submitted cross-chain transaction due to factors such as network recovery, normal equipment operation, and completion of cross-chain transaction verification.
[0089] Therefore, for the first cross-chain gateway, the first cross-chain gateway can receive a transaction confirmation request for the cross-chain transaction within a preset time period after the first moment, thereby determining whether the first business chain successfully executes the cross-chain transaction after the first moment.
[0090] Among them, each transaction confirmation request for a cross-chain transaction can be actively submitted by the relay chain's transaction pool to the first cross-chain gateway, or submitted by the relay gateway to the first cross-chain gateway based on the cross-chain transaction in the transaction pool, or submitted by the transaction submitter of the cross-chain transaction to the first cross-chain gateway through the transaction confirmation interface of the first cross-chain gateway. The specific requirements can be determined based on the actual application scenario requirements and are not limited here.
[0091] Among them, the transaction confirmation interface of the first cross-chain gateway is a network interface newly added by the first cross-chain gateway, which is used by the transaction submitter to confirm the transaction execution result of the cross-chain transaction.
[0092] For example, the transaction confirmation request for a cross-chain transaction can also be submitted by the transaction submitter to the second business chain, and then submitted by the second business chain to the relay gateway through the second cross-chain gateway, and then submitted by the relay gateway to the first cross-chain gateway.
[0093] For another example, the transaction confirmation request for a cross-chain transaction can also be submitted by the transaction submitter to the relay gateway through the transaction confirmation interface of the relay gateway, and then the relay gateway submits the transaction confirmation request to the first cross-chain gateway of the first business chain.
[0094] Among them, when each transaction confirmation request for a cross-chain transaction is actively submitted to the first cross-chain gateway by the relay gateway or the transaction pool of the relay chain, the relay gateway or the relay chain submits a transaction confirmation request to the first cross-chain gateway once at each preset time interval within a preset time period to determine whether the cross-chain transaction is successfully executed as soon as possible, thereby improving the timely confirmation of the processing status of the cross-chain transaction.
[0095] Optionally, after the first gateway confirms that the cross-chain transaction is successfully executed according to any transaction confirmation request, it no longer responds to any transaction confirmation request for the cross-chain transaction.
[0096] In some feasible implementations, when the first cross-chain gateway of the first business chain confirms that the cross-chain transaction is successfully executed based on any transaction confirmation request, the first cross-chain gateway will return a feedback result to the relay gateway indicating that the cross-chain transaction is successfully executed, and then the relay gateway determines that the first business chain has successfully executed the cross-chain transaction at the first moment based on the feedback result.
[0097] When the first cross-chain gateway confirms that the cross-chain transaction is successfully executed based on any transaction confirmation request, the relay gateway may change the first status information stored in the transaction record of the relay chain to second status information, and the second status information is used to indicate that the cross-chain transaction is successfully executed.
[0098] Alternatively, when the first cross-chain gateway confirms that the cross-chain transaction is successfully executed according to any transaction confirmation request, the relay gateway may store the second status information in the relay chain for the transaction record stored in the relay chain to indicate that the cross-chain transaction is successfully executed. At this time, the first status information stored in the transaction record of the relay chain is invalid information.
[0099] Based on this, when the relay gateway or the transaction submitter queries the transaction status through the relay chain, it can be determined that the cross-chain transaction has been successfully executed.
[0100] In some feasible implementations, if the relay gateway stores the cross-chain transaction in the transaction pool of the relay chain when the first business chain executes an abnormality for the first submitted cross-chain transaction, the abnormal transaction is recorded through the transaction pool. In this case, when the first cross-chain gateway determines that the cross-chain transaction is successfully executed according to any transaction confirmation request, the relay gateway can remove the cross-chain transaction from the transaction pool to indicate that the cross-chain transaction is successfully executed by the first business chain.
[0101] Optionally, when the first cross-chain gateway fails to confirm the successful execution of the cross-chain transaction according to any transaction confirmation request within a preset time period, it means that the first business chain has timed out for the cross-chain transaction processing and cannot successfully execute the cross-chain transaction in the short term, so there is no need to record the cross-chain transaction as an abnormal transaction. In this case, the relay gateway can confirm that the cross-chain transaction execution has failed and remove the cross-chain transaction from the transaction pool.
[0102] Optionally, when the first cross-chain gateway confirms whether the cross-chain transaction is successfully executed more than a preset number of times according to the transaction confirmation request, it means that the first business chain has timed out for the cross-chain transaction processing and cannot successfully execute the cross-chain transaction in the short term, so there is no need to record the cross-chain transaction as an abnormal transaction. In this case, the relay gateway can confirm that the cross-chain transaction execution has failed and remove the cross-chain transaction from the transaction pool.
[0103] It should be noted that the embodiments of the present application may adopt any one or more of the above-mentioned methods of removing cross-chain transactions from the transaction pool, which can be determined based on the actual application scenario requirements and are not limited here.
[0104] In some feasible implementations, when the first business chain executes an abnormality for the first submitted cross-chain transaction, the relay gateway may determine the number of times the first cross-chain gateway confirms whether the cross-chain transaction is successfully executed according to the transaction confirmation request, and when it is finally determined that the cross-chain transaction is successfully executed or the processing status of the cross-chain transaction is no longer updated (such as moving the cross-chain transaction out of the transaction pool), the first number is added to the transaction record in the relay chain. The first number is the total number of times the first cross-chain gateway confirms whether the cross-chain transaction is successfully executed according to the transaction confirmation request.
[0105] As an example, if the relay gateway stores the cross-chain transaction in the transaction pool of the relay chain when the first business chain executes an abnormality for the first submitted cross-chain transaction, so as to record the abnormal transaction through the transaction pool. In this case, when the first cross-chain gateway determines that the cross-chain transaction is successfully executed according to any transaction confirmation request, the relay gateway can remove the cross-chain transaction from the transaction pool and add the number of times the first cross-chain gateway confirms whether the cross-chain transaction is successfully executed according to the transaction request to the transaction record stored in the relay chain.
[0106] Optionally, when the first cross-chain gateway fails to confirm the successful execution of the cross-chain transaction according to any transaction confirmation request within a preset time period, it means that the first business chain has timed out for the cross-chain transaction processing and cannot successfully execute the cross-chain transaction in the short term, so there is no need to record the cross-chain transaction as an abnormal transaction. In this case, the relay gateway can confirm that the cross-chain transaction execution has failed, and while removing the cross-chain transaction from the transaction pool, the number of times the first cross-chain gateway confirms whether the cross-chain transaction is successfully executed according to the transaction request is added to the transaction record stored in the relay chain.
[0107] Optionally, when the number of times the first cross-chain gateway confirms whether the cross-chain transaction is successfully executed according to the transaction confirmation request exceeds a preset number, it means that the first business chain has timed out for the cross-chain transaction processing and cannot successfully execute the cross-chain transaction in the short term, so there is no need to record the cross-chain transaction as an abnormal transaction. In this case, the relay gateway can confirm that the cross-chain transaction has failed to execute, and while removing the cross-chain transaction from the transaction pool, add the number of times the first cross-chain gateway confirms whether the cross-chain transaction is successfully executed according to the transaction request to the transaction record stored in the relay chain.
[0108] As an example, see Figure 7 , Figure 7 1 is an interactive diagram of transaction confirmation provided by the embodiment of the present application. Figure 7As shown, if the relay gateway stores the cross-chain transaction in the transaction pool of the relay chain when the first business chain performs an abnormality for the first submitted cross-chain transaction, the abnormal transaction can be recorded through the transaction pool. In the case that the first business chain performs an abnormality for the first submitted cross-chain transaction, the relay gateway can store the cross-chain transaction in the transaction pool of the relay chain.
[0109] Furthermore, the transaction pool of the relay chain can periodically initiate a transaction confirmation request to the first cross-chain gateway of the first business chain within a preset time period. The first cross-chain gateway can send the transaction confirmation request to the first business chain to obtain the processing status returned by the first business chain, and return the corresponding feedback result to the relay gateway according to the processing status returned by the first business chain.
[0110] See also Figure 8 , Figure 8 FIG. 1 is another interactive diagram of transaction confirmation provided by an embodiment of the present application. Figure 8 As shown, if the relay gateway stores the cross-chain transaction in the transaction pool of the relay chain when the first business chain performs an abnormality for the first submitted cross-chain transaction, the abnormal transaction can be recorded through the transaction pool. In the case that the first business chain performs an abnormality for the first submitted cross-chain transaction, the relay gateway can store the cross-chain transaction in the transaction pool of the relay chain.
[0111] Furthermore, the transaction submitter of the cross-chain transaction can periodically initiate a transaction confirmation request to the first cross-chain gateway of the first business chain through the relevant interface of the first cross-chain gateway within a preset time period. The first cross-chain gateway can send the transaction confirmation request to the first business chain to obtain the processing status returned by the first business chain, and return the corresponding feedback result to the relay gateway according to the processing status returned by the first business chain.
[0112] exist Figure 7 and Figure 8 For the relay gateway, the relay gateway can perform corresponding processing according to the feedback result returned by the first cross-chain gateway.
[0113] For example, when the relay gateway determines that the cross-chain transaction is successfully executed based on the feedback results, the cross-chain transaction can be removed from the transaction pool, and the number of times the first cross-chain gateway confirms whether the cross-chain transaction is successfully executed based on the transaction request is added to the transaction record stored in the relay chain.
[0114] For example, if the relay gateway determines that the cross-chain transaction has not been successfully executed based on the feedback results, the cross-chain transaction will continue to be retained in the transaction pool, and if the first cross-chain gateway does not confirm the successful execution of the cross-chain transaction according to any transaction confirmation request within a preset time period, the cross-chain transaction will be removed from the transaction pool, and the number of times the first cross-chain gateway confirms whether the cross-chain transaction is successfully executed according to the transaction request will be added to the transaction record stored in the relay chain.
[0115] For example, when the number of times the first cross-chain gateway confirms whether the cross-chain transaction is successfully executed according to the transaction confirmation request exceeds a preset number, the relay gateway may confirm that the cross-chain transaction has failed to execute, and while removing the cross-chain transaction from the transaction pool, add the number of times the first cross-chain gateway confirms whether the cross-chain transaction is successfully executed according to the transaction request to the transaction record stored in the relay chain.
[0116] In some feasible implementations, the relay gateway may determine the total number of times (i.e., the first number) that the first cross-chain gateway confirms whether the cross-chain transaction is successfully executed according to the transaction confirmation request, and determine the unit resource amount corresponding to each time the first cross-chain gateway confirms whether the cross-chain transaction is successfully executed according to the transaction confirmation request.
[0117] Furthermore, the relay gateway can determine the target resource quantity corresponding to the first number of the first cross-chain gateway confirming whether the cross-chain transaction request is successfully executed based on the first number and the unit resource quantity, and then obtain the target resource quantity from the transaction submitter of the cross-chain transaction when determining that the cross-chain transaction is successfully executed or the cross-chain transaction is removed from the transaction pool.
[0118] That is to say, when the first business chain executes an exception for the first submitted cross-chain transaction, the cross-chain transaction is stored in the transaction pool of the relay chain. After recording the abnormal transaction through the transaction pool, the relay gateway can provide cross-chain transaction confirmation services for the transaction submitter. At the same time, the transaction submitter of the cross-chain transaction needs to pay a certain amount of resources.
[0119] Optionally, the relay gateway may determine the unit resource quantity corresponding to each time the first cross-chain gateway confirms whether the cross-chain transaction is successfully executed according to the transaction confirmation request, and then obtain the unit resource quantity of resources from the transaction submitter of the cross-chain transaction before the first cross-chain gateway confirms whether the cross-chain transaction is successfully executed according to the transaction confirmation request each time.
[0120] That is to say, before the first cross-chain gateway confirms the unit amount of resources corresponding to whether the cross-chain transaction is successfully executed according to the transaction confirmation request each time, the submitting parties A and B need to pay the unit amount of resources in order for the first cross-chain gateway to confirm whether the cross-chain transaction is successfully executed according to the transaction confirmation request.
[0121] The process of the relay gateway acquiring resources can also be performed by the first cross-chain gateway, that is, the acquirer of resources can be the relay gateway or the first cross-chain gateway. When the acquirer of resources is the first cross-chain gateway, the relay gateway can store the total amount of resources acquired by the first cross-chain gateway from the transaction submitter, so as to facilitate the query by the first cross-chain gateway or the transaction submitter.
[0122] In an embodiment of the present application, when the first business chain performs an abnormality for the first submitted cross-chain transaction, the relay gateway may store the cross-chain transaction in the transaction pool of the relay chain, so that the processing status of the cross-chain transaction can be grasped in real time based on the transaction pool as an execution abnormality, and the transaction pool and the transaction submitter can submit a transaction confirmation request to the first cross-chain gateway to confirm whether the cross-chain transaction is subsequently executed successfully, thereby improving the convenience of confirming the processing status of the cross-chain transaction. When the cross-chain transaction is successfully executed, the relay gateway may add a second status information to the transaction record stored in the relay chain to indicate that the cross-chain transaction is successfully executed. When the cross-chain transaction fails to execute (such as the number of times to confirm whether the execution is successful exceeds the preset number of times or the execution is not confirmed to be successful within the preset time period), the relay gateway may maintain the first status information in the transaction record of the relay chain to indicate that the cross-chain transaction is abnormally executed. Based on the above implementation method, multiple confirmations of the execution status of the cross-chain transaction with the first execution abnormality can be achieved, thereby ensuring that the status information stored by the relay chain can always accurately indicate the processing status of the cross-chain transaction and maintain the accuracy of the transaction record.
[0123] Among them, the calculation of the number of confirmations involved in the embodiments of the present application, and the data processing process involved in the storage of information in the business volume or relay chain can be implemented based on cloud computing.
[0124] Among them, cloud technology refers to a hosting technology that unifies hardware, software, network and other resources in a wide area network or local area network to realize data computing, storage, processing and sharing. Cloud computing is a computing model, which is the product of the development and integration of traditional computer and network technologies such as grid computing, distributed computing, parallel computing, utility computing, network storage technologies, virtualization, and load balancing. Cloud computing distributes computing tasks on a resource pool composed of a large number of computers, so that various application systems can obtain computing power, storage space and information services as needed. The network that provides resources is called a "cloud". The resources in the "cloud" can be expanded infinitely, and can be obtained at any time, used on demand, expanded at any time, and paid for by use.
[0125] It should be noted that the collection and processing of relevant information in the embodiments of this application should be strictly in accordance with the requirements of relevant national laws and regulations when applied in examples, and the informed consent or separate consent of the personal information subject should be obtained, and subsequent data use and processing should be carried out within the scope of authorization of laws and regulations and the personal information subject.
[0126] See also Fig. 9 , Fig. 9 : is a schematic diagram of the structure of the cross-chain transaction processing device provided in the embodiment of the present application. The cross-chain transaction processing device provided in the embodiment of the present application includes:
[0127] The transaction processing module 91 is used to store the transaction record of the cross-chain transaction to the relay chain and add the cross-chain transaction to the transaction pool of the relay chain in response to the first business chain executing an exception for the first submitted cross-chain transaction at the first moment;
[0128] The transaction pool is used to record abnormal transactions, and the transaction record includes first status information, and the first status information is used to indicate that the cross-chain transaction is executed abnormally;
[0129] An information processing module 92 is configured to, in response to the first cross-chain gateway of the first business chain confirming that the cross-chain transaction is successfully executed after the first moment, change the first state information to the second state information, and remove the cross-chain transaction from the transaction pool;
[0130] Among them, the above-mentioned second status information is used to indicate that the above-mentioned cross-chain transaction is successfully executed, and the above-mentioned first cross-chain gateway confirms whether the above-mentioned cross-chain transaction is successfully executed based on the transaction confirmation request received within a preset time period after the above-mentioned first moment.
[0131] In some feasible implementations, the transaction confirmation request is submitted by the transaction pool to the first cross-chain gateway, or the transaction confirmation request is submitted by the transaction submitter of the cross-chain transaction to the first cross-chain gateway through the transaction confirmation interface of the first cross-chain gateway.
[0132] In some feasible implementations, the transaction processing module 91 is further used to:
[0133] In response to the first cross-chain gateway not confirming that the cross-chain transaction is successfully executed within the preset time period, it is determined that the cross-chain transaction has failed to execute and the cross-chain transaction is removed from the transaction pool.
[0134] In some feasible implementations, the transaction processing module 91 is further used to:
[0135] In response to the first cross-chain gateway confirming whether the cross-chain transaction is successfully executed more than a preset number of times within the preset time period, it is determined that the cross-chain transaction fails to execute and the cross-chain transaction is removed from the transaction pool.
[0136] In some feasible implementations, the transaction processing module 91 is further used to:
[0137] A first number is added to the transaction record, where the first number is used to indicate the total number of times the first cross-chain gateway confirms whether the cross-chain transaction is successfully executed within the preset time period when the cross-chain transaction is removed from the transaction pool.
[0138] In some feasible implementations, the transaction processing module 91 is further used to:
[0139] Receiving the cross-chain transaction submitted by the second business chain through the second cross-chain gateway of the second business chain, where the cross-chain transaction is submitted by the transaction submitter to the second business chain;
[0140] Submit the cross-chain transaction to the first business chain through the first cross-chain gateway, so that the first business chain processes the cross-chain transaction.
[0141] In some feasible implementations, the transaction processing module 91 is further used to:
[0142] Determine the unit resource amount of the first cross-chain gateway to confirm whether the cross-chain transaction is successfully executed each time within the preset time period;
[0143] Before the first cross-chain gateway confirms whether the cross-chain transaction is successfully executed each time, the resource of the unit resource amount is obtained from the transaction submitter of the cross-chain transaction.
[0144] In a specific implementation, the above device can execute the above-mentioned functions through its built-in functional modules. Figure 4 For the implementation methods provided in each step, please refer to the implementation methods provided in the above steps for details, which will not be repeated here.
[0145] See also Fig.10 , Fig.10 Schematic diagram of the structure of the electronic device provided in the embodiment of the present application. Fig.10As shown, the electronic device 1000 in this embodiment may include: a processor 1001, a network interface 1004 and a memory 1005. In addition, the above-mentioned electronic device 1000 may also include: an object interface 1003, and at least one communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. Among them, the object interface 1003 may include a display screen (Display), a keyboard (Keyboard), and the object interface 1003 may optionally include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or it may be a non-volatile memory (NVM), such as at least one disk storage. The memory 1005 may optionally also be at least one storage device located away from the aforementioned processor 1001. As Fig.10 As shown, the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, an object interface module, and a device control application program.
[0146] exist Fig.10 In the electronic device 1000 shown, the network interface 1004 can provide a network communication function; the object interface 1003 is mainly used to provide an input interface for the object; and the processor 1001 can be used to call the device control application stored in the memory 1005 to achieve:
[0147] In response to the first business chain executing an exception for the first submitted cross-chain transaction at the first moment, storing a transaction record of the cross-chain transaction in the relay chain, and adding the cross-chain transaction to the transaction pool of the relay chain;
[0148] The transaction pool is used to record abnormal transactions, and the transaction record includes first status information, and the first status information is used to indicate that the cross-chain transaction is executed abnormally;
[0149] In response to the first cross-chain gateway of the first business chain confirming that the cross-chain transaction is successfully executed after the first moment, changing the first state information to the second state information, and removing the cross-chain transaction from the transaction pool;
[0150] Among them, the above-mentioned second status information is used to indicate that the above-mentioned cross-chain transaction is successfully executed, and the above-mentioned first cross-chain gateway confirms whether the above-mentioned cross-chain transaction is successfully executed based on the transaction confirmation request received within a preset time period after the above-mentioned first moment.
[0151] In some feasible implementations, the transaction confirmation request is submitted by the transaction pool to the first cross-chain gateway, or the transaction confirmation request is submitted by the transaction submitter of the cross-chain transaction to the first cross-chain gateway through the transaction confirmation interface of the first cross-chain gateway.
[0152] In some feasible implementations, the processor 1001 is further configured to:
[0153] In response to the first cross-chain gateway failing to confirm that the cross-chain transaction is successfully executed within the preset time period, it is determined that the cross-chain transaction has failed to execute and the cross-chain transaction is removed from the transaction pool.
[0154] In some feasible implementations, the processor 1001 is further configured to:
[0155] In response to the first cross-chain gateway confirming whether the cross-chain transaction is successfully executed more than a preset number of times within the preset time period, it is determined that the cross-chain transaction fails to execute and the cross-chain transaction is removed from the transaction pool.
[0156] In some feasible implementations, the processor 1001 is further configured to:
[0157] A first number is added to the transaction record, where the first number is used to indicate the total number of times the first cross-chain gateway confirms whether the cross-chain transaction is successfully executed within the preset time period when the cross-chain transaction is removed from the transaction pool.
[0158] In some feasible implementations, the processor 1001 is further configured to:
[0159] Receiving the cross-chain transaction submitted by the second business chain through the second cross-chain gateway of the second business chain, where the cross-chain transaction is submitted by the transaction submitter to the second business chain;
[0160] Submit the cross-chain transaction to the first business chain through the first cross-chain gateway, so that the first business chain processes the cross-chain transaction.
[0161] In some feasible implementations, the processor 1001 is further configured to:
[0162] Determine the unit resource amount of the first cross-chain gateway to confirm whether the cross-chain transaction is successfully executed each time within the preset time period;
[0163] Before the first cross-chain gateway confirms whether the cross-chain transaction is successfully executed each time, the resource of the unit resource amount is obtained from the transaction submitter of the cross-chain transaction.
[0164] It should be understood that in some feasible implementations, the processor 1001 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.
[0165] In a specific implementation, the electronic device 1000 can execute the above-mentioned functions through its built-in functional modules. Figure 4 For the implementation methods provided in each step, please refer to the implementation methods provided in the above steps for details, which will not be repeated here.
[0166] The present application also provides a computer-readable storage medium, which stores a computer program and is executed by a processor to implement Figure 4 For the methods provided in each step, please refer to the implementation methods provided in the above steps for details, which will not be repeated here.
[0167] The computer-readable storage medium may be an internal storage unit of a cross-chain transaction processing device or an electronic device provided in any of the aforementioned embodiments, such as a hard disk or memory of an electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (smartmedia card, SMC), a secure digital (secure digital, SD) card, a flash card (flash card), etc. equipped on the electronic device. The computer-readable storage medium may also include a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc. Further, the computer-readable storage medium may also include both an internal storage unit of the electronic device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the electronic device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
[0168] The present invention provides a computer program product, which includes a computer program. The computer program is executed by a processor. Figure 4 The methods provided in each step.
[0169] The terms "first", "second", etc. in the claims, specification and drawings of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or electronic device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or electronic devices. Mentioning "embodiment" in this article means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present application. Displaying the phrase at various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments. The term "and / or" used in the present application specification and the attached claims refers to any combination of one or more of the items listed in association and all possible combinations, and includes these combinations.
[0170] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Professional and technical personnel may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0171] The above disclosure is only the preferred embodiment of the present application, which cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A cross-chain transaction processing method, characterized in that: The method comprises: In response to the first business chain executing an exception for the first submitted cross-chain transaction at the first moment, storing a transaction record of the cross-chain transaction in the relay chain, and adding the cross-chain transaction to the transaction pool of the relay chain; The transaction pool is used to record abnormal transactions, and the transaction record includes first status information, and the first status information is used to indicate that the cross-chain transaction is executed abnormally; In response to the first cross-chain gateway of the first business chain confirming that the cross-chain transaction is successfully executed after the first moment, changing the first state information to second state information, and removing the cross-chain transaction from the transaction pool; Among them, the second status information is used to indicate that the cross-chain transaction is executed successfully, and the first cross-chain gateway confirms whether the cross-chain transaction is executed successfully based on a transaction confirmation request received within a preset time period after the first moment.
2. The method according to claim 1, characterized in that The transaction confirmation request is submitted by the transaction pool to the first cross-chain gateway, or the transaction confirmation request is submitted by the transaction submitter of the cross-chain transaction to the first cross-chain gateway through the transaction confirmation interface of the first cross-chain gateway.
3. The method according to claim 1, characterized in that The method further comprises: In response to the first cross-chain gateway not confirming that the cross-chain transaction is successfully executed within the preset time period, determining that the cross-chain transaction fails to execute and removing the cross-chain transaction from the transaction pool.
4. The method according to claim 1, characterized in that: The method further comprises: In response to the first cross-chain gateway confirming whether the cross-chain transaction is successfully executed more than a preset number of times within the preset time period, it is determined that the cross-chain transaction fails to execute and the cross-chain transaction is removed from the transaction pool.
5. The method according to claim 3 or 4, characterized in that: The method further comprises: A first number is added to the transaction record, where the first number is used to indicate the total number of times that the first cross-chain gateway confirms whether the cross-chain transaction is successfully executed within the preset time period when the cross-chain transaction is removed from the transaction pool.
6. The method according to claim 1, characterized in that The method further comprises: Receiving the cross-chain transaction submitted by the second business chain through the second cross-chain gateway of the second business chain, where the cross-chain transaction is submitted by the transaction submitter to the second business chain; Submit the cross-chain transaction to the first business chain through the first cross-chain gateway, so that the first business chain processes the cross-chain transaction.
7. The method according to claim 1, characterized in that The method further comprises: Determine the unit resource amount of the first cross-chain gateway for confirming whether the cross-chain transaction is successfully executed each time within the preset time period; Before the first cross-chain gateway confirms whether the cross-chain transaction is successfully executed each time, the resource of the unit resource amount is obtained from the transaction submitter of the cross-chain transaction.
8. A cross-chain transaction processing device, characterized in that: The device comprises: A transaction processing module, configured to, in response to an exception in the first business chain executing a cross-chain transaction submitted for the first time at the first moment, store a transaction record of the cross-chain transaction to a relay chain, and add the cross-chain transaction to a transaction pool of the relay chain; The transaction pool is used to record abnormal transactions, and the transaction record includes first status information, and the first status information is used to indicate that the cross-chain transaction is executed abnormally; an information processing module, configured to, in response to the first cross-chain gateway of the first business chain confirming that the cross-chain transaction is successfully executed after the first moment, change the first state information to second state information, and remove the cross-chain transaction from the transaction pool; Among them, the second status information is used to indicate that the cross-chain transaction is executed successfully, and the first cross-chain gateway confirms whether the cross-chain transaction is executed successfully based on a transaction confirmation request received within a preset time period after the first moment.
9. An electronic device, characterized in that: comprising a processor and a memory, wherein the processor and the memory are connected to each other; The memory is used to store computer programs; The processor is configured to execute the method according to any one of claims 1 to 7 when calling the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 7.
