Blockchain-based data processing method and apparatus, device, and storage medium

By introducing cross -chain trading protocols and chain and under -chain verification contracts in the blockchain network, the problem of low efficiency and insufficient security of cross -chain business processing between blockchain business has been solved, and efficient and safe cross -crossing cross -crossing Chain business processing.

WO2024244318A9PCT designated stage expired Publication Date: 2025-01-23TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/132037
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-30
Filing Date
2023-11-16
Publication Date
2025-01-23

AI Technical Summary

Technical Problem

In the existing blockchain technology, cross-chain business processing between each blockchain is difficult, low efficiency and insufficient security, and data leakage and loss are prone to data leakage and loss.

Method used

By introducing cross -chain transaction protocols in the blockchain network, using the chain business school inspection contract and chain business execution contract to conduct cross -chain business verification and execution, and conduct data verification under the chain through the N cross -chain relay device , Ensure the effectiveness of cross -chain transaction data.

Benefits of technology

It improves the efficiency and security of cross-chain business processing, avoids data leakage and loss, and ensures the legality and effectiveness of cross-chain business.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023132037_23012025_PF_FP_ABST
    Figure CN2023132037_23012025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in embodiments of the present application are a blockchain-based data processing method and apparatus, a device, and a storage medium. The method comprises: a first node device associated with a first blockchain receiving a cross-chain transaction request sent by a service terminal; calling an on-chain service verification contract in a cross-chain transaction protocol, and verifying the legitimacy of a target cross-chain service according to service description information to obtain a service verification result; if the service verification result indicates that the target cross-chain service is legitimate, calling an on-chain service execution contract in the cross-chain transaction protocol, and executing the target cross-chain service to obtain cross-chain transaction data; and sending the cross-chain transaction data to N cross-chain relay devices associated with the cross-chain transaction protocol. By means of the embodiments of the present application, the efficiency and security of cross-chain service processing can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Blockchain-based data processing method, device, equipment, and storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on May 30, 2023, with application number 202310626339.1 and invention name “Data processing method, device, equipment and storage medium based on blockchain”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of blockchain technology, and in particular to a blockchain-based data processing method, apparatus, device, and storage medium. Background Art

[0003] Blockchain technology is a new distributed infrastructure and computing method that uses a block-chain data structure to verify and store data, a distributed node consensus algorithm to generate and update data, cryptography to ensure the security of data transmission and access, and smart contracts composed of automated script code to program and manipulate data. Simply put, blockchain is a decentralized distributed ledger.

[0004] With the widespread recognition and acceptance of blockchain technology, many different types of blockchains have emerged. However, existing technologies rely on independent blockchains, making cross-chain business processing difficult and requiring manual intervention. This results in low cross-chain business processing efficiency, is prone to data leakage and loss, and is difficult to ensure the security of cross-chain business processing.

[0005] Summary of the Invention

[0006] The embodiments of the present application provide a blockchain-based data processing method, apparatus, device, and storage medium, which can improve the efficiency and security of cross-chain business processing.

[0007] On the one hand, an embodiment of the present application provides a data processing method based on blockchain, including:

[0008] A first node device associated with the first blockchain receives a cross-chain transaction request sent by a business terminal; the cross-chain transaction request includes business description information of a target cross-chain business associated with the first blockchain and the second blockchain, and the first node device and the second node device maintaining the second blockchain both meet the cross-chain transaction protocol;

[0009] Call the on-chain business verification contract in the cross-chain transaction protocol, verify the legitimacy of the target cross-chain business based on the business description information, and obtain the business verification result;

[0010] If the business verification result indicates that the target cross-chain business is legitimate, the on-chain business execution contract in the cross-chain transaction protocol is called to execute the target cross-chain business and obtain the cross-chain transaction data;

[0011] The cross-chain transaction data is sent to N cross-chain relay devices associated with the cross-chain transaction protocol; the cross-chain relay device i among the N cross-chain relay devices is used to send the cross-chain transaction data to the second node device when it is determined that the cross-chain transaction data is valid based on the off-chain data verification contract in the cross-chain transaction protocol; the second node device is used to process the cross-chain transaction data when it is determined that the received cross-chain transaction data is valid, where N is a positive integer greater than 1, and i is a positive integer less than or equal to N.

[0012] On the one hand, an embodiment of the present application provides a data processing method based on blockchain, including:

[0013] The second node device associated with the second blockchain receives cross-chain transaction data sent by the cross-chain relay device i among the N cross-chain relay devices; the cross-chain transaction data is generated by the first node device when executing the target cross-chain business based on the on-chain business verification contract in the cross-chain transaction protocol to determine that the target cross-chain business is legitimate, and is forwarded by the first node device to the N cross-chain relay devices; the cross-chain relay device i is used to send the cross-chain transaction data to the second node device when determining that the cross-chain transaction data is valid based on the off-chain data verification contract in the cross-chain transaction protocol, the target cross-chain business is associated with the first blockchain and the second blockchain maintained by the first node device, the first node device and the second node device both satisfy the cross-chain transaction protocol, N is an integer greater than 1, and i is an integer less than or equal to N;

[0014] Based on the on-chain business execution contract in the cross-chain transaction protocol, the validity of the received cross-chain transaction data is verified to obtain the data verification result;

[0015] When the data verification result indicates that the cross-chain transaction data is valid, the cross-chain transaction data is processed.

[0016] On the one hand, an embodiment of the present application provides a data processing method based on blockchain, including:

[0017] A cross-chain relay device i among the N cross-chain relay devices receives the cross-chain transaction data sent by the first node device; the cross-chain transaction data is generated by the first node device when it determines that the target cross-chain business is legitimate based on the on-chain business verification contract in the cross-chain transaction protocol, and is forwarded by the first node device to the N cross-chain relay devices; the target cross-chain business is associated with the first blockchain maintained by the first node device and the second blockchain maintained by the second node device, and both the first node device and the second node device meet the cross-chain transaction protocol, N is an integer greater than 1, and i is an integer less than or equal to N.

[0018] Verify the validity of cross-chain transaction data according to the off-chain data verification contract in the cross-chain transaction protocol;

[0019] If the cross-chain transaction data is valid, the cross-chain transaction data is sent to the second node device; the second node device is used to process the cross-chain transaction data when determining that the received cross-chain transaction data is valid.

[0020] An embodiment of the present application provides, on one hand, a blockchain-based data processing device, comprising:

[0021] A first receiving module is configured to receive, at a first node device associated with a first blockchain, a cross-chain transaction request sent by a service terminal; the cross-chain transaction request includes service description information of a target cross-chain service associated with the first blockchain and the second blockchain, and the first node device and the second node device maintaining the second blockchain both meet the cross-chain transaction protocol;

[0022] The first verification module is used to call the on-chain business verification contract in the cross-chain transaction protocol, verify the legitimacy of the target cross-chain business based on the business description information, and obtain the business verification result;

[0023] The execution module is used to call the on-chain business execution contract in the cross-chain transaction protocol if the business verification result indicates that the target cross-chain business is legitimate, execute the target cross-chain business, and obtain cross-chain transaction data;

[0024] The first sending module is used to send cross-chain transaction data to N cross-chain relay devices associated with the cross-chain transaction protocol; the cross-chain relay device i among the N cross-chain relay devices is used to send the cross-chain transaction data to the second node device when it is determined that the cross-chain transaction data is valid based on the off-chain data verification contract in the cross-chain transaction protocol; the second node device is used to process the cross-chain transaction data when it is determined that the received cross-chain transaction data is valid, where N is a positive integer greater than 1, and i is a positive integer less than or equal to N.

[0025] An embodiment of the present application provides, on one hand, a blockchain-based data processing device, comprising:

[0026] A second receiving module is configured to receive, by a second node device associated with a second blockchain, cross-chain transaction data sent by a cross-chain relay device i among N cross-chain relay devices; the cross-chain transaction data is generated by executing a target cross-chain business when the first node device determines that the target cross-chain business is legitimate based on the on-chain business verification contract in the cross-chain transaction protocol, and is forwarded by the first node device to the N cross-chain relay devices; the cross-chain relay device i is configured to send the cross-chain transaction data to the second node device when the cross-chain transaction data is determined to be valid based on the off-chain data verification contract in the cross-chain transaction protocol, the target cross-chain business is associated with the first blockchain and the second blockchain maintained by the first node device, the first node device and the second node device both satisfy the cross-chain transaction protocol, N is an integer greater than 1, and i is an integer less than or equal to N;

[0027] The verification module is used to execute the contract based on the on-chain business in the cross-chain transaction protocol, verify the validity of the received cross-chain transaction data, and obtain the data verification result;

[0028] The data processing module is used to process the cross-chain transaction data when the data verification result indicates that the cross-chain transaction data is valid.

[0029] An embodiment of the present application provides, on one hand, a blockchain-based data processing device, comprising:

[0030] The third receiving module is used for the cross-chain relay device i among the N cross-chain relay devices to receive the cross-chain transaction data sent by the first node device; the cross-chain transaction data is generated by the first node device when the target cross-chain business is determined to be legitimate based on the on-chain business verification contract in the cross-chain transaction protocol, and is forwarded by the first node device to the N cross-chain relay devices; the target cross-chain business is associated with the first blockchain maintained by the first node device and the second blockchain maintained by the second node device, and both the first node device and the second node device meet the cross-chain transaction protocol, N is an integer greater than 1, and i is an integer less than or equal to N.

[0031] The second verification module is used to verify the validity of cross-chain transaction data based on the off-chain data verification contract in the cross-chain transaction protocol;

[0032] The second sending module is used to send the cross-chain transaction data to the second node device if the cross-chain transaction data is valid; the second node device is used to process the cross-chain transaction data when determining that the received cross-chain transaction data is valid.

[0033] In one aspect, an embodiment of the present application provides a computer device, including: a processor and a memory;

[0034] The processor is connected to a memory, wherein the memory is used to store a computer program. When the computer program is executed by the processor, the computer device executes the method provided in the embodiment of the present application.

[0035] On the one hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. The computer program is suitable for being loaded and executed by a processor so that a computer device having the processor executes the method provided by the embodiment of the present application.

[0036] In one aspect, embodiments of the present application provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method provided in the embodiments of the present application.

[0037] In an embodiment of the present application, a cross-chain transaction protocol is provided, which includes an on-chain part and an off-chain part. The on-chain part includes an on-chain business verification contract (used to verify the legitimacy of the cross-chain business), an on-chain business execution contract (used to execute the cross-chain business), and the entry conditions for the node devices corresponding to the blockchain to join the cross-chain transaction (i.e., risk control rules); the off-chain part includes an off-chain data verification contract used by the cross-chain relay device to verify the validity of the cross-chain transaction data to be forwarded. Through these contracts in the cross-chain transaction protocol, cross-chain business processing can be automatically realized, thereby improving the efficiency and security of cross-chain business processing. In actual applications, when the first node device receives a cross-chain transaction request sent by the business terminal, it calls the on-chain business verification contract in the cross-chain transaction protocol to verify the legitimacy of the target cross-chain business in the cross-chain transaction request. If the target cross-chain business is legitimate, the on-chain business execution contract in the cross-chain transaction protocol is called to execute the target cross-chain business to obtain cross-chain transaction data. It can be seen that the legitimacy of the target cross-chain business is verified through the on-chain business verification contract. The target cross-chain business will only be executed when it is legitimate, which can effectively improve the security of cross-chain business processing.

[0038] Furthermore, the first node device can send cross-chain transaction data to N cross-chain relay devices associated with the cross-chain transaction protocol. Cross-chain relay device i among the N cross-chain relay devices is used to send the cross-chain transaction data to the second node device when it determines that the cross-chain transaction data is valid based on the off-chain data verification contract in the cross-chain transaction protocol. In this way, by having N cross-chain relay devices verify the validity of the cross-chain transaction data and forward valid cross-chain transaction data, decentralization can be achieved, avoiding the risk of centralized malicious behavior when relying on third-party cross-chain relay devices to forward cross-chain transaction data (such as a third-party cross-chain relay device forwarding and submitting cross-chain transaction data to the second blockchain even when the cross-chain transaction data is not valid). At the same time, by having the cross-chain relay device verify the validity of the cross-chain transaction data, it can avoid the need to send large amounts of ledger structure data on the first blockchain to the second blockchain (for the second blockchain to verify the validity of the cross-chain transaction data based on the large amount of ledger structure data), which would result in higher cross-chain business processing costs and lower efficiency. This can reduce cross-chain business processing costs and improve cross-chain business processing efficiency. The second node device processes the cross-chain transaction data only when it determines that the received cross-chain transaction data is valid, which can improve the security of the cross-chain transaction. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0040] FIG1a is a schematic diagram of a blockchain structure provided by an embodiment of the present application;

[0041] FIG1b is a schematic diagram of a block generation method provided in an embodiment of the present application;

[0042] FIG2 is a schematic diagram of a hierarchical structure of a blockchain network provided in an embodiment of the present application;

[0043] FIG3 is a schematic diagram of the structure of a blockchain network applied to electronic bills according to an embodiment of the present application;

[0044] FIG4 is a schematic diagram of an invoice application scenario of a blockchain-based data processing method provided in an embodiment of the present application;

[0045] FIG5 is a schematic diagram of a scenario of a blockchain-based data processing method provided in an embodiment of the present application;

[0046] FIG6 is a flowchart of a blockchain-based data processing method provided in an embodiment of the present application;

[0047] FIG7 is a flowchart of a blockchain-based data processing method provided in an embodiment of the present application;

[0048] FIG8 is a flowchart of a blockchain-based data processing method provided in an embodiment of the present application;

[0049] FIG9 is a schematic diagram of a cross-chain transaction provided in an embodiment of the present application;

[0050] FIG10 is a schematic diagram of the structure of a blockchain-based data processing device provided in an embodiment of the present application;

[0051] FIG11 is a schematic diagram of the structure of a blockchain-based data processing device provided in an embodiment of the present application;

[0052] FIG12 is a schematic diagram of the structure of a blockchain-based data processing device provided in an embodiment of the present application;

[0053] FIG13 is a schematic diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0055] Blockchain is a new application model for computer technologies, including distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a series of data blocks linked using cryptographic methods. Each block contains information about a batch of online transactions, used to verify the validity of this information (to prevent counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, the platform product and service layer, and the application service layer. A blockchain is composed of multiple blocks. See Figure 1a. Figure 1a is a schematic diagram of a blockchain structure provided by an embodiment of the present application. As shown in Figure 1a, a blockchain is composed of multiple blocks. The genesis block includes a block header and a block body. The block header stores the input information feature value, version number, timestamp and difficulty value, and the block body stores the input information; the next block of the genesis block uses the genesis block as the parent block, and the next block also includes a block header and a block body. The block header stores the input information feature value of the current block, the block header feature value, version number, timestamp and difficulty value of the parent block, and so on, so that the block data stored in each block in the blockchain is associated with the block data stored in the parent block, thereby ensuring the security of the input information in the block.

[0056] When generating each block in the blockchain, refer to Figure 1b, which is a schematic diagram of a block generation provided by an embodiment of the present application. When the node receives the input information, it verifies the input information. After completing the verification, it stores the input information in the memory pool and updates its hash tree for recording the input information. After that, it updates the update timestamp to the time when the input information is received, and tries different random numbers, performing eigenvalue calculations multiple times. When the calculation satisfies the target random number, the information can be stored accordingly, and the block header and block body are generated to obtain the current block. Subsequently, the blockchain can broadcast the newly generated current block externally, that is, send the current block to other nodes in the data sharing system where it is located. Each node in the data sharing system stores the same blockchain, and other nodes verify the current block and add the current block to the blockchain stored thereafter.

[0057] The underlying blockchain platform includes processing modules such as user management, basic services, and smart contracts. The user management module manages the identity information of all blockchain participants, including maintaining public and private key generation (account management), key management, and maintaining the correspondence between user real identities and blockchain addresses (permission management). It also detects and audits transactions involving certain real identities, providing risk control rule configuration (risk control auditing), with authorization. The basic service module, deployed on all blockchain nodes, verifies the validity of service requests and, after reaching consensus on valid requests, records them in storage. For a new service request, the basic service first adapts and parses the interface and performs authentication (interface adaptation). It then encrypts the service information using a consensus algorithm (consensus management). After encryption, the encrypted information is transmitted completely and consistently to the shared ledger (network communication) and recorded for storage. The smart contract module is responsible for contract registration, issuance, contract triggering, and contract execution. Developers can define contract logic in a programming language and publish it to the blockchain (contract registration). Based on the contract terms, key calls or other events trigger execution, completing the contract logic. The module also provides the ability to upgrade and cancel contracts. Smart contracts refer to computerized protocols that can execute the terms of a contract and are deployed on a shared ledger. Smart contracts are used to implement code that is executed when certain conditions are met. The code is used to complete automated transactions based on actual business needs.

[0058] Please refer to Figure 2, which is a schematic diagram of a blockchain network hierarchical structure provided in an embodiment of the present application. The blockchain network hierarchical structure in the embodiment of the present application may be the blockchain network 1W shown in Figure 2. The complete blockchain business system corresponding to the blockchain network 1W may be composed of the business network shown in Figure 2, the core consensus network, and the routing proxy network where the proxy node 10D is located.

[0059] It should be understood that the number of proxy nodes in the routing proxy network can be one or more, which is not limited here. The embodiment of the present application takes the proxy node 10D as an example. The proxy node 10D can be used to isolate the business network and the core consensus network. The proxy node 10D can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. It is not limited here. The proxy node 10D can layer the peer-to-peer (P2P) network to form a layered structure such as "business network-core consensus network", which can improve the confidentiality and security of data on the blockchain.

[0060] Among them, the blockchain node system corresponding to the business network (i.e., witness network) shown in Figure 2 may include one or more blockchain nodes, and the number of nodes in the blockchain node system corresponding to the business network will not be limited here. For example, the blockchain node system corresponding to the business network may specifically include node 110a, node 110b, node 110c, node 110d, node 110e, node 110f, node 110g, ..., node 110n. It should be understood that in the embodiment of the present application, the blockchain node in the business network can be referred to as a business node. The business node does not need to participate in the bookkeeping consensus and is mainly used to execute transaction business to obtain transaction data associated with the transaction business. Among them, the business node here can be a full node containing a complete blockchain database, or a lightweight node that stores part of the data in the blockchain database, and it will not be limited here. In order to reduce the waste of storage space of the business node, the business node in the embodiment of the present application can be a lightweight node (Simplified Payment Verification, abbreviated as SPV) as an example. The business node does not need to store complete transaction data, but obtains block header data and partially authorized visible block data (for example, transactions associated with the business node itself) from the core consensus network shown in Figure 2 through the proxy node 10D.

[0061] Among them, the blockchain node system corresponding to the core consensus network shown in Figure 2 may also include one or more blockchain nodes, and the number of nodes in the blockchain node system corresponding to the core consensus network will not be limited here. For example, the blockchain node system corresponding to the core consensus network may specifically include node 120a, node 120b, node 120c, node 120d, node 120e, node 120f, node 120g, ..., node 120m. It should be understood that in the embodiment of the present application, the nodes in the core consensus network can be referred to as consensus nodes (i.e., accounting nodes), and the consensus nodes can run a blockchain consensus protocol.

[0062] It should be understood that in the embodiments of the present application, the proxy nodes, business nodes, and consensus nodes can be collectively referred to as blockchain nodes in the blockchain network 1W. Among them, the blockchain node can be a server connected to the blockchain network 1W, or it can be a user terminal connected to the blockchain network 1W. The specific form of the blockchain node is not limited here. It is understandable that the business network and the core consensus network shown in Figure 2 can be in different network environments. For example, generally speaking, the business node is deployed in the business network on the public network, while the consensus node running the blockchain consensus protocol is deployed in the private core consensus network. The two can interact through the routing boundary. The business node can be connected to the consensus network after meeting certain requirements, but because the consensus network is in a relatively secure private cloud, its mutual access is guaranteed by the consensus mechanism and has high security. The business node is in the public network and may be accessed by other uncertain network terminals. Therefore, the behavior of the business node and other possible nodes in accessing the consensus network needs to be strictly controlled.

[0063] As shown in FIG3 , FIG3 is a schematic diagram of the structure of a blockchain network applied to electronic bills provided in an embodiment of the present application. As shown in FIG3 , when the blockchain network in FIG2 is applied to the electronic bill scenario, the blockchain network can record the transaction data generated during the entire circulation process of the electronic bill. As shown in FIG3 , the blockchain network includes a business network 31a, a consensus network 33c, and a routing layer 32b. The circulation process of the electronic bill includes the application for the electronic bill, the issuance of the electronic bill, the reimbursement of the electronic bill, the tax declaration of the electronic bill, and other processes. The issuance of the electronic bill is also called the generation of the electronic bill.

[0064] Because the entire electronic invoice circulation process involves roles including management agencies, invoicing parties, reimbursement parties, and taxpayers, the business network 31a includes a dedicated management network 311a that provides services for the management agency; a public cloud 312a that provides services for invoicing parties, reimbursement parties, and taxpayers; and a private cloud 313a that provides electronic invoice storage services for consumers. The dedicated management network 311a includes computer equipment used by the management agency involved in electronic invoices, including a management terminal 3111a. The management terminal can access the dedicated management network 311a. The public cloud 312a includes computer equipment used by the invoicing parties, reimbursement parties, and taxpayers involved in electronic invoices, including an invoicing party terminal 3121a, a reimbursement party terminal 3122a, and a taxpayer terminal 3123a. The invoicing party can be an invoicing service provider, the reimbursing party can be a reimbursement service provider, and the enterprise terminal can access the public cloud 312a. Private cloud 313a includes computer devices used by users of electronic invoices, including payment terminals 3131a for making payments, electronic invoice circulation terminals 3132a for temporarily storing electronic invoices for users, and some enterprise-specific terminals 3133a. Consumer terminals can access private cloud 313a. Computer devices in the management agency's private network 311a, public cloud 312a, and private cloud 313a can all act as service nodes to send data upload requests or data query requests for electronic invoices to the consensus network 33c via the routing layer 32b.

[0065] It is understood that any routing node in the routing layer 32b includes functional modules that provide authentication services 321b, certificate cache 322b, routing services 323b, and P2P services 324b. Authentication services 321b are used to authenticate business nodes in the business network 31a, certificate cache 322b is used to cache the identity certificates of each node, routing services 323b are used to achieve network isolation between the business network 31a and the consensus network 33c, and P2P services 324b are used to allocate tasks between routing nodes, forming a peer-to-peer (P2P) network between routing nodes. The P2P protocol is an application layer protocol that runs on top of the Transmission Control Protocol (TCP).

[0066] Consensus network 33c includes multiple consensus branch networks, such as blockchain network 1 331c, blockchain network 2 332c, and blockchain network 3 333c. Each consensus branch network includes multiple consensus nodes (i.e., consensus node devices). The multiple consensus nodes in each consensus branch network maintain the blockchain corresponding to that consensus branch network. For example, the multiple consensus nodes included in blockchain network 1 331c are used to maintain blockchain 1 corresponding to blockchain network 1 331c. The different blockchains in consensus network 33c function differently. For example, some blockchains are used to record transaction information related to electronic bills belonging to a certain bill number range, while others are used to record transaction information related to cancelled electronic bills. When data related to electronic bills needs to be recorded, the blockchain to be recorded can be determined based on the permissions of the business node, and then the consensus branch network maintaining that blockchain will record the data. Consensus nodes can typically be computer devices used by administrative agencies in various regions.

[0067] The consensus nodes in each consensus branch network include permission contracts, which store the flow logic for the entire lifecycle of an electronic bill, such as its status, flow process, data access permissions, conditions for claiming and issuing electronic bills, and so on. Consensus nodes also include caches and data blocks, which support the uploading and querying of transaction information. It is understood that this solution can enable cross-chain data transactions between different blockchains, such as cross-chain data transactions between different blockchains in business network 31a as shown in Figure 3, or cross-chain data transactions between blockchains in business network 31a and consensus network 33c, or cross-chain data transactions between different blockchains in consensus network 33c.

[0068] It should be understood that "cross-chain" refers to the process of trading data between blockchain networks. "Cross-chain" can achieve secure interaction between different blockchain networks, thereby integrating decentralized digital resources into a single blockchain network.

[0069] In the embodiments of the present application, the first blockchain network to which the first blockchain belongs can be the same as the second blockchain network to which the second blockchain belongs. This means that the present application can enable cross-chain communication between different blockchains within the same blockchain network. For example, both the first blockchain and the second blockchain are blockchains within the consensus network 33c described above, e.g., the first blockchain can be blockchain one and the second blockchain can be blockchain two. Of course, the blockchain network to which the first blockchain belongs in the implementation of the present application can be different from the blockchain network to which the second blockchain belongs. This means that the present application can enable cross-chain communication between different blockchains within different blockchain networks. For example, the first blockchain network to which the first blockchain belongs is the business network 31a, and the second blockchain network to which the second blockchain belongs is the consensus network 33c.

[0070] It should be noted that all node devices in the blockchain network involved in the embodiments of the present application can be mobile phones, tablet computers, laptops, PDAs, mobile Internet devices (MIDs), vehicles, roadside devices, aircraft, wearable devices, such as smart watches, smart bracelets, pedometers and other smart devices with data processing functions, and the device type corresponding to each node device can be the same or different.

[0071] It is understood that the first blockchain in the embodiments of the present application can refer to any blockchain in consensus network 33c shown in FIG3 . For example, the first blockchain can refer to blockchain 1 corresponding to blockchain network 1 331c in consensus network 33c, or blockchain 2 corresponding to blockchain network 2 332c in consensus network 33c, or any other blockchain in consensus network 33c. Of course, the first blockchain in the embodiments of the present application can also refer to any blockchain in the business network. The second blockchain in the embodiments of the present application is different from the first blockchain. The blockchain network to which the first blockchain belongs can be different from or the same as the second blockchain network. For example, the first blockchain belongs to a blockchain in consensus network 33c, and the second blockchain belongs to a blockchain in business network 31a. Of course, the first blockchain and the second blockchain each belong to a different blockchain in consensus network 33c. The second blockchain can also refer to any blockchain in consensus network 33c shown in FIG3 , or any blockchain in business network 31a.

[0072] Specifically, the blockchain-based data processing method provided in the embodiments of the present application can be applied to various scenarios in the blockchain field to realize cross-chain transactions between different blockchains in the blockchain field. For example, the blockchain-based data processing method provided in the embodiments of the present application can be applied to on-chain asset transactions between different blockchains (such as asset transfer, asset locking or asset freezing, etc.), such as transferring assets on a first blockchain to a second blockchain. The blockchain-based data processing method provided in the embodiments of the present application can be applied to on-chain information sharing between different blockchains, such as sharing information on a first blockchain with a second blockchain. Of course, the blockchain-based data processing method provided in the embodiments of the present application can be applied to on-chain transaction transfers between different blockchains, such as transferring pending transactions on a first blockchain to a second blockchain to achieve performance expansion and reduce the burden on the first blockchain. Of course, it can also be applied to other cross-chain transaction application scenarios, and the embodiments of the present application will not be repeated here.

[0073] Please refer to Figure 4, which is a schematic diagram of an invoice application scenario of a blockchain-based data processing method provided by an embodiment of the present application. As shown in Figure 4, a blockchain-based data processing method in the present application can be applied to an invoice application scenario. The invoice application scenario is a multi-chain architecture, such as a management chain, an invoice chain, an application contract chain, and a subchain z1. Each blockchain has a corresponding core chain (i.e., a blockchain in a consensus network) and a corresponding business node network (i.e., a knowledge network). Different chains can conduct cross-chain communication transactions through a cross-chain transaction protocol. As shown in Figure 4, individual objects and business organizations can submit their business transaction requests to the management chain through the business management department entrance. The management chain is deployed with a global management information contract for managing relevant information of individual objects or business organizations (such as invoice information for individual objects or business organizations applying for startup). At the same time, the management chain includes business metadata management for managing business description information of related businesses submitted to the management chain (such as business identification, business initiation object information, business initiation time, etc.). The full node of the management chain can store all the information of the business submitted on the management chain (such as the block information about the business submission), and the business management department can obtain the information recorded in the full node of the management chain.

[0074] As shown in Figure 4, local invoice nodes d1, d2, application invoice nodes, and subchain invoice nodes can submit business transaction requests to the invoice chain through the invoice business portal. This invoice chain is deployed with a global information cross-chain contract, an invoice permission clearing contract, an invoice node permission contract, and an invoice business contract, all of which are used to process submitted business transaction requests. The invoice chain's full node stores all business information submitted on the invoice chain, and the invoice data center can access the information recorded in the full node of the invoice chain. Application invoice nodes can submit business transaction requests to the application contract chain through the derived business portal. This application contract chain is deployed with a global information cross-chain contract, an application node permission contract, various business application contracts (including a data clearing interface), and a general data clearing contract, all of which are used to process submitted business transaction requests. The application contract chain's full node stores all business information submitted on the application contract chain, and business collaboration and related departments can access the information recorded in the full node of the application contract chain. The sub-chain invoice node can submit business transaction requests to the sub-chain z1 (or other sub-chains) through the derivative business entrance. The sub-chain z1 is deployed with a global information cross-chain contract, a sub-chain node permission contract, a dedicated business application contract (including a data clearing interface) and a general data clearing contract, all of which are used to process the submitted business transaction requests.

[0075] As shown in Figure 4, the management chain, invoice chain, application contract chain, and subchain z1 can all conduct cross-chain transactions using the cross-chain technology described in this application, using a cross-chain relay device. Specifically, taking the cross-chain transaction between the management chain and the invoice chain as an example, after executing a cross-chain transaction request submitted by an individual, the management chain can verify the legitimacy of the target cross-chain transaction in the cross-chain transaction request. If the target cross-chain transaction is valid, it executes the target cross-chain transaction and obtains cross-chain transaction data. Furthermore, the cross-chain transaction data can be forwarded to the invoice chain via a cross-chain relay device. Once the invoice chain determines that the cross-chain transaction data is valid, it processes the cross-chain transaction data, thus enabling cross-chain transactions between different blockchains.

[0076] For easier understanding, please refer to FIG. 5 , which is a schematic diagram illustrating a scenario of a blockchain-based data processing method provided in an embodiment of the present application. As shown in FIG. 5 , a first blockchain 512 belongs to a first blockchain network 510 , which is composed of multiple blocks. The first blockchain network 510 to which the first blockchain 512 belongs may be the aforementioned core consensus network, and the first blockchain 512 may be blockchain one corresponding to blockchain network one 331c within the aforementioned core consensus network. As shown in FIG. 5 , a second blockchain 532 belongs to a second blockchain network 530 , which is also composed of multiple blocks. The second blockchain network 530 to which the second blockchain 532 belongs may also be the aforementioned core consensus network, and the second blockchain 532 may be blockchain two corresponding to blockchain network two 332c within the aforementioned core consensus network. The first node device 511 may be any one of the one or more node devices maintaining the first blockchain 512 , and the second node device 531 may be any one of the one or more node devices maintaining the second blockchain 532 . The business terminal 500 may refer to a business node that maintains the first blockchain 512, or may refer to a terminal device that has data communication with the first node device 511 (such as a consumer terminal, enterprise terminal, etc. in Figure 3).

[0077] Node devices in different blockchains must comply with the cross-chain transaction protocol when conducting cross-chain transactions. This compliance can mean jointly developing or joining a cross-chain transaction protocol and conducting cross-chain transactions based on it. The cross-chain transaction protocol is a protocol used for interaction and communication between different blockchains. It addresses the issues of isolation and interoperability between blockchains, allowing for the cross-chain transfer and exchange of data and assets between them. The cross-chain transaction protocol includes a series of technical and protocol specifications, including consensus algorithms, encryption techniques, smart contracts, and inter-chain communication protocols. Node devices on different blockchains must adhere to these technical and protocol specifications when conducting cross-chain transactions. The first node device 511 and the second node device 531 both comply with the cross-chain transaction protocol, enabling cross-chain transactions between the first node device 511 maintaining the first blockchain 512 and the second node device 531 maintaining the second blockchain 532.

[0078] As shown in Figure 5, the business object 501 can refer to the object held or operated by the business terminal 500. The business object 501 can generate a cross-chain transaction request through the business terminal 500. The cross-chain transaction request includes the business description information of the target cross-chain business associated with the first blockchain and the second blockchain. The target cross-chain business can refer to a cross-chain asset transfer business (such as transferring digital assets on the first blockchain to the second blockchain), or a cross-chain information sharing business (such as sharing information on the first blockchain with the second blockchain), or a cross-chain transaction transfer business (such as transferring transactions on the first blockchain to the second blockchain to reduce the operating burden of the first blockchain). Among them, the business description information is the description information of the target cross-chain business. When the target cross-chain business is to transfer digital assets on the first blockchain to the second blockchain, the business description information of the target cross-chain business may include the asset transfer-out account on the first blockchain, the transfer-out asset amount, the transfer-out asset type, the second blockchain identifier, the asset transfer-in account on the second blockchain, the business identifier of the target cross-chain business, etc. Further, the business terminal 500 can send the cross-chain transaction request initiated by the business object 501 to the first node device 511.

[0079] Specifically, the first node device 511 can call the on-chain business verification contract in the cross-chain transaction protocol. The on-chain business verification contract called by the first node device 511 can refer to a smart contract deployed on the first blockchain. The node devices maintaining the first blockchain can call it when conducting cross-chain transactions. The on-chain business verification contract is used to verify the legitimacy of the target cross-chain business in the cross-chain transaction request to verify whether the target cross-chain business is a risky transaction (such as illegal asset transactions, leakage of important information (such as privacy)). Furthermore, the first node device 511 can verify the legitimacy of the target cross-chain business based on the on-chain business verification contract and the business description information, such as verifying whether the target cross-chain business is a risky transaction, and obtain a business verification result.

[0080] It is understandable that if the business verification result indicates that the target cross-chain business is not legitimate (i.e., the target cross-chain business is a risky transaction), the first node device 511 does not execute the target cross-chain business. If the business verification result indicates that the target cross-chain business is legitimate (i.e., the target cross-chain business is not a risky transaction), the first node device 511 can call the on-chain business execution contract in the cross-chain transaction protocol. The on-chain business execution contract called by the first node device 511 can be a smart contract deployed on the first blockchain. The on-chain business execution contract can refer to a cross-chain bridge contract, which processes the received target cross-chain business based on the business processing rules agreed upon in the cross-chain bridge contract and the cross-chain communication protocol. It can be seen that the legitimacy of the target cross-chain business is verified by the on-chain business verification contract, and the target cross-chain business will only be executed when the target cross-chain business is legitimate, which can effectively improve the security of cross-chain transactions.

[0081] The first node device 511 can call the on-chain business execution contract to execute the target cross-chain business and obtain cross-chain transaction data. For example, if the target cross-chain business is to transfer a digital asset on a first blockchain to a second blockchain, the first node device 511 can call the on-chain business execution contract to lock the asset specified by the target cross-chain business on the first blockchain, obtain an asset lock event indicating that the asset specified by the target cross-chain business on the first blockchain has been locked, and generate an asset release request for instructing the second blockchain to release the asset specified by the target cross-chain business to the asset transfer account on the second blockchain, and determine the asset lock event and asset release request as the cross-chain transaction data of the target cross-chain business.

[0082] Furthermore, the first node device 511 may send cross-chain transaction data to N cross-chain relay devices 520 associated with the cross-chain transaction protocol. As shown in FIG5 , the N cross-chain relay devices 520 include a cross-chain relay device 521, a cross-chain relay device 522, a cross-chain relay device 523, and so on, where N is a positive integer greater than 1. It is understood that the first node device 511 may send cross-chain transaction data to each of the N cross-chain relay devices 520, that is, the first node device 511 may send cross-chain transaction data to the cross-chain relay device 521, send cross-chain transaction data to the cross-chain relay device 522, send cross-chain transaction data to the cross-chain relay device 523, and so on. Of course, the first node device 511 can also lock the assets specified by the target cross-chain business through the on-chain business execution contract, and then issue a business success submission event for the target cross-chain business. The N cross-chain relay devices can detect the cross-chain business execution contracts on each blockchain. When the N cross-chain relay devices detect the business success submission event issued by the first blockchain, the cross-chain transaction data of the target cross-chain business can be obtained from the first blockchain.

[0083] Cross-chain relay device i among the N cross-chain relay devices 520 obtains an off-chain data verification contract (e.g., off-chain data verification rules) based on the cross-chain transaction protocol. This off-chain data verification contract is used to verify the validity of the cross-chain transaction data, that is, to verify the authenticity of the cross-chain transaction data. For example, if the cross-chain transaction data includes an asset lock event, cross-chain relay device i can verify whether the asset lock event has been executed on the first blockchain. Upon determining that the cross-chain transaction data is valid, cross-chain relay device i can forward and submit the cross-chain transaction data to the second blockchain (e.g., to the second node device that maintains the second blockchain). Wherein, cross-chain relay device i is any one of the N cross-chain relay devices 520, and i is a positive integer less than or equal to N. It is understood that each cross-chain relay device among the N cross-chain relay devices 520 can verify the validity of the cross-chain transaction data sent by the first node device 511, and upon determining that the cross-chain transaction data is valid, forward and submit the cross-chain transaction data to the second blockchain.

[0084] As shown in Figure 5, cross-chain relay device 521 determines that the cross-chain transaction data is valid and forwards the cross-chain transaction data to the second node device 531. Cross-chain relay device 522 determines that the cross-chain transaction data is not valid and does not forward the cross-chain transaction data. Cross-chain relay device 523 determines that the cross-chain transaction data is valid and forwards the cross-chain transaction data to the second node device 531, etc. In this way, other cross-chain relay devices in the N cross-chain relay devices 520 can also verify the validity of the cross-chain transaction data and forward it to the second node device 531 after determining that the cross-chain transaction data is valid. Among them, when cross-chain relay device i forwards and submits the cross-chain transaction data to the second blockchain, it will sign the cross-chain transaction data and forward the signed cross-chain transaction data to the second blockchain. It can be understood that the behavior of cross-chain relay device i forwarding and submitting the signed cross-chain transaction data to the second blockchain can be understood as a voting behavior on the cross-chain transaction data (i.e., determining that the cross-chain transaction data is valid). When cross-chain relay device i determines that cross-chain transaction data is not valid (e.g., the cross-chain transaction data is not authentic), it will not forward the cross-chain transaction data to the second blockchain. In this way, by having N cross-chain relay devices verify the validity of cross-chain transaction data, decentralization can be achieved, avoiding the risk of centralized malicious behavior when relying on third-party cross-chain relay devices to forward cross-chain transaction data (e.g., a third-party cross-chain relay device forwards and submits cross-chain transaction data to the second blockchain even when the cross-chain transaction data is not valid). At the same time, by having cross-chain relay devices verify the validity of cross-chain transaction data, it can avoid sending large amounts of ledger structure data on the first blockchain to the second blockchain (so that the second blockchain can verify the validity of the cross-chain transaction data based on this large amount of ledger structure data), which can lead to higher cross-chain transaction costs and lower efficiency.

[0085] As shown in Figure 5, second node device 531 can receive cross-chain transaction data forwarded by cross-chain relay device i, which can be cross-chain relay device 521, cross-chain relay device 523, or the like. Second node device 531 counts the number of cross-chain devices sending cross-chain transaction data and obtains the relay quantity threshold configured in the cross-chain business execution contract in the cross-chain transaction protocol. Furthermore, second node device 531 can verify the validity of the cross-chain transaction data based on the number of cross-chain devices sending the cross-chain transaction data and the relay quantity threshold. Specifically, second node device 531 can compare the number of cross-chain devices sending the cross-chain transaction data with the relay quantity threshold. If the number of devices is greater than or equal to the relay quantity threshold, indicating that the majority of cross-chain relay devices have determined that the cross-chain transaction data is valid, the cross-chain transaction data is determined to be valid and the cross-chain transaction data is executed. If the number of devices is less than the relay quantity threshold, indicating that the majority of cross-chain relay devices have determined that the cross-chain transaction data is not valid, the cross-chain transaction data is determined to be not valid and the cross-chain transaction data is not executed.

[0086] For example, the number of N cross-chain relay devices is 5, and the relay number threshold is 3. If the second node device 531 receives cross-chain transaction data sent by 5 or more cross-chain relay devices, it can be determined that the cross-chain transaction is valid. If the second node device 531 receives cross-chain transaction data sent by 3 or less cross-chain relay devices, it can be determined that the cross-chain transaction is not valid. In this way, by determining the validity of cross-chain transaction data based on the number of cross-chain relay devices that send cross-chain transaction data, decentralization can be achieved, avoiding the risk of centralized malicious behavior by third-party cross-chain relay devices (such as third-party cross-chain relay devices forwarding and submitting cross-chain transaction data to the second blockchain when the cross-chain transaction data is not valid).

[0087] It can be seen that the embodiment of the present application verifies the legitimacy of the target cross-chain business through the on-chain business verification contract, and only executes the target cross-chain business when the target cross-chain business is legitimate, which can effectively improve the security of cross-chain transactions. At the same time, by verifying the validity of cross-chain transaction data through N cross-chain relay devices, decentralization can be achieved, avoiding the risk of centralized malicious behavior of third-party cross-chain relay devices (such as third-party cross-chain relay devices forwarding cross-chain transaction data to the second blockchain when the cross-chain transaction data is not valid). At the same time, the efficiency of cross-chain transactions can also be improved, avoiding the need to send a large amount of ledger structure data on the first blockchain to the second blockchain (so that the second blockchain can verify the validity of the cross-chain transaction data based on a large amount of ledger structure data), resulting in higher cross-chain transaction costs and lower efficiency.

[0088] Further, please refer to Figure 6, which is a flow chart of a data processing method based on blockchain provided by an embodiment of the present application. As shown in Figure 6, the method can be executed by a first node device that maintains a first blockchain in a blockchain network. The blockchain network can refer to the above-mentioned core consensus network, or the above-mentioned business network, or other blockchain networks. The embodiment of the present application is not limited here. The first node device can be a server connected to the blockchain network, or a terminal device connected to the blockchain network. The first node device can refer to any node device among the node devices that maintain the first blockchain. The specific form of the first node device is not limited here. The method may at least include but is not limited to the following steps:

[0089] S101: A first node device associated with a first blockchain receives a cross-chain transaction request sent by a business terminal.

[0090] Specifically, the first node device associated with the first blockchain can refer to the node device that maintains the first blockchain. It is understood that the first blockchain is composed of one or more blocks, and the first node device can refer to the device that generates blocks and uploads them to the first blockchain. The first blockchain can belong to a first blockchain network, which can refer to the core consensus network in Figure 3, or the business network in Figure 3, or other blockchain networks. The business terminal can refer to a business node device that maintains the first blockchain, or a terminal device that communicates data with the node device that maintains the first blockchain. The cross-chain transaction request includes business description information for the target cross-chain business associated with the first and second blockchains, and both the first node device and the second node device that maintains the second blockchain comply with the cross-chain transaction protocol.

[0091] Nodes on different blockchains must comply with the cross-chain transaction protocol when conducting cross-chain transactions. This compliance can mean jointly developing the cross-chain transaction protocol, agreeing to it, and then engaging in cross-chain transactions based on it. The cross-chain transaction protocol is a protocol for interaction and communication between different blockchains. It addresses the issues of isolation and interoperability between blockchains, allowing for the cross-chain transfer and exchange of data and assets between them. The cross-chain transaction protocol encompasses a range of technical and protocol specifications, including consensus algorithms, encryption techniques, smart contracts, and inter-chain communication protocols. Nodes on different blockchains must adhere to these technical and protocol specifications when conducting cross-chain transactions.

[0092] It is understandable that the target cross-chain business is a cross-chain business between the first blockchain and the second blockchain. For example, when the target cross-chain business is to transfer digital assets on the first blockchain to the second blockchain, the business description information of the target cross-chain business may include the asset transfer-out account (first account) on the first blockchain, the amount of the transferred assets, the type of the transferred assets, the second blockchain identifier, the asset transfer-in account (second account) on the second blockchain, the business identifier of the target cross-chain business, etc. For example, when the target cross-chain business is to share status information on the first blockchain with the second blockchain, the business description information of the target cross-chain business may include information attributes of the status information (such as whose status information, such as the asset status information of a digital asset on the first blockchain, such as unlocked status or locked status), the second blockchain identifier, and the business identifier of the target cross-chain business, etc.

[0093] Specifically, a business object associated with a business terminal can initiate a cross-chain transaction request linking the first blockchain with the second blockchain via a cross-chain service frontend provided in the business terminal. The business object associated with the business terminal can refer to an object held or operated on the business terminal device. The cross-chain service frontend provided in the business terminal can be an application client responsible for interacting with cross-chain objects (e.g., business objects). For example, the cross-chain service frontend can take the form of a webpage, an application (i.e., an app), a mini-program, etc. A business object can initiate a cross-chain transaction request linking the first blockchain with the second blockchain on the cross-chain transaction page provided by the cross-chain service frontend. The cross-chain service frontend can send the cross-chain transaction request initiated by the business object to the cross-chain service backend, which can then assemble the cross-chain transaction request and send it to the first blockchain. The first node device maintaining the first blockchain can then receive the cross-chain transaction request. Simultaneously, the cross-chain service backend can obtain the execution status or other information of the target cross-chain transaction and return the execution status or other information of the target cross-chain transaction to the cross-chain service frontend, which can then display the execution status or other information of the target cross-chain transaction. Among them, the cross-chain service backend is a background server, which is mainly used to provide data and blockchain transaction function support for the cross-chain service frontend.

[0094] S102, calling the on-chain business verification contract in the cross-chain transaction protocol, verifies the legitimacy of the target cross-chain business according to the business description information, and obtains the business verification result.

[0095] The first node device can call the on-chain business verification contract in the cross-chain transaction protocol. The on-chain verification contract can refer to a smart contract deployed on the first blockchain. The on-chain business verification contract is used to verify the legitimacy of the cross-chain business to verify whether the cross-chain business is a risky transaction (such as illegal asset transactions, transactions that leak important information (such as privacy), etc.). Specifically, the first node device can call the on-chain business verification contract and verify the legitimacy of the target cross-chain business based on the business description information to obtain a business verification result. The business verification result includes whether the target cross-chain business is legitimate or whether the target cross-chain business is not legitimate. It is understandable that the cross-chain business verification contract can verify the legitimacy of the cross-chain business submitted by the node device maintaining the blockchain. It is deployed and managed by the verification agency in the cross-chain transaction protocol, such as the verification agency setting the content of the on-chain business verification contract and managing the on-chain business verification contract. In this way, by verifying the legitimacy of the target cross-chain business through the on-chain business verification contract, it is possible to identify target cross-chain businesses that are not legitimate, which can effectively improve the security of cross-chain transaction execution.

[0096] Specifically, the first node device calls the on-chain business verification contract in the cross-chain transaction protocol and verifies the legitimacy of the target cross-chain business based on the business description information. The specific method for obtaining the business verification result may include: calling the on-chain business verification contract in the cross-chain transaction protocol, obtaining first business attribute information reflecting the business type of the target cross-chain business and second business attribute information reflecting the business risk of the target cross-chain business from the business description information. Based on the first business attribute information, the business verification type of the target cross-chain business is determined; based on the business verification type and the second business attribute information, the legitimacy of the target cross-chain business is verified to obtain the business verification result.

[0097] Specifically, the first node device can invoke the on-chain business verification contract in the cross-chain transaction protocol and obtain first business attribute information reflecting the business type of the target cross-chain business from the business description information of the target cross-chain business. It is understood that the on-chain business verification contract that the first node device can invoke can be a smart contract deployed on the first blockchain. It is understood that the first business attribute information can be used to reflect the business type of the target cross-chain business. For example, when the target cross-chain business is to transfer digital assets on the first blockchain to the second blockchain, the business description information of the target cross-chain business can include the asset transfer-out account (first account) on the first blockchain, the amount of the transferred assets, the type of the transferred assets, the second blockchain identifier, the asset transfer-in account (second account) on the second blockchain, the business identifier of the target cross-chain business, etc. The first business attribute information can include information such as the asset transfer-out account, the amount of the transferred assets, and the type of the transferred assets. Specifically, the first node device can determine the business verification type of the target cross-chain business based on the first business attribute information. Specifically, the first node device can determine the business verification type of the target cross-chain business based on the asset transfer-out account. The business verification type can include an on-chain business verification type and an off-chain business verification type.

[0098] Among them, the on-chain business verification type refers to verifying the legitimacy of the target cross-chain business on the first blockchain, and the off-chain business verification type may refer to verifying the legitimacy of the target cross-chain business through an off-chain business verification service (such as an off-chain business verification device). It can be understood that the on-chain business verification type refers to the first node device verifying the legitimacy of the target cross-chain business by calling the on-chain business verification contract. The off-chain business verification type may refer to the first node device sending the target cross-chain business to the off-chain business verification device through the on-chain business verification contract, and the off-chain business verification device instructs the business verification object to verify the legitimacy of the target cross-chain business. In other words, the off-chain business verification type may be a manual verification type. Since it is difficult to determine the legitimacy of the target cross-chain business using the on-chain business verification type when the target cross-chain business is a specific cross-chain business, the accuracy of the legitimacy verification of the target cross-chain business can be improved by using the off-chain business verification type.

[0099] Optionally, when the target cross-chain business is a cross-chain asset transfer business, the first business attribute information may include the amount of transferred assets specified by the target cross-chain business (i.e., the amount of digital assets to be transferred), and the specific method for the first node device to determine the business verification type of the target cross-chain business based on the first business attribute information may include: the first node device may obtain the first asset amount threshold configured in the on-chain business verification contract, compare the amount of transferred assets with the first asset amount threshold, and if the amount of transferred assets is greater than or equal to the first asset amount threshold, then the business verification type of the target cross-chain business may be determined to be an off-chain business verification type. Since there is a risk of illegal transfer of assets when the amount of transferred assets is greater than or equal to the first asset amount threshold, the legitimacy of the target cross-chain business is verified by the off-chain business verification type, which can improve the security of cross-chain asset transfer. Of course, if the amount of transferred assets is less than the first asset amount threshold, then the business verification type of the target cross-chain business may be determined to be an off-chain business verification type, which can improve the efficiency of the legitimacy verification of the target cross-chain business.

[0100] Optionally, when the target cross-chain business is a cross-chain asset transfer business, the first business attribute information may include an asset transfer-out account. The specific method for the first node device to determine the business verification type of the target cross-chain business based on the first business attribute information may include: the first node device may obtain the total asset amount corresponding to the asset transfer-out account, and obtain a second asset amount threshold configured in the on-chain business verification contract, and compare the total asset amount of the asset transfer-out account with the second asset amount threshold. If the total asset amount of the asset transfer-out account is greater than or equal to the asset amount threshold, the business verification type of the target cross-chain business may be determined to be an off-chain business verification type. Because the risk of illegal asset transfer is high when the total asset amount of the asset transfer-out account is greater than or equal to the asset amount threshold, verifying the legitimacy of the target cross-chain business through an off-chain business verification type can improve the security of cross-chain asset transfers. Of course, if the total asset amount of the asset transfer-out account is less than the asset amount threshold, the business verification type of the target cross-chain business may be determined to be an off-chain business verification type, which can improve the efficiency of the legitimacy verification of the target cross-chain business.

[0101] Optionally, when the target cross-chain business is a cross-chain asset transfer business, the first business attribute information may include an asset transfer-out account. The specific method for the first node device to determine the business verification type of the target cross-chain business based on the first business attribute information may include: the first node device may obtain the number of asset transfers corresponding to the asset transfer-out account, and obtain the transfer number threshold configured in the on-chain business verification contract, compare the number of asset transfers corresponding to the asset transfer-out account with the transfer number threshold, and if the number of asset transfers corresponding to the asset transfer-out account is greater than or equal to the transfer number threshold, then the business verification type of the target cross-chain business may be determined to be an off-chain business verification type. Because when the number of asset transfers corresponding to the asset transfer-out account is greater than or equal to the transfer number threshold, it indicates that the business object corresponding to the asset transfer account frequently transfers assets, which is prone to the risk of illegal asset transfers. Therefore, verifying the legitimacy of the target cross-chain business through the off-chain business verification type can improve the security of cross-chain asset transfers. Of course, if the number of asset transfers corresponding to the asset transfer-out account is less than the transfer number threshold, then the business verification type of the target cross-chain business can be determined to be an off-chain business verification type, which can improve the efficiency of the legitimacy verification of the target cross-chain business.

[0102] Of course, the first node device can comprehensively determine the business verification type of the target cross-chain business based on the first business attribute information. For example, when the target cross-chain business is a cross-chain asset transfer business, the first node device can comprehensively determine the business verification type of the target cross-chain business based on information such as the asset transfer-out account, the amount of the transferred assets, and the type of the transferred assets. Furthermore, the first node device can obtain second business attribute information that reflects the business risk of the target cross-chain business from the business description information. For example, when the business description information of the target cross-chain business includes information such as the asset transfer-out account (first account) on the first blockchain, the amount of the transferred assets, the type of the transferred assets, the second blockchain identifier, the asset transfer-in account (second account) on the second blockchain, and the business identifier of the target cross-chain business, the second business attribute information may include information such as the asset transfer-out account, the amount of the transferred assets, the type of the transferred assets, and the asset transfer-in account. The first node device can verify the legitimacy of the target cross-chain business based on the business verification type and the second business attribute information to obtain a business verification result.

[0103] The second business attribute information may include one or more pieces of information in the business description information of the target cross-chain business for performing legality verification.

[0104] Optionally, the first node device verifies the legitimacy of the target cross-chain business based on the business verification type and the second business attribute information. The specific method for obtaining the business verification result may include: if the business verification type is an on-chain business verification type, calling the on-chain business verification contract, obtaining the terminal risk level of the business terminal based on the second business attribute information, and obtaining the data risk level of the business data specified by the target cross-chain business. If the terminal risk level is less than the first level threshold and the data risk level is less than the second level threshold, a business verification result is generated to indicate that the target cross-chain business is legitimate.

[0105] Specifically, if the business verification type is an on-chain business verification type, the first node device can call the on-chain business verification contract and obtain the terminal risk level of the business terminal based on the second business attribute information. Specifically, the first node device can call the terminal identification list configured in the on-chain business verification contract, which includes one or more terminal identifications with a high risk level (such as a risk level greater than or equal to a first level threshold), and detect whether the terminal identification of the business terminal belongs to the terminal identification list. If the terminal identification of the business terminal belongs to the terminal identification list, it is determined that the terminal risk level is high (such as determining that the terminal risk level of the business terminal is greater than or equal to the first level threshold). If the terminal identification of the business terminal belongs to the terminal identification list, the historical transaction request submission record of the business terminal is obtained, and the terminal risk level of the business terminal is determined based on the historical transaction request record (such as whether there are multiple submissions of risky transaction requests (i.e., transaction requests that are not legitimate)). Of course, the first node device can obtain the processing authority of the business terminal for the target cross-chain business. For example, when the target cross-chain business is a cross-chain asset transfer business, it is detected whether the business object corresponding to the business terminal has the asset processing authority for the asset transfer-out account. If the business terminal does not have the processing authority for the target cross-chain business, it is determined that the terminal risk level of the business terminal device is greater than or equal to the first level threshold.

[0106] At the same time, the first node device can obtain the data risk level of the business data specified by the target cross-chain business. The business data specified by the target cross-chain business can refer to the business object or business status of the target cross-chain business. For example, when the target cross-chain business is a cross-chain asset transfer business, the business data specified by the target cross-chain business can be the digital assets to be transferred; when the target cross-chain business is a cross-chain information sharing business, the business data specified by the target cross-chain business can be the information to be transferred, etc. The first node device obtains the data source of the business data specified by the target cross-chain business and determines the data risk level of the business data specified by the target cross-chain business based on the data source. If the business data specified by the target cross-chain business is important information and cannot be transferred, it can be determined that the data risk level of the business data specified by the target cross-chain business is greater than or equal to the second level threshold. If the source of the business data specified by the target cross-chain business is abnormal (such as illegal assets, i.e., assets not generated according to the normal asset production process), it can be determined that the data risk level of the business data specified by the target cross-chain business is greater than or equal to the second level threshold.

[0107] Furthermore, if the first node device determines that the terminal risk level is less than the first level threshold, and the data risk level is less than the second level threshold, a service verification result is generated to indicate that the target cross-chain service is legitimate. Of course, if the first node device determines that the terminal risk level is greater than or equal to the first level threshold, and the data risk level is greater than or equal to the second level threshold, a service verification result is generated to indicate that the target cross-chain service is not legitimate.

[0108] Optionally, the first node device verifies the legitimacy of the target cross-chain business based on the business verification type and the second business attribute information. The specific method for obtaining the business verification result may include: if the business verification type is an off-chain business verification type, calling the on-chain business verification contract and sending the second business attribute information to the off-chain business verification device; the off-chain business verification device is used to instruct the business verification object to perform a verification operation on the target cross-chain business based on the second business attribute information. The operation result of the verification operation is received from the off-chain business verification device, and the business verification result of the target cross-chain business is generated based on the operation result.

[0109] Specifically, if the service verification type is an off-chain service verification type, the first node device can invoke the on-chain service verification contract and send the second service attribute information to the off-chain service verification device, which can be a server or a terminal device. The off-chain service verification device can instruct the service verification object to perform a verification operation on the target cross-chain service based on the second service attribute information. For example, the off-chain service verification device can output the second service attribute information to instruct the service verification object to verify the legitimacy of the target cross-chain service. The off-chain service verification device can obtain the result of the verification operation performed by the service verification object on the target cross-chain service. The result can indicate that the service object determines that the target cross-chain service is not legal, or that the target cross-chain service is legal. The off-chain service verification device can return the result to the on-chain service verification contract, which can generate a service verification result for the target cross-chain service based on the result. In this way, the service verification object verifies the legitimacy of the target cross-chain service, which can resolve the situation where the on-chain service verification contract cannot verify the legitimacy of the target cross-chain service and also improve the accuracy of the verification.

[0110] S103: If the business verification result indicates that the target cross-chain business is legitimate, the on-chain business execution contract in the cross-chain transaction protocol is called to execute the target cross-chain business and obtain cross-chain transaction data.

[0111] Specifically, if the business verification result indicates that the target cross-chain business is legitimate, the first node device calls the on-chain business execution contract in the cross-chain transaction protocol, executes the target cross-chain business, and obtains cross-chain transaction data. Among them, the on-chain business execution contract called by the first node device can refer to a smart contract deployed on the first blockchain, and the on-chain business execution contract can refer to a cross-chain bridge contract. The received target cross-chain business is processed based on the business processing rules agreed upon in the cross-chain bridge contract and the cross-chain communication protocol. It can be seen that the embodiment of the present application will only execute the target cross-chain business if it is valid. This can improve the security of cross-chain business execution and avoid the execution of illegal cross-chain business.

[0112] Optionally, taking the target cross-chain business as a cross-chain asset transfer business as an example, the target cross-chain business is used to indicate the transfer of digital assets of the target asset type. The first node device invokes the on-chain business execution contract in the cross-chain transaction protocol to execute the target cross-chain business and obtain cross-chain transaction data. The specific method may include: if the business verification result indicates that the target cross-chain business is legitimate, invoking the on-chain business execution contract in the cross-chain transaction protocol, determining an asset custody contract that matches the target asset type from the set of asset custody contracts on the first blockchain, and using it as the first asset custody contract. Determining an asset processor that matches the target asset type from the set of asset processors on the first blockchain, and using it as the first asset processor. Executing the target cross-chain business according to the first asset custody contract and the first asset processor, and obtaining cross-chain transaction data.

[0113] Specifically, if the first node device determines that the business verification result indicates that the target cross-chain business is legitimate, it can call the on-chain business execution contract in the cross-chain transaction protocol and determine, from the asset custody contract set on the first blockchain, an asset custody contract that matches the target asset type as the first asset custody contract. It is understood that the asset custody contract on the first blockchain can refer to a smart contract deployed on the first blockchain that can automatically lock or release a specified digital asset. The asset custody contract set on the first blockchain includes one or more asset custody contracts. For example, the asset custody contract set on the first blockchain may include asset custody contract A1 and asset custody contract A2. One asset custody contract in the asset custody contract set on the first blockchain is used to lock a digital asset of one asset type, thereby facilitating the management of digital assets of different asset types.

[0114] Furthermore, the first node device can determine an asset processor that matches the target asset type from the asset processor set on the first blockchain as the first asset processor. The asset processor set on the first blockchain includes one or more asset processors, such as asset processor B1 and asset processor B2. Each asset processor in the asset processor set is deployed with a cross-chain asset contract, and the asset processor can perform asset processing based on the cross-chain asset contract. An asset processor in the asset processor set on the first blockchain is used to process digital assets of one asset type, thereby facilitating the management of digital assets of different asset types. The first node device can execute the target cross-chain business based on the first asset custody contract and the first asset processor, obtaining cross-chain transaction data.

[0115] Optionally, the digital asset of the target asset type belongs to the first account in the first blockchain, and the amount of the digital asset is the target asset amount. That is, the target cross-chain service instructs the transfer of the digital asset of the target asset type and target asset amount from the first account in the first blockchain to the second blockchain. The first node device, in accordance with the first asset custody contract and the first asset processor, executes the target cross-chain service and obtains cross-chain transaction data in a specific manner that may include: invoking the first asset processor to lock the digital asset of the target asset type and target asset amount in the first account into the first asset custody contract; generating an asset lock event indicating that the digital asset of the target asset type and target asset amount has been locked into the first asset custody contract; generating an on-chain request for the asset lock event and sending the on-chain request to the consensus node of the first blockchain; the consensus node of the first blockchain is configured to reach consensus on the asset lock event and obtain a consensus result; receiving the consensus result returned by the consensus node of the first blockchain, and generating cross-chain transaction data regarding the target cross-chain service based on the consensus result.

[0116] Specifically, the first node device can call the first asset processor through the on-chain business execution contract to lock the digital assets with the target asset type and target asset amount in the first account into the first asset custody contract. It is understandable that the first asset custody contract includes a public account for the target asset type. The first node device can transfer the digital assets with the target asset type and target asset amount in the first account to the public account for the target asset type in the first asset custody contract to lock the digital assets with the target asset type and target asset amount in the first account. It can be seen that when the target cross-chain business is a cross-chain asset transfer business, the asset processor on the first blockchain can lock the digital assets to be transferred (such as the digital assets with the target asset type and target asset amount in the first account) into the asset custody contract on the first blockchain. In this way, the cross-chain service provided by the on-chain business execution contract and the asset custody service provided by the asset custody contract can be made independent. The on-chain business execution contract shall not arbitrarily operate the pledged assets of the target cross-chain business during the cross-chain process, further improving asset security. It is understandable that the existence of the asset custody contract makes the cross-chain service provider and the asset custodian independent. The cross-chain service is not allowed to arbitrarily operate the pledged assets of the target cross-chain business during the cross-chain process, further improving asset security.

[0117] Furthermore, the first node device may generate an asset lock event indicating that the digital asset with the target asset type and target asset amount in the first account has been locked to the first asset custody contract. The first node device may generate an on-chain request for the asset lock event and send the on-chain request to the consensus node of the first blockchain. The consensus node of the first blockchain may reach a consensus on the asset lock event to detect whether the asset lock event is valid (i.e., whether the first node device has locked the digital asset with the target asset type and target asset amount in the first account to the first asset custody contract) to obtain a consensus result, and return the consensus result to the first node device. Specifically, the first node device may receive the consensus result returned by the consensus node of the first blockchain, and generate cross-chain transaction data about the target cross-chain business based on the consensus result.

[0118] Optionally, the target cross-chain business is further used to instruct the transfer of a digital asset having a target asset type and a target asset amount to a second account on the second blockchain. The specific method by which the computer device generates cross-chain transaction data regarding the target cross-chain business based on the consensus result may include: if the consensus result indicates that the asset lock event consensus is successful, then uploading the asset lock event to the first blockchain. Generating an asset release request, the asset release request is used to instruct the second node device to release the digital asset having the target asset type and the target asset amount from the second asset custody contract to the second account; the second asset custody contract is the asset custody contract associated with the target asset type on the second blockchain. The asset lock event and the asset release request are determined as cross-chain transaction data regarding the target cross-chain business.

[0119] Specifically, if the consensus result indicates that the asset lock event consensus is successful, the first node device may upload the asset lock event to the first blockchain. Specifically, the first node device may generate a target block regarding the asset lock event and add the target block to the first blockchain. Simultaneously, the first node device may generate an asset release request, which is used to instruct the second node device to release digital assets of the target asset type and target asset amount from the second asset custody contract to the second account. The second asset custody contract is the asset custody contract associated with the target asset type on the second blockchain. The asset lock event and the asset release request are determined as cross-chain transaction data regarding the target cross-chain business.

[0120] When a third node device maintaining a third blockchain receives an asset transfer request to transfer a digital asset of a target asset type on the third blockchain to the first blockchain, the third node device may verify the legitimacy of the asset transfer request. If the asset transfer request is valid, the third node device may lock the digital asset of the target asset type on the third blockchain using the asset depository contract associated with the target asset type and the asset processor on the third blockchain. Simultaneously, the third node device may generate a release request instructing the first node device to release the digital asset of the target asset type to the first account. Upon receiving the release request to release the digital asset of the target asset type to the first account, the first node device may determine an asset depository contract that matches the target asset type from the set of asset depository contracts on the first blockchain, namely, the first asset depository contract, and an asset processor that matches the target asset type from the set of asset processors on the first blockchain, namely, the first asset processor. Furthermore, the digital asset of the target asset type is released from the first asset depository contract to the first account, i.e., the digital asset of the target asset type is transferred from the public account in the first asset depository contract to the first account.

[0121] Optionally, the target cross-chain business may be a cross-chain information sharing business, a cross-chain transaction transfer business, or the like. The first node device may invoke an on-chain cross-chain contract in the cross-chain transaction protocol to execute the target cross-chain business. A specific method for obtaining cross-chain transaction data regarding the target cross-chain business may include: if the business verification result indicates that the target cross-chain business is legitimate and the target cross-chain business is a non-asset transaction type, invoking a general message processor on the first blockchain through the on-chain business execution contract in the cross-chain transaction protocol. The general message processor may obtain business data specified by the target cross-chain business from the first blockchain, and determine the business data specified by the target cross-chain business as cross-chain transaction data regarding the target cross-chain business.

[0122] Specifically, if the business verification result indicates that the target cross-chain business is legitimate and the target cross-chain business is a non-asset transaction type (such as a cross-chain information sharing business or a cross-chain transaction transfer business), the first node device can use the on-chain business execution contract in the cross-chain transaction protocol to call the general message processor on the first blockchain. The general message processor is deployed with a cross-chain application contract for processing non-asset transaction cross-chain business. The first node device can obtain the business data specified by the target cross-chain business from the first blockchain through the message processor. For example, if the target cross-chain business is a cross-chain information sharing business, the business data specified by the target cross-chain business is the information to be shared, such as the status information of an asset (such as locked or unlocked) or the execution status information of a business (such as completed, in progress, or not executed). If the target cross-chain business is a cross-chain transaction transfer business, the business data specified by the target cross-chain business is the transaction to be transferred. That is, the pending transaction on the first blockchain can be transferred to another blockchain (such as a second blockchain). This can expand performance and reduce the burden on the first blockchain. The first node device may determine the business data executed by the target cross-chain business as the cross-chain transaction data of the target cross-chain business.

[0123] S104, sending the cross-chain transaction data to N cross-chain relay devices associated with the cross-chain transaction protocol.

[0124] Specifically, the first node device can send cross-chain transaction data to N cross-chain relay devices associated with the cross-chain transaction protocol, where N is a positive integer greater than 1 and i is a positive integer less than or equal to N. It is understandable that the first node device can send cross-chain transaction data to each of the N cross-chain relay devices. After receiving the cross-chain transaction data sent by the first node device, cross-chain relay device i among the N cross-chain relay devices can obtain the off-chain data verification contract in the cross-chain transaction protocol (such as the off-chain data verification rules agreed in the cross-chain transaction protocol for the cross-chain relay device to verify the validity of cross-chain transaction data). Furthermore, cross-chain relay device i can verify the validity of the cross-chain transaction data based on the off-chain data verification contract to verify whether the first node device has locked the digital asset of the target asset type and target asset amount in the first account on the first blockchain. If cross-chain relay device i determines that the cross-chain transaction data is valid (i.e., the first node device has locked the digital asset of the target asset type and target asset amount in the first account on the first blockchain), it sends the cross-chain transaction data to the second node device.

[0125] In this case, cross-chain relay device i belongs to any one of N cross-chain relay devices. It is understood that each of the N cross-chain relay devices verifies the validity of the cross-chain transaction data and, upon determining that the cross-chain transaction data is valid, forwards the cross-chain transaction data to the second node device. Of course, if a cross-chain relay device determines that the cross-chain transaction data is not legitimate, it will not forward the cross-chain transaction data to the second node device. In this way, by having N cross-chain relay devices verify the validity of cross-chain transaction data, decentralization can be achieved, avoiding the risk of centralized malicious behavior when relying on third-party cross-chain relay devices to forward cross-chain transaction data (e.g., forwarding cross-chain transaction data to the second node device even when the third-party cross-chain transaction data is not valid, causing the second node device to execute the risky cross-chain transaction data). At the same time, the efficiency of cross-chain transactions can be improved, avoiding the need to send large amounts of ledger structure data from the first blockchain to the second blockchain (so that the second blockchain can verify the validity of the cross-chain transaction data based on this large amount of ledger structure data), which can lead to higher cross-chain transaction costs and lower efficiency.

[0126] Among them, the on-chain business execution contract in the cross-chain transaction protocol can add, delete, modify, and query the identities of N cross-chain relay devices. Specifically, the on-chain business execution contract can manage the eligibility of N cross-chain relay devices. For example, if device Q1 requests to join N cross-chain relay devices, the on-chain business execution contract can review device Q1's qualifications. If device Q1 is approved, device Q1 will join N cross-chain relay devices to verify the validity of cross-chain transaction data. Specifically, the on-chain business execution contract can delete unqualified cross-chain relay devices from the N cross-chain relay devices (i.e., remove unqualified cross-chain relay devices from the N cross-chain relay devices). For example, if cross-chain relay device j among the N cross-chain relay devices repeatedly forwards illegitimate cross-chain transaction data, it can be determined that cross-chain relay device j is unqualified, and the on-chain business execution contract can remove cross-chain relay device j from the N cross-chain relay devices. Specifically, the on-chain business execution contract can modify the off-chain data verification contract used by the cross-chain relay device to verify the validity of cross-chain transaction data, and can also query the historical cross-chain transaction data verification records in N cross-chain relay devices, the device status of the cross-chain relay device, and other information. At the same time, the on-chain business execution contract can manage the relay quantity threshold M for the cross-chain relay device. If M of the N cross-chain relay devices complete the voting on the cross-chain transaction data (i.e., forwarding the cross-chain transaction data), then the cross-chain transaction data can be determined to be valid in the on-chain business execution contract of the second node device, and the cross-chain transaction data can be executed (i.e., the cross-chain transaction data is considered to have passed and continues to be executed).

[0127] Among them, the on-chain business execution contract on the first blockchain can record the business description information of the target cross-chain business. For example, when the target cross-chain business is a cross-chain asset transfer business, the on-chain business execution contract on the first blockchain can record the submitted business terminal (or the business object that initiates the cross-chain transaction request), the asset amount (that is, the asset amount of the digital asset to be transferred), the asset type (that is, the asset type of the digital asset to be transferred), the target chain identifier (the blockchain identifier of the digital asset to be transferred, such as the chain identifier of the second blockchain), the target user address (the account of the digital asset to be transferred), the transaction sequence number (that is, the business identifier of the target cross-chain business), etc.

[0128] The on-chain business execution contract on the second blockchain may record the voting status of the target cross-chain business (i.e., the status of the cross-chain relay device forwarding the cross-chain transaction data), as well as the status information of the target cross-chain business. The status information of the target cross-chain business may include one or more of an inactive state, an active state, a passed state, an executing state, an execution completed state, and a canceled state. The inactive state may mean that no cross-chain relay device currently votes on the cross-chain transaction data (i.e., forwards the cross-chain transaction data to the second node device); the active state may mean that a cross-chain relay device currently votes on the cross-chain transaction data; the passed state means that a number of cross-chain relay devices greater than or equal to the relay quantity threshold M currently votes on the cross-chain transaction data; the executing state may mean that the second node device is processing the cross-chain transaction data; the execution completed state may mean that the second node device has completed the execution of the cross-chain transaction data; and the canceled state may mean that the second node device cancels the execution of the cross-chain transaction data.

[0129] The second node device can receive the cross-chain transaction data forwarded by the cross-chain relay device i, perform validity verification on the received cross-chain transaction data, and process the cross-chain transaction data when it is determined that the received cross-chain transaction data is valid.

[0130] In an embodiment of the present application, a cross-chain transaction protocol is provided, which includes an on-chain part and an off-chain part. The on-chain part includes an on-chain business verification contract (used to verify the legitimacy of the cross-chain business), an on-chain business execution contract (used to execute the cross-chain business), and the entry conditions for the node devices corresponding to the blockchain to join the cross-chain transaction (i.e., risk control rules); the off-chain part includes an off-chain data verification contract used by the cross-chain relay device to verify the validity of the cross-chain transaction data to be forwarded. Through these contracts in the cross-chain transaction protocol, cross-chain business processing can be automatically realized, thereby improving the efficiency and security of cross-chain business processing. In actual applications, when the first node device receives a cross-chain transaction request sent by the business terminal, it calls the on-chain business verification contract in the cross-chain transaction protocol to verify the legitimacy of the target cross-chain business in the cross-chain transaction request. If the target cross-chain business is legitimate, the on-chain business execution contract in the cross-chain transaction protocol is called to execute the target cross-chain business to obtain cross-chain transaction data. It can be seen that the legitimacy of the target cross-chain business is verified through the on-chain business verification contract. The target cross-chain business will only be executed when it is legitimate, which can effectively improve the security of cross-chain business processing.

[0131] Furthermore, the first node device can send cross-chain transaction data to N cross-chain relay devices associated with the cross-chain transaction protocol. Cross-chain relay device i among the N cross-chain relay devices is used to send the cross-chain transaction data to the second node device when it determines that the cross-chain transaction data is valid based on the off-chain data verification contract in the cross-chain transaction protocol. In this way, by having N cross-chain relay devices verify the validity of the cross-chain transaction data and forward valid cross-chain transaction data, decentralization can be achieved, avoiding the risk of centralized malicious behavior when relying on third-party cross-chain relay devices to forward cross-chain transaction data (such as a third-party cross-chain relay device forwarding and submitting cross-chain transaction data to the second blockchain even when the cross-chain transaction data is not valid). At the same time, by having the cross-chain relay device verify the validity of the cross-chain transaction data, it can avoid the need to send large amounts of ledger structure data on the first blockchain to the second blockchain (for the second blockchain to verify the validity of the cross-chain transaction data based on the large amount of ledger structure data), which would result in higher cross-chain business processing costs and lower efficiency. This can reduce cross-chain business processing costs and improve cross-chain business processing efficiency. The second node device processes the cross-chain transaction data only when it determines that the received cross-chain transaction data is valid, which can improve the security of the cross-chain transaction.

[0132] Further, please refer to Figure 7, which is a flow chart of a data processing method based on blockchain provided by an embodiment of the present application. As shown in Figure 7, the method can be executed by a second node device that maintains a second blockchain in a blockchain network. The blockchain network can refer to the above-mentioned core consensus network, or the above-mentioned business network, or other blockchain networks. The embodiment of the present application is not limited here. The second node device can be a server connected to the blockchain network, or a terminal device connected to the blockchain network. The second point device can refer to any node device among the node devices that maintain the second blockchain. The specific form of the second node device is not limited here. The method may at least include but is not limited to the following steps:

[0133] S201: A second node device associated with a second blockchain receives cross-chain transaction data sent by a cross-chain relay device i among N cross-chain relay devices.

[0134] Specifically, the second node device associated with the second blockchain can be a node device that maintains the second blockchain. The second node device can be any node device among the node devices that maintain the second blockchain. It is understood that the second blockchain is composed of one or more blocks, and the second node device can be a device that generates blocks and uploads the generated blocks to the second blockchain. The second blockchain can belong to a second blockchain network, which can refer to the core consensus network in Figure 3 above, or the business network in Figure 3 above, or of course, other blockchain networks. The first blockchain network can be the same as or different from the first blockchain network to which the first blockchain belongs. The second node devices all comply with the cross-chain transaction protocol, that is, the cross-chain transaction protocol is deployed on the second blockchain. When executing cross-chain transactions, the node devices that maintain the second blockchain can conduct them based on the cross-chain transaction protocol.

[0135] The cross-chain transaction data is generated by the first node device when it executes the target cross-chain transaction based on the on-chain transaction verification contract in the cross-chain transaction protocol, and is forwarded by the first node device to N cross-chain relay devices. Cross-chain relay device i is used to send the cross-chain transaction data to the second node device when it determines the cross-chain transaction data is valid based on the off-chain data verification contract in the cross-chain transaction protocol. In this way, by verifying the validity of the cross-chain transaction data through N cross-chain relay devices, decentralization can be achieved, avoiding the risk of centralized malicious behavior when relying on third-party cross-chain relay devices to forward cross-chain transaction data (such as forwarding cross-chain transaction data to the second node device even when the third-party cross-chain transaction data is not valid, causing the second node device to execute the risky cross-chain transaction data). At the same time, the efficiency of cross-chain transactions can be improved, avoiding the need to send large amounts of ledger structure data from the first blockchain to the second blockchain (so that the second blockchain can verify the validity of the cross-chain transaction data based on this large amount of ledger structure data), which can lead to higher cross-chain transaction costs and lower efficiency. The target cross-chain business is associated with the first blockchain and the second blockchain maintained by the first node device. The first node device and the second node device both satisfy the cross-chain transaction protocol. N is an integer greater than 1, and i is an integer less than or equal to N. The specific content of step S201 regarding cross-chain transaction data in the embodiment of the present application can be found in the contents of steps S101 to S104 in Figure 6 above, and will not be repeated in detail in the embodiment of the present application.

[0136] S202: Based on the on-chain business execution contract in the cross-chain transaction protocol, the validity of the received cross-chain transaction data is verified to obtain a data verification result.

[0137] Specifically, the second node device may verify the validity of the received cross-chain transaction data based on the on-chain business execution contract in the cross-chain transaction protocol to obtain a data verification result. The on-chain business execution contract invoked by the second node device may be a smart contract deployed on the second blockchain. The node device maintaining the second blockchain invokes the on-chain business execution contract deployed on the second blockchain to conduct the cross-chain transaction. The data verification result may indicate that the received cross-chain transaction data is valid, or may indicate that the received cross-chain transaction data is invalid.

[0138] Optionally, the cross-chain transaction data includes an asset lock event reflecting that a digital asset having a target asset type and a target asset amount in a first account on the first blockchain has been locked. The second node device, based on the on-chain data verification contract in the cross-chain transaction protocol, verifies the cross-chain transaction data sent by the M cross-chain relay devices. The specific method may include: obtaining a relay quantity threshold configured in the on-chain business execution contract in the cross-chain transaction protocol, counting the number of devices corresponding to the cross-chain relay devices that sent the cross-chain transaction data, comparing the relay quantity threshold with the number of devices, and if the device number is greater than or equal to the relay quantity threshold, determining that the asset lock event is valid, and generating a data verification result indicating the validity of the cross-chain transaction data.

[0139] Specifically, the second node device obtains the relay quantity threshold configured by the on-chain business execution contract in the cross-chain transaction protocol. The relay quantity threshold can be determined based on N of the N cross-chain relay devices. For example, the relay quantity threshold can be a threshold that is greater than N / 2 and less than or equal to N. For example, when the number of N cross-chain relay devices is 5, the relay quantity threshold can be 3, 4, or 5. The relay quantity threshold can be configured by the on-chain business execution contract in the cross-chain transaction protocol, and the on-chain business execution contract can manage the N cross-chain relay devices. The second node device can count the number of cross-chain relay devices that send cross-chain transaction data, compare the relay quantity threshold with the number of devices, and if the number of devices is greater than or equal to the relay quantity threshold, it means that the vast majority of cross-chain relay devices have determined that the cross-chain transaction data is valid, then the asset lock event is determined to be valid, and a data verification result is generated to indicate that the cross-chain transaction data verification has passed. In this way, the second node device determines that the cross-chain transaction data is valid only when it determines that the number of devices is greater than or equal to the relay number threshold, which can achieve decentralization and avoid the risk of centralized malicious behavior when relying on third-party cross-chain relay devices to forward cross-chain transaction data (such as forwarding cross-chain transaction data to the second node device when the third-party cross-chain transaction data is not valid, causing the second node device to execute risky cross-chain transaction data).

[0140] Of course, if the number of devices is less than the relay number threshold, it means that the vast majority of cross-chain relay devices have determined that the cross-chain transaction data is invalid. In this case, the asset lock event is determined to be invalid, and a data verification result indicating that the cross-chain transaction data is invalid is generated. In this case, the second node device will not execute the cross-chain transaction data. This can improve the security of cross-chain transactions.

[0141] S203: When the data verification result indicates that the cross-chain transaction data is valid, the cross-chain transaction data is processed.

[0142] Specifically, when the data verification result indicates that the cross-chain transaction data is valid, the second node device can execute the cross-chain transaction data to realize the cross-chain transaction between the first blockchain and the second blockchain. At the same time, the cross-chain transaction data is only executed when it is determined that the cross-chain transaction data is valid, which can improve the security of the cross-chain transaction.

[0143] Optionally, when the data verification result indicates that the cross-chain transaction data has passed verification, the second node device may process the cross-chain transaction data in a specific manner including: when the data verification result indicates that the cross-chain transaction data is valid, calling an on-chain business verification contract in the cross-chain transaction protocol to determine a data verification type for the cross-chain transaction data; verifying the data processing risk of the cross-chain transaction data based on the data verification type to obtain a risk verification result; and processing the cross-chain transaction data when the risk verification result indicates that the cross-chain transaction data is not risky data.

[0144] Specifically, when the data verification result indicates that the cross-chain transaction data is valid, the second node device can call the on-chain business verification contract in the cross-chain transaction protocol. The on-chain business verification contract called by the second node device can refer to a smart contract deployed on the second blockchain. The node devices that maintain the second blockchain can all call the on-chain business verification contract to verify whether the business or data is risky (i.e., whether it is legal). Among them, the on-chain business verification contract can be deployed in different blockchains that need to conduct cross-chain transactions to verify whether the business or data is risky (i.e., whether it is legal). The second node device can call the on-chain business verification contract in the cross-chain transaction protocol to determine the data verification type of the cross-chain transaction data.

[0145] The data verification type can be an on-chain data verification type or an off-chain data verification type. The on-chain data verification type refers to verifying the data risk of cross-chain transaction data through an on-chain business verification contract. The off-chain data verification type may refer to sending the cross-chain transaction data to an off-chain business verification device through an on-chain business verification contract, and the off-chain business verification device instructs the business verification object to verify the data risk of the cross-chain transaction data (such as manual verification). The second node device can verify the data risk of the cross-chain transaction data based on the data verification type and obtain a risk verification result. If the risk verification result indicates that the cross-chain transaction data does not belong to risk data, the cross-chain transaction data is processed. In this way, the security of cross-chain transaction data processing can be improved.

[0146] For example, the cross-chain transaction data may include an asset release request, which is used to instruct the second node device to release a digital asset of the target asset type and target asset amount to a second account in the second blockchain. The second node device may detect whether the second account belongs to a set of illegal accounts. If so, the cross-chain transaction data may be determined to be risky data and not processed. Alternatively, the second node device may obtain the owner of the second account and detect the object risk level of the owner based on the transaction record of the owner. If the object risk level of the owner is greater than or equal to a third risk level, the cross-chain transaction data may be determined to be risky data and not processed.

[0147] Optionally, the cross-chain transaction data includes an asset release request, which is used to instruct the second node device to release digital assets of the target asset type and target asset amount to a second account in the second blockchain. When the risk verification result indicates that the cross-chain transaction data is not risky data, the specific method for the second node device to process the cross-chain transaction data may include: when the risk verification result indicates that the cross-chain transaction data is not risky data, determining an asset custody contract that matches the target asset type from the set of asset custody contracts on the second blockchain as the second asset custody contract. Determining an asset processor that matches the target asset type from the set of asset processors on the second blockchain as the second asset processor. Invoking the second asset processor to release the digital assets of the target asset type and target asset amount from the second asset custody contract to the second account.

[0148] Specifically, when the risk verification result indicates that the cross-chain transaction data is not risky data, the second node device may determine an asset custody contract that matches the target asset type from the asset custody contract set on the second blockchain as the second asset custody contract. Similarly, the asset custody contract on the second blockchain may refer to a smart contract deployed on the second blockchain that can automatically lock or release specified digital assets. The asset custody contract set on the second blockchain includes one or more asset custody contracts. For example, the asset custody contract set on the second blockchain may include asset custody contract A3 and asset custody contract A4. An asset custody contract in the asset custody contract set on the second blockchain is used to lock digital assets of one asset type, thereby facilitating the management of digital assets of different asset types. The asset custody contract set on the first blockchain and the asset custody contract set on the second blockchain both belong to the cross-chain transaction protocol (e.g., configured in the cross-chain transaction protocol). The asset custody contract set on the first blockchain and the asset custody contract set on the second blockchain may be the same or different (e.g., with different compilation formats).

[0149] Furthermore, the second node device can determine an asset processor that matches the target asset type from the asset processor set on the second blockchain as the second asset processor. Similarly, the asset processor set on the second blockchain includes one or more asset processors, such as asset processor B3 and asset processor B4. Each asset processor in the asset processor set is deployed with a cross-chain asset contract, and the asset processor can perform asset processing based on the cross-chain asset contract. One asset processor in the asset processor set on the second blockchain is used to process digital assets of one asset type, thereby facilitating the management of digital assets of different asset types. Similarly, the asset processor set on the first blockchain and the asset processor set on the second blockchain both belong to the cross-chain transaction protocol (as configured in the cross-chain transaction protocol). The asset processor set on the first blockchain and the asset processor set on the second blockchain can be the same or different (e.g., with different compilation formats).

[0150] Specifically, the second node device can call the second asset processor to release digital assets with the target asset type and target asset amount from the second asset custody contract to the second account. It is understood that the second asset custody contract contains a public account, and the second node device can call the second asset processor to transfer digital assets with the target asset type and target asset amount from the public account in the second asset custody contract to the second account. As can be seen, the digital assets are locked in the asset custody contract on the second blockchain. This allows for the independence of the cross-chain services provided by the on-chain business execution contract and the asset custody services provided by the asset custody contract. The on-chain business execution contract is prohibited from arbitrarily manipulating the pledged assets for the target cross-chain business during the cross-chain process, further enhancing asset security. It is understood that the existence of the asset custody contract establishes independence between the cross-chain service provider and the asset custodian, preventing the cross-chain service provider from arbitrarily manipulating the pledged assets for the target cross-chain business during the cross-chain process, further enhancing asset security.

[0151] Specifically, when the cross-chain transaction data is business data specified by the target cross-chain business, the second node device can process the business data. If the business data is a pending transaction, the second node device can process the pending transaction. If the business data is the status information of an asset, the second node device can use the asset status information to perform business processing.

[0152] In an embodiment of the present application, a cross-chain transaction protocol is provided, which includes an on-chain part and an off-chain part. The on-chain part includes an on-chain business verification contract (used to verify the legitimacy of the cross-chain business), an on-chain business execution contract (used to execute the cross-chain business), and the entry conditions for the node devices corresponding to the blockchain to join the cross-chain transaction (i.e., risk control rules); the off-chain part includes an off-chain data verification contract used by the cross-chain relay device to verify the validity of the cross-chain transaction data to be forwarded. Through these contracts in the cross-chain transaction protocol, cross-chain business processing can be automatically realized, thereby improving the efficiency and security of cross-chain business processing. In actual applications, when the first node device receives a cross-chain transaction request sent by the business terminal, it calls the on-chain business verification contract in the cross-chain transaction protocol to verify the legitimacy of the target cross-chain business in the cross-chain transaction request. If the target cross-chain business is legitimate, the on-chain business execution contract in the cross-chain transaction protocol is called to execute the target cross-chain business to obtain cross-chain transaction data. It can be seen that the legitimacy of the target cross-chain business is verified through the on-chain business verification contract. The target cross-chain business will only be executed when it is legitimate, which can effectively improve the security of cross-chain business processing.

[0153] Furthermore, the first node device can send cross-chain transaction data to N cross-chain relay devices associated with the cross-chain transaction protocol. Cross-chain relay device i among the N cross-chain relay devices is used to send the cross-chain transaction data to the second node device when it determines that the cross-chain transaction data is valid based on the off-chain data verification contract in the cross-chain transaction protocol. In this way, by having N cross-chain relay devices verify the validity of the cross-chain transaction data and forward valid cross-chain transaction data, decentralization can be achieved, avoiding the risk of centralized malicious behavior when relying on third-party cross-chain relay devices to forward cross-chain transaction data (such as a third-party cross-chain relay device forwarding and submitting cross-chain transaction data to the second blockchain even when the cross-chain transaction data is not valid). At the same time, by having the cross-chain relay device verify the validity of the cross-chain transaction data, it can avoid the need to send large amounts of ledger structure data on the first blockchain to the second blockchain (for the second blockchain to verify the validity of the cross-chain transaction data based on the large amount of ledger structure data), which would result in higher cross-chain business processing costs and lower efficiency. This can reduce cross-chain business processing costs and improve cross-chain business processing efficiency. The second node device processes the received cross-chain transaction data only after determining its validity, thereby improving the security of cross-chain transactions. Furthermore, this allows for the independence of the cross-chain services provided by the on-chain business execution contract and the asset custody services provided by the asset custody contract. The on-chain business execution contract is prohibited from arbitrarily manipulating the pledged assets of the target cross-chain business during the cross-chain process, further enhancing asset security. It is understood that the existence of the asset custody contract establishes independence between the cross-chain service provider and the asset custodian, preventing the cross-chain service provider from arbitrarily manipulating the pledged assets of the target cross-chain business during the cross-chain process, further enhancing asset security.

[0154] Further, please refer to Figure 8, which is a flowchart of a blockchain-based data processing method provided by an embodiment of the present application. As shown in Figure 8, the method can be executed by a cross-chain relay device i, which can be any one of N cross-chain relay devices. The cross-chain relay device i can be a server or a terminal device. The specific form of the cross-chain relay device i is not limited here. The method can at least include but is not limited to the following steps:

[0155] S301, a cross-chain relay device i among N cross-chain relay devices receives cross-chain transaction data sent by a first node device.

[0156] Specifically, the cross-chain relay device i among the N cross-chain relay devices can receive the cross-chain transaction data sent by the first node device. The cross-chain transaction data is generated by the first node device when it determines that the target cross-chain business is legitimate based on the on-chain business verification contract in the cross-chain transaction protocol, and is forwarded by the first node device to the N cross-chain relay devices. The target cross-chain business is associated with the first blockchain maintained by the first node device and the second blockchain maintained by the second node device. The first node device and the second node device both meet the cross-chain transaction protocol. N is an integer greater than 1, and i is an integer less than or equal to N. Among them, each cross-chain relay device has its own independent relayer identity (i.e., its own address and private key), and independently votes for the detected cross-chain transaction data (i.e., forwards the cross-chain transaction data after determining that the cross-chain transaction data is valid). The specific process of obtaining cross-chain transaction data can refer to the contents of steps S101 to S104 in Figure 6 above, and the embodiments of this application will not be repeated here.

[0157] S302: Verify the validity of the cross-chain transaction data according to the off-chain data verification contract in the cross-chain transaction protocol.

[0158] Specifically, cross-chain relay device i can verify the validity of cross-chain transaction data, i.e., verify the authenticity of the cross-chain transaction data, based on the off-chain data verification contract in the cross-chain transaction protocol. The off-chain data verification contract can refer to the off-chain data verification rules agreed upon in the cross-chain transaction protocol for the cross-chain relay device to verify the validity of cross-chain transaction data. This is used to verify the validity of cross-chain transaction data, i.e., verify the authenticity of the cross-chain transaction data. For example, if the cross-chain transaction data includes an asset lock event, cross-chain relay device i can separately verify whether the asset lock event has been executed on the first blockchain. It is understood that cross-chain relay device i can independently verify the validity of cross-chain transaction data. In this way, by having N cross-chain relay devices independently verify the validity of cross-chain transaction data, decentralization can be achieved, avoiding the risk of centralized malicious behavior when relying on third-party cross-chain relay devices to forward cross-chain transaction data (e.g., forwarding and submitting cross-chain transaction data to a second node device even when the third-party cross-chain transaction data is not valid, causing the second node device to execute risky cross-chain transaction data). At the same time, verifying the validity of cross-chain transaction data through the cross-chain relay device i can also improve the efficiency of cross-chain transactions, avoiding sending a large amount of ledger structure data on the first blockchain to the second blockchain (so that the second blockchain can verify the validity of the cross-chain transaction data based on a large amount of ledger structure data), which leads to higher cross-chain transaction costs and lower efficiency.

[0159] Optionally, the cross-chain transaction data includes an asset lock event reflecting that a digital asset of a target asset type and target asset amount in a first account on the first blockchain has been locked. The cross-chain relay device i may verify the validity of the cross-chain transaction data according to the off-chain data verification contract in the cross-chain transaction protocol by obtaining an event identifier of the asset lock event and detecting a target block containing the event identifier on the first blockchain. If the target block containing the event identifier is detected on the first blockchain, the cross-chain transaction data is determined to be valid.

[0160] Cross-chain relay device i can obtain the event identifier of the asset lock event and detect the target block containing the event identifier from the first blockchain. If the target block containing the event identifier is detected on the first blockchain, it indicates that the first node device maintaining the first blockchain has locked the digital asset with the target asset type and target asset amount in the first account of the first blockchain, and the cross-chain transaction data is determined to be valid. If the target block containing the event identifier is not detected on the first blockchain, it indicates that the first node device maintaining the first blockchain has not locked the digital asset with the target asset type and target asset amount in the first account of the first blockchain, and the cross-chain transaction data is determined to be invalid. It can be seen that verifying the validity of cross-chain transaction data through cross-chain relay device i can also improve the efficiency of cross-chain transactions and avoid sending a large amount of ledger structure data on the first blockchain to the second blockchain (so that the second blockchain can verify the validity of the cross-chain transaction data based on the large amount of ledger structure data), which results in higher cross-chain transaction costs and lower efficiency.

[0161] S303: If the cross-chain transaction data is valid, the cross-chain transaction data is sent to the second node device.

[0162] Specifically, when the second node device determines that the received cross-chain transaction data is valid, it processes the cross-chain transaction data. The specific content of the second node device processing the cross-chain transaction data can be found in the content of steps S201 to S203 in Figure 7 above, and this embodiment of the application will not be repeated here.

[0163] As shown in Figure 9, Figure 9 is a schematic diagram of a cross-chain transaction provided by an embodiment of the present application. As shown in Figure 9, a business object can send a cross-chain transaction request for the first blockchain and the second blockchain through the cross-chain service front-end in the business terminal. The cross-chain transaction request includes the target cross-chain business, including asset lock authorization and cross-chain asset transfer request (i.e., asset release request) on the first blockchain. The business object can initiate a cross-chain asset transfer request in the object account of the cross-chain service front-end. The cross-chain asset transfer request can be used to instruct the transfer of digital assets on the first blockchain where the object account is located to the second blockchain. Among them, the cross-chain service front-end can be an application client responsible for interacting with the cross-chain object (such as the business object). For example, the cross-chain service front-end can be in the form of a web page, an application (i.e., APP, Application), a mini-program, etc. The cross-chain service back-end can assemble the cross-chain transaction request and send it to the first blockchain. The first node device that maintains the first blockchain can obtain the cross-chain transaction request. At the same time, the cross-chain service backend can obtain the execution status or other information of the target cross-chain transaction and return the execution status or other information of the target cross-chain transaction to the cross-chain service frontend, which can then display the execution status or other information of the target cross-chain transaction. The cross-chain service backend can be a background server that is mainly used to provide data and blockchain transaction function support to the cross-chain service frontend.

[0164] The first blockchain includes a cross-chain bridge contract, an on-chain business verification contract, an asset custody contract, a cross-chain asset contract, and a cross-chain application contract. The cross-chain bridge contract is an on-chain business execution contract on the first blockchain. It includes business verification management, relay multi-signature management, and cross-chain business management functions. The business verification management function interfaces with the on-chain business verification contract on the first blockchain to manage the invocation of the on-chain business verification contract during the submission and execution of cross-chain business transactions, ensuring the controllability of the target cross-chain business. Specifically, if the target cross-chain business is not legitimate, the target cross-chain business may not be executed. If the target cross-chain business is an asset transfer business, the assets specified by the target cross-chain business may be frozen. The target cross-chain business is only executed if it is legitimate, ensuring the security of cross-chain transactions. Among them, the relay multi-signature management function refers to the addition, deletion, modification and query of the identities of N cross-chain relay devices in the cross-chain relay service of the cross-chain bridge contract, as well as the setting of the relay quantity threshold. If M of the N cross-chain relay devices complete the voting on the cross-chain transaction data (i.e., forwarding the cross-chain transaction data), then the cross-chain transaction data can be determined to be valid in the on-chain business execution contract of the second node device, and the cross-chain transaction data can be executed (i.e., the cross-chain transaction data is considered to have passed and continues to be executed). The cross-chain business management function can refer to the relevant process of executing the target cross-chain business. Among them, the on-chain business verification contract can manage the asset custody contract, such as the deployment of the asset custody contract, the binding with the asset type or cross-chain transaction type, and the authority allocation of the operator of the asset custody contract.

[0165] Specifically, a first node device maintaining a first blockchain can receive the target cross-chain business in a cross-chain transaction request through a cross-chain bridge contract. The cross-chain bridge contract can also invoke an on-chain business verification contract to verify the legitimacy of the target cross-chain business. For example, if the target cross-chain business involves transferring digital assets of a target asset type and target amount from a first account on the first blockchain to a second account on the second blockchain, upon determining the legitimacy of the target cross-chain business, the cross-chain bridge contract can retrieve an asset custody contract that matches the target asset type from the asset custody contract set on the first blockchain as the first asset custody contract. The first node device can retrieve an asset processor that matches the target asset type from the asset processor set on the first blockchain through the cross-chain bridge contract as the first asset processor. The asset processor can lock digital assets of the corresponding asset type into the corresponding asset custody contract or release digital assets from the corresponding asset custody contract through the cross-chain asset contract. The first asset processor is invoked with the first asset custody contract address as a parameter. The first asset processor locks digital assets of the target asset type and target amount from the first account into the first asset custody contract. In this way, the cross-chain service provided by the on-chain business execution contract and the asset custody service provided by the asset custody contract can be made independent. The on-chain business execution contract cannot arbitrarily manipulate the pledged assets of the target cross-chain business during the cross-chain process, further improving asset security. It can be understood that the existence of the asset custody contract makes the cross-chain service provider and the asset custodian independent. The cross-chain service cannot arbitrarily manipulate the pledged assets of the target cross-chain business during the cross-chain process, further improving asset security.

[0166] The on-chain business verification contract can determine the business verification type of the target cross-chain business. If the business verification type is on-chain, the on-chain business verification contract verifies the legitimacy of the target cross-chain business. If the business verification type is off-chain, the on-chain business verification contract sends the target cross-chain business to the off-chain verification service. The off-chain business verification device in the off-chain verification service instructs the business verification subject to verify the legitimacy of the target cross-chain business. The off-chain verification service can include multi-chain detection, cross-chain verification, and cross-chain risk management functions. The multi-chain detection function detects the on-chain business verification contracts on each blockchain and obtains verification tasks that require legitimacy verification. Cross-chain verification verifies the obtained verification business. The cross-chain risk management function is responsible for managing cross-chain risky businesses. The off-chain verification service has the authority to freeze and transfer digital assets in all on-chain asset custody contracts. When risky transactions are discovered, it can perform corresponding risk management operations (such as locking or transferring) on ​​locked assets in the on-chain asset custody contracts.

[0167] The first node device can generate an asset lock event indicating that a digital asset with a target asset type and target asset amount in the first account has been locked in the first asset custody contract, and upload this asset lock event to the first blockchain. Simultaneously, the first node device can generate an asset release request, instructing the second node device to release the digital asset with the target asset type and target asset amount to the second account. The asset lock event and asset release request are identified as cross-chain transaction data regarding the target cross-chain transaction, and this cross-chain transaction data is sent to N cross-chain relay devices in the cross-chain relay service. As shown in Figure 9, the cross-chain relay service includes multi-chain detection, cross-chain transaction forwarding, and cross-chain transaction history and status management. The multi-chain detection function enables the N cross-chain relay devices to detect cross-chain transactions occurring on node devices that have joined the cross-chain transaction protocol. The cross-chain transaction forwarding function enables the cross-chain relay devices to verify the validity of the cross-chain transaction data and, upon determining that the cross-chain transaction data is valid, forward the cross-chain transaction data to the second node device maintaining the second blockchain. The cross-chain historical business and status management function manages the relevant information and status of cross-chain historical business. Of course, when the target cross-chain business is a non-asset transaction business, a universal information processor can be used to obtain the business data specified by the target cross-chain business based on the cross-chain application contract as cross-chain transaction data, and then send this cross-chain transaction data to N cross-chain relay devices.

[0168] As shown in Figure 9, the second blockchain also has a cross-chain bridge contract, an on-chain business verification contract, an asset custody contract, a cross-chain asset contract, and a cross-chain application contract deployed, all with the same functions as the contracts on the first blockchain. The second node device can obtain the relay quantity threshold configured in the on-chain business execution contract on the second blockchain, and count the number of cross-chain relay devices that send cross-chain transaction data. The relay quantity threshold is compared with the number of devices. If the number of devices is greater than or equal to the relay quantity threshold, indicating that the vast majority of cross-chain relay devices have determined that the cross-chain transaction data is valid, the asset lock event is determined to be valid, and a data verification result is generated to indicate that the cross-chain transaction data has been verified. In this way, the second node device only determines that the cross-chain transaction data is valid if it determines that the number of devices is greater than or equal to the relay quantity threshold. This can achieve decentralization and avoid the risk of centralized malicious behavior when relying on third-party cross-chain relay devices to forward cross-chain transaction data (for example, when the third-party cross-chain transaction data is not valid, it is still forwarded and submitted to the second node device, causing the second node device to execute risky cross-chain transaction data).

[0169] In an embodiment of the present application, a cross-chain transaction protocol is provided, which includes an on-chain part and an off-chain part. The on-chain part includes an on-chain business verification contract (used to verify the legitimacy of the cross-chain business), an on-chain business execution contract (used to execute the cross-chain business), and the entry conditions for the node devices corresponding to the blockchain to join the cross-chain transaction (i.e., risk control rules); the off-chain part includes an off-chain data verification contract used by the cross-chain relay device to verify the validity of the cross-chain transaction data to be forwarded. Through these contracts in the cross-chain transaction protocol, cross-chain business processing can be automatically realized, thereby improving the efficiency and security of cross-chain business processing. In actual applications, when the first node device receives a cross-chain transaction request sent by the business terminal, it calls the on-chain business verification contract in the cross-chain transaction protocol to verify the legitimacy of the target cross-chain business in the cross-chain transaction request. If the target cross-chain business is legitimate, the on-chain business execution contract in the cross-chain transaction protocol is called to execute the target cross-chain business to obtain cross-chain transaction data. It can be seen that the legitimacy of the target cross-chain business is verified through the on-chain business verification contract. The target cross-chain business will only be executed when it is legitimate, which can effectively improve the security of cross-chain business processing.

[0170] Furthermore, the first node device can send cross-chain transaction data to N cross-chain relay devices associated with the cross-chain transaction protocol. Cross-chain relay device i among the N cross-chain relay devices is used to send the cross-chain transaction data to the second node device when it determines that the cross-chain transaction data is valid based on the off-chain data verification contract in the cross-chain transaction protocol. In this way, by having N cross-chain relay devices verify the validity of the cross-chain transaction data and forward valid cross-chain transaction data, decentralization can be achieved, avoiding the risk of centralized malicious behavior when relying on third-party cross-chain relay devices to forward cross-chain transaction data (such as a third-party cross-chain relay device forwarding and submitting cross-chain transaction data to the second blockchain even when the cross-chain transaction data is not valid). At the same time, by having the cross-chain relay device verify the validity of the cross-chain transaction data, it can avoid the need to send large amounts of ledger structure data on the first blockchain to the second blockchain (for the second blockchain to verify the validity of the cross-chain transaction data based on the large amount of ledger structure data), which would result in higher cross-chain business processing costs and lower efficiency. This can reduce cross-chain business processing costs and improve cross-chain business processing efficiency. The second node device processes the cross-chain transaction data only when it determines that the received cross-chain transaction data is valid, which can improve the security of the cross-chain transaction.

[0171] Further, please refer to Figure 10, which is a schematic diagram of the structure of a blockchain-based data processing device provided in an embodiment of the present application. The blockchain-based data processing device 1 can be a computer program (including program code) running on a computer device. For example, the blockchain-based data processing device 1 is an application software; the blockchain-based data processing device 1 can be used to execute the corresponding steps of the method provided in the embodiment of the present application. As shown in Figure 10, the blockchain-based data processing device 1 can be a first node device that maintains a first blockchain. The blockchain-based data processing device 1 may include: a first receiving module 11, a first verification module 12, an execution module 13, and a first sending module 14.

[0172] A first receiving module 11 is configured to receive, at a first node device associated with a first blockchain, a cross-chain transaction request sent by a service terminal; the cross-chain transaction request includes service description information of a target cross-chain service associated with the first blockchain and the second blockchain, and the first node device and the second node device maintaining the second blockchain both meet the cross-chain transaction protocol;

[0173] The first verification module 12 is used to call the on-chain business verification contract in the cross-chain transaction protocol, verify the legitimacy of the target cross-chain business based on the business description information, and obtain the business verification result;

[0174] The execution module 13 is configured to call the on-chain business execution contract in the cross-chain transaction protocol to execute the target cross-chain business and obtain cross-chain transaction data if the business verification result indicates that the target cross-chain business is legitimate;

[0175] The first sending module 14 is used to send the cross-chain transaction data to N cross-chain relay devices associated with the cross-chain transaction protocol; the cross-chain relay device i among the N cross-chain relay devices is used to send the cross-chain transaction data to the second node device when it is determined that the cross-chain transaction data is valid based on the off-chain data verification contract in the cross-chain transaction protocol; the second node device is used to process the cross-chain transaction data when it is determined that the received cross-chain transaction data is valid, where N is a positive integer greater than 1, and i is a positive integer less than or equal to N.

[0176] The first verification module 12 includes:

[0177] The first acquisition unit 1201 is configured to call the on-chain business verification contract in the cross-chain transaction protocol and obtain, from the business description information, first business attribute information reflecting the business type of the target cross-chain business and second business attribute information reflecting the business risk of the target cross-chain business;

[0178] A first determining unit 1202 is configured to determine a service verification type of a target cross-chain service based on the first service attribute information;

[0179] The first verification unit 1203 is used to verify the legitimacy of the target cross-chain business according to the business verification type and the second business attribute information to obtain a business verification result.

[0180] The first verification unit 1203 is specifically configured to:

[0181] If the business verification type is an on-chain business verification type, the on-chain business verification contract is called to obtain the terminal risk level of the business terminal according to the second business attribute information, as well as the data risk level of the business data specified by the target cross-chain business;

[0182] If the terminal risk level is less than the first level threshold and the data risk level is less than the second level threshold, a business verification result is generated to indicate the legitimacy of the target cross-chain business.

[0183] The first verification unit 1203 is further specifically configured to:

[0184] If the business verification type is an off-chain business verification type, the on-chain business verification contract is called to send the second business attribute information to the off-chain business verification device; the off-chain business verification device is used to instruct the business verification object to perform a verification operation on the target cross-chain business based on the second business attribute information;

[0185] Receive the verification results returned by the off-chain business verification device;

[0186] Based on the operation results, generate the business verification results of the target cross-chain business.

[0187] The target cross-chain business is used to instruct the transfer of digital assets of the target asset type;

[0188] The execution module 13 includes:

[0189] The second determining unit 1301 is configured to, if the business verification result indicates that the target cross-chain business is legitimate, call the on-chain business execution contract in the cross-chain transaction protocol, and determine an asset custody contract that matches the target asset type from the asset custody contract set on the first blockchain as the first asset custody contract;

[0190] A third determining unit 1302 is configured to determine, from the set of asset processors on the first blockchain, an asset processor that matches the target asset type as the first asset processor;

[0191] The execution unit 1303 is configured to execute the target cross-chain business according to the first asset custody contract and the first asset processor to obtain cross-chain transaction data.

[0192] The digital asset of the target asset type belongs to the first account in the first blockchain, and the amount of the digital asset is the target asset amount;

[0193] The execution unit 1303 is specifically configured to:

[0194] Calling the first asset processor to lock the digital asset of the target asset type and target asset amount in the first account into the first asset depository contract;

[0195] Generate an asset lock event indicating that a digital asset of a target asset type and a target asset amount in the first account has been locked into the first asset depository contract;

[0196] Generate an on-chain request for the asset lock event and send the on-chain request to the consensus node of the first blockchain; the consensus node of the first blockchain is used to reach a consensus on the asset lock event and obtain a consensus result;

[0197] Receive the consensus result returned by the consensus node of the first blockchain, and generate cross-chain transaction data about the target cross-chain business based on the consensus result.

[0198] The target cross-chain service is further used to instruct the transfer of a digital asset having a target asset type and a target asset amount to a second account in the second blockchain;

[0199] Generate cross-chain transaction data about the target cross-chain business based on the consensus results, including:

[0200] If the consensus result indicates that the asset lock event consensus is successful, the asset lock event is uploaded to the first blockchain;

[0201] Generate an asset release request, the asset release request being used to instruct the second node device to release the digital asset of the target asset type and target asset amount from the second asset custody contract to the second account; the second asset custody contract being the asset custody contract associated with the target asset type on the second blockchain;

[0202] The asset locking event and the asset release request are determined as cross-chain transaction data regarding the target cross-chain business.

[0203] The execution module 13 includes:

[0204] The calling unit 1304 is configured to call the general message processor on the first blockchain through the on-chain business execution contract in the cross-chain transaction protocol if the business verification result indicates that the target cross-chain business is legitimate and the target cross-chain business is a non-asset transaction type;

[0205] The second acquisition unit 1305 is configured to acquire the business data specified by the target cross-chain business from the first blockchain through the universal message processor;

[0206] The fourth determining unit 1306 is configured to determine the business data specified by the target cross-chain business as cross-chain transaction data regarding the target cross-chain business.

[0207] According to one embodiment of the present application, the various modules in the blockchain-based data processing device 1 shown in Figure 10 can be individually or all combined into one or several units to constitute, or one (or some) of the units can be further divided into at least two functionally smaller sub-units to achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above modules are divided based on logical functions. In actual applications, the functions of one module can also be implemented by at least two units, or the functions of at least two modules can be implemented by one unit. In other embodiments of the present application, the blockchain-based data processing device 1 can also include other units. In actual applications, these functions can also be implemented with the assistance of other units and can be implemented by the collaboration of at least two units.

[0208] According to one embodiment of the present application, a data processing device 1 based on blockchain as shown in FIG10 can be constructed and a data processing method based on blockchain as shown in an embodiment of the present application can be implemented by running a computer program (including program code) capable of executing each step involved in the corresponding method as shown in FIG6 on a general-purpose computer device such as a computer including a central processing unit (CPU), a random access memory medium (RAM), a read-only memory medium (ROM), and other processing elements and storage elements. The above-mentioned computer program can be recorded on, for example, a computer-readable recording medium, and loaded into the above-mentioned computer device through the computer-readable recording medium and run therein. The description of the beneficial effects of the data processing device 1 based on blockchain shown in FIG10 can refer to the description of the beneficial effects of the corresponding method in FIG6, and the embodiment of the present application will not be repeated here.

[0209] Further, please refer to Figure 11, which is a schematic diagram of the structure of a blockchain-based data processing device provided in an embodiment of the present application. The blockchain-based data processing device 2 can be a computer program (including program code) running on a computer device. For example, the blockchain-based data processing device 2 is an application software; the blockchain-based data processing device 2 can be used to execute the corresponding steps of the method provided in the embodiment of the present application. As shown in Figure 11, the blockchain-based data processing device 2 can be a second node device that maintains a second blockchain. The blockchain-based data processing device 2 may include: a second receiving module 21, a verification module 22, and a data processing module 23.

[0210] The second receiving module 21 is used for the second node device associated with the second blockchain to receive the cross-chain transaction data sent by the cross-chain relay device i among the N cross-chain relay devices; the cross-chain transaction data is generated by the first node device when the target cross-chain business is determined to be legitimate based on the on-chain business verification contract in the cross-chain transaction protocol, and is forwarded by the first node device to the N cross-chain relay devices; the cross-chain relay device i is used to send the cross-chain transaction data to the second node device when it is determined that the cross-chain transaction data is valid based on the off-chain data verification contract in the cross-chain transaction protocol, the target cross-chain business is associated with the first blockchain and the second blockchain maintained by the first node device, the first node device and the second node device both satisfy the cross-chain transaction protocol, N is an integer greater than 1, and i is an integer less than or equal to N;

[0211] The verification module 22 is used to verify the validity of the received cross-chain transaction data based on the on-chain business execution contract in the cross-chain transaction protocol and obtain a data verification result;

[0212] The data processing module 23 is used to process the cross-chain transaction data when the data verification result indicates that the cross-chain transaction data is valid.

[0213] The cross-chain transaction data includes an asset lock event reflecting that a digital asset having a target asset type and a target asset amount in a first account of the first blockchain has been locked;

[0214] The verification module 22 includes:

[0215] A statistics unit 2201 is used to obtain the relay quantity threshold configured in the on-chain business execution contract in the cross-chain transaction protocol and count the number of cross-chain relay devices that send cross-chain transaction data;

[0216] A comparing unit 2202 is configured to compare the relay quantity threshold with the device quantity;

[0217] The generating unit 2203 is configured to determine that the asset locking event is valid if the number of devices is greater than or equal to the relay number threshold, and to generate a data verification result indicating that the cross-chain transaction data is valid.

[0218] The data processing module 23 includes:

[0219] The fifth confirmation unit 2301 is used to call the on-chain business verification contract in the cross-chain transaction protocol to determine the data verification type of the cross-chain transaction data when the data verification result indicates that the cross-chain transaction data is valid;

[0220] The second verification unit 2302 is used to verify the data risk of the cross-chain transaction data according to the data verification type and obtain a risk verification result;

[0221] The data processing unit 2303 is configured to process the cross-chain transaction data when the risk verification result indicates that the cross-chain transaction data does not belong to risk data.

[0222] The cross-chain transaction data includes an asset release request, which is used to instruct the second node device to release a digital asset having a target asset type and a target asset amount to a second account in the second blockchain;

[0223] The data processing unit 2303 is specifically used for:

[0224] When the risk verification result indicates that the cross-chain transaction data does not constitute risky data, an asset custody contract matching the target asset type is determined from the asset custody contract set on the second blockchain as the second asset custody contract;

[0225] Determine, from the set of asset processors on the second blockchain, an asset processor that matches the target asset type as the second asset processor;

[0226] The second asset processor is called to release the digital asset of the target asset type and target asset amount from the second asset depository contract to the second account.

[0227] According to one embodiment of the present application, the various modules in the blockchain-based data processing device 2 shown in Figure 11 can be individually or all combined into one or several units to constitute, or one (or some) of the units can be further divided into at least two functionally smaller sub-units to achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above modules are divided based on logical functions. In actual applications, the functions of one module can also be implemented by at least two units, or the functions of at least two modules can be implemented by one unit. In other embodiments of the present application, the blockchain-based data processing device 2 can also include other units. In actual applications, these functions can also be implemented with the assistance of other units and can be implemented by the collaboration of at least two units.

[0228] According to one embodiment of the present application, a data processing device 2 based on blockchain as shown in FIG11 can be constructed, and the data processing method based on blockchain of the embodiment of the present application can be implemented by running a computer program (including program code) capable of executing each step involved in the corresponding method as shown in FIG7 on a general-purpose computer device such as a computer including a central processing unit (CPU), a random access memory medium (RAM), a read-only memory medium (ROM) and other processing elements and storage elements. The above-mentioned computer program can be recorded on a computer-readable recording medium, for example, and loaded into the above-mentioned computer device through the computer-readable recording medium and run therein. The description of the beneficial effects of the data processing device 2 based on blockchain shown in FIG11 can refer to the description of the beneficial effects of the corresponding method in FIG7, and the embodiment of the present application will not be repeated here.

[0229] Further, please refer to Figure 12, which is a schematic diagram of the structure of a blockchain-based data processing device provided in an embodiment of the present application. The blockchain-based data processing device 3 can be a computer program (including program code) running on a computer device. For example, the blockchain-based data processing device 3 is an application software; the blockchain-based data processing device 3 can be used to execute the corresponding steps of the method provided in the embodiment of the present application. As shown in Figure 12, the blockchain-based data processing device 3 can be a second node device that maintains a second blockchain. The blockchain-based data processing device 3 can include: a third receiving module 31, a second verification module 32, and a second sending module 33.

[0230] The third receiving module 31 is used for the cross-chain relay device i among the N cross-chain relay devices to receive the cross-chain transaction data sent by the first node device; the cross-chain transaction data is generated by the first node device when the target cross-chain business is determined to be legitimate based on the on-chain business verification contract in the cross-chain transaction protocol, and is forwarded by the first node device to the N cross-chain relay devices; the target cross-chain business is associated with the first blockchain maintained by the first node device and the second blockchain maintained by the second node device, and the first node device and the second node device both meet the cross-chain transaction protocol, N is an integer greater than 1, and i is an integer less than or equal to N.

[0231] The second verification module 32 is used to verify the validity of the cross-chain transaction data according to the off-chain data verification contract in the cross-chain transaction protocol;

[0232] The second sending module 33 is used to send the cross-chain transaction data to the second node device if the cross-chain transaction data is valid; the second node device is used to process the cross-chain transaction data when determining that the received cross-chain transaction data is valid.

[0233] The cross-chain transaction data includes an asset lock event reflecting that a digital asset having a target asset type and a target asset amount in a first account of the first blockchain has been locked;

[0234] The second verification module 32 includes:

[0235] A detection unit 3201 is configured to obtain an event identifier of an asset locking event and detect a target block containing the event identifier from the first blockchain;

[0236] The sixth determining unit 3202 is configured to determine whether the cross-chain transaction data is valid if a target block containing an event identifier is detected on the first blockchain.

[0237] According to one embodiment of the present application, the various modules in the blockchain-based data processing device 3 shown in Figure 12 can be individually or all combined into one or several units to constitute, or one (or some) of the units can be further divided into at least two functionally smaller sub-units to achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above modules are divided based on logical functions. In actual applications, the functions of one module can also be implemented by at least two units, or the functions of at least two modules can be implemented by one unit. In other embodiments of the present application, the blockchain-based data processing device 3 can also include other units. In actual applications, these functions can also be implemented with the assistance of other units and can be implemented by the collaboration of at least two units.

[0238] According to one embodiment of the present application, a data processing device based on blockchain as shown in FIG12 can be constructed by running a computer program (including program code) capable of executing each step involved in the corresponding method as shown in FIG8 on a general-purpose computer device such as a computer including a central processing unit (CPU), a random access memory medium (RAM), a read-only memory medium (ROM), and a storage element. The data processing method based on blockchain in the embodiment of the present application can be implemented. The above-mentioned computer program can be recorded on, for example, a computer-readable recording medium, and loaded into the above-mentioned computer device through the computer-readable recording medium and run therein. The description of the beneficial effects of the data processing device 3 based on blockchain shown in FIG12 can refer to the description of the beneficial effects of the corresponding method in FIG8, and the embodiment of the present application will not be repeated here.

[0239] Further, refer to Figure 13, Figure 13 is a schematic diagram of a computer device provided in an embodiment of the present application. As shown in Figure 13, the computer device 3000 may include: at least one processor 3001, such as a CPU, at least one network interface 3004, a user interface 3003, a memory 3005, and at least one communication bus 3002. Wherein, the communication bus 3002 is used to realize the connection communication between these components. Wherein, the user interface 3003 may include a display screen (Display), a keyboard (Keyboard), and the network interface 3004 may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface). The memory 3005 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. The storage 3005 may optionally also be at least one storage device located away from the aforementioned processor 3001. As shown in Figure 13, the memory 3005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a device control application.

