Block chain transaction processing method and device, electronic equipment and storage medium

Standardized processes are implemented between blockchains through full-chain protocols and basic contracts, which solves the problems of asset consistency and transaction security in cross-chain transactions, and improves transaction reliability and efficiency between blockchains.

CN120069867APending Publication Date: 2025-05-30TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311630365.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-29
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

Asset consistency and transaction security between different blockchain networks are an urgent problem to be solved, especially when conducting cross-chain transactions, data interaction needs to be realized under the private nature of retaining data.

Method used

By introducing full-chain protocols, we provide full-chain basic contracts and registration services to realize standardized processes during cross-chain transactions. Specific methods include receiving transactions, calling source business contracts to execute transactions, generating transaction execution events, building target blocks and sending transactions to target business contracts.

Benefits of technology

It improves asset consistency and transaction security between different blockchains, and ensures the reliability and efficiency of cross-chain transactions through standardized processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120069867A_ABST
    Figure CN120069867A_ABST
Patent Text Reader

Abstract

The invention provides a block chain transaction processing method and device, electronic equipment and a storage medium. The block chain transaction processing method comprises the steps that a first transaction used for transferring virtual resources from a source business contract on a source block chain to a target business contract on a target block chain is received, the source business contract is configured as a remote contract of the target business contract, and the source business contract and the target business contract both configure a whole-chain basic contract as a parent contract; calling the source business contract to execute the first transaction and generating a transaction execution event corresponding to the first transaction, wherein the transaction execution event carries a target chain identifier initialized by the registration service; and generating a target block corresponding to the transaction execution event, so that the cross-chain relay node constructs a corresponding second transaction, and sends the second transaction to the target business contract. According to the embodiment of the invention, asset consistency and transaction security between different block chains can be improved, and the method can be widely applied to scenes such as cloud technology, block chains and smart traffic.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain, and particularly to a blockchain transaction processing method, apparatus, electronic device, and storage medium. Background Art

[0002] With the development and partitioning of blockchain technology, data isolation exists between different blockchain networks. Sometimes, when conducting transactions, different blockchain networks need to be processed, that is, cross-chain processing is required. This enables data interaction between different blockchain networks while maintaining the private nature of the data. Since cross-chain transactions involve two or more blockchains, the asset consistency and transaction security between different blockchains are urgent problems to be solved. Summary of the Invention

[0003] The following is an overview of the subject matter described in detail in this application. This overview is not intended to limit the scope of protection of the claims.

[0004] Embodiments of the present application provide a blockchain transaction processing method, apparatus, electronic device, and storage medium, which can improve the asset consistency and transaction security between different blockchains.

[0005] On the one hand, embodiments of the present application provide a blockchain transaction processing method, including:

[0006] Receiving a first transaction, where the first transaction is used to transfer virtual resources from a source business contract on a source blockchain to a target business contract on a target blockchain. The source business contract is configured as a remote contract of the target business contract based on a full-chain basic contract in the full-chain protocol. The full-chain basic contract is configured on both the source blockchain and the target blockchain, and both the source business contract and the target business contract configure the full-chain basic contract as a parent contract;

[0007] Invoking the source business contract to execute the first transaction and generating a transaction execution event corresponding to the first transaction, where the transaction execution event carries a target chain identifier of the target blockchain, and the target chain identifier is initialized by a cross-chain relay node invoking a registration service in the full-chain protocol;

[0008] Generating a target block corresponding to the transaction execution event for the cross-chain relay node to construct a second transaction corresponding to the transaction execution event based on the target block, and then sending the second transaction to the target business contract according to the target chain identifier.

[0009] On the other hand, embodiments of the present application further provide a blockchain transaction processing apparatus, including:

[0010] A first receiving unit, configured to receive a first transaction, where the first transaction is used to transfer virtual resources from a source business contract on a source blockchain to a target business contract on a target blockchain. The source business contract is configured as a remote contract of the target business contract based on a full-chain basic contract in a full-chain protocol. The full-chain basic contract is configured on both the source blockchain and the target blockchain, and both the source business contract and the target business contract configure the full-chain basic contract as a parent contract;

[0011] A first generating unit, configured to call the source business contract to execute the first transaction and generate a transaction execution event corresponding to the first transaction. The transaction execution event carries a target chain identifier of the target blockchain, and the target chain identifier is initialized by a cross-chain relay node calling a registration service in the full-chain protocol;

[0012] A second generating unit, configured to generate a target block corresponding to the transaction execution event, so that after the cross-chain relay node constructs a second transaction corresponding to the transaction execution event based on the target block, the second transaction is sent to the target business contract according to the target chain identifier.

[0013] Optionally, before calling the source business contract to execute the first transaction and generate a transaction execution event corresponding to the first transaction, the blockchain transaction processing device further includes:

[0014] A second receiving unit, configured to call a full-chain service contract in the full-chain protocol and receive a resource identifier range sent by the cross-chain relay node calling the registration service, where the resource identifier range corresponding to the source blockchain is different from the resource identifier range corresponding to the target blockchain;

[0015] A third generating unit, configured to generate a resource identifier of the virtual resources according to the resource identifier range.

[0016] Optionally, the third generating unit is specifically configured to:

[0017] Generate a first identifier according to the resource identifier range;

[0018] Obtain a preset identifier setting parameter in the full-chain basic contract, and based on the identifier setting parameter and the resource identifier range, call the source business contract to generate a second identifier;

[0019] Concatenate the first identifier and the second identifier to obtain the resource identifier of the virtual resources.

[0020] Optionally, the blockchain transaction processing device further includes:

[0021] A permission closing unit, which is used to call the full-chain basic contract to close the permissions of the source service contract and the alternative service contract to transfer virtual resources to the target service contract when updating the source service contract to an alternative service contract, where the alternative service contract configures the full-chain basic contract as the parent contract;

[0022] A permission transfer unit, which is used to call the full-chain basic contract to open the permission of the alternative service contract to transfer virtual resources to the target service contract after the alternative service contract is configured as the remote contract of the target service contract based on the full-chain basic contract.

[0023] Optionally, the permission closing unit is specifically used for:

[0024] Call the full-chain basic contract to close the permissions of the source service contract and the alternative service contract to transfer virtual resources to the target blockchain according to the target chain identifier;

[0025] Wherein, before closing the permissions of the source service contract and the alternative service contract to transfer virtual resources to the target service contract according to the target chain identifier, the permission of the target service contract to transfer virtual resources to the source service contract is configured to be closed.

[0026] Optionally, the second generating unit is specifically used for:

[0027] Call the full-chain service contract of the full-chain protocol to generate an event identifier for the transaction execution event;

[0028] Obtain the target network information of at least one of the terminal that initiates the transaction corresponding to the transaction execution event and the target service contract;

[0029] Generate a target block corresponding to the transaction execution event according to the event identifier and the target network information.

[0030] Optionally, after generating the target block corresponding to the transaction execution event, the blockchain transaction processing device further includes:

[0031] A third receiving unit, which is used to receive a query request sent by the cross-chain relay node calling the verification service in the full-chain protocol, where the query request carries the event identifier;

[0032] An obtaining unit, which is used to call the full-chain basic contract to obtain the target network information according to the event identifier;

[0033] A sending unit, which is used to send the target network information to the cross-chain relay node for the cross-chain relay node to verify the transaction execution event based on the target network information before constructing the second transaction.

[0034] Optionally, generating an event identifier for the transaction execution event by invoking a full-chain service contract of the full-chain protocol includes:

[0035] Invoking a full-chain service contract of the full-chain protocol to obtain a random seed, and inputting the random seed into a random number generator to obtain a target random number;

[0036] Obtaining a generation timestamp when the transaction execution event is generated;

[0037] Concatenating the target random number and the generation timestamp and inputting the result into a target hash function to obtain a target hash value, and using the target hash value as the event identifier for the transaction execution event.

[0038] Optionally, the first generation unit is specifically configured to:

[0039] Invoking a transfer fee payment contract in the full-chain protocol to deduct a preset amount of transfer fees on the source blockchain;

[0040] After deducting the transfer fees, invoking the source service contract to execute the first transaction and generate a transaction execution event corresponding to the first transaction.

[0041] On the other hand, an embodiment of the present application further provides a blockchain transaction processing method, including:

[0042] A service node invokes a contract interface service to receive service parameters, constructs a first transaction for transferring virtual resources to a target service contract on a target blockchain according to the service parameters, and sends the first transaction to a blockchain node corresponding to the source blockchain, where the contract interface service is compiled based on a source service contract on the source blockchain;

[0043] The blockchain node invokes the source service contract to execute the first transaction and generate a corresponding transaction execution event, and generates a target block corresponding to the transaction execution event, where the source service contract is configured as a remote contract of the target service contract based on a full-chain basic contract in the full-chain protocol, the full-chain basic contract is configured on both the source blockchain and the target blockchain, the source service contract and the target service contract both configure the full-chain basic contract as a parent contract, the transaction execution event carries a target chain identifier of the target blockchain, and the target chain identifier is initialized by a cross-chain relay node invoking a registration service in the full-chain protocol;

[0044] After constructing a second transaction corresponding to the transaction execution event based on the target block, the cross-chain relay node sends the second transaction to the target blockchain according to the target chain identifier.

[0045] On the other hand, an embodiment of the present application further provides a blockchain transaction processing system, including a business node, a blockchain node, and an inter-chain relay node;

[0046] The business node is configured to receive business parameters by invoking a contract interface service, construct a first transaction for transferring virtual resources to a target business contract on a target blockchain according to the business parameters, and send the first transaction to the blockchain node corresponding to the source blockchain. The contract interface service is compiled based on a source business contract on the source blockchain;

[0047] The blockchain node is configured to execute the first transaction by invoking the source business contract and generate a corresponding transaction execution event, and generate a target block corresponding to the transaction execution event. The source business contract is configured as a remote contract of the target business contract based on a full-chain basic contract in the full-chain protocol. The full-chain basic contract is configured on both the source blockchain and the target blockchain. Both the source business contract and the target business contract configure the full-chain basic contract as a parent contract. The transaction execution event carries a target chain identifier of the target blockchain, and the target chain identifier is initialized by the inter-chain relay node invoking a registration service in the full-chain protocol;

[0048] The inter-chain relay node is configured to construct a second transaction corresponding to the transaction execution event based on the target block, and send the second transaction to the target blockchain according to the target chain identifier.

[0049] Optionally, the blockchain transaction processing system further includes a terminal. The terminal is configured to obtain a first code file of the source business contract, compile the first code file to obtain a first target file for the blockchain node to invoke. The first code file integrates the full-chain basic contract, and the full-chain basic contract is used to provide a standardized interface for the full-chain protocol;

[0050] The terminal is further configured to convert the first code file into a second code file of the contract interface service, and compile the second code file to obtain a second target file for the business node to invoke;

[0051] The terminal is further configured to deploy the first target file to the source blockchain and deploy the second target file to the business node.

[0052] Optionally, the terminal is further configured to obtain a third code file of at least one pre-positioned contract in the full-chain protocol, where the pre-positioned contract is any contract configured on the source blockchain in the full-chain protocol;

[0053] The terminal is further configured to merge the third code file into the second code file.

[0054] Optionally, the terminal is further configured to access the contract interface service and display a parameter configuration interface of the contract interface service, where the parameter configuration interface is provided with a parameter configuration control and a transaction confirmation control;

[0055] The terminal is further configured to obtain the service parameters input based on the parameter configuration control in response to an operation on the parameter configuration control;

[0056] The terminal is further configured to send the service parameters to the service node in response to an operation on the transaction confirmation control.

[0057] Optionally, the service node is specifically configured to:

[0058] Obtain a source contract address of the source service contract pre-configured based on the contract interface service;

[0059] Construct a first transaction for transferring virtual resources to a target service contract on a target blockchain according to the service parameters and the source contract address;

[0060] Obtain a pre-configured signature private key according to the service parameters, and sign the first transaction based on the signature private key;

[0061] Send the signed first transaction to a blockchain node corresponding to the source blockchain according to the source contract address.

[0062] Optionally, the service node is further configured to call a verification interface service to receive an event identifier of the transaction execution event, construct a third transaction according to the event identifier, and send the third transaction to the blockchain node, where the third transaction is used to query at least one of the terminal that initiated the transaction execution event and the target service contract for target network information;

[0063] The blockchain node is further configured to call the full-chain basic contract, obtain the pre-stored target network information according to the event identifier, and send the target network information to the service node.

[0064] On the other hand, an embodiment of the present application further provides an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor implements the above-mentioned blockchain transaction processing method when executing the computer program.

[0065] On the other hand, an embodiment of the present application further provides a computer-readable storage medium, where the storage medium stores a computer program, and the computer program is implemented by a processor to implement the above-mentioned blockchain transaction processing method.

[0066] On the other hand, an embodiment of the present application further provides a computer program product, which includes a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the blockchain transaction processing method described above.

[0067] The embodiment of the present application has at least the following beneficial effects: by receiving a first transaction for transferring virtual resources from a source business contract on a source blockchain to a target business contract on a target blockchain, wherein the source business contract is configured as a remote contract of the target business contract based on a full-chain basic contract in a full-chain protocol. Since both the source business contract and the target business contract configure the full-chain basic contract as a parent contract, the standardization degree between the source business contract and the target business contract can be improved. Then, the source business contract is called to execute the first transaction for transferring virtual resources to the target business contract and generate a corresponding transaction execution event. Since the transaction execution event carries a target chain identifier of the target blockchain, and the target chain identifier is initialized by a cross-chain relay node calling a registration service in the full-chain protocol, the cross-chain relay node can be used as a unified off-chain transfer. After generating a target block corresponding to the transaction execution event, the cross-chain relay node can construct a second transaction corresponding to the transaction execution event based on the target block and send the second transaction to the target business contract according to the target chain identifier. It can be seen that by introducing a full-chain protocol including a full-chain basic contract and a registration service, a standardized process can be formed on-chain and off-chain during cross-chain transactions based on the full-chain protocol, improving the asset consistency and transaction security between different blockchains.

[0068] In addition, during cross-chain transactions, the business node calls the contract interface service to receive business parameters, constructs a first transaction for transferring virtual resources to a target business contract on a target blockchain according to the business parameters, and sends the first transaction to a blockchain node corresponding to the source blockchain. Since the contract interface service is compiled based on the source business contract on the source blockchain, service preposition can be realized through the contract interface service provided by the business node. The terminal only needs to call the contract interface service of the business node to configure business parameters, and the contract interface service can automatically complete transaction construction without understanding the protocol details of contract interaction and the differences in interaction between multiple different blockchains, thus effectively simplifying the cross-chain transaction process and improving the cross-chain transaction efficiency.

[0069] Other features and advantages of the present application will be described in the following specification, and, in part, will become apparent from the specification or be understood by implementing the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] The accompanying drawings are used to provide a further understanding of the technical solution of the present application, and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application, and do not constitute a limitation to the technical solution of the present application.

[0071] Figure 1 It is a schematic diagram of an optional implementation environment provided for the embodiments of the present application;

[0072] Figure 2 It is an optional process schematic diagram of the blockchain transaction processing method provided for the embodiments of the present application;

[0073] Figure 3 It is an optional process schematic diagram of updating the business contract provided for the embodiments of the present application;

[0074] Figure 4 It is an optional process schematic diagram of closing permissions provided for the embodiments of the present application;

[0075] Figure 5 It is an optional process schematic diagram of generating a resource identifier provided for the embodiments of the present application;

[0076] Figure 6 It is an optional process schematic diagram of publicly disclosing target network information provided for the embodiments of the present application;

[0077] Figure 7 It is another optional process schematic diagram of the blockchain transaction processing method provided for the embodiments of the present application;

[0078] Figure 8 It is an optional process schematic diagram of deploying the source business contract and the contract interface service provided for the embodiments of the present application;

[0079] Figure 9 It is an optional process schematic diagram of deploying the source business contract and the contract interface service provided for the embodiments of the present application;

[0080] Figure 10 It is an optional process schematic diagram of sending business parameters provided for the embodiments of the present application;

[0081] Figure 11 It is an optional interface schematic diagram of the business processing sub-interface provided for the embodiments of the present application;

[0082] Figure 12 It is an optional process schematic diagram of sending the first transaction provided for the embodiments of the present application;

[0083] Figure 13 It is an optional architecture schematic diagram of the business node provided for the embodiments of the present application;

[0084] Figure 14An optional flowchart for sending target network information provided by an embodiment of this application;

[0085] Figure 15 An optional architecture diagram of the full-chain protocol provided by an embodiment of this application;

[0086] Figure 16 An optional architecture diagram of the blockchain network provided by an embodiment of this application;

[0087] Figure 17 An optional architecture diagram of the bill management network provided by an embodiment of this application;

[0088] Figure 18 A structural diagram of the blockchain transaction processing device provided by an embodiment of this application;

[0089] Figure 19 An architecture diagram of the blockchain transaction processing system provided by an embodiment of this application;

[0090] Figure 20 A partial structural block diagram of the terminal provided by an embodiment of this application;

[0091] Figure 21 A partial structural block diagram of the server provided by an embodiment of this application. Detailed implementation manners

[0092] In order to make the objectives, technical solutions and advantages of this application clearer, the following further elaborates on this application in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit this application.

[0093] It should be noted that in each specific implementation manner of this application, when it comes to performing relevant processing based on data related to the characteristics of the target object, such as target object attribute information or attribute information sets, etc., the permission or consent of the target object will be obtained first. Moreover, the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. Among them, the target object can be a user. In addition, when an embodiment of this application needs to obtain target object attribute information, it will obtain the separate permission or separate consent of the target object through methods such as pop-up windows or jumping to a confirmation page. After clearly obtaining the separate permission or separate consent of the target object, the necessary target object-related data for enabling the normal operation of the embodiment of this application will be obtained.

[0094] In the embodiments of the present application, the term "module" or "unit" refers to a computer program with a predetermined function or a part of a computer program, which works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of an overall module or unit that includes the functions of that module or unit.

[0095] Before further elaborating on the embodiments of the present application, the nouns and terms involved in the embodiments of the present application are described. The nouns and terms involved in the embodiments of the present application are applicable to the following explanations:

[0096] Blockchain is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithms. Blockchain, in essence, is a decentralized database, a string of data blocks generated by using cryptographic methods. Each data block contains information about a batch of network transactions, which is used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include a blockchain underlying platform, a platform product service layer, and an application service layer.

[0097] The blockchain underlying platform can include processing modules such as user management, basic services, smart contracts, and operation detection. Among them, the user management module is responsible for the identity information management of all blockchain participants, including maintaining the generation of public and private keys (account management), key management, and the maintenance of the correspondence between the real identity of the user and the blockchain address (permission management). And under the authorization, it supervises and audits the transaction situations of certain real identities, and provides the rule configuration for risk control (risk control audit); the basic service module is deployed on all blockchain node devices to verify the validity of business requests, and records the valid requests to the storage after consensus. For a new business request, the basic service first performs interface adaptation parsing and authentication processing (interface adaptation), then encrypts the business information through a consensus algorithm (consensus management), transmits the encrypted and complete and consistent information to the shared ledger (network communication), and performs record storage; the smart contract module is responsible for the registration and issuance of contracts, contract triggering, and contract execution. Developers can define contract logic through a certain programming language, publish it to the blockchain (contract registration), and trigger the execution according to the logic of the contract terms by calling keys or other events, complete the contract logic, and at the same time provide functions for contract upgrade and cancellation; the operation detection module is mainly responsible for the deployment, configuration modification, contract setting, cloud adaptation during the product release process, and the visual output of the real-time state during the product operation, such as: alarming, detecting the network situation, detecting the health status of node devices, etc.

[0098] The platform product service layer provides the basic capabilities and implementation frameworks for typical applications. Developers can build on these basic capabilities and overlay the characteristics of the business to complete the blockchain implementation of the business logic. The application service layer provides application services based on the blockchain solution for business participants to use.

[0099] Block: Records all transactions and status results that occur within a certain period of time, and is a consensus on the current ledger state. Specifically, for a blockchain, each time data is written, that is, the above-mentioned transaction process, a block is created.

[0100] Chain: Composed of blocks connected in sequence according to the occurrence order, and is a log record of the entire ledger state change.

[0101] Consensus mechanism: Through the voting of special nodes, the verification and confirmation of transactions are completed in a very short time. The goal is to make all honest nodes maintain a consistent blockchain diagram.

[0102] Smart contract: It is a piece of code written on the blockchain. Once the terms in the smart contract are triggered in the blockchain at a certain time, the code will execute automatically.

[0103] Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or local area network to achieve data computing, storage, processing, and sharing. Cloud technology is the general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model, which can form a resource pool, be used on demand, and be flexible and convenient. Cloud computing technology will become an important support. The back-end services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites, and more portal websites. With the highly developed application of the Internet industry, in the future, each item may have its own identification mark and needs to be transmitted to the back-end system for logical processing. Data at different levels will be processed separately, and various industry data requires a powerful system back-end support, which can only be achieved through cloud computing.

[0104] With the development and partitioning of blockchain technology, data isolation exists between different blockchain networks. And sometimes, when conducting transactions, different blockchain networks need to be processed, that is, cross-chain processing is required. This makes it necessary to achieve data interaction between different blockchain networks while maintaining the private characteristics of the data. Since cross-chain transactions involve more than two blockchains, the asset consistency and transaction security between different blockchains are an urgent problem to be solved.

[0105] Refer to Figure 1 , Figure 1A schematic diagram of an optional implementation environment provided by an embodiment of the present application. The implementation environment includes a source blockchain network 110, a target blockchain network 120, and an inter-chain relay node 130. Among them, the source blockchain network 110 includes a plurality of first blockchain nodes 111, the target blockchain network 120 includes a plurality of second blockchain nodes 121, and the first blockchain nodes 111 and the inter-chain relay node 130 are connected through a communication network, and the second blockchain nodes 121 and the inter-chain relay node 130 are connected through a communication network.

[0106] Exemplarily, the first blockchain node 111 deploys a source business contract, and the second blockchain node 121 deploys a target business contract. Any one of the first blockchain nodes 111 in the source blockchain network 110 can receive a first transaction. Among them, the first transaction is used to transfer virtual resources from the source business contract on the source blockchain to the target business contract on the target blockchain. The source business contract is configured as a remote contract of the target business contract based on the full-chain basic contract in the full-chain protocol. The full-chain basic contract is configured on both the source blockchain and the target blockchain, and both the source business contract and the target business contract configure the full-chain basic contract as the parent contract; call the source business contract to execute the first transaction and generate a transaction execution event corresponding to the first transaction, where the transaction execution event carries the target chain identifier of the target blockchain, and the target chain identifier is initialized by the inter-chain relay node 130 by calling the registration service in the full-chain protocol; generate a target block corresponding to the transaction execution event for the inter-chain relay node 130 to construct a second transaction corresponding to the transaction execution event based on the target block, and then send the second transaction to the target business contract according to the target chain identifier. Since the target business contract is deployed on the second blockchain node 121, it is equivalent to sending the second transaction to the second blockchain node 121 in the target blockchain network 120.

[0107] The first blockchain node 111 receives a first transaction for transferring virtual resources from a source business contract on a source blockchain to a target business contract on a target blockchain. Herein, the source business contract is configured as a remote contract of the target business contract based on a full-chain basic contract in a full-chain protocol. Since both the source business contract and the target business contract configure the full-chain basic contract as a parent contract, the standardization degree between the source business contract and the target business contract can be improved. Then, the source business contract is called to generate a transaction execution event for transferring virtual resources to the target business contract. Since the transaction execution event carries a target chain identifier of the target blockchain, and the target chain identifier is initialized by the cross-chain relay node 130 invoking a registration service in the full-chain protocol, the cross-chain relay node 130 can be used as a unified off-chain transfer. After generating a target block corresponding to the transaction execution event, the cross-chain relay node 130 can construct a second transaction corresponding to the transaction execution event based on the target block and send the second transaction to the target business contract according to the target chain identifier. It can be seen that by introducing the full-chain protocol including the full-chain basic contract and the registration service, a standardized process can be formed on-chain and off-chain during cross-chain transactions based on the full-chain protocol, improving the asset consistency and transaction security between different blockchains.

[0108] It should be noted that both the first blockchain node 111 and the second blockchain node 121 are blockchain nodes, also known as consensus nodes. The blockchain node can be a server in a blockchain network or a terminal accessing the blockchain network. The specific form of the blockchain node is not limited here. The cross-chain relay node 130 is an interface node. The cross-chain relay node 130 can be an independent device, for example, a separate computer or server, or a part of an independent device, for example, a virtual machine partitioned on a server. The specific form of the cross-chain relay node 130 is not limited here. The terminal can be a mobile phone, a computer, a smart voice interaction device, a smart home appliance, a vehicle-mounted terminal, etc., but is not limited thereto.

[0109] The method provided in the embodiments of the present application can be applied to various scenarios, including but not limited to scenarios such as cloud technology, blockchain, intelligent transportation, and assisted driving.

[0110] Refer to Figure 2 , Figure 2 FIG. is an optional flowchart of a blockchain transaction processing method provided in an embodiment of the present application. The blockchain transaction processing method can be executed by a blockchain node corresponding to a source blockchain. The blockchain transaction processing method includes but is not limited to the following steps 210 to step 230.

[0111] Step 210: Receive a first transaction, where the first transaction is used to transfer virtual resources from a source business contract on a source blockchain to a target business contract on a target blockchain. The source business contract is configured as a remote contract of the target business contract based on a full-chain basic contract in a full-chain protocol. The full-chain basic contract is configured on both the source blockchain and the target blockchain, and both the source business contract and the target business contract configure the full-chain basic contract as a parent contract;

[0112] Step 220: Invoke the source business contract to execute the first transaction and generate a transaction execution event corresponding to the first transaction, where the transaction execution event carries a target chain identifier of the target blockchain, and the target chain identifier is initialized by a cross-chain relay node invoking a registration service in the full-chain protocol;

[0113] Step 230: Generate a target block corresponding to the transaction execution event, so that after the cross-chain relay node constructs a second transaction corresponding to the transaction execution event based on the target block, the second transaction is sent to the target business contract according to the target chain identifier.

[0114] The following provides a detailed description of steps 210 - 230.

[0115] In step 210, the first transaction refers to a blockchain transaction. Virtual resources may be stored on the source blockchain. The first transaction is used to transfer the virtual resources from the source business contract on the source blockchain to the target business contract on the target blockchain. Both the source business contract and the target business contract are smart contracts. A smart contract is a transaction protocol that is used to automatically execute, control, or record events according to the terms of the transaction protocol. The source business contract can execute blockchain transactions of virtual resources on the source blockchain, and the target business contract can execute blockchain transactions of virtual resources on the target blockchain. Since the virtual resources are on the source blockchain, the first transaction belongs to the blockchain transaction of virtual resources on the source blockchain.

[0116] Among them, both the target blockchain and the source blockchain are blockchains. A blockchain is a type of distributed ledger. One blockchain is an independent ledger. Two different blockchains are two different independent ledgers, and the two ledgers have no association. Therefore, the target blockchain and the source blockchain respectively correspond to different independent ledgers.

[0117] Among them, the full-chain protocol includes several full-chain contracts on the chain. Since full-chain contracts on the chain will be deployed on each blockchain, and the full-chain contracts on the chain include full-chain basic contracts, both the source blockchain and the target blockchain are configured with full-chain basic contracts. Specifically, both the source business contract and the target business contract configure the full-chain basic contract as the parent contract, that is, both the source business contract and the target business contract inherit from the full-chain basic contract. Therefore, the source business contract and the target business contract can inherit the functional functions and standardized interfaces in the full-chain basic contract, which can improve the standardization degree between the source business contract and the target business contract, and through the joint cooperation of the source business contract and the target business contract, cross-chain transfer of virtual resources between the source blockchain and the target blockchain can be realized.

[0118] Before cross-chain transfer, it is necessary to pre-configure the remote contract of the target business contract on the source blockchain, so that the target business contract only allows executing transactions corresponding to the remote contract on the source blockchain, and the target business contract does not allow executing transactions corresponding to non-remote contracts on the source blockchain, which can avoid executing illegal transactions and thus improve security; therefore, in order to make the target business contract allow executing transactions corresponding to the source business contract on the source blockchain, the source business contract is configured as the remote contract of the target business contract based on the full-chain basic contract in the full-chain protocol. The configuration process can specifically be: the blockchain node corresponding to the target blockchain calls the full-chain basic contract in the full-chain protocol to configure the source business contract as the remote contract of the target business contract, with relatively high security.

[0119] In step 220, when the blockchain node corresponding to the source blockchain calls the source business contract to execute the first transaction, a transaction execution event can be generated. The transaction execution event can include information such as the timestamp of the transaction, the first account address sending the virtual resources, the second account address receiving the virtual resources, and the resource information.

[0120] Specifically, taking the scenario of cross-chain transferring virtual resources on the source blockchain to the target blockchain as an example, first, the relevant object can construct the first transaction of the virtual resources. The first transaction can include information such as the first account address sending the virtual resources, the second account address receiving the virtual resources, the target chain identifier, and the resource information. The resource information can be the identifier of the virtual resources, or the type and quantity of the virtual resources. The resource information is used to indicate the virtual resources to be transferred.

[0121] Then, send the first transaction of the virtual resource to the contract address of the source business contract on the source blockchain. Then, the source business contract will execute this first transaction, determine the virtual resource to be transferred based on the first account address and resource information of the virtual resource, and lock the virtual resource. For example, send the virtual resource to a specific third account address on the source blockchain, so that the virtual resource cannot be transferred by related objects, realizing the locking of the virtual resource. Assume that the account address a1 is the specific third account address, and the virtual resource to be locked can be transferred to the account address a1. When the locking of the virtual resource is released, the virtual resource can be transferred to other account addresses again. By setting up a locking mechanism, the ownership and usage rights of the virtual resource are protected, preventing unauthorized access and use;

[0122] When the source business contract executes the first transaction, it can generate a transaction execution event. This transaction execution event can include information such as the timestamp of the first transaction, the first account address, the third account address, and the resource information. The transaction execution event can also carry additional information such as the second account address, the target chain identifier, and the contract address of the source business contract.

[0123] Among them, the virtual resource is an intangible property, that is, a digital asset. The virtual resource on the source blockchain can have a binding relationship with an account address on the source blockchain. The virtual resource bound to the account address of the related object on the blockchain is equivalent to the digital asset owned by the related object. The related objects include, but are not limited to: individuals or enterprises.

[0124] Next, a detailed description will be given of the process of initializing the target chain identifier by invoking the registration service in the full-chain protocol.

[0125] In a blockchain ecosystem where multiple blockchains are interconnected, in order to accurately distinguish different blockchains, it is necessary to configure a unique blockchain identifier for each blockchain. For example, in a blockchain ecosystem that includes a source blockchain and a target blockchain, the source chain identifier of the source blockchain and the target chain identifier of the target blockchain are different. The configuration process of the blockchain identifier is as follows:

[0126] The full-chain protocol includes several off-chain full-chain cross-chain services. The off-chain full-chain cross-chain services can be deployed in cross-chain relay nodes. The off-chain full-chain cross-chain services can include a registration service. The registration service can perform initialization settings on the blockchain, and use the registration service of the cross-chain relay node to configure the blockchain identifier of each blockchain, so that the blockchain identifier of this blockchain is different from the blockchain identifiers of other blockchains in the blockchain ecosystem, realizing the registration of the blockchain; Therefore, by invoking the registration service in the full-chain protocol, the target chain identifier of the target blockchain can be initialized, and the source chain identifier of the source blockchain can also be initialized.

[0127] Among them, the blockchain identifier can be a numerical value. The blockchain identifier can be a hexadecimal numerical value. For example, the blockchain identifier can take the value of 0xF03, which is equivalent to the blockchain identifier being able to be represented in the form of a string. The blockchain identifier can also be a decimal numerical value. Here, the specific numerical representation form of the blockchain identifier is not limited. Specifically, the ways for the cross-chain relay node to initialize the blockchain identifier by invoking the registration service in the full-chain protocol include, but are not limited to, the following ways:

[0128] (1) The cross-chain relay node determines the blockchain identifier of the blockchain according to the original registration order of the blockchain. The cross-chain relay node invokes the registration service in the full-chain protocol and configures the blockchain identifier to the blockchain. The original registration order is used to indicate the order of configuring the blockchain identifier among multiple blockchains. For example, when the blockchain identifier of a blockchain is configured, the value of the original registration order is incremented by one;

[0129] Exemplarily, the initial value of the original registration order can be set to 1. For example, the original registration order of the blockchain being 1 means that this blockchain is the first to be configured with the blockchain identifier among multiple blockchains, and the blockchain identifier of this blockchain is configured as 0x000. Another example is that the original registration order of the blockchain being 2 means that this blockchain is the second to be configured with the blockchain identifier among multiple blockchains, and the blockchain identifier of this blockchain is configured as 0x001.

[0130] The advantage of the above way of directly initializing the blockchain identifier by order is high configuration efficiency and small processing overhead.

[0131] (2) The cross-chain relay node obtains the application scenario of the blockchain, and then in the range of chain identifiers corresponding to the application scenario, determines the blockchain identifier of the blockchain according to the target registration order of the blockchain, and then configures the blockchain identifier to the blockchain.

[0132] The types of application scenarios of the blockchain can be multiple. For example, the application scenario can be an invoice management scenario, a logistics management scenario, or a copyright management scenario, etc. The cross-chain relay node can pre-configure the range of chain identifiers corresponding to each application scenario so that the ranges of chain identifiers corresponding to different application scenarios are different. For example, the range of chain identifiers corresponding to the invoice management scenario can be from 0x000 to 0x0FF, the range of chain identifiers corresponding to the logistics management scenario can be from 0x100 to 0x1FF, and the range of chain identifiers corresponding to the copyright management scenario can be from 0x200 to 0x2FF; the cross-chain relay node can obtain the application scenario of the blockchain by inputting information carrying the application scenario;

[0133] Each application scenario has an independent target registration order, which is used to indicate the order in which the blockchain configures blockchain identifiers among multiple blockchains in the corresponding application scenario. For example, when the blockchain identifier of a blockchain corresponding to an application scenario is configured, the value of the target registration order corresponding to that application scenario is incremented by one, while the target registration orders corresponding to other application scenarios remain unchanged;

[0134] Exemplarily, the initial value of the target registration order corresponding to the invoice management scenario can be set to 1, and the range of chain identifiers corresponding to the invoice management scenario can be from 0x000 to 0x0FF. For example, if the target registration order of a blockchain in the invoice management scenario is 1, it means that this blockchain is the first to be configured with a blockchain identifier among multiple blockchains in the invoice management scenario, and the blockchain identifier of this blockchain is configured as 0x000. Another example, if the target registration order of a blockchain in the invoice management scenario is 2, it means that this blockchain is the second to be configured with a blockchain identifier among multiple blockchains in the invoice management scenario, and the blockchain identifier of this blockchain is configured as 0x001;

[0135] Similarly, the initial value of the target registration order corresponding to the logistics management scenario can be set to 1, and the range of chain identifiers corresponding to the logistics management scenario can be from 0x100 to 0x1FF. For example, if the target registration order of a blockchain in the logistics management scenario is 1, it means that this blockchain is the first to be configured with a blockchain identifier among multiple blockchains in the logistics management scenario, and the blockchain identifier of this blockchain is configured as 0x100. Another example, if the target registration order of a blockchain in the logistics management scenario is 2, it means that this blockchain is the second to be configured with a blockchain identifier among multiple blockchains in the logistics management scenario, and the blockchain identifier of this blockchain is configured as 0x101;

