Method suitable for efficient cross-chain transmission of various types of block chain tokens

By deploying cross-chain gateways and multiple oracles that are adapted to different token standards, combining high-performance side chains and state channels, and adopting a reputation-based election verification mechanism, the scalability and security of cross-chain transactions in the existing technology are solved. and performance issues, achieving efficient cross-chain transmission and security verification of various types of blockchain tokens.

CN118921158AInactive Publication Date: 2024-11-08HAINAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410827067.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-11-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing cross-chain transaction mechanism cannot meet the growing transaction needs of users in terms of scalability, security and performance, especially when dealing with cross-chain transactions of multiple types of blockchain tokens, there are lengthy waiting times and standards. Different cross-chain bridge obstacles.

Method used

By deploying cross-chain gateways that are adapted to different token standards, and combining multiple oracles and validators to forward cross-chain messages and verify cross-chain transactions, a high-performance sidechain and state channels are set up to transfer frequent transactions and verification processes to low Cost, high-performance side chain or off-chain completion, and a reputation-based election verification mechanism is adopted to control the interest game process in cross-chain transactions.

Benefits of technology

It realizes efficient cross-chain transmission of various types of blockchain tokens, improves the security and efficiency of cross-chain data transmission, optimizes time and transaction costs in the main network environment, improves verification efficiency, and supports homogeneity and Cross-chain pledge, unlock and auction transactions of non-fungible tokens.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118921158A_ABST
    Figure CN118921158A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, in particular to a method suitable for efficient cross-chain transmission of various types of block chain tokens, and the method comprises the following steps: S10, determining the token type of a to-be-transacted token, and selecting a cross-chain gateway and a verification mechanism for executing a token transaction based on the determined token type, the token type comprises homogenized tokens and non-homogenized tokens; the cross-chain gateway comprises a first cross-chain gateway and a second cross-chain gateway, the first cross-chain gateway is used for processing homogenized token transactions, and the second cross-chain gateway is used for processing non-homogenized token transactions; and S20, the selected cross-chain gateway executes the cross-chain transaction based on the corresponding verification mechanism. According to the invention, various types of token transactions can be realized by deploying cross-chain gateways with different standards, and the transaction security is guaranteed through different verification mechanisms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method suitable for efficient cross-chain transmission of multiple types of blockchain tokens. Background Art

[0002] With the vigorous development of the blockchain ecosystem, many blockchain tokens with different standards have emerged, resulting in a huge demand for cross-chain transactions of blockchain tokens. However, when users try to conduct cross-chain transactions, the long waiting time and cross-chain bridges with different standards become obstacles that prevent users from completing transactions. In other words, the current various cross-chain mechanisms can only meet users' cross-chain needs in one aspect, and cannot meet users' growing transaction needs in terms of scalability, security and performance. For example, the "Proxy Chain Cross-Chain Transaction Method" disclosed on pages 207-218 of the journal "Future Generat ion Computer Systems" in January 2022 uses a single relay chain to process cross-chain token transactions, which cannot support a variety of complex token cross-chain transaction scenarios. Summary of the invention

[0003] The purpose of the present invention is to provide a method suitable for efficient cross-chain transmission of various types of blockchain tokens, which can realize cross-chain transmission of various types of blockchain tokens and improve the security and efficiency of cross-chain data transmission.

[0004] In order to achieve the above object, the present invention provides the following technical solutions:

[0005] In a first aspect, the present invention provides a method for efficient cross-chain transmission of multiple types of blockchain tokens, comprising the following steps:

[0006] S10, determining the token type of the token to be traded, and selecting a cross-chain gateway and a verification mechanism for executing the token transaction based on the determined token type, wherein the token type includes a homogeneous token and a non-homogeneous token;

[0007] The cross-chain gateway includes a first cross-chain gateway and a second cross-chain gateway, the first cross-chain gateway is used to process homogeneous token transactions, and the second cross-chain gateway is used to process non-homogeneous token transactions;

[0008] S20, the selected cross-chain gateway executes the cross-chain transaction based on the corresponding verification mechanism.