[0240] In the computer device 3000 shown in Figure 13, the network interface 3004 is mainly used for the second node device to communicate with the target relay server and the target oracle server over the network; the user interface 3003 is mainly used to provide an input interface for the user; and the processor 3001 can be used to call the device control application stored in the memory 3005.

[0241] It should be understood that the computer device 3000 described in the embodiments of the present application can execute the description of the blockchain-based data processing method in the embodiments corresponding to Figures 6, 7, or 8 above, and can also execute the description of the blockchain-based data processing device 1 in the embodiment corresponding to Figure 10 above, the blockchain-based data processing device 2 in the embodiment corresponding to Figure 11 above, or the blockchain-based data processing device 3 in the embodiment corresponding to Figure 12, which will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated.

[0242] In addition, it should be noted that the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program executed by the aforementioned blockchain-based data processing device 1, blockchain-based data processing device 2, or blockchain-based data processing device 3, and the computer program includes program instructions. When the processor executes the program instructions, it can execute the description of the blockchain-based data processing method in the embodiment corresponding to Figure 6, Figure 7, or Figure 8 above. Therefore, it will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application. As an example, the program instructions can be deployed to be executed on one computing device, or on multiple computing devices located at one location, or on multiple computing devices distributed at multiple locations and interconnected by a communication network. Multiple computing devices distributed at multiple locations and interconnected by a communication network can constitute a blockchain system.

