Blockchain-based business processing method and apparatus, electronic device, and readable medium
Patent Information
- Application Number
- CN202111437323.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-29
- Publication Date
- 2026-10-13
- Estimated Expiration
- 2041-11-29
AI Technical Summary
[0004]然而,要使用中继区块链需要在参与交易的双方的区块链中部署相关的中继协议,并且在跨链交易过程的计算过程中引入额外区块链的操作,增加了整体跨链交易过程的复杂度,降低了交易过程的执行效率
[0044]应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本申请。
Smart Images

Figure CN116186749B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a blockchain-based business processing method, apparatus, electronic device, and readable medium. Background Technology
[0002] Blockchain is an application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. It uses cryptography to connect and protect linked transaction records (also known as blocks). The distributed ledger connected by blockchain allows multiple parties to effectively record transactions and permanently verify these transactions (they cannot be tampered with).
[0003] In related technologies, when conducting cross-chain transactions between blockchains, a relay blockchain is typically used to relay transactions between the two blockchains.
[0004] However, using a relay blockchain requires deploying a relay protocol on the blockchains of both parties involved in the transaction, and introducing additional blockchain operations during the calculation process of the cross-chain transaction, which increases the complexity of the overall cross-chain transaction process and reduces the execution efficiency of the transaction process. Summary of the Invention
[0005] To address the aforementioned technical issues, this application provides a blockchain-based business processing method, apparatus, electronic device, and readable medium for cross-chain data transactions between two blockchains via a relay server. This eliminates the need to deploy a relay chain transaction protocol within the blockchain or perform additional blockchain operations, thereby reducing the complexity of the transaction process and improving its execution efficiency.
[0006] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.
[0007] According to one aspect of the embodiments of this application, a blockchain-based business processing method is provided, including:
[0008] Receive transaction notifications sent by the relay server, wherein the transaction notifications include cross-chain transaction data from the first blockchain, and the transaction notifications are generated by the relay server in response to transaction requests from the first blockchain;
[0009] Cross-chain data processing is performed based on the cross-chain transaction data in the transaction notification to obtain the data processing result. The data processing result and the pre-effective status information of the data processing result are packaged to generate a transaction block and uploaded to the second blockchain.
[0010] Based on the transaction block, a transaction response is sent to the relay server, so that the relay server can generate a transaction completion message based on the transaction response;
[0011] It receives the transaction completion message sent by the relay server, and packages the data processing result and the confirmation information of the data processing result into a receiving result block according to the transaction completion message, and puts the receiving result block on the second blockchain.
[0012] According to one aspect of the embodiments of this application, a blockchain-based business processing method is provided, including:
[0013] Pack cross-chain transaction data and its pre-effective status information into a block to be traded and upload the block to be traded to the first blockchain.
[0014] Based on the blockchain information of the block to be traded and the second blockchain, a transaction request is generated and sent to the relay server.
[0015] Receive transaction result notifications sent by the relay server. The transaction result notifications are generated based on the data processing results in the second blockchain. The data processing results are obtained by the second blockchain through cross-chain data processing based on cross-chain transaction data.
[0016] In response to the transaction result notification, a result confirmation message is sent to the relay server so that the relay server can generate a transaction completion message based on the result confirmation message;
[0017] It receives the transaction completion message sent by the relay server, and packages the cross-chain transaction data and the confirmation and effectiveness information of the cross-chain transaction data into a sending result block according to the transaction completion message, and puts the sending result block on the first blockchain.
[0018] According to one aspect of the embodiments of this application, a blockchain-based business processing method is provided, including:
[0019] Receive a transaction request sent by the first blockchain, wherein the transaction request includes cross-chain transaction data from the first blockchain and blockchain information from the second blockchain;
[0020] In response to a transaction request, a transaction notification is generated based on cross-chain transaction data, and the transaction notification is sent to the second blockchain based on the blockchain information.
[0021] Receive the transaction response sent by the second blockchain, and send the transaction result notification to the first blockchain according to the transaction response. The transaction response includes the data processing result obtained by processing the cross-chain transaction data.
[0022] Receive a result confirmation message from the first blockchain; the result confirmation message is generated in response to the transaction result notification.
[0023] Based on the transaction response and result confirmation messages, a transaction completion message is generated and sent to the first blockchain and the second blockchain.
[0024] According to one aspect of the embodiments of this application, a blockchain-based business processing device is provided, including: a transaction notification receiving module, a cross-chain data processing module, a transaction response sending module, and a first completion message receiving module.
[0025] The system includes the following modules: a transaction notification receiving module, used to receive transaction notifications sent by the relay server, wherein the transaction notifications include cross-chain transaction data from the first blockchain, and the transaction notifications are generated by the relay server in response to transaction requests from the first blockchain; a cross-chain data processing module, used to perform cross-chain data processing based on the cross-chain transaction data in the transaction notifications, obtain data processing results, and package the data processing results and their pre-effective status information into a transaction block for uploading to the second blockchain; a transaction response sending module, used to send a transaction response to the relay server based on the transaction block, so that the relay server generates a transaction completion message based on the transaction response; and a first completion message receiving module, used to receive the transaction completion message sent by the relay server, and package the data processing results and their confirmation effectiveness information into a receiving result block based on the transaction completion message, and uploading the receiving result block to the second blockchain.
[0026] In one embodiment of this application, based on the aforementioned scheme, the transaction response sending module is configured to: sign the data processing result in the transaction block to obtain a receipt confirmation signature; generate a transaction response based on the receipt confirmation signature and the data processing result, and send the transaction response to the relay server.
[0027] In one embodiment of this application, based on the aforementioned scheme, the transaction completion message includes a relay signature, which is a signature generated by the relay server based on the sending confirmation signature of the first blockchain and the receiving confirmation signature of the second blockchain; the first completion message receiving module is configured to: obtain the relay signature from the transaction completion message; package the relay signature to generate a receiving result block, and upload the receiving result block to the second blockchain.
[0028] In one embodiment of this application, based on the aforementioned scheme, the first completion message receiving module is configured to: detect the time interval from the start of sending the transaction response to receiving the transaction completion message from the relay server; if the time interval exceeds a time threshold, discard the transaction completion message; if the time interval is less than the time threshold, save the transaction completion message.
[0029] According to one aspect of the embodiments of this application, a blockchain-based business processing device is provided, including: a transaction data packaging module, a transaction request sending module, a result notification receiving module, a confirmation message sending module, and a second completion message receiving module.
[0030] The system includes the following modules: a transaction data packaging module, used to package cross-chain transaction data and its pre-effective status information into a block to be traded and upload the block to be traded to the first blockchain; a transaction request sending module, used to generate a transaction request based on the block to be traded and the blockchain information of the second blockchain and send the transaction request to the relay server; a result notification receiving module, used to receive a transaction result notification sent by the relay server, which is generated based on the data processing results in the second blockchain, which are obtained by cross-chain data processing based on the cross-chain transaction data; a confirmation message sending module, used to send a result confirmation message to the relay server in response to the transaction result notification, so that the relay server generates a transaction completion message based on the result confirmation message; and a second completion message receiving module, used to receive the transaction completion message sent by the relay server, and based on the transaction completion message, package the cross-chain transaction data and its confirmation effectiveness information into a sending result block and upload the sending result block to the first blockchain.
[0031] In one embodiment of this application, based on the aforementioned scheme, the confirmation message sending module is configured to: in response to the transaction result notification, sign the cross-chain transaction data in the block to be traded to obtain a sending confirmation signature; generate a result confirmation message based on the sending confirmation signature, and send the result confirmation message to the relay server.
[0032] In one embodiment of this application, based on the aforementioned scheme, the transaction completion message includes a relay signature, which is a signature generated by the relay server based on the sending confirmation signature of the first blockchain and the result confirmation signature of the second blockchain; the second completion message receiving module is configured to: obtain the relay signature from the transaction completion message; package the relay signature to generate a sending result block, and upload the sending result block to the first blockchain.
[0033] In one embodiment of this application, based on the aforementioned scheme, the second completion message receiving module is configured to: detect the time interval when a transaction completion message is received from the relay server from the sending result confirmation message; if the time interval exceeds a time threshold, discard the transaction completion message; if the time interval is less than the time threshold, save the transaction completion message.
[0034] In one embodiment of this application, based on the aforementioned scheme, the first blockchain and the second blockchain are sub-chains derived from blocks of different heights in the main blockchain; the transaction request sending module is configured to: query the server information of the relay server and the blockchain information of the second blockchain from the main blockchain; generate a transaction request based on the blockchain information of the second blockchain and the block information of the block to be traded; and send the transaction request to the relay server based on the server information.
[0035] According to one aspect of the embodiments of this application, a blockchain-based business processing device is provided, including: a transaction request receiving module, a transaction notification generating module, a transaction response receiving module, a confirmation message receiving module, and a completion message sending module.
[0036] The system includes the following modules: a transaction request receiving module for receiving transaction requests from the first blockchain, wherein the transaction request includes cross-chain transaction data from the first blockchain and blockchain information from the second blockchain; a transaction notification generation module for generating a transaction notification based on the cross-chain transaction data in response to the transaction request, and sending the transaction notification to the second blockchain based on the blockchain information; a transaction response receiving module for receiving transaction responses from the second blockchain, and sending a transaction result notification to the first blockchain based on the transaction response, wherein the transaction response includes data processing results obtained by processing the cross-chain transaction data; a confirmation message receiving module for receiving a result confirmation message from the first blockchain, wherein the result confirmation message is generated in response to the transaction result notification; and a completion message sending module for generating a transaction completion message based on the transaction response and the result confirmation message, and sending the transaction completion message to both the first and second blockchains.
[0037] In one embodiment of this application, based on the foregoing scheme, the blockchain-based business processing device further includes: a session initiation module, used to initiate a transaction session according to a transaction request and monitor the session duration of the transaction session; a status update module, used to update the status of the transaction session to an end state when the session duration exceeds a session duration threshold; and a message discarding module, used to discard the received message when a message associated with cross-chain transaction data and data processing results is received.
[0038] In one embodiment of this application, based on the aforementioned scheme, the transaction response includes a result confirmation signature, and the result confirmation message includes a send confirmation signature; the completion message sending module is configured to: check the status of the transaction session; if the transaction session is in an active state, update the transaction session to a completed state and generate a relay result signature based on the transaction request, transaction response, and result confirmation message; and generate a transaction completion message based on the relay result signature.
[0039] In one embodiment of this application, based on the aforementioned scheme, the first blockchain and the second blockchain are sub-chains derived from blocks of different heights in the main blockchain; the blockchain-based business processing device further includes: a registration request module, used to send a registration request to the main blockchain so that the main blockchain generates a registration block based on the registration request, wherein the registration request includes server information of the relay server; and a relay service initiation module, used to receive the registration response sent by the main blockchain and initiate a relay service for receiving transaction requests based on the registration response.
[0040] According to one aspect of the embodiments of this application, an electronic device is provided, the electronic device comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute a blockchain-based business processing method as described above by executing the executable instructions.
[0041] According to one aspect of the embodiments of this application, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the blockchain-based business processing method as described above.
[0042] According to one aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the blockchain-based business processing method provided in the various optional implementations described above.
[0043] In the embodiments of this application, the consensus node of the blockchain receives a transaction notification sent by a relay server. The transaction notification includes cross-chain transaction data from a first blockchain, generated by the relay server in response to a transaction request from the first blockchain. Cross-chain data processing is performed based on the cross-chain transaction data in the transaction notification to obtain a data processing result. The data processing result and its pre-effective status information are packaged into a transaction block and uploaded to the second blockchain. Based on the transaction block, a transaction response is sent to the relay server, causing the relay server to generate a transaction completion message. The transaction completion message is received from the relay server, and the data processing result and its confirmation effectiveness information are packaged into a receiving result block, which is then uploaded to the second blockchain. Through this method, cross-chain data transactions are conducted between the two blockchains via a relay server. This eliminates the need to deploy a relay chain transaction protocol within the blockchain or perform additional blockchain operations, reducing the complexity of the transaction process and improving its execution efficiency.
[0044] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0045] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0046] In the attached diagram:
[0047] Figure 1 A schematic diagram of the blockchain network structure is shown.
[0048] Figures 2 to 4 The diagram shows the architecture of the blockchain system used in the embodiments of this application.
[0049] Figure 5 A schematic diagram of an electronic invoice system according to an embodiment of this application is shown.
[0050] Figure 6 A schematic diagram of a multi-chain scenario according to an embodiment of this application is shown.
[0051] Figure 7 A flowchart of a blockchain-based business processing method according to an embodiment of this application is shown;
[0052] Figure 8 A schematic diagram illustrating cross-chain transactions between sub-chains according to an embodiment of this application is shown;
[0053] Figure 9 A block diagram of a blockchain-based business processing apparatus according to an embodiment of this application is shown;
[0054] Figure 10 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown. Detailed Implementation
[0055] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art.
[0056] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.
[0057] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0058] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0059] Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and cryptographic algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks (i.e., blocks) linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and to generate the next block. A blockchain can include an underlying platform, a platform product and service layer, and an application service layer.
[0060] The underlying blockchain platform can include processing modules such as user management, basic services, smart contracts, and operational monitoring. The user management module is responsible for managing the identity information of all blockchain participants, including maintaining public and private key generation (account management), key management, and maintaining the correspondence between user real identities and blockchain addresses (access management). Furthermore, under authorization, it monitors and audits transactions of certain real identities and provides risk control rule configuration (risk control audit). The basic services module is deployed on all blockchain node devices to verify the validity of business requests. After consensus is reached on valid requests, they are recorded in storage. For a new business request, the basic services first perform interface adaptation parsing and authentication (interface adaptation), and then encrypt the business information through a consensus algorithm (consensus management). After encryption, the data is transmitted completely and consistently to the shared ledger (network communication) and recorded and stored. The smart contract module is responsible for contract registration, issuance, triggering, and execution. Developers can define contract logic using a programming language and publish it to the blockchain (contract registration). According to the contract terms, the key or other events are invoked to trigger execution and complete the contract logic. It also provides functions for contract upgrades and cancellations. The operation monitoring module is mainly responsible for deployment, configuration modification, contract settings, cloud adaptation, and real-time status visualization output during product release, such as alarms, monitoring network conditions, and monitoring the health status of node devices.
[0061] The platform's product service layer provides the basic capabilities and implementation frameworks for typical applications. Developers can leverage these basic capabilities, along with the specific characteristics of their business needs, to implement blockchain-based business logic. The application service layer provides blockchain-based application services to business stakeholders.
[0062] See Figure 1 The illustrated blockchain network may include multiple nodes 101, which can be various clients forming the blockchain network. Each node 101, in its normal operation, receives input information and maintains shared data within the blockchain network based on this information. To ensure information exchange within the blockchain network, information connections can exist between each node, allowing for information transmission. For example, when any node in the blockchain network receives input information, other nodes in the network retrieve this input information according to a consensus algorithm and store it as shared data, ensuring data consistency across all nodes in the blockchain network.
[0063] Each node in a blockchain network has a corresponding node identifier, and each node can store the node identifiers of other nodes. This allows for the broadcast of generated blocks to other nodes in the blockchain network based on their node identifiers. Each node can maintain a list of node identifiers, storing the node name and its corresponding node identifier in this list. The node identifier can be an IP (Internet Protocol) address or any other information that can be used to identify the node.
[0064] Each node in a blockchain network stores the same blockchain. A blockchain consists of multiple blocks. The genesis block includes a block header and a block body. The block header stores input information features, version number, timestamp, and difficulty value, while the block body stores the input information. The next block after the genesis block is its parent block. The next block also includes a block header and a block body. The block header stores the current block's input information features, the parent block's header features, version number, timestamp, and difficulty value, and so on. This ensures that the data stored in each block is related to the data stored in its parent block, guaranteeing the security of the input information within each block.
[0065] When generating blocks in the blockchain, each node receiving input information verifies it. After verification, the input information is stored in a memory pool, and its hash tree used to record input information is updated. Next, the timestamp is updated to reflect the time the input information was received, and different random numbers are tried multiple times to calculate the feature value. When a random number that meets the conditions is obtained, the corresponding information is stored, generating the block header and block body, thus obtaining the current block. Subsequently, the blockchain node sends the newly generated block to other nodes in its data sharing system based on their node identifiers. These other nodes verify the newly generated block and, after verification, add it to their stored blockchain. Nodes can verify newly generated blocks through consensus algorithms, which may include, but are not limited to: Proof of Work (PoW), Proof of Stake (PoS), Delegated Proof of Stake (DPos), Practical Byzantine Fault Tolerance (PBFT), Paxos, and Raft. PoW (Proof of Work) is a measurement method used by a system (such as the aforementioned blockchain network system) to achieve a specific goal. PoS (Proof of Stake) is an upgraded consensus mechanism of PoW; specifically, the longer someone holds electronic resources (holding time = quantity of electronic resources * holding time), the greater their chance of obtaining the right to record blocks. DPoS (Delegated Proof of Stake): Similar to a board of directors vote, holders of electronic resources elect a certain number of nodes to act as proxies for verification and record-keeping. PBFT (Practical Byzantine Fault Tolerance): A message-passing-based consensus algorithm that achieves consensus through three phases, which may be repeated if failures occur. Paxos (a distributed algorithm): A two-phase algorithm with three main roles: proposer, acceptor, and learner.The proposer proposes a motion, the acceptor agrees or rejects it, and the learner obtains the final value after consensus is reached. Raft (a distributed consensus algorithm): The Raft algorithm includes three roles: follower, candidate, and leader. All nodes initially start as followers. Followers that do not receive a heartbeat within a timeout period become candidates and broadcast a vote request. The node that receives a majority of votes becomes the leader. In this round of voting, whoever sends the request first has the advantage, and each node only gives one vote.
[0066] Optionally, each node in the blockchain network can be a server or a terminal device. A server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Terminal devices can be smartphones, tablets, laptops, desktop computers, smart speakers, smartwatches, smart home devices, in-vehicle terminals, etc., but are not limited to these. Nodes can be directly or indirectly connected via wired or wireless communication, and this application does not impose any restrictions on this.
[0067] The aforementioned cloud computing refers to the delivery and usage model of IT infrastructure, specifically the acquisition of required resources through the network in an on-demand and easily scalable manner. In a broader sense, cloud computing refers to the delivery and usage model of services, namely, the acquisition of required services through the network in an on-demand and easily scalable manner. These services can be IT and software-related, internet-related, or other services. Cloud computing is a product of the convergence and development of traditional computer and network technologies such as grid computing, distributed computing, parallel computing, utility computing, network storage technologies, virtualization, and load balancing. Driven by the development of the internet, real-time data streams, the diversification of connected devices, and the demands of search services, social networks, mobile commerce, and open collaboration, cloud computing has rapidly developed. Unlike previous parallel and distributed computing, the emergence of cloud computing will, conceptually, drive a revolutionary change in the entire internet model and enterprise management model.
[0068] Based on blockchain technology, embodiments of this application propose an architecture for a blockchain system. For example... Figure 2 As shown, the blockchain system includes a ledger node network 2 and a business node network 1. The ledger node network 2 includes ledger nodes 21 that reach consensus on data blocks and record them on the blockchain. The business node network 1 includes business nodes 11, which can verify the data blocks recorded on the blockchain by the ledger nodes or request corresponding transaction data from the ledger nodes.
[0069] Specifically, the verification of data blocks recorded on the blockchain by the accounting nodes by business node 11 may include the following steps: An accounting node 21 in the accounting node network uses a key specific to that accounting node to generate a signature based on the transaction information to be included in a data block to be added to the blockchain; accounting node 21 adds the transaction information and the generated signature to the data block and adds it to the blockchain; accounting node 21 sends the signature to a business node in the business node network, and the business node verifies the signature using its key specific to that accounting node, thereby enabling business node 11 to verify the data blocks recorded on the blockchain by the accounting nodes. The accounting nodes in the accounting node network are responsible for recording data blocks to the blockchain, and the business nodes in the business node network are responsible for witnessing the results of the accounting node recording. Specifically, the accounting node generates a signature based on the transaction information to be included in a data block to be added to the blockchain, then adds the transaction information and the generated signature to the data block and uploads it to the blockchain. The signature is then sent to a business node in the business node network, allowing the business node to verify the signature using its key specific to that accounting node. In the business node network, business nodes can witness the transaction data of the entire network by verifying the signatures of the ledger nodes on the blocks. Although the ledger node network has a monopoly on the right to record transactions, all actions are publicly traceable because the data blocks have digital signatures representing the identities of the ledger recorders. If the ledger nodes collectively commit malicious acts, then all nodes in the business node network will retain evidence of the specific ledger nodes' malicious actions. Compared to traditional centralized systems and private blockchains, the system in this embodiment operates more transparently; and compared to traditional decentralized solutions, this solution is more controllable and easier to supervise.
[0070] In one embodiment of this application, the ledger node network 2 and the business node network 1 can be connected via a proxy node 12. The proxy node 12 can be a business node in the business node network 1, responsible for transmitting information from the ledger node 21 to the business node 11. The business node 11 is the terminal of the transaction party that generates various transaction data that needs to be uploaded to the blockchain, and can also be a terminal that queries transaction data from the ledger node network 2. The transaction data generated by the business node 11 is transmitted to the ledger node 21 through the proxy node 12, and then recorded on the blockchain after consensus. This facilitates the unified processing and supervision of transaction data. The business node 11 can also supervise and witness the on-chain uploading of transaction data through the information sent by the ledger node 21 via the proxy node 12. This is of great significance in scenarios where unified supervision is needed, but there is also a fear of collective cheating by the monitored nodes.
[0071] exist Figure 1 In the structure shown, business node network 1 adopts a P2P (Peer-to-Peer) network model. A P2P network is a distributed application architecture that distributes tasks and workloads among peers. It is a network form or topology of the peer-to-peer computing model at the application layer, i.e., a "point-to-point" or "end-to-end" network. It can be defined as follows: network participants share a portion of their hardware resources (processing power, storage capacity, network connectivity, printers, etc.). These shared resources provide services and content through the network and can be directly accessed by other peer nodes without going through an intermediary entity. Participants in this network are both providers and recipients of resources, services, and content. Therefore, in business node network 1, when agent node 12 receives a message from accounting node 21, it propagates it to surrounding business nodes 11. The surrounding business nodes 11 receive the message and then propagate it to their neighboring business nodes 11, achieving the propagation of the message among all business nodes 11 in business node network 1.
[0072] Figure 3 This illustrates the architecture of another blockchain system used in the embodiments of this application. This architecture is similar to... Figure 2 The difference in the architecture shown is that a P2P network mode is not adopted in business node network 1; instead, a broadcast network mode is used. Specifically, after receiving a message from accounting node 21, agent node 12 broadcasts the message to other business nodes 11 in business node network 1. In this way, the message is also propagated among each business node 11 in business node network 1.
[0073] Figure 4 This illustrates another blockchain system architecture used in embodiments of the present invention. This architecture is similar to... Figure 2 The difference in the illustrated architecture lies in that its ledger node network 2 is divided into multiple branch ledger node networks. Each branch ledger node network is responsible for recording a specific type of transaction information. For example, a company may have supply chain finance business and may need to record contract information, outstanding payments, and other information generated during the supply and sales process on the blockchain. Simultaneously, the company also needs to issue invoices and record invoice information and invoice reimbursement information on the blockchain. In this case, to facilitate the supervision of ledger nodes by the same department, the ledger nodes recording supply chain finance transactions and those recording transactions during the invoice circulation process may belong to different departments. For example, the ledger node recording supply chain finance transactions might be a bank-set ledger terminal, while the ledger node recording transactions during the invoice circulation process might be a tax authority-set ledger terminal. Furthermore, supply chain finance transactions and invoice circulation transactions may ultimately be recorded on different branch ledger node networks. In this case, the agent node 12, based on the transaction type carried in the transaction information sent from the business node 11, sends the transaction information to the branch ledger node network corresponding to that transaction type.
[0074] It should be noted that, in Figures 2 to 4 In the architecture of the blockchain system shown, the proxy node 12 is located in the business node network 1. In other embodiments of this application, the proxy node 12 may also be located in the consensus node network 2, or be independent of the business node network 1 and the consensus node network 2.
[0075] Figures 2 to 6 The architecture of the blockchain system shown can be applied to electronic invoice scenarios, which will be elaborated in detail below:
[0076] In one embodiment of this application, the accounting nodes in the accounting node network can be various State Taxation Administration terminals, for example, the accounting node network can be composed of State Taxation Administration terminals deployed in multiple regions, each serving as an accounting node. The business nodes in the business node network can be local tax bureau terminals, invoicing agent service provider terminals, invoicing enterprise terminals, individual user terminals, etc.
[0077] Specifically, in Figure 5 The electronic invoice system shown can include a business layer, a routing proxy layer, and a consensus network (i.e., an accounting node network, hereinafter referred to as the accounting network) layer. The business layer is the business node network, which contains various business nodes, such as local tax bureaus located in a dedicated tax network; invoicing service providers, reimbursement service providers, and enterprises located in a public cloud; and payment service providers, circulation service providers, and enterprises located in a private cloud.
[0078] The routing proxy layer includes proxy nodes that provide routing services, certificate caching and authentication services, P2P services, and other functions. The routing proxy layer isolates the business layer and the consensus network layer, as detailed in the technical solution of the aforementioned embodiments. Optionally, the proxy nodes in the routing proxy layer can be located within a tax-related private network. The consensus network (ledger network) layer is the ledger node network, which includes multiple blockchains. Of course, in other embodiments of this application, the consensus network (ledger network) layer may also include only one blockchain.
[0079] In one embodiment of this application, the consensus network (ledger network) of the electronic invoice system can include multiple blockchains. These blockchains can be divided into chains according to time sequence, such as chains for the same business transaction, where the business participants are consistent, and both blockchains use the same CA (Certificate Authority) center as the authentication and authorization party for the invoice business system. Of course, in one embodiment of this application, chains can be divided according to different business transactions, such as one blockchain for business A and another for business B, and cross-chain interaction between businesses is also possible.
[0080] Optionally, such as Figure 6 As shown, in one exemplary embodiment, the consensus network (which may be the aforementioned) Figures 2 to 5 The consensus network shown can also be a standalone consensus network (i.e., a consensus network without separating business networks and consensus networks). It can contain multiple blockchains, specifically a main chain 801, and N sub-chains derived from the main chain 801 at a certain block height, where N is a positive integer. Each time a new sub-chain is derived, a new chain identifier needs to be generated for that new sub-chain. For example, in... Figure 6 In this model, main chain 801 can derive sub-chains 802, 803, and 804. Each sub-chain can correspond to a specific business function, such as in the tax business field. This effectively distinguishes different transaction businesses and maintains the exclusivity of the data stored in each business branch chain. Specific businesses could include invoice processing, credit reporting, import and export, enterprise qualification processing, and tax refund processing.
[0081] In one embodiment of this application, the main chain 801 in the consensus network may include registration information for sub-chains corresponding to various services. This registration information may include the sub-chain's chain identifier, service configuration information corresponding to the service, and derivation conditions corresponding to the chain identifier. Optionally, after each sub-chain is generated, it needs to be registered in the main chain. The main chain has a smart contract for managing sub-chain registration. During registration, the main chain can assign a chain identifier to the sub-chain and record its registration information.
[0082] Optionally, the business configuration information corresponding to a business (e.g., a bill transaction) may include basic business information (i.e., a description of the bill transaction) and node configuration information (including business node configuration information and consensus node configuration information). The business node configuration information may include a node identifier configured by a consensus node with regulatory authority (e.g., node 120a with regulatory authority) for the corresponding business branch chain (e.g., the business branch chain corresponding to the bill transaction). The business node corresponding to this node identifier can be used to execute the bill transaction. The consensus node configuration information may include consensus nodes configured by a consensus node with regulatory authority for this sub-chain to participate in the consensus process of that sub-chain.
[0083] Optionally, the genesis block of each subchain can be the block corresponding to the one derived from the main chain, for example... Figure 6 As shown, subchain 802 is derived from block A1 in mainchain 801, and its genesis block is A1; subchain 803 is derived from block A2 in mainchain 801, and its genesis block is A2; subchain 804 is derived from block A3 in mainchain 801, and its genesis block is A3. The mainchain and each subchain can operate independently, and each subchain can process its own transactions. When verifying a subchain block, in addition to verifying the subchain block itself, the genesis block of the subchain can be used to find chain A and then verify the genesis block of chain A (e.g., verifying a Merkle tree) to improve the reliability of the verification. Of course, if the consensus node has already synchronized chain A locally, then the verification of a subchain block can be done by verifying only its genesis block on chain A.
[0084] Optionally, if the configuration information of the blockchain node system (e.g., a tax blockchain system) corresponding to the entire blockchain network changes, the consensus nodes in the consensus network need to suspend operation. If the configuration information that has changed is referred to as configuration change information, then this configuration change information can refer to changes in regulatory rules within the tax field, changes in computing regulations, changes in important blockchain nodes, rotation of certificate issuing nodes, etc. Consensus nodes with regulatory authority in the consensus network can generate configuration change blocks based on this configuration change information, and then upload these configuration change blocks to the main chain 801 of the consensus network, synchronizing them to all sub-chains. At this time, other consensus nodes in the consensus network can resume operation. Figure 6 As shown, assuming the configuration information changes, a configuration change block A3 is generated in the main chain 801, and then it will be synchronized in the sub-chains, such as block B5 in sub-chain 802 and block C4 in sub-chain 803.
[0085] Optionally, for Figures 2 to 5In the system architecture shown, any business node in the business network can be configured with M chain identifiers. These M chain identifiers belong to the chain identifiers of the N business branch chains registered in the consensus network. Here, M is a positive integer less than or equal to N. The number of chain identifiers configured for each business node can be the same or different; this is not limited here.
[0086] For example, if the main chain in the consensus network derives from three sub-chains, and the chain identifiers of these three sub-chains are chain identifier 1s for business 1X (e.g., bill payment business), chain identifier 2s for business 2X (e.g., credit reporting business), and chain identifier 3s for business 3X (e.g., import / export business), then two chain identifiers (e.g., chain identifier 1s and chain identifier 3s) can be dynamically configured for one business node in the business network, and three chain identifiers (e.g., chain identifier 1s, chain identifier 2s, and chain identifier 3s) can be dynamically configured for another business node in the business network. It can be understood that if a business node is configured with multiple chain identifiers, then that business node can participate in executing the business of the sub-chains corresponding to these multiple chain identifiers, thereby effectively ensuring control over the business nodes.
[0087] Alternatively, although different subchains are derived from the main chain, these subchains and the main chain can still be processed by the same consensus nodes to complete the consensus on-chain processing. Transaction information can be distinguished according to the chain identifier, and different subchains can conduct consensus in parallel.
[0088] Of course, some subchains can also be configured to have independent consensus nodes, but these independent consensus nodes must synchronize with the main chain's data. Specifically, for example, consensus nodes that independently reach consensus on a subchain can form a subchain independent consensus network, and consensus nodes that independently reach consensus on the main chain can form a main chain independent consensus network.
[0089] Meanwhile, the proxy node needs to record information about the independent consensus network. If it encounters a request to send transaction information or synchronize data to the independent consensus network, it forwards it to the independent consensus network; otherwise, it checks the request according to the basic configuration and forwards it to the consensus node of the core network. The consensus node then processes the request independently based on the subchain ID.
[0090] Optionally, to reduce the waste of storage space for business nodes, the business nodes in this embodiment can take a lightweight node (Simplified Payment Verification, or SPV) as an example. This business node does not need to store complete transaction data, but obtains block header data and partially authorized visible block data (such as business transactions associated with the business node itself) from the consensus network through a proxy node. An SPV node can dynamically configure multiple subchain IDs to participate in the business of multiple subchains. Multiple subchains can participate using the same SPV node identifier and address. At the same time, the SPV node identifier and address must be registered on the main chain in advance. The block data of each subchain is independently synchronized back to the SPV node and stored independently on the SPV node.
[0091] In response to the multi-chain scenarios described in the foregoing embodiments, this application also proposes a blockchain-based business processing method, which is described in detail below:
[0092] Figure 7 A flowchart illustrating a blockchain-based business processing method according to an embodiment of this application is shown. Other blockchains initiate cross-chain transactions to this blockchain, and nodes in this blockchain execute the method described in this application to respond to the cross-chain transaction. Specifically, the solution of this application can be applied to... Figure 6 The blockchain system shown contains at least two sub-chains. Sub-chain 802 can initiate cross-chain transactions to sub-chain 803, and the solution of this application is to execute the cross-chain transactions initiated by sub-chain 802 by sub-chain 803. Figure 7 The blockchain-based business processing method shown can be executed by the blockchain's consensus nodes, see reference. Figure 7 As shown, this blockchain-based business processing method includes at least steps S910 to S940, which are detailed below:
[0093] Step S910: Receive a transaction notification sent by the relay server, wherein the transaction notification includes cross-chain transaction data from the first blockchain, and the transaction notification is generated by the relay server in response to a transaction request from the first blockchain.
[0094] Specifically, a relay server is typically a network device within the trusted environment of the blockchain, on which services for cross-chain transactions are deployed. During cross-chain transactions, the relay server verifies the state of blocks and data, while the blockchain nodes delegate the verification and tracking processes to the relay server, thereby reducing the amount of data and computation on the blockchain. In this embodiment, the consensus node of the second blockchain receives a transaction notification sent by the relay server. This transaction notification includes cross-chain transaction data from the first blockchain, and is generated by the relay server in response to a transaction request from the first blockchain.
[0095] Step S920: Perform cross-chain data processing based on the cross-chain transaction data in the transaction notification to obtain the data processing result, and package the data processing result and the pre-effective status information of the data processing result to generate a transaction block and upload it to the second blockchain.
[0096] The consensus nodes of the second blockchain process the cross-chain transaction data in the transaction notification, obtain the data processing result, and package the data processing result and its pre-effective state information into a transaction block for posting on the second blockchain. The pre-effective state information indicates that although the data processing result is on the chain, it has not yet been confirmed by the first blockchain and is therefore not yet effective. In subsequent processes, the second blockchain will switch the data processing result to the effective state based on the confirmation of the data processing result by the first blockchain.
[0097] Step S930: Based on the transaction block, send a transaction response to the relay server so that the relay server can generate a transaction completion message based on the transaction response.
[0098] The consensus nodes of the second blockchain send a transaction response to the relay server based on the transaction block. The transaction response triggers the relay server to notify all participating first and second blockchains to complete the cross-chain transaction process.
[0099] In one embodiment of this application, based on the aforementioned scheme, the process of sending a transaction response to a relay server according to a transaction block may include: signing the data processing result in the transaction block to obtain a receipt confirmation signature; generating a transaction response based on the receipt confirmation signature and the data processing result, and sending the transaction response to the relay server.
[0100] Step S940: Receive the transaction completion message sent by the relay server, and package the data processing result and the confirmation information of the data processing result into a receiving result block according to the transaction completion message, and put the receiving result block on the second blockchain.
[0101] The consensus node of the second blockchain receives the transaction completion message sent by the relay server. The transaction completion message is sent by the relay node after both parties involved in the cross-chain transaction have completed their processes, thereby notifying the first and second blockchains to mark the data as effective in their respective blockchains.
[0102] Consensus nodes package the data processing results and confirmation information for the data processing results into a receiving result block based on the transaction completion message, and then upload the receiving result block to the second blockchain. The confirmation information corresponds to the pre-effectiveness status information, indicating that the data processing result in the pre-effectiveness state has officially taken effect. Uploading the receiving result block signifies the formal completion of the cross-chain transaction process on the second blockchain side, and the formal effectiveness of the data processing results in the second blockchain. Therefore, there are two blocks related to the data processing results in the second blockchain: the transaction block represents the pre-effectiveness of the cross-chain transaction data, while the receiving result block represents the formal effectiveness of the cross-chain transaction data. It is understandable that if only a transaction block exists without a corresponding receiving result block, it indicates that the cross-chain transaction failed, and the data processing results in the transaction block will not take effect.
[0103] In one embodiment of this application, based on the aforementioned scheme, the process of receiving a transaction completion message sent by a relay server includes: detecting the time interval from the start of sending a transaction response to receiving a transaction completion message from the relay server. Specifically, the time interval can be implemented by establishing a session or by using a timer. If the time interval exceeds a time threshold, the transaction completion message is discarded; if the time interval is less than the time threshold, the transaction completion message is saved.
[0104] In one embodiment of this application, based on the aforementioned scheme, the transaction completion message includes a relay signature, which is a signature generated by the relay server based on the sending confirmation signature of the first blockchain and the receiving confirmation signature of the second blockchain. The process of uploading the receiving result block to the second blockchain based on the transaction completion message may include: obtaining the relay signature from the transaction completion message; packaging the relay signature to generate a receiving result block; and uploading the receiving result block to the second blockchain.
[0105] In one embodiment of this application, a blockchain-based business processing method is provided, which is used to initiate cross-chain transactions to other blockchains. Specifically, the solution of this application can be applied to... Figure 6 The blockchain system shown contains at least two sub-chains. Sub-chain 802 can initiate cross-chain transactions to sub-chain 803, and the scheme of this application involves sub-chain 802 initiating cross-chain transactions. This blockchain-based business processing method can be executed by the consensus node of the blockchain, and the blockchain-based business processing method includes at least steps S1010 to S1050, detailed below:
[0106] Step S1010: Package the cross-chain transaction data and the pre-effective status information of the cross-chain transaction data into a block to be traded and upload the block to be traded to the first blockchain.
[0107] In this embodiment, the first blockchain initiates a cross-chain transaction to the second blockchain. The consensus node of the first blockchain packages the cross-chain transaction data and its pre-effective status information into a block to be traded and uploads the block to the first blockchain. The pre-effective status information indicates that the cross-chain transaction data has been uploaded but has not yet been confirmed by the second blockchain and is therefore not yet effective. In subsequent processes, the first blockchain will switch the cross-chain transaction data to an effective state based on the confirmation of the cross-chain transaction data by the second blockchain.
[0108] Step S1020: Based on the blockchain information of the block to be traded and the second blockchain, generate a transaction request and send the transaction request to the relay server.
[0109] The consensus nodes of the first blockchain generate transaction requests based on the blockchain information of the block to be traded and the second blockchain, and send these requests to the relay server. Before the transaction is initiated, the relay server registers, allowing the consensus nodes of the first blockchain to obtain relevant information. The consensus nodes then send transaction requests to the relay server to initiate cross-chain transactions with nodes on the second blockchain. The relay server forwards the cross-chain transaction data from the block to be traded and its pre-effectiveness status information to the nodes on the second blockchain, based on the blockchain information of the second blockchain.
[0110] In one embodiment of this application, based on the aforementioned scheme, the first blockchain and the second blockchain are sub-chains derived from blocks of different heights in the main blockchain; the process of generating a transaction request and sending it to the relay server based on the blockchain information of the block to be traded and the second blockchain may include: querying the server information of the relay server and the blockchain information of the second blockchain from the main blockchain; generating a transaction request based on the blockchain information of the second blockchain and the block information of the block to be traded; and sending the transaction request to the relay server based on the server information.
[0111] Step S1030: Receive a transaction result notification sent by the relay server. The transaction result notification is generated based on the data processing results in the second blockchain. The data processing results are obtained by cross-chain data processing based on cross-chain transaction data in the second blockchain.
[0112] The consensus nodes of the first blockchain receive transaction result notifications from the relay server. These notifications are generated by the relay server. The second blockchain processes the cross-chain transaction data to obtain the processing results and sends them back to the relay server. The relay server then generates its own transaction result notification based on this response and sends it to the first blockchain.
[0113] In step S1040, in response to the transaction result notification, a result confirmation message is sent to the relay server so that the relay server generates a transaction completion message based on the result confirmation message.
[0114] In response to the transaction result notification, the consensus nodes of the first blockchain send a result confirmation message to the relay server. The relay server then generates a transaction completion message based on this confirmation message. The confirmation message indicates that the first blockchain acknowledges receiving the data processing result from the second blockchain. The relay server, in turn, determines that the transaction process on the first blockchain has been completed based on this confirmation message.
[0115] In one embodiment of this application, based on the foregoing scheme, the process of sending a result confirmation message to the relay server in response to a transaction result notification includes: in response to the transaction result notification, signing the cross-chain transaction data in the block to be traded to obtain a sending confirmation signature; generating a result confirmation message based on the sending confirmation signature, and sending the result confirmation message to the relay server. The sending confirmation signature indicates that the first blockchain confirms the transaction result.
[0116] In one embodiment of this application, based on the aforementioned scheme, the transaction completion message includes a relay signature, which is a signature generated by the relay server based on the sending confirmation signature of the first blockchain and the result confirmation signature of the second blockchain; the process of uploading the sending result block to the first blockchain includes: obtaining the relay signature from the transaction completion message; packaging the relay signature to generate the sending result block; and uploading the sending result block to the first blockchain.
[0117] Step S1050: Receive the transaction completion message sent by the relay server, and package the cross-chain transaction data and the confirmation and effectiveness information of the cross-chain transaction data into a sending result block according to the transaction completion message, and put the sending result block on the second blockchain.
[0118] The consensus nodes of the first blockchain receive the transaction completion message from the relay server and, based on the message, package the cross-chain transaction data and its confirmation information into a result block. The confirmation information corresponds to the pre-effectiveness status information, indicating that the cross-chain transaction data in the pre-effectiveness state has officially become effective. The upload of the transaction confirmation block to the second blockchain signifies the formal completion of the cross-chain transaction process on the first blockchain side, and the formal effectiveness of the cross-chain transaction data in the first blockchain. Therefore, the second blockchain contains two blocks related to the cross-chain transaction data: a pending transaction block indicating the pre-effectiveness of the cross-chain transaction data, and a transaction confirmation block indicating its formal effectiveness. It's understandable that if only a transaction block exists without a corresponding transaction confirmation block, the cross-chain transaction has failed, and the cross-chain transaction data in the transaction block will not become effective. Subsequently, the consensus nodes of the first blockchain upload the result block to the second blockchain.
[0119] In one embodiment of this application, based on the aforementioned scheme, the process of receiving a transaction completion message sent by a relay server includes the following steps: detecting the time interval between receiving the transaction completion message from the relay server from the sending result confirmation message; if the time interval exceeds a time threshold, discarding the transaction completion message; if the time interval is less than the time threshold, saving the transaction completion message. Here, the time threshold represents the timeout period for this transaction.
[0120] In one embodiment of this application, a blockchain-based business processing method is provided, which provides services for cross-chain transactions between blockchains. Specifically, the solution of this application can be applied to... Figure 6 The blockchain system shown contains at least two sub-chains. Sub-chain 802 can initiate cross-chain transactions to sub-chain 803, which are then executed by a server in a Trusted Execution Environment (TEE) to complete the cross-chain transaction between sub-chain 802 and sub-chain 803. This blockchain-based business processing method includes at least steps S1060 to S1100, detailed below:
[0121] Step S1060: Receive a transaction request sent by the first blockchain, wherein the transaction request includes cross-chain transaction data from the first blockchain and blockchain information from the second blockchain.
[0122] The relay server receives a transaction request from a node in the first blockchain. The transaction request is sent by the node in the first blockchain when or after it uploads cross-chain transaction data to the first blockchain. The transaction request also includes blockchain information from the second blockchain, which is the target of the transaction.
[0123] In one embodiment of this application, based on the foregoing scheme, the business processing method further includes: initiating a transaction session according to a transaction request and monitoring the session duration; updating the transaction session status to an ended state when the session duration exceeds a session duration threshold; and discarding the received message when a message associated with cross-chain transaction data and data processing results is received. Establishing a session provides a communication channel for the cross-chain transaction process, and the duration of the cross-chain transaction is controlled based on the session.
[0124] In step S1070, in response to the transaction request, a transaction notification is generated based on the cross-chain transaction data, and the transaction notification is sent to the second blockchain based on the blockchain information.
[0125] In response to a transaction request, the relay server generates a transaction notification based on the cross-chain transaction data in the request and sends the notification to the second blockchain according to the blockchain information. The transaction notification is used to inform the second blockchain that the first blockchain has initiated a cross-chain transaction request.
[0126] Step S1080: Receive the transaction response sent by the second blockchain, and send a transaction result notification to the first blockchain according to the transaction response. The transaction response includes the data processing result obtained by processing the cross-chain transaction data.
[0127] The relay server receives transaction responses from the second blockchain and, based on these responses, sends transaction result notifications to the first blockchain. A transaction response is issued by a node in the second blockchain after performing cross-chain data processing. The response includes the data processing results obtained from the cross-chain transaction data. The relay server then sends a transaction result notification to the first blockchain, which includes the data processing result. Before sending the notification, the relay server can also perform data verification based on the received transaction requests and responses. This verification includes checking the data status of both parties, the state of blocks in the blockchain, and data consistency—all information related to cross-chain transactions—to ensure the accuracy of the transmitted data.
[0128] Step S1090: Receive a result confirmation message from the first blockchain. The result confirmation message is generated in response to the transaction result notification.
[0129] The relay server receives a result confirmation message from the first blockchain, which is generated in response to the transaction result notification. After receiving the transaction result notification, the nodes of the first blockchain can acquire and store the data in the notification, and respond to the transaction result notification by sending a result confirmation message to confirm receipt of the information from the second blockchain.
[0130] Step S1100: Based on the transaction response and result confirmation messages, generate a transaction completion message and send the transaction completion message to the first blockchain and the second blockchain.
[0131] The relay server generates a transaction completion message based on the transaction response and result confirmation messages. Specifically, based on the transaction response and result confirmation messages, the relay server can confirm that the transaction process in both blockchains has been completed. At this point, the relay server verifies the result of the cross-chain transaction based on the transaction response and result confirmation messages, such as the integrity of the data from both parties and the consistency of the received data with the data in the blockchain. After the verification is successful, a transaction completion message is sent to both the first and second blockchains, thereby triggering the first and second blockchains to end the cross-chain transaction process and marking their respective data as effective in the blockchain.
[0132] In one embodiment of this application, based on the aforementioned scheme, the transaction response includes a result confirmation signature, and the result confirmation message includes a sending confirmation signature. The process of generating a transaction completion message based on the transaction response and the result confirmation message includes: checking the status of the transaction session; if the transaction session is in an active state, updating the transaction session to a completed state and generating a relay result signature based on the transaction request, transaction response, and result confirmation message; and generating a transaction completion message based on the relay result signature. The relay server indicates that transactions between blockchains are proceeding normally by providing signatures, and the transaction results can be verified based on the signatures, which is beneficial for subsequent troubleshooting.
[0133] In one embodiment of this application, based on the aforementioned scheme, the first blockchain and the second blockchain are sub-chains derived from blocks of different heights in the main blockchain. The business processing method further includes: sending a registration request to the main blockchain to generate a registration block based on the registration request, wherein the registration request includes server information of the relay server; receiving a registration response from the main blockchain, and initiating a relay service for receiving transaction requests based on the registration response. The relay server needs to register with the main blockchain before it can provide formal relay services, thereby enabling verification of the relay server's environment and improving system reliability.
[0134] The following combination Figure 8 The implementation details of the technical solutions in the embodiments of this application are described in detail, such as... Figure 8 As shown, the blockchain system includes a main chain 801, a sub-chain 802, a sub-chain 803, and a TEE cross-chain relay service 804 for illustration.
[0135] Before providing services, the TEE cross-chain relay service 804 registers with the main chain 801 as a cross-chain relay. When sub-chain 802 needs to conduct a cross-chain transaction with sub-chain 803, it can query the main chain 801 for a valid TEE cross-chain relay service 804. A valid service can refer to a relay service that has been registered but has not yet provided services to other blockchains. Sub-chain 802 then uploads the cross-chain transaction data and its corresponding pre-effective state information X to block B6 and submits a transaction request PrePutX to the TEE cross-chain relay service 804. At this time, the TEE cross-chain relay service 804 creates a session for this cross-chain transaction. The TEE cross-chain relay service 804 notifies sub-chain 803 of the information in block B6. Upon receiving the notification message, sub-chain 803 performs cross-chain processing, obtains the data processing result and its corresponding pre-effective state information Y, and uploads the corresponding block C7 to its own blockchain. Simultaneously, subchain 803 replies with a transaction confirmation message PrePutY to the TEE cross-chain relay service 804. Upon receiving the transaction confirmation message PrePutY, the TEE cross-chain relay service 804 will notify subchain 802 of the PrePutY information.
[0136] After subchains 802 and 803 obtain each other's transaction request PrePutX and transaction confirmation message PrePutY from the TEE cross-chain relay service 804, they will each confirm and sign the transaction and send it to the TEE cross-chain relay service 804. Upon receiving confirmation from both parties, the TEE cross-chain relay service 804 will set the session state to crossDone.
[0137] Subchains 802 and 803 begin timing after sending the confirmation signature. They continue timing until they receive the session's crossDone message and the signature from the TEE cross-chain relay service 804. Then, they add a new block to their respective blockchains, including the confirmation and activation information corresponding to the pre-activated state information X and Y, as well as the signature from the TEE cross-chain relay service 804. This marks the completion of the cross-chain process, indicated by blocks B7 and C8.
[0138] If the TEE cross-chain relay service 804 times out, the session state will be set to Session Over, and no crossDone message will be issued. If the timeouts of sub-chains 802 and 803 also time out, neither will process the received crossDone messages. At this time, sub-chains 802 and 803 will no longer upload blocks containing the corresponding confirmation information, and the data in previously uploaded blocks containing pre-effective state information will also become invalid.
[0139] It should be noted that although the steps of the method in this application are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0140] In the specific implementation of this application, data such as user information and transaction data in the blockchain are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0141] Figure 9 A block diagram of a blockchain-based business processing apparatus according to an embodiment of this application is shown. Figure 9 The business processing device shown in the diagram can be set up within the consensus node.
[0142] Reference Figure 9 As shown, a blockchain-based business processing device 1100 according to an embodiment of this application includes: a transaction notification receiving module 1102, a cross-chain data processing module 1104, a transaction response sending module 1106, and a first completion message receiving module 1108.
[0143] The system includes a transaction notification receiving module 1102, which receives transaction notifications sent by a relay server. These notifications include cross-chain transaction data from the first blockchain and are generated by the relay server in response to a transaction request from the first blockchain. A cross-chain data processing module 1104 processes the cross-chain transaction data in the notifications to obtain processing results. It then packages the processing results and their pre-effective status information into a transaction block and uploads it to the second blockchain. A transaction response sending module 1106 sends a transaction response to the relay server based on the transaction block, enabling the relay server to generate a transaction completion message. A first completion message receiving module 1108 receives the transaction completion message from the relay server, packages the processing results and their confirmation information into a receiving result block, and uploads the receiving result block to the second blockchain.
[0144] In one embodiment of this application, based on the aforementioned scheme, the transaction response sending module 1106 is configured to: sign the data processing result in the transaction block to obtain a receipt confirmation signature; generate a transaction response based on the receipt confirmation signature and the data processing result, and send the transaction response to the relay server.
[0145] In one embodiment of this application, based on the aforementioned scheme, the transaction completion message includes a relay signature, which is a signature generated by the relay server based on the sending confirmation signature of the first blockchain and the receiving confirmation signature of the second blockchain; the first completion message receiving module 1108 is configured to: obtain the relay signature from the transaction completion message; package the relay signature to generate a receiving result block, and upload the receiving result block to the second blockchain.
[0146] In one embodiment of this application, based on the aforementioned scheme, the first completion message receiving module 1108 is configured to: detect the time interval from the start of sending the transaction response to receiving the transaction completion message from the relay server; if the time interval exceeds a time threshold, discard the transaction completion message; if the time interval is less than the time threshold, save the transaction completion message.
[0147] In one embodiment, the blockchain-based business processing apparatus according to this application includes: a transaction data packaging module, a transaction request sending module, a result notification receiving module, a confirmation message sending module, and a second completion message receiving module.
[0148] The system includes the following modules: a transaction data packaging module, used to package cross-chain transaction data and its pre-effective status information into a block to be traded and upload the block to be traded to the first blockchain; a transaction request sending module, used to generate a transaction request based on the block to be traded and the blockchain information of the second blockchain and send the transaction request to the relay server; a result notification receiving module, used to receive a transaction result notification sent by the relay server, which is generated based on the data processing results in the second blockchain, which are obtained by cross-chain data processing based on the cross-chain transaction data; a confirmation message sending module, used to send a result confirmation message to the relay server in response to the transaction result notification, so that the relay server generates a transaction completion message based on the result confirmation message; and a second completion message receiving module, used to receive the transaction completion message sent by the relay server, and based on the transaction completion message, package the cross-chain transaction data and its confirmation effectiveness information into a sending result block and upload the sending result block to the first blockchain.
[0149] In one embodiment of this application, based on the aforementioned scheme, the confirmation message sending module is configured to: in response to the transaction result notification, sign the cross-chain transaction data in the block to be traded to obtain a sending confirmation signature; generate a result confirmation message based on the sending confirmation signature, and send the result confirmation message to the relay server.
[0150] In one embodiment of this application, based on the aforementioned scheme, the transaction completion message includes a relay signature, which is a signature generated by the relay server based on the sending confirmation signature of the first blockchain and the result confirmation signature of the second blockchain; the second completion message receiving module is configured to: obtain the relay signature from the transaction completion message; package the relay signature to generate a sending result block, and upload the sending result block to the first blockchain.
[0151] In one embodiment of this application, based on the aforementioned scheme, the second completion message receiving module is configured to: detect the time interval when a transaction completion message is received from the relay server from the sending result confirmation message; if the time interval exceeds a time threshold, discard the transaction completion message; if the time interval is less than the time threshold, save the transaction completion message.
[0152] In one embodiment of this application, based on the aforementioned scheme, the first blockchain and the second blockchain are sub-chains derived from blocks of different heights in the main blockchain; the transaction request sending module is configured to: query the server information of the relay server and the blockchain information of the second blockchain from the main blockchain; generate a transaction request based on the blockchain information of the second blockchain and the block information of the block to be traded; and send the transaction request to the relay server based on the server information.
[0153] In one embodiment, the blockchain-based business processing apparatus according to this application includes: a transaction request receiving module, a transaction notification generation module, a transaction response receiving module, a confirmation message receiving module, and a completion message sending module.
[0154] The system includes the following modules: a transaction request receiving module for receiving transaction requests from the first blockchain, wherein the transaction request includes cross-chain transaction data from the first blockchain and blockchain information from the second blockchain; a transaction notification generation module for generating a transaction notification based on the cross-chain transaction data in response to the transaction request, and sending the transaction notification to the second blockchain based on the blockchain information; a transaction response receiving module for receiving transaction responses from the second blockchain, and sending a transaction result notification to the first blockchain based on the transaction response, wherein the transaction response includes data processing results obtained by processing the cross-chain transaction data; a confirmation message receiving module for receiving a result confirmation message from the first blockchain, wherein the result confirmation message is generated in response to the transaction result notification; and a completion message sending module for generating a transaction completion message based on the transaction response and the result confirmation message, and sending the transaction completion message to both the first and second blockchains.
[0155] In one embodiment of this application, based on the foregoing scheme, the blockchain-based business processing device further includes: a session initiation module, used to initiate a transaction session according to a transaction request and monitor the session duration of the transaction session; a status update module, used to update the status of the transaction session to an end state when the session duration exceeds a session duration threshold; and a message discarding module, used to discard the received message when a message associated with cross-chain transaction data and data processing results is received.
[0156] In one embodiment of this application, based on the aforementioned scheme, the transaction response includes a result confirmation signature, and the result confirmation message includes a send confirmation signature; the completion message sending module is configured to: check the status of the transaction session; if the transaction session is in an active state, update the transaction session to a completed state and generate a relay result signature based on the transaction request, transaction response, and result confirmation message; and generate a transaction completion message based on the relay result signature.
[0157] In one embodiment of this application, based on the aforementioned scheme, the first blockchain and the second blockchain are sub-chains derived from blocks of different heights in the main blockchain; the blockchain-based business processing device further includes: a registration request module, used to send a registration request to the main blockchain so that the main blockchain generates a registration block based on the registration request, wherein the registration request includes server information of the relay server; and a relay service initiation module, used to receive the registration response sent by the main blockchain and initiate a relay service for receiving transaction requests based on the registration response.
[0158] It should be noted that the apparatus provided in the above embodiments and the method provided in the above embodiments belong to the same concept, and the specific way in which each module performs the operation has been described in detail in the method embodiments, and will not be repeated here.
[0159] Figure 10 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown.
[0160] It should be noted that, Figure 10 The computer system 1200 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0161] like Figure 10As shown, the computer system 1200 includes a Central Processing Unit (CPU) 1201, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 1202 or programs loaded from storage portion 1208 into Random Access Memory (RAM) 1203. The RAM 1203 also stores various programs and data required for system operation. The CPU 1201, ROM 1202, and RAM 1203 are interconnected via a bus 1204. An Input / Output (I / O) interface 1205 is also connected to the bus 1204.
[0162] The following components are connected to I / O interface 1205: an input section 1206 including a keyboard, mouse, etc.; an output section 1207 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to I / O interface 1205 as needed. Removable media 1211, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1210 as needed so that computer programs read from them can be installed into storage section 1208 as needed.
[0163] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1209, and / or installed from removable medium 1211. When the computer program is executed by central processing unit (CPU) 1201, it performs various functions defined in the system of this application.
[0164] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0165] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0166] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0167] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of this application.
[0168] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
[0169] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A blockchain-based business processing method, characterized in that, include: Receive a transaction notification sent by a relay server, wherein the transaction notification includes cross-chain transaction data from a first blockchain, and the transaction notification is generated by the relay server in response to a transaction request from the first blockchain; Cross-chain data processing is performed based on the cross-chain transaction data in the transaction notification to obtain the data processing result. The data processing result and the pre-effective status information of the data processing result are packaged to generate a transaction block and uploaded to the second blockchain. The pre-effective status information is the effective status to be confirmed. Based on the transaction block, a transaction response is sent to the relay server, so that the relay server generates a transaction completion message based on the transaction response; The system receives a transaction completion message sent by the relay server, and packages the data processing result and the confirmation information of the data processing result into a receiving result block according to the transaction completion message. The receiving result block is then uploaded to the second blockchain. The confirmation information indicates that the data processing result has been confirmed and is in effect. The transaction completion message is generated by the relay server after receiving the result confirmation message from the first blockchain.
2. The method according to claim 1, characterized in that, Sending a transaction response to the relay server based on the transaction block includes: Sign the data processing result in the transaction block to obtain a receipt confirmation signature; The transaction response is generated based on the received confirmation signature and the data processing result, and then sent to the relay server.
3. The method according to claim 2, characterized in that, The transaction completion message includes a relay signature, which is a signature generated by the relay server based on the sending confirmation signature of the first blockchain and the receiving confirmation signature of the second blockchain. The step of linking the received result block in the second blockchain according to the transaction completion message includes: Obtain the relay signature from the transaction completion message; The relay signature is packaged to generate the receiving result block, and the receiving result block is uploaded to the second blockchain.
4. The method according to claim 1, characterized in that, The step of receiving the transaction completion message sent by the relay server includes: The time interval from the start of sending the transaction response to the receipt of the transaction completion message from the relay server is detected; If the time interval exceeds the time threshold, the transaction completion message is discarded. If the time interval is less than the time threshold, then the transaction completion message is saved.
5. A blockchain-based business processing method, characterized in that, include: The cross-chain transaction data and the pre-effective status information of the cross-chain transaction data are packaged into a block to be traded and the block to be traded is uploaded to the first blockchain. The pre-effective status information is the effective status to be confirmed. Based on the blockchain information of the block to be traded and the second blockchain, a transaction request is generated and sent to the relay server; Receive a transaction result notification sent by the relay server. The transaction result notification is generated based on the data processing result in the second blockchain. The data processing result is obtained by the second blockchain performing cross-chain data processing based on the cross-chain transaction data. In response to the transaction result notification, a result confirmation message is sent to the relay server, so that the relay server generates a transaction completion message based on the result confirmation message; The system receives a transaction completion message from the relay server, packages the cross-chain transaction data and the confirmation information of the cross-chain transaction data into a sending result block according to the transaction completion message, and uploads the sending result block to the first blockchain. The confirmation information indicates that the data processing result is in a confirmed and effective state.
6. The method according to claim 5, characterized in that, The step of sending a result confirmation message to the relay server in response to the transaction result notification includes: In response to the transaction result notification, the cross-chain transaction data in the block to be traded is signed to obtain a send confirmation signature; The result confirmation message is generated based on the sent confirmation signature, and then sent to the relay server.
7. The method according to claim 6, characterized in that, The transaction completion message includes a relay signature, which is a signature generated by the relay server based on the sending confirmation signature of the first blockchain and the result confirmation signature of the second blockchain. The step of uploading the sending result block to the first blockchain includes: Obtain the relay signature from the transaction completion message; The relay signature is packaged to generate the sending result block, and the sending result block is uploaded to the first blockchain.
8. The method according to claim 5, characterized in that, The step of receiving the transaction completion message sent by the relay server includes: The time interval from when the result confirmation message is sent to when the transaction completion message is received from the relay server is detected; If the time interval exceeds the time threshold, the transaction completion message is discarded. If the time interval is less than the time threshold, then the transaction completion message is saved.
9. The method according to claim 5, characterized in that, The first blockchain and the second blockchain are sub-chains derived from blocks of different heights in the main blockchain; The step of generating a transaction request and sending it to the relay server based on the blockchain information of the block to be traded and the second blockchain includes: Query the server information of the relay server and the blockchain information of the second blockchain from the main blockchain; The transaction request is generated based on the blockchain information of the second blockchain and the block information of the block to be traded; Based on the server information, the transaction request is sent to the relay server.
10. A blockchain-based business processing method, characterized in that, include: Receive a transaction request sent by a first blockchain, wherein the transaction request includes cross-chain transaction data from the first blockchain and blockchain information from a second blockchain; In response to the transaction request, a transaction notification is generated based on the cross-chain transaction data, and the transaction notification is sent to the second blockchain based on the blockchain information, so that the second blockchain performs cross-chain data processing based on the cross-chain transaction data in the transaction notification, obtains the data processing result, and packages the data processing result and the pre-effective status information of the data processing result to generate a transaction block and upload it to the second blockchain. The pre-effective status information is the effective status to be confirmed. Receive a transaction response sent by the second blockchain, and send a transaction result notification to the first blockchain based on the transaction response, wherein the transaction response includes a data processing result obtained by processing the cross-chain transaction data; Receive a result confirmation message from the first blockchain, the result confirmation message being generated in response to the transaction result notification; Based on the transaction response and the result confirmation message, a transaction completion message is generated and sent to the first blockchain and the second blockchain. This allows the second blockchain to package the data processing result and the confirmation information of the data processing result into a receiving result block based on the transaction completion message, and to upload the receiving result block to the second blockchain. The confirmation information indicates that the data processing result has been confirmed and is in a valid state. The transaction completion message is generated by the relay server after receiving the result confirmation message from the first blockchain.
11. The method according to claim 10, characterized in that, After receiving the transaction request sent by the first blockchain, the method further includes: Based on the transaction request, initiate a transaction session and monitor the session duration of the transaction session; When the session duration exceeds the session duration threshold, the status of the transaction session will be updated to the end status. When a message associated with the cross-chain transaction data and the data processing result is received, the received message is discarded.
12. The method according to claim 11, characterized in that, The transaction response includes a result confirmation signature, and the result confirmation message includes a send confirmation signature; generating a transaction completion message based on the transaction response and the result confirmation message includes: Check the status of the transaction session; If the transaction session is active, the transaction session is updated to complete and a relay result signature is generated based on the transaction request, the transaction response, and the result confirmation message. A transaction completion message is generated based on the relay result signature.
13. The method according to claim 10, characterized in that, The first blockchain and the second blockchain are sub-chains derived from blocks of different heights in the main blockchain; the method further includes: A registration request is sent to the main blockchain so that the main blockchain generates a registration block based on the registration request, wherein the registration request includes server information of the relay server; Receive the registration response sent by the main blockchain, and start a relay service to receive the transaction request based on the registration response.
14. A blockchain-based business processing device, characterized in that, include: A transaction notification receiving module is used to receive transaction notifications sent by a relay server, wherein the transaction notification includes cross-chain transaction data from a first blockchain, and the transaction notification is generated by the relay server in response to a transaction request from the first blockchain. The cross-chain data processing module is used to perform cross-chain data processing based on the cross-chain transaction data in the transaction notification, obtain the data processing result, and package the data processing result and the pre-effective status information of the data processing result to generate a transaction block and upload it on the second blockchain. The pre-effective status information is the effective status to be confirmed. The transaction response sending module is used to send a transaction response to the relay server according to the transaction block, so that the relay server generates a transaction completion message according to the transaction response; The first completion message receiving module is used to receive the transaction completion message sent by the relay server, and package the data processing result and the confirmation and effectiveness information of the data processing result into a receiving result block according to the transaction completion message, and put the receiving result block on the second blockchain. The confirmation and effectiveness information indicates that the data processing result has been confirmed and effective, and the transaction completion message is generated by the relay server after receiving the result confirmation message from the first blockchain.
15. A blockchain-based business processing device, characterized in that, include: The transaction data packaging module is used to package cross-chain transaction data and the pre-effective status information of the cross-chain transaction data into a block to be traded and to put the block to be traded on the first blockchain. The pre-effective status information is the effective status to be confirmed. The transaction request sending module is used to generate a transaction request and send it to the relay server based on the blockchain information of the block to be traded and the second blockchain. The result notification receiving module is used to receive the transaction result notification sent by the relay server. The transaction result notification is generated based on the data processing result in the second blockchain. The data processing result is obtained by the second blockchain performing cross-chain data processing based on the cross-chain transaction data. The confirmation message sending module is used to send a result confirmation message to the relay server in response to the transaction result notification, so that the relay server generates a transaction completion message based on the result confirmation message; The second completion message receiving module is used to receive the transaction completion message sent by the relay server, and package the cross-chain transaction data and the confirmation and effectiveness information of the cross-chain transaction data into a sending result block according to the transaction completion message, and put the sending result block on the first blockchain. The confirmation and effectiveness information indicates that the data processing result is confirmed and effective.
16. A blockchain-based business processing device, characterized in that, include: A transaction request receiving module is used to receive a transaction request sent by a first blockchain, wherein the transaction request includes cross-chain transaction data from the first blockchain and blockchain information from a second blockchain; The transaction notification generation module is used to respond to the transaction request, generate a transaction notification based on the cross-chain transaction data, and send the transaction notification to the second blockchain based on the blockchain information, so that the second blockchain performs cross-chain data processing based on the cross-chain transaction data in the transaction notification, obtains the data processing result, and packages the data processing result and the pre-effective status information of the data processing result to generate a transaction block and upload it to the second blockchain. The pre-effective status information is the effective status to be confirmed. A transaction response receiving module is used to receive a transaction response sent by the second blockchain and send a transaction result notification to the first blockchain according to the transaction response, wherein the transaction response includes a data processing result obtained by processing the cross-chain transaction data; A confirmation message receiving module is configured to receive a result confirmation message from the first blockchain, wherein the result confirmation message is generated in response to the transaction result notification; The message sending module is configured to generate a transaction completion message based on the transaction response and the result confirmation message, and send the transaction completion message to the first blockchain and the second blockchain. This allows the second blockchain to package the data processing result and the confirmation information of the data processing result into a receiving result block based on the transaction completion message, and to upload the receiving result block to the second blockchain. The confirmation information indicates that the data processing result is in a confirmed and effective state, and the transaction completion message is generated by the relay server after receiving the result confirmation message from the first blockchain.
17. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the blockchain-based business processing method as described in any one of claims 1 to 13.
18. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the electronic device to implement the blockchain-based business processing method as described in any one of claims 1 to 13.
19. A computer program product, characterized in that, The computer program product includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads and executes the computer instructions from the computer-readable storage medium, causing the computer device to perform the blockchain-based business processing method as described in any one of claims 1 to 13.
Citation Information
Patent Citations
A method and apparatus for cross-chain transaction
CN109214818A
Cross-chain transaction processing method and device, electronic equipment and storage medium
CN112235423A