CN116957568A - Cross-chain transaction processing method, device, equipment and storage medium - Google Patents

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

Info

Publication number
CN116957568A
CN116957568A CN202310603081.3A CN202310603081A CN116957568A CN 116957568 A CN116957568 A CN 116957568A CN 202310603081 A CN202310603081 A CN 202310603081A CN 116957568 A CN116957568 A CN 116957568A
Authority
CN
China
Prior art keywords
cross
link
resource
operation message
message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310603081.3A
Other languages
Chinese (zh)
Inventor
王宗友
朱耿良
时一防
刘区城
刘汉卿
廖志勇
聂凯轩
黄杨峻
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202310603081.3A priority Critical patent/CN116957568A/en
Publication of CN116957568A publication Critical patent/CN116957568A/en
Pending legal-status Critical Current

Links

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

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Computer Security & Cryptography (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A method, a device, equipment and a storage medium for processing cross-chain transaction relate to the technical field of blockchain and are used for reducing transaction cost and improving efficiency when executing cross-chain transaction. In the application, a first blockchain receives a cross-chain transaction request sent by first equipment; n resource operation messages and M cross-link operation messages are carried in the cross-link transaction request, the resource operation messages indicate resource locking, the cross-link operation messages indicate cross-link transaction on the locked resources, and N and M are positive integers; for N resource operation messages, respectively performing: after detecting that the cross-link transaction request carries a target cross-link operation message associated with one resource operation message and determining that the resource designated by the one resource operation message is locked, generating a cross-link transaction event corresponding to the one resource operation message, and transmitting the cross-link transaction event to the second blockchain through a cross-link relay to complete the cross-link transaction between the first blockchain and the second blockchain.

Description

Cross-chain transaction processing method, device, equipment and storage medium
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a method, an apparatus, a device, and a storage medium for processing a cross-chain transaction.
Background
With the development of blockchain technology, blockchain technology is widely used in various industries, and each industry can use blockchain system storage resources. Different industries can provide different services for target objects, and in order to realize resource transfer among different services, a cross-link technology is generated, and the cross-link technology can promote inter-link collaborative work of different block link systems.
Currently, when transferring resources in a first blockchain to a second blockchain through a cross-chain technology, for each cross-chain transaction, firstly sending a resource locking request to the first blockchain so as to enable the first blockchain to lock resources; then, for the locked resource, a cross-chain application request is sent to the first blockchain to generate a cross-chain transaction event, and the cross-chain transaction event is sent to the second blockchain through the relay device to further complete resource transfer. Therefore, in the existing cross-link technology, two steps of resource locking and cross-link application are needed when cross-link transaction processing is carried out each time, at this time, two times of uplink transaction submission are needed, the process implementation is complex, and two transaction fees are consumed.
Therefore, how to reduce transaction cost and improve efficiency when executing cross-chain transactions is a technical problem that needs to be solved at present.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a storage medium for processing a cross-chain transaction, which are used for reducing transaction cost and improving efficiency when the cross-chain transaction is executed.
In a first aspect, an embodiment of the present application provides a method for processing a cross-chain transaction, applied to a first blockchain, where the method includes:
receiving a cross-link transaction request sent by first equipment; the method comprises the steps that N resource operation messages and M cross-link operation messages are carried in a cross-link transaction request, the resource operation messages indicate resource locking, and the cross-link operation messages indicate cross-link transactions on locked resources; n and M are positive integers;
for N resource operation messages, the following operations are respectively executed: after detecting that the cross-link transaction request carries a target cross-link operation message associated with one resource operation message and determining that the resource designated by the one resource operation message is locked, generating a cross-link transaction message event corresponding to the one resource operation message, and transmitting the cross-link transaction message event to the second blockchain through a cross-link relay.
In a second aspect, an embodiment of the present application provides a method for processing a cross-link transaction, which is applied to a first device, and the method includes:
Storing the received resource operation message and the received cross-link operation message into a memory pool; the resource operation message indicates resource locking, and the cross-chain operation message indicates cross-chain transaction on the locked resource;
generating a cross-link transaction request based on N resource operation messages and M cross-link operation messages stored in a memory pool; wherein N and M are positive integers;
a cross-chain transaction request is sent to a first blockchain.
In a third aspect, an embodiment of the present application provides a cross-chain transaction device, applied to a first blockchain, the device including:
the receiving unit is used for receiving a cross-link transaction request sent by the first equipment; the method comprises the steps that N resource operation messages and M cross-link operation messages are carried in a cross-link transaction request, the resource operation messages indicate resource locking, and the cross-link operation messages indicate cross-link transactions on locked resources; n and M are positive integers;
the execution unit is used for executing the following operations for N resource operation messages respectively: after detecting that the cross-link transaction request carries a target cross-link operation message associated with one resource operation message and determining that the resource designated by the one resource operation message is locked, generating a cross-link transaction message event corresponding to the one resource operation message, and transmitting the cross-link transaction message event to the second area cross-link through a cross-link relay.
In one possible implementation, the receiving unit is specifically configured to:
receiving a cross-link transaction request sent by a first device through a routing component defined in an entry point contract; wherein the access point contracts also define resource client contracts and cross-link bridge contracts.
In a possible implementation, the execution unit is further configured to:
after detecting that the cross-link transaction request carries a target cross-link operation message associated with one resource operation message, transmitting the one resource operation message and the target cross-link operation message to a cross-link bridge contract defined in the access point contract through a routing component defined in the access point contract;
checking one resource operation message and a target cross-link operation message through the cross-link bridge contract, and transmitting the one resource operation message to a resource client contract defined in the entry point contract after the check is confirmed to be passed;
the lock processing is performed on the resource information associated with one resource operation message by the resource client contract.
In one possible implementation, the execution unit is specifically configured to:
determining corresponding cross-link transaction information based on a resource operation message and a target cross-link operation message;
And checking and processing the cross-link transaction request based on the checking rules configured in the cross-link bridge contract.
In a possible implementation, the execution unit is further configured to:
after checking a resource operation message and a target cross-link operation message through the cross-link bridge contract, if the check is determined not to pass, the prompt information of the cross-link transaction execution failure is fed back to the first equipment.
In a possible implementation, the execution unit is further configured to:
if the cross-link transaction request is detected not to carry the cross-link operation message associated with one resource operation message, executing locking processing on the resource information associated with the one resource operation message through the resource client contract defined in the entry point contract.
In one possible implementation, the execution unit is specifically configured to:
and determining a resource client address based on one resource operation message, and transferring the resource information in the resource client address, which needs to be subjected to cross-chain transaction, to the resource client contract of the entry point contract for locking.
In a fourth aspect, an embodiment of the present application provides a cross-chain transaction processing apparatus, applied to a first device, including:
the storage unit is used for storing the received resource operation message and the received cross-link operation message into the memory pool; the resource operation message indicates resource locking, and the cross-chain operation message indicates cross-chain transaction on the locked resource;
The generation unit is used for generating a cross-link transaction request based on N resource operation messages and M cross-link operation messages stored in the memory pool; wherein N and M are positive integers;
and the sending unit is used for sending the cross-chain transaction request to the first blockchain.
In one possible implementation, the sending unit is specifically configured to:
a cross-chain transaction request is sent to a routing component defined in an entry point contract of a first blockchain.
In a fifth aspect, embodiments of the present application provide a computing device comprising: a memory and a processor, wherein the memory is used for storing a computer program; and the processor is used for executing the computer program to realize the steps of the cross-chain transaction processing method provided by the embodiment of the application.
In a sixth aspect, embodiments of the present application provide a computer readable storage medium storing a computer program, which when executed by a processor, implements the steps of the method for processing a cross-chain transaction provided by the embodiments of the present application.
In a seventh aspect, embodiments of the present application provide a computer program product comprising a computer program stored in a computer readable storage medium; when the processor of the computing device reads the computer program from the computer readable storage medium, the processor executes the computer program, so that the computing device executes the steps of the cross-chain transaction processing method provided by the embodiment of the application.
The application has the following beneficial effects:
the embodiment of the application provides a method, a device, equipment and a storage medium for processing a cross-chain transaction, relates to the technical field of block chains, and particularly relates to a cross-chain technology in a block chain. In the application, a first device sends a cross-chain transaction request to a first blockchain, wherein the cross-chain transaction request carries N resource operation messages and M cross-chain operation messages, the resource operation messages indicate resource locking, the cross-chain operation messages indicate cross-chain transaction on the locked resources, and N and M are positive integers. The cross-link transaction request carries at least one resource operation message and at least one cross-link operation message; at the moment, the resource locking and the cross-chain application aiming at one cross-chain transaction can be carried in one cross-chain transaction request, and the cross-chain transaction request is sent to the first blockchain, namely, the cross-chain transaction can be realized by sending one request only to the first blockchain, and the independent submission of the resource locking request and the cross-chain application request aiming at the cross-chain transaction is not needed, so that the cost of the cross-chain transaction is effectively reduced, and the efficiency is improved.
Correspondingly, after receiving a cross-link transaction request sent by the first device, the first blockchain executes, for N resource operation messages, respectively: after detecting that a target cross-link operation message associated with one resource operation message is carried in a cross-link transaction request, determining that a resource designated by one resource operation message is locked, generating a cross-link transaction message event corresponding to the resource operation message, and transmitting the cross-link transaction message event to a second blockchain through a cross-link relay to complete the cross-link transaction between the first blockchain and the second blockchain, wherein obviously, after the first blockchain receives the cross-link transaction request carrying N resource operation messages and M cross-link operation messages, the cross-link transaction logic is smoothly executed for the cross-link transaction request, so that the cross-link transaction among the blockchains is further realized, and the accuracy of the transaction is ensured.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it will be apparent that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
fig. 2 is a schematic diagram of another application scenario provided in an embodiment of the present application;
FIG. 3 is a schematic flow chart of a specific implementation of a cross-link transaction processing method according to an embodiment of the present application;
FIG. 4 is a schematic diagram of generating a cross-chain transaction request according to an embodiment of the present application;
FIG. 5 is a schematic diagram of an entry point contract according to an embodiment of the present application;
FIG. 6 is a schematic flow chart of detecting and determining whether to generate a cross-link transaction message event for a resource operation message according to an embodiment of the present application;
FIG. 7 is a schematic diagram of generating a cross-chain transaction event message for a resource operation message according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a storage resource lock message according to an embodiment of the present application;
FIG. 9 is a schematic flow chart of detecting and determining whether to generate a cross-link transaction event for a cross-link operation message according to an embodiment of the present application;
FIG. 10 is a schematic diagram of generating a cross-link transaction event message for a cross-link operation message according to an embodiment of the present application;
FIG. 11 is a schematic diagram of a scenario of cross-chain transaction processing according to an embodiment of the present application;
FIG. 12 is a flowchart of a method for performing cross-chain transaction processing by a first blockchain according to an embodiment of the present application;
FIG. 13 is a flowchart of a method for processing a cross-link transaction performed by a first device according to an embodiment of the present application;
FIG. 14 is a block diagram of a cross-chain transaction processing device according to an embodiment of the present application;
FIG. 15 is a block diagram of another cross-chain transaction processing device according to an embodiment of the present application;
FIG. 16 is a block diagram of a computing device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantageous effects of the present application more apparent, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Some terms in the embodiments of the present application are explained below to facilitate understanding by those skilled in the art.
Among the problems faced by blockchains in the cross-chain technique, the interoperability between blockchains greatly limits the application space of blockchains. The cross-chain technology is a key for realizing value Internet, and is a good medicine for saving blockchains from scattered islands, and is a bridge for expanding and connecting the blockchains outwards.
The account abstraction (Account Abstraction) is a concept of changing a resource client into a smart contract account, i.e. converting an externally owned account (Externally Owned Accounts, EOA) into a smart contract resource client (Smart Contract Wallet).
Four main components are involved in account abstraction: object operations (User operations), bundles (bundles), entry points (Entry points), and Contract Accounts (CA); wherein User Operations are used to perform transactions with a contract account; the bundles are used to pack User Operations from the memory pool and send them onto the EntryPoint blockchain; entry Point is an Entry Point contract that handles transaction verification and execution logic; contract Accounts, is an intelligent contract account owned by a target object (e.g., a user).
Blockchain (Blockchain) is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission (P2P transmission), consensus mechanism, encryption algorithm and the like. The blockchain is essentially a decentralised database, which is a series of data blocks generated by cryptographic methods, each data block containing a batch of information of network transactions for verifying the validity (anti-counterfeiting) of the information and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, and an application services layer.
The resource client can be used for realizing the resource management service function and realizing the communication connection with the decentralised application client based on the resource management service function.
The resource client is a tool for managing and storing the digital resources of the target object, for example, the digital resources can be transferred to other accounts based on the resource client, and the digital resources transferred to other accounts can be received by the resource client. The resource client may be a hardware device or a software program. In the application, the resource client of the target object can establish communication connection with the decentralised application client so as to realize related operations such as authorized login of the target object.
It will be appreciated that as various types of decentralized applications are widely deployed on the blockchain, the activity of the target object on the blockchain increases, and when the decentralized application is used, the general target object may log in by using a blockchain key management tool resource client (also referred to as a decentralized resource client for short), where an address in the blockchain key management tool (resource client) corresponds to a target object on the blockchain, and the decentralized application can obtain the target object address from the key management tool through some interfaces, so as to solve the problem that the Dapp background cannot trust the target object address used when the decentralized application logs in.
The digital collection includes: pictures, video, audio, and even electronic assets such as game equipment.
The following briefly describes the design concept of the embodiment of the present application.
Currently, when transferring resources in a first blockchain to a second blockchain through a cross-chain technology, for each cross-chain transaction, firstly sending a resource locking request to the first blockchain so as to enable the first blockchain to lock resources; then, a cross-chain transaction request is sent to the first blockchain for the locked resource to generate a cross-chain transaction event, and the cross-chain transaction event is sent to the second blockchain through the relay device to further complete the resource transfer. Therefore, in the existing cross-link technology, two steps of resource locking and cross-link application are needed when cross-link transaction processing is carried out each time, at this time, two times of uplink transaction submission are needed, the process implementation is complex, and two transaction fees are consumed.
Therefore, how to reduce transaction cost and improve efficiency when executing cross-chain transactions is a technical problem that needs to be solved at present.
In view of this, the embodiment of the application introduces an abstract account into a cross-chain technology, provides a cross-chain transaction processing method, device, equipment and storage medium, relates to the technical field of blockchains, and in particular relates to the cross-chain technology in the blockchains, which is used for reducing transaction cost and improving efficiency when executing the cross-chain transaction.
In one possible implementation, the first device sends a cross-chain transaction request to the first blockchain, where the cross-chain transaction request carries N resource operation messages and M cross-chain operation messages, the resource operation messages indicate resource locking, the cross-chain operation messages indicate performing cross-chain transactions on the locked resources, and N and M are positive integers. The cross-link transaction request carries at least one resource operation message and at least one cross-link operation message; at the moment, the resource locking and the cross-chain application aiming at one cross-chain transaction can be carried in one cross-chain transaction request, and the cross-chain transaction request is sent to the first blockchain, namely, the cross-chain transaction can be realized by sending one request only to the first blockchain, and the independent submission of the resource locking request and the cross-chain application request aiming at the cross-chain transaction is not needed, so that the cost of the cross-chain transaction is effectively reduced, and the efficiency is improved.
Correspondingly, after receiving a cross-link transaction request sent by the first device, the first blockchain executes, for N resource operation messages, respectively: after detecting that a target cross-link operation message associated with one resource operation message is carried in a cross-link transaction request, determining that a resource designated by one resource operation message is locked, generating a cross-link transaction message event corresponding to the resource operation message, and transmitting the cross-link transaction message event to a second blockchain through a cross-link relay to complete the cross-link transaction between the first blockchain and the second blockchain, wherein obviously, after the first blockchain receives the cross-link transaction request carrying N resource operation messages and M cross-link operation messages, the cross-link transaction logic is smoothly executed for the cross-link transaction request, so that the cross-link transaction among the blockchains is further realized, and the accuracy of the transaction is ensured.
After the design concept of the embodiment of the present application is introduced, the application scenario set by the present application is briefly described below. It should be noted that the following scenario is only for illustrating the embodiments of the present application, and is not limiting. In the specific implementation, the technical scheme provided by the embodiment of the application can be flexibly applied according to actual needs.
Referring to fig. 1, fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application. The application scene comprises the following steps: a first device 100, a first blockchain 101, a cross-chain relay 102, and a second blockchain 103; wherein:
the first device 100 is a terminal device of an abstract account resource client in installation, and the terminal device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a desktop computer, an electronic book reader, an intelligent voice interaction device, an intelligent home appliance, a vehicle-mounted terminal and other devices; the abstract account resource client can be installed in the first equipment in the form of an application program or in the first equipment in the form of a plug-in;
the first device 100 may also be a server corresponding to the abstract account resource client; the server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), basic cloud computing services such as big data and artificial intelligent platforms, and the like. It should be noted that the server may be a node in a blockchain.
In the embodiment of the present application, the first device 100 is configured to invoke the resource client to complete the cross-link related transaction uplink; and displaying the historical state of the cross-chain task and other information of the relay service.
The cross-chain relay 102 supports an interface detection function, detects the first blockchain and the second blockchain, and acquires a cross-chain transaction message event sent by the first blockchain and/or the second blockchain; supporting a function of transmitting a cross-link transaction event according to the serial number; judging whether the cross-link transaction message completes the function or not; the system supports the functions of locally storing and recording all cross-link transaction message events, supports a plurality of services to complete secure signature transfer by multiple signatures, and provides various change setting functions in a cross-link contract, such as admin change and the like.
In one possible implementation scenario, the first blockchain 101 includes: bridge service proxy contracts (Bridge Proxy Contract), application programming interfaces (Application Program Interface, API) threads (handles), and smart contracts. Similarly, the structure of the second blockchain 103 is identical to that of the first blockchain 101, and will not be described again. Referring to fig. 2, fig. 2 is a schematic diagram of another application scenario provided in the embodiment of the present application, in which a specific structure and a connection relationship of a first blockchain, a second blockchain, and a cross-chain relay are embodied.
In one possible implementation, the primary logic of the proxy contract for the bridge service is to verify that the signer has rights and then forward the corresponding handler for the particular message.
Illustratively, the handler accepts cross-link messages related to business digital collection contracts and invokes specifically matched business digital collection contracts for processing; business digital collection contracts allow a handler to make and permanently record digital collections on a blockchain.
In one possible implementation, a target object initiates a cross-chain transaction prepayment (delivery), interacts with a bridge service proxy contract, and invokes a corresponding handler in charge of interacting with a particular target contract according to the delivery resource type. The process of deposit completes the resource lock or release (burn), and after completion of the call, a cross-chain transaction message event is generated.
The inter-link relay captures the inter-link transaction message event, submits a voting proposal (VoteProposal) to the bridge service agent contract on the target link, and when the threshold requirement is met, the bridge service agent contract directly calls an execution proposal (execteProposal), and the execteProposal calls a related Handler and specifically calls a target contract corresponding to the Handler to complete the inter-link transaction.
Based on the above application scenario, the method for processing a cross-link transaction according to the exemplary embodiment of the present application is described below with reference to the above application scenario by taking the first device as an example of a server corresponding to the abstract account resource client, and it should be noted that the above application scenario is only shown for the convenience of understanding the spirit and principles of the present application, and embodiments of the present application are not limited in this respect. Furthermore, although the operations of the methods of the present application are depicted in the drawings in a particular order, this is not required to either imply that the operations must be performed in that particular order or that all of the illustrated operations be performed to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform.
Referring to fig. 3, fig. 3 is a schematic diagram of a specific implementation flow of a cross-link transaction processing method according to an embodiment of the present application, including the following steps:
in step S300, the first device receives an operation message triggered by the client for abstract account resources.
In the embodiment of the application, the operation message comprises a resource operation message and a cross-chain operation message; the resource operation message is used for indicating the resource locking, and the cross-chain operation message is used for indicating the cross-chain transaction of the locked resource.
In the embodiment of the application, in the terminal equipment provided with the abstract account resource client, the abstract account resource client is started, the signature operation is carried out on the object operation by using the private key held by the terminal equipment, the corresponding operation message is generated, the generated operation message is transmitted to the server corresponding to the abstract account resource client, and the generated operation message is transmitted to the first equipment.
If the target object submits the resource locking operation, generating a corresponding resource operation message after signing the resource locking operation by adopting a private key, and transmitting the resource operation message to the first device; if the target object submits the cross-link application operation, the private key is adopted to sign the cross-link application operation, a corresponding cross-link operation message is generated, and the cross-link operation message is transmitted to the first device.
In one possible implementation, when a private key is used for signature operation, a non-elliptic curve digital signature algorithm (Elliptic Curve Digital Signature Algorithm, ECDSA) is optionally used for signature operation on the resource client operation; and signing the cross-chain operation by adopting non-ECDSA.
In step S301, the first device stores the operation message in the memory pool.
In one possible implementation, each time the first device receives a resource operation message, the first device stores the resource operation message in the memory pool; and storing the cross-link operation message into the memory pool after each time the first device receives the cross-link operation message.
In step S302, the first device screens N resource operation messages and M cross-link operation messages from the memory pool.
In one possible implementation manner, the first device screens the resource operation message and the cross-link operation message which meet the screening condition from the memory pool according to a set time period. For example, assuming that the time period is 10 minutes, the first device screens the resource operation message and the cross-link operation message that satisfy the screening condition from the resource operation message and the cross-link operation message stored in the memory pool in the current period every 10 minutes. It should be noted that the time period may be set according to actual use conditions.
In one possible implementation, the first device screens the resource operation message and the cross-chain operation message from the memory pool that satisfy the condition by one of the following ways.
Mode one: the first device screens out all resource operation messages and all cross-link operation messages which operate aiming at the same block chain from all resource operation messages and all cross-link operation messages stored in a memory pool in the current period; at this time, N and M take positive integers.
Illustratively, it is assumed that the resource operation message stored in the memory pool in the current period includes: a first type of resource operation message that performs resource locking for resources in a first blockchain and a second type of resource operation message that performs resource locking for resources in a second blockchain; the cross-link operation message stored in the memory pool in the current period comprises the following steps: when a first type of cross-chain operation message of cross-chain transaction is carried out on resources in a first block chain and a second type of cross-chain operation message of cross-chain transaction is carried out on resources in a second block chain; at this time, for the first blockchain, all first-type resource operation messages and all first-type cross-chain operation messages operating on the first blockchain are screened out from the memory pool.
Mode two: the first equipment screens out resource operation messages and cross-chain operation messages which are operated aiming at the same block chain and have association relation from all resource operation messages and all cross-chain operation messages stored in a memory pool in the current period; at this time, N and M are positive integers and have the same value. And selecting the resource operation message and the cross-link operation message corresponding to the same cross-link transaction from the memory pool.
Mode three: the first equipment screens out at least two resource operation messages and at least one cross-chain operation message which are operated aiming at the same block chain from all resource operation messages and all cross-chain operation messages stored in a memory pool in the current period; at this time, N is a positive integer greater than 1, and M is a positive integer greater than or equal to 1.
In the application, at least one resource operation message and at least one cross-chain operation message are screened for the same blockchain to ensure the accuracy of the cross-chain transaction request generated for the blockchain.
In step S303, the first device generates a cross-link transaction request based on the N resource operation messages and the M cross-link operation messages that are screened out.
In one possible implementation manner, after screening N resource operation messages and M cross-link operation messages, the first device packages the screened N resource operation messages and M cross-link operation messages, and signs the packaged information to generate a corresponding cross-link transaction request.
Referring to fig. 4, fig. 4 is a schematic diagram of generating a cross-chain transaction request according to an embodiment of the present application. As can be seen from fig. 4, the Private key (Private key) is used to sign the object Operation (User Operation) to obtain an Operation message, namely a signed object Operation (Signed User Operation); then, the operation information is stored in an operation memory pool; then, a binder (Bundler) analyzes the signature of the operation message, and after the operation message passes verification, the operation message meeting the screening condition is screened out, the screened operation message is packed by a packer (Miner), and the packed information is independently re-signed to generate a cross-link transaction request, wherein the cross-link transaction request is used for packing the resource operation message and the cross-link operation message triggered by the target object.
It should be noted that the binder may be a block builder, or may be a target object that may send a cross-chain transaction to the block builder through the binding market.
In step S304, the first device sends a cross-chain transaction request to the first blockchain.
In one possible implementation, the first device sends a cross-chain transaction request to an entry point contract of the first blockchain; the cross-link transaction request carries N resource operation messages and M cross-link operation messages. Optionally, the first device sends a cross-chain transaction request to a routing component defined in the first blockchain entry point contract.
According to the method and the system, the operation information is forwarded to the access point contracts in the first area cross-link in batches, then the access point contracts are used for verification and corresponding processing logic is executed, the times of requesting different contracts are reduced, and the cross-link transaction cost is reduced.
In step S305, after receiving the cross-link transaction request sent by the first device, the first block link detects an operation message carried in the cross-link transaction request, and generates a cross-link transaction message event corresponding to the operation message after determining that the detection is passed.
In one possible implementation manner, the first blockchain receives a cross-chain transaction request sent by the first device through an entry point contract, detects an operation message carried in the cross-chain transaction request, and generates a cross-chain transaction event corresponding to the operation message after the detection is determined to pass.
In the embodiment of the application, a routing component, a resource client contract and a cross-link bridge contract are defined in an entry point contract, and the routing component, the resource client contract and the cross-link bridge contract are connected in an interactive mode; referring to fig. 5, fig. 5 is a schematic structural diagram of an entry point contract according to an embodiment of the present application.
In one possible implementation manner, the first blockchain receives a cross-chain transaction request through a routing component in an entry point contract, detects an operation message carried in the cross-chain transaction request once, and continues to execute a subsequent procedure according to a detection result; the operation messages comprise resource operation messages and cross-chain operation messages.
That is, the routing component defined in the entry point contract of the first blockchain detects the cross-link operation message and the resource operation message carried in the cross-link transaction request after receiving the cross-link transaction request. The flow of detecting resource operation messages and detecting cross-chain operation messages to further determine whether to generate associated cross-chain transaction message events is described in further detail below.
Referring to fig. 6, fig. 6 is a schematic flow chart of detecting and determining whether to generate a cross-link transaction message event for a resource operation message according to an embodiment of the present application, which includes the following steps:
Step S600, receiving a cross-link transaction request through a routing component; the cross-link transaction request carries N resource operation messages and M cross-link operation messages.
Step S601, through the routing component, for N resource operation messages, respectively executing: detecting whether a target cross-link operation message associated with one resource operation message is carried in a cross-link transaction request; if yes, step S602 is executed, otherwise step S608 is executed.
In one possible implementation manner, the resource operation message and the cross-chain operation message both carry transaction payment party information, transaction payee information, transaction amount and the like; therefore, when detecting whether the cross-link transaction request carries the target cross-link operation message associated with one resource operation message, it is mainly detected whether the received M cross-link operation messages contain the cross-link operation messages with the same payment party information, the same transaction payee information and the same transaction amount as the one resource operation message, and if so, it is determined that the cross-link transaction request carries the target cross-link operation message associated with the one resource operation message.
In step S602, a resource operation message and a target cross-link operation message are transmitted to the cross-link bridge contract defined in the entry point contract through the routing component.
Step S603, checking a resource operation message and a target cross-link operation message through a cross-link bridge contract, determining whether the check is passed, if so, executing step S604, otherwise, executing step S607.
In one possible implementation, the corresponding cross-link transaction information is determined based on a resource operation message and a target cross-link operation message; and checking and processing the cross-link transaction request based on the checking rules configured in the cross-link bridge contract.
Exemplary, cross-chain transaction information includes, but is not limited to, cross-chain behavior, cross-chain rights, and cross-chain parameters; wherein the cross-chain parameters include address and amount. The checking rule is as follows: whether the cross-link behavior is correct and compliant, whether the cross-link authority exists, and whether the cross-link parameter is valid.
For example, when the verification rule includes a cross-link behavior verification and a cross-link parameter verification, when the cross-link behavior in the cross-link transaction information is correct and the cross-link parameter in the cross-link transaction information is valid, determining that one resource operation message and the target cross-link operation message pass the verification, otherwise, the verification is not passed.
In step S604, a resource operation message is transmitted to the resource client contracts defined in the entry point contracts via the cross-link bridge contracts.
Step S605, by the resource client contract, performs a lock process on the resource information associated with one resource operation message, and after determining that the resource is locked, sends a resource lock message to the cross-link bridge contract.
In one possible implementation, a resource client address is determined based on a resource operation message, and resource information in the resource client address, which needs to be subjected to cross-chain transaction, is transferred to a resource client contract of an entry point contract to be locked.
Step S606, after detecting a resource locking message associated with a resource operation message through a cross-link bridge contract, generating a corresponding cross-link transaction message event for the resource operation message.
Referring to fig. 7, fig. 7 is a schematic diagram of generating a cross-chain transaction event message for a resource operation message according to an embodiment of the present application. As can be seen from fig. 7: after the resource operation message and the cross-link operation message enter the routing component and are judged to be cross-link logic, the resource operation message and the cross-link operation message are forwarded to a cross-link bridge contract; after the cross-link bridge contracts are subjected to basic verification, the resource operation information is continuously forwarded to the resource client contracts; in the resource client contract execution logic, the resource operation message can directly represent the address operation of the resource client, transfer the resources needing cross-chain transaction to the entry point contract for mortgage, complete the resource locking, and then forward the resource locking message to the cross-chain bridge contract; the cross-link bridge contract generates a cross-link transaction message event to the cross-link relay after detecting that the resource escort is completed.
In the application, the access point contract of the first blockchain multiplexes the functions of the intelligent contract resource client contract and comprises a routing function and a cross-link bridge contract function so as to send a cross-link transaction request carrying a resource operation message and a cross-link operation message to the access point contract of the first blockchain, thus realizing the cross-link transaction, effectively reducing the cross-link cost and improving the cross-link efficiency.
Step S607, feeding back the prompt information of the execution failure of the cross-link transaction to the first device.
After the fact that verification is not passed is confirmed, the fact that errors exist in the cross-chain transaction is indicated, and prompt information of failure in executing the cross-chain transaction is fed back to the first device in order to guarantee safety and accuracy of the transaction.
In step S608, a resource operation message is transmitted to the resource client contract defined in the entry point contract through the routing component.
In step S609, the locking process is performed on the resource information associated with one resource operation message through the resource client contract, and after the resource locking is successful, the resource locking message is sent to the routing component.
In step S610, a resource lock message corresponding to the resource operation message is stored by the routing component.
Referring to fig. 8, fig. 8 is a schematic diagram of a storage resource locking message according to an embodiment of the present application. As can be seen from fig. 8: after the resource operation message and the cross-link operation message enter the routing component, the resource operation message is forwarded to a resource client contract after being judged to be a resource locking logic aiming at one resource operation message; in the resource client contract execution logic, the resource operation message can directly represent the address operation of the resource client, transfer the resources needing cross-chain transaction to the mortgage in the entry point contract, complete the resource locking, and then forward the resource locking message to the routing component, and the routing component stores the resource locking message.
In the application, after determining that a target cross-link operation message associated with a resource operation message does not exist, resource locking logic is executed for the resource operation message, and the resource locking message generated after resource locking is stored in a routing component, so that when the corresponding cross-link operation message is received, a cross-link transaction message event is quickly generated.
Referring to fig. 9, fig. 9 is a schematic flow chart of detecting and determining whether to generate a cross-link transaction event for a cross-link operation message according to an embodiment of the present application, which includes the following steps:
step S900, receiving a cross-link transaction request through a routing component; the cross-link transaction request carries N resource operation messages and M cross-link operation messages.
Step S901, through the routing component, of performing, for M cross-link operation messages, respectively: detecting whether a cross-link transaction request carries a target resource operation message associated with one cross-link operation message; if yes, step S902 is executed, otherwise step S908 is executed.
In step S902, a cross-link operation message and a target resource operation message are transmitted to the cross-link bridge contract defined in the access point contract through the routing component.
Step S903, checking a cross-link operation message and a target resource operation message through a cross-link bridge contract, determining whether the check is passed, if so, executing step S904, otherwise, executing step S907.
Step S904, transmitting the target resource operation message to the resource client contract defined in the entry point contract by crossing the link bridge contract.
In step S905, the locking process is performed on the resource information associated with the target resource operation message by the resource client contract, and after determining that the resource locking is successful, the resource locking message is sent to the cross-link bridge contract.
Step S906, after detecting the resource locking message through the cross-link bridge contract, generating a corresponding cross-link transaction message event for one cross-link operation message.
Step S907, the prompt information of the execution failure of the cross-link transaction is fed back to the first equipment.
It should be noted that, the implementation principles of the steps S900 to S907 are similar to those of the steps S700 to S607, and the detailed description is not repeated here.
Step S908, detecting whether there is a resource lock message associated with a cross-link operation message for the cross-link operation message through the routing component, if so, executing step S909, otherwise executing step S911.
The routing component stores therein a resource lock message that is generated based on the previously received resource operation message, see specifically steps S908-S909.
In step S909, a cross-link operation message and associated resource lock message are transmitted to the cross-link bridge contract defined in the entry point contract via the routing component.
Step S910 generates, by the cross-link bridge contract, a corresponding cross-link transaction message event for one cross-link operation message.
Referring to fig. 10, fig. 10 is a schematic diagram of generating a cross-link transaction event message for a cross-link operation message according to an embodiment of the present application. As can be seen from fig. 10: after the resource operation message and the cross-link operation message enter the routing component, determining that an associated resource locking message exists for one cross-link operation message, and after judging as the cross-link logic, forwarding the cross-link operation message and the associated resource locking message to a cross-link bridge contract; within the cross-link bridge contract execution logic, a corresponding cross-link transaction message event is generated.
Step S911, feeding back prompt information of failure of executing the cross-link transaction to the first device.
After determining that only the cross-link operation message exists and the resource operation message or the resource locking message related to the cross-link operation message does not exist, indicating that the cross-link transaction has errors, and feeding back prompt information of failure in executing the cross-link transaction to the first equipment in order to ensure the safety and the accuracy of the transaction.
In step S306, the first blockchain transmits a cross-chain transaction message event to the cross-chain relay.
Step S307, the cross-chain relay transmits the cross-chain transaction event to the second blockchain.
In one possible implementation, implementation functionality to generate a cross-chain transaction request based on a resource operation message and a cross-chain operation message may be provided in the first blockchain. At this point, the first device is part of a first blockchain; the first device receives object operation sent by a server corresponding to the abstract account resource client, processes the object operation to generate a cross-link transaction request, transmits the cross-link transaction request to an entry point contract of a first blockchain, and executes transaction verification and processing logic to generate a final cross-link transaction message event.
Referring to fig. 11, fig. 11 is a schematic view of a scenario of cross-chain transaction processing according to an embodiment of the present application; in fig. 11, a target object triggers an object operation for an abstract account resource client installed in a terminal device 1100, the terminal device transmits the object operation to a server 1101 corresponding to the abstract account resource client, and the server 1101 transmits the object operation to a first device 1102 in a first blockchain. At this time, the first device 1102 signs (signature) the object Operation (User Operation) with a Private key (Private key) to obtain an Operation message (Signed User Operation); then, the operation information is stored in an operation memory pool; and then, carrying out signature analysis on the operation message, screening the operation message meeting the screening condition after verification is passed, packaging the screened operation message, and independently re-signing to generate a cross-chain transaction request. The first device 1102 transmits the cross-chain transaction request to the ingress point contract 1103 of the first blockchain, performs checksum processing logic by the ingress point contract, determines that the cross-chain transaction message event is generated, and transmits the cross-chain transaction message event to the second blockchain 1105 via the cross-chain relay 1104.
Referring to fig. 12, a flowchart of a method for processing a first blockchain execution cross-chain transaction according to an embodiment of the present application includes the following steps:
step S1200, receiving a cross-link transaction request sent by a first device; the method comprises the steps that N resource operation messages and M cross-link operation messages are carried in a cross-link transaction request, the resource operation messages indicate resource locking, and the cross-link operation messages indicate cross-link transactions on locked resources; n and M are positive integers;
step S1201, for the N resource operation messages, performs the following operations respectively: after detecting that the cross-link transaction request carries a target cross-link operation message associated with one resource operation message and determining that the resource designated by the one resource operation message is locked, generating a cross-link transaction message event corresponding to the one resource operation message, and transmitting the cross-link transaction message event to the second blockchain through a cross-link relay.
In one possible implementation, receiving a cross-chain transaction request sent by a first device includes:
receiving a cross-link transaction request sent by a first device through a routing component defined in an entry point contract; wherein the access point contracts also define resource client contracts and cross-link bridge contracts.
In one possible implementation, after detecting that the cross-link transaction request carries a target cross-link operation message associated with a resource operation message, before determining that a resource specified by the resource operation message is locked, the method further includes:
transmitting a resource operation message and a target cross-link operation message to a cross-link bridge contract defined in the access point contract through a routing component defined in the access point contract;
checking one resource operation message and a target cross-link operation message through the cross-link bridge contract, and transmitting the one resource operation message to a resource client contract defined in the entry point contract after the check is confirmed to be passed;
the lock processing is performed on the resource information associated with one resource operation message by the resource client contract.
In one possible implementation, the checking processing of a resource operation message and a target cross-link operation message includes:
determining corresponding cross-link transaction information based on a resource operation message and a target cross-link operation message;
and checking and processing the cross-link transaction request based on the checking rules configured in the cross-link bridge contract.
In one possible implementation manner, after checking a resource operation message and a target cross-link operation message through a cross-link bridge contract, the method further includes:
If the verification is not passed, the prompt information of failure in executing the cross-chain transaction is fed back to the first equipment.
In one possible implementation, if it is detected that the cross-link transaction request does not carry a cross-link operation message associated with one resource operation message, then locking processing is performed on resource information associated with the one resource operation message through a resource client contract defined in the entry point contract.
In one possible implementation, performing a lock process on resource information associated with a resource operation message includes:
and determining a resource client address based on one resource operation message, and transferring the resource information in the resource client address, which needs to be subjected to cross-chain transaction, to the resource client contract of the entry point contract for locking.
Referring to fig. 13, a flowchart of a method for processing a first device to execute a cross-link transaction according to an embodiment of the present application includes the following steps:
step S1301, storing the received resource operation message and the cross-link operation message into a memory pool; the resource operation message indicates resource locking, and the cross-chain operation message indicates cross-chain transaction on the locked resource;
step S1302, generating a cross-link transaction request based on N resource operation messages and M cross-link operation messages stored in a memory pool; wherein N and M are positive integers;
Step S1303, a cross-chain transaction request is sent to a first blockchain.
In one possible implementation, sending a cross-chain transaction request to a first blockchain includes:
a cross-chain transaction request is sent to a routing component defined in an entry point contract of a first blockchain.
In the application, a cross-link technology is combined with an account abstraction technology, so that the cross-link capability based on account abstraction is provided, and under the system, the use capability for the intelligent contract resource client side entry point contract is multiplexed; when the cross-link transaction is carried out, the original resource locking and the cross-link request need to request different contracts twice, and the request is optimized to be required to request the contract once to the entry point, so that the cost of the cross-link cost is effectively reduced.
It should be noted that in the specific embodiment of the present application, data related to the user is involved, and when the above embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data is required to comply with related laws and regulations and standards of related countries and regions.
Based on the same inventive concept, the embodiment of the application also provides a cross-chain transaction processing device which is applied to the first blockchain; as shown in fig. 14, the cross-chain transaction processing apparatus 1400 includes: a receiving unit 1401 and an executing unit 1402; wherein:
A receiving unit 1401, configured to receive a cross-link transaction request sent by a first device; the method comprises the steps that N resource operation messages and M cross-link operation messages are carried in a cross-link transaction request, the resource operation messages indicate resource locking, and the cross-link operation messages indicate cross-link transactions on locked resources; n and M are positive integers;
an execution unit 1402, configured to execute the following operations for the N resource operation messages, respectively: after detecting that the cross-link transaction request carries a target cross-link operation message associated with one resource operation message and determining that the resource designated by the one resource operation message is locked, generating a cross-link transaction message event corresponding to the one resource operation message, and transmitting the cross-link transaction message event to the second area cross-link through a cross-link relay.
In one possible implementation, the receiving unit 1401 is specifically configured to:
receiving a cross-link transaction request sent by a first device through a routing component defined in an entry point contract; wherein the access point contracts also define resource client contracts and cross-link bridge contracts.
In one possible implementation, the execution unit 1402 is further configured to:
after detecting that the cross-link transaction request carries a target cross-link operation message associated with one resource operation message, transmitting the one resource operation message and the target cross-link operation message to a cross-link bridge contract defined in the access point contract through a routing component defined in the access point contract;
Checking one resource operation message and a target cross-link operation message through the cross-link bridge contract, and transmitting the one resource operation message to a resource client contract defined in the entry point contract after the check is confirmed to be passed;
the lock processing is performed on the resource information associated with one resource operation message by the resource client contract.
In one possible implementation, the execution unit 1402 is specifically configured to:
determining corresponding cross-link transaction information based on a resource operation message and a target cross-link operation message;
and checking and processing the cross-link transaction request based on the checking rules configured in the cross-link bridge contract.
In one possible implementation, the execution unit 1402 is further configured to:
after checking a resource operation message and a target cross-link operation message through the cross-link bridge contract, if the check is determined not to pass, the prompt information of the cross-link transaction execution failure is fed back to the first equipment.
In one possible implementation, the execution unit 1402 is further configured to:
if the cross-link transaction request is detected not to carry the cross-link operation message associated with one resource operation message, executing locking processing on the resource information associated with the one resource operation message through the resource client contract defined in the entry point contract.
In one possible implementation, the execution unit 1402 is specifically configured to:
and determining a resource client address based on one resource operation message, and transferring the resource information in the resource client address, which needs to be subjected to cross-chain transaction, to the resource client contract of the entry point contract for locking.
Based on the same inventive concept, the embodiment of the application also provides another cross-chain transaction processing device which is applied to the first equipment; as shown in fig. 15, the cross-chain transaction processing apparatus 1500 includes: a storage unit 1501, a generation unit 1502, and a transmission unit 1503; wherein:
a storage unit 1501, configured to store the received resource operation message and the cross-link operation message into a memory pool; the resource operation message indicates resource locking, and the cross-chain operation message indicates cross-chain transaction on the locked resource;
a generating unit 1502, configured to generate a cross-link transaction request based on N resource operation messages and M cross-link operation messages stored in a memory pool; wherein N and M are positive integers;
a sending unit 1503 is configured to send a cross-chain transaction request to the first blockchain.
In one possible implementation, the sending unit 1503 is specifically configured to:
a cross-chain transaction request is sent to a routing component defined in an entry point contract of a first blockchain.
It should be noted that although several units (or modules) of the apparatus are mentioned in the above detailed description, this division is merely exemplary and not mandatory. Indeed, the features and functions of two or more units (or modules) described above may be embodied in one unit (or module) in accordance with embodiments of the application. Conversely, the features and functions of one unit (or module) described above may be further divided into a plurality of units (or modules) to be embodied. Of course, in implementing the present application, the functions of each unit (or module) may be implemented in the same piece or pieces of software or hardware.
Having described the method and apparatus for processing cross-chain transactions of exemplary embodiments of the present application, another exemplary embodiment computing device of the present application is described next.
Those skilled in the art will appreciate that the various aspects of the application may be implemented as a system, method, or program product. Accordingly, aspects of the application may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
In one possible implementation, a computing device provided by an embodiment of the present application may include at least a processor and a memory. The memory stores program code that, when executed by the processor, causes the processor to perform any of the steps of the cross-chain transaction processing methods of various exemplary embodiments of the present application.
In this embodiment, the architecture of the computing device may include a memory 1601, a communication module 1603, and one or more processors 1602 as shown in fig. 16.
A memory 1601 for storing a computer program executed by the processor 1602. The memory 1601 may mainly include a stored program area and a stored data area.
The memory 1601 may be a volatile memory (RAM) such as a random-access memory (RAM); the memory 1601 may also be a nonvolatile memory (non-volatile memory), such as a read-only memory, a flash memory (flash memory), a hard disk (HDD) or a Solid State Drive (SSD); or memory 1601, is any other medium that can be used to carry or store a desired computer program in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto. The memory 1601 may be a combination of the above memories.
The processor 1602 may include one or more central processing units (central processing unit, CPU) or digital processing units, or the like. A processor 1602 for implementing the above-described cross-chain transaction processing method when invoking a computer program stored in memory 1601.
The communication module 1603 is used for communication with terminal devices and other servers.
The specific connection medium between the memory 1601, the communication module 1603, and the processor 1602 is not limited in the embodiment of the present application. The embodiment of the present application is illustrated in fig. 16 by a bus 1604 between the memory 1601 and the processor 1602, where the bus 1604 is illustrated in bold in fig. 16, and the connection between other components is merely illustrative and not limiting. The bus 1604 may be divided into an address bus, a data bus, a control bus, and the like. For ease of description, only one thick line is depicted in fig. 16, but only one bus or one type of bus is not depicted.
The memory 1601 has stored therein a computer storage medium having stored therein computer executable instructions for implementing the cross-chain transaction processing method of an embodiment of the present application. The processor 1602 is configured to perform the cross-chain transaction processing method described above.
In some possible implementations, aspects of the present application provided for a method of processing a cross-chain transaction may also be implemented in the form of a program product comprising program code for causing a computing device to perform the steps of the method of processing a cross-chain transaction according to various exemplary embodiments of the application as described herein above when the program product is run on the computing device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is 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 would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product of the cross-chain transaction processing of embodiments of the present application may employ a portable compact disc read only memory (CD-ROM) and include program code and may run on a computing device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with a command execution system, apparatus, or device.
The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with a command execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present application may be written 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 equipment, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program commands may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable cross-chain transaction processing device to produce a machine, such that the commands executed by the processor of the computer or other programmable cross-chain transaction processing device produce means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program commands may also be stored in a computer readable memory that can direct a computer or other programmable cross-chain transaction processing device to function in a particular manner, such that the commands stored in the computer readable memory produce an article of manufacture including command means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable cross-chain transaction processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer implemented process such that the instructions which execute on the computer or other programmable device provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (14)