[0136] The advantage of the above method of initializing blockchain identifiers through range and order is that the configuration effect is good, and the application scenario of the blockchain can be quickly determined through the blockchain identifier.

[0137] In step 230, when the blockchain node corresponding to the source blockchain executes the first transaction, a transaction execution event will be generated. After executing the first transaction, the corresponding transaction execution event will be recorded in the corresponding block. When the target block containing the transaction execution event is chained on the source blockchain, the cross-chain relay node can obtain the corresponding transaction execution event through the target block. Then, the cross-chain relay node can construct the second transaction corresponding to the transaction execution event. Since the transaction execution event carries the target chain identifier of the target blockchain, and the target chain identifier is initialized by the cross-chain relay node invoking the registration service in the full-chain protocol, the cross-chain relay node can be used as a unified off-chain transfer. The cross-chain relay node is deployed with a forwarding service. The cross-chain relay node invokes the forwarding service to send the second transaction to the target blockchain indicated by the target chain identifier, specifically sending the second transaction to the target business contract. Since the source business contract is configured as a remote contract of the target business contract on the target blockchain and the target business contract allows the execution of the transaction corresponding to the source business contract, the second transaction can be invoked to be executed by the target business contract.

[0138] The generation process of the target block is described in detail below.

[0139] After sending the transaction to the blockchain network, the blockchain nodes of the blockchain network usually first verify the transaction and then accumulate the verified transactions. When a certain degree of accumulation is reached, for example, the number of accumulated transactions reaches the preset quantity threshold or the accumulation time reaches the preset time threshold, these transactions will be packaged into a block to be verified. The blockchain nodes of the blockchain network will also verify whether the transactions in the block to be verified meet the execution conditions. If they meet the execution conditions, the transactions will be executed, which is equivalent to pre-executing the transactions.

[0140] Taking the scenario of cross-chain transferring virtual resources on the source blockchain to the target blockchain as an example, when the blockchain node corresponding to the source blockchain invokes the source business contract to execute the first transaction, a corresponding transaction execution event will be generated. After executing the first transaction, the corresponding transaction execution event will be recorded in the block to be verified. Then, the blockchain node will send the block to be verified to other blockchain nodes corresponding to the source blockchain for verification. When the block to be verified is verified and passed by a preset number of blockchain nodes in the source blockchain, the block to be verified will be added to the source blockchain. The block that is chained on the source blockchain and contains the transaction execution event can be used as the target block, which is equivalent to generating the target block corresponding to the transaction execution event.

[0141] The construction process of the second transaction is described in detail below.

[0142] The cross-chain relay node can obtain the corresponding transaction execution event in the target block. From the above description of the transaction execution event, it can be known that the transaction execution event may include information such as the timestamp of the transaction, the first account address sending virtual resources, the specific third account address receiving virtual resources, and resource information. The transaction execution event also carries additional information such as the second account address, the target chain identifier, and the contract address of the source business contract. The cross-chain relay node can construct a second transaction based on information such as the first account address, the second account address, and resource information. The second transaction carries the additional information of the contract address of the source business contract. The cross-chain relay node determines the target business contract in the target blockchain based on the target chain identifier and the transaction content of the second transaction, and then sends the second transaction to the target business contract in the target blockchain. Since the target business contract in the target blockchain has pre-configured the source business contract as a remote contract of the target business contract, and the second transaction carries the additional information of the contract address of the source business contract, which is equivalent to the second transaction being the transaction corresponding to the source business contract, therefore, the target business contract can be called to execute the second transaction.

[0143] The following details the execution process of the second transaction.

[0144] After sending the second transaction to the contract address of the target business contract on the target blockchain, the target business contract will execute the second transaction, generate the virtual resources indicated by the resource information on the target blockchain, and then bind the virtual resources to the second account address receiving the virtual resources. Only the relevant objects corresponding to the second account address can access and use the virtual resources, completing the cross-chain transfer of the virtual resources between the source blockchain and the target blockchain.

[0145] The following details the process by which the cross-chain relay node obtains the transaction execution event.

[0146] The cross-chain relay node can determine that the target block containing the transaction execution event is chained on the source blockchain. For example, the cross-chain relay node can timely learn that the target block is chained on the source blockchain through detection. For another example, the cross-chain relay node can subscribe to the corresponding chaining event through the event subscription mechanism provided by the source blockchain. When the target block is chained on the source blockchain, it is equivalent to triggering the chaining event. After the chaining event is triggered, the source blockchain will generate a notification that the target block is chained on the source blockchain and send the notification to the source blockchain. When the cross-chain relay node determines that the target block is chained, the cross-chain relay node can obtain the corresponding transaction execution event in the target block through the query interface provided by the source blockchain.

[0147] Through the above steps 210-230, the embodiment of the present application receives a first transaction for transferring virtual resources from a source business contract on a source blockchain to a target business contract on a target blockchain. Among them, the source business contract is configured as a remote contract of the target business contract based on the full-chain basic contract in the full-chain protocol. Since both the source business contract and the target business contract configure the full-chain basic contract as the parent contract, the standardization degree between the source business contract and the target business contract can be improved. Then, the source business contract is called to execute the first transaction for transferring virtual resources to the target business contract and generate a corresponding transaction execution event. Since the transaction execution event carries the target chain identifier of the target blockchain, and the target chain identifier is initialized by the cross-chain relay node calling the registration service in the full-chain protocol, the cross-chain relay node can be used as a unified off-chain transfer. After generating the target block corresponding to the transaction execution event, the cross-chain relay node can construct a second transaction corresponding to the transaction execution event based on the target block and send the second transaction to the target business contract according to the target chain identifier. It can be seen that by introducing the full-chain protocol including the full-chain basic contract and the registration service, a standardized process can be formed on-chain and off-chain when conducting cross-chain transactions based on the full-chain protocol, improving the asset consistency and transaction security between different blockchains.

[0148] The above is the overall description of steps 210-230. The following is a detailed description of steps 210-230.

[0149] The following is a detailed description of step 210.

[0150] Step 210: Receive the first transaction. Among them, the first transaction is used to transfer virtual resources from the source business contract on the source blockchain to the target business contract on the target blockchain. The source business contract is configured as a remote contract of the target business contract based on the full-chain basic contract in the full-chain protocol. The full-chain basic contract is configured on both the source blockchain and the target blockchain, and both the source business contract and the target business contract configure the full-chain basic contract as the parent contract.

[0151] In the specific implementation of this embodiment, refer to Figure 3 , the blockchain transaction processing method further includes:

[0152] Step 310: When the source business contract is updated to an alternative business contract, call the full-chain basic contract to close the permission for the source business contract and the alternative business contract to transfer virtual resources to the target business contract, where the alternative business contract configures the full-chain basic contract as the parent contract;

[0153] Step 320: After the alternative business contract is configured as a remote contract of the target business contract based on the full-chain basic contract, call the full-chain basic contract to open the permission for the alternative business contract to transfer virtual resources to the target business contract;

[0154] Correspondingly, before step 320, it further includes: step 330, the second blockchain node in the target blockchain network configures the alternative business contract as a remote contract of the target business contract based on the full-chain basic contract.

[0155] In step 310, the first blockchain node in the source blockchain network can call the full-chain basic contract to close the permission for the source business contract to transfer virtual resources to the target business contract. For example, by calling the pause function to close the permission for the source business contract to transfer virtual resources to the target business contract, which is equivalent to locking the source business contract, and the source blockchain cannot transfer virtual resources from the source business contract to the target business contract. At the same time, call the full-chain basic contract to close the permission for the alternative business contract to transfer virtual resources to the target business contract. For example, by calling the pause function to close the permission for the alternative business contract to transfer virtual resources to the target business contract, which is equivalent to locking the alternative business contract, and the source blockchain cannot transfer virtual resources from the alternative business contract to the target business contract; in addition, since both the source business contract and the alternative business contract configure the full-chain basic contract as the parent contract, the standardization degree between the source business contract and the alternative business contract can be improved.

[0156] In step 320, in the scenario of cross-chain transfer of virtual resources, the full-chain basic contract can be provided with a full-chain remote configuration mechanism. Based on the full-chain remote configuration mechanism, the first blockchain node in the source blockchain network can configure the remote contract of the target business contract on the source blockchain, so that the target business contract only allows the execution of transactions corresponding to the remote contract on the source blockchain, and the target business contract does not allow the execution of transactions corresponding to non-remote contracts on the source blockchain, which can improve security.

[0157] After locking both the source business contract and the alternative business contract, assuming that the alternative business contract is not configured as the remote contract of the target business contract, call the full-chain basic contract to open the permission for the alternative business contract to transfer virtual resources to the target business contract. At this time, the source blockchain can transfer virtual resources from the alternative business contract to the target business contract, but the target business contract does not allow the execution of transactions corresponding to the alternative business contract, and the virtual resources transferred from the alternative business contract to the target business contract will be blocked or even lost, resulting in asset losses.

[0158] In contrast, after ensuring that the alternative business contract is configured as the remote contract of the target business contract based on the full-chain basic contract, that is, after ensuring that the target business contract allows the execution of the transaction corresponding to the alternative business contract, then call the full-chain basic contract to open the permission for the alternative business contract to transfer virtual resources to the target business contract. For example, by calling the recovery function to open the permission for the alternative business contract to transfer virtual resources to the target business contract, which is equivalent to unlocking the alternative business contract. The source blockchain can transfer virtual resources from the alternative business contract to the target business contract. At this time, the target business contract allows the execution of the transaction corresponding to the alternative business contract. Therefore, the cross-chain transfer of virtual resources can be completed based on the alternative business contract and the target business contract, avoiding the loss of virtual resources.

[0159] In step 330, similar to the process of configuring the source business contract as the remote contract of the target business contract, the second blockchain node in the target blockchain network can configure the alternative business contract as the remote contract of the target business contract based on the full-chain basic contract.

[0160] Through steps 310 - 330, by deploying the remote contract locking mechanism, the remote contract of the business contract can be updated at any stage. For example, in the stage after receiving the first transaction, or in the stage after receiving the first transaction. During the process of updating the remote contract, the business contract can be automatically locked and unlocked to ensure business consistency and avoid the loss of virtual resources caused by the change of the remote contract.

[0161] The above is the overall description of steps 310 - 330. The following will describe step 310 in detail.

[0162] In the specific implementation of this embodiment, refer to Figure 4 , step 310 includes:

[0163] Step 410: Call the full-chain basic contract to close the permission for the source business contract and the alternative business contract to transfer virtual resources to the target blockchain according to the target chain identifier;

[0164] Among them, before closing the permission for the source business contract and the alternative business contract to transfer virtual resources to the target business contract according to the target chain identifier, the permission for the target business contract to transfer virtual resources to the source business contract is configured to be closed;

[0165] Correspondingly, before step 410, it further includes: Step 420: The second blockchain node in the target blockchain network closes the permission for the target business contract to transfer virtual resources to the source business contract.

[0166] The following will describe steps 410 - 420 in detail.

[0167] In step 410, since the alternative business contract is a new business contract, by default, the permission for the target business contract to transfer virtual resources to the alternative business contract is closed. Based on this, the first blockchain node in the source blockchain network can call the full-chain basic contract to close the permissions for the source business contract and the alternative business contract to transfer virtual resources to the target blockchain according to the target chain identifier. For example, call the pause function to close the permissions, and the target chain identifier is the input parameter of the pause function.

[0168] In the case of closing the permissions for the source business contract and the alternative business contract to transfer virtual resources to the target business contract, and closing the permission for the target business contract to transfer virtual resources to the source business contract, it is impossible to call the source business contract or the alternative business contract to transfer virtual resources to the target business contract, nor can the target business contract be called to transfer virtual resources to the source business contract or the alternative business contract. Therefore, the alternative business contract can be configured as a remote contract of the target business contract first, and then the target business contract can be configured as a remote contract of the alternative business contract. Or the target business contract can be configured as a remote contract of the alternative business contract first, and then the alternative business contract can be configured as a remote contract of the target business contract. There is no requirement for the order of setting the remote contract between the alternative business contract and the target business contract.

[0169] The advantage of this embodiment is that by closing the corresponding permissions in advance, when setting up the remote contract, there is no need to consider the order of setting the remote contract, making the process of setting the remote contract more convenient.

[0170] The above is a detailed description of step 210.

[0171] The following is a detailed description of step 220.

[0172] Step 220: Call the source business contract to execute the first transaction and generate a transaction execution event corresponding to the first transaction, where the transaction execution event carries the target chain identifier of the target blockchain, and the target chain identifier is initialized by the cross-chain relay node calling the registration service in the full-chain protocol.

[0173] In the specific implementation of this embodiment, refer to Figure 5 , before step 220, the blockchain transaction processing method further includes:

[0174] Step 510: Call the full-chain service contract in the full-chain protocol to receive the resource identifier range sent by the cross-chain relay node calling the registration service, where the resource identifier range corresponding to the source blockchain is different from the resource identifier range corresponding to the target blockchain;

[0175] Step 520: Generate the resource identifier of the virtual resource according to the resource identifier range.

[0176] Correspondingly, step 220 includes: step 530, invoking the source business contract to execute the first transaction carrying the resource identifier and generating a transaction execution event corresponding to the first transaction.

[0177] Before step 510, it further includes: step 540, the cross-chain relay node invoking the registration service to send the resource identifier range to the first blockchain node in the source blockchain network.

[0178] The following elaborates on steps 510 - 540 in detail.

[0179] In step 510, the virtual resources may include digital collections. In order to quickly locate the virtual resources in the blockchain, corresponding resource identifiers need to be bound to each virtual resource. Usually, when the blockchain generates virtual resources, resource identifiers are bound to the virtual resources. The off-chain registration service can not only perform initialization settings on the blockchain but also configure the resource identifier range of the virtual resources. Therefore, in the source blockchain, the full-chain service contract in the full-chain protocol is invoked, enabling the first blockchain node in the source blockchain network to receive the resource identifier range sent by the cross-chain relay node invoking the registration service, so that the full-chain service contract on the source blockchain can configure the resource identifier range. The resource identifier range specifically refers to the range where the resource identifiers bound to the virtual resources on this blockchain are located. The full-chain service contracts of different blockchains need to configure different resource identifier ranges. It can be seen that the resource identifier range corresponding to the source blockchain is different from the resource identifier range corresponding to the target blockchain.

[0180] In step 520, the first blockchain node in the source blockchain network can generate the resource identifier of the virtual resource within the resource identifier range. Since the resource identifier ranges corresponding to different blockchains are different, when generating the resource identifiers of virtual resources within different resource identifier ranges, it can ensure that the resource identifiers of virtual resources in different blockchains are different from each other.

[0181] In some embodiments, the resource identifier may be a numerical value, and the resource identifier range refers to a set containing one or more numerical values. The resource identifier may be a hexadecimal numerical value. Correspondingly, the resource identifier range contains multiple hexadecimal numerical values. For example, the resource identifier range contains 0x901000 to 0x901 FFF. Within this resource identifier range, the resource identifier can take the value of 0x901 af3, which is equivalent to the resource identifier being able to be represented in the form of a string. The resource identifier range refers to a set containing one or more strings. The resource identifier may also be a decimal numerical value. Here, the specific numerical representation form of the resource identifier is not limited; the resource identifier data type may be an unsigned data type.

[0182] The following elaborates on the configuration process of the resource identifier range in detail.

[0183] The full-chain contract on the chain also includes a full-chain service contract. The full-chain service contract may include an allocation protocol for blockchain identifiers. Before a new blockchain joins the blockchain ecosystem, it is necessary to use a cross-chain relay node to deploy the full-chain service contract on the blockchain, which is equivalent to recording the full-chain service contract in the blocks of the blockchain. Then, use the registration service of the cross-chain relay node to call the full-chain service contract, and configure the blockchain identifier of the blockchain through the allocation protocol of the blockchain identifier. Moreover, the full-chain service contract may also include an allocation protocol for resource identifiers. Therefore, the registration service of the cross-chain relay node can also be used to call the full-chain service contract, and configure the resource identifier range of the blockchain through the allocation protocol of the resource identifier, and generate resource identifiers.

[0184] In some embodiments, the number of digits of the resource identifier can be multiple, and the number of digits of each resource identifier can be fixed. For example, for a resource identifier with a value of 256 bits, the first 128 bits can be used as the identifier prefix, and the last 128 bits can be used as the identifier suffix. Different identifier prefixes can be used to distinguish different blockchains, and different identifier suffixes can be used to distinguish different virtual resources in the same blockchain.

[0185] Specifically, the ways for the blockchain to configure the resource identifier range include but are not limited to the following ways:

[0186] (1) Method 1: Pre-configure the target number of digits of the resource identifier in the cross-chain relay node; the cross-chain relay node can determine the identifier prefix corresponding to the source blockchain to be configured based on a preset configuration rule. For example, the cross-chain relay node can determine the identifier prefix according to the registration order of the source blockchain, or determine the identifier prefix of the source blockchain according to the input information. The configuration rule for the identifier prefix is not limited here; then the cross-chain relay node expands the number of digits of the identifier prefix until the actual number of digits is the same as the target number of digits, and takes the set of all expansion results as the resource identifier range. For example, if the target number of digits is configured to 6, the first 3 bits can be used as the identifier prefix, and the last 3 bits can be used as the identifier suffix. Assuming the identifier prefix is 0x901, expand the number of digits of the identifier prefix to obtain multiple expansion results with 6 digits, such as obtaining the set from 0x901000 to 0x901 FFF, that is, the resource identifier range is from 0x901000 to 0x901 FFF; then, call the full-chain service contract in the full-chain protocol in the source blockchain, and receive the resource identifier range sent by the cross-chain relay node calling the registration service, so that the full-chain service contract on the source blockchain can configure the resource identifier range.