[0243] In one aspect, the present application provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, enabling the computer device to perform the blockchain-based data processing method described in the embodiments corresponding to FIG6 , FIG7 , or FIG8 , which will not be repeated here. Furthermore, the beneficial effects of the same method will not be repeated here.

[0244] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware through a computer program. The above-described program can be stored in a computer-readable storage medium. When executed, the program can include the processes in the above-described method embodiments. The above-described storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0245] The above disclosure is only a preferred embodiment of the present application, and certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A data processing method based on blockchain, characterized in that: include: The first node device associated with the first blockchain receives a cross-chain transaction request sent by the business terminal; the cross-chain transaction request includes business description information of the target cross-chain business associated with the first blockchain and the second blockchain, and the first node device and the second node device maintaining the second blockchain both meet the cross-chain transaction protocol; Calling the on-chain business verification contract in the cross-chain transaction protocol, verifying the legitimacy of the target cross-chain business according to the business description information, and obtaining a business verification result; If the business verification result indicates that the target cross-chain business is legitimate, then the on-chain business execution contract in the cross-chain transaction protocol is called to execute the target cross-chain business and obtain cross-chain transaction data; The cross-chain transaction data is sent to N cross-chain relay devices associated with the cross-chain transaction protocol; the cross-chain relay device i among the N cross-chain relay devices is used to send the cross-chain transaction data to the second node device when it is determined that the cross-chain transaction data is valid based on the off-chain data verification contract in the cross-chain transaction protocol; The second node device is used to process the cross-chain transaction data when determining that the received cross-chain transaction data is valid, where N is a positive integer greater than 1, and i is a positive integer less than or equal to N.