1. A method of cross-chain transaction processing applied to a first blockchain, the method comprising:
receiving a cross-link transaction request sent by first equipment; the method comprises the steps that N resource operation messages and M cross-link operation messages are carried in a cross-link transaction request, the resource operation messages indicate resource locking, and the cross-link operation messages indicate cross-link transactions on locked resources; the N and the M are positive integers;
for the N resource operation messages, respectively executing the following operations: after detecting that the cross-link transaction request carries a target cross-link operation message associated with one resource operation message and determining that a resource designated by the one resource operation message is locked, generating a cross-link transaction message event corresponding to the one resource operation message, and transmitting the cross-link transaction message event to a second blockchain through a cross-link relay.
2. The method of claim 1, wherein the receiving the cross-chain transaction request sent by the first device comprises:
receiving a cross-link transaction request sent by the first device through a routing component defined in an entry point contract; wherein the access point contracts also define resource client contracts and cross-link bridge contracts.
3. The method of claim 1, wherein after detecting that the cross-chain transaction request carries a target cross-chain operation message associated with one resource operation message, before determining that a resource specified by the one resource operation message is locked, further comprising:
transmitting the one resource operation message, and the target cross-link operation message, to a cross-link bridge contract defined in the ingress point contract through a routing component defined in the ingress point contract;
performing verification processing on the one resource operation message and the target cross-link operation message through the cross-link bridge contract, and transmitting the one resource operation message to a resource client contract defined in the entry point contract after the verification is determined to be passed;
and executing locking processing on the resource information associated with the one resource operation message through the resource client contract.
4. The method of claim 3, wherein the verifying the one resource operation message and the target cross-chain operation message comprises:
determining corresponding cross-link transaction information based on the one resource operation message and the target cross-link operation message;
and checking and processing the cross-link transaction request based on the checking rules configured in the cross-link bridge contract.
5. The method of claim 3, wherein after the verifying the one resource operation message and the target cross-link operation message by the cross-link bridge contract, further comprising:
if the verification is not passed, the prompt information of failure in executing the cross-chain transaction is fed back to the first equipment.
6. The method of claim 1, wherein the method further comprises:
and if the cross-link transaction request is detected to not carry the cross-link operation message associated with the one resource operation message, executing locking processing on the resource information associated with the one resource operation message through a resource client contract defined in an entry point contract.
7. The method according to claim 3 or 6, wherein said performing a lock process on resource information associated with said one resource operation message comprises:
And determining a resource client address based on the resource operation message, and transferring the resource information needing to be subjected to cross-chain transaction in the resource client address to a resource client contract of an entry point contract for locking.
8. A method of processing a cross-chain transaction, applied to a first device, the method comprising:
storing the received resource operation message and the received cross-link operation message into a memory pool; the resource operation message indicates resource locking, and the cross-chain operation message indicates cross-chain transaction on the locked resource;
generating a cross-link transaction request based on the N resource operation messages and the M cross-link operation messages stored in the memory pool; wherein, the N and the M are positive integers;
the cross-chain transaction request is sent to a first blockchain.
9. The method of claim 8, wherein the sending the cross-chain transaction request to a first blockchain comprises:
the cross-chain transaction request is sent to a routing component defined in an entry point contract of the first blockchain.
10. A cross-chain transaction processing device for application to a first blockchain, the device comprising:
The receiving unit is used for receiving a cross-link transaction request sent by the first equipment; the method comprises the steps that N resource operation messages and M cross-link operation messages are carried in a cross-link transaction request, the resource operation messages indicate resource locking, and the cross-link operation messages indicate cross-link transactions on locked resources; the N and the M are positive integers;
the execution unit is used for executing the following operations respectively for the N resource operation messages: after detecting that the cross-link transaction request carries a target cross-link operation message associated with one resource operation message and determining that the resource designated by the one resource operation message is locked, generating a cross-link transaction message event corresponding to the one resource operation message, and transmitting the cross-link transaction message event to a second area cross-link through a cross-link relay.
11. A cross-chain transaction processing apparatus for use with a first device, the apparatus comprising:
the storage unit is used for storing the received resource operation message and the received cross-link operation message into the memory pool; the resource operation message indicates resource locking, and the cross-chain operation message indicates cross-chain transaction on the locked resource;
The generation unit is used for generating a cross-link transaction request based on N resource operation messages and M cross-link operation messages stored in the memory pool; wherein, N and M are positive integers;
and the sending unit is used for sending the cross-chain transaction request to the first blockchain.
12. A computing device, the computing device comprising: a processor and a memory, wherein:
the memory is used for storing a computer program;
the processor being adapted to execute the computer program, to carry out the method of any one of claims 1 to 7, or to carry out the method of any one of claims 8 to 9.
13. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when executed by a processor, implements the method of any one of claims 1-7 or implements the method of any one of claims 8-9.
14. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1 to 7 or implements the method of any one of claims 8 to 9.
CN202310603081.3A 2023-05-24 2023-05-24 Cross-chain transaction processing method, device, equipment and storage medium Pending CN116957568A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310603081.3A CN116957568A (en) 2023-05-24 2023-05-24 Cross-chain transaction processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310603081.3A CN116957568A (en) 2023-05-24 2023-05-24 Cross-chain transaction processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116957568A true CN116957568A (en) 2023-10-27