[0187] (2) Method 2: Pre-configure the target digit number of the resource identifier in the source blockchain; the cross-chain relay node can determine the identifier prefix corresponding to the source blockchain to be configured based on a preset configuration rule, and then, in the source blockchain, call the full-chain service contract in the full-chain protocol. After receiving the identifier prefix sent by the cross-chain relay node calling the registration service, the source blockchain can extend digits to the identifier prefix until the actual digit number is the same as the target digit number, and use the set of all extension results as the resource identifier range, so that the full-chain service contract on the source blockchain can configure the resource identifier range well.

[0188] In step 530, assume that the first transaction is used to transfer the virtual resource indicated by the resource identifier from the source blockchain to the target blockchain. Before executing the first transaction, the virtual resource needs to be pre-generated in the source blockchain. When the source blockchain generates the virtual resource, it will bind the corresponding resource identifier to the virtual resource. The first transaction will also contain the information of the resource identifier. When the first blockchain node in the source blockchain network calls the source business contract to execute the first transaction, it can quickly locate the corresponding virtual resource through the resource identifier, and can also generate a transaction execution event for transferring the virtual resource indicated by the resource identifier to the target business contract when executing the first transaction, effectively improving the processing efficiency of cross-chain transfer.

[0189] In step 540, the cross-chain relay node deploys an off-chain full-chain cross-chain service. The full-chain cross-chain service includes a registration service, and the cross-chain relay node can call the registration service to send the resource identifier range to the first blockchain node in the source blockchain network.

[0190] Through steps 510 - 540, using the registration service of the cross-chain relay node, configure the resource identifier range in the full-chain service contract in the full-chain protocol of each blockchain respectively, and then generate the resource identifier of the virtual resource according to the resource identifier range, which is equivalent to specifying the generation method of the resource identifier, and configuring a unique resource identifier range for the full-chain service contract of each blockchain, which can ensure that the resource identifier ranges corresponding to different blockchains are different, so that the resource identifiers of the virtual resources in different blockchains are different from each other, and can accurately distinguish the virtual resources located on different blockchains in the blockchain ecosystem where multiple blockchains are interconnected.

[0191] The above is the overall description of steps 510 - 540. The following will elaborate on step 520.

[0192] When this embodiment is specifically implemented, step 520 includes:

[0193] Step S11: Generate the first identifier according to the resource identifier range;

[0194] Step S12: Obtain the preset identification setting parameters in the full-chain basic contract. Based on the identification setting parameters and the resource identification range, call the source business contract to generate a second identifier.

[0195] Step S13: Concatenate the first identifier and the second identifier to obtain the resource identifier of the virtual resource.

[0196] The following details Steps S11 - S13.

[0197] In Step S11, the fixed digits in the resource identification range can be used as the first identifier. For example, assume the resource identification range is from 0x901000 to 0x901FFF, and the fixed digits are the first three digits. Therefore, the generated first identifier can be 0x901. Since different blockchain configurations have different resource identification ranges, that is, the fixed digits in different blockchains are different, which is equivalent to different first identifiers corresponding to different blockchains. So, different blockchains can be distinguished by different first identifiers.

[0198] In Step S12, the second identifier can be determined from the changing digits in the resource identification range. For example, assume the resource identification range is from 0x901000 to 0x901FFF, and the changing digits are the last three digits. Therefore, a value can be selected from the range of 0x000 to 0xFFF as the second identifier. For example, the selected second identifier is 0x002. Based on this, since the number of resource types of the virtual resource can be multiple, the identification setting parameters can include the number of resource types, and the source business contract can adjust the selection range of the second identifier corresponding to each resource type based on the number of resource types, and then generate the second identifier within the selection range.

[0199] Exemplarily, the number of resource types of virtual resources is four. The obtained identification setting parameter can be that the number of resource types is four. The selection range of the second identification can be evenly divided into four selection sub-ranges. The first selection sub-range is used as the selection range of the second identification corresponding to the first resource type, the second selection sub-range is used as the selection range of the second identification corresponding to the second resource type, and the third selection sub-range is used as the selection range of the second identification corresponding to the third resource type. For example, assuming that the selection range of the second identification is from 0x000 to 0xFFF, four selection sub-ranges can be determined as 0x000 to 0x3FF, 0x400 to 0x7FF, 0x800 to 0xBFF, and 0xC00 to 0xFFF. When the source business contract executes a transaction corresponding to a virtual resource of the second resource type, a value can be selected from the range of 0x400 to 0x7FF as the second identification. For example, the selected second identification is 0x5a2. Moreover, it is necessary to ensure that the second identifications among different virtual resources do not repeat, so that the second identifications of different virtual resources in the same blockchain are different, and different virtual resources in the same blockchain can be distinguished by different second identifications.

[0200] In step S13, the first identification and the second identification can be concatenated in sequence to obtain the resource identification of the virtual resource. For example, assuming that the first identification is 0x901 and the second identification is 0x5a2, the concatenation result of the first identification and the second identification is 0x9015a2, and the resource identification of this virtual resource is 0x9015a2.

[0201] The advantage of this embodiment is that since the first identifications corresponding to different blockchains are different, and the second identifications of different virtual resources in the same blockchain are different, the resource identification obtained by concatenating the first identification and the second identification is unique. For example, the first identification is, in a blockchain ecosystem where multiple blockchains are interconnected, by configuring unique resource identifications for each virtual resource, each virtual resource can be accurately distinguished, thereby ensuring the accuracy and security in processing virtual resources.

[0202] When this embodiment is specifically implemented, step 220 includes:

[0203] Step S21: Invoke the transfer fee payment contract in the full-chain protocol to deduct a preset amount of transfer fees on the source blockchain;

[0204] Step S22: After deducting the transfer fees, invoke the source business contract to execute the first transaction and generate a transaction execution event corresponding to the first transaction.

[0205] In step S21, when the blockchain node corresponding to the source blockchain executes relevant transactions for cross-chain transfer, it can accurately determine the transfer fee by invoking the transfer fee payment contract in the full-chain protocol, and then deduct the corresponding transfer fee on the source blockchain.

[0206] In step S22, after deducting the transfer fee, the source business contract is called to generate a corresponding transaction execution event, which records the deduction result of the transfer fee, facilitating subsequent verification of the information on the deducted transfer fee.

[0207] The advantage of this embodiment is that no additional operation for paying the transfer fee is required on the target blockchain, which can improve the processing efficiency.

[0208] When specifically implementing this embodiment, step 220 includes:

[0209] Step S31: Obtain the first transaction;

[0210] Step S32: Invoke the source business contract to execute the first transaction and generate a transaction execution event for transferring virtual resources to the target business contract.

[0211] In the above embodiment, the first transaction contains various information required for the transaction. It is necessary to construct the first transaction with relevant objects and send it to the source blockchain. After invoking the source business contract to execute the first transaction, a corresponding transaction execution event can be generated, and the transaction execution event is equivalent to the execution result of the first transaction.

[0212] The advantage of this embodiment is that invoking the source business contract to execute the first transaction can ensure the effective execution of the first transaction.

[0213] The process of step S31 will be described in detail below.

[0214] In some embodiments, step S31 includes:

[0215] Step S41: Receive one or more candidate transactions;

[0216] Step S42: Perform a legality verification on the candidate transactions, filter out the candidate transactions with unqualified legality verification results, and store the remaining candidate transactions after filtering in the transaction pool;

[0217] Step S43: Take a preset number of candidate transactions from the transaction pool as the first transaction.

[0218] In the above embodiments, relevant objects can use a terminal to construct a candidate transaction, and can send the candidate transaction to a blockchain node of the corresponding blockchain network. After the candidate transaction is sent to the node, the blockchain node will verify whether a transaction is legal by verifying its legality. If a transaction is legal, the candidate transaction with a qualified legality verification result can be stored in the transaction pool. After a certain number of candidate transactions have accumulated, a certain number of candidate transactions can be taken out of the transaction pool so as to package the transactions into a new block, and the taken-out candidate transactions are used as the first transaction.

[0219] The advantage of this embodiment is that it ensures the legality of blockchain transactions through legality verification and avoids executing invalid blockchain transactions.

[0220] The process of step S42 will be described in detail below.

[0221] In some embodiments, step S42 includes:

[0222] Step S51: Perform signature verification on the candidate transaction and filter out the candidate transactions with unqualified signature verification results;

[0223] Step S52: Perform consistency detection on the remaining candidate transactions after filtering and each transaction in the transaction pool respectively, and perform consistency detection on the remaining candidate transactions after filtering and each transaction in the blockchain respectively. Store the candidate transactions that are consistent with any one transaction in the transaction pool or the blockchain, and the candidate transactions that are inconsistent with each transaction in both the transaction pool and the blockchain in the transaction pool.

[0224] In the above embodiments, after relevant objects use a terminal to construct a candidate transaction, they can perform a hash operation on the candidate transaction based on the hash algorithm to obtain an original digital digest, and then can encrypt the original digital digest using the private key in the asymmetric key pair to obtain a digital signature. Then, the candidate transaction and the digital signature can be sent together to a blockchain node of the corresponding blockchain network, and the blockchain node holds the public key in the asymmetric key pair.

[0225] Based on this, the legality verification can include signature verification. The blockchain node can first verify the candidate transaction through signature verification, and the process of signature verification can be as follows:

[0226] The blockchain node decrypts the digital signature using the public key to obtain a first digital digest;

[0227] The blockchain node performs a hash operation on the candidate transaction based on the hash algorithm to obtain a second digital digest;

[0228] The blockchain node compares the first digital digest with the second digital digest;

[0229] When the comparison result indicates that the first digital digest is the same as the second digital digest, determine that the signature verification result of the candidate transaction is qualified, and it is necessary to retain the candidate transactions with qualified signature verification results;

[0230] Conversely, when the comparison result indicates that the first digital digest is different from the second digital digest, determine that the signature verification result of the candidate transaction is unqualified, and it is necessary to filter out the candidate transactions with unqualified signature verification results, that is, discard the candidate transactions with unqualified signature verification results.

[0231] On this basis, the legality verification can also include duplicate verification. After the candidate transaction passes the signature verification, the blockchain node can perform duplicate verification on the candidate transactions with qualified signature verification results. A transaction can include information such as the sender address, recipient address, virtual resources of the transaction, transaction fees, and timestamp. The transaction pool can store transactions, and the blocks of the blockchain will record the written transactions. The process of duplicate verification can be as follows:

[0232] For any candidate transaction, traverse the transactions in the transaction pool, and the blockchain node compares the information included in the transactions in the transaction pool with the information included in the candidate transaction. For example, compare the sender address, recipient address, virtual resources of the transaction, transaction fees, and timestamp and other information included in the two transactions;

[0233] When the information included in the transaction in the transaction pool is different from the information included in the candidate transaction, determine that the candidate transaction is inconsistent with the transaction in the transaction pool;

[0234] Conversely, when the information included in the transaction in the transaction pool is the same as the information included in the candidate transaction, determine that the candidate transaction is consistent with the transaction in the transaction pool;

[0235] Similarly, traverse the transactions in the blockchain, and the blockchain node compares the information included in the transactions in the blockchain with the information included in the candidate transaction. For example, compare the sender address, recipient address, virtual resources of the transaction, transaction fees, and timestamp and other information included in the two transactions;

[0236] If the information included in the transaction in the blockchain is different from the information included in the candidate transaction, determine that the candidate transaction is inconsistent with the transaction in the blockchain;

[0237] Conversely, if the information included in the transaction in the blockchain is the same as the information included in the candidate transaction, determine that the candidate transaction is consistent with the transaction in the blockchain;

[0238] During the traversal process, when the candidate transaction is identical to any transaction in the transaction pool or the blockchain, it is determined that the signature verification result of the candidate transaction is unqualified. It is necessary to filter out candidate transactions with unqualified duplicate verification results, that is, discard candidate transactions with unqualified duplicate verification results;

[0239] After the traversal ends, when the candidate transaction is not identical to any transaction in the transaction pool and the blockchain, it is determined that the duplicate verification result of the candidate transaction is qualified. It is necessary to retain candidate transactions with qualified duplicate verification results and store the candidate transactions in the transaction pool.

[0240] The advantage of this embodiment is that it guarantees the quality of candidate transactions in the transaction pool through signature verification and duplicate verification, ensures that the same input will not be executed repeatedly, and thus improves the security of the blockchain network.

[0241] The above is a detailed description of step 220.

[0242] Next, a detailed description of step 230 will be given.

[0243] Step 230: Generate a target block corresponding to the transaction execution event, so that after the cross-chain relay node constructs a second transaction corresponding to the transaction execution event based on the target block and sends the second transaction to the target business contract according to the target chain identifier.

[0244] When this embodiment is specifically implemented, step 230 includes:

[0245] Step S61: Call the full-chain service contract of the full-chain protocol to generate an event identifier for the transaction execution event;

[0246] Step S62: Obtain the target network information of at least one of the terminal that initiates the transaction corresponding to the transaction execution event and the target business contract;

[0247] Step S63: Generate a target block corresponding to the transaction execution event according to the event identifier and the target network information.

[0248] Next, a detailed description of steps S61 - S63 will be given.

[0249] In step S61, the full-chain service contract may include an allocation protocol for event identifiers. When the source business contract executes the first transaction, it can generate a transaction execution event. When generating the transaction execution event, it will also call the full-chain service contract of the full-chain protocol and configure the event identifier of the transaction execution event through the allocation protocol for event identifiers. Moreover, the full-chain service contract can ensure that each event identifier is unique, which is convenient for accurately locating each transaction execution event.

[0250] In step S62, the target network information of the terminal can be information such as the sending port address and IP address of the terminal. For example, the first transaction sent by the terminal will carry additional information of the sending port address and IP address. Taking the scenario of invoice management as an example, it can be verified later whether the sending port address comes from the official tax chain. Therefore, the target network information of the terminal can be obtained through the first transaction, that is, the target network information corresponding to the transaction execution event is obtained; the target network information of the target business contract can refer to the information of configuring the remote contract of the source business contract as the target business contract.

[0251] In step S63, the target block will contain the event identifier and the target network information. After generating the target block, it is equivalent to adding the event identifier and the target network information to the source blockchain, realizing the disclosure of the target network information.

[0252] Through steps S61 - S63, the event identifier and the target network information are added to the source blockchain. By configuring a unique event identifier for each transaction execution event, the corresponding transaction execution event can be quickly queried on the blockchain through the event identifier. Adding the target network information to the source blockchain makes the target network information transparent and traceable, enabling the inspection of the correctness of the full-chain contract and the multi-chain binding relationship, thus avoiding virtual resource losses of related objects.

[0253] The above is the overall description of steps S61 - S63. The following will describe steps S61 - S63 in detail.

[0254] When specifically implementing this embodiment, refer to Figure 6 , after step 230, the blockchain transaction processing method further includes:

[0255] Step 610: Receive a query request sent by the cross-chain relay node invoking the verification service in the full-chain protocol, where the query request carries the event identifier;

[0256] Step 620: Invoke the full-chain basic contract to obtain the target network information according to the event identifier;

[0257] Step 630: Send the target network information to the cross-chain relay node for the cross-chain relay node to verify the transaction execution event based on the target network information before constructing the second transaction.

[0258] Correspondingly, before step 610, it further includes: Step 640: The cross-chain relay node invokes the verification service in the full-chain protocol to send a query request;

[0259] After step 630, it further includes: Step 650: The cross-chain relay node verifies the transaction execution event based on the target network information, and constructs the second transaction corresponding to the transaction execution event when the verification passes.

[0260] In step 640, the full-chain protocol includes several off-chain full-chain cross-chain services deployed in cross-chain relay nodes. The off-chain full-chain cross-chain services may include a verification service that can verify transaction execution events. The cross-chain relay node can obtain the corresponding transaction execution event through the target block. Since the transaction execution event carries an event identifier, the cross-chain relay node can generate a query request carrying the event identifier and then send the query request to the source blockchain through the verification service.

[0261] In step 610, the first blockchain node in the source blockchain network can receive the query request sent by the cross-chain relay node.

[0262] In step 620, since the event identifier and the target network information are added to the source blockchain together when generating the target block, the first blockchain node in the source blockchain network can, in response to the query request, call the full-chain basic contract to quickly locate the target network information in the target block according to the event identifier, and then obtain the target network information. A third party can quickly filter out the corresponding blockchain transactions through the event identifier, realizing the overall management and maintenance of the business throughout the chain and its lifecycle.

[0263] In step 630, the full-chain basic contract can be provided with a network information disclosure mechanism. After obtaining the target network information, the first blockchain node in the source blockchain network can, based on the network information disclosure mechanism, send the target network information to the cross-chain relay node.

[0264] In step 650, the verification service of the cross-chain relay node can be pre-configured with reference network information. The cross-chain relay node can verify the consistency between the target network information and the reference network information through the verification service. When the verification result indicates that the target network information and the reference network information are consistent, the cross-chain relay node will generate the second transaction corresponding to the transaction execution event. Otherwise, when the verification result indicates that the target network information and the reference network information are inconsistent, the cross-chain relay node will not generate the second transaction corresponding to the transaction execution event.

[0265] The advantage of this embodiment is that it can check the correctness of the full-chain contract and the multi-chain binding relationship, thus avoiding virtual resource losses of related objects.

[0266] When specifically implementing this embodiment, step S61 includes:

[0267] Step S71: Call the full-chain service contract of the full-chain protocol to obtain a random seed, and input the random seed into a random number generator to obtain a target random number;

[0268] Step S72: Obtain the generation timestamp when generating the transaction execution event;

[0269] Step S73: Concatenate the target random number and the generated timestamp and input the result into the target hash function to obtain the target hash value, and use the target hash value as the event identifier of the transaction execution event.