[0009] In one embodiment, in S20, when the token type is a homogeneous token, the first cross-chain gateway performs cross-chain transaction processing based on the verification mechanism, including:

[0010] S201, the first cross-chain gateway located in the source chain generates a secret, and generates a hash value based on it to lock the homogeneous token to be traded, and sets the hash value and the address of the target chain as unlocking conditions, and then sends a cross-chain transaction request, which includes the target chain, transaction amount and the hash value;

[0011] S202, after the oracle monitors the cross-chain transaction request, it transmits the information that the token has been locked to the first cross-chain gateway on the target chain;

[0012] S203, after receiving the notification from the oracle, the first cross-chain gateway on the target chain uses the hash value to lock a homogeneous token of equal value;

[0013] S204, the verifier contract verifies the transaction process based on the verification mechanism of the verification threshold;

[0014] S205, after the oracle monitors the information that the first cross-chain gateway on the target chain has locked the token, it transmits a notification that the token has been locked to the first cross-chain gateway on the source chain;

[0015] S206, after receiving the notification from the oracle, the first cross-chain gateway located in the source chain discloses the secret;

[0016] S207, after obtaining the secret, the first cross-chain gateway on the target chain uses the secret to verify and unlock the locked homogeneous token on the source chain;

[0017] S208, after the oracle monitors the message that the token of the first cross-chain gateway on the target chain is successfully unlocked, it transmits a notification that the token has been successfully unlocked to the first cross-chain gateway on the source chain;

[0018] S209, the first cross-chain gateway located on the source chain unlocks and extracts the homogenous token on the target chain based on the public secret, thereby completing the transaction.

[0019] In another embodiment, in S20, when the token type is a non-fungible token, the second cross-chain gateway performs cross-chain transaction processing based on the verification mechanism, including:

[0020] S20-1, the second cross-chain gateway located in the source chain generates a secret, and generates a hash value based on it to lock the non-fungible token to be traded, and sets the hash value and the address of the target chain as unlocking conditions, and then sends a cross-chain transaction request, which includes the target chain, transaction amount and the hash value;

[0021] S20-2, after the oracle monitors the cross-chain transaction request, it broadcasts the information that the token has been locked to the target chain;

[0022] S20-3, after receiving the notification from the oracle, the second cross-chain gateway on the target chain captures the bidding behavior of each buyer;

[0023] S20-4, after the oracle monitors the second cross-chain gateway on the target chain and captures the information of the bidding behavior, it transmits the bidding notification to the second cross-chain gateway on the source chain until the bidding ends;

[0024] S20-5, bidding phase, the verifier contract verifies the transaction process based on the election verification mechanism of the reputation value;

[0025] S20-6, after receiving the notification from the oracle, the second cross-chain gateway located on the source chain discloses the secret;

[0026] S20-7, the second cross-chain gateway located on the target chain obtains the secret, and after the buyer pays the fee, uses the secret to unlock the locked non-fungible token on the source chain, and transfers the unlocked non-fungible token to the buyer's address on the target chain, thereby completing the transaction.

[0027] In a further optimized solution, the first cross-chain gateway on the target chain is replaced by the first cross-chain gateway on the side chain, and the second cross-chain gateway is replaced; the second cross-chain gateway on the target chain is replaced by the second cross-chain gateway on the side chain, and the second cross-chain gateway is replaced.

[0028] In another optimized solution, a state channel for supporting off-chain transactions is established between the cross-chain gateway of the source chain and the cross-chain gateway of the target chain, and the cross-chain transaction described in S20 is carried out within the state channel.

[0029] In the above two solutions, by setting up high-performance side chains and state channels, the process of frequent transaction sending and verification in NFT cross-chain auction transactions is transferred to low-cost, high-performance side chains or completed off-chain, thereby optimizing the problems of high time and transaction costs in the main network environment.

[0030] In a second aspect, the present invention provides a computer program product, comprising computer-readable instructions, characterized in that when the computer-readable instructions are executed by a processor, the steps of the method of the present invention for efficient cross-chain transmission of multiple types of blockchain tokens are implemented.