Family

ID=88460908

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310603081.3A Pending CN116957568A (en) 2023-05-24 2023-05-24 Cross-chain transaction processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116957568A (en)

Similar Documents

Publication Publication Date Title
EP3769490B1 (en) Implementing a blockchain-based web service
CN108665372B (en) Information processing, inquiring and storing method and device based on block chain
CN111382168B (en) Node group creating method and node group-based transaction method in alliance chain network
CN111444273B (en) Data authorization method and device based on block chain
CN111066047A (en) Implementing a blockchain based workflow
CN114567643B (en) Cross-blockchain data transfer method, device and related equipment
CN110910000A (en) Block chain asset management method and device
WO2022003436A1 (en) Permissioned eventing in a decentralized database
CN113689216A (en) Cross-chain transaction processing method and device, equipment, storage medium and program product
CN113328854B (en) Service processing method and system based on block chain
CN116777631B (en) Transaction uplink method and device based on blockchain, equipment and medium
WO2023005500A1 (en) Cross-chain transaction processing method and apparatus, electronic device, and storage medium
CN113362064B (en) Multiple signature method, computer device, and storage medium
CN116957568A (en) Cross-chain transaction processing method, device, equipment and storage medium
CN116781269A (en) Block chain-based data processing method, device, equipment, medium and product
CN114301912A (en) Information interaction method and device based on block chain
CN112926981A (en) Transaction information processing method, device and medium for block chain and electronic equipment
CN113672988A (en) Block chain-based information management method, system, medium, and electronic device
CN117040766B (en) Block chain-based data processing method, device, equipment and readable storage medium
CN116708463B (en) Information processing method, device, equipment and medium based on multi-block chain
CN114978526B (en) Block chain data transmission method, device, equipment and readable storage medium
CN117056084B (en) Data processing method, device, equipment and medium based on hierarchical blockchain network
CN116566698B (en) Secret-related data exchange method and system based on multistage cross-network isolation
CN117294753A (en) Block chain-based data processing method, equipment and readable storage medium
CN116795924A (en) Block chain-based data sharing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication