Data Processing Method, Related Devices and Storage Medium Based on Blockchain Network

By using different consensus clusters in the blockchain network to perform their respective consensus processing, and adding transaction data to the main chain through the auction block mechanism, the problem of low data processing efficiency in the existing technology is solved, and efficient and secure data isolation and unified management are achieved.

CN116112508BActive Publication Date: 2025-07-08TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111326274.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-10
Publication Date
2025-07-08
Estimated Expiration
2041-11-10

AI Technical Summary

Technical Problem

When facing transaction data of different types of services, the existing blockchain consensus network has low data processing efficiency and is difficult to meet the data consensus needs of complex business scenarios.

Method used

Different consensus clusters are used to use their respective consensus logic to consensus processing of relevant business data, and through the auction block mechanism of multi-consensus clusters, transaction data is added to the main chain to realize isolated storage and efficient processing of data.

Benefits of technology

It improves the data processing efficiency of blockchain networks, realizes the security, effective isolation and unified management of data in different business services, and improves the efficiency and flexibility of data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116112508B_ABST
    Figure CN116112508B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides a data processing method, related device, and storage medium based on a blockchain network. The method includes: a first consensus node of a first consensus cluster obtains transaction data of a target service, where the transaction data of the target service includes transaction data of a service corresponding to the first consensus cluster or transaction data of a collaborative service between at least two consensus clusters, generates a target block corresponding to the transaction data of the target service, and sends a data update request to a core consensus cluster. The data update request includes the target block and a first block height corresponding to the first consensus cluster, so as to instruct the core consensus cluster to add the target block to the main chain according to the first block height. It can implement different consensus clusters to perform consensus processing on relevant service data using their respective consensus logics, as well as the auction block production of multiple consensus clusters, thereby improving the data processing efficiency of the blockchain network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular, to a data processing method, related devices, and storage media based on a blockchain network. Background Art

[0002] A blockchain is a decentralized distributed ledger system, which has the characteristics of data immutability, decentralization, and openness. The consensus mechanism, as the core in blockchain technology, is the basis for ensuring the normal operation of the blockchain system. The consensus process of the blockchain system is a process of keeping the distributed ledgers among various nodes consistent. Currently, it is usually to select multiple nodes in the blockchain system to form a general-purpose consensus network, and this consensus network can be used to conduct consensus block generation on the transaction data of various services generated by the business system. However, it is found in practice that when facing the transaction data of different types of services, the data processing efficiency of the existing consensus network is relatively low, and it is difficult to meet the data consensus requirements of complex business scenarios. Summary of the Invention

[0003] Embodiments of this application provide a data processing method, related devices, and storage media based on a blockchain network, which can implement different consensus clusters to perform consensus processing on relevant business data using their respective consensus logics, and competitive block generation of multiple consensus clusters, thereby improving the data processing efficiency of the blockchain network.

[0004] In a first aspect, embodiments of this application provide a data processing method based on a blockchain network. The blockchain network includes K consensus clusters, and the core consensus cluster among the K consensus clusters is used to manage the block data of the main chain; each consensus cluster other than the core consensus cluster among the K consensus clusters is used to manage the block data of the sub-chain corresponding to the corresponding service. The core consensus cluster includes representative nodes corresponding to each consensus cluster, and K is an integer greater than or equal to 1. The method includes:

[0005] A first consensus node of a first consensus cluster obtains transaction data of a target service, where the transaction data of the target service includes transaction data of the service corresponding to the first consensus cluster or transaction data of a collaborative service between at least two consensus clusters. The first consensus node is any consensus node included in the first consensus cluster;

[0006] The first consensus node generates a target block corresponding to the transaction data of the target service;

[0007] The first consensus node sends a data update request to the core consensus cluster. The data update request includes the target block and the first block height corresponding to the first consensus cluster. The data update request is used to instruct the core consensus cluster to add the target block to the main chain according to the first block height.

[0008] In a second aspect, an embodiment of the present application provides another data processing method based on a blockchain network. The blockchain network includes K consensus clusters. The core consensus cluster in the K consensus clusters is used to manage the block data of the main chain. Each consensus cluster other than the core consensus cluster in the K consensus clusters is used to manage the block data of the sub-chain corresponding to the corresponding business. The core consensus cluster includes representative nodes corresponding to each consensus cluster. K is an integer greater than or equal to 1. The method includes:

[0009] A second consensus node of the core consensus cluster receives a data update request sent by a first consensus node of a first consensus cluster. The data update request includes a target block and a first block height corresponding to the first consensus cluster. The second consensus node is the representative node corresponding to the first consensus cluster in the core consensus cluster.

[0010] The second consensus node verifies the first block height according to the block auction record of the main chain. The block auction record includes the corresponding relationship between each block position of the main chain and each consensus cluster.

[0011] If the verification passes, the second consensus node adds the target block to the block position corresponding to the first block height in the main chain.

[0012] In a third aspect, an embodiment of the present application provides a data processing device. The device includes:

[0013] An acquisition module, configured to acquire transaction data of a target service. The transaction data of the target service includes transaction data of a service corresponding to a first consensus cluster or transaction data of a collaborative service between at least two consensus clusters.

[0014] A processing module, configured to generate a target block corresponding to the transaction data of the target service.

[0015] A sending module, configured to send a data update request to a core consensus cluster. The data update request includes the target block and a first block height corresponding to the first consensus cluster. The data update request is used to instruct the core consensus cluster to add the target block to the main chain according to the first block height.

[0016] In a fourth aspect, an embodiment of the present application provides another data processing device. The device includes:

[0017] A receiving module, configured to receive a data update request sent by a first consensus node of a first consensus cluster, where the data update request includes a target block and a first block height corresponding to the first consensus cluster;

[0018] A processing module, configured to verify the first block height according to a block auction record of the main chain, where the block auction record includes a correspondence between each block position of the main chain and each consensus cluster;

[0019] The processing module is further configured to, if the verification is passed, add the target block to a block position corresponding to the first block height in the main chain.

[0020] In a fifth aspect, an embodiment of the present application provides a computer device, including a processor, a network interface, and a storage device, where the processor, the network interface, and the storage device are connected to each other. Among them, the network interface is controlled by the processor to send and receive data, the storage device is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the data processing method based on a blockchain network as described in the first aspect or the second aspect.

[0021] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, where the computer program includes program instructions, and the program instructions are executed by a processor to execute the data processing method based on a blockchain network as described in the first aspect or the second aspect.

[0022] In a seventh aspect, an embodiment of the present application provides a computer program product, including a computer program, characterized in that when the computer program is executed by a computer processor, it implements the data processing method based on a blockchain network as described in the first aspect or the second aspect.

[0023] In an embodiment of the present application, a first consensus node of a first consensus cluster obtains transaction data of a target service. The transaction data of the target service includes transaction data of a service corresponding to the first consensus cluster or transaction data of a collaborative service between at least two consensus clusters, generates a target block corresponding to the transaction data of the target service, and sends a data update request to a core consensus cluster. The data update request includes the target block and a first block height corresponding to the first consensus cluster. After receiving the data update request, the core consensus cluster may add the target block to the main chain according to the first block height. For example, the target block may be added to a block position corresponding to the first block height in the main chain, which can implement different consensus clusters to perform consensus processing on relevant service data using their respective consensus logics, and the auction-based block generation of multiple consensus clusters, thereby improving the data processing efficiency of the blockchain network. Moreover, the service data of each multi-consensus cluster exists in an exclusive block, and data isolation can be safely and effectively achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0025] Figure 1a is a schematic diagram of the architecture of a data processing system provided by an embodiment of the present application;

[0026] Figure 1b is a schematic diagram of the structure of a blockchain provided by an embodiment of the present application;