[0270] In step S71, when calling the full-chain service contract of the full-chain protocol to generate an event identifier, a random seed will be obtained first, and then the random seed will be input into the random number generator. By performing several iterative operations on the random seed, the target random number is obtained. The random seed is a true random number. For example, the current system time can be used as the random seed, making the random seed unpredictable and uncertain. Based on this, the target random number generated with the random seed as the initial condition is also unpredictable and uncertain.

[0271] In step S72, when the source business contract executes the first transaction, it can generate a transaction execution event and record the generated timestamp at the time of the transaction execution event in a specified storage area. Therefore, the generated timestamp at the time of the transaction execution event can be obtained from the specified storage area.

[0272] In step S73, since the target random number is also unpredictable and uncertain, and the generated timestamp is also unpredictable and uncertain, the concatenation result of the target random number and the generated timestamp is also unpredictable and uncertain. Usually, the concatenation results corresponding to any two transaction execution events are different, that is, the concatenation result has uniqueness. Therefore, by performing a hash operation on the concatenation result using the target hash function, the obtained target hash value also has uniqueness, and the data length of the target hash value is also fixed, which is convenient for storing the event identifier.

[0273] The advantage of this embodiment is that by performing a hash operation on the concatenation result of the target random number and the generated timestamp using the target hash function to obtain the target hash value and using the target hash value as the event identifier, it is equivalent to mapping the transaction execution event to the target hash value, and the corresponding transaction execution event can be quickly found through the event identifier.

[0274] The above is a detailed description of step 230.

[0275] Refer to Figure 7 , Figure 7 FIG.

[0276] Step 710: The service node calls the contract interface service to receive service parameters, constructs a first transaction for transferring virtual resources to the target business contract on the target blockchain according to the service parameters, and sends the first transaction to the blockchain node corresponding to the source blockchain, where the contract interface service is compiled based on the source business contract on the source blockchain;

[0277] Step 720: The blockchain node calls the source business contract to execute the first transaction and generate a corresponding transaction execution event, and generates a target block corresponding to the transaction execution event. The source business contract is configured as a remote contract of the target business contract based on the full-chain basic contract in the full-chain protocol. The full-chain basic contract is configured on both the source blockchain and the target blockchain. Both the source business contract and the target business contract configure the full-chain basic contract as the parent contract. The transaction execution event carries the target chain identifier of the target blockchain, and the target chain identifier is initialized by the cross-chain relay node calling the registration service in the full-chain protocol;

[0278] Step 730: After the cross-chain relay node constructs a second transaction corresponding to the transaction execution event based on the target block, it sends the second transaction to the target blockchain according to the target chain identifier.

[0279] The following provides a detailed description of steps 710 - 730.

[0280] In step 710, the relevant object can use the terminal to create a transaction request for calling the contract interface service. The transaction request carries service parameters. For example, by calling the POST method in HTTP, the service parameters are submitted to the specified contract interface service. The transaction request is a POST request, and the POST request includes the target URL and the request body. The target URL refers to the path of the contract interface service, and the request body is the service parameter. After the terminal sends the transaction request to the service node, the service node can call the contract interface service to receive the service parameters carried by the transaction request. Since the service parameters can include information such as the source chain identifier, the target chain identifier, the first account address for sending virtual resources, the second account address for receiving virtual resources, and resource information, and the contract interface service is compiled based on the source business contract on the source blockchain, the service node can construct the first transaction according to the service parameters by calling the contract interface service, and then send the first transaction to the blockchain node corresponding to the source blockchain. Specifically, the blockchain node corresponding to the source blockchain refers to the first blockchain node in the source blockchain network. The source blockchain network can include multiple first blockchain nodes, and the first transaction can be sent to any one of the first blockchain nodes in the source blockchain network. Correspondingly, the blockchain node corresponding to the target blockchain refers to the second blockchain node in the target blockchain network. The target blockchain network can include multiple second blockchain nodes.

[0281] In step 720, after the transaction is sent to the source blockchain, the blockchain node will verify the transaction, and then accumulate the verified transactions. When the accumulation reaches a certain level, for example, the number of accumulated transactions reaches a preset quantity threshold, or the accumulation time reaches a preset time threshold, these transactions will be packaged into a block to be verified. The blockchain node corresponding to the source blockchain needs to verify whether the transactions in the block to be verified meet the execution conditions. If they meet the execution conditions, the transactions will be executed, which is equivalent to pre-executing the transactions. Taking the scenario of cross-chain transferring virtual resources on the source blockchain to the target blockchain as an example, when the blockchain node corresponding to the source blockchain calls the source business contract to execute the first transaction, a corresponding transaction execution event will be generated. After executing the first transaction, the corresponding transaction execution event will be recorded in the block to be verified. Then, the blockchain node will send the block to be verified to other blockchain nodes corresponding to the source blockchain for verification. When the block to be verified passes the verification by a preset number of blockchain nodes in the source blockchain, the block to be verified will be added to the source blockchain. The block that is on the source blockchain and contains the transaction execution event can be used as the target block, which is equivalent to generating the target block corresponding to the transaction execution event.

[0282] Since both the source business contract and the target business contract configure the full-chain basic contract as the parent contract, which means that both the source business contract and the target business contract inherit from the full-chain basic contract, the source business contract and the target business contract can inherit the functional functions and standardized interfaces in the full-chain basic contract. Therefore, the standardization degree between the source business contract and the target business contract can be improved, and through the joint cooperation of the source business contract and the target business contract, the cross-chain transfer of virtual resources between the source blockchain and the target blockchain can be realized.

[0283] In step 730, after the target block containing the transaction execution event is on the source blockchain, the cross-chain relay node can obtain the corresponding transaction execution event through the target block, and then the cross-chain relay node can construct the second transaction corresponding to the transaction execution event. Since the transaction execution event carries the target chain identifier of the target blockchain, and the target chain identifier is initialized by the cross-chain relay node calling the registration service in the full-chain protocol, the cross-chain relay node can be used as a unified off-chain transfer point to send the second transaction to the target blockchain indicated by the target chain identifier. Specifically, the second transaction will be sent to the target business contract. Since the source business contract is configured as the remote contract of the target business contract on the target blockchain and the target business contract allows the execution of the transaction corresponding to the source business contract, the target business contract can be called to execute the second transaction.

[0284] Specifically, from the above description of the transaction execution event, it can be known that the transaction execution event may include information such as the timestamp of the transaction, the first account address sending virtual resources, the specific third account address receiving virtual resources, and resource information. The transaction execution event also carries additional information such as the second account address, the target chain identifier, and the contract address of the source business contract. The cross-chain relay node can construct a second transaction based on information such as the first account address, the second account address, and resource information. The second transaction carries the additional information of the contract address of the source business contract. The cross-chain relay node determines the target business contract in the target blockchain based on the target chain identifier and the transaction content of the second transaction, and then sends the second transaction to the target business contract in the target blockchain. Since the target business contract in the target blockchain has pre-configured the source business contract as the remote contract of the target business contract, and the second transaction carries the additional information of the contract address of the source business contract, which is equivalent to the second transaction being the transaction corresponding to the source business contract, therefore, the target business contract can be called to execute the second transaction.

[0285] Through the above steps 710-730, the embodiment of the present application receives a first transaction for transferring virtual resources from a source business contract on a source blockchain to a target business contract on a target blockchain. Among them, the source business contract is configured as the remote contract of the target business contract based on the full-chain basic contract in the full-chain protocol. Since both the source business contract and the target business contract configure the full-chain basic contract as the parent contract, the standardization degree between the source business contract and the target business contract can be improved; then, the source business contract is called to execute the first transaction for transferring virtual resources to the target business contract and generate a corresponding transaction execution event. Since the transaction execution event carries the target chain identifier of the target blockchain, and the target chain identifier is initialized by the cross-chain relay node by calling the registration service in the full-chain protocol, the cross-chain relay node can be used as a unified off-chain transfer. After generating the target block corresponding to the transaction execution event, the cross-chain relay node can construct a second transaction corresponding to the transaction execution event based on the target block and send the second transaction to the target business contract according to the target chain identifier. It can be seen that by introducing the full-chain protocol including the full-chain basic contract and the registration service, a standardized process can be formed on-chain and off-chain when performing cross-chain transactions based on the full-chain protocol, improving the asset consistency and transaction security between different blockchains.

[0286] In addition, when conducting cross-chain transactions, the business node calls the contract interface service to receive business parameters, constructs a first transaction for transferring virtual resources to the target business contract on the target blockchain based on the business parameters, and sends the first transaction to the blockchain node corresponding to the source blockchain. Since the contract interface service is compiled based on the source business contract on the source blockchain, service preposition can be achieved through the contract interface service provided by the business node. The terminal only needs to call the contract interface service of the business node to configure the business parameters, and the contract interface service can automatically complete the transaction construction without having to understand the protocol details of contract interaction and the differences in interaction among multiple different blockchains, thus effectively simplifying the cross-chain transaction process and improving the efficiency of cross-chain transactions.

[0287] The above is the overall description of steps 710-730. The following will describe steps 710-730 in detail.

[0288] The following will describe step 710 in detail.

[0289] Step 710: The business node calls the contract interface service to receive business parameters, constructs a first transaction for transferring virtual resources to the target business contract on the target blockchain based on the business parameters, and sends the first transaction to the blockchain node corresponding to the source blockchain, where the contract interface service is compiled based on the source business contract on the source blockchain.

[0290] When specifically implementing this embodiment, refer to Figure 8 , before step 710, the blockchain transaction processing method further includes:

[0291] Step 810: The terminal obtains the first code file of the source business contract, compiles the first code file to obtain a first target file for the blockchain node to call, where the first code file integrates a full-chain basic contract, and the full-chain basic contract is used to provide a standardized interface for the full-chain protocol;

[0292] Step 820: The terminal converts the first code file into a second code file of the contract interface service, compiles the second code file to obtain a second target file for the business node to call;

[0293] Step 830: The terminal deploys the first target file to the source blockchain and deploys the second target file to the business node.

[0294] The following will describe steps 810-830 in detail.

[0295] In step 810, the terminal refers to a device capable of communicating with a service node. For example, the terminal includes but is not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, etc. Relevant personnel input the code content of the source service contract through the terminal to form a first code file. The first code file will integrate the full-chain basic contract, which is equivalent to the source service contract inheriting from the full-chain basic contract. The source service contract can inherit the methods and standardized interfaces in the full-chain basic contract, which can improve the standardization degree of the source service contract. It can be seen that the first code file contains both the methods and standardized interfaces of the source service contract and the methods and standardized interfaces of the full-chain basic contract. The first code file can be compiled into a first target file through a preset contract compilation tool.

[0296] In step 820, the terminal can convert the first code file into a second code file of the contract interface service. Specifically, the code generator can read the methods in the first code file, convert the methods in the first code file into contract interface services, and construct the second code file according to the codes of all contract interface services. For example, if the first code file contains a method for obtaining an invoice, the second code file contains the code of the corresponding contract interface service for obtaining an invoice. Then, the second code file is compiled into a second target file, so that the corresponding contract interface service can be called through the second target file.

[0297] In step 830, the first target file refers to a contract file containing the source service contract. The terminal deploys the first target file to the source blockchain, specifically by sending the first target file to the first blockchain node in the source blockchain network, so as to deploy the source service contract on the source blockchain; the second target file refers to a process file containing the contract interface service, and the second code file is obtained by converting the first code file. Deploying the second target file to the service node realizes the deployment of the contract interface service corresponding to the source service contract on the service node. The contract interface service is equivalent to the pre-service of the service node. Therefore, service pre-positioning can be realized through the contract interface service provided by the service node; after both the source service contract and the contract interface service are deployed, the terminal only needs to call the contract interface service of the service node to configure service parameters, and the contract interface service can automatically complete transaction construction without understanding the protocol details of contract interaction and the differences in interaction between multiple different blockchains, thus effectively simplifying the cross-chain transaction process and improving the cross-chain transaction efficiency;

[0298] Among them, similar to the process of generating the target block based on the above-mentioned first transaction, deploying the first target file to the source blockchain can be achieved by constructing a blockchain transaction with the first target file and then sending the blockchain transaction to the first blockchain node in the source blockchain network. The first blockchain node in the source blockchain network will verify and reach a consensus on the blockchain transaction. When each first blockchain node reaches a consensus, the blockchain transaction will be added to the blockchain, realizing the deployment of the first target file to the source blockchain, which is equivalent to deploying the source business contract to the source blockchain. Similarly, the target business contract can also be deployed to the target blockchain through similar steps.

[0299] Through steps 810-830, the deployment of the source business contract on the source blockchain and the deployment of the corresponding contract interface service of the source business contract on the business node are realized. Related objects can manage and interact with virtual resources on different blockchain networks quickly according to the full-chain protocol through the contract interface service. Through the standardized interface provided by the full-chain protocol, the interoperability between business contracts of each blockchain network is ensured, and the asset consistency and transaction security between different blockchains are improved.

[0300] The above is the overall description of steps 810-830. The following will elaborate on step 820.

[0301] When specifically implementing this embodiment, before step 820, the blockchain transaction processing method further includes:

[0302] Step S81: The terminal obtains the third code file of at least one pre-positioned contract in the full-chain protocol, where the pre-positioned contract is any contract configured on the source blockchain in the full-chain protocol;

[0303] Step S82: The terminal merges the third code file into the second code file.

[0304] In step S81, the third code file of the pre-positioned contract refers to the file containing the code of the interface service of the pre-positioned contract. The pre-positioned contract can be the full-chain service contract and the transfer fee payment contract in the full-chain protocol. Among them, the full-chain service contract can include the allocation protocol of the blockchain identifier, the allocation protocol of the resource identifier, and the allocation protocol of the event identifier. The allocation protocol of the blockchain identifier is used to configure the blockchain identifier of the blockchain, the allocation protocol of the resource identifier is used to configure the resource identifier of the virtual resource, the allocation protocol of the event identifier is used to configure the event identifier of the transaction execution event, and the transfer fee payment contract is used to deduct the transfer fee.

[0305] In step S82, merging the third code file into the second code file is equivalent to adding the code of the additional interface service of the pre-positioned contract to the second code file;

[0306] Specifically, referring toFigure 9 , Figure 9 is an alternative process schematic diagram for deploying the source business contract and contract interface service provided by the embodiment of the present application;

[0307] Among them, after the second code file is compiled into a second target file, the second target file is a process file containing the contract interface service and the additional interface service. Subsequently, after the second target file is deployed to the business node, the contract interface service corresponding to the source business contract and the additional interface service corresponding to the contract to be pre-positioned are deployed on the business node. Both the contract interface service and the additional interface service are equivalent to the pre-positioned services of the business node. Therefore, service pre-positioning can be achieved through the contract interface service and the additional interface service provided by the business node; after both the source business contract and the contract interface service are deployed, the terminal only needs to call the contract interface service of the business node to configure the business parameters, and the contract interface service can automatically complete the transaction construction without understanding the protocol details of contract interaction and the differences in interaction among multiple different blockchains, thereby effectively simplifying the cross-chain transaction process and improving the cross-chain transaction efficiency.

[0308] When specifically implementing this embodiment, refer to Figure 10 , before step 710, the blockchain transaction processing method further includes:

[0309] Step 1010, the terminal accesses the contract interface service and displays a parameter configuration interface of the contract interface service, where the parameter configuration interface is provided with a parameter configuration control and a transaction confirmation control;

[0310] Step 1020, the terminal obtains business parameters input based on the parameter configuration control in response to an operation on the parameter configuration control;

[0311] Step 1030, the terminal sends the business parameters to the business node in response to an operation on the transaction confirmation control.

[0312] In step 1010, before the terminal uses the pre-positioned service to call the contract interface service, the display interface of the terminal can display the parameter configuration interface of the contract interface service. The parameter configuration interface can display controls such as a parameter configuration control and a transaction confirmation control. The parameter configuration control is used to configure the business parameters of the blockchain transaction, and the transaction confirmation control is used to trigger the sending operation of the business parameters.

[0313] In step 1020, relevant objects can input business parameters of blockchain transactions through parameter configuration controls in the parameter configuration interface that can be displayed on the terminal. The business parameters required for blockchain transactions of different business types are usually different. For example, when the business type is cross-chain transfer of virtual resources, the business parameters that need to be input can include parameters such as business type identifier, source chain identifier, target chain identifier, resource identifier of the virtual resources to be transferred, first account information for sending virtual resources, and second account information for receiving virtual resources. Another example is that when the business type is obtaining an invoice, the business parameters that need to be input can include parameters such as invoice title, amount, invoice type, etc. Specifically, in a commercial invoice, the invoice title refers to the purchaser information.

[0314] Exemplarily, the parameter configuration controls can include controls such as a first account configuration control, a business type configuration control, a resource identifier configuration control, a source chain configuration control, a target chain configuration control, a second account configuration control, etc. The parameter configuration interface can include a login sub-interface, a business selection sub-interface, and a business processing sub-interface.

[0315] The process of configuring parameters in the parameter configuration interface is described in detail below.

[0316] In the login stage, the terminal can display the login sub-interface, and the login sub-interface can be configured with parameter configuration controls. Among them, the parameter configuration controls can include a first account configuration control. Relevant objects can input login account information in the first account configuration control of the login sub-interface. For example, the login account information includes an account name and a login password. The terminal can authenticate the identity based on the account name and the login password. After the identity authentication is passed, that is, after successful login, the terminal can determine the corresponding first account information based on the account name, and then use this first account information as the business parameter to be sent. The first account information is used to indicate the account address of the relevant object on the blockchain.

[0317] After successful login, enter the business selection stage. The terminal can display the business selection sub-interface, and the business selection sub-interface can be configured with parameter configuration controls. Among them, the parameter configuration controls can include a business type configuration control. Relevant objects can input the business type identifier in the business type configuration control of the business selection sub-interface;

