Cross-chain nft asset circulation method and device based on relay chain consensus algorithm, electronic device and storage medium
By using multi-level dynamic verification based on the relay chain consensus algorithm and a cross-chain graph model, parallel processing of cross-chain transactions is achieved, solving the problems of low security, low efficiency, and long transaction latency in existing technologies, and improving the processing efficiency and system reliability of cross-chain transactions.
Patent Information
- Application Number
- CN202510014301.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2045-01-06
AI Technical Summary
Existing cross-chain transactions suffer from low security, low efficiency, and long latency, which are particularly prominent in high-frequency transactions such as NFTs and large-scale user interaction scenarios.
This paper adopts a cross-chain NFT asset transfer method based on a relay chain consensus algorithm. Through a multi-level dynamic verification mechanism and a cross-chain graph model, it achieves parallel processing of cross-chain transactions. The multi-level dynamic verification divides the verification process of cross-chain operations into multiple levels, each executed in parallel on different blockchains or relay chains. Initial verification uses a lightweight mechanism to quickly determine the validity of the transaction, while progressive and extended verification further confirm the accuracy of the transaction. The cross-chain graph model treats multiple blockchains as a graph structure, using a graph aggregation algorithm to achieve parallel processing of cross-chain transactions and consensus processes.
It significantly improves the processing efficiency and system reliability of cross-chain transactions, increases transaction throughput and scalability, reduces transaction latency, and ensures efficient collaboration and consistency in cross-chain transactions.
Smart Images