[0027] Figure 1c is a schematic diagram of the process of generating a new block provided by an embodiment of the present application;

[0028] Figure 2 is a schematic flowchart of a data processing method provided by an embodiment of the present application;

[0029] Figure 3 is a schematic flowchart of another data processing method provided by an embodiment of the present application;

[0030] Figure 4 is a schematic diagram of the structure of a consensus network in a blockchain network provided by an embodiment of the present application;

[0031] Figure 5 is a schematic flowchart of yet another data processing method provided by an embodiment of the present application;

[0032] Figure 6It is a schematic structural diagram of a data processing device provided by an embodiment of the present application;

[0033] Figure 7 It is a schematic structural diagram of another data processing device provided by an embodiment of the present application;

[0034] Figure 8 It is a schematic structural diagram of a computer device provided by an embodiment of the present application. Detailed implementation manners

[0035] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0036] Please refer to Figure 1a , which is a schematic architecture diagram of a data processing system provided by an embodiment of the present application. The data processing system includes a service network 11, a consensus network 12, and a terminal device 13, where:

[0037] The service network 11 and the consensus network 12 together form a blockchain network. A blockchain network refers to a network used for data sharing between node devices. The blockchain network may include multiple node devices. Each node device can receive input information during normal operation and maintain the shared data (i.e., the blockchain) in the blockchain network based on the received input information. To ensure information intercommunication in the blockchain network, there may be information connections between each node device, and peer-to-peer (P2P) communication can be achieved between any two node devices, specifically through a wired communication link or a wireless communication link for P2P communication. For example, when any node device in the blockchain network receives input information, other node devices obtain the input information according to the consensus algorithm and store the input information as data in the shared data, so that the data stored on all node devices in the blockchain network is consistent.

[0038] Among them, the consensus network 12 is composed of multiple consensus nodes 102, and the business network 11 is composed of multiple business nodes 101. The nodes in the business network 11 mainly perform business operations and do not participate in the accounting consensus. Instead, they obtain the block header data and partially authorized visible block data from the consensus network 12 through identity authentication. The nodes in the consensus network 12 are mainly responsible for the consensus of business transaction data, and pack the transaction data into blocks for consensus accounting. Specifically, the consensus network 12 may include K consensus clusters 121, where K is an integer greater than or equal to 1. Each consensus cluster 121 includes a certain number of consensus nodes 102, and each consensus cluster 121 is respectively used to consensus the transaction data of different businesses. For example, for the business of taxation, this business may include multiple related sub-businesses (such as tax refund, invoice, legal person, credit investigation, etc.), then different consensus clusters 121 can be used to process the transaction data of the corresponding sub-businesses respectively, and each consensus cluster 121 can use its own consensus logic and algorithm to perform accounting consensus on the transaction data, and different consensus clusters do not affect each other, which is convenient for data isolation. Each consensus cluster 121 is responsible for maintaining the sub-chain corresponding to the business, and can write the block data of the corresponding business into the sub-chain. In addition, the consensus network 12 can also be correspondingly set with a main chain. After each consensus cluster 121 generates a block, it needs to finally submit the block to the main chain for storage. Specifically, the main chain can be maintained by one of the consensus clusters 121, and this consensus cluster 121 can be called the core consensus cluster, which specifically includes the representative nodes of each other consensus cluster 121, that is, each consensus cluster 121 can select a consensus node as a representative to participate in the management and maintenance of the main chain. The main chain can store the block data of various related businesses to achieve unified management of the block data. The sub-chain correspondingly maintained by each consensus cluster 121 can only store the block data of transactions related to its own corresponding business.

[0039] In some feasible implementation manners, a routing proxy layer may be set between the business network 11 and the consensus network 12, and the routing proxy layer plays a role in isolating the business layer and the core consensus network layer.

[0040] Among them, the terminal device 13 can access the blockchain network and can communicate with the node devices (such as the nodes 101 in the business network 11) in the blockchain network. For example, submitting data (such as transaction data, data query requests, etc.) to the node devices, querying data from the node devices, and so on. Specifically, the terminal device 13 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, an in-vehicle intelligent terminal, etc., which is not limited in the embodiments of the present application.

[0041] It should be noted that Figure 1aThe numbers of nodes 101 and 102 shown in the figure, as well as the numbers of business networks 11 and consensus clusters 121, are merely illustrative. According to actual needs, any number of nodes, business networks, and consensus clusters can be deployed.

[0042] Among them, for each node device in the blockchain network, it has a corresponding node identifier, and each node device in the blockchain network can store the node identifiers of other node devices in the blockchain network, so that subsequently, according to the node identifiers of other node devices, the generated block can be broadcast to other node devices in the blockchain network. A node identifier list as shown in the following table can be maintained in each node device, and the node name and node identifier are stored in this node identifier list correspondingly. Among them, the node identifier can be an Internet Protocol (IP) address and any other information that can be used to identify the node. Only the IP address is used as an example in the table for illustration.

[0043] Node Name Node Identifier Node 1 117.114.151.174 Node 2 117.116.189.145 … … Node N 119.123.789.258

[0044] Among them, each node device in the blockchain network stores the same blockchain. The blockchain consists of multiple blocks. Refer to Figure 1b , the blockchain consists of multiple blocks. The genesis block includes a block header and a block body. The block header stores the input information feature value, version number, timestamp, and difficulty value. The block body stores the input information; the next block of the genesis block uses the genesis block as the parent block. The next block also includes a block header and a block body. The block header stores the input information feature value of the current block, the block header feature value of the parent block, version number, timestamp, and difficulty value, and so on. In this way, the block data stored in each block in the blockchain is associated with the block data stored in the parent block, ensuring the security of the input information in the block.

[0045] Among them, when generating each block in the blockchain, refer to Figure 1c , when the node device where the blockchain is located receives the input information, it verifies the input information. After the verification is completed, it stores the input information in the memory pool and updates the hash tree used to record the input information; then, it updates the timestamp to the time when the input information is received and tries different random numbers, and performs eigenvalue calculations multiple times so that the calculated eigenvalue can satisfy the following formula:

[0046] SHA256(SHA256(version+prev_hash+merkle_root+ntime+nbits+x))<TARGET

[0047] Among them, SHA256 is the eigenvalue algorithm used to calculate eigenvalues; version (version number) is the version information of the relevant block protocol in the blockchain; prev_hash is the block header eigenvalue of the parent block of the current block; merkle_root is the eigenvalue of the input information; ntime is the update time for updating the timestamp; nbits is the current difficulty, which is a fixed value within a certain period of time and is determined again after exceeding the fixed time period; x is a random number; TARGET is the eigenvalue threshold, and this eigenvalue threshold can be determined based on nbits.

[0048] In this way, when a random number that satisfies the above formula is calculated, the information can be stored correspondingly, the block header and the block body can be generated, and the current block can be obtained. Subsequently, the node device where the blockchain is located sends the newly generated block to other node devices in its blockchain network according to the node identifiers of other node devices in the blockchain network. Other node devices verify the newly generated block and add the newly generated block to the blockchain they store after the verification is completed.

[0049] Among them, smart contracts can run on the node devices of the blockchain network. A smart contract is a code implementation used to execute when certain conditions are met. Developers can define contract logic through programming languages, publish it to the blockchain (smart contract registration), trigger the execution according to the logic of the contract terms by calling keys or other events, complete the contract logic, and at the same time provide functions for upgrading and canceling smart contracts.