[0031] In a third aspect, the present invention provides a computer-readable storage medium comprising computer-readable instructions, characterized in that when the computer-readable instructions are executed by a processor, the steps of the method of the present invention for efficient cross-chain transmission of multiple types of blockchain tokens are implemented.

[0032] In a fourth aspect, the present invention provides an electronic device, comprising: a memory, storing program instructions; a processor, connected to the memory, executing the program instructions in the memory, and implementing the steps of the method of the present invention for efficient cross-chain transmission of multiple types of blockchain tokens.

[0033] Compared with the prior art, the present invention has the following technical advantages:

[0034] (1) By deploying a cross-chain gateway that adapts to different token standards and combining multiple oracles and validators to forward cross-chain messages and verify cross-chain transactions, cross-chain staking, unlocking and auction transactions of three types of tokens, namely, homogeneous tokens ERC-20, and non-homogeneous tokens ERC-721 and ERC-1155, are realized. The present invention currently only studies these three widely used tokens, but based on the concept of the present invention, it can be extended to other types of representatives.

[0035] (2) By establishing high-performance side chains and state channels, the process of NFT cross-chain auction transactions that requires frequent transaction sending and verification is transferred to low-cost, high-performance side chains or completed off-chain, thereby optimizing the problems of high time and transaction costs in the main network environment.

[0036] (3) By establishing an election verification mechanism based on reputation, the potential malicious behavior of cross-chain transaction validators is constrained by using deposits and reputation values, thereby effectively controlling the interest game process of the transaction parties in cross-chain transactions and improving verification efficiency.

[0037] For other advantages of the present invention, please refer to the relevant description in the embodiment section. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0039] Figure 1 This is an architecture diagram of a cross-chain token trading system used as an example in an embodiment of the present invention.

[0040] Figure 2 This is a flow chart of a method for efficient cross-chain transmission of multiple types of blockchain tokens provided in an embodiment.

[0041] Figure 3 This is a comparison of the verification efficiency between the election verification mechanism based on reputation value and the verification mechanism based on verification threshold.

[0042] Figure 4This is a detailed processing flow chart of step S20 when homogenizing tokens in the embodiment.

[0043] Figure 5 This is a detailed processing flow chart of step S20 for non-fungible tokens in the embodiment.

[0044] Figure 6 It is a block diagram of the composition of the electronic device provided in the embodiment. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0046] See also Figure 1 , this embodiment provides a cross-chain token trading system, including a source chain, a target chain, a side chain, a cross-chain gateway and an oracle.

[0047] The source chain is the blockchain where the transaction initiator is located. The side chain is anchored to the target chain. The side chain is used to process cross-chain transaction requests and perform specific asset transfer verification operations. Different cross-chain transaction verification tasks are performed according to different verification mechanisms. In other words, the process of frequently sending transactions and verifications in NFT cross-chain auction transactions can be transferred to low-cost, high-performance side chains or completed off-chain, thereby optimizing the time and high transaction cost issues in the main network environment.

[0048] The source chain, target chain, and side chain are all equipped with cross-chain gateways (defined as token pools in the target chain in the figure), and the cross-chain gateways include the first cross-chain gateway and the second cross-chain gateway. The first cross-chain gateway is used to process homogeneous token transactions, and the second cross-chain gateway is used to process non-homogeneous token transactions. In other words, by deploying cross-chain gateways that adapt to different token standards, cross-chain transactions of various types of tokens can be realized.

[0049] Set the blockchain network identifier and supported token types, including ERC-20 (representing fungible assets), ERC-721 (representing non-fungible assets, i.e. NFT), and ERC-1155 (a multi-token standard that supports a mix of fungible and non-fungible assets). After the user deposits the token, the user can obtain the type and quantity of the token deposited by the user, as well as information such as the source chain and the target chain.

[0050] The oracle is used to receive and forward information related to cross-chain communication and to establish an asset mapping between the target chain and the source chain.