[0318] For example, the service type configuration control can be a text input control. The service type identifier is used to represent the service type content. The terminal can store the mapping relationship between the service type identifier and the content text of the service type content. The relevant object can input the service type identifier or the content text in the text input control. For example, the content text can include "transfer virtual resources", "generate virtual resources", "license virtual resources", etc. Assume that the mapping relationship indicates that the service type identifier corresponding to the content text of "transfer virtual resources" is "type1". When selecting the service type of transferring virtual resources, the relevant object can input "type1" in the text input control, or input "transfer virtual resources". The terminal can determine the corresponding service type identifier according to the content input in the text input control, and then use this service type identifier as the service parameter to be sent;

[0319] For another example, the service type configuration control can include multiple checkbox controls. Each checkbox control can correspond to a service type identifier. After any one checkbox control is checked, it is equivalent to inputting the service type identifier corresponding to the checked checkbox control. The relevant object can only check one of the checkbox controls. The terminal can determine the corresponding service type identifier according to the check state of the checkbox control, and then use this service type identifier as the service parameter to be sent.

[0320] After inputting the service type identifier, it enters the service processing stage. Taking the selection of the service type of transferring virtual resources as an example, the terminal can display the service processing sub-interface. Specifically, referring to Figure 11 , Figure 11 which is an optional interface schematic diagram of the service processing sub-interface provided by the embodiments of the present application;

[0321] Among them, the service processing sub-interface can be configured with a parameter configuration control 1110 and a transaction confirmation control 1120. Among them, the parameter configuration control 1110 includes a resource identifier configuration control 1111, a source chain configuration control 1112, a target chain configuration control 1113, and a second account configuration control 1114;

[0322] The relevant object can input a resource identifier in the resource identifier configuration control 1111 of the service processing sub-interface. For example, the resource identifier is "0x901 af322bbd8". The resource identifier can also be determined by other means. For example, the service processing sub-interface is also configured with a resource display button control. After triggering the resource display button control, a resource display sub-interface can be displayed. The resource display sub-interface can display the resource identifier of the virtual resource matching the first account information. Therefore, the relevant object can select the resource identifier of the virtual resource to be transferred in the resource display sub-interface. Then, the resource identifier configuration control 1111 can automatically fill in the selected resource identifier. The terminal can determine the corresponding resource identifier according to the input content of the resource identifier configuration control 1111, and then use this resource identifier as the service parameter to be sent;

[0323] The relevant object can input a source chain identifier in the source chain configuration control 1112 of the service processing sub-interface. For example, the source chain identifier is "Blockchain A". The source chain identifier is used to represent the source blockchain. The terminal can determine the corresponding source chain identifier according to the input content of the source chain configuration control 1112, and then use this source chain identifier as the service parameter to be sent;

[0324] The relevant object can input a target chain identifier in the target chain configuration control 1113 of the service processing sub-interface. For example, the target chain identifier is "Blockchain B". The target chain identifier is used to represent the target blockchain. The terminal can determine the corresponding target chain identifier according to the input content of the target chain configuration control 1113, and then use this target chain identifier as the service parameter to be sent;

[0325] The relevant object can input second account information in the second account configuration control 1114 of the service processing sub-interface. The second account information can be the account address in the target blockchain that receives the virtual resource. For example, the second account information is "0xd4416ba1d2b3". The terminal can determine the corresponding second account information according to the input content of the second account configuration control 1114, and then use this second account information as the service parameter to be sent;

[0326] After the relevant object inputs all the service parameters to be sent, it can trigger the transaction confirmation control 1120 in the service processing sub-interface, so that the terminal sends the service parameters to the service node.

[0327] In step 1030, after the relevant object inputs the service parameters and confirms that they are correct, in the parameter configuration interface displayed on the terminal, by triggering the transaction confirmation control, the terminal can, in response to the operation on the transaction confirmation control, send the service parameters to the service node.

[0328] The advantage of this embodiment is that by setting up a parameter configuration interface, it is convenient for relevant objects to quickly and effectively input the business parameters required for blockchain transactions in the terminal.

[0329] When specifically implementing this embodiment, refer to Figure 12 , step 710, includes:

[0330] Step 1210: Based on the contract interface service, obtain the source contract address of the pre-configured source business contract;

[0331] Step 1220: Construct a first transaction for transferring virtual resources to the target business contract on the target blockchain according to the business parameters and the source contract address;

[0332] Step 1230: Obtain the pre-configured signature private key according to the business parameters, and sign the first transaction based on the signature private key;

[0333] Step 1240: Send the signed first transaction to the blockchain node corresponding to the source blockchain according to the source contract address.

[0334] In step 1210, the business node can be configured with a contract address configuration system. In the contract address configuration system, the contract addresses of business contracts inherited from the full-chain basic contract in each blockchain network are pre-configured. Since different business contracts can be used to process blockchain transactions of different business types, and business contracts for processing the same business type can be deployed in different blockchain networks, the business type identifier in the business parameters can indicate the business type, the source chain identifier in the business parameters can indicate the blockchain network, the source chain identifier belongs to the blockchain identifier, the business node can construct a mapping relationship table of contract addresses, business type identifiers, and blockchain identifiers. After receiving the business parameters, it can call the address query function in the contract interface service, and use the business type identifier and source chain identifier in the business parameters to find the pre-configured source contract address in the mapping relationship table.

[0335] In step 1220, since the business parameters can include parameters such as the target chain identifier, the resource identifier of the virtual resources to be transferred, the first account information for sending the virtual resources, and the second account information for receiving the virtual resources, therefore, according to the business parameters and the source contract address, the first transaction can be effectively constructed.

[0336] In step 1230, the service node may be pre-configured with candidate private keys of several accounts. Since the service parameters may include parameters of the first account information for sending virtual resources, after constructing the first transaction, the signature private key corresponding to the first account information can be determined from each of the pre-configured candidate private keys. Then, a hash operation is performed on the first transaction based on the hash algorithm to obtain the original digital digest. Then, the signature private key in the asymmetric key pair is used to encrypt the original digital digest, which is equivalent to signing the first transaction based on the signature private key to obtain a digital signature. The digital signature is added to the first transaction to obtain the signed first transaction.

[0337] In step 1240, the service node may send the signed first transaction to the source blockchain corresponding to the source chain identifier. Specifically, the first transaction will be sent to the first blockchain node in the source blockchain network. The source service contract is determined in the source blockchain through the source contract address, and then the first transaction is executed using the source service contract. Since the blockchain node corresponding to the source blockchain holds the public key in the asymmetric key pair, after receiving the signed first transaction, the blockchain node will use the public key to decrypt the digital signature to obtain the first digital digest. Then, a hash operation is performed on the first transaction based on the hash algorithm to obtain the second digital digest. Then, the first digital digest and the second digital digest are compared. When the comparison result indicates that the first digital digest is the same as the second digital digest, the first transaction is retained; otherwise, when the comparison result indicates that the first digital digest is different from the second digital digest, the first transaction is discarded.

[0338] In some embodiments, refer to Figure 13 , Figure 13 which is an optional architecture schematic diagram of the service node provided by the embodiments of the present application.

[0339] Among them, the contract interface service may include a single-chain service call interface, a cross-chain service call interface, and a service contract logic call service. Related objects can select to call the single-chain service call interface through the terminal to input service parameters to call the service contract logic call service for trading virtual resources in the same blockchain network, or select to call the cross-chain service call interface to input service parameters to call the service contract logic call service for cross-chain transfer of virtual resources;

[0340] The service node may be configured with a private key configuration system. In the private key configuration system, candidate private keys of several accounts are pre-configured. Since the service parameters may include parameters of the first account information for sending virtual resources, after constructing the first transaction, the signature private key corresponding to the first account information can be determined in the private key configuration system;

[0341] The service node can be configured with a multi-chain plug-in system. Call plug-ins for each blockchain network are pre-configured in the multi-chain plug-in system. Therefore, based on the source chain identifier corresponding to the first transaction, the call plug-in for the source blockchain can be determined, and then the signed first transaction can be sent to the source blockchain corresponding to the source chain identifier by using the call plug-in for the source blockchain.

[0342] The advantage of this embodiment is that the correctness of the first transaction is verified through signature verification, ensuring that the first transaction has not been modified and guaranteeing the quality of the first transaction, thereby improving the security of the blockchain network. Similar to calling the interface of an Internet service, the transaction construction can be automatically completed by calling the contract interface service, without the need to understand the protocol details of contract interaction and the differences in interaction among multiple different blockchains, thus effectively simplifying the cross-chain transaction process and improving the efficiency of cross-chain transactions.

[0343] The above is a detailed description of step 710.

[0344] The following is a detailed description of step 730.

[0345] Step 730: After the cross-chain relay node constructs a second transaction corresponding to the transaction execution event based on the target block, the second transaction is sent to the target blockchain according to the target chain identifier.

[0346] When this embodiment is specifically implemented, refer to Figure 14 , the blockchain transaction processing method further includes:

[0347] Step 1410: The service node calls the verification interface service to receive the event identifier of the transaction execution event, constructs a third transaction according to the event identifier, and sends the third transaction to the blockchain node, where the third transaction is used to query at least one of the target network information of the terminal that initiated the transaction execution event and the target business contract;

[0348] Step 1420: The blockchain node calls the full-chain basic contract, obtains the pre-stored target network information according to the event identifier, and sends the target network information to the service node.

[0349] In step 1410, the relevant object can use the terminal to create a verification request for invoking the verification interface service. The verification request carries verification parameters such as an event identifier and a blockchain identifier. For example, by invoking the POST method in HTTP, the verification parameters are submitted to the specified verification interface service. Here, the verification request is a POST request, which includes a target URL and a request body. The target URL refers to the path of the verification interface service, and the request body is the verification parameter. After the terminal sends the verification request to the business node, the business node can invoke the verification interface service to receive the verification parameters carried by the verification request. Since the verification interface service is compiled based on the full-chain basic contract, and the full-chain basic contract provides a query interface for network information, for the third transaction constructed by invoking the verification interface service, the third transaction can query the target network information of at least one of the terminal that initiated the transaction execution event and the target business contract. Similar to the process of sending the first transaction, the business node can send the third transaction to the first blockchain node in the source blockchain network or to the blockchain nodes in other blockchain networks, which is selected according to actual needs.

[0350] In some embodiments, referring again to Figure 13 , the verification interface service can include an information audit invocation interface and a full-chain basic contract logic invocation service. The relevant object can select to invoke the single-chain business invocation interface through the terminal to input the verification request, so as to invoke the full-chain basic contract logic invocation service for verifying the target network information.

[0351] In step 1420, after sending the third transaction to the blockchain node, the blockchain node responds to the third transaction and obtains the target network information corresponding to the event identifier by invoking the full-chain basic contract. The target network information refers to the network information that has been added to the blockchain, that is, the network information publicly available on the blockchain.

[0352] In some embodiments, before sending the third transaction, the business node needs to sign the third transaction based on the private key to facilitate the blockchain node to verify the correctness of the third transaction, ensure that the third transaction has not been modified, guarantee the quality of the third transaction, and thus improve the security of the blockchain network. Among them, the third transaction can carry a blockchain identifier and the query account information used to initiate the third transaction. The private key of this query account is pre-configured in the private key configuration system. Therefore, the private key can be determined in the private key configuration system, and then the third transaction is signed with the private key.

[0353] The advantage of this embodiment is that by deploying the verification interface service as a pre-service at the business node, the querying party can quickly and conveniently query the required target network information. The target network information has transparency and traceability, and can check the correctness of the full-chain contract and the multi-chain binding relationship, thereby avoiding virtual resource losses of related objects. Similar to calling the interface of an Internet service, information verification can be automatically completed by calling the verification interface service, without the need to understand the protocol details of contract interaction and the differences in interaction between multiple different blockchains, thus effectively simplifying the information verification process and improving the efficiency of information verification.

[0354] The above is a detailed description of step 730.

[0355] The implementation details of the blockchain transaction processing method according to the embodiments of the present application will be described in detail below by way of example.

[0356] Blockchain transaction processing can be divided into a deployment stage, a business processing stage, and a data auditing stage. The business processing stage can include a cross-chain business processing stage or a single-chain business processing stage.

[0357] The deployment stage will be described in detail below.

[0358] First, the terminal obtains the first code file of the source business contract, compiles the first code file, and obtains the first target file for the blockchain node to call. Among them, the first code file integrates the full-chain basic contract, and the full-chain basic contract is used to provide a standardized interface for the full-chain protocol;

[0359] Then, the terminal converts the first code file into a second code file of the contract interface service;

[0360] Then, the terminal obtains the third code file of at least one pre-positioned contract in the full-chain protocol, where the pre-positioned contract is any contract configured on the source blockchain in the full-chain protocol;

[0361] Then, the terminal merges the third code file into the second code file;

[0362] Then, the terminal compiles the second code file to obtain a second target file for the business node to call;

[0363] Then, the terminal deploys the first target file to the source blockchain, which is equivalent to deploying the source business contract to the source blockchain, and deploys the second target file to the business node to complete the deployment stage;

[0364] Among them, when the source business contract is deployed, it is necessary to configure the source business contract as a remote contract of the target business contract based on the full-chain basic contract in the full-chain protocol. If the source business contract needs to be updated, it is necessary to reconfigure the remote contract of the target business contract;

[0365] For example, when updating the source service contract to a replacement service contract, the first blockchain node corresponding to the source blockchain calls the full-chain basic contract to close the permissions of the source service contract and the replacement service contract for transferring virtual resources to the target blockchain. Among them, the replacement service contract configures the full-chain basic contract as the parent contract. Before closing the permissions of the source service contract and the replacement service contract for transferring virtual resources to the target service contract according to the target chain identifier, the permission for the target service contract to transfer virtual resources to the source service contract is configured to be closed.

[0366] Then, after the replacement service contract is configured as the remote contract of the target service contract based on the full-chain basic contract, the first blockchain node calls the full-chain basic contract to open the permission for the replacement service contract to transfer virtual resources to the target service contract.

[0367] The business processing phase is described in detail below.

[0368] Taking the cross-chain business processing phase as an example, first, the terminal accesses the contract interface service and displays the parameter configuration interface of the contract interface service. Among them, the parameter configuration interface is provided with parameter configuration controls and transaction confirmation controls;

[0369] Then, in response to the operation on the parameter configuration control, the terminal obtains the first service parameter input based on the parameter configuration control;

[0370] Then, in response to the operation on the transaction confirmation control, the terminal sends the first service parameter to the business node;

[0371] Then, the business node calls the contract interface service to receive the first service parameter;

[0372] Then, based on the contract interface service, the business node obtains the source contract address of the pre-configured source service contract;

[0373] Then, the business node constructs a first transaction for transferring virtual resources to the target service contract on the target blockchain according to the first service parameter and the source contract address;

[0374] Then, the business node obtains the pre-configured signature private key according to the first service parameter and signs the first transaction based on the signature private key;

[0375] Then, the business node sends the signed first transaction to the first blockchain node according to the source contract address;

[0376] Then, the first blockchain node receives a first transaction, where the first transaction is used to transfer virtual resources from a source business contract on a source blockchain to a target business contract on a target blockchain. The source business contract is configured as a remote contract of the target business contract based on a full-chain base contract in a full-chain protocol. Both the source blockchain and the target blockchain are configured with the full-chain base contract, and both the source business contract and the target business contract configure the full-chain base contract as a parent contract;

[0377] Then, the first blockchain node calls a transfer fee payment contract in the full-chain protocol to deduct a preset amount of transfer fees on the source blockchain;

[0378] Then, after deducting the transfer fees, the first blockchain node calls the source business contract to execute the first transaction and generate a transaction execution event corresponding to the first transaction, where the transaction execution event carries a target chain identifier of the target blockchain, and the target chain identifier is initialized by a cross-chain relay node calling a registration service in the full-chain protocol;

[0379] Then, the first blockchain node calls a full-chain service contract in the full-chain protocol to obtain a random seed, and inputs the random seed into a random number generator to obtain a target random number;

[0380] Then, the first blockchain node obtains the generation timestamp when generating the transaction execution event;

[0381] Then, the first blockchain node concatenates the target random number and the generation timestamp and inputs them into a target hash function to obtain a target hash value, and uses the target hash value as the event identifier of the transaction execution event;

[0382] Then, the first blockchain node obtains at least one of the target network information of the terminal that initiated the transaction corresponding to the transaction execution event and the target business contract;

[0383] Then, the first blockchain node generates a target block corresponding to the transaction execution event according to the event identifier and the target network information, for the cross-chain relay node to construct a second transaction corresponding to the transaction execution event based on the target block and then send the second transaction to the target business contract according to the target chain identifier;

[0384] Then, after the cross-chain relay node constructs a second transaction corresponding to the transaction execution event based on the target block, it sends the second transaction to the target blockchain according to the target chain identifier;

[0385] Then, the second blockchain node corresponding to the target blockchain can execute the second transaction to realize the transfer of virtual resources from the source blockchain to the target blockchain, so as to complete the cross-chain business processing stage.

[0386] Among them, before transferring virtual resources, it is necessary to first generate virtual resources on the source blockchain. When generating virtual resources, the first blockchain node calls the full-chain service contract in the full-chain protocol and receives the resource identifier range sent by the cross-chain relay node calling the registration service. Among them, the resource identifier range corresponding to the source blockchain is different from the resource identifier range corresponding to the target blockchain;

[0387] Then, the first blockchain node generates a first identifier according to the resource identifier range;

[0388] Then, the first blockchain node obtains the preset identifier setting parameters in the full-chain basic contract, and based on the identifier setting parameters and the resource identifier range, calls the source business contract to generate a second identifier;

[0389] Then, the first blockchain node splices the first identifier and the second identifier to obtain the resource identifier of the virtual resource.

[0390] In addition, taking the single-chain business processing stage as an example, first, the terminal accesses the contract interface service and displays the parameter configuration interface of the contract interface service;

[0391] Then, in response to the operation on the parameter configuration control, the terminal obtains the second service parameter input based on the parameter configuration control;