[0050] In some feasible implementation manners, the first consensus node of the first consensus cluster obtains the transaction data of the target business. The transaction data of the target business includes the transaction data of the business corresponding to the first consensus cluster or the transaction data of the collaborative business between at least two consensus clusters, generates a target block corresponding to the transaction data of the target business, and sends a data update request to the core consensus cluster. The data update request includes the target block and the first block height corresponding to the first consensus cluster. After receiving this data update request, the core consensus cluster can add the target block to the main chain according to the first block height. For example, the target block can be added to the block position corresponding to the first block height in the main chain, which can realize the competitive block production of multiple consensus clusters. Moreover, the business data of each multi-consensus cluster exists in exclusive blocks, and data isolation can be safely and effectively achieved. Different consensus clusters can have their own consensus and verification logics, produce blocks respectively, improve efficiency, and then submit the business blocks to the main chain through the auction method.

[0051] The implementation details of the technical solution of the embodiments of the present application are elaborated in detail below:

[0052] Please refer to Figure 2 , which is based on the embodiments of the present applicationFigure 1a The flowchart of a data processing method provided by the data processing system shown, the data processing method in the embodiments of the present application is mainly described from the side of the first consensus node of the first consensus cluster of the blockchain network, and the data processing method includes the following steps:

[0053] 201. The first consensus node of the first consensus cluster obtains the transaction data of the target business, and the transaction data of the target business includes the transaction data of the business corresponding to the first consensus cluster or the transaction data of the collaborative business between at least two consensus clusters.

[0054] In the embodiments of the present application, the blockchain network may include K consensus clusters, where K is an integer greater than or equal to 1. Each consensus cluster includes multiple consensus nodes. One of the consensus clusters can be used as the core consensus cluster, and the core consensus cluster is used to manage the block data of the main chain. Each of the consensus clusters other than the core consensus cluster among the K consensus clusters is used to manage the block data of the sub-chain corresponding to the corresponding business. The core consensus cluster includes the representative nodes corresponding to each consensus cluster, that is, each consensus cluster can select a consensus node as the representative and participate in the management and maintenance of the main chain by joining the core consensus cluster.

[0055] In some feasible embodiments, K is an integer greater than or equal to 2, that is, the blockchain network includes at least two consensus clusters.

[0056] In some feasible embodiments, the businesses managed by different consensus clusters may be sub-businesses in a certain overall business. For example, the overall business of taxation can be divided into: invoice sub-business, credit investigation sub-business, legal person sub-business, and tax refund sub-business. Then, different consensus clusters are respectively used to process the transaction data of a certain sub-business among these 4 sub-businesses and generate corresponding blocks. For example, consensus cluster 1 processes the invoice sub-business in taxation, consensus cluster 2 processes the credit investigation sub-business in taxation, consensus cluster 3 processes the legal person sub-business in taxation, and consensus cluster 4 processes the tax refund sub-business in taxation.

[0057] Among them, the first consensus cluster may be any one of the consensus clusters other than the core consensus cluster, and the first consensus node may be any one of the consensus nodes included in the first consensus cluster.

[0058] Specifically, the first consensus cluster can be responsible for the consensus accounting of transaction data corresponding to the target business, or for the consensus accounting of transaction data generated by the collaboration between different consensus clusters. Correspondingly, the target business can be the business corresponding to the first consensus cluster, such as tax refund in tax-related business, legal person, or credit investigation, etc. The target business can also be the collaborative business between at least two consensus clusters. For example, consensus cluster A can request consensus cluster B to judge the legal person qualification of a certain tax entity. At this time, a collaborative business, or a cross-chain execution business, is generated between A and B. Then, the transaction data of the target business can correspondingly include the transaction data of the business corresponding to the first consensus cluster, or the transaction data of the collaborative business between at least two consensus clusters.

[0059] 202. The first consensus node generates a target block corresponding to the transaction data of the target business.

[0060] Specifically, each consensus cluster can perform accounting consensus on transaction data using its own consensus logic and algorithms, and different consensus clusters do not affect each other. The first consensus node can jointly perform consensus accounting on the transaction data of the target business with other consensus nodes in the first consensus cluster using the corresponding consensus algorithms and logic, and generate the corresponding target block.

[0061] In some feasible implementation manners, on the one hand, the target block can be submitted to the main chain for storage, and on the other hand, it can also be stored in the sub-chain corresponding to the first consensus cluster. In order to effectively master the storage locations of the target block in the sub-chain and the main chain, the first consensus node can determine the previous block in the sub-chain corresponding to the first consensus cluster and the previous block in the main chain, and obtain the first digest information of the previous block in the sub-chain corresponding to the first consensus cluster and the second digest information of the previous block in the main chain. Then, the target block is generated according to the transaction data of the target business, the first digest information, and the second digest information. That is to say, the target block will add two digest information (such as hash values), one is the digest information of the previous block in the sub-chain, and the other is the digest information of the previous block in the main chain. It can be seen that each consensus cluster can organize its own business sub-chain according to the first digest information, which only contains the relevant blocks of its own business, while the main chain includes all the information of the entire business ecosystem, facilitating unified management and review.

[0062] 203. The first consensus node sends a data update request to the core consensus cluster. The data update request includes the target block and the first block height corresponding to the first consensus cluster. The data update request is used to instruct the core consensus cluster to add the target block to the main chain according to the first block height.

[0063] Specifically, to achieve unified management of block data, after each consensus cluster generates a block corresponding to a business, it can submit the block to the main chain for storage. The first consensus node can send a data update request to the core consensus cluster. The data update request includes the target block and the first block height corresponding to the first consensus cluster. The data update request is used to instruct the core consensus cluster to add the target block to the main chain according to the first block height.

[0064] In some feasible implementation manners, the first consensus node can send a data update request to the core consensus cluster through the representative node of the first consensus cluster in the core consensus cluster. For example, if the representative node of the first consensus cluster in the core consensus cluster is the third consensus node, then in the first consensus cluster, after the first consensus node generates the target block, it can submit the target block to the third consensus node, and the third consensus node sends a data update request to the core consensus cluster, so that each consensus node of the core consensus cluster can obtain the target block.

[0065] In some feasible implementation manners, the right to use the storage locations of each block on the main chain can be obtained by each consensus cluster through an auction. Among them, the first block height is obtained by the first consensus cluster and other consensus clusters through an auction to the core consensus cluster. After the auction is successful, the first consensus cluster enjoys the exclusive right to the storage location corresponding to the first block height on the main chain.

[0066] In some feasible implementation manners, the data update request further includes the signature information of the first consensus cluster. The signature information of the first consensus cluster can be the signature information of the first consensus node, or the signature information of the representative node of the first consensus cluster in the core consensus cluster. After the core consensus cluster verifies the signature information and passes, it adds the target block to the main chain according to the first block height. It can be seen that after each consensus cluster generates a new block, the consensus before adding it to the main chain only needs to verify the signature information of the relevant consensus nodes. After passing the verification, the block can be added to the main chain, realizing the efficient update of the main chain data.

[0067] In an embodiment of the present application, a first consensus node of a first consensus cluster obtains transaction data of a target service. The transaction data of the target service includes transaction data of a service corresponding to the first consensus cluster or transaction data of a collaborative service between at least two consensus clusters, generates a target block corresponding to the transaction data of the target service, and sends a data update request to a core consensus cluster. The data update request includes the target block and a first block height corresponding to the first consensus cluster. After receiving the data update request, the core consensus cluster may add the target block to the main chain according to the first block height. For example, the target block may be added to a block position corresponding to the first block height in the main chain, enabling block generation by multiple consensus clusters through auctions. Moreover, the business data of each multi-consensus cluster exists in exclusive blocks, enabling secure and effective data isolation.

[0068] Please refer to Figure 3 , which is a schematic flowchart of another data processing method provided by the data processing system based on Figure 1a shown. The data processing method in the embodiment of the present application is mainly described from the perspective of a first consensus node of a first consensus cluster in a blockchain network. The data processing method includes the following steps:

[0069] 301. A first consensus node of a first consensus cluster obtains collaborative request data of a second consensus cluster and collaborative response data of a third consensus cluster.

[0070] Among them, for the collaborative services between at least two consensus clusters, one of the K consensus clusters in the blockchain network may be designated to process, and this consensus cluster may be called a multi-party interaction cluster. For example, the first consensus cluster among the K consensus clusters may be used as the multi-party interaction cluster, where K is an integer greater than or equal to 1.

[0071] Specifically, for multi-party collaborative services that require cross-chain interaction, for example, when the second consensus cluster requests the third consensus cluster to collaborate, the first consensus node of the first consensus cluster may obtain the collaborative request data of the second consensus cluster and the collaborative response data of the third consensus cluster. Among them, the collaborative request data of the second consensus cluster refers to the specific content of the second consensus cluster's request for the third consensus cluster to collaborate. For example, the second consensus cluster is responsible for processing tax rebate services, and the third consensus cluster is responsible for processing legal person inquiries. The collaborative request data may include the legal person identifier to be reviewed, the signature information of the second consensus cluster, etc. The second consensus cluster requests the third consensus cluster to judge the legal person qualification of a certain tax entity. The collaborative response data of the third consensus cluster refers to the processing result obtained after the third consensus cluster processes the collaborative service requested by the second consensus cluster. For example, the query result of the legal person qualification of a certain tax entity. The collaborative response data may include the query result, the signature information of the third consensus cluster, the hash value of the collaborative request data, etc.

[0072] In some feasible embodiments, the first consensus node of the first consensus cluster receives the collaboration request data sent by the second consensus cluster, and broadcasts the collaboration request data to other consensus nodes in the first consensus cluster, so that each consensus node in the first consensus cluster caches the collaboration request data; after each consensus node in the first consensus cluster caches the collaboration request data, the first consensus node sends a notification message to the third consensus cluster, and the notification message is used to instruct the third consensus cluster to generate collaboration response data corresponding to the collaboration request data; the first consensus node receives the collaboration response data sent by the third consensus cluster, and notifies each consensus node in the first consensus cluster to cache the collaboration response data.

[0073] 302. The first consensus node generates transaction data for the target service based on the collaboration request data of the second consensus cluster and the collaboration response data of the third consensus cluster.

[0074] Specifically, the first consensus node can obtain the execution result of the collaboration service between the second consensus cluster and the third consensus cluster, such as whether the collaboration task is successfully executed; the first consensus node calls the collaboration service smart contract to process the execution result of the collaboration service, the collaboration request data of the second consensus cluster, and the collaboration response data of the third consensus cluster, and obtains the transaction data of the target service. For example, the execution result of the collaboration service, the collaboration request data of the second consensus cluster, and the collaboration response data of the third consensus cluster can be concatenated to generate the transaction data of the target service.

[0075] 303. The first consensus node generates a target block corresponding to the transaction data of the target service.

[0076] Among them, for the specific implementation of step 303, reference can be made to the specific description of step 202 in the foregoing embodiments, and details are not described herein again.

[0077] For example, as Figure 4As shown in the figure, it is a schematic structural diagram of a consensus network in a blockchain network provided by an embodiment of the present application. The consensus network may include consensus clusters for three tax-related services (invoice, credit investigation, legal person) and a multi-party interaction cluster. Each consensus cluster may designate a consensus node as a representative to participate in the multi-party interaction cluster for processing cross-chain collaboration services between at least two consensus clusters. Of course, it is also possible not to designate a representative node to participate in the multi-party interaction cluster, but to interact with the consensus nodes in the multi-party interaction cluster. In addition, each consensus cluster may designate one (or more) representative nodes to access the core consensus cluster corresponding to the main chain (not shown in the figure). Each representative node may represent the corresponding consensus cluster to bid for the next block of the main chain with other representative nodes in the core consensus cluster. Each representative node may obtain the block position of the main chain through bidding and add the block generated by the corresponding consensus cluster to the corresponding position of the main chain. For example, the blocks C1 and C2 generated by the consensus cluster corresponding to the invoice service are added to the second block position (C1) and the sixth block position (C2) of the main chain shown in the figure according to the obtained block positions. The main chain includes the block data of the corresponding services generated by each consensus cluster.

[0078] Figure 4 Among them, in the order of addition to the main chain, the main chain includes block A1, block C1, block B1, block B2, block D1, block C2, block D2, …… It can be seen that since the block positions of the main chain are obtained through bidding, the blocks generated by the same consensus cluster are mostly distributed at non-adjacent block positions in the main chain, such as C1, C2, D1, D2. Taking Figure 4 as an example, when each consensus cluster generates a block and uploads it to the chain, it will anchor the previous block of this service. For example, in block C2, two pieces of information will be filled in.

[0079] SubPreHash: The subprehash of C2 points to the previous block C1 of this service;

[0080] Prehash: The prehash of C2 points to the hash of the previous block actually obtained by bidding for C2 on the main chain, which is D1 here.

[0081] Thus, each consensus cluster can organize its own business sub-chain according to SubPreHash, which only includes the relevant blocks of its own business. And the main chain includes all the information of the entire business ecosystem, which is convenient for unified management and review.

[0082] In some feasible embodiments, the execution process of the cross-chain collaboration service can be expressed as follows (assuming that clusters A and B need to cross the chain and the multi-party interaction cluster is X):

[0083] (1) Party A submits a cross-chain transaction related to a collaborative behavior between Party A and Party B first, such as a request for corporate qualification judgment. At this time, Party A provides the corporate ID to be reviewed, Party A's signature, etc. The business transaction is recorded as a1. In the multi-party interaction cluster X at this time, a1 is broadcast, and each consensus node caches it but does not chain it through consensus.

[0084] (2) After Party A completes the submission and receives the return of "verification successful and cached" from the multi-party interaction cluster X, it will notify Party B that the requested transaction has been sent to the multi-party interaction cluster X. Party B can also choose to subscribe to the relevant transaction information of the collaborative business related to itself from its representative node participating in the multi-party interaction cluster X.

[0085] (3) After Party B obtains a1 and verifies its validity, it constructs b1 to reply to a1, including the review result, hash check value, Party B's signature, the hash of a1 transaction, etc. b1 is sent to the multi-party interaction cluster X, and b1 is also broadcast and verified.

[0086] (4) If the business is completed after b1 replies to a1, then a1 and b1 are sent to the AB cross-chain business smart contract of the multi-party interaction cluster X together. This contract generates a cross-chain transaction c containing the result according to the business result of a1 - b1. c contains the information of a1 and b1, the result of the entire interaction execution, whether the execution is successful or not, etc. Finally, c is packaged into a new block of the multi-party interaction cluster X, and the caches of a1 and b1 themselves are cleared. At this time, the result of the cross-chain transaction (i.e., the generated new block) will continue to enter the main chain and be confirmed according to the storage location in the main chain obtained by the multi-party interaction cluster X through bidding. After being confirmed in the main chain, the cross-chain is truly completed.

[0087] (5) A cross-chain transaction may involve multiple interactions and multiple consensus cluster interactions. For example, if the collaborative interaction transactions of a1, b1, c1, a2, b2, c2, b3, c3, b4 are received cumulatively, the final cross-chain transaction is also merged according to the interaction results.

[0088] (6) If Party A and Party B deem it necessary to record the cross-chain business process and results, then after the cross-chain transaction c is confirmed, a1 can be written into the sub-chain of Party A's cluster, and b1 can be written into the sub-chain of Party B's cluster.

[0089] It should be noted that for each cross-chain interaction service, a corresponding business function contract needs to be deployed in the multi-party interaction cluster.