[0051] A state channel for supporting off-chain transactions is established between the cross-chain gateway of the source chain and the cross-chain gateway of the target chain. Batch transaction verification and token transfer are completed by opening and closing the state channel. Transactions are conducted by creating a state channel for direct communication between the two parties outside the blockchain, and the details of off-chain transactions and verification are shielded from users. For users, they only need to submit a token transfer application in the cross-chain gateway on the source chain of blockchain A, and then wait for the cross-chain gateway on the target chain of blockchain B to release the corresponding tokens; in the process, the cross-chain gateways in blockchains A and B will make corresponding off-chain transaction records in the state channel and notify users that the transaction has been completed, so that cross-chain transactions can be completed according to customized requirements or maximum transaction conditions, greatly improving the flexibility and scalability of the system.

[0052] The source chain cross-chain gateway, target chain cross-chain gateway, side chain cross-chain gateway, and state channel are pre-configured, including channel capacity and security protocols. Channel capacity refers to the maximum amount or quantity that can be traded in the state channel. A larger channel capacity can support more transactions and larger-scale capital flows, but it may also increase the risk of capital lock-up. In this cross-chain token trading system, the configuration can support a channel capacity of about 100TPS.

[0053] The above-mentioned cross-chain token trading system can realize efficient cross-chain transmission of various types of blockchain tokens by deploying cross-chain gateways that adapt to different token standards and combining multiple oracles and validators to forward cross-chain messages and verify cross-chain transactions.

[0054] See also Figure 2 Based on the above cross-chain token trading system, a method for efficient cross-chain transmission of multiple types of blockchain tokens is implemented, including the following steps:

[0055] S10, determining the token type of the token to be traded, and selecting a cross-chain gateway and verification mechanism for executing the token transaction based on the determined token type, wherein the token type includes homogeneous tokens and non-homogeneous tokens.

[0056] Among them, the first cross-chain gateway is used to process homogeneous token transactions, and the second cross-chain gateway is used to process non-homogeneous token transactions.

[0057] The verification mechanism includes a verification mechanism based on verification threshold and an election verification mechanism based on reputation value. After experimental verification, the verification mechanism based on verification threshold is suitable for the verification of homogeneous token transactions, and the election verification mechanism based on reputation value is more suitable for the verification of non-homogeneous token transactions. Figure 3 As shown in the figure, for the verification of non-fungible token transactions, the election verification mechanism based on reputation value is more efficient and saves time compared to the verification mechanism based on verification threshold.

[0058] S20, the selected cross-chain gateway executes the cross-chain transaction based on the corresponding verification mechanism.

[0059] See also Figure 4 Specifically, when the token type is a homogeneous token, in S20, the first cross-chain gateway performs cross-chain transaction processing based on the verification mechanism, including:

[0060] S201, the first cross-chain gateway located in the source chain generates a secret and generates a hash value based on it. The hash value will be used as a locking mechanism for the transaction to ensure that only participants who know the secret can complete the transaction, that is, the hash value and the address of the target chain are set as unlocking conditions to ensure the security of the cross-chain transaction. Then a cross-chain transaction request is sent, which includes the target chain, token type, transaction amount and the hash value.

[0061] A secret can refer to a key or password, which generates a hash value through a one-way hash function SHA-256 (Secure Hash Algorithm 256-bit). The cross-chain gateway on the source chain locks the token on the source chain and sets the hash value and the address of the target chain as the unlocking conditions.

[0062] S202, the oracle monitors the cross-chain transaction request and transmits the information that the token has been locked to the target chain.

[0063] The oracle performs monitoring operations at the set frequency. When a cross-chain transaction request is monitored, it parses the cross-chain transaction request to obtain the target chain, and then transmits the information that the token has been locked to the target chain.

[0064] S203, after receiving the notification from the oracle, the first cross-chain gateway on the target chain locks tokens of equal value, using the hash value as the locking condition.

[0065] S204, the verifier contract adopts a threshold-based verification mechanism to verify the transaction process.

[0066] Specifically, first, for the signatories who have voted in favor, the voted weights are counted.