[0392] Then, in response to the operation on the transaction confirmation control, the terminal sends the second service parameter to the service node;

[0393] Then, the service node calls the contract interface service to receive the second service parameter;

[0394] Then, the service node obtains the source contract address of the pre-configured source business contract based on the contract interface service;

[0395] Then, the service node constructs a fourth transaction for transferring virtual resources to the target business contract on the target blockchain according to the second service parameter and the source contract address;

[0396] Then, the service node obtains the pre-configured signature private key according to the second service parameter and signs the fourth transaction based on the signature private key;

[0397] Then, the service node sends the signed fourth transaction to the first blockchain node according to the source contract address;

[0398] Then, the first blockchain node receives the fourth transaction, where the fourth transaction is used to transfer virtual resources on the source business contract of the source blockchain;

[0399] Then, the first blockchain node calls the source business contract to execute the fourth transaction and generates a single-chain transaction event corresponding to the fourth transaction;

[0400] Then, the first blockchain node generates a block corresponding to the single-chain transaction event to complete the single-chain business processing phase.

[0401] The following is a detailed description of the business processing phase.

[0402] First, the business node calls the verification interface service to receive the event identifier of the transaction execution event, constructs the third transaction based on the event identifier, and sends the third transaction to the target blockchain node. The third transaction is used to query at least one of the target network information of the terminal that initiated the transaction execution event and the target business contract.

[0403] Then, the target blockchain node calls the full-chain basic contract, obtains the pre-stored target network information according to the event identifier, and sends the target network information to the business node.

[0404] Based on this, by receiving the first transaction for transferring virtual resources from the source business contract on the source blockchain to the target business contract on the target blockchain, where the source business contract is configured as a remote contract of the target business contract based on the full-chain basic contract in the full-chain protocol. Since both the source business contract and the target business contract configure the full-chain basic contract as the parent contract, the standardization degree between the source business contract and the target business contract can be improved. Then, call the source business contract to execute the first transaction for transferring virtual resources to the target business contract and generate the corresponding transaction execution event. Since the transaction execution event carries the target chain identifier of the target blockchain, and the target chain identifier is initialized by the cross-chain relay node calling the registration service in the full-chain protocol, the cross-chain relay node can be used as a unified off-chain transfer. After generating the target block corresponding to the transaction execution event, the cross-chain relay node can construct the second transaction corresponding to the transaction execution event based on the target block and send the second transaction to the target business contract according to the target chain identifier. It can be seen that by introducing the full-chain protocol including the full-chain basic contract and the registration service, a standardized process can be formed on and off the chain when conducting cross-chain transactions based on the full-chain protocol, improving the asset consistency and transaction security between different blockchains.

[0405] In addition, when conducting cross-chain transactions, the business node calls the contract interface service to receive business parameters, constructs the first transaction for transferring virtual resources to the target business contract on the target blockchain based on the business parameters, and sends the first transaction to the blockchain node corresponding to the source blockchain. Since the contract interface service is compiled based on the source business contract on the source blockchain, service preposition can be achieved through the contract interface service provided by the business node. The terminal only needs to call the contract interface service of the business node to configure the business parameters, and the contract interface service can automatically complete the transaction construction without having to understand the protocol details of contract interaction and the differences in interaction between multiple different blockchains, thus effectively simplifying the cross-chain transaction process and improving the cross-chain transaction efficiency.

[0406] The following refers to Figure 15 , Figure 15 which is an optional schematic architecture diagram of the full-chain protocol provided by the embodiment of the present application.

[0407] Among them, the full-chain protocol includes a full-chain contract on the chain and a full-chain cross-chain service off the chain. The source blockchain and the target blockchain are both deployed with full-chain contracts on the chain. The full-chain contracts on the chain include a full-chain basic contract, a full-chain service contract, and a transfer fee payment contract. Both the source business contract and the target business contract configure the full-chain basic contract as the parent contract. The full-chain basic contract is provided with a full-chain remote configuration mechanism and a network information disclosure mechanism. The full-chain service contract includes an event identifier allocation protocol and a resource identifier allocation protocol. The cross-chain relay node is deployed with a full-chain cross-chain service off the chain. The full-chain cross-chain service off the chain includes a registration service, a verification service, and a forwarding service.

[0408] Taking the scenario of cross-chain transferring virtual resources on the source blockchain to the target blockchain as an example.

[0409] First, the relevant object can operate on the parameter configuration control on the parameter configuration interface of the terminal, input the business parameters required for cross-chain transferring virtual resources. Then the business node can call the contract interface service to receive the business parameters. Then the business node can construct a first transaction for transferring virtual resources to the target business contract on the target blockchain. Then the business node can sign the first transaction and send the signed first transaction to the first blockchain node corresponding to the source blockchain. Then the first blockchain node can call the transfer fee payment contract in the full-chain protocol to deduct a preset amount of transfer fees on the source blockchain, then call the source business contract to execute the first transaction and generate a transaction execution event corresponding to the first transaction, and call the full-chain service contract of the full-chain protocol to generate an event identifier of the transaction execution event. Then the first blockchain node can generate a target block corresponding to the transaction execution event. Then the cross-chain relay node can construct a second transaction corresponding to the transaction execution event based on the target block, and send the second transaction to the target blockchain according to the target chain identifier. Then the second blockchain node corresponding to the target blockchain can execute the second transaction to realize the transfer of virtual resources from the source blockchain to the target blockchain.

[0410] Furthermore, the architecture of the blockchain network can be referred to Figure 16 , for example, the blockchain network can be the source blockchain network and the target blockchain network mentioned above. Figure 16An alternative architecture diagram of the blockchain network provided by the embodiments of this application. Among them, the blockchain network includes a witness network 1610, a consensus network 1620, etc. Optionally, the witness network 1610 and the consensus network 1620 can interact through a routing proxy layer. Among them, the witness network 1610 is in the public network. The witness network 1610 can include at least two service nodes. The number of the at least two service nodes is determined by the deployment of the witness network 1610. There is no limit on the number of deployed service nodes here. For example, the at least two service nodes can be as Figure 10 shown in, such as service node 1611, service node 1612, service node 1613, service node 1614, service node 1615, service node 1616, service node 1617, and service node 1618, etc. Data interaction can be carried out between each service node; the consensus network 1620 can include at least two consensus nodes. The consensus nodes are equivalent to blockchain nodes. The number of the at least two consensus nodes is determined by the deployment of the consensus network 1620. There is no limit on the number of deployed consensus nodes here. For example, the at least two consensus nodes can be as Figure 10 shown in, such as consensus node 1621, consensus node 1622, consensus node 1623, consensus node 1624, consensus node 1625, consensus node 1626, consensus node 1627, and consensus node 1628, etc. Data interaction can be carried out between each consensus node. Among them, the service nodes in the witness network 1610 can carry out data interaction with the consensus nodes in the consensus network 1620. The service nodes in the witness network 1610 can access the consensus network 1620 and synchronize data from the consensus network 1620. The consensus nodes in the consensus network 1620 can send data to the witness network 1610, etc. Optionally, the service nodes in the witness network 1610 can access the consensus network 1620 through the routing proxy layer, and the consensus nodes in the consensus network 1620 can send messages to the witness network 1610 through the routing proxy layer, etc.

[0411] Among them, the service nodes in the witness network 1610 are used to execute services and can obtain block header data and partially authorized visible block data, etc. from the consensus network 1620 through identity authentication and other means. Optionally, the service node can be a Simplified Payment Verification (SPV) node or other lightweight nodes, etc. The consensus nodes in the consensus network 1620 can perform consensus on the chain for the blocks and send data to the service nodes in the witness network 1610. Optionally, the witness network 1610 and the consensus network 1620 can be in the same network environment, such as both the witness network 1610 and the consensus network 1620 are in a consortium network, etc.; or the witness network 1610 and the consensus network 1620 can be in different network environments. For example, the witness network 1610 is in a public network while the consensus network 1620 is in a private network, etc., which is not limited herein. Optionally, when the consensus network 1620 is in a private network, the data interaction is guaranteed to be secure by the consensus mechanism in the consensus network 1620, and additional identity management and network control, etc. can be not added. Among them, to improve data security, further security verification can also be performed on the data interaction in the consensus network 1620, such as identity management and network control, etc. Optionally, the network environment of the consensus network 1620 can also be not considered, and further security verification can be performed on the data interaction in the consensus network 1620, such as identity management and network control, etc., which is not limited herein. Optionally, the consensus nodes in the consensus network 1620 can detect the behaviors of service nodes and other possible nodes accessing the consensus network 1620 to improve the security of data access in the blockchain network.

[0412] Further, reference can be made to Figure 17 , Figure 17 which is an optional schematic structural diagram of the bill management network provided by the embodiment of the present application. As Figure 17As shown in the figure, taking the scenario of invoice management as an example, the blockchain network includes a business layer (i.e., the witness network), a routing proxy layer, a core consensus network layer, etc. Among them, the business layer may include at least two business nodes, and the at least two business nodes are used to provide business services for different users. For example, the users include the tax bureau using the tax bureau terminal, the enterprise using the enterprise terminal, and the consumer using the consumer terminal, etc. Among them, different business nodes may be in the same network environment or in different network environments. For example, the business node accessed by the tax bureau terminal may be in the tax private network (which can also be regarded as a kind of private network), and the business nodes include but are not limited to the local tax bureau terminal; the business node that the enterprise terminal can access may be in the public cloud, and the business nodes include but are not limited to the invoicing party terminal, the reimbursement party terminal, and other dedicated terminals; the business node accessed by the consumer may be in the private cloud, and the business nodes include but are not limited to the payment server, the transfer server, and other dedicated terminals. Among them, the routing proxy layer is used to connect the business layer and the consensus network layer, and includes proxy nodes, and the proxy nodes can be used to provide authentication services (such as identity authentication, etc.), certificate caching, routing services, and peer-to-peer services, etc. The core consensus network layer includes a blockchain subnet. For example, it includes N core chains, and each core chain includes consensus nodes, and the consensus nodes include permission contracts, caches, and blockchains, etc.

[0413] It can be understood that although the steps in the above various flowcharts are sequentially displayed according to the indication of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this embodiment, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above flowcharts may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or steps or stages in other steps.

[0414] Figure 18 It is a schematic structural diagram of a blockchain transaction processing device provided by an embodiment of the present application. The blockchain transaction processing device 1800 includes:

[0415] A first receiving unit 1810, configured to receive a first transaction, where the first transaction is used to transfer virtual resources from a source business contract on a source blockchain to a target business contract on a target blockchain. The source business contract is configured as a remote contract of the target business contract based on a full-chain basic contract in the full-chain protocol. The full-chain basic contract is configured on both the source blockchain and the target blockchain, and both the source business contract and the target business contract configure the full-chain basic contract as a parent contract;

[0416] The first generation unit 1820 is configured to call the source business contract to execute the first transaction and generate a transaction execution event corresponding to the first transaction, wherein the transaction execution event carries a target chain identifier of the target blockchain, and the target chain identifier is initialized by the cross-chain relay node invoking the registration service in the full-chain protocol;

[0417] The second generation unit 1830 is configured to generate a target block corresponding to the transaction execution event, so that after the cross-chain relay node constructs a second transaction corresponding to the transaction execution event based on the target block, the second transaction is sent to the target business contract according to the target chain identifier.

[0418] Optionally, before calling the source business contract to execute the first transaction and generate a transaction execution event corresponding to the first transaction, the blockchain transaction processing device 1800 further includes:

[0419] A second receiving unit (not shown in the figure) is configured to call the full-chain service contract in the full-chain protocol and receive the resource identifier range sent by the cross-chain relay node invoking the registration service, wherein the resource identifier range corresponding to the source blockchain is different from the resource identifier range corresponding to the target blockchain;

[0420] A third generation unit (not shown in the figure) is configured to generate a resource identifier of the virtual resource according to the resource identifier range.

[0421] Optionally, the third generation unit is specifically configured to:

[0422] Generate a first identifier according to the resource identifier range;

[0423] Obtain the identifier setting parameter preset in the full-chain basic contract, and based on the identifier setting parameter and the resource identifier range, call the source business contract to generate a second identifier;

[0424] Concatenate the first identifier and the second identifier to obtain the resource identifier of the virtual resource.

[0425] Optionally, the blockchain transaction processing device 1800 further includes:

[0426] A permission closing unit (not shown in the figure) is configured to, when updating the source business contract to an alternative business contract, call the full-chain basic contract to close the permissions of the source business contract and the alternative business contract to transfer virtual resources to the target business contract, wherein the alternative business contract configures the full-chain basic contract as the parent contract;

[0427] A permission transfer unit (not shown in the figure) is configured to, after the alternative business contract is configured as the remote contract of the target business contract based on the full-chain basic contract, call the full-chain basic contract to open the permission of the alternative business contract to transfer virtual resources to the target business contract.

[0428] Optionally, the permission closing unit is specifically configured to:

[0429] Invoke the full-chain basic contract to close the permissions of the source business contract and the alternative business contract to transfer virtual resources to the target blockchain according to the target chain identifier;

[0430] Among them, before closing the permissions of the source business contract and the alternative business contract to transfer virtual resources to the target business contract according to the target chain identifier, the permissions of the target business contract to transfer virtual resources to the source business contract are configured to be closed.

[0431] Optionally, the second generation unit 1830 is specifically used for:

[0432] Invoke the full-chain service contract of the full-chain protocol to generate an event identifier for the transaction execution event;

[0433] Obtain at least one of the target network information of the terminal corresponding to the transaction for initiating the transaction execution event and the target business contract;

[0434] Generate a target block corresponding to the transaction execution event according to the event identifier and the target network information.

[0435] Optionally, after generating the target block corresponding to the transaction execution event, the blockchain transaction processing device 1800 further includes:

[0436] A third receiving unit (not shown in the figure), configured to receive a query request sent by a cross-chain relay node invoking the verification service in the full-chain protocol, where the query request carries the event identifier;

[0437] An obtaining unit (not shown in the figure), configured to invoke the full-chain basic contract to obtain the target network information according to the event identifier;

[0438] A sending unit (not shown in the figure), configured to send the target network information to the cross-chain relay node for the cross-chain relay node to verify the transaction execution event based on the target network information before constructing the second transaction.

[0439] Optionally, invoking the full-chain service contract of the full-chain protocol to generate an event identifier for the transaction execution event includes:

[0440] Invoke the full-chain service contract of the full-chain protocol to obtain a random seed, and input the random seed into a random number generator to obtain a target random number;

[0441] Obtain the generation timestamp when generating the transaction execution event;

[0442] Concatenate the target random number and the generation timestamp and input them into a target hash function to obtain a target hash value, and use the target hash value as the event identifier of the transaction execution event.

[0443] Optionally, the first generation unit 1820 is specifically used for:

[0444] Invoke the transfer fee payment contract in the full-chain protocol to deduct a preset amount of transfer fees on the source blockchain;

[0445] After deducting the transfer fees, invoke the source business contract to execute the first transaction and generate a transaction execution event corresponding to the first transaction.

[0446] Figure 19 It is a schematic architecture diagram of the blockchain transaction processing system provided by the embodiments of this application. The blockchain transaction processing system 1900 includes business nodes 1910, blockchain nodes 1920, and cross-chain business nodes 1930;

[0447] The business node 1910 is used to call the contract interface service to receive business parameters, construct a first transaction for transferring virtual resources to the target business contract on the target blockchain according to the business parameters, and send the first transaction to the blockchain node 1920 corresponding to the source blockchain. The contract interface service is compiled based on the source business contract on the source blockchain;

[0448] The blockchain node 1920 is used to call the source business contract to execute the first transaction and generate a corresponding transaction execution event, and generate a target block corresponding to the transaction execution event. Among them, the source business contract is configured as a remote contract of the target business contract based on the full-chain basic contract in the full-chain protocol. The full-chain basic contract is configured on both the source blockchain and the target blockchain, and both the source business contract and the target business contract configure the full-chain basic contract as the parent contract. The transaction execution event carries the target chain identifier of the target blockchain, and the target chain identifier is initialized by the cross-chain business node 1930 calling the registration service in the full-chain protocol;

[0449] The cross-chain business node 1930 is used to construct a second transaction corresponding to the transaction execution event based on the target block, and then send the second transaction to the target blockchain according to the target chain identifier.

[0450] Optionally, the blockchain transaction processing system 1900 further includes a terminal (not shown in the figure). The terminal is used to obtain the first code file of the source business contract, compile the first code file to obtain a first target file for the blockchain node 1920 to call. Among them, the first code file integrates the full-chain basic contract, and the full-chain basic contract is used to provide a standardized interface for the full-chain protocol;

[0451] The terminal is also used to convert the first code file into a second code file of the contract interface service, compile the second code file to obtain a second target file for the business node 1910 to call;

[0452] The terminal is also used to deploy the first target file to the source blockchain and deploy the second target file to the business node 1910.

[0453] Optionally, the terminal is further configured to obtain a third code file of at least one pre-positioned contract in the full-chain protocol, where the pre-positioned contract is any contract configured on the source blockchain in the full-chain protocol;

[0454] The terminal is further configured to merge the third code file into the second code file.

[0455] Optionally, the terminal is further configured to access a contract interface service and display a parameter configuration interface of the contract interface service, where the parameter configuration interface is provided with parameter configuration controls and a transaction confirmation control;

[0456] The terminal is further configured to obtain service parameters input based on the parameter configuration control in response to an operation on the parameter configuration control;

[0457] The terminal is further configured to send the service parameters to the service node 1910 in response to an operation on the transaction confirmation control.

[0458] Optionally, the service node 1910 is specifically configured to:

[0459] Obtain the source contract address of the pre-configured source business contract based on the contract interface service;

[0460] Construct a first transaction for transferring virtual resources to the target business contract on the target blockchain according to the service parameters and the source contract address;

[0461] Obtain a pre-configured signature private key according to the service parameters, and sign the first transaction based on the signature private key;