[0090] 304. The first consensus node sends a data update request to the core consensus cluster. The data update request includes the target block and the first block height corresponding to the first consensus cluster. The data update request is used to instruct the core consensus cluster to add the target block to the main chain according to the first block height.

[0091] In some feasible embodiments, after receiving the update success notification sent by the core consensus cluster, the first consensus node broadcasts the update success notification to other consensus nodes in the first consensus cluster, so that each consensus node in the first consensus cluster deletes the collaborative request data of the cached second consensus cluster and the collaborative response data of the third consensus cluster.

[0092] 305. After receiving the update success notification sent by the core consensus cluster, the first consensus node sends a first data record instruction to the second consensus cluster. The first data record instruction is used to instruct the second consensus cluster to write the collaborative request data into the sub-chain corresponding to the second consensus cluster.

[0093] 306. The first consensus node sends a second data record instruction to the third consensus cluster. The second data record instruction is used to instruct the third consensus cluster to write the collaborative response data into the sub-chain corresponding to the third consensus cluster.

[0094] Specifically, after the core consensus cluster successfully writes the target block into the main chain, the first consensus node can send data record instructions to the second consensus cluster and the third consensus cluster respectively, to instruct the second consensus cluster and the third consensus cluster to write the data related to their own services into the corresponding sub-chains. For example, the second consensus cluster can write the collaborative request data into the sub-chain corresponding to the second consensus cluster, and the third consensus cluster can write the collaborative response data into the sub-chain corresponding to the third consensus cluster, so as to achieve the isolated storage of various types of service data.

[0095] In some feasible embodiments, the auction process for the block position in the main chain can be implemented as follows:

[0096] The first consensus node may send a block auction request to the first representative node corresponding to the first consensus cluster in the core consensus cluster. The block auction request carries the auction information of the first consensus cluster. The auction information may include the waiting duration of the block, the amount of resources paid, etc. The block auction request is used to instruct the first representative node and the representative nodes corresponding to other consensus clusters included in the core consensus cluster to conduct an auction confirmation on the auction information of the first consensus cluster and the auction information of other consensus clusters, so as to obtain the auction result of the next block of the main chain. The first consensus node receives the auction result sent by the first representative node. The auction result is used to indicate one or more of successful auction, the first block height of the next block, and failed auction.

[0097] In some feasible embodiments, if the auction result is a successful auction, the first consensus node sends a data update request to the core consensus cluster.

[0098] In the business scenario of cooperation among K consensus clusters in the embodiments of the present application, for example, when business cooperation is carried out between the second consensus cluster and the third consensus cluster, the first consensus node of the first consensus cluster (multi-party interaction cluster) may obtain the cooperation request data of the second consensus cluster and the cooperation response data of the third consensus cluster, generate the transaction data of the target business according to the cooperation request data of the second consensus cluster and the cooperation response data of the third consensus cluster, generate a target block corresponding to the transaction data of the target business, and send a data update request to the core consensus cluster. The data update request includes the target block and the first block height corresponding to the first consensus cluster, so as to instruct the core consensus cluster to add the target block to the main chain according to the first block height. After the core consensus cluster successfully writes the target block into the main chain, the first consensus node may separately send data recording instructions to the second consensus cluster and the third consensus cluster, so as to instruct the second consensus cluster and the third consensus cluster to write the data related to their own business into the corresponding sub-chains. For example, the second consensus cluster may write the cooperation request data into the sub-chain corresponding to the second consensus cluster, and the third consensus cluster may write the cooperation response data into the sub-chain corresponding to the third consensus cluster, thereby realizing the isolated storage of various types of business data. By using the multi-party interaction cluster, the efficient processing of cross-chain cooperation services can be realized, so that the cross-chain cooperation service can be separated from its own business, effectively supporting two to three or more than three consensus clusters to conduct various cross-chain interactions. By adding cross-chain business contracts, the complex business expansion in fields such as taxation can be flexibly supported.

[0099] Please refer to Figure 5 which is based on the embodiments of the present application Figure 1aThe flowchart of another data processing method provided by the data processing system shown, the data processing method of the embodiments of the present application is mainly described from the side of the second consensus node of the core consensus cluster of the blockchain network, and the data processing method includes the following steps:

[0100] 501. The second consensus node of the core consensus cluster receives a data update request sent by the first consensus node of the first consensus cluster. The data update request includes a target block and a first block height corresponding to the first consensus cluster, and the second consensus node is the representative node corresponding to the first consensus cluster in the core consensus cluster.

[0101] 502. The second consensus node verifies the first block height according to the block auction record of the main chain. The block auction record includes the corresponding relationship between each block position of the main chain and each consensus cluster.

[0102] 503. If the verification passes, the second consensus node adds the target block to the block position corresponding to the first block height in the main chain.

[0103] Among them, the core consensus cluster can record the auction results of each block position of the main chain to obtain a block auction record. The block auction record includes the corresponding relationship between each block position of the main chain and each consensus cluster, that is, the block position auctioned by each consensus cluster. When the second consensus node of the core consensus cluster receives a data update request sent by the first consensus node of the first consensus cluster, it can verify the first block height carried in the data update request according to the block auction record of the main chain. If the verification passes, the second consensus node can add the target block to the block position corresponding to the first block height in the main chain.

[0104] In some feasible embodiments, the data update request sent by the first consensus node may not carry the auctioned first block height. For example, the data update request may include a target block and the signature information of the first consensus cluster. After the second consensus node of the core consensus cluster verifies the signature information of the first consensus cluster, it can query the block auction record to determine the first block height corresponding to the first consensus cluster, and add the target block to the block position corresponding to the first block height in the main chain.

[0105] In some feasible embodiments, the second consensus node receives a block auction request sent by the first consensus node, and the block auction request carries the auction information of the first consensus cluster; the consensus node and the representative nodes corresponding to other consensus clusters included in the core consensus cluster perform auction confirmation on the auction information of the first consensus cluster and the auction information of other consensus clusters to obtain the auction result of the next block of the main chain; the second consensus node sends the auction result to the first consensus node, and the auction result is used to indicate one or more of successful auction, the first block height of the next block, and failed auction.

[0106] Specifically, the auction process for the block position in the main chain can be implemented as follows:

[0107] For the next block of the main chain, each of the K consensus clusters can participate in the auction, where K is an integer greater than or equal to 1. Specifically, the representative nodes of each consensus cluster can participate in the auction. After each consensus cluster generates a block, it can submit auction information to the core consensus cluster through the representative node. For example, the second consensus node of the core consensus cluster receives a block auction request sent by the first consensus node of the first consensus cluster, and the block auction request carries the auction information of the first consensus cluster. The auction information can include the waiting duration of the block, the amount of resources paid, etc. Each representative node included in the core consensus cluster performs auction confirmation on the auction information of the first consensus cluster and the auction information of other consensus clusters. For example, the principle of giving priority to the amount of resources paid can be adopted, that is, the consensus cluster that pays the largest amount of resources obtains the exclusive right to the next block. Or the principle of giving priority to the waiting duration can also be adopted. For example, the duration that each consensus cluster waits to be added to the main chain after generating a new block. The consensus cluster with the longest waiting duration obtains the exclusive right to the next block, so as to obtain the auction result of the next block of the main chain. The auction result is used to indicate one or more of successful auction, the first block height of the next block, and failed auction. For the next block, if no consensus cluster participates in the auction, the next block is an empty block or a main chain configuration block, etc.

[0108] It can be seen that the technical benefits of the multi-consensus cluster block generation algorithm through auction include:

[0109] Isolation of consensus nodes: Different consensus clusters are enabled to complete the consensus of their respective businesses. Except for the representative nodes participating in the main chain business, other consensus nodes can focus only on the consensus of their relevant businesses, which is convenient for privacy isolation, data isolation, and the responsibilities of nodes and servers across different businesses and departments are more clearly defined.