[0067] In this step, for the signer who has voted in favor, first use ecrecover to restore the signer address based on the hash value and signature, where signer = ecrecover (hash, v[i], r[i], s[i]), where signer represents the signer address, hash represents the hash value, and v[i], r[i], s[i] are the signer's signatures. Then verify whether the signer is one of the specified multiple validators, that is, verify whether signer = validators [signer index [i]] is true. If true, update the voted power, where votedPower = votedPower + powers [signer index [i]]. votedPower represents the counted voted power. Repeat this step until all signers who have voted in favor have been verified.

[0068] Then, it is determined whether the voted weight reaches the set threshold. If so, the verification is passed, otherwise the verification fails. In implementation, it is determined whether votedPower×thres_denom≥Power×threshold_num is established. If so, the verification is passed, otherwise the verification fails. Power represents the total weight, threshold_num represents the threshold denominator, and threshold_denom represents the threshold numerator.

[0069] For example, suppose there are three validators participating in the verification, and the weight of each validator is 1. The transaction threshold is set to 2 / 3, that is, at least 2 validators must agree to pass the transaction verification. If both validators A and B sign and vote for the transaction, the transaction passes the verification; if only A or B signs and votes for it, the transaction will not pass the verification; if validators A, B, and C all sign and vote for the transaction, the transaction also passes the verification. Such a verification process can ensure the security and reliability of the transaction and prevent malicious behavior of a single validator.

[0070] S205, after the oracle monitors the information that the first cross-chain gateway on the target chain has locked the token, it transmits a notification that the token has been locked to the first cross-chain gateway on the source chain.

[0071] S206, after receiving the notification from the oracle, the first cross-chain gateway located on the source chain discloses the previously generated secret to unlock the locked tokens on the target chain.

[0072] S207, after the first cross-chain gateway located on the target chain obtains the secret, it uses the secret to verify and unlock the locked homogeneous token on the source chain.

[0073] S208, after the oracle monitors the message that the token of the first cross-chain gateway on the target chain is successfully unlocked, it transmits a notification that the token has been successfully unlocked to the first cross-chain gateway on the source chain.

[0074] S209, the first cross-chain gateway located on the source chain unlocks and extracts the homogenous token on the target chain based on the public secret, thereby completing the transaction.

[0075] If the first cross-chain gateway of the target chain does not lock the tokens within the specified time, the first cross-chain gateway on the source chain has the right to cancel the transaction and recover the locked tokens.

[0076] See also Figure 5 Specifically, when the token type is a non-fungible token, in S20, the second cross-chain gateway performs cross-chain transaction processing based on the verification mechanism, including:

[0077] S20-1, the second cross-chain gateway located in the source chain generates a secret, and generates a hash value based on it to lock the non-fungible token to be traded, and sets the hash value and the address of the target chain as unlocking conditions, and then sends a cross-chain transaction request, which includes the target chain, transaction amount and the hash value.

[0078] When the transaction initiator (such as an artist or NFT holder) decides to auction his NFT on a different blockchain network, the initiator uploads the NFT information and auction details to the second cross-chain gateway and generates a unique hash value as the transaction identifier. Only this unique hash value can unlock the locked tokens.

[0079] S20-2, after the oracle monitors the cross-chain transaction request, it broadcasts the information that the token has been locked to the target chain.

[0080] The oracle broadcasts the locked status of the NFT to the target blockchain to notify potential buyers that the auction has begun.

[0081] S20-3, after receiving the notification from the oracle, the second cross-chain gateway on the target chain captures the bidding behavior of each buyer.

[0082] S20-4, after the oracle monitors the second cross-chain gateway on the target chain and captures the information of the bidding behavior, it transmits the bidding notification to the second cross-chain gateway on the source chain until the bidding ends.

[0083] During the bidding phase, potential buyers bid on the target blockchain. All bidding behaviors are captured by the second cross-chain gateway on the target chain and fed back to the source chain in real time through the oracle to ensure that the initiator can monitor the auction status.

[0084] S20-5, bidding stage, the verifier contract verifies the transaction process based on the election verification mechanism of the reputation value.