2. The method according to claim 1, characterized in that The calling of the on-chain business verification contract in the cross-chain transaction protocol verifies the legitimacy of the target cross-chain business according to the business description information, and obtains a business verification result, including: Calling the on-chain business verification contract in the cross-chain transaction protocol, and obtaining first business attribute information reflecting the business type of the target cross-chain business and second business attribute information reflecting the business risk of the target cross-chain business from the business description information; Determine the service verification type of the target cross-chain service according to the first service attribute information; According to the business verification type and the second business attribute information, the legitimacy of the target cross-chain business is verified to obtain a business verification result.

3. The method according to claim 2, characterized in that The verifying the legitimacy of the target cross-chain business according to the business verification type and the second business attribute information to obtain a business verification result includes: If the business verification type is an on-chain business verification type, the on-chain business verification contract is called to obtain the terminal risk level of the business terminal according to the second business attribute information, and obtain the data risk level of the business data specified by the target cross-chain business; If the terminal risk level is less than the first level threshold, and the data risk level is less than the second level threshold, a business verification result is generated to indicate that the target cross-chain business is legitimate.

4. The method according to claim 2 or 3, characterized in that: The verifying the legitimacy of the target cross-chain business according to the business verification type and the second business attribute information to obtain a business verification result includes: If the business verification type is an off-chain business verification type, the on-chain business verification contract is called to send the second business attribute information to the off-chain business verification device; the off-chain business verification device is used to instruct the business verification object to perform a verification operation on the target cross-chain business based on the second business attribute information; Receiving the operation result of the verification operation returned by the off-chain service verification device; According to the operation result, a business verification result of the target cross-chain business is generated.

