Business processing method, apparatus and device based on a blockchain system and readable medium
By conducting cross-chain data transactions through transaction gateways between blockchains, the problem of high complexity in cross-chain blockchain transactions is solved, enabling a more efficient transaction process.
Patent Information
- Application Number
- CN202111438291.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-29
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2041-11-29
AI Technical Summary
In cross-chain blockchain transactions, existing technologies require the deployment of relay protocols in the blockchains of both participating parties, which increases the complexity of the transaction process and reduces execution efficiency.
Cross-chain data transactions can be conducted between two blockchains through a transaction gateway, avoiding the need to deploy a relay chain transaction protocol within the blockchain, and allowing data processing and transmission to take place directly within the transaction blockchain.
It reduces the complexity of the transaction process and improves the efficiency of transaction execution.
Smart Images

Figure CN116186750B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a business processing method, apparatus, device, and readable medium based on a blockchain system. 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 business processing method, apparatus, device, and readable medium based on a blockchain system, enabling cross-chain data transactions between two blockchains via a transaction gateway. 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 business processing method based on a blockchain system is provided. The blockchain system includes a first blockchain, a second blockchain, a first transaction gateway corresponding to the first blockchain, and a second transaction gateway corresponding to the second blockchain. The business processing method includes:
[0008] Receive cross-chain transaction data sent by the first transaction gateway, wherein the cross-chain transaction data is data in a designated block of the first blockchain that needs to be transacted, which is monitored by the first transaction gateway;
[0009] Cross-chain data processing is performed on the cross-chain transaction data to obtain the data processing results;
[0010] The data processing results are packaged into transaction blocks, and the transaction blocks are uploaded to the second blockchain to trigger the second transaction gateway to retrieve the data processing results from the second blockchain and forward the data processing results to the first blockchain.
[0011] According to one aspect of the embodiments of this application, a business processing method based on a blockchain system is provided. The blockchain system includes a first blockchain, a second blockchain, a first transaction gateway corresponding to the first blockchain, and a second transaction gateway corresponding to the second blockchain. The business processing method includes:
[0012] The cross-chain transaction data and the pre-effective status information of the cross-chain transaction data are packaged to generate a block to be traded, and the block to be traded is uploaded to the first blockchain to trigger the first transaction gateway to obtain the cross-chain transaction data from the first blockchain and forward the cross-chain transaction data to the second blockchain. The cross-chain transaction data is the data that needs to be traded across chains.
[0013] The system receives data processing results sent by the second transaction gateway. The data processing results come from the second blockchain and are obtained by the second blockchain through cross-chain data processing based on the cross-chain transaction data. The data processing results are forwarded to the first blockchain by the second transaction gateway after it has listened to the data processing results.
[0014] In response to the data processing result, the cross-chain transaction data and the confirmation information of the cross-chain transaction data are packaged into a transaction confirmation block and the transaction confirmation block is uploaded to the first blockchain.
[0015] According to one aspect of the embodiments of this application, a business processing method based on a blockchain system is provided. The blockchain system includes a first blockchain, a second blockchain, a first transaction gateway corresponding to the first blockchain, and a second transaction gateway corresponding to the second blockchain. The business processing method includes:
[0016] Detect the pending transaction blocks in the first blockchain that include cross-chain transaction data;
[0017] When the block to be traded is detected to be uploaded to the first blockchain, the blockchain information of the second blockchain and the cross-chain transaction data in the block to be traded are obtained according to the registration information of the second transaction gateway.
[0018] The cross-chain transaction data is sent to the second blockchain based on the blockchain information of the second blockchain.
[0019] According to one aspect of the embodiments of this application, a business processing method based on a blockchain system is provided. The blockchain system includes a first blockchain, a second blockchain, a first transaction gateway corresponding to the first blockchain, and a second transaction gateway corresponding to the second blockchain. The business processing method includes:
[0020] The transaction blocks in the second blockchain that include data processing results are detected, wherein the data processing results are obtained by the second blockchain through cross-chain data processing based on cross-chain transaction data from the first blockchain;
[0021] When the transaction block is detected to be on the second blockchain, the blockchain information of the first blockchain and the data processing result of the transaction block are obtained according to the registration information of the first transaction gateway.
[0022] The data processing result is sent to the first blockchain based on the blockchain information of the first blockchain.
[0023] According to one aspect of the embodiments of this application, a business processing apparatus based on a blockchain system is provided. The blockchain system includes a first blockchain, a second blockchain, a first transaction gateway corresponding to the first blockchain, and a second transaction gateway corresponding to the second blockchain. The business processing apparatus based on the blockchain system includes: a cross-chain transaction data receiving module, a cross-chain data processing module, and a transaction block packaging module.
[0024] The system includes a cross-chain transaction data receiving module, which receives cross-chain transaction data sent by the first transaction gateway. This cross-chain transaction data is data from a designated block of the first blockchain that requires cross-chain transactions, as monitored by the first transaction gateway. The cross-chain data processing module is used to process the cross-chain transaction data to obtain the processing results. The transaction block packaging module is used to package the processing results into transaction blocks and upload the transaction blocks to the second blockchain, thereby triggering the second transaction gateway to retrieve the processing results from the second blockchain and forward them to the first blockchain.
[0025] In one embodiment of this application, based on the aforementioned method, the blockchain system further includes a main blockchain, and the first and second blockchains are sub-chains derived from blocks of different heights in the main blockchain; the business processing device further includes:
[0026] The first registration information acquisition module is used to obtain the registration information of the first transaction gateway from the main blockchain;
[0027] The first information sending module is used to send blockchain information of the first blockchain to the first transaction gateway according to the registration information of the first transaction gateway, so that the first transaction gateway can listen to the data in the first blockchain that needs to be transacted across chains.
[0028] In one embodiment of this application, based on the foregoing method, the service processing apparatus 1100 further includes:
[0029] The first idle gateway acquisition module is used to determine the idle gateway from the available gateways. The idle gateway is the gateway that is not listening to the blockchain in the blockchain system.
[0030] The first gateway determination module is used to select an idle gateway as the first transaction gateway.
[0031] This application also provides a business processing device based on a blockchain system. The blockchain system includes a first blockchain, a second blockchain, a first transaction gateway corresponding to the first blockchain, and a second transaction gateway corresponding to the second blockchain. The business processing device includes: a pre-effective packaging module, a data processing result receiving module, and a confirmation effective packaging module.
[0032] The pre-effective packaging module is used to package cross-chain transaction data and the pre-effective status information of cross-chain transaction data to generate a block to be traded, and put the block to be traded on the first blockchain to trigger the first transaction gateway to obtain cross-chain transaction data from the first blockchain and forward the cross-chain transaction data to the second blockchain. The cross-chain transaction data is the data that needs to be traded across chains.
[0033] The data processing result receiving module is used to receive the data processing result sent by the second transaction gateway. The data processing result comes from the second blockchain and is obtained by the second blockchain through cross-chain data processing based on cross-chain transaction data. The data processing result is forwarded to the first blockchain by the second transaction gateway after it listens to the data processing result.
[0034] The confirmation and effective packaging module is used to package cross-chain transaction data and cross-chain transaction data confirmation and effective information into a transaction confirmation block in response to the data processing results, and to put the transaction confirmation block on the first blockchain.
[0035] In one embodiment of this application, based on the aforementioned method, the blockchain system further includes a main blockchain, and the first and second blockchains are sub-chains derived from blocks of different heights in the main blockchain; the business processing device further includes:
[0036] The second registration information acquisition module is used to acquire blockchain information of the second blockchain and acquire registration information of the second transaction gateway from the main blockchain;
[0037] The second information sending module is used to send blockchain information of the second blockchain to the second transaction gateway according to the registration information of the second transaction gateway, so that the second transaction gateway can listen to the block on-chain operation of the transaction block in the second blockchain.
[0038] In one embodiment of this application, based on the aforementioned method, the second registration information acquisition module is configured to: determine an idle gateway from the available gateways, wherein the idle gateway is a gateway that does not listen to the blockchain in the blockchain system; and use the idle gateway as the second transaction gateway.
[0039] This application also provides a business processing device based on a blockchain system. The blockchain system includes a first blockchain, a second blockchain, a first transaction gateway corresponding to the first blockchain, and a second transaction gateway corresponding to the second blockchain. The business processing device includes: a first block detection module, a cross-chain transaction data acquisition module, and a cross-chain transaction data sending module.
[0040] The first block detection module is used to detect blocks in the first blockchain that contain cross-chain transaction data; the cross-chain transaction data acquisition module is used to acquire the blockchain information of the second blockchain and the cross-chain transaction data in the block to be traded based on the registration information of the second transaction gateway when a block to be traded is detected to be on the first blockchain; and the cross-chain transaction data sending module is used to send cross-chain transaction data to the second blockchain based on the blockchain information of the second blockchain.
[0041] In one embodiment of this application, based on the foregoing method, the service processing apparatus further includes:
[0042] The first blockchain information receiving module is used to receive blockchain information from the first blockchain sent by the second blockchain;
[0043] The first gateway selection module is used to determine any available idle gateway as the second transaction gateway. An idle gateway is a gateway that is not listening to the blockchain in the blockchain system.
[0044] The first listening module is used to listen to the block on-chain operation of the block to be traded in the first blockchain through the second transaction gateway, based on the blockchain information of the first blockchain.
[0045] In one embodiment of this application, based on the foregoing method, the service processing apparatus further includes:
[0046] The first registration request sending module is used to send a first transaction gateway registration request to the main blockchain. The first transaction gateway registration request includes the registration information of the second transaction gateway.
[0047] The first registration response receiving module is used to receive the first transaction gateway registration response and start the gateway service of the second transaction gateway according to the first transaction gateway registration response. The second gateway registration response includes the registration result information in the gateway registration block of the main blockchain. The gateway registration block is a block that is added to the main blockchain according to the first transaction gateway registration request.
[0048] This application also provides a business processing device based on a blockchain system. The blockchain system includes a first blockchain, a second blockchain, a first transaction gateway corresponding to the first blockchain, and a second transaction gateway corresponding to the second blockchain. The business processing device includes: a second block detection module, a data processing result acquisition module, and a data processing result sending module.
[0049] The second block detection module is used to detect transaction blocks in the second blockchain that include data processing results, wherein the data processing results are obtained by the second blockchain through cross-chain data processing based on cross-chain transaction data from the first blockchain; the data processing result acquisition module is used to acquire the blockchain information of the first blockchain and the data processing results of the transaction block based on the registration information of the first transaction gateway when a transaction block is detected on the second blockchain; the data processing result sending module is used to send the data processing results to the first blockchain based on the blockchain information of the first blockchain.
[0050] In one embodiment of this application, based on the foregoing method, the service processing apparatus further includes:
[0051] The second blockchain information receiving module is used to receive blockchain information of the second blockchain sent by the first block;
[0052] The second gateway selection module is used to determine any available idle gateway as the first transaction gateway. An idle gateway is a gateway that is not listening to the blockchain in the blockchain system.
[0053] The second monitoring module is used to monitor the block on-chain operations of transaction blocks in the second blockchain through the first transaction gateway, based on the blockchain information of the second blockchain.
[0054] In one embodiment of this application, based on the aforementioned method, the first blockchain and the second blockchain are sub-chains derived from blocks of different heights in the main blockchain; the business processing apparatus further includes:
[0055] The second registration request sending module is used to send a second gateway registration request to the main blockchain. The second gateway registration request includes the registration information of the first transaction gateway.
[0056] The second registration response receiving module is used to receive the second gateway registration response and start the gateway service of the first transaction gateway according to the second gateway registration response. The first transaction gateway registration response includes the registration result information in the gateway registration block of the main blockchain. The gateway registration block is a block that is added to the main blockchain according to the second gateway registration request.
[0057] 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 the business processing method based on the blockchain system as described above by executing the executable instructions.
[0058] 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 business processing method based on a blockchain system as described above.
[0059] 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 business processing method based on a blockchain system provided in the various optional implementations described above.
[0060] In the embodiments of this application, the blockchain system includes a first blockchain, a second blockchain, a first transaction gateway corresponding to the first blockchain, and a second transaction gateway corresponding to the second blockchain. The consensus nodes of the blockchains receive cross-chain transaction data sent by the first transaction gateway. This cross-chain transaction data is data from a designated block of the first blockchain that requires cross-chain transactions, which the first transaction gateway listens to. The first transaction gateway then performs cross-chain data processing based on the cross-chain transaction data to obtain the processing result. The processing result is then packaged into a transaction block and uploaded to the second blockchain to trigger the second transaction gateway to retrieve the processing result from the second blockchain and forward it to the first blockchain. Through this method, cross-chain data transactions are conducted between the two blockchains via transaction gateways. This eliminates the need to deploy a relay chain transaction protocol within the blockchains and avoids additional blockchain operations, reducing the complexity of the transaction process and improving its execution efficiency.
[0061] 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
[0062] 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.
[0063] In the attached diagram:
[0064] Figure 1 A schematic diagram of the blockchain network structure is shown.
[0065] Figures 2 to 4 The diagram shows the architecture of the blockchain system used in the embodiments of this application.
[0066] Figure 5 A schematic diagram of an electronic invoice system according to an embodiment of this application is shown.
[0067] Figure 6 A schematic diagram of a multi-chain scenario according to an embodiment of this application is shown.
[0068] Figure 7 A flowchart of a business processing method based on a blockchain system according to an embodiment of this application is shown;
[0069] Figure 8 A schematic diagram illustrating cross-chain transactions between sub-chains according to an embodiment of this application is shown;
[0070] Figure 9 A block diagram of a business processing apparatus based on a blockchain system according to an embodiment of this application is shown;
[0071] 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
[0072] 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.
[0073] 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.
[0074] 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.
[0075] 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.
[0076] 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.
[0077] 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.
[0078] 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.
[0079] 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.
[0080] 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.
[0081] 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.
[0082] 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) refers to a measurement method used by a system (such as the aforementioned blockchain network system) to achieve a specific goal.
[0083] PoS (Proof of Stake): Proof of Stake is an upgraded consensus mechanism of Proof of Work (PoW). Specifically, the longer someone holds electronic resources (holding time = number of electronic resources * holding time), the more likely they are to obtain the right to record blocks. DPoS (Delegated Proof of Stake): The DPoS mechanism is similar to a board of directors vote. Those holding electronic resources vote to select a certain number of nodes to act as proxies for verification and record-keeping. PBFT (Practical Byzantine Fault Tolerance): PBFT is a message-passing-based consensus algorithm that reaches consensus through three phases, which may be repeated if failures occur. Paxos (a distributed algorithm): Paxos is a two-phase algorithm with three main roles: proposer, acceptor, and learner. The proposer proposes a proposal, the acceptor agrees or rejects, and the learner obtains the final value after consensus is reached. The Raft algorithm (a distributed consensus algorithm) consists of three roles: follower, candidate, and leader. All nodes 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 voting process, whoever sends the request first gains the advantage, and each node only gives one vote.
[0084] 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.
[0085] 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 developed rapidly. 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.
[0086] 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.
[0087] 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.
[0088] 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.
[0089] exist Figure 1In 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.
[0090] 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.
[0091] Figure 4 This illustrates another blockchain system architecture used in embodiments of the present invention. This architecture is similar to... Figure 2The 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.
[0092] 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.
[0093] 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:
[0094] 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.
[0095] 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.
[0096] 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.
[0097] 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.
[0098] 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.
[0099] 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.
[0100] 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.
[0101] 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.
[0102] 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.
[0103] 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.
[0104] 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.
[0105] 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.
[0106] 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.
[0107] 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.
[0108] 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.
[0109] In response to the multi-chain scenarios described in the foregoing embodiments, this application also proposes a business processing method based on a blockchain system, which is described in detail below:
[0110] Figure 7 A flowchart illustrating a business processing method based on a blockchain system according to an embodiment of this application is provided. 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 business processing method based on the blockchain system shown can be executed by the consensus nodes of the blockchain. This blockchain system includes a first blockchain, a second blockchain, a first transaction gateway corresponding to the first blockchain, and a second transaction gateway corresponding to the second blockchain. Specifically, refer to... Figure 7 As shown, the business processing method based on the blockchain system includes at least steps S910 to S930, which are described in detail below:
[0111] Step S910 receives cross-chain transaction data sent by the first transaction gateway. The cross-chain transaction data is the data in the designated block of the first blockchain that needs to be transacted, which is monitored by the first transaction gateway.
[0112] The method in this embodiment is specifically executed by the consensus node of the second blockchain in the blockchain system to perform cross-chain transactions initiated by the first blockchain. When the first transaction gateway detects that a block has been uploaded to the first blockchain and that the block includes cross-chain transaction data, it sends the cross-chain transaction data to the consensus node of the second blockchain. The consensus node of the second blockchain receives the cross-chain transaction data sent by the first transaction gateway.
[0113] In one embodiment of this application, the blockchain system further includes a main blockchain, and the first blockchain and the second blockchain are sub-chains derived from blocks of different heights in the main blockchain; before receiving cross-chain transaction data sent by the first transaction gateway, the business processing method further includes: obtaining the registration information of the first transaction gateway from the main blockchain, and sending the blockchain information of the first blockchain to the first transaction gateway according to the registration information of the first transaction gateway, so that the first transaction gateway can listen to the data in the first blockchain that needs to be transacted across chains.
[0114] In one embodiment of this application, before obtaining the registration information of the first transaction gateway from the main blockchain, the business processing method further includes: determining an idle gateway from the available gateways, wherein the idle gateway is a gateway that is not listening to the blockchain in the blockchain system; and designating the idle gateway as the first transaction gateway. Specifically, the gateway registers with the main chain and becomes an idle gateway after registration. The sub-chain can query the idle gateway from the main chain and register the idle gateway as its transaction gateway. The registration result is notified to the main chain and recorded in the main chain.
[0115] Step S920: Perform cross-chain data processing based on the cross-chain transaction data to obtain the data processing result.
[0116] The consensus nodes of the second blockchain perform cross-chain data processing based on the cross-chain transaction data to obtain the data processing results. The cross-chain data processing can depend on the content of the cross-chain transaction data. For example, if the cross-chain transaction data is query data, then the cross-chain data processing can be to perform a data query based on the cross-chain transaction data.
[0117] Step S930: Package the data processing results into transaction blocks and upload the transaction blocks to the second blockchain to trigger the second transaction gateway to retrieve the data processing results from the second blockchain and forward the data processing results to the first blockchain.
[0118] The consensus nodes of the second blockchain package the data processing results into transaction blocks, and then upload the transaction blocks to the second blockchain. The second transaction gateway listens for the blocks uploaded to the second blockchain. When a transaction block is uploaded to the second blockchain, it triggers the second transaction gateway to retrieve the data processing results from the second blockchain and forward the data processing results to the first blockchain.
[0119] By using the above method, cross-chain data transactions can be conducted between two blockchains through a transaction gateway. This eliminates the need to deploy a relay chain transaction protocol in the blockchain or perform additional blockchain operations, thereby reducing the complexity of the transaction process and improving its execution efficiency.
[0120] This application also provides a business processing method based on a blockchain system, through which consensus nodes in the blockchain can initiate cross-chain transaction requests to other blockchains in the blockchain system. The blockchain system includes a first blockchain, a second blockchain, a first transaction gateway corresponding to the first blockchain, and a second transaction gateway corresponding to the second blockchain. The business processing method includes at least steps S1010 to S1030, detailed below:
[0121] Step S1010: Package the cross-chain transaction data and the pre-effective status information of the cross-chain transaction data to generate a block to be traded, and put the block to be traded on the first blockchain to trigger the first transaction gateway to obtain the cross-chain transaction data from the first blockchain and forward the cross-chain transaction data to the second blockchain. The cross-chain transaction data is the data that needs to be traded across chains.
[0122] The method in this embodiment is specifically executed by the consensus node of the first blockchain in the blockchain system to initiate 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 to generate a block to be traded, and uploads the block to the first blockchain. After the first transaction gateway detects that a block has been uploaded to the first blockchain, and that the block includes cross-chain transaction data and its pre-effective status information, it retrieves the cross-chain transaction data from the first blockchain and sends it to the consensus node of the second blockchain. The pre-effective status information indicates that the cross-chain transaction data has been uploaded but has not yet been confirmed by the first blockchain and is therefore not yet effective. In subsequent processes, the second blockchain will switch the cross-chain transaction data to an effective state based on the confirmation of the data processing result by the first blockchain.
[0123] In one embodiment of this application, the blockchain system further includes a main blockchain, and the first blockchain and the second blockchain are sub-chains derived from blocks of different heights in the main blockchain; before packaging cross-chain transaction data and pre-effective status information of cross-chain transaction data to generate a block to be traded, and before putting the block to be traded on the first blockchain, the business processing method further includes: obtaining the blockchain information of the second blockchain and obtaining the registration information of the second transaction gateway from the main blockchain; and sending the blockchain information of the second blockchain to the second transaction gateway according to the registration information of the second transaction gateway, so that the second transaction gateway can listen to the block on-chain operation of the transaction block in the second blockchain.
[0124] In one embodiment of this application, the process of obtaining the registration information of a transaction gateway from the main blockchain may include: identifying an idle gateway from the available gateways, wherein the idle gateway is a gateway that is not listening to the blockchain in the blockchain system; and using the idle gateway as a second transaction gateway.
[0125] Step S1020: Receive the data processing result sent by the second transaction gateway. The data processing result comes from the second blockchain and is obtained by the second blockchain through cross-chain data processing based on cross-chain transaction data. The data processing result is forwarded to the first blockchain by the second transaction gateway after listening to the data processing result.
[0126] The consensus nodes of the first blockchain receive the data processing results sent by the second transaction gateway. These results originate from the second blockchain and are obtained through cross-chain data processing based on the cross-chain transaction data. The second transaction gateway listens to the data processing results and then forwards them to the first blockchain.
[0127] Step S1030: In response to the data processing result, the cross-chain transaction data and the confirmation and effectiveness information of the cross-chain transaction data are packaged into a transaction confirmation block and the transaction confirmation block is uploaded to the first blockchain.
[0128] In response to the data processing results, the consensus nodes of the first blockchain package the cross-chain transaction data and its confirmation information into a transaction confirmation block and upload it to the first blockchain. 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. Uploading the transaction confirmation block signifies the formal completion of the cross-chain transaction process on the first blockchain side, and the cross-chain transaction data in the first blockchain officially becomes effective. Therefore, there are two blocks related to cross-chain transaction data in the first blockchain: the pending transaction block indicates the cross-chain transaction data is pre-effective, while the transaction confirmation block indicates the cross-chain transaction data has officially become effective. It is 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.
[0129] This application also provides a business processing method based on a blockchain system. A transaction gateway in the blockchain system can use this method to listen to cross-chain transactions initiated by the blockchain and to acquire and forward information to support the execution of cross-chain transactions. The blockchain system includes a first blockchain, a second blockchain, a first transaction gateway corresponding to the first blockchain, and a second transaction gateway corresponding to the second blockchain. This business processing method includes at least steps S1040 to S1060, detailed below:
[0130] Step S1040: Detect the blocks in the first blockchain that contain cross-chain transaction data.
[0131] The method in this embodiment is executed by a second transaction gateway in the blockchain transaction system. Specifically, the second transaction gateway listens for the block uploading operation of the first blockchain in response to the request of the second blockchain, thereby detecting pending blocks in the first blockchain that include cross-chain transaction data.
[0132] In one embodiment of this application, based on the aforementioned method, before detecting the block to be traded in the first blockchain that includes cross-chain transaction data, the business processing method further includes: receiving blockchain information of the first blockchain sent by the second blockchain; determining any idle gateway among the available gateways as the second transaction gateway, wherein the idle gateway is a gateway that is not listening to the blockchain in the blockchain system; and listening to the block on-chain operation of the block to be traded in the first blockchain through the second transaction gateway according to the blockchain information of the first blockchain.
[0133] In one embodiment of this application, based on the aforementioned method, 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 first transaction gateway registration request to the main blockchain, the first transaction gateway registration request including registration information of the second transaction gateway; receiving a first transaction gateway registration response, and starting the gateway service of the second transaction gateway according to the first transaction gateway registration response, wherein the second gateway registration response includes registration result information in the gateway registration block of the main blockchain, and the gateway registration block is a block uploaded to the main blockchain according to the first transaction gateway registration request.
[0134] Step S1050: When a block to be traded is detected to be uploaded to the first blockchain, the blockchain information of the second blockchain and the cross-chain transaction data in the block to be traded are obtained according to the registration information of the second transaction gateway.
[0135] When the second transaction gateway detects a block to be traded being added to the first blockchain, it obtains the blockchain information of the second blockchain and the cross-chain transaction data in the block to be traded, based on the second transaction gateway's registration information. The registration information of the second transaction gateway includes the blockchain information of the second blockchain sent by the first blockchain, such as the chain identifier of the second blockchain, and it uses this information to monitor the operations of the first blockchain.
[0136] Step S1060: Send cross-chain transaction data to the second blockchain based on the blockchain information of the second blockchain.
[0137] This application also provides a business processing method based on a blockchain system. A transaction gateway in the blockchain system can use this method to monitor the process of a blockchain responding to cross-chain transactions initiated by other blockchains, and to acquire and forward information to support the execution of cross-chain transactions. The blockchain system includes a first blockchain, a second blockchain, a first transaction gateway corresponding to the first blockchain, and a second transaction gateway corresponding to the second blockchain. This business processing method includes at least steps S1070 to S1090, detailed below:
[0138] Step S1070: Detect transaction blocks in the second blockchain that include data processing results, wherein the data processing results are obtained by the second blockchain through cross-chain data processing based on cross-chain transaction data from the first blockchain.
[0139] The method in this embodiment is executed by the first transaction gateway in the blockchain transaction system. Specifically, the second transaction gateway will listen to the block on-chain operations of the second blockchain at the request of the first blockchain, thereby detecting transaction blocks in the second blockchain that include data processing results.
[0140] In one embodiment of this application, based on the aforementioned method, before detecting transaction blocks in the second blockchain that include data processing results, the business processing method further includes: receiving blockchain information of the second blockchain sent by the first block; determining any idle gateway among the available gateways as the first transaction gateway, wherein the idle gateway is a gateway that does not listen to the blockchain in the blockchain system; and listening to the block on-chain operation of transaction blocks in the second blockchain through the first transaction gateway according to the blockchain information of the second blockchain.
[0141] In one embodiment of this application, based on the aforementioned method, 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 second gateway registration request to the main blockchain, the second gateway registration request including registration information of the first transaction gateway; receiving a second gateway registration response, and starting the gateway service of the first transaction gateway according to the second gateway registration response, wherein the first transaction gateway registration response includes registration result information in the gateway registration block of the main blockchain, and the gateway registration block is a block uploaded to the main blockchain according to the second gateway registration request.
[0142] Step S1080: When a transaction block is detected to be added to the second blockchain, the blockchain information of the first blockchain and the data processing result of the transaction block are obtained according to the registration information of the first transaction gateway.
[0143] When the first transaction gateway detects that a block to be traded has been added to the first blockchain, it obtains the blockchain information of the first blockchain and the data processing results of the transaction block based on the registration information of the first transaction gateway. The registration information of the first transaction gateway includes the blockchain information of the first blockchain sent by the second blockchain, such as the chain identifier of the second blockchain, and it monitors the operations of the second blockchain based on this information.
[0144] Step S1090: Send the data processing result to the first blockchain according to the blockchain information of the first blockchain.
[0145] 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.
[0146] 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, sub-chains 802 and 803, and gateways 804 and 805.
[0147] First, gateways 804 and 805 register with main chain 801, and their registration information is recorded on main chain 801. Then, sub-chain 802 confirms gateway 805 as its corresponding transaction gateway based on the registration information, while sub-chain 803 confirms gateway 804 as its corresponding transaction gateway. Gateway 805 listens for responses from sub-chain 803 to cross-chain transactions initiated by sub-chain 802, and gateway 804 listens for responses from sub-chain 802 to sub-chain 803, respectively. It's understandable that gateways 804 and 805 can also listen for responses from sub-chain 803 to sub-chain 802.
[0148] During a cross-chain transaction, subchain 802 uploads the cross-chain transaction data and its pre-effectiveness status information X to its own blockchain, for example, block B6. This upload of block B6 is read by gateway 805 and synchronized to subchain 803. Upon receiving the synchronization data from gateway 805, subchain 803 uploads the data processing results to its own blockchain for confirmation, for example, block C8. Block C8 is monitored by gateway 804, which then notifies subchain 802. After receiving the notification from gateway 804 regarding block C8, subchain 802 uploads the confirmation and effectiveness information of the cross-chain transaction data to its subsequent block B7, thus setting the cross-chain transaction data in block B6 as effective and completing the entire cross-chain transaction process.
[0149] 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.
[0150] Figure 9 A block diagram of a business processing apparatus based on a blockchain system according to an embodiment of this application is shown. Figure 9 The business processing unit of the blockchain system shown can be set up within the consensus node.
[0151] The blockchain system includes a first blockchain, a second blockchain, a first transaction gateway corresponding to the first blockchain, and a second transaction gateway corresponding to the second blockchain. (See reference...) Figure 9 As shown, a business processing device 1100 based on a blockchain system according to an embodiment of this application includes: a cross-chain transaction data receiving module 1102, a cross-chain data processing module 1104, and a transaction block packaging module 1106.
[0152] The cross-chain transaction data receiving module 1102 is used to receive cross-chain transaction data sent by the first transaction gateway. The cross-chain transaction data is the data in a designated block of the first blockchain that needs to be transacted across chains, which is monitored by the first transaction gateway. The cross-chain data processing module 1104 is used to perform cross-chain data processing based on the cross-chain transaction data to obtain the data processing result. The transaction block packaging module 1106 is used to package the data processing result into a transaction block and upload the transaction block to the second blockchain to trigger the second transaction gateway to obtain the data processing result from the second blockchain and forward the data processing result to the first blockchain.
[0153] In one embodiment of this application, based on the aforementioned method, the blockchain system further includes a main blockchain, and the first and second blockchains are sub-chains derived from blocks of different heights in the main blockchain; the business processing device 1100 also includes:
[0154] The first registration information acquisition module is used to obtain the registration information of the first transaction gateway from the main blockchain;
[0155] The first information sending module is used to send blockchain information of the first blockchain to the first transaction gateway according to the registration information of the first transaction gateway, so that the first transaction gateway can listen to the data in the first blockchain that needs to be transacted across chains.
[0156] In one embodiment of this application, based on the foregoing method, the service processing apparatus 1100 further includes:
[0157] The first idle gateway acquisition module is used to determine the idle gateway from the available gateways. The idle gateway is the gateway that is not listening to the blockchain in the blockchain system.
[0158] The first gateway determination module is used to select an idle gateway as the first transaction gateway.
[0159] This application also provides a business processing device based on a blockchain system. The blockchain system includes a first blockchain, a second blockchain, a first transaction gateway corresponding to the first blockchain, and a second transaction gateway corresponding to the second blockchain. The business processing device includes: a pre-effective packaging module, a data processing result receiving module, and a confirmation effective packaging module.
[0160] The pre-effective packaging module is used to package cross-chain transaction data and the pre-effective status information of cross-chain transaction data to generate a block to be traded, and put the block to be traded on the first blockchain to trigger the first transaction gateway to obtain cross-chain transaction data from the first blockchain and forward the cross-chain transaction data to the second blockchain. The cross-chain transaction data is the data that needs to be traded across chains.
[0161] The data processing result receiving module is used to receive the data processing result sent by the second transaction gateway. The data processing result comes from the second blockchain and is obtained by the second blockchain through cross-chain data processing based on cross-chain transaction data. The data processing result is forwarded to the first blockchain by the second transaction gateway after it listens to the data processing result.
[0162] The confirmation and effective packaging module is used to package cross-chain transaction data and cross-chain transaction data confirmation and effective information into a transaction confirmation block in response to the data processing results, and to put the transaction confirmation block on the first blockchain.
[0163] In one embodiment of this application, based on the aforementioned method, the blockchain system further includes a main blockchain, and the first and second blockchains are sub-chains derived from blocks of different heights in the main blockchain; the business processing device further includes:
[0164] The second registration information acquisition module is used to acquire blockchain information of the second blockchain and acquire registration information of the second transaction gateway from the main blockchain;
[0165] The second information sending module is used to send blockchain information of the second blockchain to the second transaction gateway according to the registration information of the second transaction gateway, so that the second transaction gateway can listen to the block on-chain operation of the transaction block in the second blockchain.
[0166] In one embodiment of this application, based on the aforementioned method, the second registration information acquisition module is configured to: determine an idle gateway from the available gateways, wherein the idle gateway is a gateway that does not listen to the blockchain in the blockchain system; and use the idle gateway as the second transaction gateway.
[0167] This application also provides a business processing device based on a blockchain system. The blockchain system includes a first blockchain, a second blockchain, a first transaction gateway corresponding to the first blockchain, and a second transaction gateway corresponding to the second blockchain. The business processing device includes: a first block detection module, a cross-chain transaction data acquisition module, and a cross-chain transaction data sending module.
[0168] The first block detection module is used to detect blocks in the first blockchain that contain cross-chain transaction data; the cross-chain transaction data acquisition module is used to acquire the blockchain information of the second blockchain and the cross-chain transaction data in the block to be traded based on the registration information of the second transaction gateway when a block to be traded is detected to be on the first blockchain; and the cross-chain transaction data sending module is used to send cross-chain transaction data to the second blockchain based on the blockchain information of the second blockchain.
[0169] In one embodiment of this application, based on the foregoing method, the service processing apparatus further includes:
[0170] The first blockchain information receiving module is used to receive blockchain information from the first blockchain sent by the second blockchain;
[0171] The first gateway selection module is used to determine any available idle gateway as the second transaction gateway. An idle gateway is a gateway that is not listening to the blockchain in the blockchain system.
[0172] The first listening module is used to listen to the block on-chain operation of the block to be traded in the first blockchain through the second transaction gateway, based on the blockchain information of the first blockchain.
[0173] In one embodiment of this application, based on the foregoing method, the service processing apparatus further includes:
[0174] The first registration request sending module is used to send a first transaction gateway registration request to the main blockchain. The first transaction gateway registration request includes the registration information of the second transaction gateway.
[0175] The first registration response receiving module is used to receive the first transaction gateway registration response and start the gateway service of the second transaction gateway according to the first transaction gateway registration response. The second gateway registration response includes the registration result information in the gateway registration block of the main blockchain. The gateway registration block is a block that is added to the main blockchain according to the first transaction gateway registration request.
[0176] This application also provides a business processing device based on a blockchain system. The blockchain system includes a first blockchain, a second blockchain, a first transaction gateway corresponding to the first blockchain, and a second transaction gateway corresponding to the second blockchain. The business processing device includes: a second block detection module, a data processing result acquisition module, and a data processing result sending module.
[0177] The second block detection module is used to detect transaction blocks in the second blockchain that include data processing results, wherein the data processing results are obtained by the second blockchain through cross-chain data processing based on cross-chain transaction data from the first blockchain; the data processing result acquisition module is used to acquire the blockchain information of the first blockchain and the data processing results of the transaction block based on the registration information of the first transaction gateway when a transaction block is detected on the second blockchain; the data processing result sending module is used to send the data processing results to the first blockchain based on the blockchain information of the first blockchain.
[0178] In one embodiment of this application, based on the foregoing method, the service processing apparatus further includes:
[0179] The second blockchain information receiving module is used to receive blockchain information of the second blockchain sent by the first block;
[0180] The second gateway selection module is used to determine any available idle gateway as the first transaction gateway. An idle gateway is a gateway that is not listening to the blockchain in the blockchain system.
[0181] The second monitoring module is used to monitor the block on-chain operations of transaction blocks in the second blockchain through the first transaction gateway, based on the blockchain information of the second blockchain.
[0182] In one embodiment of this application, based on the aforementioned method, the first blockchain and the second blockchain are sub-chains derived from blocks of different heights in the main blockchain; the business processing apparatus further includes:
[0183] The second registration request sending module is used to send a second gateway registration request to the main blockchain. The second gateway registration request includes the registration information of the first transaction gateway.
[0184] The second registration response receiving module is used to receive the second gateway registration response and start the gateway service of the first transaction gateway according to the second gateway registration response. The first transaction gateway registration response includes the registration result information in the gateway registration block of the main blockchain. The gateway registration block is a block that is added to the main blockchain according to the second gateway registration request.
[0185] 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.
[0186] Figure 10 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown.
[0187] 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.
[0188] like Figure 10 As 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 Unit 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.
[0189] 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.
[0190] 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.
[0191] 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.
[0192] 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.
[0193] 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.
[0194] 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.
[0195] 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.
[0196] 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 business processing method based on a blockchain system, characterized in that, The blockchain system includes a first blockchain, a second blockchain, a first transaction gateway corresponding to the first blockchain, and a second transaction gateway corresponding to the second blockchain. The business processing method includes: The system receives cross-chain transaction data sent by the first transaction gateway. The cross-chain transaction data is data in a designated block of the first blockchain that needs to be transacted across chains, which is monitored by the first transaction gateway. The designated block also contains pre-effective status information of the cross-chain transaction data. The pre-effective status information indicates that although the cross-chain transaction data has been uploaded to the chain, it has not yet been confirmed by the first blockchain and has not yet taken effect. Cross-chain data processing is performed on the cross-chain transaction data to obtain the data processing results; The data processing results are packaged into transaction blocks, and the transaction blocks are uploaded to the second blockchain to trigger the second transaction gateway to obtain the data processing results from the second blockchain and forward the data processing results to the first blockchain. The cross-chain transaction data and the confirmation and effectiveness information of the cross-chain transaction data are packaged into transaction confirmation blocks and uploaded to the first blockchain. The confirmation and effectiveness information indicates that the cross-chain transaction data in the pre-effective state has officially become effective.
2. The method according to claim 1, characterized in that, The blockchain system also includes a main blockchain, and the first blockchain and the second blockchain are sub-chains derived from blocks of different heights in the main blockchain; Before receiving the cross-chain transaction data sent by the first transaction gateway, the method further includes: Obtain the registration information of the first transaction gateway from the main blockchain; Based on the registration information of the first transaction gateway, the blockchain information of the first blockchain is sent to the first transaction gateway so that the first transaction gateway can listen for data in the first blockchain that needs to be transacted across chains.
3. The method according to claim 2, characterized in that, Before obtaining the registration information of the first transaction gateway from the main blockchain, the method further includes: Idle gateways are identified from the available gateways, wherein the idle gateways are gateways that are not listening to the blockchain in the blockchain system; The idle gateway is used as the first transaction gateway.
4. A business processing method based on a blockchain system, characterized in that, The blockchain system includes a first blockchain, a second blockchain, a first transaction gateway corresponding to the first blockchain, and a second transaction gateway corresponding to the second blockchain. The business processing method includes: The cross-chain transaction data and its pre-effective status information are packaged to generate a block to be traded, and the block to be traded is uploaded to the first blockchain to trigger the first transaction gateway to obtain the cross-chain transaction data from the first blockchain and forward the cross-chain transaction data to the second blockchain. The cross-chain transaction data is the data that needs to be traded across chains. The pre-effective status information indicates that although the cross-chain transaction data is uploaded to the chain, it has not yet been confirmed by the first blockchain and has not yet become effective. The system receives data processing results sent by the second transaction gateway. The data processing results come from the second blockchain and are obtained by the second blockchain through cross-chain data processing based on the cross-chain transaction data. The data processing results are forwarded to the first blockchain by the second transaction gateway after it has listened to the data processing results. In response to the data processing result, the cross-chain transaction data and the confirmation information of the cross-chain transaction data are packaged into a transaction confirmation block and the transaction confirmation block is uploaded to the first blockchain. The confirmation information indicates that the cross-chain transaction data in the pre-effective state has officially become effective.
5. The method according to claim 4, characterized in that, The blockchain system further includes a main blockchain, and the first blockchain and the second blockchain are sub-chains derived from blocks of different heights in the main blockchain; before packaging cross-chain transaction data and the pre-effective status information of the cross-chain transaction data to generate a block to be traded, and before uploading the block to be traded to the first blockchain, the method further includes: Obtain the blockchain information of the second blockchain and obtain the registration information of the second transaction gateway from the main blockchain; Based on the registration information of the second transaction gateway, the blockchain information of the second blockchain is sent to the second transaction gateway so that the second transaction gateway can listen to the block on-chain operation of the transaction block in the second blockchain.
6. The method according to claim 5, characterized in that, The step of obtaining the registration information of the transaction gateway from the main blockchain includes: Idle gateways are identified from the available gateways, wherein the idle gateways are gateways that are not listening to the blockchain in the blockchain system; The idle gateway is used as the second transaction gateway.
7. A business processing method based on a blockchain system, characterized in that, The blockchain system includes a first blockchain, a second blockchain, a first transaction gateway corresponding to the first blockchain, and a second transaction gateway corresponding to the second blockchain. The business processing method includes: The first blockchain is detected to include a block of pending transactions containing cross-chain transaction data and pre-effective status information of the cross-chain transaction data. The pre-effective status information indicates that although the cross-chain transaction data has been uploaded to the chain, it has not yet been confirmed by the first blockchain and has not yet become effective. When the block to be traded is detected to be uploaded to the first blockchain, the blockchain information of the first blockchain and the cross-chain transaction data in the block to be traded are obtained according to the registration information of the first transaction gateway. The cross-chain transaction data is sent to the second blockchain according to the blockchain information of the second blockchain, so that the second blockchain performs cross-chain data processing based on the cross-chain transaction data to obtain the data processing result. The data processing result is used to trigger the first blockchain to package the cross-chain transaction data and the confirmation information of the cross-chain transaction data into a transaction confirmation block and put the transaction confirmation block on the first blockchain.
8. The method according to claim 7, characterized in that, Before detecting the block to be transacted in the first blockchain that includes cross-chain transaction data, the method further includes: Receive blockchain information from the first blockchain sent by the second blockchain; Any available idle gateway is selected as the first transaction gateway, wherein the idle gateway is a gateway that is not listening to the blockchain in the blockchain system; Based on the blockchain information of the first blockchain, the first transaction gateway monitors the on-chain operation of the block to be traded in the first blockchain.
9. The method according to claim 7, 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: Send a first transaction gateway registration request to the main blockchain, wherein the first transaction gateway registration request includes the registration information of the first transaction gateway; The system receives a first transaction gateway registration response and starts the gateway service of the first transaction gateway based on the first transaction gateway registration response. The first transaction gateway registration response includes registration result information in the gateway registration block of the main blockchain. The gateway registration block is a block that is uploaded to the main blockchain based on the first transaction gateway registration request.
10. A business processing method based on a blockchain system, characterized in that, The blockchain system includes a first blockchain, a second blockchain, a first transaction gateway corresponding to the first blockchain, and a second transaction gateway corresponding to the second blockchain. The business processing method includes: The second blockchain detects transaction blocks that include data processing results, wherein the data processing results are obtained by the second blockchain through cross-chain data processing based on cross-chain transaction data from the first blockchain. The cross-chain transaction data and the pre-effective status information of the cross-chain transaction data are packaged to generate a block to be traded and uploaded to the first blockchain. The pre-effective status information indicates that although the cross-chain transaction data is uploaded to the blockchain, it has not yet been confirmed by the first blockchain and has not yet become effective. When the transaction block is detected to be uploaded to the second blockchain, the blockchain information of the second blockchain and the data processing result of the transaction block are obtained according to the registration information of the second transaction gateway. The data processing result is sent to the first blockchain according to the blockchain information of the first blockchain, so that the first blockchain packages the cross-chain transaction data and the confirmation and effectiveness information of the cross-chain transaction data into a transaction confirmation block and puts the transaction confirmation block on the first blockchain. The confirmation and effectiveness information indicates that the cross-chain transaction data in the pre-effective state has officially become effective.
11. The method according to claim 10, characterized in that, Before detecting transaction blocks in the second blockchain that include data processing results, the method further includes: Receive blockchain information of the second blockchain sent by the first block; Any available idle gateway is selected as the second transaction gateway, wherein the idle gateway is a gateway that is not listening to the blockchain in the blockchain system; Based on the blockchain information of the second blockchain, the second transaction gateway monitors the on-chain operation of the transaction blocks in the second blockchain.
12. 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: Send a second transaction gateway registration request to the main blockchain, the second transaction gateway registration request including the registration information of the second transaction gateway; The system receives a second transaction gateway registration response and starts the gateway service of the second transaction gateway based on the second transaction gateway registration response. The second transaction gateway registration response includes registration result information in the gateway registration block of the main blockchain. The gateway registration block is a block that is uploaded to the main blockchain according to the second transaction gateway registration request.
13. A business processing device based on a blockchain system, characterized in that, The blockchain system includes a first blockchain, a second blockchain, a first transaction gateway corresponding to the first blockchain, and a second transaction gateway corresponding to the second blockchain. The business processing device includes: The cross-chain transaction data receiving module is used to receive cross-chain transaction data sent by the first transaction gateway. The cross-chain transaction data is data in a designated block of the first blockchain that needs to be transacted across chains, which is monitored by the first transaction gateway. The designated block also contains pre-effective status information of the cross-chain transaction data. The pre-effective status information indicates that although the cross-chain transaction data has been uploaded to the chain, it has not yet been confirmed by the first blockchain and has not yet taken effect. The cross-chain data processing module is used to perform cross-chain data processing based on the cross-chain transaction data to obtain data processing results. The transaction block packaging module is used to package the data processing results into transaction blocks and upload the transaction blocks to the second blockchain to trigger the second transaction gateway to obtain the data processing results from the second blockchain and forward the data processing results to the first blockchain. This allows the cross-chain transaction data and the confirmation and effectiveness information of the cross-chain transaction data to be packaged into a transaction confirmation block and uploaded to the first blockchain. The confirmation and effectiveness information indicates that the cross-chain transaction data in the pre-effective state has officially become effective.
14. A business processing device based on a blockchain system, characterized in that, The blockchain system includes a first blockchain, a second blockchain, a first transaction gateway corresponding to the first blockchain, and a second transaction gateway corresponding to the second blockchain. The business processing device includes: The pre-effective packaging module is used to package cross-chain transaction data and the pre-effective status information of the cross-chain transaction data to generate a block to be traded, and to put the block to be traded on the first blockchain to trigger the first transaction gateway to obtain the cross-chain transaction data from the first blockchain and forward the cross-chain transaction data to the second blockchain. The cross-chain transaction data is the data that needs to be transacted across chains. The pre-effective status information indicates that although the cross-chain transaction data has been put on the chain, it has not yet been confirmed by the first blockchain and has not yet taken effect. The data processing result receiving module is used to receive the data processing result sent by the second transaction gateway. The data processing result comes from the second blockchain and is obtained by the second blockchain through cross-chain data processing based on the cross-chain transaction data. The data processing result is forwarded to the first blockchain by the second transaction gateway after it listens to the data processing result. The confirmation and effectiveness packaging module is used to respond to the data processing result, package the cross-chain transaction data and the confirmation and effectiveness information of the cross-chain transaction data into a transaction confirmation block, and upload the transaction confirmation block on the first blockchain. The confirmation and effectiveness information indicates that the cross-chain transaction data in the pre-effective state has officially become effective.
15. A business processing device based on a blockchain system, characterized in that, The blockchain system includes a first blockchain, a second blockchain, a first transaction gateway corresponding to the first blockchain, and a second transaction gateway corresponding to the second blockchain. The business processing device includes: The first block detection module is used to detect pending blocks in the first blockchain that include cross-chain transaction data and pre-effective status information of the cross-chain transaction data. The pre-effective status information indicates that although the cross-chain transaction data has been uploaded to the chain, it has not yet been confirmed by the first blockchain and has not yet taken effect. The cross-chain transaction data acquisition module is used to acquire the blockchain information of the first blockchain and the cross-chain transaction data in the block to be traded based on the registration information of the first transaction gateway when the block to be traded is detected to be uploaded to the first blockchain. A cross-chain transaction data sending module is used to send the cross-chain transaction data to the second blockchain according to the blockchain information of the second blockchain, so that the second blockchain performs cross-chain data processing based on the cross-chain transaction data to obtain the data processing result. The data processing result is used to trigger the first blockchain to package the cross-chain transaction data and the confirmation information of the cross-chain transaction data into a transaction confirmation block and put the transaction confirmation block on the first blockchain.
16. A business processing device based on a blockchain system, characterized in that, The blockchain system includes a first blockchain, a second blockchain, a first transaction gateway corresponding to the first blockchain, and a second transaction gateway corresponding to the second blockchain. The business processing device includes: The second block detection module is used to detect transaction blocks in the second blockchain that include data processing results. The data processing results are obtained by the second blockchain through cross-chain data processing based on cross-chain transaction data from the first blockchain. The cross-chain transaction data and the pre-effective status information of the cross-chain transaction data are packaged to generate a block to be traded and uploaded to the first blockchain. The pre-effective status information indicates that although the cross-chain transaction data is uploaded to the blockchain, it has not yet been confirmed by the first blockchain and has not yet become effective. The data processing result acquisition module is used to acquire the blockchain information of the second blockchain and the data processing result of the transaction block according to the registration information of the second transaction gateway when the transaction block is detected to be on the second blockchain. The data processing result sending module is used to send the data processing result to the first blockchain according to the blockchain information of the first blockchain, so that the first blockchain packages the cross-chain transaction data and the confirmation and effectiveness information of the cross-chain transaction data into a transaction confirmation block and puts the transaction confirmation block on the first blockchain. The confirmation and effectiveness information indicates that the cross-chain transaction data in the pre-effective state has officially become effective.
17. 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 business processing method based on a blockchain system as described in any one of claims 1 to 12.
18. 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 12.
19. A computer program product, characterized in that, The computer program product includes a computer program stored in a computer-readable storage medium, and the processor of the electronic device reads from the computer-readable storage medium and executes the computer program, causing the electronic device to perform the blockchain-based business processing method as described in any one of claims 1 to 12.
Citation Information
Patent Citations
A method and apparatus for cross-chain transaction
CN109214818A
Cross-blockchain communication method and device, cross-chain service system and cross-chain transaction system
CN111181968A
Main blockchain-side blockchain monitoring method and system, equipment and storage medium
CN111683059A
Network management method and device, electronic device and readable storage medium
CN112671908A