[0085] Specifically, first, according to the amount of the deposit, the reputation value of each validator among multiple validators is mapped within the range of 90 to 100 using the following formula: Reputation value = (deposit - minimum deposit) / deposit range * (reputation difference) + minimum reputation value; the minimum reputation value here is 90, and the reputation difference is the fluctuation range of the reputation value, which is 10 (100-90) here.

[0086] Then determine the two validators with the lowest and second lowest deposits and their deposits;

[0087] Then the average reputation value of multiple validators is calculated, and the validator whose reputation value exceeds the average reputation value is selected as the representative of this verification.

[0088] Assume that there are 5 validators participating in the representative election, represented by A, B, C, D, and E. First, the initial reputation value of each validator is set to 0. The system requires the validator to pay a deposit of 90 to 110 in advance before participating in the subsequent verification process. Assume that in the process of electing representatives, the fees of each validator are as follows: 100, 80, 120, 90, 110; their corresponding reputation values ​​are: 90, 92, 95, 96, 98. First, find the two validators with the lowest and second lowest fees: the lowest fee is B (fee: 80), and the second lowest fee is D (fee: 90). Then calculate the average reputation value to be 94.2, update the second lowest fee to 90, and the corresponding validator is D. According to the rules of representative election, D's reputation value is 96, which exceeds the average reputation value, so he is elected as the verification representative of this process.

[0089] It should be noted that when multiple validators are selected after executing the above operation once, the multiple validators are selected again according to the above method, and finally one validator is selected to perform the transaction process verification operation.

[0090] Finally, the selected verification represents the execution of the transaction process verification operation. If the transaction is approved, the verification passes, otherwise the verification fails.

[0091] S20-6, after receiving the notification from the oracle, the second cross-chain gateway located on the source chain discloses the secret.

[0092] S20-7, the second cross-chain gateway located on the target chain obtains the secret, and after the buyer pays the fee, uses the secret to unlock the locked non-fungible token on the source chain, and transfers the unlocked non-fungible token to the buyer's address on the target chain, thereby completing the transaction.

[0093] If any abnormal situation occurs during the auction process, such as the highest bidder failing to complete the transaction, the oracle and the second cross-chain gateway will intervene to ensure that the initiator can withdraw the NFT or take other remedial measures according to the predetermined rules.

[0094] Since a state channel for supporting off-chain transactions is established between the cross-chain gateway of the source chain and the cross-chain gateway of the target chain, cross-chain transaction verification and token transfer can be completed by opening the state channel, and batch transaction verification and transfer can also be completed, thereby improving transaction efficiency. After the state channel is opened, the cross-chain transaction participants execute off-chain transactions in the state channel, providing efficient services for cross-chain asset transfers, and accumulating off-chain transaction data in the process, which can be recorded as T offchain . Participants need to accumulate off-chain transaction data T offchain Preprocessing is performed to meet the needs of on-chain confirmation. The preprocessed transaction data set of all participants can be expressed as T processed . The purpose of preprocessing is to organize off-chain transaction data into a format suitable for submission to the chain for confirmation. Suppose there are two participants, A and B, who conduct a series of off-chain transactions in the state channel. First, the two participants each collect all the off-chain transaction data conducted in the state channel, including transaction type, participant address, transaction amount, contract call parameters and other information; then, in the order of transaction initiator, transaction recipient, transaction token type, token quantity, contract call, timestamp, transaction hash value and digital signature, the transaction data is integrated into JSON format to facilitate subsequent confirmation and processing.

[0095] When the cross-chain transaction system needs to optimize or update the state channel, it initiates the on-chain confirmation task and confirms the status of the channel based on the T submitted by all participants. processed Generate a global state snapshot S global . Global state snapshot S global It is a summary of all local state channels, including the final state of all participants' off-chain transactions. The accuracy of the global state snapshot is equal to the most accurate transaction record in all state channels, ensuring the accuracy and reliability of the global state. The global state snapshot represents the summary of the final state of all participants' off-chain transactions, which can be a list or table containing each participant's account balance, contract status, and other relevant information.