Figure CN120125230B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of blockchains, in particular, to a cross-chain NFT asset circulation method and device based on a relay chain consensus algorithm, an electronic device and a storage medium. BACKGROUND
[0002] Cross-chain technology refers to the technology for communication and interaction between different blockchains, which allows assets and data to be transferred between different blockchain networks, thereby realizing the interconnection of different blockchain ecosystems. Existing cross-chain technologies have the following technical problems:
[0003] Trust and security issues in cross-chain transactions: existing cross-chain technologies rely on centralized or trusted intermediaries such as cross-chain bridges and sidechains, which to some extent increases the potential attack surface of the system. For example, malicious attackers may exploit vulnerabilities in intermediaries to compromise the security of cross-chain data exchange. In addition, due to the lack of efficient interoperability between different blockchains, cross-chain transactions may be affected by their respective consensus mechanisms, leading to security issues during execution. The execution security of smart contracts is also a major problem in current technologies, especially in complex cross-chain environments, how to ensure the integrity of contract execution and data privacy becomes a problem to be solved.
[0004] Efficiency bottleneck of existing blockchain consensus mechanisms: many current cross-chain technologies still rely on the consensus mechanism of a single blockchain platform for cross-chain transactions and verification. However, the throughput and transaction processing capacity of a blockchain is limited by its consensus algorithm, and as the transaction volume increases, the processing speed decreases dramatically, and the verification process of cross-chain transactions requires multiple steps such as data verification, consensus confirmation and message transmission, which greatly increases the transaction delay. Especially in high-frequency transaction scenarios such as NFT and large-scale user interaction, transaction delays significantly affect user experience.
[0005] Delay and efficiency problems of cross-chain transactions: the process of cross-chain transactions usually requires synchronization and verification between multiple chains, and the consensus mechanisms on each chain are different, resulting in a longer confirmation time for cross-chain operations. In addition, cross-chain transactions usually require additional intermediary steps or data synchronization mechanisms, which increases transaction delays and processing times. In real-time application scenarios such as NFT trading markets, the inefficiency and high latency of cross-chain transactions are particularly prominent, and there is an urgent need for a more efficient and low-latency cross-chain consensus mechanism. SUMMARY
[0006] One aspect of the present application provides a cross-chain NFT asset circulation method based on a relay chain consensus algorithm to solve the technical problems of low transaction security, low efficiency and long transaction delay in existing cross-chain transactions.
[0007] The present application is achieved by the following scheme:
[0008] A cross-chain NFT asset circulation method based on a relay chain consensus algorithm, comprising the steps of:
[0009] When performing cross-chain smart contract verification, multi-level dynamic verification of cross-chain smart contracts is adopted, and the verification process of cross-chain operations is divided into multiple levels, and each level performs cross-chain smart contract verification on different blockchains or relay chains in parallel, wherein the primary verification quickly judges the validity of the transaction through a lightweight mechanism, and then the accuracy of the transaction is further confirmed through step-by-step verification and extended verification;
[0010] A cross-chain graph model is set up, multiple blockchains are regarded as a graph structure, each blockchain or node is a node in the graph, and the edges between the nodes represent their cross-chain interaction relationship, on this basis, parallel processing of cross-chain transactions and consensus process is realized through a graph aggregation algorithm, multiple cross-chain transactions are processed simultaneously along different paths, and consistent results are obtained through global consensus when finally converging.
[0011] Further, the method further comprises the steps of:
[0012] In the case of failure of some nodes or inter-chain splitting, a fault-tolerant mechanism is introduced, which ensures that cross-chain transactions can be executed by means of multi-chain cooperation and rollback strategy, thereby improving the fault-tolerant capability of the system and avoiding the problem of transaction failure caused by single point failure in traditional cross-chain transactions.
[0013] Further, in the case of failure of some nodes or inter-chain splitting, a fault-tolerant mechanism is introduced, which ensures that cross-chain transactions can be executed by means of multi-chain cooperation and rollback strategy, and specifically comprises the steps of:
[0014] Node failure recovery: when a node or a blockchain fails, the fault-tolerant mechanism is started, the operation is recovered through a standby chain or a relay chain, and the partially executed operation is rolled back to ensure the integrity and consistency of cross-chain transactions.
[0015] Further, in the case of failure of some nodes or inter-chain splitting, a fault-tolerant mechanism is introduced, which ensures that cross-chain transactions can be executed by means of multi-chain cooperation and rollback strategy, and specifically comprises the steps of:
[0016] Chain splitting processing: if inter-chain splitting occurs, according to the preset rules, one blockchain is selected as the main chain, and the other branches enter the rollback state to ensure the consistency of the final result.
[0017] Further, when performing cross-chain smart contract verification, multi-level dynamic verification of cross-chain smart contracts is adopted, and the verification process of cross-chain operations is divided into multiple levels, and each level performs cross-chain smart contract verification on different blockchains or relay chains in parallel, and specifically comprises the steps of:
[0018] Primary verification: The primary verification of each cross-chain transaction is performed by the original chain or relay chain, using a lightweight verification method to quickly exclude invalid transactions;
[0019] Step-by-step verification: After the preliminary verification, the transaction enters the step-by-step verification stage, and the verification strength is gradually increased according to the complexity of the transaction, using a deep verification method to gradually verify and confirm the validity of the transaction;
[0020] Extended verification: Finally, the transaction is globally verified on all participating blockchains to confirm the final consistency of the transaction and verify whether the cross-chain contract execution is completed as expected.
[0021] Further, the lightweight verification method includes signature verification and basic data consistency check; the deep verification method includes multi-signature verification and smart contract execution verification.
[0022] Further, the cross-chain graph model is set up, considering multiple blockchains as a graph structure, each blockchain or node as a node in the graph, and the edges between nodes representing their cross-chain interaction relationship, on the basis of which, through a graph aggregation algorithm, parallel processing of cross-chain transactions and consensus process is realized, multiple cross-chain transactions are processed along different paths at the same time, and consistent results are obtained through global consensus when finally converging, specifically including the steps of:
[0023] Cross-chain graph model construction: all blockchains are considered as nodes of a graph, and the edges between nodes represent cross-chain interaction between blockchains, each edge representing a cross-chain transaction or data exchange path;
[0024] Parallel transaction path processing: through a graph aggregation algorithm, transactions are processed in parallel along different paths to avoid the bottleneck problem of traditional single-path consensus mechanism, and consensus of each path is performed independently to improve processing efficiency;
[0025] Graph aggregation algorithm parallel processing: the verification results of each parallel path are aggregated through a graph aggregation algorithm, merging the verification results on different paths to finally obtain a consistent consensus result of the cross-chain transaction, ensuring that the results of all paths are consistent in the final consensus;
[0026] Global consensus: all path processing and graph aggregation results are submitted to the global consensus stage for global consensus to ensure the final consistency of cross-chain transactions and the correctness of the global state.
[0027] Another aspect of the present application also provides a cross-chain NFT asset circulation device based on a relay chain consensus algorithm, comprising:
[0028] The multi-level dynamic verification module adopts multi-level dynamic verification of cross-chain smart contracts when performing cross-chain smart contract verification, divides the verification process of cross-chain operations into multiple levels, and performs cross-chain smart contract verification on different blockchains or relay chains in parallel at each level. The preliminary verification quickly judges the validity of the transaction through a lightweight mechanism, and then the accuracy of the transaction is further confirmed through step-by-step verification and extended verification.
[0029] The graph aggregation transaction parallelization processing module sets a cross-chain graph model, regards multiple blockchains as a graph structure, regards each blockchain or node as a node in the graph, and regards the cross-chain interaction relationship between the nodes as an edge between the nodes. On this basis, the parallelization processing of cross-chain transactions and consensus processes is realized through a graph aggregation algorithm. Multiple cross-chain transactions are processed simultaneously along different paths, and a consistent result is obtained through global consensus when finally converging.
[0030] Another aspect of the present application also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the cross-chain NFT asset circulation method based on the relay chain consensus algorithm.
[0031] Another aspect of the present application also provides a storage medium, comprising a stored program, wherein the program controls the device where the storage medium is located to perform the steps of the cross-chain NFT asset circulation method based on the relay chain consensus algorithm when the program is running.
[0032] Compared with the prior art, the present application has the following beneficial effects:
[0033] The application provides a cross-chain NFT asset circulation method and device based on a relay chain consensus algorithm, an electronic device and a storage medium. The cross-chain NFT asset circulation method based on the relay chain consensus algorithm divides the verification process of cross-chain operations into multiple levels, each level can be executed in parallel on different blockchains or relay chains, the validity of the transaction is quickly judged by a lightweight mechanism, and then the accuracy of the transaction is confirmed in depth through step-by-step verification and extended verification. This mechanism not only improves the speed of transaction processing, but also ensures the efficient cooperation of cross-chain transactions between different chains, breaks through the single-path verification limitation in traditional cross-chain technology, realizes parallel verification of transactions, and significantly improves the processing efficiency of transactions and the reliability of the system. On the other hand, the application further provides a cross-chain graph model, which regards multiple blockchains as a graph structure, each blockchain or node as a node in the graph, and the edges between nodes representing the cross-chain interaction relationship between them. On this basis, a graph aggregation algorithm is used to realize parallel processing of cross-chain transactions and consensus processes, which can process multiple cross-chain transaction paths at the same time, so that multiple cross-chain transactions can be processed along different paths at the same time, and a consistent result is obtained through global consensus when finally converging. The aggregation algorithm can efficiently combine the verification results on different paths, effectively converge the verification results on multiple cross-chain paths, eliminate the efficiency bottleneck of the traditional single-path consensus model, and thus greatly improve the throughput, efficiency and scalability of the entire system.
[0034] In addition to the purposes, features and advantages described above, the present application has other purposes, features and advantages. The present application will be described in detail below with reference to the drawings. BRIEF DESCRIPTION OF DRAWINGS
[0035] The accompanying drawings, which form a part of this application, are included to provide a further understanding of the application, and are incorporated in and constitute a part of this application. The embodiments of the application illustrated in the drawings, and their description, are used to explain the application and are not intended to limit the application.
[0036] Figure 1 is a cross-chain NFT asset circulation method flow diagram based on a relay chain consensus algorithm of a preferred embodiment of the present application.
[0037] Figure 2 is a cross-chain NFT asset circulation method flow diagram based on a relay chain consensus algorithm of another preferred embodiment of the present application.
[0038] Figure 3 is a sub-step flow diagram of step S3 of a preferred embodiment of the present application.
[0039] Figure 4 is a sub-step flow diagram of step S3 of another preferred embodiment of the present application.
[0040] Figure 5 is a sub-step flowchart of step S1 of the preferred embodiment of the present application.
[0041] Figure 6 is a multi-level dynamic verification and fault-tolerant mechanism flowchart of the cross-chain smart contract of the preferred embodiment of the present application.
[0042] Figure 7 is a sub-step flowchart of step S2 of the preferred embodiment of the present application.
[0043] Figure 8 is a cross-chain graph model flowchart of the preferred embodiment of the present application.
[0044] Figure 9 is a cross-chain NFT asset circulation device module schematic diagram based on a relay chain consensus algorithm of the preferred embodiment of the present application.
[0045] Figure 10 is a cross-chain NFT asset circulation device module schematic diagram based on a relay chain consensus algorithm of another preferred embodiment of the present application.
[0046] Figure 11 is a sub-mode schematic diagram of the fault-tolerant recovery module of the present application.
[0047] Figure 12 is an electronic device entity schematic block diagram of the preferred embodiment of the present application.
[0048] Figure 13 is an internal structure diagram of the computer device of the preferred embodiment of the present application.
[0049] Figure 14 is a cross-chain model architecture schematic diagram based on a relay chain of the preferred embodiment of the present application.
[0050] Figure 15 is a cross-chain logical architecture schematic diagram of the preferred embodiment of the present application.
[0051] Figure 16 is an NFT business process schematic diagram of the preferred embodiment of the present application. DETAILED DESCRIPTION
[0052] The embodiments of the present application are described in detail below with reference to the accompanying drawings, but the present application can be implemented in various different ways as defined and covered by the following.
[0053] Related terms are explained as follows:
[0054] Blockchain: Blockchain is a distributed ledger technology that consists of a series of blocks arranged in chronological order, each containing a set of transaction records. These blocks are linked to each other through cryptographic methods, forming an immutable chain. The core features of blockchain technology are decentralization, transparency, and irreversibility.
[0055] CrossChain: Cross-chain technology refers to the communication and interaction between different blockchains. It allows assets and data to be transferred between different blockchain networks, enabling the interconnection of different blockchain ecosystems.
[0056] Relay Chain: Relay chain is a special type of blockchain that serves as a bridge between multiple blockchains, responsible for verifying and forwarding cross-chain transactions. In some cross-chain frameworks, such as Polkadot, the relay chain is responsible for the consensus and security of the entire network, while other chains (parallel chains) focus on specific business logic.
[0057] Consensus Algorithm: Consensus algorithm is a mechanism used in blockchain networks to reach consensus on decisions. It allows nodes in a distributed network to agree on the consistency of data, even in the presence of malicious behavior or failures in some nodes. Common consensus algorithms include Proof of Work (PoW), Proof of Stake (PoS), Delegated Proof of Stake (DPoS), etc.
[0058] NFT (NonFungible Token): NFT is a blockchain-based non-fungible token that represents unique digital assets such as art, collectibles, or virtual goods. Unlike fungible tokens, each NFT has a unique identifier, making it non-interchangeable.
[0059] State Machine: State machine is a computational model that transitions from one state to another based on a series of inputs and rules. In blockchain, the state machine can be considered as the state of the entire network, including all account balances, smart contract states, etc. Blockchain updates the state machine through consensus algorithms to ensure that all nodes have a consistent view of the network state.
[0060] Log: In computer science, a log is a record of events or activities recorded by a system, application, or device. In blockchain, a log can refer to a transaction log, which records all transaction history on the blockchain, or a smart contract execution log, which monitors and audits the behavior of smart contracts.
[0061] Smart Contract: A smart contract is a computer program that runs on a blockchain and automates the execution, control, or documentation of legal events and actions. It allows trusted transactions to be executed without the need for third parties, and once deployed to the blockchain, its code and functionality cannot be changed. Smart contracts can be used to create, execute, and manage various financial and non-financial transactions.
[0062] SDK (Software Development Kit): SDK is a software development kit that provides a set of tools, libraries, documentation, and code samples to help developers create applications for specific software packages, software frameworks, hardware platforms, operating systems, etc. SDK usually includes API documentation and code examples to facilitate developers to quickly get started and develop. For example, in the field of blockchain, a blockchain platform may provide an SDK to allow developers to more easily interact with the blockchain, deploy smart contracts, etc.
[0063] API (Application Programming Interface): API is an application programming interface that defines how software components communicate with each other. API serves as an intermediate layer, allowing different software systems to work together without needing to understand the internal workings. In web development, API allows the data of one website to be used by other websites or applications. For example, SLS provides OpenAPI, and developers can directly call these APIs through SDK without worrying about technical details.
[0064] As shown in Figure 1 , the preferred embodiment of the present application provides a cross-chain NFT asset circulation method based on a relay chain consensus algorithm, comprising the steps of:
[0065] S1, when verifying cross-chain smart contracts, adopt multi-level dynamic verification of cross-chain smart contracts, divide the verification process of cross-chain operations into multiple levels, and perform cross-chain smart contract verification on different blockchains or relay chains in parallel at each level, wherein the primary verification quickly judges the validity of the transaction through a lightweight mechanism, and then the transaction accuracy is further confirmed through step-by-step verification and extended verification;
[0066] S2, set up a cross-chain graph model, consider multiple blockchains as a graph structure, each blockchain or node as a node in the graph, and the edges between nodes represent their cross-chain interaction relationship, on this basis, through a graph aggregation algorithm, parallel processing of cross-chain transactions and consensus process is realized, multiple cross-chain transactions are processed simultaneously along different paths, and a consistent result is obtained through global consensus when finally converging.
[0067] This embodiment provides a cross-chain NFT asset transfer method based on a relay chain consensus algorithm. This method employs a multi-level dynamic verification mechanism, dividing the verification process of cross-chain operations into multiple levels. Each level can be executed in parallel on different blockchains or relay chains. Initial verification uses a lightweight mechanism to quickly determine the validity of the transaction. Then, progressive and extended verification further confirms the accuracy of the transaction. This mechanism not only improves transaction processing speed but also ensures efficient collaboration between different chains, breaking through the single-path verification limitation of traditional cross-chain technologies and achieving parallel transaction verification, significantly improving transaction processing efficiency and system reliability. On one hand, this invention further proposes a cross-chain graph model, which treats multiple blockchains as a graph structure, with each blockchain or node being a node in the graph. The edges between nodes represent their cross-chain interaction relationships. Based on this, a graph aggregation algorithm is used to achieve parallel processing of cross-chain transactions and consensus processes. This algorithm can process multiple cross-chain transaction paths simultaneously, allowing multiple cross-chain transactions to be processed along different paths at the same time. When the paths converge, a consistent result is obtained through global consensus. This aggregation algorithm can efficiently merge the verification results on different paths and effectively converge the verification results on multiple cross-chain paths, eliminating the efficiency bottleneck of the traditional single-path consensus model. This significantly improves the throughput, efficiency, and scalability of cross-chain transactions.
[0068] like Figure 2 As shown in the preferred embodiment of this application, the cross-chain NFT asset transfer method based on the relay chain consensus algorithm further includes the following steps:
[0069] S3. In the event of node failure or inter-chain split, a fault tolerance mechanism is introduced. This fault tolerance mechanism ensures that cross-chain transactions can be resumed through multi-chain collaboration and rollback strategies, thereby improving the system's fault tolerance and avoiding the problem of transaction failure caused by single point of failure in traditional cross-chain transactions.
[0070] To enhance system reliability, this embodiment introduces a fault tolerance mechanism in the event of node failures or inter-chain splits. This ensures that cross-chain transactions can still be recovered and executed even if node failures or chain splits occur, achieving fault-tolerant recovery of transactions, guaranteeing the integrity and consistency of the final result, and ensuring that cross-chain transactions can be resumed and executed. This improves the system's fault tolerance capability, avoids the problem of single-point failures causing transaction failures in traditional cross-chain transactions, and significantly enhances the reliability and robustness of the system and transactions.
[0071] Preferably, such as Figure 3 As shown, in the event of node failure or inter-chain splits, a fault tolerance mechanism is introduced. This mechanism ensures that cross-chain transactions can be resumed through multi-chain collaboration and rollback strategies, specifically including the following steps:
[0072] S31, node failure recovery: when a node or blockchain fails, start the fault-tolerant mechanism, recover the operation through the standby chain or relay chain, and roll back the part of the operation that may have been executed to ensure the integrity and consistency of cross-chain transactions.
[0073] Preferably, as Figure 4 mentioned, in the case of failure of some nodes or inter-chain splitting, a fault-tolerant mechanism is introduced, which ensures that cross-chain transactions can be executed through multi-chain cooperation and rollback strategy, specifically including the steps of:
[0074] S32, chain splitting processing: if inter-chain splitting occurs, according to the preset rules, select one blockchain as the main chain, and the other branches enter the rollback state to ensure the consistency of the final result.
[0075] As Figure 5 and Figure 6 shown, in the preferred embodiment of the present application, when verifying cross-chain smart contracts, a multi-level dynamic verification mechanism for cross-chain smart contracts is used to divide the verification process of cross-chain operations into multiple levels, each level performing cross-chain smart contract verification on different blockchains or relay chains in parallel, specifically including the steps of:
[0076] S11, preliminary verification: the preliminary verification of each cross-chain transaction is performed by the initial chain or relay chain, and a lightweight verification method is used to quickly exclude invalid transactions, and the lightweight verification method includes signature verification and basic data consistency check;
[0077] S12, step-by-step verification: after the transaction is preliminarily verified, it enters the step-by-step verification stage, and according to the complexity of the transaction, the verification strength is increased step by step, and a deep verification method is used to verify and confirm the validity of the transaction, and the deep verification method includes multi-signature verification and smart contract execution verification;
[0078] S13, extended verification: finally, the transaction is globally verified on all participating blockchains to confirm the final consistency of the transaction and verify whether the execution of the cross-chain contract is completed as expected.
[0079] This embodiment designs a multi-level dynamic verification mechanism to divide the verification process of cross-chain operations into multiple levels, each level can be executed in parallel on different blockchains or relay chains, the preliminary verification quickly judges the validity of the transaction through a lightweight mechanism, and then the accuracy of the transaction is confirmed through step-by-step verification and extended verification. This mechanism not only improves the speed of transaction processing, but also ensures the efficient cooperation of cross-chain transactions between different chains.
[0080] As Figure 7 and Figure 8As shown, in the preferred embodiment of the present application, the cross-chain graph model is set up, multiple blockchains are regarded as a graph structure, each blockchain or node is a node in the graph, and the edges between nodes represent the cross-chain interaction relationship between them. On this basis, through a graph aggregation algorithm, parallel processing of cross-chain transactions and consensus process is realized, multiple cross-chain transactions are processed along different paths at the same time, and consistent results are obtained through global consensus when finally converging. Specifically, it includes the following steps:
[0081] S21, cross-chain graph model construction: all blockchains are regarded as nodes of a graph, and the edges between nodes represent cross-chain interaction between blockchains. Each edge represents a cross-chain transaction or data exchange path.
[0082] S22, parallel transaction path processing: through a graph aggregation algorithm, transactions are processed in parallel along different paths to avoid the bottleneck problem of traditional single-path consensus mechanism. The consensus of each path is carried out independently, thereby improving processing efficiency.
[0083] S23, graph aggregation algorithm parallel processing: the verification results of each parallel path are aggregated through a graph aggregation algorithm, and the verification results on different paths are merged to obtain a consistent consensus result of cross-chain transactions, ensuring that the results of all paths are consistent in the final consensus.
[0084] S24, global consensus: all path processing and graph aggregation results are submitted to the global consensus stage for global consensus to ensure the final consistency of cross-chain transactions and the correctness of the global state.
[0085] This embodiment can simultaneously process multiple cross-chain transaction paths and effectively aggregate the verification results on multiple cross-chain paths by constructing a cross-chain graph model and designing a graph aggregation algorithm, eliminating the efficiency bottleneck in traditional consensus algorithms, thereby greatly improving the throughput of cross-chain transactions and the scalability of the entire system.
[0086] As Figure 9 shown, another preferred embodiment of the present application also provides a cross-chain NFT asset circulation device based on a relay chain consensus algorithm, which includes:
[0087] The multi-level dynamic verification module adopts multi-level dynamic verification of cross-chain smart contracts when verifying cross-chain smart contracts, divides the verification process of cross-chain operations into multiple levels, and performs cross-chain smart contract verification in parallel on different blockchains or relay chains at each level. The primary verification quickly judges the validity of the transaction through a lightweight mechanism, and then the accuracy of the transaction is confirmed through step-by-step verification and extended verification.
[0088] The graph aggregation transaction parallelization processing module sets a cross-chain graph model, regards multiple blockchains as a graph structure, regards each blockchain or node as a node in the graph, and regards the edges between the nodes as the cross-chain interaction relationship between the nodes. On this basis, the parallelization processing of the cross-chain transaction and the consensus process is realized through a graph aggregation algorithm. Multiple cross-chain transactions are processed simultaneously along different paths, and a consistent result is obtained through global consensus when the transactions converge finally.
[0089] As Figure 10 shown, in another preferred embodiment of the present application, the cross-chain NFT asset circulation device based on the relay chain consensus algorithm further comprises:
[0090] The fault tolerance recovery module is configured to introduce a fault tolerance mechanism in the case of failure of some nodes or inter-chain splitting. The fault tolerance mechanism ensures that cross-chain transactions can be recovered and executed through multi-chain cooperation and rollback strategies, thereby improving the fault tolerance capability of the system and avoiding the problem of transaction failure caused by single point failure in traditional cross-chain transactions.
[0091] As Figure 11 shown, in another preferred embodiment of the present application, the fault tolerance recovery module specifically comprises:
[0092] The node failure recovery module is configured to recover the node failure. When a node or a blockchain fails, the fault tolerance mechanism is started, the operation is recovered through a backup chain or a relay chain, and the part of the operation that has been executed is rolled back, so as to ensure the integrity and consistency of the cross-chain transaction.
[0093] The chain splitting processing module is configured to process the chain splitting. If inter-chain splitting occurs, according to a preset rule, one blockchain is selected as a main chain, and other branches enter a rollback state, so as to ensure the consistency of the final result.
[0094] As Figure 12 shown, the preferred embodiments of the present application further provide an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the cross-chain NFT asset circulation method based on the relay chain consensus algorithm in the above embodiments are implemented.
[0095] As Figure 13 shown, the preferred embodiments of the present application further provide a computer device, which can be a terminal or a living body detection server. The internal structure diagram of the computer device can be as Figure 13As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium, an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The network interface of the computer device is used to communicate with other computer devices outside through network connection. The computer program is executed by the processor to implement the steps of the cross-chain NFT asset circulation method based on the relay chain consensus algorithm described above.
[0096] Those skilled in the art can understand that, Figure 13 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0097] The preferred embodiment of the present application also provides a storage medium including a stored program, which, when executed, controls the device where the storage medium is located to perform the steps of the cross-chain NFT asset circulation method based on the relay chain consensus algorithm in the above-mentioned embodiments.
[0098] In summary, the cross-chain NFT asset circulation method based on the relay chain consensus algorithm of the present application solves the problems existing in the prior art from the following multiple aspects:
[0099] A, for the security and trust problem of cross-chain transaction: the multi-level dynamic verification and fault tolerance mechanism of the cross-chain smart contract proposed in the present application solves the trust problem in cross-chain transaction. By dividing the verification process of cross-chain operation into multiple levels and verifying in parallel on different chains or relay chains, it is no longer dependent on centralized intermediaries or third parties. Each level of verification process can quickly judge the validity of the transaction through a lightweight mechanism, while more complex verification is completed through step-by-step verification in depth, greatly improving the security. This mechanism can be flexibly deployed and operated in different blockchain environments, and the fault tolerance mechanism can ensure that even if node failure or chain splitting occurs, cross-chain transactions can still be restored and executed, thereby enhancing the robustness of the system.
[0100] B. Efficiency bottleneck and delay problem of cross-chain transaction: The present application effectively solves the efficiency bottleneck problem in existing cross-chain transactions by introducing a cross-chain graph model. Traditional cross-chain transactions rely on a single consensus path, while the present application treats multiple blockchains and cross-chain transactions as a graph structure, where each node represents a blockchain and each edge represents a cross-chain operation. By using a graph aggregation algorithm, the present application can simultaneously and parallelly process multiple cross-chain transactions, significantly improving transaction throughput and response speed. At the same time, the graph model supports collaboration between multiple chains, eliminating the bottleneck of traditional single-chain verification and reducing the delay of cross-chain transactions. In this way, the present application not only improves efficiency, but also enhances the parallelism and scalability of cross-chain transactions.
[0101] C. Delay and confirmation problem of cross-chain transaction: The cross-chain graph model and multi-level dynamic verification mechanism proposed by the present application effectively reduce the delay in cross-chain transactions. By eliminating unnecessary intermediaries and optimizing data synchronization mechanisms, the confirmation time of cross-chain transactions is significantly shortened. Traditional cross-chain transactions require multiple verification steps, while the present application parallelizes and distributes these steps through a multi-level dynamic verification mechanism, thereby speeding up the transaction confirmation process. By dynamically adjusting the timeout mechanism, the present application ensures that cross-chain transactions can respond quickly under different network conditions, significantly improving transaction efficiency.
[0102] The cross-chain model architecture, cross-chain logical architecture and NFT business process involved in the present application are described in detail below.
[0103] I. Cross-chain model architecture
[0104] The cross-chain model architecture based on the relay chain in the present application aims to achieve efficient, secure and reliable interoperability between different blockchain networks. The architecture connects multiple heterogeneous application chains through a centralized relay chain (Relay Chain) as the core, such as Figure 14 As shown, including:
[0105] Relay Chain (Relay Chain):
[0106] The relay chain is the core of the entire architecture and is responsible for handling the consensus and verification of cross-chain transactions. It uses the BS-RAFT consensus algorithm, which is a Byzantine Fault Tolerant consensus mechanism based on the Raft algorithm, capable of quickly reaching consensus in a distributed network while ensuring system security and stability.
[0107] Application Chain (Application Chain):
[0108] Application chains are multiple independent blockchain networks connected to the relay chain, each with its own consensus mechanism, ledger, and smart contracts. In this architecture, three different application chains are shown: Fabric, Ethereum, and Chang'an Chain. These application chains communicate with the relay chain through specific adapters, which are responsible for converting transactions from the application chains into a format that the relay chain can recognize and process.
[0109] Cross-chain transaction processing:
[0110] When an application chain needs to interact with another application chain, the transaction is first submitted to the relay chain. The consensus nodes on the relay chain use the BS-RAFT algorithm to verify and reach consensus on the transaction. Once the transaction is consensus on the relay chain, the relay chain will inform the corresponding application chain to execute the transaction through the adapter. This design ensures the atomicity and consistency of cross-chain transactions.
[0111] Security and reliability:
[0112] This architecture provides a highly secure and reliable cross-chain transaction environment through the centralized management of the relay chain and the BS-RAFT consensus algorithm. The centralized nature of the relay chain allows the system to quickly respond and process cross-chain transactions, while the Byzantine fault tolerance capability of the BS-RAFT algorithm ensures the stability and security of the system in the face of malicious nodes.
[0113] Interoperability and scalability:
[0114] This architecture supports the interoperability of multiple blockchain platforms, and new application chains can be easily integrated into the system through adapters. This design not only improves the flexibility of the system, but also provides convenience for future expansion.
[0115] The cross-chain model architecture of the present application realizes a safe, efficient and scalable cross-chain transaction system through the relay chain and the BS-RAFT consensus algorithm, providing strong technical support for the interoperability between different blockchain networks.
[0116] II. Cross-chain logical architecture
[0117] The cross-chain logical architecture design of the present application aims to realize efficient, secure and reliable interoperability between different blockchain platforms, and is particularly suitable for the creation, transaction and management of non-fungible tokens (NFTs). As shown in Figure 15 The architecture consists of four main levels: portal display layer, application layer, backend service layer, and blockchain service layer, wherein:
[0118] Portal display layer
[0119] The portal presentation layer is responsible for providing an intuitive interface to users, showcasing key information about the blockchain network. This layer includes two main parts: the data dashboard and NFT details:
[0120] Data Dashboard: Displays blockchain information, transaction information, node information, and contract information, providing users with a real-time overview of the network's status.
[0121] NFT Details: Provides detailed information such as image, NFT fields, owner fields, and block location, making it easy for users to view and manage NFTs.
[0122] Application Layer
[0123] The application layer is the main interface for users to interact with the system, providing a series of functions to support the lifecycle management of NFTs:
[0124] Create User: Allows new users to register and join the system.
[0125] Create NFT: Users can create new NFTs, defining their attributes and metadata.
[0126] Buy NFT: Provides the functionality to purchase NFTs, including payment and ownership transfer.
[0127] Transfer NFT: Allows users to transfer NFT ownership to other users.
[0128] Query NFT: Users can query detailed information and transaction history of NFTs.
[0129] Query Owner: Queries the current owner information of NFTs.
[0130] Destroy NFT: Provides the functionality to destroy NFTs, permanently removing them from the system.
[0131] Backend Service Layer
[0132] The backend service layer serves as a bridge between the application layer and the blockchain service layer, responsible for handling application layer requests and converting them into blockchain transactions:
[0133] Blockchain SDK: Provides a software development kit that simplifies the complexity of blockchain interactions, allowing the application layer to easily communicate with the blockchain.
[0134] HTTP Request Interface: Provides a standardized interface that allows the application layer to interact with the backend service through HTTP requests, enabling data transmission and reception.
[0135] Blockchain Service Layer
[0136] The blockchain service layer is the foundation of the entire architecture, responsible for actual blockchain operations and cross-chain communication:
[0137] FISCO BCOS, Hyperledger Fabric, Ethereum, and Chang'an Chain: These are supported blockchain platforms, each with its own nodes and smart contracts for handling specific blockchain operations.
[0138] Relay Chain: As the core of cross-chain communication, the relay chain is responsible for coordinating transactions and data synchronization between different blockchain platforms, ensuring consistency and security of cross-chain operations.
[0139] Through this hierarchical architecture, the invention not only improves the scalability and flexibility of the system, but also enhances the security and efficiency of cross-chain operations through the relay chain mechanism, providing a comprehensive, efficient, and secure NFT management and trading platform for users.
[0140] III. NFT Business Process
[0141] The present application relates to a cross-chain NFT (Non-Fungible Token) business logic, aiming to realize the creation, transaction, and transfer of NFTs between different blockchain platforms. As shown in the figure, the business logic includes three main roles: issuer, user A, and user B, as well as three key components: cross-chain platform, NFT market, and NFT recycling station. Figure 16
[0142] Issuer
[0143] The issuer is responsible for writing smart contracts and deploying them to the cross-chain platform to create and manage NFTs. The issuer binds NFT information and user information through the cross-chain platform and issues NFTs to the market. When NFTs are destroyed or unbound, the issuer handles related operations through the NFT recycling station.
[0144] User A
[0145] User A purchases NFTs on the NFT market and becomes the owner of the NFTs. During the purchase process, the address information of user A is bound to the NFT information and updated to the cross-chain platform. User A can transfer the NFTs they own to other users or trade them on the secondary market. When transferring NFTs, user A updates the ownership information of the NFTs through the cross-chain platform and broadcasts the transaction information to the network.
[0146] User B
[0147] User B purchases the NFTs transferred by user A on the secondary market and becomes the new owner. During the purchase process, the address information of user B is bound to the NFT information and the ownership information is updated through the cross-chain platform. User B can query the detailed information of the NFTs, including NFT ID, owner address, etc.
[0148] Cross-Chain Platform
[0149] The cross-chain platform is the core of the entire business logic, responsible for handling the creation, issuance, transfer, and query of NFTs. It realizes the binding of NFT information and user information through smart contracts, and realizes information synchronization and transaction confirmation between different blockchain platforms through cross-chain technology.
[0150] NFT market
[0151] The NFT market is a decentralized trading platform where users can buy, sell, and transfer NFTs. The market connects with different blockchain platforms through the cross-chain platform to ensure the security and transparency of NFT transactions.
[0152] NFT recycling station
[0153] The NFT recycling station is responsible for handling the destruction and unbinding of NFTs. When NFTs are no longer needed, issuers can remove them from the cross-chain platform through the recycling station to ensure proper management of the NFT lifecycle.
[0154] The cross-chain NFT business logic of the present application realizes interoperability between different blockchain platforms through the cross-chain platform, providing a safe, transparent, and efficient NFT trading and management environment for users. Through smart contracts and cross-chain technology, the present application ensures the atomicity and consistency of NFT transactions, while providing rich functions to support the full lifecycle management of NFTs.
[0155] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0156] If the functions described in the method of the present embodiment are realized in the form of software function units and sold or used as independent products, they can be stored in one or more computer readable storage media. Based on this understanding, the part of the prior art that the present embodiment contributes to or part of the technical solution can be embodied in the form of a software product stored in a storage medium, including a number of instructions for causing a computing device (which can be a personal computer, server, mobile computing device, or network device, etc.) to execute all or part of the steps of the method described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, and various media that can store program codes.
[0157] Those skilled in the art will appreciate that embodiments of the application can be devised for a method, a system, or a computer program product. Accordingly, the present application can be embodied in the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer readable program code. Embodiments of the present application can be implemented with various computer program languages such as the object-oriented programming language Java and the interpreted scripting language JavaScript, etc.
[0158] The present application is described in reference to the flowchart illustrations and / or block diagrams according to the embodiments of the application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.
[0159] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.
[0160] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.
[0161] While the preferred embodiments of the application have been described, additional variations and modifications can be made to the embodiments by those skilled in the art once they learn of the basic inventive concepts. Therefore, the appended claims are intended to cover all such variations and modifications as fall within the scope of the application.
[0162] Obviously, numerous modifications and variations of the present application are possible in light of the above teachings. It is therefore to be understood that within the scope of the appended claims and their equivalents, the application can be practiced otherwise than as specifically described.
Claims
1. A cross-chain NFT asset circulation method based on a relay chain consensus algorithm, characterized in that, Comprising the steps of: When performing cross-chain smart contract verification, a multi-level dynamic verification of cross-chain smart contracts is adopted, and the verification process of cross-chain operations is divided into multiple levels, each level performing cross-chain smart contract verification on different blockchains or relay chains, wherein the preliminary verification quickly judges the validity of the transaction through a lightweight mechanism, and then the accuracy of the transaction is further confirmed through step-by-step verification and extended verification; A cross-chain graph model is set up, multiple blockchains are regarded as a graph structure, each blockchain or node is a node in the graph, and the edges between nodes represent their cross-chain interaction relationship, and through a graph aggregation algorithm, parallel processing of cross-chain transactions and consensus process is realized, multiple cross-chain transactions are processed along different paths at the same time, and consistent results are obtained through global consensus when finally converging, specifically comprising the steps of: Cross-chain graph model construction: all blockchains are regarded as nodes of a graph, and the edges between nodes represent cross-chain interaction between blockchains, and each edge represents a cross-chain transaction or data exchange path; Parallel transaction path processing: through a graph aggregation algorithm, transactions are processed in parallel along different paths to avoid the bottleneck problem of traditional single-path consensus mechanism, and the consensus of each path is performed independently to improve processing efficiency; Graph aggregation algorithm parallel processing: the verification results of each parallel path are aggregated through a graph aggregation algorithm, and the verification results on different paths are merged to finally obtain a consistent consensus result of cross-chain transactions, ensuring that the results of all paths are consistent in the final consensus; Global consensus: all path processing and graph aggregation results are submitted to the global consensus stage for global consensus to ensure the final consistency of cross-chain transactions and the correctness of the global state.
2. The cross-chain NFT asset circulation method based on the relay chain consensus algorithm according to claim 1, characterized in that, Further comprising the steps of: When some nodes fail or inter-chain split occurs, a fault-tolerant mechanism is introduced, which ensures that cross-chain transactions can be resumed by multi-chain cooperation and rollback strategy.
3. The cross-chain NFT asset circulation method based on the relay chain consensus algorithm according to claim 2, characterized in that, When some nodes fail or inter-chain split occurs, a fault-tolerant mechanism is introduced, which ensures that cross-chain transactions can be resumed by multi-chain cooperation and rollback strategy, specifically comprising the steps of: Node failure recovery: when a node or blockchain fails, the fault-tolerant mechanism is started, the operation is recovered through a standby chain or relay chain, and the partially executed operation is rolled back to ensure the integrity and consistency of cross-chain transactions.
4. The cross-chain NFT asset circulation method based on the relay chain consensus algorithm according to claim 2, characterized in that, When some nodes fail or inter-chain split occurs, a fault-tolerant mechanism is introduced, which ensures that cross-chain transactions can be resumed by multi-chain cooperation and rollback strategy, specifically comprising the steps of: Chain split processing: if inter-chain split occurs, according to the preset rules, one blockchain is selected as the main chain, and the other branches enter the rollback state to ensure the consistency of the final result.
5. The cross-chain NFT asset circulation method based on the relay chain consensus algorithm according to claim 1, characterized in that, When performing cross-chain smart contract verification, a multi-level dynamic verification of cross-chain smart contracts is adopted, and the verification process of cross-chain operations is divided into multiple levels, each level performing cross-chain smart contract verification on different blockchains or relay chains, specifically comprising the steps of: Preliminary verification: the preliminary verification of each cross-chain transaction is performed by the initial chain or relay chain, and a lightweight verification method is used to quickly exclude invalid transactions; Step-by-step verification: After the initial verification, the transaction enters the step-by-step verification phase, which gradually increases the verification strength according to the complexity of the transaction, using deep verification methods to gradually verify and confirm the validity of the transaction; Extended verification: Finally, the transaction is globally verified on all participating blockchains to confirm the final consistency of the transaction and verify whether the cross-chain contract execution is completed as expected.
6. The cross-chain NFT asset circulation method based on the relay chain consensus algorithm according to claim 5, characterized in that, The lightweight verification method includes signature verification and basic data consistency check; the deep verification method includes multi-signature verification and smart contract execution verification.
7. A cross-chain NFT asset circulation device based on a relay chain consensus algorithm, characterized by, Comprise: Multi-level dynamic verification module, for cross-chain smart contract verification, adopts multi-level dynamic verification of cross-chain smart contract, divides the verification process of cross-chain operation into multiple levels, each level performs cross-chain smart contract verification on different blockchains or relay chains in parallel, wherein the primary verification quickly judges the validity of the transaction through lightweight mechanism, and then deeply confirms the accuracy of the transaction through step-by-step verification and extended verification; Graph aggregation transaction parallel processing module, for setting up a cross-chain graph model, regarding multiple blockchains as a graph structure, each blockchain or node as a node in the graph, and the edges between nodes representing their cross-chain interaction relationship, through graph aggregation algorithm, realizing parallel processing of cross-chain transaction and consensus process, multiple cross-chain transactions are processed along different paths at the same time, and consistent results are obtained through global consensus when finally converging, specifically for: Cross-chain graph model construction: all blockchains are regarded as nodes of the graph, and the edges between nodes represent cross-chain interaction between blockchains, each edge represents a cross-chain transaction or data exchange path; Parallel transaction path processing: through the graph aggregation algorithm, transactions are processed in parallel along different paths to avoid the bottleneck problem of traditional single-path consensus mechanism, and the consensus of each path is carried out independently, thereby improving the processing efficiency; Graph aggregation algorithm parallel processing: the verification results of each parallel path are aggregated through the graph aggregation algorithm, merging the verification results on different paths to finally obtain the consistency consensus result of cross-chain transactions, ensuring that the results of all paths are consistent in the final consensus; Global consensus: all path processing and graph aggregation results are submitted to the global consensus stage for global consensus to ensure the final consistency of cross-chain transactions and the correctness of the global state.
8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to realize the steps of the cross-chain NFT asset circulation method based on the relay chain consensus algorithm in any one of claims 1-6.
9. A storage medium comprising a stored program which, when executed, controls a device in which the storage medium is located to perform the steps of the cross-chain NFT asset circulation method based on the relay chain consensus algorithm in any one of claims 1-6.
Citation Information
Patent Citations
Blockchain multi-chain cross-chain system and implementation mechanism thereof
CN112287029A
Cross-chain message transmission method and device of block chain, and storage medium
CN113645278A