[0110] Concurrent advantage: The K consensus clusters can perform consensus independently, and the performance is not limited by the main chain consensus algorithm and can be infinitely expanded. At the same time, each business does not affect each other, and when there is a large demand for on-chain, the auction intensity can be increased.

[0111] The advantage of data isolation is that the business data of each item exists in the exclusive blocks on the main chain. Each business department only needs to read the relevant blocks of itself without splitting the internal data of the blocks.

[0112] In the embodiment of the present application, the second consensus node of the core consensus cluster receives a data update request sent by the first consensus node of the first consensus cluster. The data update request includes a target block and a first block height corresponding to the first consensus cluster. The second consensus node is the representative node corresponding to the first consensus cluster in the core consensus cluster. The first block height is verified according to the block auction record of the main chain. The block auction record includes the corresponding relationship between each block position of the main chain and each consensus cluster. If the verification is passed, the second consensus node adds the target block to the block position corresponding to the first block height in the main chain, which can realize the block generation by auction of multiple consensus clusters. Moreover, the business data of each multi-consensus cluster exists in the exclusive blocks, and data isolation can be safely and effectively realized.

[0113] It can be understood that in the specific implementation manner of the present application, when it comes to data related to user information, etc., when the above embodiments of the present application are applied to specific products or technologies, user permission or consent needs to be obtained, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions.

[0114] Please refer to Figure 6 , which is a schematic structural diagram of a data processing device according to an embodiment of the present application. The device includes:

[0115] An acquisition module 601, configured to acquire transaction data of a target service. The transaction data of the target service includes transaction data of a service corresponding to the first consensus cluster or transaction data of a collaborative service between at least two consensus clusters;

[0116] A processing module 602, configured to generate a target block corresponding to the transaction data of the target service;

[0117] A sending module 603, configured to send a data update request to the core consensus cluster. The data update request includes the target block and a first block height corresponding to the first consensus cluster. The data update request is used to instruct the core consensus cluster to add the target block to the main chain according to the first block height.

[0118] Optionally, the first consensus cluster is a multi-party interaction cluster among K consensus clusters, where K is an integer greater than or equal to 1. The acquisition module 601 is specifically configured to:

[0119] Acquire collaborative request data of a second consensus cluster and collaborative response data of a third consensus cluster;

[0120] Generate the transaction data of the target service based on the collaboration request data of the second consensus cluster and the collaboration response data of the third consensus cluster.

[0121] Optionally, the obtaining module 601 is specifically configured to:

[0122] Receive the collaboration request data sent by the second consensus cluster;

[0123] After each consensus node in the first consensus cluster caches the collaboration request data, send a notification message to the third consensus cluster, where the notification message is used to instruct the third consensus cluster to generate collaboration response data corresponding to the collaboration request data;

[0124] Receive the collaboration response data sent by the third consensus cluster, and notify each consensus node in the first consensus cluster to cache the collaboration response data.

[0125] Optionally, the obtaining module 601 is specifically configured to:

[0126] Obtain the collaboration service execution result between the second consensus cluster and the third consensus cluster;

[0127] Call the collaboration service smart contract to process the collaboration service execution result, the collaboration request data of the second consensus cluster, and the collaboration response data of the third consensus cluster to obtain the transaction data of the target service.

[0128] Optionally, the sending module 603 is further configured to, after receiving the update success notification sent by the core consensus cluster, broadcast the update success notification to other consensus nodes in the first consensus cluster, so that each consensus node in the first consensus cluster deletes the cached collaboration request data of the second consensus cluster and the collaboration response data of the third consensus cluster.

[0129] Optionally, the sending module 603 is further configured to:

[0130] After receiving the update success notification sent by the core consensus cluster, send a first data record instruction to the second consensus cluster, where the first data record instruction is used to instruct the second consensus cluster to write the collaboration request data into the sub-chain corresponding to the second consensus cluster;

[0131] Send a second data record instruction to the third consensus cluster, where the second data record instruction is used to instruct the third consensus cluster to write the collaboration response data into the sub-chain corresponding to the third consensus cluster.

[0132] Optionally, the device further includes a receiving module 604, where:

[0133] The sending module 603 is further configured to send a block auction request to a first representative node corresponding to the first consensus cluster in the core consensus cluster. The block auction request carries auction information of the first consensus cluster, and is used to instruct the first representative node and representative nodes corresponding to other consensus clusters included in the core consensus cluster to perform auction confirmation on the auction information of the first consensus cluster and the auction information of the other consensus clusters, so as to obtain an auction result of the next block of the main chain;

[0134] The receiving module 604 is configured to receive the auction result sent by the first representative node. The auction result is used to indicate one or more of successful auction, the first block height of the next block, and failed auction.

[0135] Optionally, the sending module 603 is specifically configured to:

[0136] If the auction result is a successful auction, send a data update request to the core consensus cluster.

[0137] Optionally, the processing module 602 is specifically configured to:

[0138] Obtain a previous block in the sub-chain corresponding to the first consensus cluster and a previous block in the main chain;

[0139] Obtain a first digest information of the previous block in the sub-chain corresponding to the first consensus cluster and a second digest information of the previous block in the main chain;

[0140] Generate the target block according to the transaction data of the target service, the first digest information, and the second digest information.

[0141] Optionally, the data update request further includes signature information of the first consensus cluster, and is specifically used to instruct the core consensus cluster to add the target block to the main chain according to the first block height after verifying the signature information.

[0142] It should be noted that the functions of the functional modules of the data processing device in the embodiments of the present application can be specifically implemented according to the methods in the above method embodiments. The specific implementation process can refer to the relevant descriptions of the above method embodiments and will not be repeated here.

[0143] Please refer to Figure 7 , which is a schematic structural diagram of another data processing device in the embodiments of the present application. The device includes:

[0144] A receiving module 701, configured to receive a data update request sent by a first consensus node of a first consensus cluster, where the data update request includes a target block and a first block height corresponding to the first consensus cluster;

[0145] A processing module 702, configured to verify the first block height according to a block auction record of a main chain, where the block auction record includes a corresponding relationship between each block position of the main chain and each consensus cluster;

[0146] The processing module 702 is further configured to, if the verification is passed, add the target block to a block position corresponding to the first block height in the main chain.

[0147] Optionally, the apparatus further includes a sending module 703, where:

[0148] The receiving module 701 is further configured to receive a block auction request sent by the first consensus node, where the block auction request carries auction information of the first consensus cluster;

[0149] The processing module 702 is further configured to perform auction confirmation on the auction information of the first consensus cluster and the auction information of other consensus clusters corresponding to representative nodes of other consensus clusters included in the core consensus cluster, to obtain an auction result of the next block of the main chain;

[0150] The sending module 703 is configured to send the auction result to the first consensus node, where the auction result is used to indicate one or more of successful auction, a first block height of the next block, and failed auction.

[0151] It should be noted that the functions of the functional modules of the data processing apparatus according to the embodiments of the present application can be specifically implemented according to the methods in the foregoing method embodiments, and the specific implementation process can refer to the relevant descriptions of the foregoing method embodiments, which will not be elaborated herein.

[0152] Please refer to Figure 8 , which is a schematic structural diagram of a computer device according to an embodiment of the present application. The computer device according to the embodiment of the present application includes a power supply module and other structures, and includes a processor 801, a storage device 802, and a network interface 803. Data can be exchanged between the processor 801, the storage device 802, and the network interface 803.

[0153] The storage device 802 may include volatile memory, such as random-access memory (RAM); the storage device 802 may also include non-volatile memory, such as flash memory, solid-state drive (SSD), etc.; the storage device 802 may further include a combination of the above types of memories.