[0096] As an example, suppose there are two participants, A and B, who conduct a series of transactions through the state channel, including the transfer of digital assets, signing of contracts, or other operations. Each participant will maintain a state channel locally, recording all transactions with the other party. Now, when the state channel needs to be optimized or updated, the system will initiate an on-chain confirmation task and require all participants to submit the latest status of their local state channels. Once all participants have submitted the latest status of their local state channels, the system will aggregate these states to generate a global state snapshot.

[0097] The cross-chain transaction system can also automatically issue incentive rewards and re-evaluate the reputation value of each component providing cross-chain services based on the transaction results, or punish potential malicious behavior to guide the subsequent practice of cross-chain transactions.

[0098] like Figure 6 As shown, this embodiment also provides an electronic device, which may include a processor 41 and a memory 42, wherein the memory 42 is coupled to the processor 41. It is worth noting that this figure is exemplary, and other types of structures may be used to supplement or replace this structure to achieve data extraction, report generation, communication or other functions.

[0099] like Figure 6 As shown, the electronic device may further include: an input unit 43, a display unit 44 and a power supply 45. It is worth noting that the electronic device does not necessarily have to include Figure 6 In addition, electronic devices may also include Figure 6 For components not shown, reference may be made to the prior art.

[0100] The processor 41 is sometimes also called a controller or an operation control, and may include a microprocessor or other processor devices and / or logic devices. The processor 41 receives inputs and controls the operations of various components of the electronic device.

[0101] The memory 42 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices, and may store information such as configuration information of the processor 41 and instructions executed by the processor 41. The processor 41 may execute the program stored in the memory 42 to implement information storage or processing. In one embodiment, the memory 42 also includes a buffer memory, i.e., a buffer, to store intermediate information.

[0102] An embodiment of the present invention further provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed in an electronic device, the program product enables the electronic device to execute the operation steps included in the method of the present invention.

[0103] An embodiment of the present invention further provides a storage medium storing computer-readable instructions, wherein the computer-readable instructions enable an electronic device to execute the operation steps included in the method of the present invention.

[0104] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0105] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-On l yMemory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0106] The above-described embodiments are only specific implementations of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications, replacements and improvements within the technical scope disclosed by the present invention, and these modifications, replacements and improvements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for efficient cross-chain transmission of multiple types of blockchain tokens, characterized in that: The following steps are involved: S10, determining the token type of the token to be traded, and selecting a cross-chain gateway and a verification mechanism for executing the token transaction based on the determined token type, wherein the token type includes a homogeneous token and a non-homogeneous token; The cross-chain gateway includes a first cross-chain gateway and a second cross-chain gateway, the first cross-chain gateway is used to process homogeneous token transactions, and the second cross-chain gateway is used to process non-homogeneous token transactions; S20, the selected cross-chain gateway executes the cross-chain transaction based on the corresponding verification mechanism.

2. The method for efficient cross-chain transmission of multiple types of blockchain tokens according to claim 1, characterized in that: In S20, when the token type is a homogeneous token, the first cross-chain gateway performs cross-chain transaction processing based on the verification mechanism, including: S201, the first cross-chain gateway located in the source chain generates a secret, and generates a hash value based on it to lock the homogeneous token to be traded, and sets the hash value and the address of the target chain as unlocking conditions, and then sends a cross-chain transaction request, which includes the target chain, transaction amount and the hash value; S202, after the oracle monitors the cross-chain transaction request, it transmits the information that the token has been locked to the first cross-chain gateway on the target chain; S203, after receiving the notification from the oracle, the first cross-chain gateway on the target chain uses the hash value to lock a homogeneous token of equal value; S204, the verifier contract verifies the transaction process based on the verification mechanism of the verification threshold; S205, after the oracle monitors the information that the first cross-chain gateway on the target chain has locked the token, it transmits a notification that the token has been locked to the first cross-chain gateway on the source chain; S206, after receiving the notification from the oracle, the first cross-chain gateway located in the source chain discloses the secret; S207, after obtaining the secret, the first cross-chain gateway on the target chain uses the secret to verify and unlock the locked homogeneous token on the source chain; S208, after the oracle monitors the message that the token of the first cross-chain gateway on the target chain is successfully unlocked, it transmits a notification that the token has been successfully unlocked to the first cross-chain gateway on the source chain; S209, the first cross-chain gateway located on the source chain unlocks and extracts the homogenous token on the target chain based on the public secret, thereby completing the transaction.