5. The method according to any one of claims 1 to 4, characterized in that The target cross-chain business is used to instruct the transfer of digital assets of the target asset type; If the business verification result indicates that the target cross-chain business is legitimate, the on-chain business execution contract in the cross-chain transaction protocol is called to execute the target cross-chain business and obtain cross-chain transaction data, including: If the business verification result indicates that the target cross-chain business is legitimate, the on-chain business execution contract in the cross-chain transaction protocol is called, and an asset custody contract matching the target asset type is determined from the asset custody contract set on the first blockchain as the first asset custody contract; Determine, from the set of asset processors on the first blockchain, an asset processor that matches the target asset type as the first asset processor; According to the first asset custody contract and the first asset processor, the target cross-chain business is executed to obtain cross-chain transaction data.

6. The method according to claim 5, characterized in that The digital asset of the target asset type belongs to the first account in the first blockchain, and the amount of the digital asset is the target asset amount; The step of executing the target cross-chain business according to the first asset custody contract and the first asset processor to obtain cross-chain transaction data includes: Calling the first asset processor to lock the digital asset of the target asset type and the target asset amount in the first account into the first asset custody contract; generating an asset lock event indicating that the digital asset having the target asset type and the target asset amount in the first account has been locked to the first asset depository contract; Generate a request for uploading the asset lock event, and send the request to the consensus node of the first blockchain; the consensus node of the first blockchain is used to reach a consensus on the asset lock event and obtain a consensus result; Receive the consensus result returned by the consensus node of the first blockchain, and generate cross-chain transaction data about the target cross-chain business according to the consensus result.