[0154] The processor 801 may be a central processing unit (CPU). In one embodiment, the processor 801 may also be a Graphics Processing Unit (GPU). The processor 801 may also be a combination of a CPU and a GPU. In one embodiment, the storage device 802 is used to store program instructions, and the processor 801 may call the program instructions to perform the following operations:

[0155] Obtain transaction data of a target service, where the transaction data of the target service includes transaction data of a service corresponding to a first consensus cluster or transaction data of a collaborative service between at least two consensus clusters;

[0156] Generate a target block corresponding to the transaction data of the target service;

[0157] Call the network interface 803 to send a data update request to the core consensus cluster, where the data update request includes the target block and a first block height corresponding to the first consensus cluster, and the data update request is used to instruct the core consensus cluster to add the target block to the main chain according to the first block height.

[0158] Optionally, the first consensus cluster is a multi-party interaction cluster among K consensus clusters, K is an integer greater than or equal to 1, and the processor 801 is specifically used for:

[0159] Obtain collaborative request data of a second consensus cluster and collaborative response data of a third consensus cluster;

[0160] Generate transaction data of the target service according to the collaborative request data of the second consensus cluster and the collaborative response data of the third consensus cluster.

[0161] Optionally, the processor 801 is specifically used for:

[0162] Call the network interface 803 to receive collaborative request data sent by the second consensus cluster;

[0163] After each consensus node in the first consensus cluster caches the collaboration request data, it calls the network interface 803 to send a notification message to the third consensus cluster. The notification message is used to instruct the third consensus cluster to generate collaboration response data corresponding to the collaboration request data;

[0164] Call the network interface 803 to receive the collaboration response data sent by the third consensus cluster, and notify each consensus node in the first consensus cluster to cache the collaboration response data.

[0165] Optionally, the processor 801 is specifically used for:

[0166] Obtain the collaboration service execution result between the second consensus cluster and the third consensus cluster;

[0167] Call the collaboration service smart contract to process the collaboration service execution result, the collaboration request data of the second consensus cluster, and the collaboration response data of the third consensus cluster to obtain the transaction data of the target service.

[0168] Optionally, after receiving the update success notification sent by the core consensus cluster, the processor 801 also calls the network interface 803 to broadcast the update success notification to other consensus nodes in the first consensus cluster, so that each consensus node in the first consensus cluster deletes the cached collaboration request data of the second consensus cluster and the collaboration response data of the third consensus cluster.

[0169] Optionally, the processor 801 is also used for:

[0170] After receiving the update success notification sent by the core consensus cluster, call the network interface 803 to send a first data recording instruction to the second consensus cluster. The first data recording instruction is used to instruct the second consensus cluster to write the collaboration request data into the sub-chain corresponding to the second consensus cluster;

[0171] Call the network interface 803 to send a second data recording instruction to the third consensus cluster. The second data recording instruction is used to instruct the third consensus cluster to write the collaboration response data into the sub-chain corresponding to the third consensus cluster.

[0172] Optionally, the processor 801 is also used for:

[0173] Call the network interface 803 to send a block auction request to the first representative node corresponding to the first consensus cluster in the core consensus cluster. The block auction request carries the auction information of the first consensus cluster, and is used to instruct the first representative node and the representative nodes corresponding to other consensus clusters included in the core consensus cluster to conduct auction confirmation on the auction information of the first consensus cluster and the auction information of other consensus clusters, so as to obtain the auction result of the next block of the main chain;

[0174] Call the network interface 803 to receive the auction result sent by the first representative node. The auction result is used to indicate one or more of successful auction, the first block height of the next block, and failed auction.

[0175] Optionally, the processor 801 is specifically configured to:

[0176] If the auction result is a successful auction, call the network interface 803 to send a data update request to the core consensus cluster.

[0177] Optionally, the processor 801 is specifically configured to:

[0178] Obtain the previous block in the sub-chain corresponding to the first consensus cluster and the previous block in the main chain;

[0179] Obtain the first digest information of the previous block in the sub-chain corresponding to the first consensus cluster and the second digest information of the previous block in the main chain;

[0180] Generate the target block according to the transaction data of the target service, the first digest information, and the second digest information.

[0181] Optionally, the data update request further includes the signature information of the first consensus cluster, and the data update request is specifically used to instruct the core consensus cluster to add the target block to the main chain according to the first block height after verifying the signature information.

[0182] In one embodiment, the storage device 802 is used to store program instructions, and the processor 801 can call the program instructions to perform the following operations:

[0183] Call the network interface 803 to receive a data update request sent by the first consensus node of the first consensus cluster. The data update request includes the target block and the first block height corresponding to the first consensus cluster;

[0184] Verify the first block height according to the block auction records of the main chain, where the block auction records include the corresponding relationships between the positions of each block of the main chain and each consensus cluster;

[0185] If the verification passes, add the target block to the block position corresponding to the first block height in the main chain.

[0186] Optionally, the processor 801 is further configured to:

[0187] Call the network interface 803 to receive the block auction request sent by the first consensus node, where the block auction request carries the auction information of the first consensus cluster;

[0188] Perform auction confirmation on the auction information of the first consensus cluster and the auction information of other consensus clusters corresponding to the other consensus clusters included in the core consensus cluster to obtain the auction result of the next block of the main chain;

[0189] Call the network interface 803 to send the auction result to the first consensus node, where the auction result is used to indicate one or more of successful auction, the first block height of the next block, and failed auction.

[0190] In specific implementation, the processor 801, the storage device 802, and the network interface 803 described in the embodiments of the present application may execute the implementation manners described in the relevant embodiments of the methods provided in the embodiments of the present application Figure 2 、 Figure 3 、 Figure 5 、 and may also execute the implementation manners described in the relevant embodiments of the devices provided in the embodiments of the present application Figure 6 、 Figure 7 , which will not be elaborated here.

[0191] In the above embodiments, the descriptions of the various embodiments have their own emphases. For parts not elaborated in a certain embodiment, reference may be made to the relevant descriptions of other embodiments. Essentially, the technical solutions of the present application, or the parts that contribute to the prior art, or all or part of the technical solutions may be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc., specifically, the processor in the computer device) to execute all or part of the steps of the methods in the various embodiments of the present application. Among them, the aforementioned storage medium may include: various media such as USB flash drives, mobile hard disks, magnetic disks, optical disks, read-only memory (English: Read-Only Memory, abbreviation: ROM), or random access memory (English: Random Access Memory, abbreviation: RAM) that can store program codes.

[0192] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A data processing method based on a blockchain network, characterized in that, The blockchain network includes K consensus clusters, where the core consensus cluster among the K consensus clusters is used to manage the block data of the main chain; each consensus cluster other than the core consensus cluster among the K consensus clusters is used to manage the block data of the sub-chain corresponding to the corresponding business. The core consensus cluster includes the representative nodes corresponding to each consensus cluster. K is an integer greater than or equal to 1. The method includes: The first consensus node of the first consensus cluster obtains the transaction data of the target business. The transaction data of the target business includes the transaction data of the business corresponding to the first consensus cluster or the transaction data of the collaborative business between at least two consensus clusters. The first consensus node is any consensus node included in the first consensus cluster; The first consensus node generates a target block corresponding to the transaction data of the target business; The first consensus node sends a data update request to the core consensus cluster. The data update request includes the target block, the signature information of the first consensus cluster, and the first block height corresponding to the first consensus cluster. The data update request is used to instruct the core consensus cluster to add the target block to the main chain according to the first block height after verifying the signature information.