[0462] Send the signed first transaction to the blockchain node 1920 corresponding to the source blockchain according to the source contract address.

[0463] Optionally, the service node 1910 is further configured to call a verification interface service to receive an event identifier of a transaction execution event, construct a third transaction according to the event identifier, and send the third transaction to the blockchain node 1920, where the third transaction is used to query the target network information of at least one of the terminal that initiated the transaction execution event and the target business contract;

[0464] The blockchain node 1920 is further configured to call a full-chain basic contract, obtain the pre-stored target network information according to the event identifier, and send the target network information to the service node 1910.

[0465] The electronic device for executing the above blockchain transaction processing method provided by the embodiments of the present application may be a terminal. Refer to Figure 20 , Figure 20It is a partial structural block diagram of the terminal provided by the embodiment of the present application. The terminal includes components such as a camera assembly 2010, a memory 2020, an input unit 2030, a display unit 2040, a sensor 2050, an audio circuit 2060, a wireless fidelity (WiFi) module 2070, a processor 2080, and a power supply 2090. Those skilled in the art can understand that Figure 20 the terminal structure shown in

[0466] does not limit the terminal, and may include more or fewer components than shown in the figure, or combine some components, or have different component arrangements. The camera assembly 2010 can be used to collect images or videos. Optionally, the camera assembly 2010 includes a front camera and a rear camera. Usually, the front camera is set on the front panel of the terminal, and the rear camera is set on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth camera, a wide-angle camera, and a telephoto camera, so as to realize the function of background blurring by fusing the main camera and the depth camera, panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions by fusing the main camera and the wide-angle camera.

[0467] The memory 2020 can be used to store software programs and modules. The processor 2080 executes various functional applications and data processing of the terminal by running the software programs and modules stored in the memory 2020.

[0468] The input unit 2030 can be used to receive input digital or character information, and generate key signal inputs related to the settings and function controls of the terminal. Specifically, the input unit 2030 may include a touch panel 2031 and other input devices 2032.

[0469] The display unit 2040 can be used to display input information or provided information and various menus of the terminal. The display unit 2040 may include a display panel 2041.

[0470] The audio circuit 2060, the speaker 2061, and the microphone 2062 can provide an audio interface.

[0471] The power supply 2090 can be alternating current, direct current, a disposable battery, or a rechargeable battery.

[0472] The number of sensors 2050 can be one or more. The one or more sensors 2050 include, but are not limited to, an acceleration sensor, a gyroscope sensor, a pressure sensor, an optical sensor, etc. Among them:

[0473] The acceleration sensor can detect the magnitudes of accelerations on the three coordinate axes of the coordinate system established by the terminal. For example, the acceleration sensor can be used to detect the components of the gravitational acceleration on the three coordinate axes. The processor 2080 can control the display unit 2040 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor. The acceleration sensor can also be used for games or the collection of the user's motion data.

[0474] The gyroscope sensor can detect the body direction and rotation angle of the terminal. The gyroscope sensor can cooperate with the acceleration sensor to collect the 3D actions of the user on the terminal. Based on the data collected by the gyroscope sensor, the processor 2080 can implement the following functions: motion sensing (such as changing the UI according to the user's tilting operation), image stabilization during shooting, game control, and inertial navigation.

[0475] The pressure sensor can be disposed on the side frame of the terminal and / or the lower layer of the display unit 2040. When the pressure sensor is disposed on the side frame of the terminal, it can detect the holding signal of the user on the terminal, and the processor 2080 can perform left / right hand recognition or quick operation according to the holding signal collected by the pressure sensor. When the pressure sensor is disposed on the lower layer of the display unit 2040, the processor 2080 can control the operable controls on the UI interface according to the pressure operation of the user on the display unit 2040. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.

[0476] The optical sensor is used to collect the ambient light intensity. In one embodiment, the processor 2080 can control the display brightness of the display unit 2040 according to the ambient light intensity collected by the optical sensor. Specifically, when the ambient light intensity is high, the display brightness of the display unit 2040 is increased; when the ambient light intensity is low, the display brightness of the display unit 2040 is decreased. In another embodiment, the processor 2080 can also dynamically adjust the shooting parameters of the camera assembly 2010 according to the ambient light intensity collected by the optical sensor.

[0477] In this embodiment, the processor 2080 included in the terminal can execute the blockchain transaction processing method of the previous embodiment.

[0478] The electronic device provided in the embodiment of the present application for executing the above blockchain transaction processing method can also be a server. Refer to Figure 21 , Figure 21This is a partial structural block diagram of the server provided by the embodiments of the present application. The server 2100 may vary greatly due to different configurations or performances, and may include one or more central processing units (CPUs) 2122 (for example, one or more processors) and a memory 2132, and one or more storage media 2130 (for example, one or more mass storage devices) for storing application programs 2142 or data 2144. Among them, the memory 2132 and the storage media 2130 may be transient storage or persistent storage. The program stored in the storage media 2130 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server 2100. Further, the central processing unit 2122 may be configured to communicate with the storage media 2130 and execute a series of instruction operations in the storage media 2130 on the server 2100.

[0479] The server 2100 may further include one or more power supplies 2126, one or more wired or wireless network interfaces 2150, one or more input / output interfaces 2158, and / or one or more operating systems 2141, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, and so on.

[0480] The processor in the server 2100 may be used to execute the blockchain transaction processing method.

[0481] The embodiments of the present application further provide a computer-readable storage medium, which is used to store program codes, and the program codes are used to execute the blockchain transaction processing methods of the foregoing various embodiments.

[0482] The embodiments of the present application further provide a computer program product, which includes a computer program stored in a computer-readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the blockchain transaction processing method described above.

[0483] In the description of the present application and the above-mentioned drawings, terms such as "first", "second", "third", "fourth", etc. (if any) are used to distinguish similar objects and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0484] It should be understood that in the present application, "at least one (item)" means one or more, and "a plurality" means two or more. "And / or" is used to describe the association relationship of associated objects and indicates that there can be three relationships. For example, "A and / or B" can mean: only A exists, only B exists, and both A and B exist at the same time. Among them, A and B can be singular or plural. The character " / " generally means that the associated objects before and after are in an "or" relationship. "At least one (one) of the following" or its similar expression refers to any combination of these items, including any combination of single item (one) or plural items (ones). For example, at least one (one) of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0485] It should be understood that in the description of the embodiments of the present application, the meaning of "a plurality (or multiple items)" is more than two. Understandings such as greater than, less than, exceeding, etc. do not include the present number, and understandings such as above, below, within, etc. include the present number.

[0486] In several embodiments provided by the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces, and the indirect coupling or communication connection of devices or units can be in electrical, mechanical or other forms.

[0487] The unit described as a separation component may or may not be physically separated, and the component shown as a unit may or may not be a physical unit, that is, it may be located in one place or may be distributed across multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0488] In addition, each functional unit in various embodiments of the present application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0489] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in various embodiments of the present application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs that can store program codes.

[0490] It should also be understood that the various implementation manners provided in the embodiments of the present application can be combined arbitrarily to achieve different technical effects.

[0491] The above is a specific description of the preferred embodiments of the present application, but the present application is not limited to the above implementation manners. Those skilled in the art can also make various equivalent deformations or substitutions without departing from the spirit of the present application, and these equivalent deformations or substitutions are all included within the scope defined by the claims of the present application.

Claims

1. A blockchain transaction processing method, characterized in that, it includes: Receiving a first transaction, wherein the first transaction is used to transfer virtual resources from a source business contract on a source blockchain to a target business contract on a target blockchain. The source business contract is configured as a remote contract of the target business contract based on a full-chain basic contract in a full-chain protocol. The full-chain basic contract is configured on both the source blockchain and the target blockchain, and both the source business contract and the target business contract configure the full-chain basic contract as a parent contract; Invoking the source business contract to execute the first transaction and generating a transaction execution event corresponding to the first transaction, wherein the transaction execution event carries a target chain identifier of the target blockchain, and the target chain identifier is initialized by a cross-chain relay node invoking a registration service in the full-chain protocol; Generating a target block corresponding to the transaction execution event, so that after the cross-chain relay node constructs a second transaction corresponding to the transaction execution event based on the target block, the second transaction is sent to the target business contract according to the target chain identifier.

2. The blockchain transaction processing method according to claim 1, characterized in that, before invoking the source business contract to execute the first transaction and generating a transaction execution event corresponding to the first transaction, the blockchain transaction processing method further includes: Invoking a full-chain service contract in the full-chain protocol and receiving a resource identifier range sent by the cross-chain relay node invoking the registration service, wherein the resource identifier range corresponding to the source blockchain is different from the resource identifier range corresponding to the target blockchain; Generating a resource identifier of the virtual resource according to the resource identifier range.

3. The blockchain transaction processing method according to claim 2, characterized in that, the generating a resource identifier of the virtual resource according to the resource identifier range includes: Generating a first identifier according to the resource identifier range; Obtaining a preset identifier setting parameter in the full-chain basic contract, and based on the identifier setting parameter and the resource identifier range, invoking the source business contract to generate a second identifier; Concatenating the first identifier and the second identifier to obtain the resource identifier of the virtual resource.

4. The blockchain transaction processing method according to claim 1, characterized in that, the blockchain transaction processing method further includes: When updating the source business contract to a replacement business contract, invoking the full-chain basic contract to close the permissions of the source business contract and the replacement business contract to transfer virtual resources to the target business contract, wherein the replacement business contract configures the full-chain basic contract as a parent contract; After the replacement business contract is configured as a remote contract of the target business contract based on the full-chain basic contract, invoking the full-chain basic contract to open the permission of the replacement business contract to transfer virtual resources to the target business contract.

5. The blockchain transaction processing method according to claim 4, characterized in that, Invoking the full-chain basic contract to close the permissions of the source business contract and the alternative business contract to transfer virtual resources to the target business contract includes: Invoking the full-chain basic contract to close the permissions of the source business contract and the alternative business contract to transfer virtual resources to the target blockchain according to the target chain identifier; Wherein, before closing the permissions of the source business contract and the alternative business contract to transfer virtual resources to the target business contract according to the target chain identifier, the permissions of the target business contract to transfer virtual resources to the source business contract are configured to be closed.

6. The blockchain transaction processing method according to claim 1, Characterized in that, Generating the target block corresponding to the transaction execution event includes: Invoking the full-chain service contract of the full-chain protocol to generate an event identifier for the transaction execution event; Obtaining the target network information of at least one of the terminal that initiates the transaction corresponding to the transaction execution event and the target business contract; Generating the target block corresponding to the transaction execution event according to the event identifier and the target network information.

7. The blockchain transaction processing method according to claim 6, Characterized in that, After generating the target block corresponding to the transaction execution event, the blockchain transaction processing method further includes: Receiving a query request sent by the cross-chain relay node invoking the verification service in the full-chain protocol, wherein the query request carries the event identifier; Invoking the full-chain basic contract to obtain the target network information according to the event identifier; Sending the target network information to the cross-chain relay node for the cross-chain relay node to verify the transaction execution event based on the target network information before constructing the second transaction.

8. The blockchain transaction processing method according to claim 6, Characterized in that, Invoking the full-chain service contract of the full-chain protocol to generate an event identifier for the transaction execution event includes: Invoking the full-chain service contract of the full-chain protocol to obtain a random seed, inputting the random seed into a random number generator to obtain a target random number; Obtaining the generation timestamp when generating the transaction execution event; Inputting the concatenation of the target random number and the generation timestamp into a target hash function to obtain a target hash value, and using the target hash value as the event identifier of the transaction execution event.

9. The blockchain transaction processing method according to claim 1, Characterized in that, Invoking the source business contract to execute the first transaction and generate a transaction execution event corresponding to the first transaction includes; Invoking the transfer fee payment contract in the full-chain protocol to deduct a preset amount of transfer fees on the source blockchain; After deducting the transfer fees, invoking the source business contract to execute the first transaction and generate a transaction execution event corresponding to the first transaction.

10. A blockchain transaction processing method, Characterized in that, Includes: The service of the business node calls the contract interface to receive business parameters, constructs a first transaction for transferring virtual resources to the target business contract on the target blockchain according to the business parameters, and sends the first transaction to the blockchain node corresponding to the source blockchain, where the contract interface service is compiled based on the source business contract on the source blockchain; The blockchain node calls the source business contract to execute the first transaction and generates a corresponding transaction execution event, and generates a target block corresponding to the transaction execution event, where the source business contract is configured as a remote contract of the target business contract based on the full-chain basic contract in the full-chain protocol, the full-chain basic contract is configured on both the source blockchain and the target blockchain, both the source business contract and the target business contract configure the full-chain basic contract as the parent contract, the transaction execution event carries the target chain identifier of the target blockchain, and the target chain identifier is initialized by the cross-chain relay node calling the registration service in the full-chain protocol; After the cross-chain relay node constructs a second transaction corresponding to the transaction execution event based on the target block, it sends the second transaction to the target blockchain according to the target chain identifier.

11. The blockchain transaction processing method according to claim 10, wherein, Before the service of the business node calls the contract interface to receive business parameters, the blockchain transaction processing method further includes: The terminal obtains a first code file of the source business contract, compiles the first code file, and obtains a first target file for the blockchain node to call, where the first code file integrates the full-chain basic contract, and the full-chain basic contract is used to provide a standardized interface for the full-chain protocol; The terminal converts the first code file into a second code file of the contract interface service, compiles the second code file, and obtains a second target file for the business node to call; The terminal deploys the first target file to the source blockchain and deploys the second target file to the business node.

12. The blockchain transaction processing method according to claim 11, wherein, Before compiling the second code file, the blockchain transaction processing method further includes: The terminal obtains a third code file of at least one pre-positioned contract in the full-chain protocol, where the pre-positioned contract is any contract configured on the source blockchain in the full-chain protocol; The terminal merges the third code file into the second code file.

13. The blockchain transaction processing method according to claim 10, wherein, Before the service of the business node calls the contract interface to receive business parameters, the blockchain transaction processing method further includes: The terminal accesses the contract interface service and displays a parameter configuration interface of the contract interface service, where the parameter configuration interface is provided with parameter configuration controls and a transaction confirmation control; The terminal obtains the business parameters input based on the parameter configuration control in response to an operation on the parameter configuration control; In response to an operation on the transaction confirmation control, the terminal sends the service parameters to the service node.

14. The blockchain transaction processing method according to claim 10, wherein, the constructing a first transaction for transferring virtual resources to a target service contract on a target blockchain according to the service parameters and sending the first transaction to a blockchain node corresponding to the source blockchain includes: obtaining a source contract address of the source service contract pre-configured based on the contract interface service; constructing a first transaction for transferring virtual resources to a target service contract on a target blockchain according to the service parameters and the source contract address; obtaining a signature private key pre-configured according to the service parameters, and signing the first transaction based on the signature private key; sending the signed first transaction to a blockchain node corresponding to the source blockchain according to the source contract address.

15. The blockchain transaction processing method according to claim 10, wherein, the blockchain transaction processing method further includes: the service node calls a verification interface service to receive an event identifier of the transaction execution event, constructs a third transaction according to the event identifier, and sends the third transaction to the blockchain node, where the third transaction is used to query target network information of at least one of the terminal that initiated the transaction execution event and the target service contract; the blockchain node calls the full-chain basic contract, obtains the pre-stored target network information according to the event identifier, and sends the target network information to the service node.

16. A blockchain transaction processing apparatus, wherein, it includes: a first receiving unit, configured to receive a first transaction, where the first transaction is used to transfer virtual resources from a source service contract on a source blockchain to a target service contract on a target blockchain, the source service contract is configured as a remote contract of the target service contract based on a full-chain basic contract in a full-chain protocol, the full-chain basic contract is configured on both the source blockchain and the target blockchain, and both the source service contract and the target service contract configure the full-chain basic contract as a parent contract; a first generating unit, configured to call the source service contract to execute the first transaction and generate a transaction execution event corresponding to the first transaction, where the transaction execution event carries a target chain identifier of the target blockchain, and the target chain identifier is initialized by a cross-chain relay node calling a registration service in the full-chain protocol; a second generating unit, configured to generate a target block corresponding to the transaction execution event, so that after the cross-chain relay node constructs a second transaction corresponding to the transaction execution event based on the target block, the second transaction is sent to the target service contract according to the target chain identifier.

17. A blockchain transaction processing system, wherein, it includes a service node, a blockchain node and a cross-chain relay node; The business node is used to call the contract interface service to receive business parameters, construct a first transaction for transferring virtual resources to a target business contract on a target blockchain according to the business parameters, and send the first transaction to the blockchain node corresponding to the source blockchain. The contract interface service is compiled based on a source business contract on the source blockchain; The blockchain node is used to call the source business contract to execute the first transaction and generate a corresponding transaction execution event, and generate a target block corresponding to the transaction execution event. The source business contract is configured as a remote contract of the target business contract based on a full-chain basic contract in the full-chain protocol. The full-chain basic contract is configured on both the source blockchain and the target blockchain. Both the source business contract and the target business contract configure the full-chain basic contract as a parent contract. The transaction execution event carries a target chain identifier of the target blockchain, and the target chain identifier is initialized by a cross-chain relay node calling a registration service in the full-chain protocol; The cross-chain relay node is used to construct a second transaction corresponding to the transaction execution event based on the target block, and send the second transaction to the target blockchain according to the target chain identifier.

18. An electronic device includes a memory and a processor, and the memory stores a computer program, wherein, when the processor executes the computer program, it implements the blockchain transaction processing method according to any one of claims 1 to 9.

19. A computer-readable storage medium stores a computer program, wherein, when the computer program is executed by a processor, it implements the blockchain transaction processing method according to any one of claims 1 to 9.

20. A computer program product includes a computer program, wherein, when the computer program is executed by a processor, it implements the blockchain transaction processing method according to any one of claims 1 to 9.