7. The method according to claim 6, characterized in that The target cross-chain service is further used to instruct to transfer the digital asset having the target asset type and the target asset amount to a second account in the second blockchain; The generating cross-chain transaction data about the target cross-chain business according to the consensus result includes: If the consensus result indicates that the consensus of the asset locking event is successful, the asset locking event is uploaded to the first blockchain; Generate an asset release request, the asset release request is used to instruct the second node device to release the digital asset having the target asset type and the target asset amount from the second asset custody contract to the second account; the second asset custody contract is an asset custody contract associated with the target asset type on the second blockchain; The asset locking event and the asset release request are determined as cross-chain transaction data regarding the target cross-chain business.

8. The method according to any one of claims 1 to 7, characterized in that If the business verification result indicates that the target cross-chain business is legitimate, the on-chain business execution contract in the cross-chain transaction protocol is called to execute the target cross-chain business and obtain cross-chain transaction data, including: If the business verification result indicates that the target cross-chain business is legitimate, and the target cross-chain business is a non-asset transaction type, the general message processor on the first blockchain is called through the on-chain business execution contract in the cross-chain transaction protocol; Obtaining the business data specified by the target cross-chain business from the first blockchain through the general message processor; The business data specified by the target cross-chain business is determined as cross-chain transaction data regarding the target cross-chain business.