2. The method according to claim 1, characterized in that The first consensus cluster is a multi-party interaction cluster among the K consensus clusters. The first consensus node of the first consensus cluster obtaining the transaction data of the target business includes: The first consensus node of the first consensus cluster obtains the collaborative request data of the second consensus cluster and the collaborative response data of the third consensus cluster; The first consensus node generates the transaction data of the target business according to the collaborative request data of the second consensus cluster and the collaborative response data of the third consensus cluster.

3. The method according to claim 2, wherein The first consensus node of the first consensus cluster obtaining the collaborative request data of the second consensus cluster and the collaborative response data of the third consensus cluster includes: The first consensus node of the first consensus cluster receives the collaborative request data sent by the second consensus cluster; After each consensus node in the first consensus cluster caches the collaborative request data, the first consensus node sends a notification message to the third consensus cluster. The notification message is used to instruct the third consensus cluster to generate the collaborative response data corresponding to the collaborative request data; The first consensus node receives the collaborative response data sent by the third consensus cluster and notifies each consensus node in the first consensus cluster to cache the collaborative response data.

4. The method according to claim 2 or 3, characterized in that, The first consensus node generating the transaction data of the target business according to the collaborative request data of the second consensus cluster and the collaborative response data of the third consensus cluster includes: The first consensus node obtains the execution result of the collaborative business between the second consensus cluster and the third consensus cluster; The first consensus node calls the collaborative business smart contract to process the execution result of the collaborative business, the collaborative request data of the second consensus cluster, and the collaborative response data of the third consensus cluster to obtain the transaction data of the target business.

5. The method according to claim 2 or 3, characterized in that, The method further includes: After receiving the update success notification sent by the core consensus cluster, the first consensus node broadcasts the update success notification to other consensus nodes in the first consensus cluster, so that each consensus node in the first consensus cluster deletes the cached collaboration request data of the second consensus cluster and the collaboration response data of the third consensus cluster.

6. The method according to claim 2 or 3, characterized in that The method further includes: After receiving the update success notification sent by the core consensus cluster, the first consensus node sends a first data record instruction to the second consensus cluster, and the first data record instruction is used to instruct the second consensus cluster to write the collaboration request data into the sub-chain corresponding to the second consensus cluster; The first consensus node sends a second data record instruction to the third consensus cluster, and the second data record instruction is used to instruct the third consensus cluster to write the collaboration response data into the sub-chain corresponding to the third consensus cluster.

7. The method according to any one of claims 1 to 3, characterized in that The method further includes: The first consensus node sends a block auction request to the first representative node corresponding to the first consensus cluster in the core consensus cluster. The block auction request carries the auction information of the first consensus cluster, and the block auction request is used to instruct the first representative node to perform auction confirmation on the auction information of the first consensus cluster and the auction information of other consensus clusters corresponding to the other consensus clusters included in the core consensus cluster, so as to obtain the auction result of the next block of the main chain; The first consensus node receives the auction result sent by the first representative node, and the auction result is used to indicate one or more of successful auction, the first block height of the next block, and failed auction.

8. The method according to claim 7, wherein The first consensus node sends a data update request to the core consensus cluster, including: If the auction result is a successful auction, the first consensus node sends a data update request to the core consensus cluster.

9. The method according to any one of claims 1 to 3, characterized in that, The first consensus node generates a target block corresponding to the transaction data of the target service, including: The first consensus node obtains the previous block in the sub-chain corresponding to the first consensus cluster and the previous block in the main chain; The first consensus node obtains the first digest information of the previous block in the sub-chain corresponding to the first consensus cluster and the second digest information of the previous block in the main chain; The first consensus node generates the target block according to the transaction data of the target service, the first digest information, and the second digest information.

10. A data processing method based on a blockchain network, characterized in that, The blockchain network includes K consensus clusters. The core consensus cluster in the K consensus clusters is used to manage the block data of the main chain; each consensus cluster other than the core consensus cluster in the K consensus clusters is used to manage the block data of the sub-chain corresponding to the corresponding service. The core consensus cluster includes the representative nodes corresponding to each consensus cluster. K is an integer greater than or equal to 1. The method includes: The second consensus node of the core consensus cluster receives a data update request sent by the first consensus node of the first consensus cluster. The data update request includes a target block corresponding to the transaction data of the target service, the signature information of the first consensus cluster, and the first block height corresponding to the first consensus cluster. The second consensus node is the representative node corresponding to the first consensus cluster in the core consensus cluster. Among them, the transaction data of the target service includes the transaction data of the service corresponding to the first consensus cluster or the transaction data of the collaborative service between at least two consensus clusters. After the second consensus node verifies the signature information, it verifies the first block height according to the block auction record of the main chain. The block auction record includes the corresponding relationship between each block position of the main chain and each consensus cluster. If the verification is passed, the second consensus node adds the target block to the block position corresponding to the first block height in the main chain.

11. The method according to claim 10, wherein The method further includes: The second consensus node receives a block auction request sent by the first consensus node. The block auction request carries the auction information of the first consensus cluster. The second consensus node and the representative nodes corresponding to other consensus clusters included in the core consensus cluster conduct auction confirmation on the auction information of the first consensus cluster and the auction information of other consensus clusters to obtain the auction result of the next block of the main chain. The second consensus node sends the auction result to the first consensus node. The auction result is used to indicate one or more of successful auction, the first block height of the next block, and failed auction.

12. A data processing device, characterized in that, The device includes: An acquisition module, configured to acquire transaction data of a target service. The transaction data of the target service includes transaction data of a service corresponding to a first consensus cluster or transaction data of a collaborative service between at least two consensus clusters. A processing module, configured to generate a target block corresponding to the transaction data of the target service. A sending module, configured to send a data update request to the core consensus cluster. The data update request includes the target block, the signature information of the first consensus cluster, and the first block height corresponding to the first consensus cluster. The data update request is used to instruct the core consensus cluster to add the target block to the main chain according to the first block height after verifying the signature information.

13. A data processing device, characterized in that, The device includes: A receiving module, configured to receive a data update request sent by a first consensus node of a first consensus cluster. The data update request includes a target block corresponding to transaction data of a target service, the signature information of the first consensus cluster, and the first block height corresponding to the first consensus cluster. Among them, the transaction data of the target service includes transaction data of a service corresponding to the first consensus cluster or transaction data of a collaborative service between at least two consensus clusters. A processing module, configured to verify the first block height according to the block auction records of the main chain after the signature information is verified successfully, where the block auction records include the corresponding relationships between the positions of the respective blocks of the main chain and the respective consensus clusters; The processing module is further configured to, if the verification is successful, add the target block to the block position corresponding to the first block height in the main chain.

14. A computer device, characterized in that, The computer device includes a processor, a network interface, and a storage device. The processor, the network interface, and the storage device are interconnected. Among them, the network interface is controlled by the processor to send and receive data, the storage device is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the data processing method based on a blockchain network according to any one of claims 1 to 9.

15. A computer device, characterized in that, The computer device includes a processor, a network interface, and a storage device. The processor, the network interface, and the storage device are interconnected. Among them, the network interface is controlled by the processor to send and receive data, the storage device is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the data processing method based on a blockchain network according to any one of claims 10 to 11.

16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program includes program instructions, and the program instructions are executed by a processor to execute the data processing method based on a blockchain network according to any one of claims 1 to 9.

17. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program includes program instructions, and the program instructions are executed by a processor to execute the data processing method based on a blockchain network according to any one of claims 10 to 11.

18. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a computer processor, it implements the data processing method based on a blockchain network according to any one of claims 1 to 9.

19. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a computer processor, it implements the data processing method based on a blockchain network according to any one of claims 10 to 11.

Citation Information

Patent Citations

  • Block chain service calibration method and device

    CN108154367A

  • Consensus network management method and device, computer and readable storage medium

    CN111461885A

  • Block distributed block chain generation method, storage medium and electronic equipment

    CN112765681A