3. The method for efficient cross-chain transmission of multiple types of blockchain tokens according to claim 2 is characterized in that: In S202, the process of verifying the transaction process based on the verification mechanism of the verification threshold includes: For signatories who have voted in favor, the voted weights are counted; Determine whether the voted weight has reached the set threshold. If so, the verification passes, otherwise the verification fails.

4. The method for efficient cross-chain transmission of multiple types of blockchain tokens according to claim 1, characterized in that: In S20, when the token type is a non-fungible token, the second cross-chain gateway performs cross-chain transaction processing based on the verification mechanism, including: S20-1, the second cross-chain gateway located in the source chain generates a secret, and generates a hash value based on it to lock the non-fungible token to be traded, and sets the hash value and the address of the target chain as unlocking conditions, and then sends a cross-chain transaction request, which includes the target chain, transaction amount and the hash value; S20-2, after the oracle monitors the cross-chain transaction request, it broadcasts the information that the token has been locked to the target chain; S20-3, after receiving the notification from the oracle, the second cross-chain gateway on the target chain captures the bidding behavior of each buyer; S20-4, after the oracle monitors the second cross-chain gateway on the target chain and captures the information of the bidding behavior, it transmits the bidding notification to the second cross-chain gateway on the source chain until the bidding ends; S20-5, bidding phase, the verifier contract verifies the transaction process based on the election verification mechanism of the reputation value; S20-6, after receiving the notification from the oracle, the second cross-chain gateway located on the source chain discloses the secret; S20-7, the second cross-chain gateway located on the target chain obtains the secret, and after the buyer pays the fee, uses the secret to unlock the locked non-fungible token on the source chain, and transfers the unlocked non-fungible token to the buyer's address on the target chain, thereby completing the transaction.

5. The method for efficient cross-chain transmission of multiple types of blockchain tokens according to claim 4 is characterized in that: In S20-5, the process of verifying the transaction process based on the reputation value election verification mechanism includes: According to the amount of the deposit, the reputation value of each validator in the multiple validators is mapped in the range of 90 to 100 using the following formula: Reputation value = (deposit - minimum deposit) / deposit range * (reputation difference) + minimum reputation value; Determine the two validators with the lowest and second lowest deposits and their deposits; Calculate the average reputation of multiple validators and select the validator with a reputation value exceeding the average reputation value as the representative for this verification; The selected verification represents the execution of the transaction process verification operation. If you agree to the transaction, the verification passes, otherwise the verification fails.

6. The method for efficient cross-chain transmission of multiple types of blockchain tokens according to claim 2 or 4, characterized in that: The first cross-chain gateway on the target chain is replaced by the first cross-chain gateway on the side chain, and the second cross-chain gateway is replaced; The second cross-chain gateway on the target chain is replaced by the second cross-chain gateway on the side chain.

7. The method for efficient cross-chain transmission of multiple types of blockchain tokens according to claim 1, characterized in that: A state channel for supporting off-chain transactions is established between the cross-chain gateway of the source chain and the cross-chain gateway of the target chain, and the cross-chain transaction described in S20 is carried out within the state channel.

8. A computer program product comprising computer readable instructions, characterized in that: When the computer-readable instructions are executed by the processor, the steps in the method for efficient cross-chain transmission of multiple types of blockchain tokens described in any one of claims 1 to 7 are implemented.

9. A computer-readable storage medium comprising computer-readable instructions, characterized in that: When the computer-readable instructions are executed by the processor, the steps in the method for efficient cross-chain transmission of multiple types of blockchain tokens described in any one of claims 1 to 7 are implemented.

10. An electronic device, characterized in that: include: Memory, which stores program instructions; A processor is connected to the memory and executes program instructions in the memory to implement the steps of the method for efficient cross-chain transmission of multiple types of blockchain tokens as described in any one of claims 1 to 7.