9. A data processing method based on blockchain, characterized in that: include: The second node device associated with the second blockchain receives the cross-chain transaction data sent by the cross-chain relay device i among the N cross-chain relay devices; The cross-chain transaction data is generated by executing the target cross-chain business when the first node device determines that the target cross-chain business is legitimate based on the on-chain business verification contract in the cross-chain transaction protocol, and is forwarded by the first node device to the N cross-chain relay devices; the cross-chain relay device i is used to send the cross-chain transaction data to the second node device when it is determined that the cross-chain transaction data is valid based on the off-chain data verification contract in the cross-chain transaction protocol, the target cross-chain business is associated with the first blockchain and the second blockchain maintained by the first node device, the first node device and the second node device both satisfy the cross-chain transaction protocol, N is an integer greater than 1, and i is an integer less than or equal to N; Based on the on-chain business execution contract in the cross-chain transaction protocol, verify the validity of the received cross-chain transaction data to obtain a data verification result; When the data verification result indicates that the cross-chain transaction data is valid, the cross-chain transaction data is processed.

10. The method according to claim 9, characterized in that The cross-chain transaction data includes an asset locking event for reflecting that a digital asset having a target asset type and a target asset amount in a first account of the first blockchain has been locked; The on-chain data verification contract in the cross-chain transaction protocol verifies the cross-chain transaction data sent by the M cross-chain relay devices to obtain a data verification result, including: Obtain the relay quantity threshold configured in the on-chain business execution contract in the cross-chain transaction protocol, and count the number of cross-chain relay devices that send the cross-chain transaction data; comparing the relay quantity threshold with the device quantity; If the number of devices is greater than or equal to the relay number threshold, the asset locking event is determined to be valid, and a data verification result is generated to indicate that the cross-chain transaction data is valid.

11. The method according to claim 9 or 10, characterized in that: When the data verification result indicates that the cross-chain transaction data is valid, processing the cross-chain transaction data includes: When the data verification result indicates that the cross-chain transaction data is valid, calling the on-chain business verification contract in the cross-chain transaction protocol to determine the data verification type of the cross-chain transaction data; Verify the data risk of the cross-chain transaction data according to the data verification type to obtain a risk verification result; When the risk verification result indicates that the cross-chain transaction data does not belong to risk data, the cross-chain transaction data is processed.

12. The method according to claim 11, characterized in that The cross-chain transaction data includes an asset release request, where the asset release request is used to instruct the second node device to release a digital asset having a target asset type and a target asset amount to a second account in the second blockchain; When the risk verification result indicates that the cross-chain transaction data does not belong to risk data, processing the cross-chain transaction data includes: When the risk verification result indicates that the cross-chain transaction data does not belong to risk data, determining an asset custody contract matching the target asset type from the asset custody contract set on the second blockchain as the second asset custody contract; Determine, from the set of asset processors on the second blockchain, an asset processor that matches the target asset type as the second asset processor; The second asset processor is called to release the digital asset having the target asset type and the target asset amount from the second asset depository contract to the second account.

13. A data processing method based on blockchain, characterized in that: include: The cross-chain relay device i among the N cross-chain relay devices receives the cross-chain transaction data sent by the first node device; The cross-chain transaction data is generated by executing the target cross-chain business when the first node device determines that the target cross-chain business is legitimate based on the on-chain business verification contract in the cross-chain transaction protocol, and is forwarded by the first node device to the N cross-chain relay devices; the target cross-chain business is associated with the first blockchain maintained by the first node device and the second blockchain maintained by the second node device, the first node device and the second node device both satisfy the cross-chain transaction protocol, N is an integer greater than 1, and i is an integer less than or equal to N; Verify the validity of the cross-chain transaction data according to the off-chain data verification contract in the cross-chain transaction protocol; If the cross-chain transaction data is valid, sending the cross-chain transaction data to the second node device; The second node device is used to process the cross-chain transaction data when it is determined that the received cross-chain transaction data is valid.

14. The method according to claim 13, characterized in that The cross-chain transaction data includes an asset locking event for reflecting that a digital asset having a target asset type and a target asset amount in a first account of the first blockchain has been locked; Verifying the validity of the cross-chain transaction data according to the off-chain data verification contract in the cross-chain transaction protocol includes: Obtaining an event identifier of the asset locking event, and detecting a target block containing the event identifier from the first blockchain; If a target block containing the event identifier is detected on the first blockchain, it is determined that the cross-chain transaction data is valid.

15. A data processing device based on blockchain, characterized in that: include A first receiving module, configured for a first node device associated with a first blockchain to receive a cross-chain transaction request sent by a business terminal; the cross-chain transaction request includes business description information of a target cross-chain business associated with the first blockchain and the second blockchain, and the first node device and the second node device maintaining the second blockchain both meet the cross-chain transaction protocol; The first verification module is used to call the on-chain business verification contract in the cross-chain transaction protocol, verify the legitimacy of the target cross-chain business according to the business description information, and obtain a business verification result; An execution module is used to call the on-chain business execution contract in the cross-chain transaction protocol to execute the target cross-chain business if the business verification result indicates that the target cross-chain business is legal. Get cross-chain transaction data; A first sending module, configured to send the cross-chain transaction data to N cross-chain relay devices associated with the cross-chain transaction protocol; a cross-chain relay device i among the N cross-chain relay devices is configured to send the cross-chain transaction data to the second node device when determining that the cross-chain transaction data is valid based on an off-chain data verification contract in the cross-chain transaction protocol; The second node device is used to process the cross-chain transaction data when determining that the received cross-chain transaction data is valid, where N is a positive integer greater than 1, and i is a positive integer less than or equal to N.

16. A data processing device based on blockchain, characterized in that: include: A second receiving module is used for a second node device associated with a second blockchain to receive cross-chain transaction data sent by a cross-chain relay device i among N cross-chain relay devices; the cross-chain transaction data is generated by executing the target cross-chain business when the first node device determines that the target cross-chain business is legitimate based on the on-chain business verification contract in the cross-chain transaction protocol, and is forwarded by the first node device to the N cross-chain relay devices; the cross-chain relay device i is used to send the cross-chain transaction data to the second node device when it is determined that the cross-chain transaction data is valid based on the off-chain data verification contract in the cross-chain transaction protocol, the target cross-chain business is associated with the first blockchain and the second blockchain maintained by the first node device, the first node device and the second node device both satisfy the cross-chain transaction protocol, N is an integer greater than 1, and i is an integer less than or equal to N; A verification module, used to verify the validity of the received cross-chain transaction data based on the on-chain business execution contract in the cross-chain transaction protocol, and obtain a data verification result; A data processing module is used to process the cross-chain transaction data when the data verification result indicates that the cross-chain transaction data is valid.

17. A data processing device based on blockchain, characterized in that: include: A third receiving module, used for the cross-chain relay device i among the N cross-chain relay devices to receive the cross-chain transaction data sent by the first node device; The cross-chain transaction data is generated by executing the target cross-chain business when the first node device determines that the target cross-chain business is legitimate based on the on-chain business verification contract in the cross-chain transaction protocol, and is forwarded by the first node device to the N cross-chain relay devices; the target cross-chain business is associated with the first blockchain maintained by the first node device and the second blockchain maintained by the second node device, the first node device and the second node device both satisfy the cross-chain transaction protocol, N is an integer greater than 1, and i is an integer less than or equal to N A second verification module, used to verify the validity of the cross-chain transaction data according to the off-chain data verification contract in the cross-chain transaction protocol; A second sending module, configured to send the cross-chain transaction data to the second node device if the cross-chain transaction data is valid; The second node device is used to process the cross-chain transaction data when it is determined that the received cross-chain transaction data is valid.

18. A computer device, characterized in that: include: Processor and memory; The processor is connected to a memory, wherein the memory is used to store a computer program, and the processor is used to call the computer program so that the computer device executes the method according to any one of claims 1 to 14.

19. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded and executed by a processor, so that a computer device having the processor executes the method according to any one of claims 1 to 14.

20. A computer program product or a computer program, characterized in that The computer program product or computer program comprises computer instructions, which are stored in a computer-readable storage medium and are suitable for being read and executed by a processor, so that a computer device having the processor executes the method according to any one of claims 1 to 14.